fesa::Notification Class Reference

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>

List of all members.

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

NotificationIDid_
 The unique ID of each Notification ... there information about device, class and property is stored.
SubscriptionMap subscriptions_
SubscriptionCycle subscriptionCycle_

Detailed Description

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.


Member Typedef Documentation

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.


Constructor & Destructor Documentation

fesa::Notification::Notification ( NotificationID id  ) 

constructor id notification id that will be notify

Definition at line 12 of file Notification.cpp.


Member Function Documentation

void fesa::Notification::addCycle ( const std::string &  cycleSelector  ) 

this method is called from the SubscriptionTreeManager, in order to insert the new cycleSelector.

Parameters:
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.

Parameters:
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

Parameters:
propName The propertyname
devName The devicename
Returns:
doesContain?

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

Parameters:
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  ) 
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.

Parameters:
subscriber The corresponding SubscriptionDevice

Definition at line 33 of file Notification.cpp.

References fesa::SubscriptionCycle::removeCycle(), subscriptionCycle_, and subscriptions_.


Member Data Documentation

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().


The documentation for this class was generated from the following files:

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1