mermaid::support::io::IOManager Class Reference

IOManager class. More...

#include <IOManager.hpp>

Collaboration diagram for mermaid::support::io::IOManager:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void closeDevice (shared_ptr< Device > device)
 Closes the given device.
shared_ptr< DeviceHandlecreateDevice (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< IOThreadgetIOThread () const
 IOThread getter.
 ~IOManager ()
 Destructor.

Static Public Member Functions

static shared_ptr< IOManagergetInstance ()
 Method used to retrieve the IOManager instance.

Detailed Description

IOManager class.

This is the class (singleton) which manages IO devices.

Author:
Joao Carreira

Definition at line 53 of file IOManager.hpp.


Constructor & Destructor Documentation

IOManager::~IOManager (  ) 

Destructor.

Author:
Joao Carreira

Definition at line 37 of file IOManager.cpp.


Member Function Documentation

void IOManager::closeDevice ( shared_ptr< Device device  ) 

Closes the given device.

Author:
Joao Carreira

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.

Parameters:
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.
Returns:
Device handle to the created device.
Author:
Joao Carreira

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.

Parameters:
device The device on which we want to enable read operations
Author:
Joao Carreira

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

Parameters:
device The device on which we want to enable read operations
Author:
Joao Carreira

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.

Returns:
IOManager instance
Author:
Joao Carreira

Definition at line 39 of file IOManager.cpp.

shared_ptr< IOThread > IOManager::getIOThread (  )  const

IOThread getter.

Returns:
IOThread of the IOManager
Author:
Joao Carreira

Definition at line 72 of file IOManager.cpp.

Generated on Fri Mar 4 22:15:47 2011 for MeRMaID::support by  doxygen 1.6.3