Changeset 6083 in ntrip for trunk/BNC/src/PPP_free/bncpppclient.cpp
- Timestamp:
- Sep 7, 2014, 6:35:49 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP_free/bncpppclient.cpp
r6082 r6083 54 54 using namespace std; 55 55 56 // Global variable holding thread-specific pointers 57 ////////////////////////////////////////////////////////////////////////////// 58 bncPPPclient* PPP_CLIENT = 0; 59 60 // Static function returning thread-specific pointer 61 ////////////////////////////////////////////////////////////////////////////// 62 bncPPPclient* t_pppClient::instance() { 63 return PPP_CLIENT; 64 } 65 56 66 // Constructor 57 67 //////////////////////////////////////////////////////////////////////////// 58 bncPPPclient::bncPPPclient(QByteArray staID, const t_pppOptions* opt) : bncEphUser(false) { 59 60 _opt = opt; 61 _staID = staID; 62 _model = new bncModel(this); 63 _epoData = new t_epoData(); 68 bncPPPclient::bncPPPclient(const t_pppOptions* opt) : bncEphUser(false) { 69 70 _opt = new t_pppOptions(*opt); 71 _staID = QByteArray(_opt->_roverName.c_str()) 72 _model = new bncModel(this); 73 _epoData = new t_epoData(); 74 PPP_CLIENT = this; 64 75 } 65 76 … … 82 93 83 94 delete _model; 95 delete _epoData; 96 delete _opt; 84 97 } 85 98 … … 231 244 } 232 245 246 // 247 ////////////////////////////////////////////////////////////////////////////// 248 void t_pppClient::putEphemeris(const t_eph* eph) { 249 const t_ephGPS* ephGPS = dynamic_cast<const t_ephGPS*>(eph); 250 const t_ephGlo* ephGlo = dynamic_cast<const t_ephGlo*>(eph); 251 const t_ephGal* ephGal = dynamic_cast<const t_ephGal*>(eph); 252 if (ephGPS) { 253 putNewEph(new t_ephGPS(*ephGPS)); 254 } 255 else if (ephGlo) { 256 putNewEph(new t_ephGlo(*ephGlo)); 257 } 258 else if (ephGal) { 259 putNewEph(new t_ephGal(*ephGal)); 260 } 261 } 262 233 263 // Satellite Position 234 264 ////////////////////////////////////////////////////////////////////////////
Note:
See TracChangeset
for help on using the changeset viewer.