This is a cross-platform library for interfacing with rs-232 serial like ports written in C++. It provides a modern C++ interface with a workflow designed to look and feel like PySerial, but with the speed and control provided by C++.
Serial is a class that provides the basic interface common to serial libraries (open, close, read, write, etc..) and requires no extra dependencies. It also provides tight control over timeouts and control over handshaking lines.
Website: http://wjwwood.github.io/serial/
API Documentation: http://wjwwood.github.io/serial/doc/1.1.0/index.html
Dependencies
Required:
- cmake - buildsystem
Optional (for documentation):
Build and Install
Get the code:
git clone https://github.com/sdustio/serial.git
Build and Install:
cmake -DCMAKE_INSTALL_PREFIX:STRING=$HOME/.local -H$(pwd) -B$(pwd)/build-release
cmake --build $(pwd)/build-release --target install
Build the documentation:
doxygen doc/Doxyfile
Download linux package and install it using related package manager:
Ubuntu/Debian
curl -LO https://github.com/sdustio/serial/releases/download/2.0.0/serial_2.0.0_amd64.deb
sudo dpkg -i serial_2.0.0_amd64.deb
Redhat/CentOS
curl -LO https://github.com/sdustio/serial/releases/download/2.0.0/serial-2.0.0-1.x86_64.rpm
sudo rpm -i serial-2.0.0-1.x86_64.rpm
-
Change some code
-
Test
cmake -DSERIAL_BUILD_TESTS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -H$(pwd) -B$(pwd)/build cmake --build
$(pwd)/build --config Debug cd $ (pwd)/build ctest ctest -T memcheck -
Create pull request on github
Michael Ding [email protected] William Woodall [email protected] John Harrison [email protected]
Michael Ding [email protected]