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
RevLine 
[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
15using namespace com::gpssolutions::rtnet;
16
[5416]17namespace GnssCenter {
[5446]18 class t_monitor;
[5416]19}
20
[5415]21class 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]39class t_thriftHandler : public RtnetDataIf {
[5415]40 public:
[5446]41 t_thriftHandler(GnssCenter::t_monitor* parent);
[5424]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 };
[5446]60 GnssCenter::t_monitor* _parent;
[5407]61 std::map<std::string, t_stationCrd> _stationCrd;
62};
63
[5424]64class t_thriftClient : public QThread {
65 public:
[5446]66 t_thriftClient(GnssCenter::t_monitor* parent);
[5424]67 ~t_thriftClient();
68 virtual void run();
[5431]69 void stop() {
[5425]70 QMutexLocker locker(&_mutex);
71 _stop = true;
72 }
[5424]73
74 private:
[5446]75 QMutex _mutex;
76 GnssCenter::t_monitor* _parent;
77 bool _stop;
[5424]78};
79
[5407]80#endif
Note: See TracBrowser for help on using the repository browser.