![]() |
PIDUINO
|
Provides settings information about serial ports. More...
#include <serialport.h>
Public Member Functions | |
Settings (int32_t baudRate=Baud9600, DataBits dataBits=Data8, Parity parity=NoParity, StopBits stopBits=OneStop, FlowControl flowControl=NoFlowControl) | |
bool | operator== (const Settings &other) |
equality operator | |
std::string | toString () const |
Convert to string. | |
std::string | dataBitsString () const |
Convert current data bits to string. | |
std::string | parityString () const |
Convert current parity to string. | |
std::string | stopBitsString () const |
Convert current stop bits to string. | |
std::string | flowControlString () const |
Convert current flow control to string. | |
void | updateOneByteTime () |
Update the time of an byte in accordance with the baudrate and the number of bits of data, parity and stop. | |
Static Public Member Functions | |
static std::string | dataBitsToString (DataBits dataBits) |
Convert data bits to string. | |
static std::string | parityToString (Parity parity) |
Convert parity to string. | |
static std::string | stopBitsToString (StopBits stopBits) |
Convert stop bits to string. | |
static std::string | flowControlToString (FlowControl flowControl) |
Convert flow control to string. | |
Public Attributes | |
int32_t | inputBaudRate |
data baud rate for the desired direction | |
int32_t | outputBaudRate |
data baud rate for the desired direction | |
DataBits | dataBits |
number of data bits used | |
Parity | parity |
the parity checking mode | |
StopBits | stopBits |
the number of stop bits in a frame | |
FlowControl | flowControl |
the desired flow control mode | |
unsigned long | onebyteTime |
time for send on byte | |
unsigned long | rs485Delay |
the rs485 delay in microseconds before and after send | |
Provides settings information about serial ports.
Definition at line 291 of file serialport.h.
Piduino::SerialPort::Settings::Settings | ( | int32_t | baudRate = Baud9600 , |
DataBits | dataBits = Data8 , |
||
Parity | parity = NoParity , |
||
StopBits | stopBits = OneStop , |
||
FlowControl | flowControl = NoFlowControl |
||
) |
Constructs a new SerialPort::Settings object.
baudRate | data baud rate (same as input and output) |
dataBits | number of data bits used |
parity | the parity checking mode |
stopBits | the number of stop bits in a frame |
flowControl | the desired flow control mode |
std::string Piduino::SerialPort::Settings::dataBitsString | ( | ) | const |
Convert current data bits to string.
|
static |
Convert data bits to string.
std::string Piduino::SerialPort::Settings::flowControlString | ( | ) | const |
Convert current flow control to string.
|
static |
Convert flow control to string.
bool Piduino::SerialPort::Settings::operator== | ( | const Settings & | other | ) |
equality operator
std::string Piduino::SerialPort::Settings::parityString | ( | ) | const |
Convert current parity to string.
|
static |
Convert parity to string.
std::string Piduino::SerialPort::Settings::stopBitsString | ( | ) | const |
Convert current stop bits to string.
|
static |
Convert stop bits to string.
std::string Piduino::SerialPort::Settings::toString | ( | ) | const |
Convert to string.
void Piduino::SerialPort::Settings::updateOneByteTime | ( | ) |
Update the time of an byte in accordance with the baudrate and the number of bits of data, parity and stop.
rs485Delay
is lower than the new value, rs485Delay
is also assigned to this value. DataBits Piduino::SerialPort::Settings::dataBits |
number of data bits used
Definition at line 308 of file serialport.h.
FlowControl Piduino::SerialPort::Settings::flowControl |
the desired flow control mode
Definition at line 311 of file serialport.h.
int32_t Piduino::SerialPort::Settings::inputBaudRate |
data baud rate for the desired direction
Definition at line 306 of file serialport.h.
unsigned long Piduino::SerialPort::Settings::onebyteTime |
time for send on byte
Definition at line 312 of file serialport.h.
int32_t Piduino::SerialPort::Settings::outputBaudRate |
data baud rate for the desired direction
Definition at line 307 of file serialport.h.
Parity Piduino::SerialPort::Settings::parity |
the parity checking mode
Definition at line 309 of file serialport.h.
unsigned long Piduino::SerialPort::Settings::rs485Delay |
the rs485 delay in microseconds before and after send
Definition at line 313 of file serialport.h.
StopBits Piduino::SerialPort::Settings::stopBits |
the number of stop bits in a frame
Definition at line 310 of file serialport.h.