![]() |
SysIo
1.9.0
Embedded Library and tools
|
#include <serial.hpp>
Public Types | |
enum | DataBits { Data5 = SERIAL_DATABIT_5, Data6 = SERIAL_DATABIT_6, Data7 = SERIAL_DATABIT_7, Data8 = SERIAL_DATABIT_8, UnknownDataBits = SERIAL_DATABIT_UNKNOWN } |
enum | FlowControl { NoFlowControl = SERIAL_FLOW_NONE, HardwareControl = SERIAL_FLOW_RTSCTS, SoftwareControl = SERIAL_FLOW_XONXOFF, UnknownFlowControl = SERIAL_FLOW_UNKNOWN } |
enum | Parity { NoParity = SERIAL_PARITY_NONE, EvenParity = SERIAL_PARITY_EVEN, OddParity = SERIAL_PARITY_ODD, SpaceParity = SERIAL_PARITY_SPACE, MarkParity = SERIAL_PARITY_MARK, UnknownParity = SERIAL_PARITY_UNKNOWN } |
enum | StopBits { OneStop = SERIAL_STOPBIT_ONE, TwoStop = SERIAL_STOPBIT_TWO, OneAndHalfStop = SERIAL_STOPBIT_ONEHALF, UnknownStopBits = SERIAL_STOPBIT_UNKNOWN } |
Public Member Functions | |
int | baudrate () const |
void | close () |
int | fileno () const |
FlowControl | flowControl () const |
const char * | flowControlName () const |
void | flush () |
bool | open () |
const char * | port () const |
Serial (const char *portname, int baudrate) | |
void | setBaudrate (int baudrate) |
bool | setFlowControl (FlowControl newFlowControl) |
bool | setFlowControlName (const char *newFlowControl) |
void | setPort (const char *portname) |
~Serial () | |
Port série
Definition at line 26 of file serial.hpp.
enum Serial::DataBits |
enum Serial::FlowControl |
Contrôle de flux
Enumerator | |
---|---|
NoFlowControl |
Sans |
HardwareControl |
Matériel (RTS/CTS) |
SoftwareControl |
Logiciel (XON/XOFF) |
UnknownFlowControl |
Inconnu |
Definition at line 68 of file serial.hpp.
enum Serial::Parity |
enum Serial::StopBits |
Serial::Serial | ( | const char * | portname, |
int | baudrate | ||
) |
Consctructeur
Serial::~Serial | ( | ) |
Destructeur
int Serial::baudrate | ( | ) | const |
Vitesse
void Serial::close | ( | ) |
Ferme le port
int Serial::fileno | ( | ) | const |
Descripteur de fichier d'un port ouvert
FlowControl Serial::flowControl | ( | ) | const |
Contrôle de flux
const char* Serial::flowControlName | ( | ) | const |
Contrôle de flux sous forme de texte
void Serial::flush | ( | ) |
Vide les tampons
bool Serial::open | ( | ) |
Ouverture
const char* Serial::port | ( | ) | const |
Nom du port
void Serial::setBaudrate | ( | int | baudrate | ) |
Modification vitesse
bool Serial::setFlowControl | ( | FlowControl | newFlowControl | ) |
Modifie le contrôle de flux
bool Serial::setFlowControlName | ( | const char * | newFlowControl | ) |
Modifie le contrôle de flux à partir du nom
void Serial::setPort | ( | const char * | portname | ) |
Modifie le nom du port