26#ifndef NIDAS_CORE_UNIXIODEVICE_H
27#define NIDAS_CORE_UNIXIODEVICE_H
44namespace nidas {
namespace core {
102 if (errno == EAGAIN || errno == EWOULDBLOCK)
return 0;
115 size_t read(
void *buf,
size_t len,
int msecTimeout);
126 if (errno == EAGAIN || errno == EWOULDBLOCK)
return 0;
140 void ioctl(
int request,
void* buf,
size_t)
An interface to an IO device.
Definition IODevice.h:42
virtual const std::string & getName() const
Definition IODevice.h:57
virtual void setName(const std::string &val)
Set the device name to be opened for this sensor.
Definition IODevice.h:52
A basic Unix I/O device, such as a named pipe, or a watched file.
Definition UnixIODevice.h:49
~UnixIODevice()
Destructor.
Definition UnixIODevice.h:70
int _fd
Definition UnixIODevice.h:161
int getWriteFd() const
The file descriptor used when writing to this device.
Definition UnixIODevice.h:80
size_t read(void *buf, size_t len)
Read from the device.
Definition UnixIODevice.h:98
void ioctl(int request, void *buf, size_t)
Definition UnixIODevice.h:140
size_t write(const void *buf, size_t len)
Write to the device.
Definition UnixIODevice.h:122
UnixIODevice()
Constructor.
Definition UnixIODevice.h:56
int getReadFd() const
The file descriptor used when reading from this device.
Definition UnixIODevice.h:75
void close()
close the device
Definition UnixIODevice.h:151
void open(int flags)
open the device.
Definition UnixIODevice.h:87
UnixIODevice(const std::string &name)
Constructor, passing the name of the device.
Definition UnixIODevice.h:62
Definition EOFException.h:34
Definition IOException.h:37
Sample * getSample(sampleType type, unsigned int len)
A convienence method for getting a sample of an enumerated type from a pool.
Definition Sample.cc:70
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31
int len
Definition sing.cc:948
int fd
Definition twod.c:56