#include <DeviceContainer.hh>
Inheritance diagram for rovsoft::io::DeviceContainer:
Public Member Functions | |
DeviceContainer (messages::NewMessageReceiverListener *rListener=0, messages::NewMessageSenderListener *sListener=0) | |
Construct a device container with specified listeners, which should receive events about newly created devices. | |
virtual void | parseMessageStream (unsigned short sa, unsigned short da, IStreamer &stream, messages::MessageReceiver *out=0) throw (lib::ExceptionPtr) |
This method forwards the streamer to the device specified with sa and creates it if it didn't exist. | |
virtual void | putMessage (const messages::MessagePtr message) throw (ReadOnlyExceptionPtr, lib::OutOfRangeExceptionPtr, lib::NullPointerExceptionPtr) |
Input from rovsoft. | |
void | setNewMessageReceiverListener (messages::NewMessageReceiverListener *listener) |
Set a new Listener for new receiver devices. | |
void | setNewMessageSenderListener (messages::NewMessageSenderListener *listener) |
Set a new listener that will be informed about new message sender devices being created. | |
messages::MessageReceiver & | getMessageReceiver (unsigned char index) throw (ReadOnlyExceptionPtr, lib::NullPointerExceptionPtr, lib::OutOfRangeExceptionPtr) |
Gets the MessageReceiver device specified with index. | |
messages::MessageSenderInterface & | getMessageSender (unsigned char index) throw (WriteOnlyExceptionPtr, lib::NullPointerExceptionPtr, lib::OutOfRangeExceptionPtr) |
Gets the MessageSender device specified with index. | |
virtual | ~DeviceContainer () |
Protected Member Functions | |
virtual void | newDevice (MessageStreamParser *&obj, messages::MessageReceiver *interface)=0 |
Must be overridden by daughter classes, so that parseMessageStream can work. | |
MessageStreamParser * | getMessageStreamParser (unsigned char index) throw (lib::OutOfRangeExceptionPtr) |
Gets a device from the devices vector. | |
Protected Attributes | |
std::vector< MessageStreamParser * > | devices |
The mapping sa to device, is done via the index of the vector, to the vector element, just because of performance. | |
messages::NewMessageReceiverListener * | newReceiverListener |
messages::NewMessageSenderListener * | newSenderListener |
|
Construct a device container with specified listeners, which should receive events about newly created devices.
|
|
|
|
Gets the MessageReceiver device specified with index. You should not store the returned reference permanentely in a pointer, because its target could become invalid!
|
|
Gets the MessageSender device specified with index. You should not store the returned reference permanentely in a pointer, because its target could become invalid!
|
|
Gets a device from the devices vector.
|
|
Must be overridden by daughter classes, so that parseMessageStream can work. Should return a pointer to a newly created object.
Implemented in rovsoft::io::BoolCommandReceiverContainer, rovsoft::io::MotionCommandReceiverContainer, rovsoft::io::NConfirmedCommandSenderContainer, rovsoft::io::PeripheralReceiverContainer, rovsoft::io::PowerDownEventReceiverContainer, rovsoft::io::TsFloatTypeSenderContainer, rovsoft::io::TsUByteTypeReceiverContainer, and rovsoft::io::TsUByteTypeSenderContainer. |
|
This method forwards the streamer to the device specified with sa and creates it if it didn't exist. When the creation of a device was neccessary it reports this to the specified listeners. Implements rovsoft::io::MessageStreamParser. Here is the call graph for this function: ![]() |
|
Input from rovsoft.
Implements rovsoft::messages::MessageReceiver. |
|
Set a new Listener for new receiver devices.
|
|
Set a new listener that will be informed about new message sender devices being created.
|
|
The mapping sa to device, is done via the index of the vector, to the vector element, just because of performance. A dictionary would be better if there were big holes between the elements, for not wasting too much memory. |
|
|
|
|