1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #ifndef IVDRIVER_GPS_H
- #define IVDRIVER_GPS_H
- #include <QSerialPort>
- #include <QUdpSocket>
- #include <QNetworkDatagram>
- #include "ivdriver.h"
- #include "gpsimu.pb.h"
- #include "xmlparam.h"
- namespace iv {
- class ivdriver_gps : public ivdriver
- {
- public:
- ivdriver_gps();
- public:
- void loadxmlparam(std::string strxmlpath);
- virtual void modulerun();
- //if decode 1 sen. return 1,else return 0
- virtual int decode(iv::gps::gpsimu & xgpsimu) = 0;
- public:
- bool checknmeasen(const char * strsen,const unsigned int nlen);
- public:
- QString mstrBuffer;
- private:
- void ShareMsg(iv::gps::gpsimu & xgpsimu);
- void broadcastmsg(iv::gps::gpsimu & xgpsimu);
- private:
- int mnbaudrate = 230400;
- std::string mstrportname = "/dev/ttyUSB0";
- std::string mstrmsgname = "gps";
- void * mpagpsimu;
- QSerialPort *m_serialPort_GPS;
- QUdpSocket *mudpSocketGPSIMU;
- };
- }
- #endif // IVDRIVER_GPS_H
|