The Conditionmodel extends the Eventmodel by defining the ConditionType. The ConditionTypeintroduces the concept of states differentiating it from the base Eventmodel. Unlike the BaseEventType, Conditionsare not transient. The ConditionTypeis further extended into Dialog and AcknowledgeableConditionType, each of which has their own sub-types.

The Conditionmodel is illustrated in Figure 10and formally defined in the subsequent tables. It is worth noting that this figure, like all figures in this document, is not intended to be complete. Rather, the figures only illustrate information provided by the formal definitions.

image013.png

Figure 10– Condition model

The ConditionTypedefines all general characteristics of a Condition. All other ConditionTypesderive from it. It is formally defined in Table 10and Table 11. The False state of the EnabledStateshall not be extended with a sub state machine.

Table 10– ConditionType definition

Attribute

Value

BrowseName

ConditionType

IsAbstract

True

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the BaseEventTypedefined in 10000-5

HasSubtype

ObjectType

DialogConditionType

Defined in Clause 5.6.2

HasSubtype

ObjectType

AcknowledgeableConditionType

Defined in Clause 5.7.2

HasProperty

Variable

ConditionClassId

NodeId

PropertyType

Mandatory

HasProperty

Variable

ConditionClassName

LocalizedText

PropertyType

Mandatory

HasProperty

Variable

ConditionName

String

PropertyType

Mandatory

HasProperty

Variable

BranchId

NodeId

PropertyType

Mandatory

HasProperty

Variable

Retain

Boolean

PropertyType

Mandatory

HasProperty

Variable

SupportsFilteredRetain

Boolean

PropertyType

HasComponent

Variable

EnabledState

LocalizedText

TwoStateVariableType

Mandatory

HasComponent

Variable

Quality

StatusCode

ConditionVariableType

Mandatory

HasComponent

Variable

LastSeverity

UInt16

ConditionVariableType

Mandatory

HasComponent

Variable

Comment

LocalizedText

ConditionVariableType

Mandatory

HasProperty

Variable

ClientUserId

String

PropertyType

Mandatory

HasComponent

Method

Disable

Defined in Clause 5.5.4

Mandatory

HasComponent

Method

Enable

Defined in Clause 5.5.5

Mandatory

HasComponent

Method

AddComment

Defined in Clause 5.5.6

Mandatory

HasComponent

Method

ConditionRefresh

Defined in Clause 5.5.7

HasComponent

Method

ConditionRefresh2

Defined in Clause 5.5.8

ConformanceUnits

A & C Basic

Table 11– ConditionType Additional Subcomponents

BrowsePath

References

NodeClass

BrowseName

DataType

TypeDefinition

Others

EnabledState

HasProperty

Variable

TrueState

LocalizedText

PropertyType

EnabledState

HasProperty

Variable

FalseState

LocalizedText

PropertyType

The emptyOthers” column indicates that no ModellingRuleapplies.

The ConditionTypeinherits all Propertiesof the BaseEventType. Their semantic is defined in 10000-5. SourceNode Property identifies the ConditionSource. See 5.12for more details. If the ConditionSourceis not a Nodein the AddressSpace,the NodeIdis set to NULL. The SourceNodeProperty is the Node,which the Conditionis associated with, it may be the same as the InputNodefor an Alarm, but it may be a separate node. For example, a motor, which is a Variablewith a Valuethat is an RPM, may be the ConditionSourcefor Conditionsthat are related to the motor as well as a temperature sensor associated with the motor. In the former the InputNodefor the High RPM Alarmis the value of the Motor RPM, while in the later the InputNodeof the High Alarm would be the value of the temperature sensor that is associated with the motor.

ConditionClassId, ConditionClassName, ConditionSubClassId andConditionSubClassName originally defined in ConditionTypeare now defined in the BaseEventType (from which this type is derived). They are optional in the BaseEventType, but ConditionClassId, and ConditionClassName are Mandatoryin ConditionType and thus listed(to update the modelling rule).

