.NET Based OPC UA Client/Server SDK  3.3.0.530
UnifiedAutomation.UaServer.AcknowledgeableConditionModel Class Reference

Extends the ConditionType by defining acknowledgement characteristics. It is an abstract type. More...

Inherits UnifiedAutomation.UaServer.ConditionModel, and UnifiedAutomation.UaServer.IMethodDispatcher.

Inherited by UnifiedAutomation.UaServer.AlarmConditionModel.

Public Member Functions

virtual StatusCode Acknowledge (byte[] eventId, LocalizedText comment, string clientUserId)
 Acknowledges an Event Notification for a Condition instance state where AckedState was set to FALSE. More...
 
virtual StatusCode Acknowledge (RequestContext context, byte[] eventId, LocalizedText comment)
 Acknowledges an Event Notification for a Condition instance state where AckedState was set to FALSE. More...
 
virtual StatusCode Confirm (byte[] eventId, LocalizedText comment, string clientUserId)
 Confirms an Event Notification for a Condition instance state where ConfirmedState was set to FALSE. More...
 
virtual StatusCode Confirm (RequestContext context, byte[] eventId, LocalizedText comment)
 Confirms an Event Notification for a Condition instance state where ConfirmedState was set to FALSE. More...
 
virtual void ResetAcked ()
 Sets the AckedState to unacknowledged. More...
 
virtual void ResetAcked (RequestContext context)
 Sets the AckedState to unacknowledged. More...
 
virtual void ResetConfirmed ()
 Sets the state to unconfirmed. More...
 
override void UpdateEnabledEffectiveDisplayName ()
 Updates the effect display name for the enabled state. More...
 
override void UpdateRetain ()
 Update the retain bit. More...
 
 AcknowledgeableConditionModel ()
 Initializes a new instance of the AcknowledgeableConditionModel class. More...
 
 AcknowledgeableConditionModel (AcknowledgeableConditionModel template)
 Initializes a new instance of the AcknowledgeableConditionModel class. More...
 
override void UpdateEvent (GenericEvent e)
 Updates the event. More...
 
override CallMethodEventHandler GetMethodDispatcher (RequestContext context, NodeId objectId, NodeId methodId)
 Gets the method dispatcher. More...
 
override StatusCode DispatchMethod (RequestContext context, MethodHandle methodHandle, IList< Variant > inputArguments, List< StatusCode > inputArgumentResults, List< Variant > outputArguments)
 Dispatches the method. More...
 
- Public Member Functions inherited from UnifiedAutomation.UaServer.ConditionModel
void RaiseConditionChangedEvent (ConditionModel model)
 Emits a new condition changed event. More...
 
virtual StatusCode Enable ()
 Changes a Condition instance to the enabled state. More...
 
virtual StatusCode Enable (RequestContext context)
 Changes a Condition instance to the enabled state. More...
 
virtual StatusCode Disable ()
 Changes a Condition instance to the disabled state. More...
 
virtual StatusCode Disable (RequestContext context)
 Changes a Condition instance to the disabled state. More...
 
virtual StatusCode AddComment (byte[] eventId, LocalizedText comment, string clientUserId)
 Applies a comment to a specific state of a Condition instance. More...
 
virtual StatusCode AddComment (RequestContext context, byte[] eventId, LocalizedText comment)
 Applies a comment to a specific state of a Condition instance. More...
 
TransitionRaiser MergeTransitions ()
 Merges transitions. More...
 
TransitionRaiser NewTransition ()
 
virtual void ActivateModel (RequestContext context)
 Activates the model. More...
 
virtual void DeactivateModel ()
 Deactivates the model. More...
 
 ConditionModel ()
 Initializes a new instance of the ConditionModel class. More...
 
 ConditionModel (ConditionModel template)
 Initializes a new instance of the ConditionModel class. More...
 
- Public Member Functions inherited from UnifiedAutomation.UaServer.BaseEventModel
 BaseEventModel ()
 Initializes a new instance of the BaseEventModel class. More...
 
 BaseEventModel (BaseEventModel template)
 Initializes a new instance of the BaseEventModel class. More...
 
void SetRolePermissions (RolePermissionTypeCollection rolePermissions, BaseNodeManager nodeManager)
 Sets the RolePermissions to an event. Is used to restrict the receiving of the events to certain roles. More...
 
