C++ Based OPC UA Client/Server/PubSub SDK
1.7.8.584
|
Event data class for the OPC UA event type ProgressEventType. More...
#include <opcua_basemodelchangeeventtypedata.h>
Inherits BaseEventTypeData.
Public Member Functions | |
ProgressEventTypeData () | |
Constructs an instance of the event data class ProgressEventTypeData. | |
virtual | ~ProgressEventTypeData () |
Destroys the ProgressEventTypeData object. | |
virtual void | getFieldData (OpcUa_UInt32 index, Session *pSession, OpcUa_Variant &data) |
Get the field value for the passed index. More... | |
void | setContext (const UaVariant &Context) |
Set the event field value Context. More... | |
void | setContextStatus (OpcUa_StatusCode status) |
Set a status code for the event field value Context. More... | |
UaVariant | getContext () |
Get the event field value Context. More... | |
virtual void | getContextValue (Session *pSession, OpcUa_Variant &value) |
Get the event field value Context for delivering the event data. More... | |
void | setProgress (OpcUa_UInt16 Progress) |
Set the event field value Progress. More... | |
void | setProgressStatus (OpcUa_StatusCode status) |
Set a status code for the event field value Progress. More... | |
OpcUa_UInt16 | getProgress () |
Get the event field value Progress. More... | |
virtual void | getProgressValue (Session *pSession, OpcUa_Variant &value) |
Get the event field value Progress for delivering the event data. More... | |
Public Member Functions inherited from BaseEventTypeData | |
BaseEventTypeData () | |
Constructs a BaseEventTypeData object. | |
virtual | ~BaseEventTypeData () |
Destroys the BaseEventTypeData object. | |
virtual void | prepareNewEvent (const UaDateTime &time, const UaDateTime &receiveTime, const UaByteString &userEventId) |
Initializes the event data fields EventId, Time and ReceiveTime with valid values for the next event. More... | |
virtual UaByteString | getEventId () const |
Get the EventId event field. More... | |
virtual UaNodeId | getEventTypeId () const |
Get the EventType event field. More... | |
virtual void | setSource (const UaNode *pNode) |
Set the SourceNode and SourceName by passing in a node pointer for the source node. | |
virtual void | setSourceNode (const UaNodeId &sourceNode) |
Set the SourceNode event field. More... | |
virtual UaNodeId | getSourceNode () const |
Get the SourceNode event field. More... | |
virtual void | setSourceName (const UaString &sourceName) |
Set the SourceName event field. More... | |
virtual UaString | getSourceName () const |
Get the SourceName event field. More... | |
virtual void | setTime (const UaDateTime &time) |
Set the Time event field. More... | |
virtual UaDateTime | getTime () const |
Get the Time event field. More... | |
virtual void | setReceiveTime (const UaDateTime &receiveTime) |
Set the ReceiveTime event field. More... | |
virtual UaDateTime | getReceiveTime () const |
Get the ReceiveTime event field. More... | |
virtual void | setMessage (const UaLocalizedText &message) |
Set the Message event field. More... | |
virtual UaLocalizedText | getMessage () const |
Get the Message event field. More... | |
virtual void | getMessageValue (Session *pSession, UaVariant &data) |
Get the message field value. More... | |
virtual void | setSeverity (OpcUa_UInt16 severity) |
Set the Severity event field. More... | |
virtual OpcUa_UInt16 | getSeverity () const |
Get the Severity event field. More... | |
virtual void | setLocalTime (const UaTimeZoneDataType &localTime) |
Set the LocalTime event field. More... | |
virtual UaTimeZoneDataType | getLocalTime () const |
Get the LocalTime event field. More... | |
Public Member Functions inherited from UaEventData | |
UaEventData () | |
construction | |
virtual | ~UaEventData () |
destruction | |
virtual UaNodeId | getConditionNodeId () |
Returns the condition NodeId if the event data is related to a condition object. More... | |
virtual UaNodeId | getConditionBranchNodeId () |
Returns the condition branch NodeId if the event data is related to a condition object. More... | |
virtual OpcUa_Boolean | getConditionRetain () |
Returns the Retain flag if the event data is related to a condition object. More... | |
virtual void | lockEventData () |
Lock the event data for data update and event handling. More... | |
virtual void | unlockEventData () |
Unlock the event data after data update or event handling. More... | |
void | setEventUserData (OpcUa_Handle pEventUserData) |
Sets the user specific event data to the EventData object. More... | |
OpcUa_Handle | getEventUserData () const |
Returns the user specific event data. | |
const NodeAccessInfo * | getEventAccessInfo () const |
Returns the access info associated with this UaEventData. More... | |
void | useEventAccessInfoFrom (const UaEventData *pOther) |
Set the access info from another node to this node. More... | |
void | setEventAccessInfo (NodeAccessInfo *pAccessInfo) |
Set access info for this UaEventData. More... | |
void | attachEventAccessInfo (NodeAccessInfo *pAccessInfo) |
Set access info for this UaEventData. More... | |
virtual ReferenceCounter * | getConditionDataReferenceCounter () |
Get the ReferenceCounter interface necessary for condition event data classes. | |
Static Public Member Functions | |
static void | createTypes () |
Create the type nodes for the event type ProgressEventType. | |
static void | clearStaticMembers () |
Clear the static members of the class. | |
static void | registerEventFields () |
Registers all event type fields with the EventManagerBase. | |
Static Public Member Functions inherited from BaseEventTypeData | |
static void | registerEventFields () |
Registers all event type fields with the EventManagerBase. | |
Static Public Member Functions inherited from UaEventData | |
static void | registerEventFields () |
Registers all event type fields with the EventManagerBase. | |
Additional Inherited Members | |
Public Attributes inherited from BaseEventTypeData | |
UaVariant | m_EventId |
Field 01 - EventId. | |
UaNodeId | m_EventTypeId |
Field 02 - EventType. | |
UaVariant | m_SourceNode |
Field 03 - SourceNode. | |
UaVariant | m_SourceName |
Field 04 - SourceName. | |
UaVariant | m_Time |
Field 05 - Time. | |
UaVariant | m_ReceiveTime |
Field 06 - ReceiveTime. | |
UaVariant | m_LocalTime |
Field 07 - LocalTime. | |
UaVariant | m_Message |
Field 08 - Message. | |
UaVariant | m_Severity |
Field 09 - Severity. | |
Event data class for the OPC UA event type ProgressEventType.
This class provides the functionality necessary to create an event of type ProgressEventType, to set the values of the event fields and to send the event to interested clients through EventManagerBase::fireEvent().
Event Fields of the ProgressEventType:
Browse Name | DataType | TypeDefinition | Modelling Rule | See Also |
---|---|---|---|---|
Context | BaseDataType | PropertyType | Mandatory | getContext, setContext |
Progress | UInt16 | PropertyType | Mandatory | getProgress, setProgress |
Generated to identify the progress of an operation.
An operation can be a Service call or something application specific like a program execution. This EventType inherits all Properties of the BaseEventType. The SourceNode for Events of this type shall be assigned to the NodeId of the Session object where the operation was initiated. The SourceName for Events of this type shall be “Service/[Service Name as defined in Part 4 of the OPC UA Specification]” when the progress of a Service call is exposed.
It is recommended that Servers only expose ProgressEvents for Service calls to the Session that invoked the Service.
See also ProgressEventType for a documentation of the complete Information Model.
UaVariant OpcUa::ProgressEventTypeData::getContext | ( | ) |
Get the event field value Context.
Contains context information about what operation progress is reported.
In the case of Service calls it shall be a UInt32 containing the requestHandle of the RequestHeader of the Service call.
|
virtual |
Get the event field value Context for delivering the event data.
This method can be overwritten in a derived class to return a client session specific value like a localized text matching the LocaleId requested by the client
Contains context information about what operation progress is reported.
In the case of Service calls it shall be a UInt32 containing the requestHandle of the RequestHeader of the Service call.
|
virtual |
Get the field value for the passed index.
index | The index of the selected field. |
pSession | The session context for the method call. |
data | The data for the selected field. |
Reimplemented from BaseEventTypeData.
OpcUa_UInt16 OpcUa::ProgressEventTypeData::getProgress | ( | ) |
Get the event field value Progress.
Contains the percentage completed of the progress.
The value shall be between 0 and 100, where 100 identifies that the operation has been finished.
|
virtual |
Get the event field value Progress for delivering the event data.
This method can be overwritten in a derived class to return a client session specific value like a localized text matching the LocaleId requested by the client
Contains the percentage completed of the progress.
The value shall be between 0 and 100, where 100 identifies that the operation has been finished.
void OpcUa::ProgressEventTypeData::setContext | ( | const UaVariant & | Context | ) |
Set the event field value Context.
Contains context information about what operation progress is reported.
In the case of Service calls it shall be a UInt32 containing the requestHandle of the RequestHeader of the Service call.
void OpcUa::ProgressEventTypeData::setContextStatus | ( | OpcUa_StatusCode | status | ) |
Set a status code for the event field value Context.
If an event field is not available, a StatusCode must be provided instead of the value to indicate the error situation.
void OpcUa::ProgressEventTypeData::setProgress | ( | OpcUa_UInt16 | Progress | ) |
Set the event field value Progress.
Contains the percentage completed of the progress.
The value shall be between 0 and 100, where 100 identifies that the operation has been finished.
void OpcUa::ProgressEventTypeData::setProgressStatus | ( | OpcUa_StatusCode | status | ) |
Set a status code for the event field value Progress.
If an event field is not available, a StatusCode must be provided instead of the value to indicate the error situation.