ConditionNameidentifies the Condition instance that the Event originated from. It can be used together with the SourceNamein a user display to distinguish between different Condition instances. If a ConditionSourcehas only one instance of a ConditionType, and the Serverhas no instance name, the Servershall supply the name element of the BrowseName of the ConditionType.

BranchIdis NULL for all Event Notificationsthat relate to the current state of the Conditioninstance. If BranchIdis not NULL, it identifies a previous state of this Conditioninstance that still needs attention by an Operator. If the current ConditionBranchis transformed into a previous ConditionBranchthen the Server needs to assign a non-NULL BranchId. An initial Eventfor the branch will generated with the values of the ConditionBranchand the new BranchId. The ConditionBranchcan be updated many times before it is no longer needed. When the ConditionBranchno longer requires Operatorinput the final Eventwill have Retainset to False. The retain bit on the current Event is True, as long as any ConditionBranches require Operator input. See 4.2for more information about the need for creating and maintaining previous ConditionBranchesand Clause B.1for an example using branches. The BranchId DataTypeis NodeIdalthough the Serveris not required to have ConditionBranchesin the AddressSpace. The use of a NodeIdallows the Serverto use simple numeric identifiers, strings or arrays of bytes.

Retainwhen True describes a Condition(or ConditionBranch) as being in a state that is interesting for a Clientwishing to synchronize its state with the Server’s state. The logic to determine how this flag is set is Serverspecific. Typically, all Active Alarmswould have the Retainflag set; however, it is also possible for inactive Alarmsto have their Retainflag set to True.

In normal processing when a Clientreceives an Event with the Retainflag set to False, the Clientshould consider this as a ConditionBranch that is no longer of interest, in the case of a “current Alarmdisplay” the ConditionBranchwould be removed from the display.

SupportsFilteredRetain Propertyis only provided on the ConditionType. When this Propertyis set to True on the Type, then the Serverprovides a Clientspecific Retainflag value taking into account any Clientprovided filter. When the property is False on the ConditionTypethen the Serverdoes not provide a Client specific the value of the Retainflag. For example, if a Clientapplies a filter to exclude Alarmsthat are shelved, and the SupportsFilteredRetainis set to True, the Clientreceives an Alarm(it is not shelved, Retainis true). The Client(or another Client) shelves the Alarm. At this point the Alarmno longer passes the filter, but since the previous event was sent, this event is transmitted with Retain = False. For an example see B.1.4

image014.png

Figure 11- SupportsFilteredRetain process

Figure 11provides an illustration of the processing a Servershall follow for processing Retainflag when SupportsFilteredRetainflag is set to True.

EnabledStateindicates whether the Conditionis enabled. EnabledState/Idis True if enabled, False otherwise. EnabledState/TransitionTimedefines when the EnabledStatelast changed. Recommended state names are described in A.1.

A Condition’s EnabledStateeffects the generation of Event Notificationsand as such results in the following specific behaviour:

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

This may not be the complete list. Subtypes of ConditionTypemay define additional Variablesthat trigger Event Notifications. In general, changes to Variablesof the types TwoStateVariableType, ConditionVariableType, StateMachineType or any of their subtypes trigger Event Notifications and are not explicitly described in subtypes.

In the event of a restart of an AlarmManager, the AlarmManagershall recover the Enabled/Disabledstates of all current conditions. If the system can not determine if the Conditionis Enabledor Disabled, it shall be Enabled.

Qualityreveals the status of process values or other resources that this Conditioninstance is based upon. If, for example, a process value is “Uncertain”, the associated “LevelAlarm” Conditionis also questionable. Values for the Qualitycan be any of the OPC StatusCodesdefined in 10000-8as well as Good, Uncertainand Badas defined in 10000-4. These StatusCodesare similar to but slightly more generic than the description of data quality in the various field bus specifications. It is the responsibility of the Serverto map internal status information to these codes. A Serverthat 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 Alarmwas received. For communication errors to the underlying system, especially those that result in some unavailable Eventfields, the quality shall be Bad_NoCommunication error.