void SetRolePermissionsAndAccessRestriction (Node sourceNode, BaseNodeManager nodeManager)
 Sets the RolePermissions and AccessRestiriction to an event. Is used to restrict the receiving of the events to certain users. More...
 
void NewId ()
 Assigns a new EventId, Time and ReceiveTime to the event. More...
 
virtual GenericEvent CreateEvent (FilterManager manager)
 Creates the event. More...
 
virtual GenericEvent CreateEvent (FilterManager manager, bool autoGenerateEventIdAndTime)
 Creates the event. More...
 
- Public Member Functions inherited from UnifiedAutomation.UaServer.ModelControllerBase
virtual ModelHandle GetModelHandle (StringTable namespaceUris, object instance)
 Gets the metadata handle. More...
 
virtual DataValue GetValue (IMapperContext context, ModelMapping mapping)
 Gets the value associated with the mapping. More...
 
virtual bool SetValue (IMapperContext context, ModelMapping mapping, DataValue value)
 Sets the value associated with the mapping. More...
 
StatusCode GetStatusCode (string propertyName)
 Retrieve the status code for the given property. If no status code was explicitly set, StatusCodes.Good will be returned.
Parameters
propertyNameThe property name.
Returns
The status code of the property.

 
void SetStatusCode (string propertyName, StatusCode statusCode)
 Sets the status code of the given property. More...
 
- Public Member Functions inherited from UnifiedAutomation.UaServer.ICondition
GenericEvent CreateEvent (FilterManager manager, bool autoGenerateEventIdAndTime)
 Creates an generic event for the condition. More...
 

Protected Member Functions

override void Initialize ()
 Called when the model is activated for the first time.
 
- Protected Member Functions inherited from UnifiedAutomation.UaServer.ConditionModel
void RaiseTransition ()
 Ends a merged transitions. More...
 
- Protected Member Functions inherited from UnifiedAutomation.UaServer.ModelControllerBase
void RaisePropertyChangedEvent ([CallerMemberName] string propertyName=null)
 Raises an property change event. More...
 
void RaisePropertyChangeRequestedEvent< T > (T value, [CallerMemberName] string propertyName=null)
 Called when the value of a property is supposed to be changed. More...
 
bool SetField< T > (ref T field, T value, [CallerMemberName] string propertyName=null)
 Sets the backing field to the new value, and triggers a property change event, if the value has changed. More...
 

Properties

bool IsAckedStateIgnored [get, set]
 Ignores the AckedState in the ConditionModel.Retain calculation. More...
 
ConfirmedStateResetMode ConfirmedStateResetMode [get, set]
 Gets or sets the mode when to reset the confirmed state. More...
 
TwoStateVariableModel AckedState [get, set]
 AckedState when FALSE indicates that the Condition instance requires acknowledgement for the reported Condition state. More...
 
TwoStateVariableModel ConfirmedState [get, set]
 Indicates whether the Condition requires confirmation. More...
 
new TwoStateVariableModel EnabledState [get, set]
 Gets or sets the EnabledState More...
 
- Properties inherited from UnifiedAutomation.UaServer.ConditionModel
bool IsInitialized [get, set]
 Gets or sets if the condition is initialized. More...
 
uint TransitionCount [get]
 
NodeId BranchId [get, set]
 
string ClientUserId [get, set]
 Is related to the Comment field and contains the identity of the user who inserted the most recent Comment. More...
 
ConditionVariableModel
< LocalizedText
Comment [get, set]
 Contains the last comment provided for a certain state (ConditionBranch). More...
 
new NodeId ConditionClassId [get, set]
 Specifies in which domain this Condition is used. More...
 
new LocalizedText ConditionClassName [get, set]
 
string ConditionName [get, set]
 Identifies the Condition instance that the Event originated from. More...
 
TwoStateVariableModel EnabledState [get, set]
 EnabledState indicates whether the Condition is enabled. More...
 
ConditionVariableModel< ushort > LastSeverity [get, set]
 Provides the previous severity of the ConditionBranch. More...
 
ConditionVariableModel
< StatusCode
Quality [get, set]
 Reveals the status of process values or other resources that this Condition instance is based upon. More...
 
bool Retain [get, set]
 
IConditionMethods ConditionMethods [get, set]
 Gets or sets the Condition methods. More...
 
