26 #ifndef NIDAS_CORE_SERIALPORTIODEVICE_H
27 #define NIDAS_CORE_SERIALPORTIODEVICE_H
33 #include <sys/types.h>
36 #include <sys/ioctl.h>
42 namespace nidas {
namespace core {
A serial port.
Definition: SerialPortIODevice.h:47
void open(int flags)
open the device.
Definition: SerialPortIODevice.cc:45
size_t write(const void *buf, size_t len)
Write to the device.
Definition: SerialPortIODevice.cc:110
unsigned int _usecsperbyte
Definition: SerialPortIODevice.h:178
~SerialPortIODevice()
Destructor.
Definition: SerialPortIODevice.h:77
SerialPortIODevice()
Constructor.
Definition: SerialPortIODevice.h:54
nidas::util::Termios & termios()
Definition: SerialPortIODevice.h:92
void setRawTimeout(unsigned char val)
Definition: Termios.cc:349
virtual const std::string & getName() const
Definition: IODevice.h:57
void apply(int fd, const std::string &devname)
Set the termios options on a serial port.
Definition: Termios.cc:104
int _fd
Definition: UnixIODevice.h:149
int _rts485
Definition: SerialPortIODevice.h:176
A basic Unix I/O device, such as a named pipe, or a watched file.
Definition: UnixIODevice.h:49
int len
Definition: sing.cc:934
Definition: IOException.h:37
void setRTS485(int val)
Is this a RS485 half-duplex device, and if so, can the transmitter on the data system be enabled/disa...
Definition: SerialPortIODevice.cc:88
int getUsecsPerByte() const
Calculate the transmission time of each byte from this serial port.
Definition: SerialPortIODevice.cc:70
nidas::util::Termios _termios
Definition: SerialPortIODevice.h:174
SerialPortIODevice(const std::string &name)
Constructor, passing the name of the device.
Definition: SerialPortIODevice.h:66
void applyTermios()
Apply the current Termios to an opened port.
Definition: SerialPortIODevice.h:87
void setRaw(bool val)
Sets termios options for raw or non-raw(cooked) mode.
Definition: Termios.cc:307
void setRawLength(unsigned char val)
Definition: Termios.cc:342
A class providing get/set methods into a termios structure.
Definition: Termios.h:48