Changeset 6432 in ntrip for trunk/BNC/src/bncephuser.cpp


Ignore:
Timestamp:
Dec 25, 2014, 6:11:49 PM (9 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

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

    r6396 r6432  
    4848// Constructor
    4949////////////////////////////////////////////////////////////////////////////
     50bncEphUser::bncEphUser() {
     51}
     52
     53// Constructor
     54////////////////////////////////////////////////////////////////////////////
    5055bncEphUser::bncEphUser(bool connectSlots) {
     56  if (connectSlots) {
     57    connect(BNC_CORE, SIGNAL(newEphGPS(t_ephGPS)),
     58            this, SLOT(slotNewEphGPS(t_ephGPS)), Qt::DirectConnection);
     59 
     60    connect(BNC_CORE, SIGNAL(newEphGlonass(t_ephGlo)),
     61            this, SLOT(slotNewEphGlonass(t_ephGlo)), Qt::DirectConnection);
     62 
     63    connect(BNC_CORE, SIGNAL(newEphGalileo(t_ephGal)),
     64            this, SLOT(slotNewEphGalileo(t_ephGal)), Qt::DirectConnection);
    5165
    52   if (connectSlots) {
    53     connect(BNC_CORE, SIGNAL(newEphGPS(gpsephemeris)),
    54             this, SLOT(slotNewEphGPS(gpsephemeris)), Qt::DirectConnection);
    55    
    56     connect(BNC_CORE, SIGNAL(newEphGlonass(glonassephemeris)),
    57             this, SLOT(slotNewEphGlonass(glonassephemeris)), Qt::DirectConnection);
    58    
    59     connect(BNC_CORE, SIGNAL(newEphGalileo(galileoephemeris)),
    60             this, SLOT(slotNewEphGalileo(galileoephemeris)), Qt::DirectConnection);
    61 
    62     connect(BNC_CORE, SIGNAL(newEphSBAS(sbasephemeris)),
    63             this, SLOT(slotNewEphSBAS(sbasephemeris)), Qt::DirectConnection);
     66    connect(BNC_CORE, SIGNAL(newEphSBAS(t_ephSBAS)),
     67            this, SLOT(slotNewEphSBAS(t_ephSBAS)), Qt::DirectConnection);
    6468  }
    6569}
     
    7579}
    7680
    77 //
     81// New GPS Ephemeris
    7882////////////////////////////////////////////////////////////////////////////
    79 void bncEphUser::slotNewEphGPS(gpsephemeris gpseph) {
    80   t_ephGPS* newEph = new t_ephGPS(); newEph->set(&gpseph);
    81   if (putNewEph(newEph) != success) {
    82     delete newEph;
    83   }
     83void bncEphUser::slotNewGPSEph(t_ephGPS eph) {
     84  putNewEph(&eph);
     85}
     86   
     87// New Glonass Ephemeris
     88////////////////////////////////////////////////////////////////////////////
     89void bncEphUser::slotNewGlonassEph(t_ephGlo eph) {
     90  putNewEph(&eph);
    8491}
    8592
    86 //
     93// New Galileo Ephemeris
    8794////////////////////////////////////////////////////////////////////////////
    88 void bncEphUser::slotNewEphGlonass(glonassephemeris gloeph) {
    89   t_ephGlo* newEph = new t_ephGlo(); newEph->set(&gloeph);
    90   if (putNewEph(newEph) != success) {
    91     delete newEph;
    92   }
     95void bncEphUser::slotNewGalileoEph(t_ephGal eph) {
     96  putNewEph(&eph);
    9397}
    9498
    95 //
     99// New SBAS Ephemeris
    96100////////////////////////////////////////////////////////////////////////////
    97 void bncEphUser::slotNewEphGalileo(galileoephemeris galeph) {
    98   t_ephGal* newEph = new t_ephGal(); newEph->set(&galeph);
    99   if (putNewEph(newEph) != success) {
    100     delete newEph;
    101   }
    102 }
    103 
    104 //
    105 ////////////////////////////////////////////////////////////////////////////
    106 void bncEphUser::slotNewEphSBAS(sbasephemeris sbaseph) {
    107   t_ephSBAS* newEph = new t_ephSBAS(); newEph->set(&sbaseph);
    108   if (putNewEph(newEph) != success) {
    109     delete newEph;
    110   }
     101void bncEphUser::slotNewSBASEph(t_ephSBAS eph) {
     102  putNewEph(&eph);
    111103}
    112104
     
    118110  t_irc irc = failure;
    119111
    120   if (!newEph) {
     112  if (newEph == 0) {
    121113    return irc;
    122114  }
Note: See TracChangeset for help on using the changeset viewer.