32 #include <Utils/SerialPortIO.hh>
37 int main(
int argc,
char *argv[])
41 cout<<
"trying to open COM3 for serial communication:"<<endl;
44 cout<<
"trying to open /dev/ttyUSB0 for serial communication:"<<endl;
49 cout<<
"Reading:"<<endl;
56 cout<<
"RFID:"<<rfid<<endl;
58 cout<<
"Invalid!"<<endl;
bool GetPetScanRFIDFromString(std::string message, std::string &rfid)
parses values of PetScan RT100 V5 format Start Chip Value *Control U FDXB945 000000869846*FFA9 ...
bool ReadString(std::string &message, bool waitForMessage=true)
Read a string from port, port has to be open.
Communication over the serial port, use OpenPort with e.g.
bool OpenPort(std::string port)
Open port, e.g.