Changeset 6520 in ntrip


Ignore:
Timestamp:
Dec 30, 2014, 3:15:35 PM (9 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bnccore.cpp

    r6519 r6520  
    204204}
    205205
     206//
     207////////////////////////////////////////////////////////////////////////////
     208t_irc t_bncCore::checkPrintEph(t_eph* eph) {
     209  QMutexLocker locker(&_mutex);
     210  t_irc ircPut = _ephUser.putNewEph(eph, true);
     211  if (eph->checkState() == t_eph::bad) {
     212    return failure;
     213  }
     214  printEphHeader();
     215  printEph(*eph, (ircPut == success));
     216  return success;
     217}
     218
    206219// New GPS Ephemeris
    207220////////////////////////////////////////////////////////////////////////////
    208221void t_bncCore::slotNewGPSEph(t_ephGPS eph) {
    209   QMutexLocker locker(&_mutex);
    210 
    211   t_irc irc = _ephUser.putNewEph(&eph, true);
    212   if (eph.checkState() == t_eph::bad) {
    213     return;
    214   }
    215 
    216   emit newGPSEph(eph);
    217 
    218   printEphHeader();
    219   printEph(eph, (irc == success));
     222  if (checkPrintEph(&eph) == success) {
     223    emit newGPSEph(eph);
     224  }
    220225}
    221226   
     
    223228////////////////////////////////////////////////////////////////////////////
    224229void t_bncCore::slotNewGlonassEph(t_ephGlo eph) {
    225   QMutexLocker locker(&_mutex);
    226 
    227   t_irc irc = _ephUser.putNewEph(&eph, true);
    228   if (eph.checkState() == t_eph::bad) {
    229     return;
    230   }
    231 
    232   emit newGlonassEph(eph);
    233 
    234   printEphHeader();
    235   printEph(eph, (irc == success));
     230  if (checkPrintEph(&eph) == success) {
     231    emit newGlonassEph(eph);
     232  }
    236233}
    237234
     
    239236////////////////////////////////////////////////////////////////////////////
    240237void t_bncCore::slotNewGalileoEph(t_ephGal eph) {
    241   QMutexLocker locker(&_mutex);
    242 
    243   t_irc irc = _ephUser.putNewEph(&eph, true);
    244   if (eph.checkState() == t_eph::bad) {
    245     return;
    246   }
    247 
    248   emit newGalileoEph(eph);
    249 
    250   printEphHeader();
    251   printEph(eph, (irc == success));
     238  if (checkPrintEph(&eph) == success) {
     239    emit newGalileoEph(eph);
     240  }
    252241}
    253242
     
    255244////////////////////////////////////////////////////////////////////////////
    256245void t_bncCore::slotNewSBASEph(t_ephSBAS eph) {
    257   QMutexLocker locker(&_mutex);
    258 
    259   t_irc irc = _ephUser.putNewEph(&eph, true);
    260   if (eph.checkState() == t_eph::bad) {
    261     return;
    262   }
    263 
    264   emit newSBASEph(eph);
    265 
    266   printEphHeader();
    267   printEph(eph, (irc == success));
     246  if (checkPrintEph(&eph) == success) {
     247    emit newSBASEph(eph);
     248  }
    268249}
    269250
  • trunk/BNC/src/bnccore.h

    r6484 r6520  
    111111
    112112 private:
    113   void printEphHeader();
    114   void printEph(const t_eph& eph, bool printFile);
    115   void printOutputEph(bool printFile, QTextStream* stream,
    116                       const QString& strV2, const QString& strV3);
    117   void messagePrivate(const QByteArray& msg);
     113  t_irc checkPrintEph(t_eph* eph);
     114  void  printEphHeader();
     115  void  printEph(const t_eph& eph, bool printFile);
     116  void  printOutputEph(bool printFile, QTextStream* stream,
     117                       const QString& strV2, const QString& strV3);
     118  void  messagePrivate(const QByteArray& msg);
    118119
    119120  QSettings::SettingsMap _settings;
  • trunk/BNC/src/bncephuser.cpp

    r6519 r6520  
    185185    return;
    186186  }
     187
    187188}
Note: See TracChangeset for help on using the changeset viewer.