Changeset 5416 in ntrip


Ignore:
Timestamp:
Sep 10, 2013, 5:55:53 PM (8 years ago)
Author:
mervart
Message:
 
Location:
trunk/GnssCenter/map_stations
Files:
4 edited

Legend:

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

    r5415 r5416  
    2828
    2929#include "map_stations.h"
     30#include "thriftclient.h"
    3031
    3132using namespace std;
     
    9899  // Thrift Client;
    99100  // --------------
    100   _thriftClient = new t_thriftClient;
    101   connect(_thriftClient, SIGNAL(newThriftResult(t_thriftResult)),
    102           this, SLOT(slotNewThriftResult(t_thriftResult)));
     101  _thriftClient = new t_thriftClient(this);
    103102  _thriftClient->start();
    104103}
     
    164163//
    165164/////////////////////////////////////////////////////////////////////////////
    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;
     165void t_map_stations::slotNewThriftResult(t_thriftResult* result) {
     166  cout << result->_name << ' '
     167       << result->_nGPS << ' ' << result->_nGLO << ' '
     168       << result->_x << ' ' << result->_y << ' ' << result->_z << endl;
    170169}
    171170
  • trunk/GnssCenter/map_stations/map_stations.h

    r5415 r5416  
    55#include <QWhatsThis>
    66#include "plugininterface.h"
    7 #include "thriftclient.h"
    87
    98class QwtPlot;
    109class QwtPlotZoomer;
    1110class t_thriftClient;
     11class t_thriftResult;
    1212
    1313namespace GnssCenter {
     
    2121 public slots:
    2222  void slotNewPoint(const QString& name, double latDeg, double lonDeg);
    23   void slotNewThriftResult(t_thriftResult);
     23  void slotNewThriftResult(t_thriftResult*);
    2424
    2525 private slots:
  • trunk/GnssCenter/map_stations/thriftclient.cpp

    r5415 r5416  
    55
    66#include "thriftclient.h"
     7#include "map_stations.h"
    78
    89using namespace apache::thrift;
     
    1617// Constructor
    1718//////////////////////////////////////////////////////////////////////////////
    18 t_thriftClient::t_thriftClient() {
    19   _stop = false;
    20   qRegisterMetaType<t_thriftResult>("t_thriftResult");
     19t_thriftClient::t_thriftClient(GnssCenter::t_map_stations* parent) {
     20  _stop   = false;
     21  _parent = parent;
    2122}
    2223
     
    3637  shared_ptr<TTransport>  transport(new TBufferedTransport(socket));
    3738  shared_ptr<TProtocol>   protocol(new TBinaryProtocol(transport));
    38   shared_ptr<RtnetDataIf> dataHandler(new t_thriftClient());
     39  shared_ptr<RtnetDataIf> dataHandler(new t_thriftClient(_parent));
    3940  shared_ptr<TProcessor>  processor(new RtnetDataProcessor(dataHandler));
    4041
     
    9798      result._z = _stationCrd[staRes.stationName]._z;
    9899    }
    99 
    100     emit newThriftResult(result);
    101 
    102     cout << result._name << ' ' << result._nGPS << ' ' << result._nGLO << endl;
     100    _parent->slotNewThriftResult(&result);
    103101  }
    104102}
  • trunk/GnssCenter/map_stations/thriftclient.h

    r5415 r5416  
    55#include <map>
    66#include <QThread>
    7 #include <QMetaType>
    87
    98#include <transport/TSocket.h>
     
    1413
    1514using namespace com::gpssolutions::rtnet;
     15
     16namespace GnssCenter {
     17  class t_map_stations;
     18}
    1619
    1720class t_thriftResult {
     
    3336};
    3437
    35 class t_thriftClient : public QThread, public com::gpssolutions::rtnet::RtnetDataIf {
    36  Q_OBJECT
     38class t_thriftClient : public QThread, public RtnetDataIf {
    3739 public:
    38   t_thriftClient();
     40  t_thriftClient(GnssCenter::t_map_stations* parent);
    3941  ~t_thriftClient();
    4042  virtual void run();
     
    4244
    4345  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>&) {}
    4749  void handleSatelliteXYZ(const std::vector<SatelliteXYZ>& svXYZList);
    4850  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>&) {}
    5254  void handleEpochResults(const RtnetEpoch& epoch);
    53 
    54  signals:
    55   void newThriftResult(t_thriftResult);
    5655
    5756 private:
     
    6463  };
    6564
     65  GnssCenter::t_map_stations*         _parent;
    6666  std::map<std::string, t_stationCrd> _stationCrd;
    67   bool _stop;
     67  bool                                _stop;
    6868};
    6969
Note: See TracChangeset for help on using the changeset viewer.