![]() |
DUNE: Uniform Navigational Environment
2.3.0
|
Public Types | |
enum | Result { PRES_OK, PRES_NONE, PRES_SIGNAL, PRES_ERROR } |
Public Member Functions | |
IOMultiplexing (void) | |
~IOMultiplexing (void) | |
void | add (void *src) |
void | del (void *src) |
bool | poll (double timeout) |
bool | wasTriggered (void *src) |
DUNE::System::IOMultiplexing::IOMultiplexing | ( | void | ) |
Constructor.
DUNE::System::IOMultiplexing::~IOMultiplexing | ( | void | ) |
Destructor.
void DUNE::System::IOMultiplexing::add | ( | void * | src | ) |
Add os-specific i/o handle to the polling pool.
Only supports unix file descriptors so far.
[in] | src | pointer to os-specific i/o handle. |
Referenced by DUNE::Network::TCPSocket::addToPoll(), DUNE::Network::UDPSocket::addToPoll(), DUNE::Hardware::SerialPort::addToPoll(), and DUNE::Hardware::Buttons::poll().
void DUNE::System::IOMultiplexing::del | ( | void * | src | ) |
Remove os-specific i/o handle from the polling pool.
Only supports unix file descriptors so far.
[in] | src | pointer to os-specific i/o handle. |
Referenced by DUNE::Network::TCPSocket::delFromPoll(), DUNE::Network::UDPSocket::delFromPoll(), and DUNE::Hardware::SerialPort::delFromPoll().
bool DUNE::System::IOMultiplexing::poll | ( | double | timeout | ) |
Wait for new input from the i/o handle pool.
[in] | timeout | timeout in seconds, negative for no timeout. |
References DUNE::System::Error::getLastMessage().
Referenced by DUNE::Hardware::Buttons::poll(), DUNE::Network::HTTPServer::poll(), and Transports::Evologics::Listener::run().
bool DUNE::System::IOMultiplexing::wasTriggered | ( | void * | src | ) |
Check if new input became available for the os-specific i/o handle during the previous call to poll().
Only supports unix file descriptors so far.
[in] | src | pointer to os-specific i/o handle. |
Referenced by DUNE::Network::TCPSocket::wasTriggered(), DUNE::Network::UDPSocket::wasTriggered(), and DUNE::Hardware::SerialPort::wasTriggered().