My Project
|
Public Member Functions | |
SerialClient (std::string port="/dev/ttyS0", int baudRate=9600, bool canonical=false, bool sevenBit=false) | |
virtual | ~SerialClient () |
void | setPort (std::string port) |
void | setBaudRate (int baudRate) |
int | connect () |
void | disconnect () |
std::string | portName () |
void | setFd (int fd) |
![]() | |
Port (int fd=-1) | |
virtual | ~Port () |
int | getFd () |
void | writeString (std::string &message, int fd=-1) |
void | writeBytes (Vector< unsigned char > &buffer) |
unsigned int | readBytes (unsigned char *message, int fd=-1) |
unsigned int | readBytes (Vector< unsigned char > &buffer) |
unsigned char | getNextByte () |
std::string | readString (int fd=-1) |
bool | concatenateString (std::ostringstream &os, int fd=-1, bool cont=true) |
void | concatenateChar (std::ostringstream &os, int fd=-1) |
int | getNbyte (int fd=-1) |
void | terminateAt (std::string strip) |
void | strip (std::string strip) |
void | dontStrip (std::string strip) |
void | stripUnprintable (bool strip) |
void | append (std::string append) |
void | setNoBuf () |
void | setLineBuf () |
Additional Inherited Members | |
![]() | |
static void | writeBytes (Vector< unsigned char > &buffer, int fd) |
![]() | |
static const unsigned int | MAX_RCV_BUFFER = 300 |
static const unsigned | TELNET_PORT_NO = 23 |
![]() | |
int | fd_ |
SerialClient::SerialClient | ( | std::string | portName = "/dev/ttyS0" , |
int | baudRate = 9600 , |
||
bool | canonical = false , |
||
bool | sevenBit = false |
||
) |
Constructor.
....................................................................... Constructor.
|
virtual |
Destructor.
....................................................................... Destructor.
|
virtual |
Open a connection to the serial port
Open a read-write connection to the serial port.
Reimplemented from gcp::util::Port.
void SerialClient::disconnect | ( | ) |
Terminate the serial port connection to the TERM
void SerialClient::setBaudRate | ( | int | baudRate | ) |
Set the baud rate
....................................................................... Set the baudrate
void gcp::util::SerialClient::setPort | ( | std::string | port | ) |
Set the port