fesa-core  4.3.1
fesa::OnSubscriptionRTEventPayload Class Reference

Payload carried by a RTEvent triggered by a OnSubscriptionEventSource. More...

#include <OnSubscriptionRTEventPayload.h>

Inheritance diagram for fesa::OnSubscriptionRTEventPayload:
fesa::RTEventPayload

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 PropertyDatagetData () 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. More...
 
virtual ~RTEventPayload ()
 Destructor.
 
template<typename T >
const T * getValue () const
 returns the payload of the event More...
 
const char * getValue (std::size_t &size) const
 returns the value of the payload More...
 

Additional Inherited Members

- Protected Member Functions inherited from fesa::RTEventPayload
void setValue (const char *payload, std::size_t size)
 Sets or resets the payload. More...
 

Detailed Description

Payload carried by a RTEvent triggered by a OnSubscriptionEventSource.

Member Function Documentation

template<typename T >
std::auto_ptr<const T> fesa::OnSubscriptionRTEventPayload::get ( ) const
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();

Returns
an auto pointer to a const T.
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.


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