Ignore:
Timestamp:
Sep 7, 2014, 9:58:10 AM (10 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP_free/bncpppclient.cpp

    r6055 r6065  
    5555// Constructor
    5656////////////////////////////////////////////////////////////////////////////
    57 bncPPPclient::bncPPPclient(QByteArray staID, t_pppOptions* opt, bool connectSlots) :
    58   bncEphUser(connectSlots) {
    59 
    60   if (opt) {
    61     _opt      = opt;
    62     _optOwner = false;
    63   }
    64   else {
    65     _opt      = new t_pppOptions();
    66     _optOwner = true;
    67   }
    68 
     57bncPPPclient::bncPPPclient(QByteArray staID, t_pppOptions* opt) : bncEphUser(false) {
     58
     59  _opt   = opt;
    6960  _staID = staID;
    70 
    7161  _model = new bncModel(this);
    72 
    73   if (connectSlots) {
    74     connect(this, SIGNAL(newMessage(QByteArray,bool)),
    75             BNC_CORE, SLOT(slotMessage(const QByteArray,bool)));
    76 
    77     connect(BNC_CORE, SIGNAL(newCorrections(QList<QString>)),
    78             this, SLOT(slotNewCorrections(QList<QString>)));
    79 
    80     connect(BNC_CORE, SIGNAL(providerIDChanged(QString)),
    81             this, SLOT(slotProviderIDChanged(QString)));
    82   }
    8362}
    8463
     
    8665////////////////////////////////////////////////////////////////////////////
    8766bncPPPclient::~bncPPPclient() {
    88   delete _model;
    8967  while (!_epoData.empty()) {
    9068    delete _epoData.front();
     
    10179    delete ib.value();
    10280  }
    103   if (_optOwner) {
    104     delete _opt;
    105   }
     81  delete _model;
    10682}
    10783
     
    257233//
    258234////////////////////////////////////////////////////////////////////////////
    259 void bncPPPclient::slotNewCorrections(QList<QString> corrList) {
     235void bncPPPclient::putNewCorrections(QList<QString> corrList) {
    260236  QMutexLocker locker(&_mutex);
    261237
     
    472448  }
    473449
    474   emit newMessage(msg.toAscii(), false);
     450  LOG << msg.toAscii() << endl;
    475451#endif // BNC_DEBUG
    476452
     
    493469  // ---------------
    494470  if (_model->update(_epoData.front()) == success) {
    495     emit newPosition(_model->time(), _model->x(), _model->y(), _model->z());
     471    ///    emit newPosition(_model->time(), _model->x(), _model->y(), _model->z());
    496472  }
    497473}
     
    533509  }
    534510}
    535 
    536 //
    537 ////////////////////////////////////////////////////////////////////////////
    538 void bncPPPclient::slotProviderIDChanged(QString mountPoint) {
    539   QMutexLocker locker(&_mutex);
    540 
    541   if (mountPoint != QString(_opt->_corrMount.c_str())) {
    542     return;
    543   }
    544   emit newMessage("bncPPPclient " + _staID + ": Provider Changed: " + mountPoint.toAscii() + "\n", true);
    545 
    546   delete _model;
    547   _model = new bncModel(this);
    548 
    549   while (!_epoData.empty()) {
    550     delete _epoData.front();
    551     _epoData.pop();
    552   }
    553 
    554   QMapIterator<QString, t_corr*> ic(_corr);
    555   while (ic.hasNext()) {
    556     ic.next();
    557     delete ic.value();
    558   }
    559   _corr.clear();
    560  
    561   QMapIterator<QString, t_bias*> ib(_bias);
    562   while (ib.hasNext()) {
    563     ib.next();
    564     delete ib.value();
    565   }
    566   _bias.clear();
    567 }
Note: See TracChangeset for help on using the changeset viewer.