This class is used by the SubscriptionTreeManager to find the right subscribers, without any parsing of strings through the subscription tree. The NotificationID of each notification is unique and identifies the Notification on a RT Notify Event. More...
#include <Notification.h>
Public Member Functions | |
Notification (NotificationID &id) | |
constructor id notification id that will be notify | |
void | notify (MultiplexingContext &muxContext, RequestType &reqType) |
this method is called from the SubscriptionTreeManager. It invokes the notification of all SubscriptionDevices of the matching MultiplexingContext | |
void | addSubscriber (boost::shared_ptr< SubscriptionParameter > sp) |
this method is called from the SubscriptionTreeManager. If a new subscriber is added into the subscription tree, the subscriber has also to be added into the "Notification" vector. | |
void | addCycle (const std::string &cycleSelector) |
this method is called from the SubscriptionTreeManager, in order to insert the new cycleSelector. | |
void | removeSubscriber (boost::shared_ptr< SubscriptionParameter > sp, const std::string &cycleSelector, bool toBeDeleted) |
this method is called from the SubscriptionTreeManager. If a empty subscriber is deleted from the subscription tree, the subscriber has also to be deleted from the "Notification" vector. | |
bool | contains (const std::string &deviceName, const std::string &propName) |
checks, if the Notification contains the given combination of Property and Device | |
void | printDebugState (std::stringstream &str) |
Private Types | |
typedef std::map< std::string, boost::shared_ptr < SubscriptionParameter > > | SubscriptionMap |
hashmap that contains all the current subscriptions | |
typedef SubscriptionMap::iterator | SubscriptionItr |
Private Attributes | |
NotificationID & | id_ |
The unique ID of each Notification ... there information about device, class and property is stored. | |
SubscriptionMap | subscriptions_ |
SubscriptionCycle | subscriptionCycle_ |
This class is used by the SubscriptionTreeManager to find the right subscribers, without any parsing of strings through the subscription tree. The NotificationID of each notification is unique and identifies the Notification on a RT Notify Event.
Definition at line 27 of file Notification.h.
typedef SubscriptionMap::iterator fesa::Notification::SubscriptionItr [private] |
Definition at line 82 of file Notification.h.
typedef std::map<std::string, boost::shared_ptr<SubscriptionParameter> > fesa::Notification::SubscriptionMap [private] |
hashmap that contains all the current subscriptions
Definition at line 81 of file Notification.h.
fesa::Notification::Notification | ( | NotificationID & | id | ) |
constructor id notification id that will be notify
Definition at line 12 of file Notification.cpp.
void fesa::Notification::addCycle | ( | const std::string & | cycleSelector | ) |
this method is called from the SubscriptionTreeManager, in order to insert the new cycleSelector.
subscriber | The corresponding SubscriptionDevice |
Definition at line 27 of file Notification.cpp.
References fesa::SubscriptionCycle::addCycle(), and subscriptionCycle_.
void fesa::Notification::addSubscriber | ( | boost::shared_ptr< SubscriptionParameter > | sp | ) |
this method is called from the SubscriptionTreeManager. If a new subscriber is added into the subscription tree, the subscriber has also to be added into the "Notification" vector.
subscriber | The corresponding SubscriptionDevice |
Definition at line 17 of file Notification.cpp.
References subscriptions_.
bool fesa::Notification::contains | ( | const std::string & | deviceName, | |
const std::string & | propName | |||
) |
checks, if the Notification contains the given combination of Property and Device
propName | The propertyname | |
devName | The devicename |
Definition at line 64 of file Notification.cpp.
References fesa::NotificationID::contains(), and id_.
void fesa::Notification::notify | ( | MultiplexingContext & | muxContext, | |
RequestType & | reqType | |||
) |
this method is called from the SubscriptionTreeManager. It invokes the notification of all SubscriptionDevices of the matching MultiplexingContext
muxContext | The Multiplexing Context, given by the RTAction | |
reqType | The type of the request |
Definition at line 46 of file Notification.cpp.
References fesa::SubscriptionCycle::matchContext(), subscriptionCycle_, and subscriptions_.
void fesa::Notification::printDebugState | ( | std::stringstream & | str | ) |
Definition at line 69 of file Notification.cpp.
References fesa::NotificationID::getIDKey(), id_, fesa::SubscriptionCycle::printDebugState(), subscriptionCycle_, and subscriptions_.
void fesa::Notification::removeSubscriber | ( | boost::shared_ptr< SubscriptionParameter > | sp, | |
const std::string & | cycleSelector, | |||
bool | toBeDeleted | |||
) |
this method is called from the SubscriptionTreeManager. If a empty subscriber is deleted from the subscription tree, the subscriber has also to be deleted from the "Notification" vector.
subscriber | The corresponding SubscriptionDevice |
Definition at line 33 of file Notification.cpp.
References fesa::SubscriptionCycle::removeCycle(), subscriptionCycle_, and subscriptions_.
NotificationID& fesa::Notification::id_ [private] |
The unique ID of each Notification ... there information about device, class and property is stored.
Definition at line 76 of file Notification.h.
Referenced by contains(), and printDebugState().
Definition at line 85 of file Notification.h.
Referenced by addCycle(), notify(), printDebugState(), and removeSubscriber().
Definition at line 83 of file Notification.h.
Referenced by addSubscriber(), notify(), printDebugState(), and removeSubscriber().