fesa-core
7.0.0
|
Payload carried by a RTEvent triggered by a OnSubscriptionEventSource. More...
#include <OnSubscriptionRTEventPayload.h>
Public Member Functions | |
const std::string & | getDeviceName () const |
Retrieve the device name which produced the notification. | |
const std::string & | getPropertyName () const |
Retrieve the property name which produced the notification. | |
const std::string & | getCycleSelectorName () const |
Retrieve the cycle name when the notification occurred. | |
bool | isFirstUpdate () const |
bool | isImmediateUpdate () const |
bool | isNormalUpdate () const |
const PropertyData & | getData () const |
Returns the data which was retrieved with the value-update of the subscription. | |
template<typename T > | |
std::auto_ptr< const T > | get () const |
Public Member Functions inherited from fesa::RTEventPayload | |
RTEventPayload () | |
RTEventPayload (const char *payload, std::size_t size) | |
RTEventPayload (const std::string &payload) | |
RTEventPayload (const RTEventPayload &payload) | |
Copy constructor needed due to the heap allocation of the payload. More... | |
virtual | ~RTEventPayload () |
template<typename T > | |
const T * | getValue () const |
const char * | getValue (std::size_t &size) const |
Additional Inherited Members | |
Protected Member Functions inherited from fesa::RTEventPayload | |
void | setValue (const char *payload, std::size_t size) |
Payload carried by a RTEvent triggered by a OnSubscriptionEventSource.
|
inline |
Instantiates a T by calling T(cmw::data::Data&) with the data of this payload. Typically used to get an object derived from PropertyData to access its data with generated methods. Example: Instead of calling: event->getData()->getInt32("MyIntValueItem"); One can call: event->get<MyTypePropertyData>()->getMyIntValueItem();
bool fesa::OnSubscriptionRTEventPayload::isFirstUpdate | ( | ) | const |
Returns true if this notification is a first update. A first update is a notification made immediately after a subscription request, to provide initial values of a property.
bool fesa::OnSubscriptionRTEventPayload::isImmediateUpdate | ( | ) | const |
Returns true if this notification is an immediate update. An immediate update is a notification subsequent to a SET made on a setting property.
bool fesa::OnSubscriptionRTEventPayload::isNormalUpdate | ( | ) | const |
Returns true if this notification is a normal update. A normal update is a notification on an acquisition property.