fesa::AbstractSubscriptionFilter Class Reference

#include <SubscriptionFilter.h>

Inheritance diagram for fesa::AbstractSubscriptionFilter:
fesa::SubscriptionFilter

List of all members.

Classes

struct  FesaListener

Public Member Functions

 AbstractSubscriptionFilter (AbstractDevice &device, Property &property, const rdaData &newFilter, bool useFastUpdate)
virtual ~AbstractSubscriptionFilter ()
virtual void addSubscriber (const std::string &cycleSelector, rdaValueChangeListener *subscriber)
virtual bool removeSubscriber (const std::string &cycleSelector, rdaValueChangeListener *subscriber, bool &isEmpty, bool &toBeDeleted)
bool matchFilter (const rdaData &filter)
virtual void notify (MultiplexingContext &muxContext, RequestType &reqType, std::vector< std::string > &validCS)=0
void cycleFirstUpdate (const std::string &cycleSelector, const rdaData &newFilter, rdaValueChangeListener *l)
 return a first update value for the corresponding cycle
void allCyclesFirstUpdate (const rdaData &newFilter, rdaValueChangeListener *l)
 If a subscriber subscribes to a multiplexed Setting Property using an empty cycleSelector, we have to return a value for each cycle.
void reportInternalError (const std::string &category, int32_t errorCode, const std::string &message, bool changed)
void cancelInternalError (const std::string &message, bool changed)
virtual void printDebugState (std::stringstream &str)

Protected Types

typedef std::vector
< boost::shared_ptr
< FesaListener > > 
ListenerVector
 The vector of all listeners, which are listening at this peace of data.
typedef ListenerVector::iterator LstnrItr
typedef std::map< std::string,
boost::shared_ptr
< ListenerVector > > 
ListenerMap
typedef ListenerMap::iterator LstnrMapItr

Protected Attributes

AbstractDevicedevice_
Propertyproperty_
rdaData filter_
bool useFastUpdate_
ListenerMap listeners_

Detailed Description

Definition at line 29 of file SubscriptionFilter.h.


Member Typedef Documentation

typedef std::map<std::string, boost::shared_ptr<ListenerVector> > fesa::AbstractSubscriptionFilter::ListenerMap [protected]

Definition at line 101 of file SubscriptionFilter.h.

typedef std::vector<boost::shared_ptr<FesaListener> > fesa::AbstractSubscriptionFilter::ListenerVector [protected]

The vector of all listeners, which are listening at this peace of data.

Definition at line 98 of file SubscriptionFilter.h.

typedef ListenerVector::iterator fesa::AbstractSubscriptionFilter::LstnrItr [protected]

Definition at line 99 of file SubscriptionFilter.h.

typedef ListenerMap::iterator fesa::AbstractSubscriptionFilter::LstnrMapItr [protected]

Definition at line 102 of file SubscriptionFilter.h.


Constructor & Destructor Documentation

fesa::AbstractSubscriptionFilter::AbstractSubscriptionFilter ( AbstractDevice device,
Property property,
const rdaData &  newFilter,
bool  useFastUpdate 
)

Definition at line 31 of file SubscriptionFilter.cpp.

fesa::AbstractSubscriptionFilter::~AbstractSubscriptionFilter (  )  [virtual]

Definition at line 39 of file SubscriptionFilter.cpp.


Member Function Documentation

void fesa::AbstractSubscriptionFilter::addSubscriber ( const std::string &  cycleSelector,
rdaValueChangeListener *  subscriber 
) [virtual]

Reimplemented in fesa::SubscriptionFilter.

Definition at line 43 of file SubscriptionFilter.cpp.

References listeners_.

void fesa::AbstractSubscriptionFilter::allCyclesFirstUpdate ( const rdaData &  newFilter,
rdaValueChangeListener *  l 
)

If a subscriber subscribes to a multiplexed Setting Property using an empty cycleSelector, we have to return a value for each cycle.

Parameters:
device device on which the client subscribed
prop property on which the client subscribed
filter the filter specified by the client
listener the callback method of the client

Definition at line 144 of file SubscriptionFilter.cpp.

References cycleFirstUpdate(), device_, fesa::ConfigFieldString::get(), fesa::SynchronizationFactory::getCycleDescriptor(), fesa::CycleDescriptor::getCycleIdsCol(), fesa::CycleDescriptor::getCycleSelectorName(), fesa::SynchronizationLabObjectFactory::getInstance(), fesa::AbstractDevice::mainMuxCriterion, and fesa::AbstractDevice::timingDomain.

void fesa::AbstractSubscriptionFilter::cancelInternalError ( const std::string &  message,
bool  changed 
)
void fesa::AbstractSubscriptionFilter::cycleFirstUpdate ( const std::string &  cycleSelector,
const rdaData &  newFilter,
rdaValueChangeListener *  l 
)

return a first update value for the corresponding cycle

Parameters:
device device on which the client subscribed
prop property on which the client subscribed
filter the filter specified by the client
cycleSelector identifies the cycle of interest
listener the callback method of the client

Definition at line 114 of file SubscriptionFilter.cpp.

References device_, fesa::Property::get(), fesa::FesaException::getErrorCodeAsLong(), fesa::FesaException::getMessage(), property_, and fesa::SUBSCRIBE.

Referenced by allCyclesFirstUpdate().

bool fesa::AbstractSubscriptionFilter::matchFilter ( const rdaData &  filter  ) 

Definition at line 92 of file SubscriptionFilter.cpp.

References filter_.

virtual void fesa::AbstractSubscriptionFilter::notify ( MultiplexingContext muxContext,
RequestType reqType,
std::vector< std::string > &  validCS 
) [pure virtual]

Implemented in fesa::SubscriptionFilter.

void fesa::AbstractSubscriptionFilter::printDebugState ( std::stringstream &  str  )  [virtual]

Definition at line 195 of file SubscriptionFilter.cpp.

References filter_, and listeners_.

bool fesa::AbstractSubscriptionFilter::removeSubscriber ( const std::string &  cycleSelector,
rdaValueChangeListener *  subscriber,
bool &  isEmpty,
bool &  toBeDeleted 
) [virtual]

Reimplemented in fesa::SubscriptionFilter.

Definition at line 62 of file SubscriptionFilter.cpp.

References listeners_.

void fesa::AbstractSubscriptionFilter::reportInternalError ( const std::string &  category,
int32_t  errorCode,
const std::string &  message,
bool  changed 
)

Definition at line 164 of file SubscriptionFilter.cpp.

References listeners_.


Member Data Documentation

Definition at line 74 of file SubscriptionFilter.h.

Referenced by cycleFirstUpdate(), and fesa::SubscriptionFilter::doUpdate().

Definition at line 78 of file SubscriptionFilter.h.

Referenced by fesa::SubscriptionFilter::doUpdate().


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

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1