Changeset 5486 in ntrip for trunk/GnssCenter/monitor
- Timestamp:
- Sep 18, 2013, 2:54:23 PM (11 years ago)
- Location:
- trunk/GnssCenter/monitor
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GnssCenter/monitor/monitor.cpp
r5482 r5486 76 76 _thriftClient = 0; 77 77 _results = 0; 78 _satellites = 0; 78 79 79 80 // Read Settings, Set Title, Enable/Disable Actions … … 95 96 delete _results; 96 97 } 98 if (_satellites) { 99 while (!_satellites->empty()) { 100 delete _satellites->back(); 101 _satellites->pop_back(); 102 } 103 delete _satellites; 104 } 97 105 } 98 106 … … 163 171 connect(_thriftClient, SIGNAL(message(QByteArray)), this, SLOT(slotMessage(QByteArray))); 164 172 _thriftClient->start(); 165 slotPlot Results();173 slotPlot(); 166 174 } 167 175 enableActions(); … … 202 210 // 203 211 ///////////////////////////////////////////////////////////////////////////// 204 void t_monitor:: slotPlotResults() {212 void t_monitor::putThriftSatellites(std::vector<t_thriftSatellite*>* satellites) { 205 213 QMutexLocker locker(&_mutex); 206 214 if (_satellites) { 215 while (!_satellites->empty()) { 216 delete _satellites->back(); 217 _satellites->pop_back(); 218 } 219 delete _satellites; 220 } 221 _satellites = satellites; 222 } 223 224 // 225 ///////////////////////////////////////////////////////////////////////////// 226 void t_monitor::slotPlot() { 227 QMutexLocker locker(&_mutex); 228 plotResults(); 229 plotSatellites(); 230 if (_thriftClient) { 231 QTimer::singleShot(1000, this, SLOT(slotPlotResults())); 232 } 233 } 234 235 // 236 ///////////////////////////////////////////////////////////////////////////// 237 void t_monitor::plotResults() { 207 238 if (_results) { 208 239 QList<t_worldPlot::t_point*> points; … … 232 263 } 233 264 } 234 235 if (_thriftClient) { 236 QTimer::singleShot(1000, this, SLOT(slotPlotResults())); 237 } 238 } 265 } 266 267 // 268 ///////////////////////////////////////////////////////////////////////////// 269 void t_monitor::plotSatellites() { 270 if (_satellites) { 271 } 272 } -
trunk/GnssCenter/monitor/monitor.h
r5482 r5486 11 11 class t_thriftClient; 12 12 class t_thriftResult; 13 class t_thriftSatellite; 13 14 } 14 15 … … 22 23 23 24 void putThriftResults(std::vector<t_thriftResult*>* results); 25 void putThriftSatellites(std::vector<t_thriftSatellite*>* satellites); 24 26 25 27 private slots: … … 28 30 void slotStopThrift(); 29 31 void slotThriftFinished(); 30 void slotPlot Results();32 void slotPlot(); 31 33 void slotMessage(QByteArray msg); 32 34 … … 35 37 void setTitle(); 36 38 void enableActions(); 37 QMutex _mutex; 38 QTabWidget* _tabWidget; 39 QAction* _actConfig; 40 QAction* _actStartThrift; 41 QAction* _actStopThrift; 42 QString _host; 43 QString _port; 44 t_thriftClient* _thriftClient; 45 t_worldPlot* _plotStations; 46 t_worldPlot* _plotSatellites; 47 std::vector<t_thriftResult*>* _results; 39 void plotResults(); 40 void plotSatellites(); 41 QMutex _mutex; 42 QTabWidget* _tabWidget; 43 QAction* _actConfig; 44 QAction* _actStartThrift; 45 QAction* _actStopThrift; 46 QString _host; 47 QString _port; 48 t_thriftClient* _thriftClient; 49 t_worldPlot* _plotStations; 50 t_worldPlot* _plotSatellites; 51 std::vector<t_thriftResult*>* _results; 52 std::vector<t_thriftSatellite*>* _satellites; 48 53 }; 49 54 -
trunk/GnssCenter/monitor/thriftclient.cpp
r5485 r5486 99 99 satellite->_y = sat.xyz.y; 100 100 satellite->_z = sat.xyz.z; 101 cout << satellite->_prn << ' ' << satellite->_x << endl;101 satellites->push_back(satellite); 102 102 } 103 _parent->putThriftSatellites(satellites); 103 104 } 104 105
Note:
See TracChangeset
for help on using the changeset viewer.