Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

rovsoft::io::DeviceManager Class Reference

The DeviceManager, a relative simple class containing a vector of DeviceContainers. More...

#include <DeviceManager.hh>

Inheritance diagram for rovsoft::io::DeviceManager:

Inheritance graph
[legend]
Collaboration diagram for rovsoft::io::DeviceManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void parseMessageStream (unsigned short sa, unsigned short da, IStreamer &stream, messages::MessageReceiver *out=0) throw (lib::ExceptionPtr)
 This method is used by for example the flow controller, for sending streams to devices for parsing.
virtual void putMessage (const messages::MessagePtr message) throw (ReadOnlyExceptionPtr, lib::OutOfRangeExceptionPtr, lib::NullPointerExceptionPtr)
 By implementing the MessageReceiver class, the Device Manager can be used as message router.
void addDeviceType (DeviceContainer &type)
 Adds a device container to the end of the vector types.
void setDeviceContainer (unsigned char index, DeviceContainer &type)
 Sets a device container at the specified index to the new value.

Protected Attributes

std::vector< DeviceContainer * > types
 The vector of device types that exist.

Detailed Description

The DeviceManager, a relative simple class containing a vector of DeviceContainers.

This class forwards any calls to parseMessageStream() to the responsible device containers.


Member Function Documentation

void rovsoft::io::DeviceManager::addDeviceType DeviceContainer type  ) 
 

Adds a device container to the end of the vector types.

Parameters:
type the container to add to the end of the types array.

void rovsoft::io::DeviceManager::parseMessageStream unsigned short  sa,
unsigned short  da,
IStreamer stream,
messages::MessageReceiver out = 0
throw (lib::ExceptionPtr) [virtual]
 

This method is used by for example the flow controller, for sending streams to devices for parsing.

Implements rovsoft::io::MessageStreamParser.

void rovsoft::io::DeviceManager::putMessage const messages::MessagePtr  message  )  throw (ReadOnlyExceptionPtr, lib::OutOfRangeExceptionPtr, lib::NullPointerExceptionPtr) [virtual]
 

By implementing the MessageReceiver class, the Device Manager can be used as message router.

It will forward all messages to the specified device, throwing a ReadOnlyExceptionPtr if device doesn't support writing.

Exceptions:
ReadOnlyExceptionPtr if the device is a read only device.
lib::OutOfRangeExceptionPtr if the device to which the message should be sent, does not exist.
lib::NullPointerExceptionPtr if the index of the device exists, but it is a null pointer.

Implements rovsoft::messages::MessageReceiver.

void rovsoft::io::DeviceManager::setDeviceContainer unsigned char  index,
DeviceContainer type
 

Sets a device container at the specified index to the new value.

The index does not need to exist.

Parameters:
index the index in the types vector of the object being replaced.
type the new container to set this index too.


Member Data Documentation

std::vector<DeviceContainer* > rovsoft::io::DeviceManager::types [protected]
 

The vector of device types that exist.


The documentation for this class was generated from the following files:
Generated on Tue May 31 14:19:31 2005 for Rovsoft by  doxygen 1.4.3