fesa-core  7.0.0
fesa::NotificationID Class Reference

This class provides an unique notification identifier. The ID is generated from the className, the devices specified by the selection criterion, and the properties that will be notified. More...

#include <NotificationID.h>

Public Member Functions

 NotificationID (uint32_t idKey, const std::set< std::string > &deviceCol, const std::set< std::string > &notifiedPropertyCol, const std::string &globalDeviceName=std::string(), const std::set< std::string > &notifiedGlobalProperties=std::set< std::string >())
 Constructor. More...
 
 ~NotificationID ()
 
const std::set< std::string > & getNotifiedPropertyCol () const
 returns the set of properties corresponding to this notification ID More...
 
const std::set< std::string > & getNotifiedGlobalProperties () const
 returns the set of global properties corresponding to this notification ID More...
 
const std::set< std::string > & getDeviceCol () const
 returns the set of devices corresponding to this NotificationID More...
 
bool hasGlobalDeviceNotification () const
 returns true if the global device is part of this NotificationID.
 
const std::string & getGlobalDeviceName () const
 returns the name of the global device of this NotificationID, or empty string if the global device is not part of this notification.
 
uint32_t getIDKey () const
 returns the unique ID key, which identifies the notification ID and is the same for the server and the real-time side More...
 
bool contains (const std::string &propName, const std::string &deviceName) const
 This method checks whether the notification ID contains the given combination of property and device. More...
 
void addDevice (const std::string &deviceName)
 Adds a new device name to be notified. More...
 
void addProperty (const std::string &propertyName)
 This method adds a new class/property combination to be notified. More...
 
bool matches (const std::set< std::string > &notifiedProperties, const std::set< std::string > &deviceNames, const std::set< std::string > &notifiedGlobalProperties, const std::string &globalDeviceName) const
 Compares the content of this object to the given parameters. Returns true if they match.
 

Detailed Description

This class provides an unique notification identifier. The ID is generated from the className, the devices specified by the selection criterion, and the properties that will be notified.

Constructor & Destructor Documentation

fesa::NotificationID::NotificationID ( uint32_t  idKey,
const std::set< std::string > &  deviceCol,
const std::set< std::string > &  notifiedPropertyCol,
const std::string &  globalDeviceName = std::string(),
const std::set< std::string > &  notifiedGlobalProperties = std::set<std::string>() 
)

Constructor.

Parameters
idKeythe identifier of the notification
deviceColnames of the devices that will be notified
notifiedPropertyColnames of the properties that will be notified
globalDeviceNamename of the global device that will be notified; leave empty if there is no global device notification
notifiedGlobalPropertiesnames of the global properties that will be notified
fesa::NotificationID::~NotificationID ( )

Destructor

Member Function Documentation

void fesa::NotificationID::addDevice ( const std::string &  deviceName)
inline

Adds a new device name to be notified.

Parameters
deviceNamethe name of the device
void fesa::NotificationID::addProperty ( const std::string &  propertyName)
inline

This method adds a new class/property combination to be notified.

Parameters
classNamethe name of the class to be notified
propertyNamethe name of the property to be notified
bool fesa::NotificationID::contains ( const std::string &  propName,
const std::string &  deviceName 
) const

This method checks whether the notification ID contains the given combination of property and device.

Parameters
propNamethe name of the property
deviceNamethe name of the device
Returns
true if the pair is contained, otherwise false
const std::set< std::string > & fesa::NotificationID::getDeviceCol ( ) const
inline

returns the set of devices corresponding to this NotificationID

Returns
const ref to the device collection
uint32_t fesa::NotificationID::getIDKey ( ) const
inline

returns the unique ID key, which identifies the notification ID and is the same for the server and the real-time side

Returns
the key
const std::set< std::string > & fesa::NotificationID::getNotifiedGlobalProperties ( ) const

returns the set of global properties corresponding to this notification ID

Returns
const ref to the global property collection
const std::set< std::string > & fesa::NotificationID::getNotifiedPropertyCol ( ) const
inline

returns the set of properties corresponding to this notification ID

Returns
const ref to the property collection

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