C++ Based OPC UA Client/Server SDK  1.5.5.355
OpcUa::ConditionTypeBase Class Referenceabstract

Generated base class for a ConditionType. More...

#include <opcua_conditiontypebase.h>

Inherits OpcUa::BaseEventType.

Inherited by OpcUa::ConditionType.

Public Member Functions

 ConditionTypeBase (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, const UaNodeId &sourceNode, const UaString &sourceName, UaMutexRefCounted *pSharedMutex=NULL)
 Constructs an instance of the ConditionType condition type using an instance declaration node as base.
 
 ConditionTypeBase (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, const UaNodeId &sourceNode, const UaString &sourceName, UaMutexRefCounted *pSharedMutex=NULL)
 Constructs an instance of the ConditionType condition type.
 
 ConditionTypeBase (UaBase::Object *pBaseNode, XmlUaNodeFactoryManager *pFactory, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Constructs an instance of the class ConditionTypeBase with all components. More...
 
virtual UaNodeId typeDefinitionId () const
 Returns the type definition NodeId for the ConditionType.
 
virtual void getFieldData (OpcUa_UInt32 index, Session *pSession, OpcUa_Variant &data)
 Get the field value for the passed index. More...
 
void clearFieldData ()
 Clears the event field data after event processing.
 
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...
 
virtual UaStatus beginCall (MethodManagerCallback *pCallback, const ServiceContext &serviceContext, OpcUa_UInt32 callbackHandle, MethodHandle *pMethodHandle, const UaVariantArray &inputArguments)
 Call method of an UA object. More...
 
virtual UaStatus call (const ServiceContext &serviceContext, MethodHandle *pMethodHandle, const UaVariantArray &inputArguments, UaVariantArray &outputArguments, UaStatusCodeArray &inputArgumentResults, UaDiagnosticInfos &inputArgumentDiag)
 Synchronous version of the MethodManager method call executed in a worker thread.
 
virtual UaStatus AddComment (const ServiceContext &serviceContext, UaByteString &EventId, const UaLocalizedText &Comment)=0
 Applies a comment to a specific state of a Condition instance. More...
 
virtual UaStatus Disable (const ServiceContext &serviceContext)=0
 Changes a Condition instance to the Disabled state. More...
 
virtual UaStatus Enable (const ServiceContext &serviceContext)=0
 Changes a Condition instance to the enabled state. More...
 
virtual void setBranchId (const UaNodeId &BranchId)
 Sets the BranchId value. More...
 
virtual UaNodeId getBranchId () const
 Returns the value of BranchId. More...
 
virtual void setBranchIdStatus (OpcUa_StatusCode status)
 Set a status code for the event field BranchId. More...
 
virtual void getBranchIdValue (Session *pSession, UaVariant &value)
 Sets the value of BranchId to argument value. More...
 
virtual void setClientUserId (const UaString &ClientUserId)
 Sets the ClientUserId value. More...
 
virtual UaString getClientUserId () const
 Returns the value of ClientUserId. More...
 
virtual void setClientUserIdStatus (OpcUa_StatusCode status)
 Set a status code for the event field ClientUserId. More...
 
virtual void getClientUserIdValue (Session *pSession, UaVariant &value)
 Sets the value of ClientUserId to argument value. More...
 
virtual void setComment (const UaLocalizedText &Comment)
 Sets the Comment value. More...
 
virtual UaLocalizedText getComment (Session *pSession) const
 Returns the value of Comment. More...
 
virtual void setCommentStatus (OpcUa_StatusCode status)
 Set a status code for the event field Comment. More...
 
virtual void getCommentValue (Session *pSession, UaVariant &value)
 Sets the value of Comment to argument value. More...
 
virtual void setConditionClassId (const UaNodeId &ConditionClassId)
 Sets the ConditionClassId value. More...
 
virtual UaNodeId getConditionClassId () const
 Returns the value of ConditionClassId. More...
 
virtual void setConditionClassIdStatus (OpcUa_StatusCode status)
 Set a status code for the event field ConditionClassId. More...
 
virtual void getConditionClassIdValue (Session *pSession, UaVariant &value)
 Sets the value of ConditionClassId to argument value. More...
 
virtual void setConditionClassName (const UaLocalizedText &ConditionClassName)
 Sets the ConditionClassName value. More...
 
virtual UaLocalizedText getConditionClassName (Session *pSession) const
 Returns the value of ConditionClassName. More...
 
virtual void setConditionClassNameStatus (OpcUa_StatusCode status)
 Set a status code for the event field ConditionClassName. More...
 
virtual void getConditionClassNameValue (Session *pSession, UaVariant &value)
 Sets the value of ConditionClassName to argument value. More...
 
virtual void setConditionName (const UaString &ConditionName)
 Sets the ConditionName value. More...
 
virtual UaString getConditionName () const
 Returns the value of ConditionName. More...
 
virtual void setConditionNameStatus (OpcUa_StatusCode status)
 Set a status code for the event field ConditionName. More...
 
virtual void getConditionNameValue (Session *pSession, UaVariant &value)
 Sets the value of ConditionName to argument value. More...
 
virtual void setEnabledState (OpcUa_Boolean enabledState)
 Sets the EnabledState. More...
 
virtual OpcUa_Boolean getEnabledStateBool ()
 Returns the boolean value of the EnabledState. More...
 
virtual UaLocalizedText getEnabledState ()
 Returns the LocalizedText representation of the EnabledState. More...
 
virtual void setEnabledStateStatus (OpcUa_StatusCode status)
 Set a status code for the event field EnabledState. More...
 
virtual void getEnabledStateValue (Session *pSession, UaVariant &value)
 Sets the value of EnabledState to argument value. More...
 
virtual void getEnabledState_EffectiveDisplayNameValue (Session *pSession, OpcUa_Variant &value)
 Sets the value of the EffectiveDisplayName property to value. More...
 
virtual void setLastSeverity (OpcUa_UInt16 LastSeverity)
 Sets the LastSeverity value. More...
 
virtual OpcUa_UInt16 getLastSeverity () const
 Returns the value of LastSeverity. More...
 
virtual void setLastSeverityStatus (OpcUa_StatusCode status)
 Set a status code for the event field LastSeverity. More...
 
virtual void getLastSeverityValue (Session *pSession, UaVariant &value)
 Sets the value of LastSeverity to argument value. More...
 
virtual void setQuality (OpcUa_StatusCode Quality)
 Sets the Quality value. More...
 
virtual OpcUa_StatusCode getQuality () const
 Returns the value of Quality. More...
 
virtual void setQualityStatus (OpcUa_StatusCode status)
 Set a status code for the event field Quality. More...
 
virtual void getQualityValue (Session *pSession, UaVariant &value)
 Sets the value of Quality to argument value. More...
 
virtual void setRetain (OpcUa_Boolean Retain)
 Sets the Retain value. More...
 
virtual OpcUa_Boolean getRetain () const
 Returns the value of Retain. More...
 
virtual void setRetainStatus (OpcUa_StatusCode status)
 Set a status code for the event field Retain. More...
 
virtual void getRetainValue (Session *pSession, UaVariant &value)
 Sets the value of Retain to argument value. More...
 
virtual OpcUa::PropertyTypegetBranchIdNode ()
 Returns the BranchId node. More...
 
virtual OpcUa::PropertyTypegetClientUserIdNode ()
 Returns the ClientUserId node. More...
 
virtual
OpcUa::ConditionVariableType
getCommentNode ()
 Returns the Comment node. More...
 
virtual OpcUa::PropertyTypegetConditionClassIdNode ()
 Returns the ConditionClassId node. More...
 
virtual OpcUa::PropertyTypegetConditionClassNameNode ()
 Returns the ConditionClassName node. More...
 
virtual OpcUa::PropertyTypegetConditionNameNode ()
 Returns the ConditionName node. More...
 
virtual
OpcUa::TwoStateVariableType
getEnabledStateNode ()
 Returns the EnabledState node. More...
 
virtual
OpcUa::ConditionVariableType
getLastSeverityNode ()
 Returns the LastSeverity node. More...
 
virtual
OpcUa::ConditionVariableType
getQualityNode ()
 Returns the Quality node. More...
 
virtual OpcUa::PropertyTypegetRetainNode ()
 Returns the Retain node. More...
 
virtual void useAccessInfoFromType ()
 Applies the NodeAccessInfo set at the ConditionTypeBase and its children. More...
 
void useAccessInfoFromInstance (ConditionTypeBase *pInstance)
 Uses the NodeAccessInfo of pOther and its children. More...
 
virtual UaStatus triggerEvent (const UaDateTime &time, const UaDateTime &receiveTime, const UaByteString &eventId)
 Send event with current event field data to the subscribed clients. More...
 
virtual void getConditionTypeOptionalFieldData (OpcUa_UInt32 index, Session *pSession, OpcUa_Variant &data)
 Get the field value for the passed index for optional fields of the ConditionType. More...
 

Static Public Member Functions

static void createTypes ()
 Create the related type nodes.
 
static void clearStaticMembers ()
 Clear the static members of the class.
 
static void registerEventFields ()
 Registers all event type fields with the EventManagerBase.
 
static OpcUa_UInt32 registerOptionalEventFields (const UaString &fieldName)
 Registers optional event fields with the EventManagerBase.
 

Protected Member Functions

virtual ~ConditionTypeBase ()
 Destroys the ConditionType object.
 

Detailed Description

Generated base class for a ConditionType.

This class contains the auto generated code for the object type ConditionType representing an OPC UA condition type. This class is used to create the condition type and to create and represent the condition object in the server address space. It provides also the UaEventData interface for the access to event data containing the current state of the condition for events sent to the client.

Variable members of the ConditionType:

Browse Name DataType TypeDefinition Modelling Rule See Also
BranchId NodeId PropertyType Mandatory getBranchId, setBranchId
ClientUserId String PropertyType Mandatory getClientUserId, setClientUserId
Comment LocalizedText ConditionVariableType Mandatory getComment, setComment
ConditionClassId NodeId PropertyType Mandatory getConditionClassId, setConditionClassId
ConditionClassName LocalizedText PropertyType Mandatory getConditionClassName, setConditionClassName
ConditionName String PropertyType Mandatory getConditionName, setConditionName
EnabledState LocalizedText TwoStateVariableType Mandatory getEnabledState, setEnabledState
LastSeverity UInt16 ConditionVariableType Mandatory getLastSeverity, setLastSeverity
Quality StatusCode ConditionVariableType Mandatory getQuality, setQuality
Retain Boolean PropertyType Mandatory getRetain, setRetain

The ConditionType defines all general characteristics of a Condition. All other ConditionTypes derive from it.

The FALSE state of the EnabledState shall not be extended with a substate machine. The ConditionType inherits all Properties of the BaseEventType.

SourceNode identifies the ConditionSource. If the ConditionSource is not a Node in the AddressSpace, the NodeId is set to null. The SourceNode is the Node which the condition is associated with, it may be the same as the InputNode for an alarm, but it may be a separate node. For example, a motor which is a variable with a value that is an RPM may be the ConditionSource for Conditions that are related to the motor, as well as a temperature sensor associated with the motor. In the former, the InputNode for the High RPM alarm is the value of the Motor RPM, while in the later the InputNode of the High Alarm would be the value of the temperature sensor that is associated with the motor.

Events are only generated for Conditions that have their Retain field set to true.

The NodeId of the Condition instance is used as ConditionId. It is not explicitly modelled as a component of the ConditionType. However, it can be requested with the following SimpleAttributeOperand in the SelectClause of the EventFilter:

Name Type Description
typeId NodeId NodeId of the ConditionType Node
browsePath[] QualifiedName empty
attributeId IntegerId Id of the NodeId Attribute

See also ConditionType for a documentation of the complete Information Model.

Constructor & Destructor Documentation

OpcUa::ConditionTypeBase::ConditionTypeBase ( UaBase::Object pBaseNode,
XmlUaNodeFactoryManager pFactory,
NodeManagerConfig pNodeConfig,
UaMutexRefCounted pSharedMutex = NULL 
)

Constructs an instance of the class ConditionTypeBase with all components.

Parameters
[in]pBaseNodeThe "tree" of nodes that specifies the attributes of the instance and its children.
[in]pFactoryThe factory to create the children.
[in]pNodeConfigInterface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space.
[in]pSharedMutexShared mutex object used to synchronize access to the variable. Can be NULL if no shared mutex is provided.

Member Function Documentation

virtual UaStatus OpcUa::ConditionTypeBase::AddComment ( const ServiceContext serviceContext,
UaByteString EventId,
const UaLocalizedText Comment 
)
pure virtual

Applies a comment to a specific state of a Condition instance.

Normally, the NodeId of the object instance as the ObjectId is passed to the Call Service. However, some Servers do not expose Condition instances in the AddressSpace. Therefore all Servers shall also allow Clients to call the AddComment method by specifying ConditionId as the ObjectId. The method cannot be called with an ObjectId of the ConditionType Node.

Method Result Codes

ResultCode Description
Bad_MethodInvalid The method id does not refer to a method for the specified object. The MethodId provided does not correspond to the ObjectId provided.
Bad_EventIdUnknown The specified EventId is not known to the Server.
Bad_NodeIdUnknown The node id refers to a node that does not exist in the server address space. Used to indicate that the specified Object is not valid or that the method was called on the ConditionType Node.
Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
[in]EventIdThe identifier for the event to comment.
[in]CommentThe comment to add to the condition.

Implemented in OpcUa::ConditionType.

UaStatus OpcUa::ConditionTypeBase::beginCall ( MethodManagerCallback pCallback,
const ServiceContext serviceContext,
OpcUa_UInt32  callbackHandle,
MethodHandle pMethodHandle,
const UaVariantArray inputArguments 
)
virtual

Call method of an UA object.

Implementation of the MethodManager interface method beginCall.

Reimplemented from OpcUa::BaseObjectType.

Reimplemented in OpcUa::AcknowledgeableConditionTypeBase, OpcUa::AlarmConditionTypeBase, and OpcUa::DialogConditionTypeBase.

virtual UaStatus OpcUa::ConditionTypeBase::Disable ( const ServiceContext serviceContext)
pure virtual

Changes a Condition instance to the Disabled state.

Normally, the NodeId of the object instance as the ObjectId is passed to the Call Service. However, some Servers do not expose Condition instances in the AddressSpace. Therefore all Servers shall allow Clients to call the Disable method by specifying ConditionId as the ObjectId. The method cannot be called with an ObjectId of the ConditionType node.

Method Result Codes

ResultCode Description
Bad_ConditionAlreadyDisabled The addressed Condition is already disabled.
Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.

Implemented in OpcUa::ConditionType.

virtual UaStatus OpcUa::ConditionTypeBase::Enable ( const ServiceContext serviceContext)
pure virtual

Changes a Condition instance to the enabled state.

Normally, the NodeId of the object instance as the ObjectId is passed to the Call Service. However, some Servers do not expose Condition instances in the AddressSpace. Therefore all Servers shall allow Clients to call the Enable method by specifying ConditionId as the ObjectId. The method cannot be called with an ObjectId of the ConditionType Node. If the condition instance is not exposed, it may be difficult for a Client to determine the ConditionId for a disabled condition.

Method Result Codes

ResultCode Description
Bad_ConditionAlreadyEnabled The addressed Condition is already enabled.
Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.

Implemented in OpcUa::ConditionType.

UaNodeId OpcUa::ConditionTypeBase::getBranchId ( ) const
virtual

Returns the value of BranchId.

BranchId is Null for all Event Notifications that relate to the current state of the Condition instance. If BranchId is not Null it identifies a previous state of this Condition instance that still needs attention by an Operator. If the current ConditionBranch is transformed into a previous ConditionBranch then the Server needs to assign a non-null BranchId. An initial Event for the branch will be generated with the values of the ConditionBranch and the new BranchId. The ConditionBranch can be updated many times before it is no longer needed. When the ConditionBranch no longer requires Operator input the final Event will have Retain set to FALSE. The retain bit on the current Event is TRUE, as long as any ConditionBranches require Operator input.The BranchId DataType is NodeId although the Server is not required to have ConditionBranches in the Address Space. The use of a NodeId allows the Server to use simple numeric identifiers, strings or arrays of bytes.

OpcUa::PropertyType * OpcUa::ConditionTypeBase::getBranchIdNode ( )
virtual

Returns the BranchId node.

BranchId is Null for all Event Notifications that relate to the current state of the Condition instance. If BranchId is not Null it identifies a previous state of this Condition instance that still needs attention by an Operator. If the current ConditionBranch is transformed into a previous ConditionBranch then the Server needs to assign a non-null BranchId. An initial Event for the branch will be generated with the values of the ConditionBranch and the new BranchId. The ConditionBranch can be updated many times before it is no longer needed. When the ConditionBranch no longer requires Operator input the final Event will have Retain set to FALSE. The retain bit on the current Event is TRUE, as long as any ConditionBranches require Operator input.The BranchId DataType is NodeId although the Server is not required to have ConditionBranches in the Address Space. The use of a NodeId allows the Server to use simple numeric identifiers, strings or arrays of bytes.

void OpcUa::ConditionTypeBase::getBranchIdValue ( Session pSession,
UaVariant value 
)
virtual

Sets the value of BranchId to argument value.

BranchId is Null for all Event Notifications that relate to the current state of the Condition instance. If BranchId is not Null it identifies a previous state of this Condition instance that still needs attention by an Operator. If the current ConditionBranch is transformed into a previous ConditionBranch then the Server needs to assign a non-null BranchId. An initial Event for the branch will be generated with the values of the ConditionBranch and the new BranchId. The ConditionBranch can be updated many times before it is no longer needed. When the ConditionBranch no longer requires Operator input the final Event will have Retain set to FALSE. The retain bit on the current Event is TRUE, as long as any ConditionBranches require Operator input.The BranchId DataType is NodeId although the Server is not required to have ConditionBranches in the Address Space. The use of a NodeId allows the Server to use simple numeric identifiers, strings or arrays of bytes.

UaString OpcUa::ConditionTypeBase::getClientUserId ( ) const
virtual

Returns the value of ClientUserId.

Is related to the Comment field and contains the identity of the user who inserted the most recent Comment.

The logic to obtain the ClientUserId is defined in Part 5 of the OPC UA Specification.

OpcUa::PropertyType * OpcUa::ConditionTypeBase::getClientUserIdNode ( )
virtual

Returns the ClientUserId node.

Is related to the Comment field and contains the identity of the user who inserted the most recent Comment.

The logic to obtain the ClientUserId is defined in Part 5 of the OPC UA Specification.

void OpcUa::ConditionTypeBase::getClientUserIdValue ( Session pSession,
UaVariant value 
)
virtual

Sets the value of ClientUserId to argument value.

Is related to the Comment field and contains the identity of the user who inserted the most recent Comment.

The logic to obtain the ClientUserId is defined in Part 5 of the OPC UA Specification.

UaLocalizedText OpcUa::ConditionTypeBase::getComment ( Session pSession) const
virtual

Returns the value of Comment.

Contains the last comment provided for a certain state (ConditionBranch).

It may have been provided by an AddComment method, some other method or in some other manner. The initial value of this Variable is null, unless it is provided in some other manner. If a method provides as an option the ability to set a Comment, then the value of this Variable is reset to null if an optional comment is not provided.

OpcUa::ConditionVariableType * OpcUa::ConditionTypeBase::getCommentNode ( )
virtual

Returns the Comment node.

Contains the last comment provided for a certain state (ConditionBranch).

It may have been provided by an AddComment method, some other method or in some other manner. The initial value of this Variable is null, unless it is provided in some other manner. If a method provides as an option the ability to set a Comment, then the value of this Variable is reset to null if an optional comment is not provided.

void OpcUa::ConditionTypeBase::getCommentValue ( Session pSession,
UaVariant value 
)
virtual

Sets the value of Comment to argument value.

Contains the last comment provided for a certain state (ConditionBranch).

It may have been provided by an AddComment method, some other method or in some other manner. The initial value of this Variable is null, unless it is provided in some other manner. If a method provides as an option the ability to set a Comment, then the value of this Variable is reset to null if an optional comment is not provided.

UaNodeId OpcUa::ConditionTypeBase::getConditionClassId ( ) const
virtual

Returns the value of ConditionClassId.

Specifies in which domain this Condition is used.

It is the NodeId of the corresponding ConditionClassType. When using this Property for filtering, Clients have to specify all individual ConditionClassType NodeIds. The OfType operator cannot be applied. BaseConditionClassType is used as class whenever a Condition cannot be assigned to a more concrete class.

OpcUa::PropertyType * OpcUa::ConditionTypeBase::getConditionClassIdNode ( )
virtual

Returns the ConditionClassId node.

Specifies in which domain this Condition is used.

It is the NodeId of the corresponding ConditionClassType. When using this Property for filtering, Clients have to specify all individual ConditionClassType NodeIds. The OfType operator cannot be applied. BaseConditionClassType is used as class whenever a Condition cannot be assigned to a more concrete class.

void OpcUa::ConditionTypeBase::getConditionClassIdValue ( Session pSession,
UaVariant value 
)
virtual

Sets the value of ConditionClassId to argument value.

Specifies in which domain this Condition is used.

It is the NodeId of the corresponding ConditionClassType. When using this Property for filtering, Clients have to specify all individual ConditionClassType NodeIds. The OfType operator cannot be applied. BaseConditionClassType is used as class whenever a Condition cannot be assigned to a more concrete class.

UaLocalizedText OpcUa::ConditionTypeBase::getConditionClassName ( Session pSession) const
virtual

Returns the value of ConditionClassName.

ConditionClassName provides the display name of the ConditionClassType.

OpcUa::PropertyType * OpcUa::ConditionTypeBase::getConditionClassNameNode ( )
virtual

Returns the ConditionClassName node.

ConditionClassName provides the display name of the ConditionClassType.

void OpcUa::ConditionTypeBase::getConditionClassNameValue ( Session pSession,
UaVariant value 
)
virtual

Sets the value of ConditionClassName to argument value.

ConditionClassName provides the display name of the ConditionClassType.

UaString OpcUa::ConditionTypeBase::getConditionName ( ) const
virtual

Returns the value of ConditionName.

Identifies the Condition instance that the Event originated from.

It can be used together with the SourceName in a user display to distinguish between different Condition instances. If a ConditionSource has only one instance of a ConditionType, and the Server has no instance name, the Server shall supply the ConditionType browse name.

OpcUa::PropertyType * OpcUa::ConditionTypeBase::getConditionNameNode ( )
virtual

Returns the ConditionName node.

Identifies the Condition instance that the Event originated from.

It can be used together with the SourceName in a user display to distinguish between different Condition instances. If a ConditionSource has only one instance of a ConditionType, and the Server has no instance name, the Server shall supply the ConditionType browse name.

void OpcUa::ConditionTypeBase::getConditionNameValue ( Session pSession,
UaVariant value 
)
virtual

Sets the value of ConditionName to argument value.

Identifies the Condition instance that the Event originated from.

It can be used together with the SourceName in a user display to distinguish between different Condition instances. If a ConditionSource has only one instance of a ConditionType, and the Server has no instance name, the Server shall supply the ConditionType browse name.

void OpcUa::ConditionTypeBase::getConditionTypeOptionalFieldData ( OpcUa_UInt32  index,
Session pSession,
OpcUa_Variant data 
)
virtual

Get the field value for the passed index for optional fields of the ConditionType.

This function must be overwritten by derived classes to provide the optional fields registered with ConditionTypeData::registerOptionalEventFields.

Parameters
indexThe index of the selected field.
pSessionThe session context for the method call.
dataThe data for the selected field.
UaLocalizedText OpcUa::ConditionTypeBase::getEnabledState ( )
virtual

Returns the LocalizedText representation of the EnabledState.

See ConditionTypeBase::getEnabledStateBool for a detailed description of EnabledState.

void OpcUa::ConditionTypeBase::getEnabledState_EffectiveDisplayNameValue ( Session pSession,
OpcUa_Variant value 
)
virtual

Sets the value of the EffectiveDisplayName property to value.

Reimplemented in OpcUa::AlarmConditionType.

OpcUa_Boolean OpcUa::ConditionTypeBase::getEnabledStateBool ( )
virtual

Returns the boolean value of the EnabledState.

EnabledState indicates whether the Condition is enabled.

EnabledState/Id is TRUE if enabled, FALSE otherwise. EnabledState/TransitionTime defines when the EnabledState last changed. Recommended state names for LocaleIds are listed in the following table.

LocaleId FALSE State Name TRUE State Name
en Disabled Enabled
de Ausgeschaltet Eingeschaltet
fr Hors Service En Service

A Condition’s EnabledState effects the generation of Event Notifications and as such results in the following specific behaviour:

  • When the Condition instance enters the Disabled state, the Retain Property of this Condition shall be set to FALSE by the Server to indicate to the Client that the Condition instance is currently not of interest to Clients.
  • When the Condition instance enters the enabled state, the Condition shall be evaluated and all of its Properties updated to reflect the current values. If this evaluation causes the Retain Property to transition to TRUE for any ConditionBranch, then an Event Notification shall be generated for that ConditionBranch.
  • The Server may choose to continue to test for a Condition instance while it is Disabled. However, no Event Notifications will be generated while the Condition instance is disabled.
  • For any Condition that exists in the AddressSpace the Attributes and the following Variables will continue to have valid values even in the Disabled state: EventId, Event Type, Source Node, Source Name, Time, and EnabledState. Other properties may no longer provide current valid values. All Variables that are no longer provided shall return a status of Bad_ConditionDisabled. The Event that reports the Disabled state should report the properties as NULL or with a status of Bad_ConditionDisabled.

When enabled, changes to the following components shall cause a ConditionType Event Notification:

  • Quality
  • Severity (inherited from BaseEventType)
  • Comment

This may not be the complete list. Subtypes may define additional Variables that trigger Event Notifications. In general changes to Variables of the types TwoStateVariableType or ConditionVariableType trigger Event Notifications.

OpcUa::TwoStateVariableType * OpcUa::ConditionTypeBase::getEnabledStateNode ( )
virtual

Returns the EnabledState node.

EnabledState indicates whether the Condition is enabled.

EnabledState/Id is TRUE if enabled, FALSE otherwise. EnabledState/TransitionTime defines when the EnabledState last changed. Recommended state names for LocaleIds are listed in the following table.

LocaleId FALSE State Name TRUE State Name
en Disabled Enabled
de Ausgeschaltet Eingeschaltet
fr Hors Service En Service

A Condition’s EnabledState effects the generation of Event Notifications and as such results in the following specific behaviour:

  • When the Condition instance enters the Disabled state, the Retain Property of this Condition shall be set to FALSE by the Server to indicate to the Client that the Condition instance is currently not of interest to Clients.
  • When the Condition instance enters the enabled state, the Condition shall be evaluated and all of its Properties updated to reflect the current values. If this evaluation causes the Retain Property to transition to TRUE for any ConditionBranch, then an Event Notification shall be generated for that ConditionBranch.
  • The Server may choose to continue to test for a Condition instance while it is Disabled. However, no Event Notifications will be generated while the Condition instance is disabled.
  • For any Condition that exists in the AddressSpace the Attributes and the following Variables will continue to have valid values even in the Disabled state: EventId, Event Type, Source Node, Source Name, Time, and EnabledState. Other properties may no longer provide current valid values. All Variables that are no longer provided shall return a status of Bad_ConditionDisabled. The Event that reports the Disabled state should report the properties as NULL or with a status of Bad_ConditionDisabled.

When enabled, changes to the following components shall cause a ConditionType Event Notification:

  • Quality
  • Severity (inherited from BaseEventType)
  • Comment

This may not be the complete list. Subtypes may define additional Variables that trigger Event Notifications. In general changes to Variables of the types TwoStateVariableType or ConditionVariableType trigger Event Notifications.

void OpcUa::ConditionTypeBase::getEnabledStateValue ( Session pSession,
UaVariant value 
)
virtual

Sets the value of EnabledState to argument value.

See ConditionTypeBase::getEnabledStateBool for a detailed description of EnabledState.

OpcUa_UInt16 OpcUa::ConditionTypeBase::getLastSeverity ( ) const
virtual

Returns the value of LastSeverity.

Provides the previous severity of the ConditionBranch.

Initially this Variable contains a zero value; it will return a value only after a severity change. The new severity is supplied via the Severity Property which is inherited from the BaseEventType.

OpcUa::ConditionVariableType * OpcUa::ConditionTypeBase::getLastSeverityNode ( )
virtual

Returns the LastSeverity node.

Provides the previous severity of the ConditionBranch.

Initially this Variable contains a zero value; it will return a value only after a severity change. The new severity is supplied via the Severity Property which is inherited from the BaseEventType.

void OpcUa::ConditionTypeBase::getLastSeverityValue ( Session pSession,
UaVariant value 
)
virtual

Sets the value of LastSeverity to argument value.

Provides the previous severity of the ConditionBranch.

Initially this Variable contains a zero value; it will return a value only after a severity change. The new severity is supplied via the Severity Property which is inherited from the BaseEventType.

OpcUa_StatusCode OpcUa::ConditionTypeBase::getQuality ( ) const
virtual

Returns the value of Quality.

Reveals the status of process values or other resources that this Condition instance is based upon.

If, for example, a process value is “Uncertain”, the associated “LevelAlarm” Condition is also questionable. Values for the Quality can be any of the OPC StatusCodes defined in Part 8 of the OPC UA Specification as well as Good, Uncertain and Bad as defined in Part 4 of the OPC UA Specification. These StatusCodes are similar to but slightly more generic than the description of data quality in the various field bus Specifications. It is the responsibility of the Server to map internal status information to these codes. A Server which supports no quality information shall return Good. This quality can also reflect the communication status associated with the system that this value or resource is based on and from which this Alarm was received. For communication errors to the underlying system, especially those that result in some unavailable Event fields, the quality shall be Bad_NoCommunication error.

OpcUa::ConditionVariableType * OpcUa::ConditionTypeBase::getQualityNode ( )
virtual

Returns the Quality node.

Reveals the status of process values or other resources that this Condition instance is based upon.

If, for example, a process value is “Uncertain”, the associated “LevelAlarm” Condition is also questionable. Values for the Quality can be any of the OPC StatusCodes defined in Part 8 of the OPC UA Specification as well as Good, Uncertain and Bad as defined in Part 4 of the OPC UA Specification. These StatusCodes are similar to but slightly more generic than the description of data quality in the various field bus Specifications. It is the responsibility of the Server to map internal status information to these codes. A Server which supports no quality information shall return Good. This quality can also reflect the communication status associated with the system that this value or resource is based on and from which this Alarm was received. For communication errors to the underlying system, especially those that result in some unavailable Event fields, the quality shall be Bad_NoCommunication error.

void OpcUa::ConditionTypeBase::getQualityValue ( Session pSession,
UaVariant value 
)
virtual

Sets the value of Quality to argument value.

Reveals the status of process values or other resources that this Condition instance is based upon.

If, for example, a process value is “Uncertain”, the associated “LevelAlarm” Condition is also questionable. Values for the Quality can be any of the OPC StatusCodes defined in Part 8 of the OPC UA Specification as well as Good, Uncertain and Bad as defined in Part 4 of the OPC UA Specification. These StatusCodes are similar to but slightly more generic than the description of data quality in the various field bus Specifications. It is the responsibility of the Server to map internal status information to these codes. A Server which supports no quality information shall return Good. This quality can also reflect the communication status associated with the system that this value or resource is based on and from which this Alarm was received. For communication errors to the underlying system, especially those that result in some unavailable Event fields, the quality shall be Bad_NoCommunication error.

OpcUa_Boolean OpcUa::ConditionTypeBase::getRetain ( ) const
virtual

Returns the value of Retain.

Retain when TRUE describes a Condition (or ConditionBranch) as being in a state that is interesting for a Client wishing to synchronize its state with the Server’s state. The logic to determine how this flag is set is Server specific. Typically all Active Alarms would have the Retain flag set; however, it is also possible for inactive Alarms to have their Retain flag set to TRUE. In normal processing, when a Client receives an Event with the Retain flag set to FALSE, the Client should consider this as a ConditionBranch that is no longer of interest, in the case of a “current Alarm display” the ConditionBranch would be removed from the display.

OpcUa::PropertyType * OpcUa::ConditionTypeBase::getRetainNode ( )
virtual

Returns the Retain node.

Retain when TRUE describes a Condition (or ConditionBranch) as being in a state that is interesting for a Client wishing to synchronize its state with the Server’s state. The logic to determine how this flag is set is Server specific. Typically all Active Alarms would have the Retain flag set; however, it is also possible for inactive Alarms to have their Retain flag set to TRUE. In normal processing, when a Client receives an Event with the Retain flag set to FALSE, the Client should consider this as a ConditionBranch that is no longer of interest, in the case of a “current Alarm display” the ConditionBranch would be removed from the display.

void OpcUa::ConditionTypeBase::getRetainValue ( Session pSession,
UaVariant value 
)
virtual

Sets the value of Retain to argument value.

Retain when TRUE describes a Condition (or ConditionBranch) as being in a state that is interesting for a Client wishing to synchronize its state with the Server’s state. The logic to determine how this flag is set is Server specific. Typically all Active Alarms would have the Retain flag set; however, it is also possible for inactive Alarms to have their Retain flag set to TRUE. In normal processing, when a Client receives an Event with the Retain flag set to FALSE, the Client should consider this as a ConditionBranch that is no longer of interest, in the case of a “current Alarm display” the ConditionBranch would be removed from the display.

virtual void OpcUa::ConditionTypeBase::lockEventData ( )
inlinevirtual

Lock the event data for data update and event handling.

This method is used for event data objects maintaining a state for conditions since there may be concurrent access to the condition data by a condition update and a condition refresh triggered by a client. This method is also used during the event processing in the SDK.

Reimplemented from UaEventData.

void OpcUa::ConditionTypeBase::setBranchId ( const UaNodeId BranchId)
virtual

Sets the BranchId value.

BranchId is Null for all Event Notifications that relate to the current state of the Condition instance. If BranchId is not Null it identifies a previous state of this Condition instance that still needs attention by an Operator. If the current ConditionBranch is transformed into a previous ConditionBranch then the Server needs to assign a non-null BranchId. An initial Event for the branch will be generated with the values of the ConditionBranch and the new BranchId. The ConditionBranch can be updated many times before it is no longer needed. When the ConditionBranch no longer requires Operator input the final Event will have Retain set to FALSE. The retain bit on the current Event is TRUE, as long as any ConditionBranches require Operator input.The BranchId DataType is NodeId although the Server is not required to have ConditionBranches in the Address Space. The use of a NodeId allows the Server to use simple numeric identifiers, strings or arrays of bytes.

void OpcUa::ConditionTypeBase::setBranchIdStatus ( OpcUa_StatusCode  status)
virtual

Set a status code for the event field BranchId.

If an event field is not available, a StatusCode must be provided instead of the value to indicate the error situation.

void OpcUa::ConditionTypeBase::setClientUserId ( const UaString ClientUserId)
virtual

Sets the ClientUserId value.

Is related to the Comment field and contains the identity of the user who inserted the most recent Comment.

The logic to obtain the ClientUserId is defined in Part 5 of the OPC UA Specification.

void OpcUa::ConditionTypeBase::setClientUserIdStatus ( OpcUa_StatusCode  status)
virtual

Set a status code for the event field ClientUserId.

If an event field is not available, a StatusCode must be provided instead of the value to indicate the error situation.

void OpcUa::ConditionTypeBase::setComment ( const UaLocalizedText Comment)
virtual

Sets the Comment value.

Contains the last comment provided for a certain state (ConditionBranch).

It may have been provided by an AddComment method, some other method or in some other manner. The initial value of this Variable is null, unless it is provided in some other manner. If a method provides as an option the ability to set a Comment, then the value of this Variable is reset to null if an optional comment is not provided.

void OpcUa::ConditionTypeBase::setCommentStatus ( OpcUa_StatusCode  status)
virtual

Set a status code for the event field Comment.

If an event field is not available, a StatusCode must be provided instead of the value to indicate the error situation.

void OpcUa::ConditionTypeBase::setConditionClassId ( const UaNodeId ConditionClassId)
virtual

Sets the ConditionClassId value.

Specifies in which domain this Condition is used.

It is the NodeId of the corresponding ConditionClassType. When using this Property for filtering, Clients have to specify all individual ConditionClassType NodeIds. The OfType operator cannot be applied. BaseConditionClassType is used as class whenever a Condition cannot be assigned to a more concrete class.

void OpcUa::ConditionTypeBase::setConditionClassIdStatus ( OpcUa_StatusCode  status)
virtual

Set a status code for the event field ConditionClassId.

If an event field is not available, a StatusCode must be provided instead of the value to indicate the error situation.

void OpcUa::ConditionTypeBase::setConditionClassName ( const UaLocalizedText ConditionClassName)
virtual

Sets the ConditionClassName value.

ConditionClassName provides the display name of the ConditionClassType.

void OpcUa::ConditionTypeBase::setConditionClassNameStatus ( OpcUa_StatusCode  status)
virtual

Set a status code for the event field ConditionClassName.

If an event field is not available, a StatusCode must be provided instead of the value to indicate the error situation.

void OpcUa::ConditionTypeBase::setConditionName ( const UaString ConditionName)
virtual

Sets the ConditionName value.

Identifies the Condition instance that the Event originated from.

It can be used together with the SourceName in a user display to distinguish between different Condition instances. If a ConditionSource has only one instance of a ConditionType, and the Server has no instance name, the Server shall supply the ConditionType browse name.

void OpcUa::ConditionTypeBase::setConditionNameStatus ( OpcUa_StatusCode  status)
virtual

Set a status code for the event field ConditionName.

If an event field is not available, a StatusCode must be provided instead of the value to indicate the error situation.

void OpcUa::ConditionTypeBase::setEnabledState ( OpcUa_Boolean  enabledState)
virtual

Sets the EnabledState.

EnabledState indicates whether the Condition is enabled.

EnabledState/Id is TRUE if enabled, FALSE otherwise. EnabledState/TransitionTime defines when the EnabledState last changed. Recommended state names for LocaleIds are listed in the following table.

LocaleId FALSE State Name TRUE State Name
en Disabled Enabled
de Ausgeschaltet Eingeschaltet
fr Hors Service En Service

A Condition’s EnabledState effects the generation of Event Notifications and as such results in the following specific behaviour:

  • When the Condition instance enters the Disabled state, the Retain Property of this Condition shall be set to FALSE by the Server to indicate to the Client that the Condition instance is currently not of interest to Clients.
  • When the Condition instance enters the enabled state, the Condition shall be evaluated and all of its Properties updated to reflect the current values. If this evaluation causes the Retain Property to transition to TRUE for any ConditionBranch, then an Event Notification shall be generated for that ConditionBranch.
  • The Server may choose to continue to test for a Condition instance while it is Disabled. However, no Event Notifications will be generated while the Condition instance is disabled.
  • For any Condition that exists in the AddressSpace the Attributes and the following Variables will continue to have valid values even in the Disabled state: EventId, Event Type, Source Node, Source Name, Time, and EnabledState. Other properties may no longer provide current valid values. All Variables that are no longer provided shall return a status of Bad_ConditionDisabled. The Event that reports the Disabled state should report the properties as NULL or with a status of Bad_ConditionDisabled.

When enabled, changes to the following components shall cause a ConditionType Event Notification:

  • Quality
  • Severity (inherited from BaseEventType)
  • Comment

This may not be the complete list. Subtypes may define additional Variables that trigger Event Notifications. In general changes to Variables of the types TwoStateVariableType or ConditionVariableType trigger Event Notifications.

void OpcUa::ConditionTypeBase::setEnabledStateStatus ( OpcUa_StatusCode  status)
virtual

Set a status code for the event field EnabledState.

If an event field is not available, a StatusCode must be provided instead of the value to indicate the error situation.

See ConditionTypeBase::setEnabledState for a detailed description of EnabledState.

void OpcUa::ConditionTypeBase::setLastSeverity ( OpcUa_UInt16  LastSeverity)
virtual

Sets the LastSeverity value.

Provides the previous severity of the ConditionBranch.

Initially this Variable contains a zero value; it will return a value only after a severity change. The new severity is supplied via the Severity Property which is inherited from the BaseEventType.

void OpcUa::ConditionTypeBase::setLastSeverityStatus ( OpcUa_StatusCode  status)
virtual

Set a status code for the event field LastSeverity.

If an event field is not available, a StatusCode must be provided instead of the value to indicate the error situation.

void OpcUa::ConditionTypeBase::setQuality ( OpcUa_StatusCode  Quality)
virtual

Sets the Quality value.

Reveals the status of process values or other resources that this Condition instance is based upon.

If, for example, a process value is “Uncertain”, the associated “LevelAlarm” Condition is also questionable. Values for the Quality can be any of the OPC StatusCodes defined in Part 8 of the OPC UA Specification as well as Good, Uncertain and Bad as defined in Part 4 of the OPC UA Specification. These StatusCodes are similar to but slightly more generic than the description of data quality in the various field bus Specifications. It is the responsibility of the Server to map internal status information to these codes. A Server which supports no quality information shall return Good. This quality can also reflect the communication status associated with the system that this value or resource is based on and from which this Alarm was received. For communication errors to the underlying system, especially those that result in some unavailable Event fields, the quality shall be Bad_NoCommunication error.

void OpcUa::ConditionTypeBase::setQualityStatus ( OpcUa_StatusCode  status)
virtual

Set a status code for the event field Quality.

If an event field is not available, a StatusCode must be provided instead of the value to indicate the error situation.

void OpcUa::ConditionTypeBase::setRetain ( OpcUa_Boolean  Retain)
virtual

Sets the Retain value.

Retain when TRUE describes a Condition (or ConditionBranch) as being in a state that is interesting for a Client wishing to synchronize its state with the Server’s state. The logic to determine how this flag is set is Server specific. Typically all Active Alarms would have the Retain flag set; however, it is also possible for inactive Alarms to have their Retain flag set to TRUE. In normal processing, when a Client receives an Event with the Retain flag set to FALSE, the Client should consider this as a ConditionBranch that is no longer of interest, in the case of a “current Alarm display” the ConditionBranch would be removed from the display.

void OpcUa::ConditionTypeBase::setRetainStatus ( OpcUa_StatusCode  status)
virtual

Set a status code for the event field Retain.

If an event field is not available, a StatusCode must be provided instead of the value to indicate the error situation.

UaStatus OpcUa::ConditionTypeBase::triggerEvent ( const UaDateTime time,
const UaDateTime receiveTime,
const UaByteString userEventId 
)
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.

Parameters
[in]timeTime 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]receiveTimeReceiveTime provides the time the OPC UA Server received the Event from the underlying device or another Server.
[in]userEventIdThe 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 acknowledgement. The user specific part can be extracted from the EventId provided by the client by using EventManagerBase::getUserEventId().

Reimplemented in OpcUa::AcknowledgeableConditionTypeBase, OpcUa::AlarmConditionTypeBase, OpcUa::DialogConditionTypeBase, OpcUa::NonExclusiveLimitAlarmTypeBase, OpcUa::LimitAlarmTypeBase, OpcUa::CertificateExpirationAlarmType, OpcUa::NonExclusiveDeviationAlarmType, OpcUa::ExclusiveDeviationAlarmType, OpcUa::ExclusiveLimitAlarmTypeBase, OpcUa::OffNormalAlarmTypeBase, OpcUa::NonExclusiveRateOfChangeAlarmType, OpcUa::ExclusiveRateOfChangeAlarmType, OpcUa::NonExclusiveLevelAlarmType, OpcUa::ExclusiveLevelAlarmType, OpcUa::DiscreteAlarmTypeBase, OpcUa::TripAlarmType, and OpcUa::SystemOffNormalAlarmType.

virtual void OpcUa::ConditionTypeBase::unlockEventData ( )
inlinevirtual

Unlock the event data after data update or event handling.

This method is used for event data objects maintaining a state for conditions since there may be concurrent access to the condition data by a condition update and a condition refresh triggered by a client. This method is also used during the event processing in the SDK.

Reimplemented from UaEventData.

void OpcUa::ConditionTypeBase::useAccessInfoFromInstance ( ConditionTypeBase pOther)

Uses the NodeAccessInfo of pOther and its children.


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