INTRODUCTION
Overview
Download and Install
Documentation
Publications

REPOSITORY
Libraries

DEVELOPER
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

oceanserverreader.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_READER_H
00012 #define GBX_OCEANSERVER_READER_H
00013 
00014 #include <gbxserialacfr/serial.h>
00015 #include <gbxutilacfr/tracer.h>
00016 
00017 #include <gbxsmartbatteryacfr/oceanserverparser.h>
00018 
00019 
00020 namespace gbxsmartbatteryacfr
00021 {  
00022     
00030 class OceanServerReader
00031 {
00032 public:
00033     
00037     OceanServerReader( const std::string   &serialPort,
00038                        gbxutilacfr::Tracer &tracer );
00039     
00042     void read( OceanServerSystem &system );
00043 
00047     void reset();
00048     
00049 
00050 private:   
00051     
00052     gbxserialacfr::Serial serial_;
00053     gbxutilacfr::Tracer& tracer_;
00054     gbxsmartbatteryacfr::OceanServerParser parser_;
00055     
00056     void checkConnection();
00057     std::string tryToReadLineFromSerialPort();
00058     
00059     std::string beginningRecordLine_;
00060     bool firstTime_;
00061 };
00062 
00063 } // namespace
00064 
00065 #endif
 

Generated for GearBox by  doxygen 1.4.5