27 #include <forward_list>
35 #define DBGRPT(format, ...) printf(format,##__VA_ARGS__);
37 #define DBGRPT(format, ...)
43 #define DEFAULTBAUDRATE 9600
44 #define MAXBUFFERSIZE 2052
47 #define START1 160 //0xA0 //OSP messages from/to receiver are preceded by the synchro
48 #define START2 162 //0xA2 //sequence of two bytes with values START1, START2
49 #define END1 176 //0XB0 //OSP messages from/to receiver are followed by the end
50 #define END2 179 //0XB3 //sequence of two bytes with values END1, END2
51 #define LF 0x0A //ASCII Line Feed
52 #define CR 0x0D //ASCII Carriage Return
53 #define DOLAR 0x24 //ASCII Dolar sign
54 #define CHK 0x2A //ASCII * (chacksum start: two ASCII hex follow with XOR of chars between $ and *)
79 forward_list<CBRrate> CBRrateLst;
83 void addCBRrate(
int rate, DWORD CBRrt);
84 DWORD getCBRrate(
int);
85 int getBaudRate(DWORD);
87 bool synchNMEAmsg(
int patience);
90 unsigned char paylenBuff[2];
96 void openPort(
string portName);
97 void setPortParams(
int baudRate,
int timeout = 1);
98 void getPortParams(
int& baudRate,
int& timeout,
bool& rawMode);
101 void writeOSPcmd(
int mid,
string cmdArgs,
int base = 16);
102 void writeNMEAcmd(
int mid,
string cmdArgs);
104 void sleepTime(
int ms);
int readOSPmsg(FILE *inFile)
Definition: PacketToOSP.cpp:219
Definition: SerialTxRx.h:74
#define MAXBUFFERSIZE
Maximum payload size (2048) + length (2) + checksum (2)
Definition: SerialTxRx.h:45
bool synchOSPmsg(FILE *inFile)
Definition: PacketToOSP.cpp:181
unsigned int payloadLen
the current payload length, for convenience
Definition: SerialTxRx.h:92