Open Lighting Architecture  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Enumerations | Functions | Variables
ola::io Namespace Reference

Detailed Description

Classes for general I/O and event handling.

Classes

class  PollerInterface
 The interface for the Poller classes. More...
class  SelectPoller
 An implementation of PollerInterface that uses select(). More...
class  TimeoutManager
 Manages timer events. More...
class  BigEndianInputStreamInterface
class  BigEndianInputStreamAdaptor
class  BigEndianInputStream
class  BigEndianOutputStreamInterface
class  BigEndianOutputStreamAdaptor
class  BigEndianOutputStream
class  ReadFileDescriptor
class  WriteFileDescriptor
class  BidirectionalFileDescriptor
class  UnmanagedFileDescriptor
struct  UnmanagedFileDescriptor_lt
class  ConnectedDescriptor
class  LoopbackDescriptor
class  PipeDescriptor
class  UnixSocket
class  DeviceDescriptor
class  InputBufferInterface
class  InputStreamInterface
class  InputStream
class  IOQueue
class  IOStack
class  IOVecInterface
class  MemoryBlock
 A MemoryBlock encapsulates a chunk of memory. It's used by the IOQueue and IOStack classes. More...
class  MemoryBlockPool
class  MemoryBuffer
class  OutputBufferInterface
class  OutputStreamInterface
class  OutputStream
class  SelectServer
class  SelectServerInterface
class  StdinHandler

Enumerations

enum  baud_rate {
  BAUD_RATE_9600 = 9600, BAUD_RATE_19200 = 19200, BAUD_RATE_38400 = 38400, BAUD_RATE_57600 = 57600,
  BAUD_RATE_115200 = 115200, BAUD_RATE_230400 = 230400
}

Functions

bool CreatePipe (int fd_pair[2])
bool Open (const string &path, int oflag, int *fd)
bool UIntToSpeedT (uint32_t value, speed_t *output)
 Convert an integer baud rate to the termios struct speed_t.
bool Open (const std::string &path, int oflag, int *fd)
 Wrapper around open(). This logs a message is the open fails.

Variables

static const int INVALID_DESCRIPTOR = -1

Function Documentation

bool ola::io::CreatePipe ( int  fd_pair[2])

Helper function to create a annonymous pipe

Parameters
fd_paira 2 element array which is updated with the fds
Returns
true if successfull, false otherwise.
bool ola::io::Open ( const std::string &  path,
int  oflag,
int *  fd 
)

Wrapper around open(). This logs a message is the open fails.

Parameters
paththe path to open
oflagflags passed to open
[out]fda pointer to the fd which is returned.
Returns
true if the open succeeded, false otherwise.
bool ola::io::UIntToSpeedT ( uint32_t  value,
speed_t *  output 
)

Convert an integer baud rate to the termios struct speed_t.

Parameters
[in]valuethe baudrate value to convert
[out]outputa pointer where the value will be stored
Returns
true if the value was converted, false if the baud rate wasn't supported by the method.