|
| | TCPDriver (int max_packet_size, bool extract_last=false) |
| |
| virtual | ~TCPDriver () |
| |
| void | tcp_server_init (int port) |
| |
| virtual int | readPacket (uint8_t *buffer, int bufsize) |
| |
| virtual int | readPacket (uint8_t *buffer, int bufsize, base::Time const &packet_timeout, base::Time const &first_byte_timeout) |
| |
| virtual bool | writePacket (uint8_t const *buffer, int bufsize, base::Time const &timeout) |
| |
| bool | hasOpenSocked () const |
| |
| | Driver (int max_packet_size, bool extract_last=false) |
| |
| virtual | ~Driver () |
| |
| void | setReadTimeout (base::Time const &t) |
| |
| base::Time | getReadTimeout () const |
| |
| void | setWriteTimeout (base::Time const &t) |
| |
| base::Time | getWriteTimeout () const |
| |
| void | clear () |
| |
| Status | getStatus () const |
| |
| void | resetStatus () |
| |
| Status | getStats () const |
| |
| void | resetStats () |
| |
| void | setExtractLastPacket (bool flag) |
| |
| bool | getExtractLastPacket () const |
| |
| virtual void | openURI (std::string const &uri) |
| |
| bool | openInet (const char *hostname, int port) |
| |
| void | openTCP (std::string const &hostname, int port) |
| |
| void | openUDP (std::string const &hostname, int remote_port) |
| |
| void | openUDPBidirectional (std::string const &hostname, int out_port, int in_port) |
| |
| bool | openSerial (std::string const &port, int baudrate) |
| |
| void | openFile (std::string const &path) |
| |
| void | setFileDescriptor (int fd, bool auto_close=true) |
| |
| int | getFileDescriptor () const |
| |
| bool | isValid () const |
| |
| bool | setSerialBaudrate (int rate) |
| |
| virtual void | close () |
| |
| bool | hasPacket () const |
| |
| int | readPacket (uint8_t *buffer, int bufsize) |
| |
| int | readPacket (uint8_t *buffer, int bufsize, base::Time const &packet_timeout) |
| |
| int | readPacket (uint8_t *buffer, int bufsize, int packet_timeout, int first_byte_timeout=-1) |
| |
| int | readPacket (uint8_t *buffer, int bufsize, base::Time const &packet_timeout, base::Time const &first_byte_timeout) |
| |
| bool | writePacket (uint8_t const *buffer, int bufsize) |
| |
| bool | writePacket (uint8_t const *buffer, int bufsize, int timeout) |
| |
| bool | writePacket (uint8_t const *buffer, int bufsize, base::Time const &timeout) |
| |
| virtual int | extractPacket (uint8_t const *buffer, size_t buffer_size) const =0 |
| |
| void | setMainStream (IOStream *stream) |
| |
| IOStream * | getMainStream () const |
| |
| void | openTestMode () |
| |
| void | addListener (IOListener *stream) |
| |
| void | removeListener (IOListener *stream) |
| |
|
| enum | SERIAL_RATES {
SERIAL_1200 = 1200,
SERIAL_2400 = 2400,
SERIAL_4800 = 4800,
SERIAL_9600 = 9600,
SERIAL_19200 = 19200,
SERIAL_38400 = 38400,
SERIAL_57600 = 57600,
SERIAL_115200 = 115200,
SERIAL_230400 = 230400,
SERIAL_460800 = 460800,
SERIAL_576000 = 576000,
SERIAL_921600 = 921600,
SERIAL_1152000 = 1152000
} |
| |
| typedef iodrivers_base::Status | Statistics |
| |
| static int | openSerialIO (std::string const &port, int baudrate) |
| |
| static bool | setNonBlockingFlag (int fd) |
| |
| static bool | setSerialBaudrate (int fd, int rate) |
| |
| static std::string | printable_com (std::string const &buffer) |
| |
| static std::string | printable_com (uint8_t const *buffer, size_t buffer_size) |
| |
| static std::string | printable_com (char const *buffer, size_t buffer_size) |
| |
| static std::string | binary_com (std::string const &str) |
| |
| static std::string | binary_com (uint8_t const *str, size_t str_size) |
| |
| static std::string | binary_com (char const *str, size_t str_size) |
| |
| int const | MAX_PACKET_SIZE |
| |
| static const int | INVALID_FD = -1 |
| |
This class implements an TCP Server for single Client If more thn one client tryes to connect, the old one is disconnected see checkClientConnection for more details or if you want to implement support for more than one client