Changeset 5416 in ntrip for trunk/GnssCenter
- Timestamp:
- Sep 10, 2013, 5:55:53 PM (12 years ago)
- Location:
- trunk/GnssCenter/map_stations
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GnssCenter/map_stations/map_stations.cpp
r5415 r5416 28 28 29 29 #include "map_stations.h" 30 #include "thriftclient.h" 30 31 31 32 using namespace std; … … 98 99 // Thrift Client; 99 100 // -------------- 100 _thriftClient = new t_thriftClient; 101 connect(_thriftClient, SIGNAL(newThriftResult(t_thriftResult)), 102 this, SLOT(slotNewThriftResult(t_thriftResult))); 101 _thriftClient = new t_thriftClient(this); 103 102 _thriftClient->start(); 104 103 } … … 164 163 // 165 164 ///////////////////////////////////////////////////////////////////////////// 166 void t_map_stations::slotNewThriftResult(t_thriftResult result) { 167 cout << result ._name << ' '168 << result ._nGPS << ' ' << result._nGLO << ' '169 << result ._x << ' ' << result._y << ' ' << result._z << endl;165 void t_map_stations::slotNewThriftResult(t_thriftResult* result) { 166 cout << result->_name << ' ' 167 << result->_nGPS << ' ' << result->_nGLO << ' ' 168 << result->_x << ' ' << result->_y << ' ' << result->_z << endl; 170 169 } 171 170 -
trunk/GnssCenter/map_stations/map_stations.h
r5415 r5416 5 5 #include <QWhatsThis> 6 6 #include "plugininterface.h" 7 #include "thriftclient.h"8 7 9 8 class QwtPlot; 10 9 class QwtPlotZoomer; 11 10 class t_thriftClient; 11 class t_thriftResult; 12 12 13 13 namespace GnssCenter { … … 21 21 public slots: 22 22 void slotNewPoint(const QString& name, double latDeg, double lonDeg); 23 void slotNewThriftResult(t_thriftResult); 23 void slotNewThriftResult(t_thriftResult*); 24 24 25 25 private slots: -
trunk/GnssCenter/map_stations/thriftclient.cpp
r5415 r5416 5 5 6 6 #include "thriftclient.h" 7 #include "map_stations.h" 7 8 8 9 using namespace apache::thrift; … … 16 17 // Constructor 17 18 ////////////////////////////////////////////////////////////////////////////// 18 t_thriftClient::t_thriftClient() { 19 _stop = false; 20 qRegisterMetaType<t_thriftResult>("t_thriftResult");19 t_thriftClient::t_thriftClient(GnssCenter::t_map_stations* parent) { 20 _stop = false; 21 _parent = parent; 21 22 } 22 23 … … 36 37 shared_ptr<TTransport> transport(new TBufferedTransport(socket)); 37 38 shared_ptr<TProtocol> protocol(new TBinaryProtocol(transport)); 38 shared_ptr<RtnetDataIf> dataHandler(new t_thriftClient()); 39 shared_ptr<RtnetDataIf> dataHandler(new t_thriftClient(_parent)); 39 40 shared_ptr<TProcessor> processor(new RtnetDataProcessor(dataHandler)); 40 41 … … 97 98 result._z = _stationCrd[staRes.stationName]._z; 98 99 } 99 100 emit newThriftResult(result); 101 102 cout << result._name << ' ' << result._nGPS << ' ' << result._nGLO << endl; 100 _parent->slotNewThriftResult(&result); 103 101 } 104 102 } -
trunk/GnssCenter/map_stations/thriftclient.h
r5415 r5416 5 5 #include <map> 6 6 #include <QThread> 7 #include <QMetaType>8 7 9 8 #include <transport/TSocket.h> … … 14 13 15 14 using namespace com::gpssolutions::rtnet; 15 16 namespace GnssCenter { 17 class t_map_stations; 18 } 16 19 17 20 class t_thriftResult { … … 33 36 }; 34 37 35 class t_thriftClient : public QThread, public com::gpssolutions::rtnet::RtnetDataIf { 36 Q_OBJECT 38 class t_thriftClient : public QThread, public RtnetDataIf { 37 39 public: 38 t_thriftClient(); 40 t_thriftClient(GnssCenter::t_map_stations* parent); 39 41 ~t_thriftClient(); 40 42 virtual void run(); … … 42 44 43 45 void startDataStream() {} 44 void registerRtnet(const RtnetInformation& info) {}45 void handleZDAmb(const std::vector<ZDAmb>& ambList) {}46 void handleDDAmbresBaselines(const std::vector<DDAmbresBaseline>& ambList) {}46 void registerRtnet(const RtnetInformation&) {} 47 void handleZDAmb(const std::vector<ZDAmb>&) {} 48 void handleDDAmbresBaselines(const std::vector<DDAmbresBaseline>&) {} 47 49 void handleSatelliteXYZ(const std::vector<SatelliteXYZ>& svXYZList); 48 50 void handleStationInfo(const std::vector<StationInfo>& stationList); 49 void handleStationAuxInfo(const std::vector<StationAuxInfo>& stationAuxList) {}50 void handleDGPSCorr(const std::vector<DGPSCorr>& dgpsList) {}51 void handleSatelliteClock(const std::vector<SatelliteClock>& svList) {}51 void handleStationAuxInfo(const std::vector<StationAuxInfo>&) {} 52 void handleDGPSCorr(const std::vector<DGPSCorr>&) {} 53 void handleSatelliteClock(const std::vector<SatelliteClock>&) {} 52 54 void handleEpochResults(const RtnetEpoch& epoch); 53 54 signals:55 void newThriftResult(t_thriftResult);56 55 57 56 private: … … 64 63 }; 65 64 65 GnssCenter::t_map_stations* _parent; 66 66 std::map<std::string, t_stationCrd> _stationCrd; 67 bool _stop; 67 bool _stop; 68 68 }; 69 69
Note:
See TracChangeset
for help on using the changeset viewer.