source: ntrip/trunk/BNC/src/t_prn.h@ 6809

Last change on this file since 6809 was 6809, checked in by stuerze, 9 years ago

I/NAV - F/NAV issue (hopefully:) solved in another way

File size: 1.6 KB
RevLine 
[5741]1#ifndef PRN_H
2#define PRN_H
3
4#include <string>
5
6class t_prn {
[6809]7public:
8 static const unsigned MAXPRN_GPS = 32;
[5741]9 static const unsigned MAXPRN_GLONASS = 26;
[6321]10 static const unsigned MAXPRN_GALILEO = 36;
[6809]11 static const unsigned MAXPRN_QZSS = 10;
12 static const unsigned MAXPRN_SBAS = 38;
13 static const unsigned MAXPRN_BDS = 37;
14 static const unsigned MAXPRN = MAXPRN_GPS + MAXPRN_GLONASS + MAXPRN_GALILEO
15 + MAXPRN_QZSS + MAXPRN_SBAS + MAXPRN_BDS;
[5741]16
[6809]17 t_prn() :
18 _system('G'), _number(0), _flags(0) {
19 }
20 t_prn(char system, int number) :
21 _system(system), _number(number), _flags(0) {
22 }
[5741]23
[6809]24 t_prn(char system, int number, int flags) :
25 _system(system), _number(number), _flags(flags) {
26 }
[5741]27
[6809]28 ~t_prn() {
29 }
[5741]30
[6809]31 void set(char system, int number) {
32 _system = system;
33 _number = number;
34 _flags = 0;
35 }
36
37 void set(char system, int number, int flags) {
38 _system = system;
39 _number = number;
40 _flags = flags;
41 }
42
43 void set(const std::string& str);
44
45 char system() const {
46 return _system;
47 }
48 int number() const {
49 return _number;
50 }
51 int flags() const {
52 return _flags;
53 }
54 int toInt() const;
[5741]55 std::string toString() const;
[6809]56 std::string toInternalString() const;
[5741]57
58 bool operator==(const t_prn& prn2) const {
[6809]59 if (_system == prn2._system && _number == prn2._number
60 && _flags == prn2._flags) {
[5741]61 return true;
62 }
63 else {
64 return false;
65 }
66 }
67
68 operator unsigned() const;
69
[6809]70 friend std::istream& operator >>(std::istream& in, t_prn& prn);
[5741]71
[6809]72private:
[5741]73 char _system;
[6809]74 int _number;
75 int _flags;
[5741]76};
77
[6809]78std::istream& operator >>(std::istream& in, t_prn& prn);
[5741]79
80#endif
Note: See TracBrowser for help on using the repository browser.