- Properties inherited from UnifiedAutomation.UaServer.BaseEventModel
NodeId NodeId [get, set]
 The node identifier for a representation of an event in the Server address space. Used mainly for ConditionIds. More...
 
byte[] EventId [get, set]
 Generated by the server to uniquely identify a particular Event Notification. More...
 
NodeId EventType [get, set]
 Describes the specific type of Event. More...
 
NodeId SourceNode [get, set]
 Identifies the Node that the Event originated from. More...
 
string SourceName [get, set]
 Provides a description of the source of the Event. More...
 
DateTime Time [get, set]
 Provides the time the Event occurred. More...
 
DateTime ReceiveTime [get, set]
 Provides the time the OPC UA Server received the Event from the underlying device of another Server. More...
 
TimeZoneDataType LocalTime [get, set]
 Contains the Offset and the DaylightSavingInOffset flag. More...
 
LocalizedText Message [get, set]
 Provides a human-readable and localizable text description of the Event. More...
 
ushort Severity [get, set]
 An indication of the urgency of the Event. More...
 
NodeId ConditionClassId [get, set]
 Specifies in which domain this Condition is used. More...
 
LocalizedText ConditionClassName [get, set]
 
NodeId ConditionSubClassId [get, set]
 ConditionSubClassId specifies additional class[es] that apply to the Event. More...
 
LocalizedText ConditionSubClassName [get, set]
 
INodeAccessInfo NodeAccessInfo [get, set]
 Using a NodeAccessInfo can restrict the access of an event to single scopes. More...
 
AccessRestrictionType AccessRestriction [get, set]
 Using the AcccessRestrictions accessing the events can be restricted for users having a secure connection. More...
 
IRolePermissions RolePermissions [get, set]
 Using the RolePermissions accessing the events can be restricted for users having one of the configured roles. More...
 
- Properties inherited from UnifiedAutomation.UaServer.ModelControllerBase
ModelHandle ModelHandle [get, set]
 Gets or sets the metadata handle. More...
 
object UserData [get, set]
 Gets or sets the user data. More...
 
- Properties inherited from UnifiedAutomation.UaServer.INotifyStatusCodeInfo
bool HasStatusCodes [get]
 true if no property has an explicit set status code. Hence when all status codes are implicit StatusCodes.Good. More...
 
- Properties inherited from UnifiedAutomation.UaServer.ICondition
bool Retain [get]
 The retain state. See Part 9: Alarms and Conditions More...
 
NodeId SourceNode [get]
 The source node. See Part 9: Alarms and Conditions More...
 

Additional Inherited Members

- Public Attributes inherited from UnifiedAutomation.UaServer.ModelControllerBase
bool HasStatusCodes => m_statusCodes != null && m_statusCodes.Count > 0
 
- Events inherited from UnifiedAutomation.UaServer.ConditionModel
EventHandler< ConditionModelConditionChanged
 Occurs when the condition changed in a way that a new UA event needs to be emitted. More...
 
- Events inherited from UnifiedAutomation.UaServer.ModelControllerBase
PropertyChangedEventHandler PropertyChanged
 Occurs when a property value changes. More...
 
EventHandler
< PropertyChangeRequestedEventArgs
PropertyChangeRequested
 The event is emitted just before the value will be changed, and gives the observer the opportunity to reject or adjust (e.g. clamp) the property change by setting the PropertyChangeRequestedEventArgs.StatusCode and PropertyChangeRequestedEventArgs.Value properties. More...
 
EventHandler
< StatusCodeChangedEventArgs
StatusCodeChanged
 
- Events inherited from UnifiedAutomation.UaServer.INotifyPropertyChangeRequested
EventHandler
< PropertyChangeRequestedEventArgs
PropertyChangeRequested
 The property change request event. More...
 
- Events inherited from UnifiedAutomation.UaServer.INotifyStatusCodeInfo
EventHandler
< StatusCodeChangedEventArgs
StatusCodeChanged
 Occurs if the status code of a property was changed. More...
 

Detailed Description

Extends the ConditionType by defining acknowledgement characteristics. It is an abstract type.

The AcknowledgeableConditionType inherits all Properties of the ConditionType.

AcknowledgeableConditions expose states to indicate whether a Condition has to be acknowledged or confirmed.

