Go to the documentation of this file.
38 # include <sys/timeb.h>
42 # include <sys/time.h>
103 static const int INVALID_SOCKET = -1;
107 struct timeval timeout_timeval;
126 cTCPSerial(
char const* _tcp_adr,
int _tcp_port,
double _timeout );
149 int write(
char const *ptr,
int len=0 );
159 ssize_t
Read(
void *data, ssize_t
size,
long timeout_us,
bool return_on_less_data );
170 return WSAGetLastError();
int tcp_port
the TCP port to use
Interface of class #SDH::cSerialBase, a virtal base class to access serial communication channels lik...
virtual void Close(void)=0
Close the previously opened communication channel.
#define NAMESPACE_SDH_END
Low-level communication class to access a serial port.
int fd
the file descriptor of the socket
virtual bool IsOpen(void)=0
Return true if communication channel is open.
Derived exception class for low-level serial communication related exceptions.
static const long TIMEOUT_RETURN_IMMEDITELY_US
int tErrorCode
type of the error code, DWORD on windows and int on Linux/cygwin
Low-level communication class to access a CAN port.
static const double TIMEOUT_WAIT_FOR_EVER_S
virtual void SetTimeout(double _timeout)
set the timeout for next readline() calls (negative value means: no timeout, wait for ever)
Class for short, fixed maximum length text messages.
#define NAMESPACE_SDH_START
virtual void Open(void)=0
Open rs232 port port.
static const long TIMEOUT_WAIT_FOR_EVER_US
Interface of the exception base class #SDH::cSDHLibraryException and #SDH::cMsg.
This file contains some basic definitions (defines, macros, datatypes)
virtual ssize_t Read(void *data, ssize_t size, long timeout_us, bool return_on_less_data)=0
virtual int write(char const *ptr, int len=0)=0
Write data to a previously opened port.
This file contains settings to make the SDHLibrary compile on differen systems:
long timeout_us
cached timeout in us for read()
virtual tErrorCode GetErrorNumber()
cTCPSerialException(cMsg const &_msg)
Derived exception class for low-level CAN ESD related exceptions.
static const double TIMEOUT_RETURN_IMMEDITELY_S
sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Wed Mar 2 2022 01:00:58