Changeset 5415 in ntrip for trunk/GnssCenter
- Timestamp:
- Sep 10, 2013, 5:13:10 PM (11 years ago)
- Location:
- trunk/GnssCenter/map_stations
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GnssCenter/map_stations/map_stations.cpp
r5414 r5415 28 28 29 29 #include "map_stations.h" 30 #include "thriftclient.h"31 30 32 31 using namespace std; … … 98 97 99 98 // Thrift Client; 99 // -------------- 100 100 _thriftClient = new t_thriftClient; 101 connect(_thriftClient, SIGNAL(newThriftResult(t_thriftResult)), 102 this, SLOT(slotNewThriftResult(t_thriftResult))); 101 103 _thriftClient->start(); 102 104 } … … 158 160 } 159 161 } 162 } 163 164 // 165 ///////////////////////////////////////////////////////////////////////////// 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; 160 170 } 161 171 -
trunk/GnssCenter/map_stations/map_stations.h
r5410 r5415 5 5 #include <QWhatsThis> 6 6 #include "plugininterface.h" 7 #include "thriftclient.h" 7 8 8 9 class QwtPlot; … … 20 21 public slots: 21 22 void slotNewPoint(const QString& name, double latDeg, double lonDeg); 23 void slotNewThriftResult(t_thriftResult); 22 24 23 25 private slots: -
trunk/GnssCenter/map_stations/thriftclient.cpp
r5414 r5415 18 18 t_thriftClient::t_thriftClient() { 19 19 _stop = false; 20 qRegisterMetaType<t_thriftResult>("t_thriftResult"); 20 21 } 21 22 … … 86 87 for (unsigned ii = 0; ii < epoch.stationResultList.size(); ii++) { 87 88 const StationResults& staRes = epoch.stationResultList[ii]; 88 cout << staRes.stationName << ' ' 89 << (int) staRes.nsv_gps_used << ' ' << (int) staRes.nsv_glonass_used << ' '; 89 t_thriftResult result; 90 91 result._name = staRes.stationName; 92 result._nGPS = staRes.nsv_gps_used; 93 result._nGLO = staRes.nsv_glonass_used; 90 94 if (_stationCrd.find(staRes.stationName) != _stationCrd.end()) { 91 cout << _stationCrd[staRes.stationName]._x << ' '92 << _stationCrd[staRes.stationName]._y << ' '93 <<_stationCrd[staRes.stationName]._z;95 result._x = _stationCrd[staRes.stationName]._x; 96 result._y = _stationCrd[staRes.stationName]._y; 97 result._z = _stationCrd[staRes.stationName]._z; 94 98 } 95 cout << endl; 99 100 emit newThriftResult(result); 101 102 cout << result._name << ' ' << result._nGPS << ' ' << result._nGLO << endl; 96 103 } 97 104 } -
trunk/GnssCenter/map_stations/thriftclient.h
r5414 r5415 5 5 #include <map> 6 6 #include <QThread> 7 #include <QMetaType> 7 8 8 9 #include <transport/TSocket.h> … … 14 15 using namespace com::gpssolutions::rtnet; 15 16 16 // Handler Class Definition 17 ////////////////////////////////////////////////////////////////////////////// 18 class t_thriftClient : public com::gpssolutions::rtnet::RtnetDataIf, public QThread { 17 class t_thriftResult { 18 public: 19 t_thriftResult() { 20 _nGPS = 0; 21 _nGLO = 0; 22 _x = 0.0; 23 _y = 0.0; 24 _z = 0.0; 25 } 26 ~t_thriftResult() {} 27 std::string _name; 28 int _nGPS; 29 int _nGLO; 30 double _x; 31 double _y; 32 double _z; 33 }; 34 35 class t_thriftClient : public QThread, public com::gpssolutions::rtnet::RtnetDataIf { 36 Q_OBJECT 19 37 public: 20 38 t_thriftClient(); … … 34 52 void handleEpochResults(const RtnetEpoch& epoch); 35 53 54 signals: 55 void newThriftResult(t_thriftResult); 56 36 57 private: 37 58
Note:
See TracChangeset
for help on using the changeset viewer.