Go to the documentation of this file.
30 #ifndef RS232_CYGWIN_H_
31 #define RS232_CYGWIN_H_
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 );
Interface of class #SDH::cSerialBase, a virtal base class to access serial communication channels lik...
#define NAMESPACE_SDH_END
Low-level communication class to access a serial port.
cRS232(int _port, unsigned long _baudrate, double _timeout, char const *_device_format_string="/dev/ttyS%d")
Derived exception class for low-level serial communication related exceptions.
unsigned long baudrate
the baudrate in bit/s
Low-level communication class to access a serial port on Cygwin and Linux.
int fd
the file descriptor of the RS232 port
ssize_t Read(void *data, ssize_t size, long timeout_us, bool return_on_less_data)
int port
the RS232 portnumber to use
Class for short, fixed maximum length text messages.
bool IsOpen(void)
Return true if port to RS232 is open.
void Close(void)
Close the previously opened rs232 port.
tcflag_t BaudrateToBaudrateCode(unsigned long baudrate)
Translate a baudrate given as unsigned long into a baudrate code for struct termios.
#define NAMESPACE_SDH_START
cRS232Exception(cMsg const &_msg)
Interface of the exception base class #SDH::cSDHLibraryException and #SDH::cMsg.
Derived exception class for low-level RS232 related exceptions.
This file contains settings to make the SDHLibrary compile on differen systems:
std::string device_format_string
the sprintf format string to generate the device name from the port, see Constructor
virtual bool UseCRC16()
overloaded from cSerialBase::UseCRC16 since we want to use a CRC16 to protect binary RS232 communicat...
int write(char const *ptr, int len=0)
Write data to a previously opened port.
sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Wed Mar 2 2022 01:00:58