MyoLinux
Public Member Functions | List of all members
Serial Class Reference

Class for communication over the serial port. More...

#include <serial.h>

Public Member Functions

 Serial (const std::string &, const int)
 Create an object for communication over the serial port. More...
 
Buffer read (const std::size_t)
 Write to serial port.
 
std::size_t write (const Buffer &)
 Read from serial port.
 

Detailed Description

Class for communication over the serial port.

Constructor & Destructor Documentation

§ Serial()

Serial ( const std::string &  device,
const int  baudrate 
)

Create an object for communication over the serial port.

In case of permission denied exception try running the program with sudo, if that fixes the problem you are not the member of uucp group. Run sudo usermod -a -G uucp <user> to add an user.

Parameters
devicename of the device file
baudratebaudrate for the connection (usually 115200)

The documentation for this class was generated from the following files: