UA Server SDK C++ Bundle
1.4.1.271
|
#include <uaeventdata.h>
Inherits UaEventData.
Inherited by OpcUa::BaseEventType, OpcUa::BaseModelChangeEventTypeData, OpcUa::ConditionTypeData, and OpcUa::SystemEventTypeData.
Public Member Functions | |
BaseEventTypeData () | |
Constructs a BaseEventTypeData object. | |
virtual | ~BaseEventTypeData () |
Destroys the BaseEventTypeData object. | |
virtual void | getFieldData (OpcUa_UInt32 index, Session *pSession, OpcUa_Variant &data) |
Get the field value for the passed index. More... | |
virtual void | prepareNewEvent (const UaDateTime &time, const UaDateTime &receiveTime, const UaByteString &userEventId) |
Send event with current event field data to the subscribed clients After setting the changed states of the event this method is used to trigger the event notification that contains the snapshot of the new state of the condition. More... | |
virtual void | setSource (const UaNode *pNode) |
Set the SourceNode and SoruceName 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. | |
virtual ReferenceCounter * | getConditionDataReferenceCounter () |
Get the ReferenceCounter interface necessary for condition event data classes. | |
Static Public Member Functions | |
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. | |
Public Attributes | |
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. | |
Derived from UaEventData. It is not possible to create plane copies of this Class.
|
virtual |
Get the field value for the passed index.
index | The index of the selected field. |
pSession | The session context for the field access |
data | The data for the selected field. |
Implements UaEventData.
Reimplemented in OpcUa::ConditionTypeBase, OpcUa::AlarmConditionTypeBase, OpcUa::DialogConditionTypeBase, OpcUa::NonExclusiveLimitAlarmTypeBase, OpcUa::ExclusiveLimitAlarmTypeBase, OpcUa::AcknowledgeableConditionTypeBase, OpcUa::LimitAlarmTypeBase, OpcUa::OffNormalAlarmTypeBase, OpcUa::ExclusiveDeviationAlarmType, OpcUa::NonExclusiveDeviationAlarmType, OpcUa::DiscreteAlarmTypeBase, OpcUa::ExclusiveLevelAlarmType, OpcUa::ExclusiveRateOfChangeAlarmType, OpcUa::NonExclusiveLevelAlarmType, OpcUa::NonExclusiveRateOfChangeAlarmType, OpcUa::SystemOffNormalAlarmType, OpcUa::TripAlarmType, OpcUa::ConditionTypeData, OpcUa::GeneralModelChangeEventTypeData, OpcUa::DeviceFailureEventTypeData, OpcUa::AlarmConditionTypeData, OpcUa::ExclusiveLimitAlarmTypeData, OpcUa::DialogConditionTypeData, OpcUa::AcknowledgeableConditionTypeData, OpcUa::LimitAlarmTypeData, OpcUa::NonExclusiveLimitAlarmTypeData, OpcUa::OffNormalAlarmTypeData, OpcUa::DiscreteAlarmTypeData, OpcUa::ExclusiveDeviationAlarmTypeData, OpcUa::NonExclusiveDeviationAlarmTypeData, OpcUa::ExclusiveLevelAlarmTypeData, OpcUa::ExclusiveRateOfChangeAlarmTypeData, OpcUa::NonExclusiveLevelAlarmTypeData, OpcUa::NonExclusiveRateOfChangeAlarmTypeData, OpcUa::SystemOffNormalAlarmTypeData, OpcUa::TripAlarmTypeData, OpcUa::BaseModelChangeEventTypeData, and OpcUa::SystemEventTypeData.
|
virtual |
Get the LocalTime event field.
LocalTime is a structure containing the Offset and the DaylightSavingInOffset flag. The Offset specifies the time difference (in minutes) between the Time Property and the time at the location in which the event was issued. If DaylightSavingInOffset is TRUE, then Standard/Daylight savings time (DST) at the originating location is in effect and Offset includes the DST correction. If FALSE then the Offset does not include DST correction and DST may or may not have been in effect.
|
virtual |
Get the Message event field.
Message provides a human-readable and localizable text description of the Event. The Server may return any appropriate text to describe the Event. A null string is not a valid value; if the Server does not have a description, it shall return the string part of the BrowseName of the Node associated with the Event.
Get the message field value.
This method can be overwritten by a derived class to provide a language specific message text.
pSession | The session context for the field access |
data | The data for the message field. |
|
virtual |
Get the ReceiveTime event field.
ReceiveTime provides the time the OPC UA Server received the Event from the underlying device of another Server. ReceiveTime is analogous to ServerTimestamp defined in DataValue, i.e. in the case where the OPC UA Server gets an Event from another OPC UA Server, each Server applies its own ReceiveTime. That implies that a Client may get the same Event, having the same EventId, from different Servers having different values of the ReceiveTime. The ReceiveTime shall always be returned as value and the Server is not allowed to return a StatusCode for the ReceiveTime indicating an error.
|
virtual |
Get the Severity event field.
Severity is an indication of the urgency of the Event. This is also commonly called “priority”. Values will range from 1 to 1 000, with 1 being the lowest severity and 1 000 being the highest. Typically, a severity of 1 would indicate an Event which is informational in nature, while a value of 1 000 would indicate an Event of catastrophic nature, which could potentially result in severe financial loss or loss of life.
|
virtual |
Get the SourceName event field.
SourceName provides a description of the source of the Event. This could be the DisplayName of the Event source, if the Event is specific to a Node, or some server-specific notation.
|
virtual |
Get the SourceNode event field.
SourceNode identifies the Node that the Event originated from. If the Event is not specific to a Node the NodeId is set to null. Some subtypes of this BaseEventType may define additional rules for SourceNode.
|
virtual |
Get the Time event field.
Time provides the time the Event occurred. This value is set as close to the event generator as possible. It often comes from the underlying system or device. Once set, intermediate OPC UA Servers shall not alter the value.
|
virtual |
Send event with current event field data to the subscribed clients After setting the changed states of the event this method is used to trigger the event notification that contains the snapshot of the new state of the condition.
[in] | time | Time provides the time the Event occurred. This value is set as close to the event generator as possible. It often comes from the underlying system or device. |
[in] | receiveTime | ReceiveTime provides the time the OPC UA Server received the Event from the underlying device or another Server. |
[in] | userEventId | The server is responsible for generating a unique EventId for every event sent to the client. The SDK uses this parameter userEventId as part of the EventId but adds a unique part. The EventId is provided by the client in calls back to the server like in an alarm acknowledgment. The user specific part can be extracted from the EventId provided by the client by using EventManagerBase::getUserEventId() |
|
virtual |
Set the LocalTime event field.
LocalTime is a structure containing the Offset and the DaylightSavingInOffset flag. The Offset specifies the time difference (in minutes) between the Time Property and the time at the location in which the event was issued. If DaylightSavingInOffset is TRUE, then Standard/Daylight savings time (DST) at the originating location is in effect and Offset includes the DST correction. If FALSE then the Offset does not include DST correction and DST may or may not have been in effect.
|
virtual |
Set the Message event field.
Message provides a human-readable and localizable text description of the Event. The Server may return any appropriate text to describe the Event. A null string is not a valid value; if the Server does not have a description, it shall return the string part of the BrowseName of the Node associated with the Event.
|
virtual |
Set the ReceiveTime event field.
ReceiveTime provides the time the OPC UA Server received the Event from the underlying device of another Server. ReceiveTime is analogous to ServerTimestamp defined in DataValue, i.e. in the case where the OPC UA Server gets an Event from another OPC UA Server, each Server applies its own ReceiveTime. That implies that a Client may get the same Event, having the same EventId, from different Servers having different values of the ReceiveTime. The ReceiveTime shall always be returned as value and the Server is not allowed to return a StatusCode for the ReceiveTime indicating an error.
|
virtual |
Set the Severity event field.
Severity is an indication of the urgency of the Event. This is also commonly called “priority”. Values will range from 1 to 1 000, with 1 being the lowest severity and 1 000 being the highest. Typically, a severity of 1 would indicate an Event which is informational in nature, while a value of 1 000 would indicate an Event of catastrophic nature, which could potentially result in severe financial loss or loss of life.
|
virtual |
Set the SourceName event field.
SourceName provides a description of the source of the Event. This could be the DisplayName of the Event source, if the Event is specific to a Node, or some server-specific notation.
|
virtual |
Set the SourceNode event field.
SourceNode identifies the Node that the Event originated from. If the Event is not specific to a Node the NodeId is set to null. Some subtypes of this BaseEventType may define additional rules for SourceNode.
|
virtual |
Set the Time event field.
Time provides the time the Event occurred. This value is set as close to the event generator as possible. It often comes from the underlying system or device. Once set, intermediate OPC UA Servers shall not alter the value.