Eventsare only generated for Conditionsthat have their Retainfield set to True and for the initial transition of the Retainfield from True to False.

LastSeverityprovides the previous severity of the ConditionBranch. Initially this Variablecontains 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.

Commentcontains the last comment provided for a certain state (ConditionBranch) of a Condition. It may have been provided by an AddComment Method,some other Method or in some other manner. Any change in this field, shall trigger a new event to be generated. The initial value of this Variableis NULL, unless it is provided in some other manner.

ClientUserIdis related to the Commentfield and contains the identity of the user who inserted the most recent Comment.The logic to obtain the ClientUserIdis defined in 10000-5.

The NodeIdof the Conditioninstance is used as ConditionId. It is not explicitly modelled as a component of the ConditionType. However, it can be requested with the following SimpleAttributeOperand(see Table 12) in the SelectClauseof the EventFilter: See 10000-4for a detailed definition of the SelectClausein an Event Subscription.

Table 12– ConditionId SimpleAttributeOperand Illustration

Name

Type

Description

SimpleAttributeOperand

typeId

NodeId

NodeIdof the ConditionType Node

browsePath[]

QualifiedName

empty

attributeId

IntegerId

Id of the NodeId Attribute

Conditionsare Objectswhich have a state which changes over time. Each Conditioninstance has a ConditionIdas an identifier which uniquely identifies it within the Server.

A Conditioninstance may be an Objectthat appears in the Server Address Space. If this is the case the ConditionIdshall be the NodeIdfor the Object.

The state of a Conditioninstance at any given time is the set values for the Variables that belong to the Conditioninstance. If one or more Variablevalues change the Servergenerates an Eventwith a unique EventId.

If a Clientcalls Refreshthe Serverwill report the current state of a Conditioninstance by re-sending the last Event(i.e. the same EventIdand Timeis sent).

A ConditionBranchis a copy of the Conditioninstance state that can change independently of the current Conditioninstance state. Each Branchhas an identifier called a BranchIdwhich is unique among all active Branchesfor a Conditioninstance. Branchesare typically not visible in the Address Spaceand this standard does not define a standard way to make them visible.

TheDisable Methodis used to change a Conditioninstance to the Disabledstate. Normally, the NodeIdof the object instance as the ObjectIdis passed to the Call Service. However, some Serversdo not expose Conditioninstances in the AddressSpace. Therefore, all Serversshall allow Clientsto call the Disable Methodby specifying ConditionIdas the ObjectId.The Methodcannot be called with an ObjectIdof the ConditionType Node. Since Conditioninstances may not be defined in the AddressSpace, the MethodId that is passed in theCall Serviceshall be the NodeIdof the Disable Methodon the ConditionType.

Signature

Disable();

Method Result Codes in Table 13(defined in Call Service)

Table 13– Disable result codes

Result Code

Description

Bad_ConditionAlreadyDisabled

See Table 137for the description of this result code.

Table 14specifies the AddressSpacerepresentation for the Disable Method.

Table 14– Disable Method AddressSpace definition

Attribute

Value

BrowseName

Disable

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

AlwaysGeneratesEvent

ObjectType

AuditConditionEnableEventType

Defined in 5.10.2

ConformanceUnits

A & C Enable

If Auditingis supported, this Methodshall generate an Eventof AuditConditionEnableEventTypefor all invocations of the Method.

TheEnable Methodis used to change a Conditioninstance to the enabled state. Normally, the NodeIdof the object instance as the ObjectIdispassed to the Call Service. However, some Serversdo not expose Conditioninstances in the AddressSpace. Therefore, all Serversshall allow Clientsto call the Enable Methodby specifying ConditionIdas the ObjectId.The Methodcannot be called with an ObjectIdof the ConditionType Node. If the Conditioninstance is not exposed, then it may be difficult for a Clientto determine the ConditionIdfor a disabled Condition.Since Conditioninstances may not be defined in the AddressSpace, the MethodId that is passed in theCall Serviceshall be the NodeIdof the Enable Methodon the ConditionType.

Signature

Enable();

Methodresult codes in Table 15(defined in Call Service)

Table 15– Enable result codes

Result Code

Description

Bad_ConditionAlreadyEnabled

See Table 137for the description of this result code.

Table 16specifies the AddressSpacerepresentation for the Enable Method.

Table 16– Enable Method AddressSpace definition

Attribute

Value

BrowseName

Enable

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

AlwaysGeneratesEvent

ObjectType

AuditConditionEnableEventType

Defined in 5.10.2

ConformanceUnits

A & C Enable

If Auditingis supported, this Methodshall generate an Eventof AuditConditionEnableEventTypefor all invocations of the Method.

TheAddComment Methodis used to apply a comment to a specific state of a Conditioninstance. Normally, the NodeIdof the Objectinstance is passed as the ObjectIdto the Call Service. However, some Serversdo not expose Conditioninstances in the AddressSpace. Therefore, all Serversshall also allow Clientsto call the AddComment Methodby specifying ConditionIdas the ObjectId.The Methodcannot be called with an ObjectIdof the ConditionType Node.

Signature

AddComment(

[in] ByteString EventId

[in] LocalizedText Comment

);

The parameters are defined in Table 17

Table 17– AddComment arguments

Argument

Description

EventId

EventId identifying a particular Event Notificationwhere a state was reported for a Condition.

Comment

A localized text to be applied to the Condition.

Methodresult codes in Table 18(defined in Call Service)

Table 18– AddComment result codes

Result Code

Description

Bad_MethodInvalid

The MethodIdprovided does not correspond to the ObjectIdprovided. See 10000-4for the general description of this result code.

Bad_EventIdUnknown

See Table 137for the description of this result code.

Bad_NodeIdInvalid

Used to indicate that the specified ObjectIdis not valid or that the Methodwas called on the ConditionType Node.

See 10000-4for the general description of this result code.

Comments

Commentsare added to Eventoccurrences identified via an EventId. EventIdswhere the related EventTypeis not a ConditionType (or subtype of it) and thus does not support Commentsare rejected.

A ConditionEvent– where the Comment Variablecontains this text – will be sent for the identified state. If a comment is added to a previous state (i.e. a state for which the Server has created a branch), the BranchIdand all Conditionvalues of this branch will be reported. If the comment field is NULL (both locale and text are empty) it will be ignored and any existing comments will remain unchanged. If the comment is to be reset, an empty text with a locale shall be provided.

Table 19specifies the AddressSpacerepresentation for the AddComment Method.

Table 19– AddComment Method AddressSpace definition

Attribute

Value

BrowseName

AddComment

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

AlwaysGeneratesEvent

ObjectType

AuditConditionCommentEventType

Defined in 5.10.4

ConformanceUnits

A & C Comment

If Auditingis supported, this Methodshall generate an Eventof AuditConditionCommentEventTypefor all invocations of the Method.

ConditionRefreshallows a Clientto request a Refreshof all Condition instances that currently are in an interesting state (they have the Retainflag set). This includes previous states of a Conditioninstance for which the Servermaintains Branches. A Clientwould typically invoke this Methodwhen it initially connects to a Serverand following any situations, such as communication disruptions, in which it would require resynchronization with the Server. This Methodis only available on the ConditionType. To invoke this Method, the call shall pass the well-known MethodIdof the Methodon the ConditionTypeand the ObjectIdshall be the well-known NodeIdof the ConditionType ObjectType.

Signature

ConditionRefresh(

[in] IntegerId SubscriptionId

);

The parameters are defined in Table 20

Table 20– ConditionRefresh parameters

Argument

Description

SubscriptionId

A valid SubscriptionId of the Subscriptionto be refreshed. The Servershall verify that the SubscriptionIdprovided is part of the Sessionthat is invoking the Method.

Methodresult codes in Table 21(defined in Call Service)