The Confirmed Acknowledge model is typically used to differentiate between acknowledging the presence of a Condition and having done something to address the Condition. For example an Operator receiving a motor high temperature Notification calls the Acknowledge method to inform the Server that the high temperature has been observed. The Operator then takes some action such as lowering the load on the motor in order to reduce the temperature. The Operator then calls the Confirm method to inform the Server that a corrective action has been taken.

AckedState when FALSE indicates that the Condition instance requires acknowledgement for the reported Condition state. When the Condition instance is acknowledged the AckedState is set to TRUE. ConfirmedState indicates whether it requires confirmation. The two states are substates of the TRUE EnabledState. The EventId used in the Event Notification is considered the identifier of this state and has to be used when calling the methods for acknowledgement or confirmation.

A Server may require that previous states be acknowledged. If the acknowledgement of a previous state is still open and a new state also requires acknowledgement, the Server shall create a branch of the Condition instance. In situations where state changes occur in short succession there can be multiple unacknowledged states and the Server has to maintain ConditionBranches for all previous unacknowledged states. These branches will be deleted after they have been acknowledged or if they reached their final state. Clients are expected to keep track of all ConditionBranches where AckedState is FALSE to allow acknowledgement of those. See also UnifiedAutomation.UaServer.ConditionModel for more information about ConditionBranches and the examples in Annex B.1 of Part 9 of the OPC UA Specification. The handling of the AckedState and branches also applies to the ConfirmState.

Constructor & Destructor Documentation

UnifiedAutomation.UaServer.AcknowledgeableConditionModel.AcknowledgeableConditionModel ( )

Initializes a new instance of the AcknowledgeableConditionModel class.

UnifiedAutomation.UaServer.AcknowledgeableConditionModel.AcknowledgeableConditionModel ( AcknowledgeableConditionModel  template)

Initializes a new instance of the AcknowledgeableConditionModel class.

Parameters
templateThe template.

Member Function Documentation

virtual StatusCode UnifiedAutomation.UaServer.AcknowledgeableConditionModel.Acknowledge ( byte[]  eventId,
LocalizedText  comment,
string  clientUserId 
)
virtual

Acknowledges an Event Notification for a Condition instance state where AckedState was set to FALSE.

If the condition has a ConfirmedState, it will be set to unconfirmed.

Normally, the MethodId passed to the Call Service is found by browsing the Condition instance in the AddressSpace. However, some Servers do not expose Condition instances in the AddressSpace. Therefore all Servers shall allow Clients to call the Acknowledge Method by specifying ConditionId as the ObjectId and the well known NodeId of the Method declaration on the AcknowledgeableConditionType as the MethodId. The Method cannot be called on the AcknowledgeableConditionType Node.

ResultCode Description
Bad_ConditionBranchAlreadyAcked The EventId does not refer to a state that needs acknowledgment.
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 Condition is not valid or that the Method was called on the ConditionType Node.
Parameters
eventIdEventId identifying a particular Event Notification. Only Event Notifications where AckedState/Id was FALSE can be acknowledged.
commentA localized text to be applied to the Condition.
clientUserIdThe client user id.

Reimplemented in UnifiedAutomation.UaServer.AlarmConditionModel.

virtual StatusCode UnifiedAutomation.UaServer.AcknowledgeableConditionModel.Acknowledge ( RequestContext  context,
byte[]  eventId,
LocalizedText  comment 
)
virtual

Acknowledges an Event Notification for a Condition instance state where AckedState was set to FALSE.

Parameters
context
eventId
comment
Returns
virtual StatusCode UnifiedAutomation.UaServer.AcknowledgeableConditionModel.Confirm ( byte[]  eventId,
LocalizedText  comment,
string  clientUserId 
)
virtual

Confirms an Event Notification for a Condition instance state where ConfirmedState was set to FALSE.

Normally, the MethodId passed to the Call Service is found by browsing the Condition instance in the AddressSpace. However, some Servers do not expose Condition instances in the AddressSpace. Therefore all Servers shall allow Clients to call the Confirm Method by specifying ConditionId as the ObjectId and the well known NodeId of the Method declaration on the AcknowledgeableConditionType as the MethodId. The Method cannot be called on the AcknowledgeableConditionType Node.

Method result codes:

