RXtoRINEX  V2.1
RXtoRINEX provides tools to collect data from GPS / GNSS receivers in mobile devices, convert them to RINEX or RTK formats, and process RINEX files.
OSPMessage.h
Go to the documentation of this file.
1 
19 #ifndef OSPMESSAGE_H
20 #define OSPMESSAGE_H
21 
22 #include <stdio.h>
23 
25 #define MAXPAYLOADSIZE 2048
26 
37 class OSPMessage {
38  unsigned char payload[MAXPAYLOADSIZE]; //buffer for the OSP message payload
39  unsigned int payloadLength; //the payload length in bytes of current message
40  unsigned int cursor; //payload index to the first byte to be extracted by any method defined below
41  //it is incremented after any extraction
42 public:
43  OSPMessage(void);
44  ~OSPMessage(void);
45  bool fill(FILE*); //fill the buffer whith a OSP message read from OSP binary file
46  int get(); //get from payload the byte value at cursor. Increment it by one
47  int getInt(); //get from payload the 32 bits integer at cursor. Increment it by four
48  unsigned int getUInt(); //get from payload the 32 bits unsigned integer at cursor. Increment it by four
49  short int getShort(); //get from payload the 16 bits integer at cursor. Increment it by two
50  short unsigned int getUShort(); //get from payload the 16 bits unsigned integer at cursor. Increment it by two
51  float getFloat(); //get from payload the 32 bits floating point at cursor. Increment it by four
52  double getDouble(); //get from payload the 64 bits floating point at cursor. Increment it by eigth
53  int getInt3(); //get from payload the 24 bits integer at cursor. Increment it by three
54  bool skipBytes(int n); //skip n bytes advancing cursor by n
55  unsigned int payloadLen(); //provides the payload length
56 };
57 #endif
short unsigned int getUShort()
Definition: OSPMessage.cpp:134
double getDouble()
Definition: OSPMessage.cpp:167
int getInt()
Definition: OSPMessage.cpp:84
unsigned int getUInt()
Definition: OSPMessage.cpp:102
unsigned int payloadLen()
Definition: OSPMessage.cpp:60
float getFloat()
Definition: OSPMessage.cpp:148
bool fill(FILE *)
Definition: OSPMessage.cpp:31
bool skipBytes(int n)
Definition: OSPMessage.cpp:50
#define MAXPAYLOADSIZE
The maximum size in bytes of any message payload.
Definition: OSPMessage.h:25
~OSPMessage(void)
Definition: OSPMessage.cpp:18
short int getShort()
Definition: OSPMessage.cpp:120
Definition: OSPMessage.h:37
OSPMessage(void)
Definition: OSPMessage.cpp:11
int getInt3()
Definition: OSPMessage.cpp:190