Changeset 5427 in ntrip
- Timestamp:
- Sep 12, 2013, 5:25:18 PM (11 years ago)
- Location:
- trunk/GnssCenter/map_stations
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GnssCenter/map_stations/map_stations.cpp
r5423 r5427 57 57 // -------------- 58 58 _thriftClient = 0; 59 _results = 0; 59 60 } 60 61 … … 83 84 // 84 85 ///////////////////////////////////////////////////////////////////////////// 85 void t_map_stations::slotNewThriftResult(t_thriftResult* result) { 86 cout << result->_name << ' ' 87 << result->_nGPS << ' ' << result->_nGLO << ' ' 88 << result->_x << ' ' << result->_y << ' ' << result->_z << endl; 86 void t_map_stations::putThriftResults(std::vector<t_thriftResult*>* results) { 87 if (_results) { 88 while (!_results->empty()) { 89 delete _results->back(); 90 _results->pop_back(); 91 } 92 delete _results; 93 } 94 _results = results; 95 // beg test 96 for (unsigned ii = 0; ii < _results->size(); ii++) { 97 const t_thriftResult* result = _results->at(ii); 98 cout << result->_name << ' ' 99 << result->_nGPS << ' ' << result->_nGLO << ' ' 100 << result->_x << ' ' << result->_y << ' ' << result->_z << endl; 101 } 102 // end test 89 103 } -
trunk/GnssCenter/map_stations/map_stations.h
r5422 r5427 21 21 ~t_map_stations(); 22 22 23 public slots: 24 void slotNewThriftResult(t_thriftResult*); 23 void putThriftResults(std::vector<t_thriftResult*>* results); 25 24 26 25 private slots: … … 28 27 29 28 private: 30 t_worldPlot* _plot; 31 t_thriftClient* _thriftClient; 29 t_worldPlot* _plot; 30 t_thriftClient* _thriftClient; 31 std::vector<t_thriftResult*>* _results; 32 32 }; 33 33 -
trunk/GnssCenter/map_stations/thriftclient.cpp
r5426 r5427 108 108 void t_thriftHandler:: 109 109 handleEpochResults(const RtnetEpoch& epoch) { 110 vector<t_thriftResult*>* results = new vector<t_thriftResult*>; 110 111 for (unsigned ii = 0; ii < epoch.stationResultList.size(); ii++) { 111 112 const StationResults& staRes = epoch.stationResultList[ii]; 112 t_thriftResult result; 113 114 result._name = staRes.stationName; 115 result._nGPS = staRes.nsv_gps_used; 116 result._nGLO = staRes.nsv_glonass_used; 113 t_thriftResult* res = new t_thriftResult; 114 res->_name = staRes.stationName; 115 res->_nGPS = staRes.nsv_gps_used; 116 res->_nGLO = staRes.nsv_glonass_used; 117 117 if (_stationCrd.find(staRes.stationName) != _stationCrd.end()) { 118 res ult._x = _stationCrd[staRes.stationName]._x;119 res ult._y = _stationCrd[staRes.stationName]._y;120 res ult._z = _stationCrd[staRes.stationName]._z;118 res->_x = _stationCrd[staRes.stationName]._x; 119 res->_y = _stationCrd[staRes.stationName]._y; 120 res->_z = _stationCrd[staRes.stationName]._z; 121 121 } 122 _parent->slotNewThriftResult(&result);122 results->push_back(res); 123 123 } 124 _parent->putThriftResults(results); 124 125 }
Note:
See TracChangeset
for help on using the changeset viewer.