source: ntrip/trunk/GnssCenter/map_stations/thriftclient.h@ 5428

Last change on this file since 5428 was 5428, checked in by mervart, 8 years ago
File size: 1.9 KB
Line 
1#ifndef THRIFTCLIENT_H
2#define THRIFTCLIENT_H
3
4#include <string>
5#include <map>
6#include <QThread>
7#include <QMutex>
8
9#include <transport/TSocket.h>
10#include <transport/TBufferTransports.h>
11#include <protocol/TBinaryProtocol.h>
12
13#include "gen-cpp/RtnetData.h"
14
15using namespace com::gpssolutions::rtnet;
16
17namespace GnssCenter {
18 class t_map_stations;
19}
20
21class t_thriftResult {
22 public:
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
39
40class t_thriftHandler : public RtnetDataIf {
41 public:
42 t_thriftHandler(GnssCenter::t_map_stations* parent);
43 ~t_thriftHandler();
44 void startDataStream() {}
45 void registerRtnet(const RtnetInformation&) {}
46 void handleZDAmb(const std::vector<ZDAmb>&) {}
47 void handleDDAmbresBaselines(const std::vector<DDAmbresBaseline>&) {}
48 void handleSatelliteXYZ(const std::vector<SatelliteXYZ>& svXYZList);
49 void handleStationInfo(const std::vector<StationInfo>& stationList);
50 void handleStationAuxInfo(const std::vector<StationAuxInfo>&) {}
51 void handleDGPSCorr(const std::vector<DGPSCorr>&) {}
52 void handleSatelliteClock(const std::vector<SatelliteClock>&) {}
53 void handleEpochResults(const RtnetEpoch& epoch);
54 private:
55 class t_stationCrd {
56 public:
57 double _x;
58 double _y;
59 double _z;
60 };
61 GnssCenter::t_map_stations* _parent;
62 std::map<std::string, t_stationCrd> _stationCrd;
63};
64
65class t_thriftClient : public QThread {
66 public:
67 t_thriftClient(GnssCenter::t_map_stations* parent);
68 ~t_thriftClient();
69 virtual void run();
70 void stopAndDestroy() {
71 QMutexLocker locker(&_mutex);
72 _stop = true;
73 }
74
75 private:
76 QMutex _mutex;
77 GnssCenter::t_map_stations* _parent;
78 bool _stop;
79};
80
81#endif
Note: See TracBrowser for help on using the repository browser.