Open Lighting Architecture
0.9.0
|
Classes for general I/O and event handling.
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 |
bool ola::io::CreatePipe | ( | int | fd_pair[2] | ) |
Helper function to create a annonymous pipe
fd_pair | a 2 element array which is updated with the fds |
bool ola::io::Open | ( | const std::string & | path, |
int | oflag, | ||
int * | fd | ||
) |
Wrapper around open(). This logs a message is the open fails.
path | the path to open | |
oflag | flags passed to open | |
[out] | fd | a pointer to the fd which is returned. |
bool ola::io::UIntToSpeedT | ( | uint32_t | value, |
speed_t * | output | ||
) |
Convert an integer baud rate to the termios struct speed_t.
[in] | value | the baudrate value to convert |
[out] | output | a pointer where the value will be stored |