Changeset 5427 in ntrip for trunk/GnssCenter


Ignore:
Timestamp:
Sep 12, 2013, 5:25:18 PM (11 years ago)
Author:
mervart
Message:
 
Location:
trunk/GnssCenter/map_stations
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GnssCenter/map_stations/map_stations.cpp

    r5423 r5427  
    5757  // --------------
    5858  _thriftClient = 0;
     59  _results      = 0;
    5960}
    6061
     
    8384//
    8485/////////////////////////////////////////////////////////////////////////////
    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;
     86void 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
    89103}
  • trunk/GnssCenter/map_stations/map_stations.h

    r5422 r5427  
    2121  ~t_map_stations();
    2222
    23  public slots:
    24   void slotNewThriftResult(t_thriftResult*);
     23  void putThriftResults(std::vector<t_thriftResult*>* results);
    2524
    2625 private slots:
     
    2827
    2928 private:
    30   t_worldPlot*    _plot;
    31   t_thriftClient* _thriftClient;
     29  t_worldPlot*                  _plot;
     30  t_thriftClient*               _thriftClient;
     31  std::vector<t_thriftResult*>* _results;
    3232};
    3333
  • trunk/GnssCenter/map_stations/thriftclient.cpp

    r5426 r5427  
    108108void t_thriftHandler::
    109109handleEpochResults(const RtnetEpoch& epoch) {
     110  vector<t_thriftResult*>* results = new vector<t_thriftResult*>;
    110111  for (unsigned ii = 0; ii < epoch.stationResultList.size(); ii++) {
    111112    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;
    117117    if (_stationCrd.find(staRes.stationName) != _stationCrd.end()) {
    118       result._x = _stationCrd[staRes.stationName]._x;
    119       result._y = _stationCrd[staRes.stationName]._y;
    120       result._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;
    121121    }
    122     _parent->slotNewThriftResult(&result);
     122    results->push_back(res);
    123123  }
     124  _parent->putThriftResults(results);
    124125}
Note: See TracChangeset for help on using the changeset viewer.