ArPiRobot-CoreLib C++
C++ library for ArPiRobot robots
Public Member Functions | Protected Member Functions | List of all members
arpirobot::ArduinoUartInterface Class Reference

#include <arpirobot/arduino/iface/ArduinoUartInterface.hpp>

Inheritance diagram for arpirobot::ArduinoUartInterface:
arpirobot::BaseArduinoInterface arpirobot::IoDevice

Public Member Functions

 ArduinoUartInterface (std::string port, int baud)
 
 ArduinoUartInterface (const ArduinoUartInterface &other)=delete
 
ArduinoUartInterfaceoperator= (const ArduinoUartInterface &other)=delete
 
- Public Member Functions inherited from arpirobot::BaseArduinoInterface
 BaseArduinoInterface (const BaseArduinoInterface &other)=delete
 
BaseArduinoInterfaceoperator= (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
 
- Protected Member Functions inherited from arpirobot::BaseArduinoInterface
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)
 

Detailed Description

Arduino interface implementation using UART to communicate with the arduino.

Constructor & Destructor Documentation

◆ ArduinoUartInterface()

arpirobot::ArduinoUartInterface::ArduinoUartInterface ( std::string  port,
int  baud 
)
Parameters
portThe UART port for the arduino (/dev/tty...)
baudThe baud rate for UART communication

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