serialPort_nwc_yarp
: a client for a serialPort_nws_yarp device
More...
#include <networkWrappers/serialPort_nwc_yarp/SerialPort_nwc_yarp.h>
Public Member Functions | |
SerialPort_nwc_yarp ()=default | |
SerialPort_nwc_yarp (const SerialPort_nwc_yarp &)=delete | |
SerialPort_nwc_yarp (SerialPort_nwc_yarp &&)=delete | |
SerialPort_nwc_yarp & | operator= (const SerialPort_nwc_yarp &)=delete |
SerialPort_nwc_yarp & | operator= (SerialPort_nwc_yarp &&)=delete |
~SerialPort_nwc_yarp () override | |
bool | send (const Bottle &msg) override |
Sends a string of chars to the serial communications channel. | |
bool | send (const char *msg, size_t size) override |
bool | receive (Bottle &msg) override |
Gets the existing chars in the receive queue. | |
int | receiveChar (char &c) override |
Gets one single char from the receive queue. | |
int | flush () override |
Flushes the internal buffer. | |
int | receiveLine (char *line, const int MaxLineLength) override |
Gets one line (a sequence of chars with a ending '\n' or '\r') from the receive queue. | |
int | receiveBytes (unsigned char *bytes, const int size) override |
Gets an array of bytes (unsigned char) with size <= 'size' parameter. | |
bool | setDTR (bool enable) override |
Enable/Disable DTR protocol. | |
bool | close () override |
Close the DeviceDriver. | |
bool | open (Searchable &prop) override |
Open the DeviceDriver. | |
![]() | |
DeviceDriver () | |
DeviceDriver (const DeviceDriver &other)=delete | |
DeviceDriver (DeviceDriver &&other) noexcept=delete | |
DeviceDriver & | operator= (const DeviceDriver &other)=delete |
DeviceDriver & | operator= (DeviceDriver &&other) noexcept=delete |
virtual | ~DeviceDriver () |
virtual std::string | id () const |
Return the id assigned to the PolyDriver. | |
virtual void | setId (const std::string &id) |
Set the id for this device. | |
template<class T > | |
bool | view (T *&x) |
Get an interface to the device driver. | |
virtual DeviceDriver * | getImplementation () |
Some drivers are bureaucrats, pointing at others. | |
![]() | |
virtual | ~ISerialDevice () |
![]() | |
SerialPort_nwc_yarp_ParamsParser () | |
~SerialPort_nwc_yarp_ParamsParser () override=default | |
bool | parseParams (const yarp::os::Searchable &config) override |
Parse the DeviceDriver parameters. | |
std::string | getDeviceClassName () const override |
Get the name of the DeviceDriver class. | |
std::string | getDeviceName () const override |
Get the name of the device (i.e. | |
std::string | getDocumentationOfDeviceParams () const override |
Get the documentation of the DeviceDriver's parameters. | |
std::vector< std::string > | getListOfParams () const override |
Return a list of all params used by the device. | |
![]() | |
virtual | ~IDeviceDriverParams () |
Additional Inherited Members | |
![]() | |
const std::string | m_device_classname = {"SerialPort_nwc_yarp"} |
const std::string | m_device_name = {"serialPort_nwc_yarp"} |
bool | m_parser_is_strict = false |
const parser_version_type | m_parser_version = {} |
const std::string | m_local_defaultValue = {""} |
const std::string | m_remote_defaultValue = {""} |
std::string | m_local = {} |
std::string | m_remote = {} |
serialPort_nwc_yarp
: a client for a serialPort_nws_yarp device
Parameters required by this device are shown in class: SerialPort_nwc_yarp_ParamsParser
Definition at line 35 of file SerialPort_nwc_yarp.h.
|
default |
|
delete |
|
delete |
|
override |
Definition at line 15 of file SerialPort_nwc_yarp.cpp.
|
overridevirtual |
Close the DeviceDriver.
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 65 of file SerialPort_nwc_yarp.cpp.
|
overridevirtual |
Flushes the internal buffer.
Implements yarp::dev::ISerialDevice.
Definition at line 44 of file SerialPort_nwc_yarp.cpp.
|
overridevirtual |
Open the DeviceDriver.
config | is a list of parameters for the device. Which parameters are effective for your device can vary. See device invocation examples. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device). |
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 70 of file SerialPort_nwc_yarp.cpp.
|
delete |
|
delete |
Gets the existing chars in the receive queue.
msg | the received string |
Implements yarp::dev::ISerialDevice.
Definition at line 34 of file SerialPort_nwc_yarp.cpp.
Gets an array of bytes (unsigned char) with size <= 'size' parameter.
The array is NOT null terminated.
bytes | a previously allocated buffer where the received data is stored. |
size | the size of the 'bytes' parameter. |
Implements yarp::dev::ISerialDevice.
Definition at line 55 of file SerialPort_nwc_yarp.cpp.
Gets one single char from the receive queue.
chr | the received char. |
Implements yarp::dev::ISerialDevice.
Definition at line 39 of file SerialPort_nwc_yarp.cpp.
Gets one line (a sequence of chars with a ending '\n' or '\r') from the receive queue.
The ending '\n''\r' chars are not removed in the returned line.
line | a previously allocated buffer where the received line is stored. |
MaxLineLength | the size of the 'line' parameter. |
Implements yarp::dev::ISerialDevice.
Definition at line 50 of file SerialPort_nwc_yarp.cpp.
Sends a string of chars to the serial communications channel.
msg | the string to send |
Implements yarp::dev::ISerialDevice.
Definition at line 20 of file SerialPort_nwc_yarp.cpp.
Implements yarp::dev::ISerialDevice.
Definition at line 26 of file SerialPort_nwc_yarp.cpp.
Enable/Disable DTR protocol.
enable | Enable/Disable DTR protocol |
Implements yarp::dev::ISerialDevice.
Definition at line 60 of file SerialPort_nwc_yarp.cpp.