GX3.hpp
Go to the documentation of this file.
00001 
00002 
00003 #ifndef GX3_HPP_
00004 #define GX3_HPP_
00005 /*
00006  * GX3.hpp
00007  *
00008  *  Created on: May 20, 2011
00009  *      Author: dnad
00010  */
00011 #include <string>
00012 #include <boost/asio/serial_port.hpp>
00013 
00014 namespace LABUST
00015 {
00016   namespace MICROSTRAIN
00017   {
00021     class GX3
00022     {
00026       static const size_t supportedFirmware;
00027     public:
00031       typedef enum {Continuous, Active, Idle} Mode;
00038       GX3(const std::string& portName, int baud = 115200);
00039 
00043       inline Mode mode(){return mode_;};
00047       inline void mode(Mode mode){this->mode_ = mode;};
00048 
00052       double heading();
00053 
00054     private:
00061       void connect(const std::string& portName, int baud);
00065       void checkFirmware();
00069       void readConfiguration();
00070 
00074       boost::asio::io_service io;
00078       boost::asio::serial_port port;
00079 
00083       Mode mode_;
00084     };
00085 
00086     /*
00087     struct gx3read
00088     {
00089       template <class message>
00090       void operator()(boost::asio::serial_port& port, message& msg)
00091       {
00092         boost::asio::write(port,);
00093       }
00094     };*/
00095 
00096 
00097   }
00098 }
00099 
00100 /* GX3_HPP_ */
00101 #endif


acoustic_vr
Author(s):
autogenerated on Fri Feb 7 2014 11:37:09