Changeset 5838 in ntrip for trunk/BNC/src/t_prn.cpp
- Timestamp:
- Aug 6, 2014, 3:42:49 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/t_prn.cpp
r5745 r5838 29 29 // Set from string 30 30 //////////////////////////////////////////////////////////////////////////// 31 void t_prn::set Value(const std::string& str) {31 void t_prn::set(const std::string& str) { 32 32 unsigned prn = 0; 33 33 char system = '\x0'; … … 42 42 } 43 43 else { 44 throw "t_prn::set Value: wrong satellite ID: " + str;44 throw "t_prn::set: wrong satellite ID: " + str; 45 45 } 46 46 … … 48 48 prn = strtol(number, &tmpc, 10); 49 49 if ( tmpc == number || *tmpc != '\x0' ) { 50 throw "t_prn::set Value: wrong satellite ID: " + str;50 throw "t_prn::set: wrong satellite ID: " + str; 51 51 } 52 52 53 53 try { 54 this->set Value(system, prn);54 this->set(system, prn); 55 55 } 56 56 catch (string exc) { 57 throw "t_prn::setValue: wrong satellite ID: " + str; 58 } 59 } 60 61 void t_prn::setValue(char system, unsigned prn) { 62 _system = system; 63 _number = prn; 64 int maxprn = 0; 65 switch (system) { 66 case 'G': 67 maxprn = MAXPRN_GPS; 68 break; 69 case 'R': 70 maxprn = MAXPRN_GLONASS; 71 break; 72 default: 73 throw "t_prn::setValue: wrong satellite system identifier"; 74 break; 75 } 76 if (_number > maxprn) { 77 ostringstream msg; 78 msg << "wrong satellite ID, system ID: " << system << " number: " << prn; 79 throw "t_prn::setValue: " + msg.str(); 57 throw "t_prn::set: wrong satellite ID: " + str; 80 58 } 81 59 } … … 97 75 str += str2; 98 76 } 99 prn.set Value(str);77 prn.set(str); 100 78 return in; 101 79 }
Note:
See TracChangeset
for help on using the changeset viewer.