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 {
|
---|
| 18 | class t_map_stations;
|
---|
| 19 | }
|
---|
| 20 |
|
---|
[5415] | 21 | class t_thriftResult {
|
---|
[5407] | 22 | public:
|
---|
[5415] | 23 | t_thriftResult() {
|
---|
| 24 | _nGPS = 0;
|
---|
| 25 | _nGLO = 0;
|
---|
| 26 | _x = 0.0;
|
---|
| 27 | _y = 0.0;
|
---|
| 28 | _z = 0.0;
|
---|
| 29 | }
|
---|
| 30 | ~t_thriftResult() {}
|
---|
| 31 | std::string _name;
|
---|
| 32 | int _nGPS;
|
---|
| 33 | int _nGLO;
|
---|
| 34 | double _x;
|
---|
| 35 | double _y;
|
---|
| 36 | double _z;
|
---|
| 37 | };
|
---|
| 38 |
|
---|
[5424] | 39 |
|
---|
| 40 | class t_thriftHandler : public RtnetDataIf {
|
---|
[5415] | 41 | public:
|
---|
[5424] | 42 | t_thriftHandler(GnssCenter::t_map_stations* parent);
|
---|
| 43 | ~t_thriftHandler();
|
---|
[5407] | 44 | void startDataStream() {}
|
---|
[5416] | 45 | void registerRtnet(const RtnetInformation&) {}
|
---|
| 46 | void handleZDAmb(const std::vector<ZDAmb>&) {}
|
---|
| 47 | void handleDDAmbresBaselines(const std::vector<DDAmbresBaseline>&) {}
|
---|
[5407] | 48 | void handleSatelliteXYZ(const std::vector<SatelliteXYZ>& svXYZList);
|
---|
| 49 | void handleStationInfo(const std::vector<StationInfo>& stationList);
|
---|
[5416] | 50 | void handleStationAuxInfo(const std::vector<StationAuxInfo>&) {}
|
---|
| 51 | void handleDGPSCorr(const std::vector<DGPSCorr>&) {}
|
---|
| 52 | void handleSatelliteClock(const std::vector<SatelliteClock>&) {}
|
---|
[5407] | 53 | void handleEpochResults(const RtnetEpoch& epoch);
|
---|
| 54 | private:
|
---|
| 55 | class t_stationCrd {
|
---|
| 56 | public:
|
---|
| 57 | double _x;
|
---|
| 58 | double _y;
|
---|
| 59 | double _z;
|
---|
| 60 | };
|
---|
[5416] | 61 | GnssCenter::t_map_stations* _parent;
|
---|
[5407] | 62 | std::map<std::string, t_stationCrd> _stationCrd;
|
---|
| 63 | };
|
---|
| 64 |
|
---|
[5424] | 65 | class t_thriftClient : public QThread {
|
---|
| 66 | public:
|
---|
| 67 | t_thriftClient(GnssCenter::t_map_stations* parent);
|
---|
| 68 | ~t_thriftClient();
|
---|
| 69 | virtual void run();
|
---|
[5431] | 70 | void stop() {
|
---|
[5425] | 71 | QMutexLocker locker(&_mutex);
|
---|
| 72 | _stop = true;
|
---|
| 73 | }
|
---|
[5424] | 74 |
|
---|
| 75 | private:
|
---|
[5425] | 76 | QMutex _mutex;
|
---|
[5424] | 77 | GnssCenter::t_map_stations* _parent;
|
---|
| 78 | bool _stop;
|
---|
| 79 | };
|
---|
| 80 |
|
---|
[5407] | 81 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.