#include <IOManager.hpp>
Public Member Functions | |
void | closeDevice (shared_ptr< Device > device) |
Closes the given device. | |
shared_ptr< DeviceHandle > | createDevice (std::string filename, shared_ptr< ActiveObject > owner, shared_ptr< DeviceConfigurator > deviceConfigurator, int expectedDataSize) |
Creates a device. | |
void | enableDeviceRead (shared_ptr< Device > device, shared_ptr< StreamOperationHandlerMethodBase > streamOperationHandlerRead) |
Start reading from a device. | |
void | enableDeviceWrite (shared_ptr< Device > device) |
Enable write operations in a device. | |
shared_ptr< IOThread > | getIOThread () const |
IOThread getter. | |
~IOManager () | |
Destructor. | |
Static Public Member Functions | |
static shared_ptr< IOManager > | getInstance () |
Method used to retrieve the IOManager instance. |
IOManager class.
This is the class (singleton) which manages IO devices.
Definition at line 53 of file IOManager.hpp.
IOManager::~IOManager | ( | ) |
Destructor.
Definition at line 37 of file IOManager.cpp.
void IOManager::closeDevice | ( | shared_ptr< Device > | device | ) |
Closes the given device.
Definition at line 77 of file IOManager.cpp.
shared_ptr< DeviceHandle > IOManager::createDevice | ( | std::string | filename, | |
shared_ptr< ActiveObject > | owner, | |||
shared_ptr< DeviceConfigurator > | deviceConfigurator, | |||
int | expectedDataSize | |||
) |
Creates a device.
This method creates a device used to perform IO asynchronous operations in devices.
filename | Name of the physical device. | |
owner | ActiveObject in which this device is being created. | |
deviceConfigurator | DeviceConfigurator used to configure the device when it has been opened. |
Definition at line 44 of file IOManager.cpp.
void IOManager::enableDeviceRead | ( | shared_ptr< Device > | device, | |
shared_ptr< StreamOperationHandlerMethodBase > | streamOperationHandlerRead | |||
) |
Start reading from a device.
Enable read operations in a device. When read is enabled and there is available data the callback will be called.
device | The device on which we want to enable read operations |
Definition at line 62 of file IOManager.cpp.
void IOManager::enableDeviceWrite | ( | shared_ptr< Device > | device | ) |
Enable write operations in a device.
Enable write operations in a device. This method must be called before writing to the device
device | The device on which we want to enable read operations |
Definition at line 67 of file IOManager.cpp.
shared_ptr< IOManager > IOManager::getInstance | ( | ) | [static] |
Method used to retrieve the IOManager instance.
This method is used to retrieve the IOManager (singleton entity) instance.
Definition at line 39 of file IOManager.cpp.