Open Lighting Architecture  0.9.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | 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  WindowsPoller
 An implementation of PollerInterface for Windows. 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  LinuxHelper
 A static class containing platform-specific helper code for Linux. More...
class  InputBufferInterface
class  InputStreamInterface
class  InputStream
class  IOQueue
class  IOStack
struct  IOVec
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

Typedefs

typedef int DescriptorHandle

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

 STATIC_ASSERT (sizeof(struct iovec)==sizeof(struct IOVec))
bool CreatePipe (DescriptorHandle handle_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 if the open fails.

Variables

static DescriptorHandle INVALID_DESCRIPTOR = -1

Function Documentation

bool ola::io::CreatePipe ( DescriptorHandle  handle_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 if 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.