The SubscriptionTreeManager is implemented as a singleton. It provides a functional interface to the subscription tree and manages the tree - mutex - policity. More...
#include <SubscriptionParameter.h>
Public Member Functions | |
SubscriptionParameter (const std::string ¶mName, AbstractDevice &device, Property &property, bool useFastUpdate, NotificationThread *pNotificationThread) | |
~SubscriptionParameter () | |
void | notify (MultiplexingContext &muxContext, RequestType &reqType, std::vector< std::string > &validCS) |
void | addSubscriber (const std::string &cycleSelector, const rdaData &filter, rdaValueChangeListener *subscriber) |
void | removeSubscriber (const std::string &cycleSelector, rdaValueChangeListener *subscriber, bool &isEmpty) |
const std::string & | getName () |
Property & | getProperty () |
AbstractDevice & | getDevice () |
void | reportInternalError (const std::string &errorCategory, int32_t errorCode, const std::string &message, bool changed) |
void | printDebugState (std::stringstream &str) |
Private Types | |
typedef std::vector < boost::shared_ptr < AbstractSubscriptionFilter > > | SubscriptionFilterVector |
vector that contains all the filters registered for this SubscriptionParameter. | |
typedef SubscriptionFilterVector::iterator | SubscriptionFilterItr |
Private Attributes | |
SubscriptionFilterVector | filters_ |
std::string | name_ |
SubscriptionParameter name. | |
AbstractDevice & | device_ |
reference to the device instance | |
Property & | property_ |
reference to the property instance | |
bool | useFastUpdate_ |
defines the client update policy | |
NotificationThread * | pNotificationThread_ |
A reference to the Notification thread of the corresponding Property. |
The SubscriptionTreeManager is implemented as a singleton. It provides a functional interface to the subscription tree and manages the tree - mutex - policity.
Definition at line 30 of file SubscriptionParameter.h.
typedef SubscriptionFilterVector::iterator fesa::SubscriptionParameter::SubscriptionFilterItr [private] |
Definition at line 59 of file SubscriptionParameter.h.
typedef std::vector<boost::shared_ptr<AbstractSubscriptionFilter> > fesa::SubscriptionParameter::SubscriptionFilterVector [private] |
vector that contains all the filters registered for this SubscriptionParameter.
Definition at line 58 of file SubscriptionParameter.h.
fesa::SubscriptionParameter::SubscriptionParameter | ( | const std::string & | paramName, | |
AbstractDevice & | device, | |||
Property & | property, | |||
bool | useFastUpdate, | |||
NotificationThread * | pNotificationThread | |||
) |
Definition at line 24 of file SubscriptionParameter.cpp.
References fesa::DiagnosticUtils::framework, fesa::AbstractEquipment::getDiagnostics(), fesa::AbstractEquipment::getInstance(), fesa::DiagnosticUtils::DiagnosticMessage::msg, name_, fesa::DiagnosticUtils::server, fesa::DiagnosticUtils::DiagnosticMessage::side, and fesa::DiagnosticUtils::DiagnosticMessage::source.
fesa::SubscriptionParameter::~SubscriptionParameter | ( | ) |
Definition at line 43 of file SubscriptionParameter.cpp.
References filters_, fesa::DiagnosticUtils::framework, fesa::AbstractEquipment::getDiagnostics(), fesa::AbstractEquipment::getInstance(), fesa::DiagnosticUtils::DiagnosticMessage::msg, name_, fesa::DiagnosticUtils::server, fesa::DiagnosticUtils::DiagnosticMessage::side, and fesa::DiagnosticUtils::DiagnosticMessage::source.
void fesa::SubscriptionParameter::addSubscriber | ( | const std::string & | cycleSelector, | |
const rdaData & | filter, | |||
rdaValueChangeListener * | subscriber | |||
) |
Definition at line 58 of file SubscriptionParameter.cpp.
References device_, filters_, fesa::Property::getType(), fesa::Property::isMultiplexed(), fesa::AbstractDevice::isMultiplexed(), pNotificationThread_, property_, fesa::SETTING, and useFastUpdate_.
AbstractDevice & fesa::SubscriptionParameter::getDevice | ( | ) | [inline] |
Definition at line 98 of file SubscriptionParameter.h.
References device_.
const std::string & fesa::SubscriptionParameter::getName | ( | ) | [inline] |
Definition at line 88 of file SubscriptionParameter.h.
References name_.
Property & fesa::SubscriptionParameter::getProperty | ( | ) | [inline] |
Definition at line 93 of file SubscriptionParameter.h.
References property_.
void fesa::SubscriptionParameter::notify | ( | MultiplexingContext & | muxContext, | |
RequestType & | reqType, | |||
std::vector< std::string > & | validCS | |||
) |
Definition at line 125 of file SubscriptionParameter.cpp.
References filters_.
void fesa::SubscriptionParameter::printDebugState | ( | std::stringstream & | str | ) |
Definition at line 145 of file SubscriptionParameter.cpp.
void fesa::SubscriptionParameter::removeSubscriber | ( | const std::string & | cycleSelector, | |
rdaValueChangeListener * | subscriber, | |||
bool & | isEmpty | |||
) |
Definition at line 105 of file SubscriptionParameter.cpp.
References filters_.
void fesa::SubscriptionParameter::reportInternalError | ( | const std::string & | errorCategory, | |
int32_t | errorCode, | |||
const std::string & | message, | |||
bool | changed | |||
) |
Definition at line 136 of file SubscriptionParameter.cpp.
References filters_.
reference to the device instance
Definition at line 70 of file SubscriptionParameter.h.
Referenced by addSubscriber(), and getDevice().
Definition at line 60 of file SubscriptionParameter.h.
Referenced by addSubscriber(), notify(), printDebugState(), removeSubscriber(), reportInternalError(), and ~SubscriptionParameter().
std::string fesa::SubscriptionParameter::name_ [private] |
SubscriptionParameter name.
Definition at line 65 of file SubscriptionParameter.h.
Referenced by getName(), printDebugState(), SubscriptionParameter(), and ~SubscriptionParameter().
A reference to the Notification thread of the corresponding Property.
Definition at line 85 of file SubscriptionParameter.h.
Referenced by addSubscriber().
Property& fesa::SubscriptionParameter::property_ [private] |
reference to the property instance
Definition at line 75 of file SubscriptionParameter.h.
Referenced by addSubscriber(), and getProperty().
bool fesa::SubscriptionParameter::useFastUpdate_ [private] |
defines the client update policy
Definition at line 80 of file SubscriptionParameter.h.
Referenced by addSubscriber().