INTRODUCTION
Overview
Download and Install
Documentation
Publications

REPOSITORY
Libraries

DEVELOPER
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

oceanserverparser.h

00001 /*
00002  * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
00003  *               http://gearbox.sf.net/
00004  * Copyright (c) 2004-2010 Tobias Kaupp
00005  *
00006  * This distribution is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef GBX_OCEANSERVER_PARSER_H
00012 #define GBX_OCEANSERVER_PARSER_H
00013 
00014 #include <map>
00015 #include <gbxutilacfr/tracer.h>
00016 #include <gbxsmartbatteryacfr/oceanserversystem.h>
00017 
00018 namespace gbxsmartbatteryacfr
00019 {
00020     
00026 class OceanServerParser
00027 {
00028 public:
00029     
00030     OceanServerParser( gbxutilacfr::Tracer &tracer );
00031     
00034     void parse( std::vector<std::string> &stringList, 
00035                 OceanServerSystem        &batterySystem );
00036     
00038     bool atBeginningOfRecord( const std::string &line );
00039 
00040 private:       
00041     
00042     gbxutilacfr::Tracer &tracer_;
00043             
00044     // parsing functions
00045     void parseFields( std::vector<std::string>       &fields, 
00046                       OceanServerSystem              &batterySystem );
00047     
00048     void parseSystemData( const std::map<std::string,std::string> &keyValuePairs,
00049                           OceanServerSystem                       &batterySystem);
00050     
00051     void parseControllerData( const std::map<std::string,std::string> &keyValuePairs,
00052                               OceanServerSystem                       &batterySystem);
00053     
00054     void parseSingleBatteryData( const std::map<std::string,std::string> &keyValuePairs, 
00055                                  unsigned int                             batteryNum,
00056                                  OceanServerSystem                       &batterySystem);
00057     
00058 };
00059 
00060 
00061 } // namespace
00062 
00063 #endif
 

Generated for GearBox by  doxygen 1.4.5