UA Bundle SDK .NET  2.3.0.330
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Groups Pages
UnifiedAutomation.UaServer.ConditionModel Class Reference

Inherits UnifiedAutomation.UaServer.BaseEventModel, and UnifiedAutomation.UaServer.IMethodDispatcher.

Inherited by UnifiedAutomation.UaServer.AcknowledgeableConditionModel, and UnifiedAutomation.UaServer.DialogConditionModel.

Public Member Functions

virtual StatusCode Enable (RequestContext context)
 Enables the condition. More...
 
virtual StatusCode Disable (RequestContext context)
 Disables the condition. More...
 
virtual StatusCode AddComment (RequestContext context, byte[] eventId, LocalizedText comment)
 Adds a comment to the condition. More...
 
virtual void UpdateEnabledEffectiveDisplayName ()
 Updates the effect display name for the enabled state. More...
 
 ConditionModel ()
 Initializes a new instance of the ConditionModel class. More...
 
 ConditionModel (ConditionModel template)
 Initializes a new instance of the ConditionModel class. More...
 
override void UpdateEvent (GenericEvent e)
 Updates the event. More...
 
virtual CallMethodEventHandler GetMethodDispatcher (RequestContext context, NodeId objectId, NodeId methodId)
 Gets the method dispatcher. More...
 
virtual 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.BaseEventModel
 BaseEventModel ()
 Initializes a new instance of the BaseEventModel class. More...
 
 BaseEventModel (BaseEventModel template)
 Initializes a new instance of the BaseEventModel class. More...
 
void NewId ()
 Assigns a new event id, time and receive time to the event. More...
 
virtual GenericEvent CreateEvent (FilterManager manager)
 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...
 

Properties

NodeId BranchId [get, set]
 Gets or sets the BranchId More...
 
string ClientUserId [get, set]
 Gets or sets the ClientUserId More...
 
ConditionVariableModel
< LocalizedText
Comment [get, set]
 Gets or sets the Comment More...
 
NodeId ConditionClassId [get, set]
 Gets or sets the ConditionClassId More...
 
LocalizedText ConditionClassName [get, set]
 Gets or sets the ConditionClassName More...
 
string ConditionName [get, set]
 Gets or sets the ConditionName More...
 
TwoStateVariableModel EnabledState [get, set]
 Gets or sets the EnabledState More...
 
ConditionVariableModel< ushort > LastSeverity [get, set]
 Gets or sets the LastSeverity More...
 
ConditionVariableModel
< StatusCode
Quality [get, set]
 Gets or sets the Quality More...
 
bool Retain [get, set]
 Gets or sets the Retain More...
 
IConditionMethods ConditionMethods [get, set]
 Gets or sets the Condition methods. More...
 
- Properties inherited from UnifiedAutomation.UaServer.BaseEventModel
NodeId NodeId [get, set]
 Gets or sets the event id. More...
 
byte[] EventId [get, set]
 Gets or sets the event id. More...
 
NodeId EventType [get, set]
 Gets or sets the type of the event. More...
 
NodeId SourceNode [get, set]
 Gets or sets the source node. More...
 
string SourceName [get, set]
 Gets or sets the name of the source. More...
 
DateTime Time [get, set]
 Gets or sets the time. More...
 
DateTime ReceiveTime [get, set]
 Gets or sets the receive time. More...
 
TimeZoneDataType LocalTime [get, set]
 Gets or sets the local time. More...
 
LocalizedText Message [get, set]
 Gets or sets the message. More...
 
ushort Severity [get, set]
 Gets or sets the severity. 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...
 

Detailed Description

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 sub state machine. The ConditionType inherits all Properties of the BaseEventType. SourceNode identifies the ConditionSource. See Clause 5.12 for more details. 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.

ConditionClassId specifies in which domain this Condition is used. It is the NodeId of the corresponding ConditionClassType. See UnifiedAutomation.UaServer.ConditionModel.ConditionClassId for more details.

ConditionClassName provides the display name of the ConditionClassType.

ConditionName identifies the Condition instance that the Event originated from. See UnifiedAutomation.UaServer.ConditionModel.ConditionName for more details.

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. See UnifiedAutomation.UaServer.ConditionModel.BranchId for more details.

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. See UnifiedAutomation.UaServer.ConditionModel.Retain for more details.

EnabledState indicates whether the Condition is enabled. See UnifiedAutomation.UaServer.ConditionModel.EnabledState for more details.

Quality reveals the status of process values or other resources that this Condition instance is based upon. See UnifiedAutomation.UaServer.ConditionModel.Quality for more details.

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

LastSeverity provides the previous severity of the ConditionBranch. See UnifiedAutomation.UaServer.ConditionModel.LastSeverity for more details.

Comment contains the last comment provided for a certain state (ConditionBranch). See UnifiedAutomation.UaServer.ConditionModel.Comment for more details.

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.

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

Constructor & Destructor Documentation

UnifiedAutomation.UaServer.ConditionModel.ConditionModel ( )
inline

Initializes a new instance of the ConditionModel class.

UnifiedAutomation.UaServer.ConditionModel.ConditionModel ( ConditionModel  template)
inline

Initializes a new instance of the ConditionModel class.

Parameters
templateThe template.

Member Function Documentation

virtual StatusCode UnifiedAutomation.UaServer.ConditionModel.AddComment ( RequestContext  context,
byte[]  eventId,
LocalizedText  comment 
)
inlinevirtual

Adds a comment to the condition.

virtual StatusCode UnifiedAutomation.UaServer.ConditionModel.Disable ( RequestContext  context)
inlinevirtual

Disables the condition.

virtual StatusCode UnifiedAutomation.UaServer.ConditionModel.DispatchMethod ( RequestContext  context,
MethodHandle  methodHandle,
IList< Variant inputArguments,
List< StatusCode inputArgumentResults,
List< Variant outputArguments 
)
inlinevirtual

Dispatches the method.

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

Reimplemented in UnifiedAutomation.UaServer.DialogConditionModel, and UnifiedAutomation.UaServer.AcknowledgeableConditionModel.

virtual StatusCode UnifiedAutomation.UaServer.ConditionModel.Enable ( RequestContext  context)
inlinevirtual

Enables the condition.

virtual CallMethodEventHandler UnifiedAutomation.UaServer.ConditionModel.GetMethodDispatcher ( RequestContext  context,
NodeId  objectId,
NodeId  methodId 
)
inlinevirtual

Gets the method dispatcher.

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

Implements UnifiedAutomation.UaServer.IMethodDispatcher.

Reimplemented in UnifiedAutomation.UaServer.DialogConditionModel, and UnifiedAutomation.UaServer.AcknowledgeableConditionModel.

virtual void UnifiedAutomation.UaServer.ConditionModel.UpdateEnabledEffectiveDisplayName ( )
inlinevirtual

Property Documentation

NodeId UnifiedAutomation.UaServer.ConditionModel.BranchId
getset

Gets or sets the 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. See Clause 4.4 for more information about the need for creating and maintaining previous ConditionBranches and Annex B.1 for an example using branches. 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.

string UnifiedAutomation.UaServer.ConditionModel.ClientUserId
getset

Gets or sets the ClientUserId

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.

ConditionVariableModel<LocalizedText> UnifiedAutomation.UaServer.ConditionModel.Comment
getset

Gets or sets the Comment

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.

NodeId UnifiedAutomation.UaServer.ConditionModel.ConditionClassId
getset

Gets or sets the ConditionClassId

ConditionClassId specifies in which domain this Condition is used. It is the NodeId of the corresponding ConditionClassType. See clause 5.9 for the definition of ConditionClass and a set of ConditionClasses defined in this standard. 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.

LocalizedText UnifiedAutomation.UaServer.ConditionModel.ConditionClassName
getset

Gets or sets the ConditionClassName

ConditionClassName provides the display name of the ConditionClassType.

IConditionMethods UnifiedAutomation.UaServer.ConditionModel.ConditionMethods
getset

Gets or sets the Condition methods.

The Condition methods.

string UnifiedAutomation.UaServer.ConditionModel.ConditionName
getset

Gets or sets the ConditionName

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.

TwoStateVariableModel UnifiedAutomation.UaServer.ConditionModel.EnabledState
getset

Gets or 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.

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. Sub-Types may define additional Variables that trigger Event Notifications. In general changes to Variables of the types TwoStateVariableType or ConditionVariableType trigger Event Notifications.

ConditionVariableModel<ushort> UnifiedAutomation.UaServer.ConditionModel.LastSeverity
getset

Gets or sets the LastSeverity

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.

ConditionVariableModel<StatusCode> UnifiedAutomation.UaServer.ConditionModel.Quality
getset

Gets or sets the Quality

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 (Data Access) as well as Good, Uncertain and Bad as defined in Part 4. These StatusCodes are similar to but slightly more generic than the description of data quality in the various Fieldbus 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.

bool UnifiedAutomation.UaServer.ConditionModel.Retain
getset

Gets or sets the 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.


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