Table 21– ConditionRefresh result codes

Result Code

Description

Bad_SubscriptionIdInvalid

See 10000-4for the description of this result code

Bad_NothingToDo

The ConditionRefresh Methodwas called on a SubscriptionIdthat has no eventMonitoredItems.

Bad_RefreshInProgress

See Table 137for the description of this result code

Bad_UserAccessDenied

The Methodwas not called in the context of the Sessionthat owns the Subscription

See 10000-4for the general description of this result code.

Comments

Sub clause 4.5describes the concept, use cases and information flow in more detail.

The input argument provides a Subscriptionidentifier indicating which Client Subscriptionshall be refreshed. If the Subscriptionis accepted the Serverwill react as follows:

  1. The Serverissues an event of RefreshStartEventType (defined in 5.11.2) marking the start of Refresh.A copy of the instance of RefreshStartEventTypeis queued into the Eventstream for everyNotifier MonitoredItem in the Subscription. Each of the Event copies shall contain the same EventId.
  2. The Serverissues Event Notificationsof any Retained Conditionsand Retained Branchesof Conditionsthat meet the Subscriptionscontent filter criteria. Note that the EventId for such a refreshed Notificationshall be identical to the one for the original Notification, the values of the other Propertiesare Serverspecific, in that some Serversmay be able to replay the exact Eventswith all Properties/Variablesmaintaining the same values as originally sent, but other Serversmight only be able to regenerate the Event. The regenerated Eventmight contain some updated Property/Variablevalues. For example, if the Alarmlimits associated with a Variablewere changed after the generation of the Eventwithout generating a change in the Alarmstate, the new limit might be reported. In another example, if the HighLimit was 100 and the Variableis 120. If the limit were changed to 90 no new Eventwould be generated since no change to the StateMachine, but the limit on a Refreshwould indicate 90, when the original Eventhad indicated 100.
  3. The Servermay intersperse new Event Notificationsthat have not been previously issued to the Notifieralong with those being sent as part of the Refreshrequest. Clientsshall check for multiple Event Notificationsfor a ConditionBranchto avoid overwriting a new state delivered together with an older state from the Refreshprocess.
  4. The Serverissues an instance of RefreshEndEventType(defined in 5.11.3) to signal the end of the Refresh. A copy of the instance of RefreshEndEventTypeis queued into the Eventstream for every Notifier MonitoredItemin the Subscription. Each of the Eventscopies shall contain the same EventId.

It is important to note that if multiple Event Notifiersare in a Subscriptionall Event Notifiersare processed. If a Clientdoes not want all MonitoredItemsrefreshed, then the Clientshould place each MonitoredItemin a separate Subscriptionor call ConditionRefresh2if the Serversupports it.

If more than one Subscriptionis to be refreshed, then the standard call Servicearray processing can be used.

As mentioned above, ConditionRefreshshall also issue Event Notificationsfor prior states if they still need attention. In particular, this is True for Condition instances where previous states still need acknowledgement or confirmation.

Table 22specifies the AddressSpacerepresentation for the ConditionRefresh Method.

Table 22– ConditionRefresh Method AddressSpace definition

Attribute

Value

BrowseName

ConditionRefresh

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

AlwaysGeneratesEvent

ObjectType

RefreshStartEventType

Defined in 5.11.2

AlwaysGeneratesEvent

ObjectType

RefreshEndEventType

Defined in 5.11.3

ConformanceUnits

A & C Refresh

ConditionRefresh2allows a Clientto request a Refreshof all Condition instances that currently are in an interesting state (they have the Retainflag set) that are associated with the given Monitored item. In all other respects it functions as ConditionRefresh. A Clientwould typically invoke this Methodwhen it initially connects to a Serverand following any situations, such as communication disruptions where only a single MonitoredItemis to be resynchronized with the Server. This Methodis only available on the ConditionType. To invoke this Method, the call shall pass the well-known MethodIdof the Methodon the ConditionTypeand the ObjectIdshall be the well-known NodeIdof the ConditionType ObjectType.

