#include <MessageTypes.h>
Public Member Functions | |
void | serialize (std::ostream &stream) |
Serializes content of multiplexing context, class name and propertiesAndDevicesCol_ member. | |
void | addPropertyAndDevice (const std::string &property, const std::string &device) |
add a property to the collection of notified devices | |
void | reset () |
reset the list of devices and properties | |
ManualNotificationMessage (const std::string &className) | |
Constructor that creates manual notification message for class name. | |
ManualNotificationMessage (std::istream &stream) | |
Constructor that creates the message from a serialize data. | |
Public Attributes | |
std::string | className_ |
Name of class that is notified. | |
MultiplexingContext * | muxContext_ |
Multiplexing context that is notified, implemented as boost::shared_ptr since the lifetime is unknown because the object is possibly stored in a notification thread. | |
std::map< std::string, std::vector< std::string > > | propertiesAndDevicesCol_ |
hasmap that contains the properties and the devices that have to be notified |
Definition at line 129 of file MessageTypes.h.
fesa::ManualNotificationMessage::ManualNotificationMessage | ( | const std::string & | className | ) |
Constructor that creates manual notification message for class name.
className | name of the class |
Definition at line 62 of file MessageTypes.cpp.
fesa::ManualNotificationMessage::ManualNotificationMessage | ( | std::istream & | stream | ) |
Constructor that creates the message from a serialize data.
stream | that contains the data |
Definition at line 67 of file MessageTypes.cpp.
References className_, propertiesAndDevicesCol_, and fesa::StringUtilities::tokenize().
void fesa::ManualNotificationMessage::addPropertyAndDevice | ( | const std::string & | property, | |
const std::string & | device | |||
) |
add a property to the collection of notified devices
Definition at line 96 of file MessageTypes.cpp.
References propertiesAndDevicesCol_.
void fesa::ManualNotificationMessage::reset | ( | ) |
reset the list of devices and properties
Definition at line 137 of file MessageTypes.cpp.
References propertiesAndDevicesCol_.
Referenced by fesa::AbstractRTAction::executeAction().
void fesa::ManualNotificationMessage::serialize | ( | std::ostream & | stream | ) | [virtual] |
Serializes content of multiplexing context, class name and propertiesAndDevicesCol_ member.
the properties and devices are serialized in a string with the following format prop1:dev1,dev2 | prop2:dev1,dev3
the | serialized stream |
Throws | FesaErrorMsgSizeExceeded exception when maximum message size is exceeded |
Reimplemented from fesa::AbstractMessage.
Definition at line 111 of file MessageTypes.cpp.
References className_, muxContext_, propertiesAndDevicesCol_, fesa::MultiplexingContext::serialize(), and fesa::STRING_SEPARATOR.
std::string fesa::ManualNotificationMessage::className_ |
Name of class that is notified.
Definition at line 136 of file MessageTypes.h.
Referenced by ManualNotificationMessage(), and serialize().
Multiplexing context that is notified, implemented as boost::shared_ptr since the lifetime is unknown because the object is possibly stored in a notification thread.
Definition at line 142 of file MessageTypes.h.
Referenced by fesa::SubscriptionTreeManager::notify(), fesa::NotificationConsumer::run(), fesa::AbstractRTAction::sendManualNotification(), fesa::NotificationProducer::sendManualNotification(), and serialize().
std::map<std::string, std::vector<std::string> > fesa::ManualNotificationMessage::propertiesAndDevicesCol_ |
hasmap that contains the properties and the devices that have to be notified
Definition at line 148 of file MessageTypes.h.
Referenced by addPropertyAndDevice(), ManualNotificationMessage(), fesa::SubscriptionTreeManager::notify(), reset(), and serialize().