ResultCode Description
Bad_ConditionBranchAlreadyConfirmed The EventId does not refer to a state that needs confirmation.
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 Condition is not valid or that the Method was called on the ConditionType Node.
Parameters
eventIdEventId identifying a particular Event Notification. Only Event Notifications where ConfirmedState/Id was TRUE can be confirmed.
commentA localized text to be applied to the Conditions.
clientUserIdThe client user id.
virtual StatusCode UnifiedAutomation.UaServer.AcknowledgeableConditionModel.Confirm ( RequestContext  context,
byte[]  eventId,
LocalizedText  comment 
)
virtual

Confirms an Event Notification for a Condition instance state where ConfirmedState was set to FALSE.

Parameters
context
eventIdEventId identifying a particular Event Notification. Only Event Notifications where ConfirmedState/Id was TRUE can be confirmed.
commentA localized text to be applied to the Conditions.
override StatusCode UnifiedAutomation.UaServer.AcknowledgeableConditionModel.DispatchMethod ( RequestContext  context,
MethodHandle  methodHandle,
IList< Variant inputArguments,
List< StatusCode inputArgumentResults,
List< Variant outputArguments 
)
virtual

Dispatches the method.

Parameters
contextThe context.
methodHandleThe method handle.
inputArgumentsThe input arguments.
inputArgumentResultsThe input argument results.
outputArgumentsThe output arguments.
Returns

Reimplemented from UnifiedAutomation.UaServer.ConditionModel.

Reimplemented in UnifiedAutomation.UaServer.AlarmConditionModel.

override CallMethodEventHandler UnifiedAutomation.UaServer.AcknowledgeableConditionModel.GetMethodDispatcher ( RequestContext  context,
NodeId  objectId,
NodeId  methodId 
)

Gets the method dispatcher.

Parameters
contextThe context.
objectIdThe object id.
methodIdThe method id.
Returns

Implements UnifiedAutomation.UaServer.IMethodDispatcher.

virtual void UnifiedAutomation.UaServer.AcknowledgeableConditionModel.ResetAcked ( )
virtual

Sets the AckedState to unacknowledged.

virtual void UnifiedAutomation.UaServer.AcknowledgeableConditionModel.ResetAcked ( RequestContext  context)
virtual

Sets the AckedState to unacknowledged.

virtual void UnifiedAutomation.UaServer.AcknowledgeableConditionModel.ResetConfirmed ( )
virtual

Sets the state to unconfirmed.

override void UnifiedAutomation.UaServer.AcknowledgeableConditionModel.UpdateEnabledEffectiveDisplayName ( )
virtual

Updates the effect display name for the enabled state.

Reimplemented from UnifiedAutomation.UaServer.ConditionModel.

Reimplemented in UnifiedAutomation.UaServer.AlarmConditionModel.

override void UnifiedAutomation.UaServer.AcknowledgeableConditionModel.UpdateRetain ( )
virtual

Update the retain bit.

The retain bit of the AcknowledgeableConditionModel depends on the EnabledState, AckedState, and ConfirmedState.

Reimplemented from UnifiedAutomation.UaServer.ConditionModel.

Reimplemented in UnifiedAutomation.UaServer.AlarmConditionModel.

Property Documentation

TwoStateVariableModel UnifiedAutomation.UaServer.AcknowledgeableConditionModel.AckedState
getset

AckedState when FALSE indicates that the Condition instance requires acknowledgement for the reported Condition state.

When the Condition instance is acknowledged the AckedState is set to TRUE. Recommended state names for LocaleIds are listed in the following table.

LocaleId FALSE State Name TRUE State Name
en Unacknowledged Acknowledged
de Unquittiert Quittiert
fr Non-acquitté Acquitté
TwoStateVariableModel UnifiedAutomation.UaServer.AcknowledgeableConditionModel.ConfirmedState
getset

Indicates whether the Condition requires confirmation.

Recommended state names for LocaleIds are listed in the following table.

LocaleId FALSE State Name TRUE State Name
en Unconfirmed Confirmed
de Unbestätigt Bestätigt
fr Non-Confirmé Confirmé
ConfirmedStateResetMode UnifiedAutomation.UaServer.AcknowledgeableConditionModel.ConfirmedStateResetMode
getset

Gets or sets the mode when to reset the confirmed state.

new TwoStateVariableModel UnifiedAutomation.UaServer.AcknowledgeableConditionModel.EnabledState
getset

Gets or sets the EnabledState

bool UnifiedAutomation.UaServer.AcknowledgeableConditionModel.IsAckedStateIgnored
getset

Ignores the AckedState in the ConditionModel.Retain calculation.


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