Rev | Line | |
---|
[5407] | 1 | #ifndef THRIFTCLIENT_H
|
---|
| 2 | #define THRIFTCLIENT_H
|
---|
| 3 |
|
---|
| 4 | #include <string>
|
---|
| 5 | #include <map>
|
---|
[5409] | 6 | #include <QThread>
|
---|
[5425] | 7 | #include <QMutex>
|
---|
[5407] | 8 |
|
---|
| 9 | #include <transport/TSocket.h>
|
---|
| 10 | #include <transport/TBufferTransports.h>
|
---|
| 11 | #include <protocol/TBinaryProtocol.h>
|
---|
| 12 |
|
---|
| 13 | #include "gen-cpp/RtnetData.h"
|
---|
| 14 |
|
---|
| 15 | using namespace com::gpssolutions::rtnet;
|
---|
| 16 |
|
---|
[5416] | 17 | namespace GnssCenter {
|
---|
[5446] | 18 | class t_monitor;
|
---|
[5416] | 19 | }
|
---|
| 20 |
|
---|
[5447] | 21 | namespace GnssCenter {
|
---|
| 22 |
|
---|
[5415] | 23 | class t_thriftResult {
|
---|
[5407] | 24 | public:
|
---|
[5415] | 25 | t_thriftResult() {
|
---|
| 26 | _nGPS = 0;
|
---|
| 27 | _nGLO = 0;
|
---|
| 28 | _x = 0.0;
|
---|
| 29 | _y = 0.0;
|
---|
| 30 | _z = 0.0;
|
---|
| 31 | }
|
---|
| 32 | ~t_thriftResult() {}
|
---|
| 33 | std::string _name;
|
---|
| 34 | int _nGPS;
|
---|
| 35 | int _nGLO;
|
---|
| 36 | double _x;
|
---|
| 37 | double _y;
|
---|
| 38 | double _z;
|
---|
| 39 | };
|
---|
| 40 |
|
---|
[5424] | 41 | class t_thriftHandler : public RtnetDataIf {
|
---|
[5415] | 42 | public:
|
---|
[5447] | 43 | t_thriftHandler(t_monitor* parent);
|
---|
[5424] | 44 | ~t_thriftHandler();
|
---|
[5407] | 45 | void startDataStream() {}
|
---|
[5416] | 46 | void registerRtnet(const RtnetInformation&) {}
|
---|
| 47 | void handleZDAmb(const std::vector<ZDAmb>&) {}
|
---|
| 48 | void handleDDAmbresBaselines(const std::vector<DDAmbresBaseline>&) {}
|
---|
[5407] | 49 | void handleSatelliteXYZ(const std::vector<SatelliteXYZ>& svXYZList);
|
---|
| 50 | void handleStationInfo(const std::vector<StationInfo>& stationList);
|
---|
[5416] | 51 | void handleStationAuxInfo(const std::vector<StationAuxInfo>&) {}
|
---|
| 52 | void handleDGPSCorr(const std::vector<DGPSCorr>&) {}
|
---|
| 53 | void handleSatelliteClock(const std::vector<SatelliteClock>&) {}
|
---|
[5407] | 54 | void handleEpochResults(const RtnetEpoch& epoch);
|
---|
| 55 | private:
|
---|
| 56 | class t_stationCrd {
|
---|
| 57 | public:
|
---|
| 58 | double _x;
|
---|
| 59 | double _y;
|
---|
| 60 | double _z;
|
---|
| 61 | };
|
---|
[5447] | 62 | t_monitor* _parent;
|
---|
[5407] | 63 | std::map<std::string, t_stationCrd> _stationCrd;
|
---|
| 64 | };
|
---|
| 65 |
|
---|
[5424] | 66 | class t_thriftClient : public QThread {
|
---|
| 67 | public:
|
---|
[5447] | 68 | t_thriftClient(t_monitor* parent);
|
---|
[5424] | 69 | ~t_thriftClient();
|
---|
| 70 | virtual void run();
|
---|
[5431] | 71 | void stop() {
|
---|
[5425] | 72 | QMutexLocker locker(&_mutex);
|
---|
| 73 | _stop = true;
|
---|
| 74 | }
|
---|
[5424] | 75 |
|
---|
| 76 | private:
|
---|
[5447] | 77 | QMutex _mutex;
|
---|
| 78 | t_monitor* _parent;
|
---|
| 79 | bool _stop;
|
---|
[5424] | 80 | };
|
---|
| 81 |
|
---|
[5447] | 82 | } // namespace GnssCenter
|
---|
| 83 |
|
---|
[5407] | 84 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.