Communication: SerialBasic Library
Post date: Mar 03, 2014 12:26:24 AM
SerialBasic. As part of the Autonomous Lawnmower Project, it became necessary to write data to a computer's serial port in order to transmit and receive information over a pair of Xbee wireless transceivers. Therefrom, the SerialBasic class was developed from the asio serial and thread libraries of boost version 1.55.
There are several other examples of Serial libraries that depend on boost and can be found online, however SerialBasic is written such that data types apart from uint8_t (or unsigned char) can be transmitted and received. The write method writes data to the serial port and blocks until completion, whereas the read method reads from a buffer and thus is non-blocking. Both write and read are compatible with STL containers and C arrays/pointers.
Please note SerialBasic was developed for Windows, though it can be modified to support other operating systems. More information can be found in SerialBasic's source code or from its documentation.
GitHub. Below is a link to the repository that contains all the necessary source files and documentation.