25 #ifndef SERIALPORTIO_HH_
26 #define SERIALPORTIO_HH_
28 #include <bias_config.h>
75 bool OpenPort(std::string port);
85 bool SetOptions(
unsigned baudrate=9600,
87 bool hardwareFlowControl=
false,
88 bool canonicalInput=
true,
89 bool softwareFlowControl=
false,
100 bool SetTimeOuts(
int ReadIntervalTimeout,
101 int ReadTotalTimeoutMultiplier,
int ReadTotalTimeoutConstant,
102 int WriteTotalTimeoutMultiplier,
int WriteTotalTimeoutConstant);
109 bool ReadString(std::string& message,
bool waitForMessage=
true);
118 int ReadBytes(
unsigned char* message,
int nrBytes,
bool waitForMessage=
true);
123 bool WriteString(std::string message);
129 bool WriteBytes(
unsigned char *message,
int nrBytes);
138 bool GetPetScanRFIDFromString(std::string message, std::string& rfid);
int serialFD_
File descriptor for the port.
Communication over the serial port, use OpenPort with e.g.