source: ntrip/trunk/GnssCenter/monitor/thriftclient.h@ 5446

Last change on this file since 5446 was 5446, checked in by mervart, 11 years ago
File size: 1.8 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_monitor;
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
39class t_thriftHandler : public RtnetDataIf {
40 public:
41 t_thriftHandler(GnssCenter::t_monitor* parent);
42 ~t_thriftHandler();
43 void startDataStream() {}
44 void registerRtnet(const RtnetInformation&) {}
45 void handleZDAmb(const std::vector<ZDAmb>&) {}
46 void handleDDAmbresBaselines(const std::vector<DDAmbresBaseline>&) {}
47 void handleSatelliteXYZ(const std::vector<SatelliteXYZ>& svXYZList);
48 void handleStationInfo(const std::vector<StationInfo>& stationList);
49 void handleStationAuxInfo(const std::vector<StationAuxInfo>&) {}
50 void handleDGPSCorr(const std::vector<DGPSCorr>&) {}
51 void handleSatelliteClock(const std::vector<SatelliteClock>&) {}
52 void handleEpochResults(const RtnetEpoch& epoch);
53 private:
54 class t_stationCrd {
55 public:
56 double _x;
57 double _y;
58 double _z;
59 };
60 GnssCenter::t_monitor* _parent;
61 std::map<std::string, t_stationCrd> _stationCrd;
62};
63
64class t_thriftClient : public QThread {
65 public:
66 t_thriftClient(GnssCenter::t_monitor* parent);
67 ~t_thriftClient();
68 virtual void run();
69 void stop() {
70 QMutexLocker locker(&_mutex);
71 _stop = true;
72 }
73
74 private:
75 QMutex _mutex;
76 GnssCenter::t_monitor* _parent;
77 bool _stop;
78};
79
80#endif
Note: See TracBrowser for help on using the repository browser.