30 #ifndef RS232_CYGWIN_H_ 31 #define RS232_CYGWIN_H_ 101 tcflag_t BaudrateToBaudrateCode(
unsigned long baudrate );
118 cRS232(
int _port,
unsigned long _baudrate,
double _timeout,
char const* _device_format_string =
"/dev/ttyS%d" );
150 int write(
char const *ptr,
int len=0 );
160 ssize_t Read(
void *data, ssize_t
size,
long timeout_us,
bool return_on_less_data );
virtual bool UseCRC16()
overloaded from cSerialBase::UseCRC16 since we want to use a CRC16 to protect binary RS232 communicat...
std::string device_format_string
the sprintf format string to generate the device name from the port, see Constructor ...
Interface of the exception base class #SDH::cSDHLibraryException and #SDH::cMsg.
Low-level communication class to access a serial port.
#define NAMESPACE_SDH_START
cRS232Exception(cMsg const &_msg)
Low-level communication class to access a serial port on Cygwin and Linux.
int fd
the file descriptor of the RS232 port
int port
the RS232 portnumber to use
#define NAMESPACE_SDH_END
This file contains settings to make the SDHLibrary compile on differen systems:
unsigned long baudrate
the baudrate in bit/s
Interface of class #SDH::cSerialBase, a virtal base class to access serial communication channels lik...
Derived exception class for low-level serial communication related exceptions.
Derived exception class for low-level RS232 related exceptions.
Class for short, fixed maximum length text messages.