This Methodis optional and as such Clientsmust be prepared to handle Serverswhich do not provide the Method. If the Methodreturns Bad_MethodInvalid, the Clientshall revert to ConditionRefresh.

Signature

ConditionRefresh2(

[in] IntegerId SubscriptionId

[in] IntegerId MonitoredItemId

);

The parameters are defined in Table 23

Table 23– ConditionRefresh2 parameters

Argument

Description

SubscriptionId

The identifier of the Subscriptioncontaining the MonitoredItemto be refreshed. The Servershall verify that the SubscriptionIdprovided is part of the Sessionthat is invoking the Method.

MonitoredItemId

The identifier of the MonitoredItemto be refreshed. The MonitoredItemId shall be in the provided Subscription.

Methodresult codes in Table 24(defined in Call Service)

Table 24– ConditionRefresh2 result codes

Result Code

Description

Bad_SubscriptionIdInvalid

See 10000-4for the description of this result code

Bad_MonitoredItemIdInvalid

See 10000-4for the description of this result code

Bad_RefreshInProgress

See Table 137for the description of this result code

Bad_UserAccessDenied

The Methodwas not called in the context of the Session that owns the Subscription

See 10000-4for the general description of this result code.

Bad_MethodInvalid

See 10000-4for the description of this result code

Comments

Sub clause 4.5describes the concept, use cases and information flow in more detail.

The input argument provides a Subscriptionidentifier and MonitoredItemidentifier indicating which MonitoredItemin the selected Client Subscriptionshall be refreshed. If the Subscriptionand MonitoredItemis accepted the Serverwill react as follows:

  1. The Serverissues a RefreshStartEvent(defined in 5.11.2) marking the start of Refresh. The RefreshStartEventis queued into the Eventstream for theNotifier MonitoredItem in the Subscription.
  2. The Serverissues Event Notificationsof any Retained Conditionsand Retained Branchesof Conditionsthat meet the Subscriptionscontent filter criteria. Note that the EventId for such a refreshed Notificationshall be identical to the one for the original Notification, the values of the other Propertiesare Serverspecific, in that some Serversmay be able to replay the exact Eventswith all Properties/Variablesmaintaining the same values as originally sent, but other Serversmight only be able to regenerate the Event. The regenerated Eventmight contain some updated Property/Variablevalues. For example, if the Alarmlimits associated with a Variablewere changed after the generation of the Eventwithout generating a change in the Alarmstate, the new limit might be reported. In another example, if the HighLimit was 100 and the Variableis 120. If the limit were changed to 90 no new Eventwould be generated since no change to the StateMachine, but the limit on a Refreshwould indicate 90, when the original Eventhad indicated 100.
  3. The Servermay intersperse new Event Notificationsthat have not been previously issued to the notifier along with those being sent as part of the Refreshrequest. Clientsshall check for multiple Event Notificationsfor a ConditionBranchto avoid overwriting a new state delivered together with an older state from the Refreshprocess.
  4. The Serverissues a RefreshEndEvent(defined in 5.11.3) to signal the end of the Refresh. The RefreshEndEventis queued into the Eventstream for theNotifier MonitoredItem in the Subscription.

If more than one MonitoredItemor Subscriptionis to be refreshed, then the standard call Servicearray processing can be used.

As mentioned above, ConditionRefresh2shall also issue Event Notificationsfor prior states if those states still need attention. In particular, this is True for Condition instances where previous states still need acknowledgement or confirmation.

Table 25specifies the AddressSpacerepresentation for the ConditionRefresh2 Method.

Table 25– ConditionRefresh2 Method AddressSpace definition

Attribute

Value

BrowseName

ConditionRefresh2

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

AlwaysGeneratesEvent

ObjectType

RefreshStartEventType

Defined in 5.11.2

AlwaysGeneratesEvent

ObjectType

RefreshEndEventType

Defined in 5.11.3

ConformanceUnits

A & C Refresh2