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