00001 /*--------------------------------------------------------------- 00002 FILE: CBoardDLMS.h 00003 00004 Part of the MRPT Library 00005 ISA - Universidad de Malaga - http://www.isa.uma.es 00006 ---------------------------------------------------------------*/ 00007 00008 #ifndef CBoardDLMS_H 00009 #define CBoardDLMS_H 00010 00011 #include <mrpt/hwdrivers/CGenericSensor.h> 00012 #include <mrpt/hwdrivers/CInterfaceFTDIMessages.h> 00013 #include <mrpt/utils/CConfigFileBase.h> 00014 #include <mrpt/poses/CPose3D.h> 00015 00016 namespace mrpt 00017 { 00018 namespace hwdrivers 00019 { 00047 class HWDLLIMPEXP CBoardDLMS : public hwdrivers::CInterfaceFTDIMessages, public CGenericSensor 00048 { 00049 DEFINE_GENERIC_SENSOR(CBoardDLMS) 00050 protected: 00053 std::string m_usbSerialNumber; 00054 uint32_t m_timeStartUI; 00055 mrpt::system::TTimeStamp m_timeStartTT; 00056 00057 mrpt::poses::CPose3D m_mSensorPose, m_sSensorPose; 00058 00062 bool checkConnectionAndConnect(); 00063 00064 bool checkCRC( const std::vector<unsigned char> &frame ); 00065 uint16_t CreateCRC( const std::vector<unsigned char> &CommData, uint16_t uLen ); 00066 00067 public: 00072 CBoardDLMS( ); 00073 00076 virtual ~CBoardDLMS(); 00077 00081 void loadConfig( 00082 const mrpt::utils::CConfigFileBase &configSource, 00083 const std::string &iniSection ); 00084 00089 void doProcess(); 00090 00094 virtual void initialize(); 00095 00099 bool queryFirmwareVersion( std::string &out_firmwareVersion ); 00100 00104 bool sendCommand( uint8_t command, std::vector<unsigned char> &response ); 00105 00106 bool queryTimeStamp( mrpt::system::TTimeStamp &tstamp ); 00107 00108 }; // end of class 00109 00110 } // end of namespace 00111 } // End of namespace 00112 00113 #endif
Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN: at Thu Feb 26 02:18:33 EST 2009 |