ArPiRobot-CoreLib C++
C++ library for ArPiRobot robots
|
#include <arpirobot/arduino/iface/ArduinoUartInterface.hpp>
Public Member Functions | |
ArduinoUartInterface (std::string port, int baud) | |
ArduinoUartInterface (const ArduinoUartInterface &other)=delete | |
ArduinoUartInterface & | operator= (const ArduinoUartInterface &other)=delete |
![]() | |
BaseArduinoInterface (const BaseArduinoInterface &other)=delete | |
BaseArduinoInterface & | operator= (const BaseArduinoInterface &other)=delete |
bool | begin () |
void | addDevice (ArduinoDevice &device) |
void | addDevice (std::shared_ptr< ArduinoDevice > device) |
bool | isReady () |
void | sendFromDevice (uint8_t deviceId, std::vector< uint8_t > data) |
Protected Member Functions | |
void | open () override |
void | close () override |
bool | isOpen () override |
int | available () override |
uint8_t | readOne () override |
std::vector< uint8_t > | readAll () override |
void | write (const uint8_t &b) override |
std::string | getDeviceName () override |
![]() | |
void | run () |
uint16_t | calcCCittFalse (const std::vector< uint8_t > &data, size_t len) |
void | writeData (const std::vector< uint8_t > &data) |
bool | readData () |
bool | checkData () |
std::vector< uint8_t > | waitForMessage (const std::vector< uint8_t > &prefix, int timeoutMs) |
Arduino interface implementation using UART to communicate with the arduino.
arpirobot::ArduinoUartInterface::ArduinoUartInterface | ( | std::string | port, |
int | baud | ||
) |
port | The UART port for the arduino (/dev/tty...) |
baud | The baud rate for UART communication |