The LockingServicesType provides Methods to manage the lock and Properties with status information. This section describes the common semantic. The lock-owner ObjectTypes will often extend these semantics.

Figure 31 shows the LockingServicesType definition. It is formally defined in Table 54.

image034.png

Figure 31 – LockingServicesType

Table 54 – LockingServicesType definition

Attribute

Value

BrowseName

LockingServicesType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the BaseObjectType defined in OPC 10000-5.

HasComponent

Method

InitLock

Defined in 7.5

Mandatory

HasComponent

Method

RenewLock

Defined in 7.7

Mandatory

HasComponent

Method

ExitLock

Defined in 7.6

Mandatory

HasComponent

Method

BreakLock

Defined in 7.8

Mandatory

HasProperty

Variable

0:DefaultInstanceBrowseName

QualifiedName

PropertyType

HasProperty

Variable

Locked

Boolean

PropertyType

Mandatory

HasProperty

Variable

LockingClient

String

PropertyType

Mandatory

HasProperty

Variable

LockingUser

String

PropertyType

Mandatory

HasProperty

Variable

RemainingLockTime

Duration

PropertyType

Mandatory

Conformance Units

DI Locking

The StatusCode Bad_MethodInvalid shall be returned from the Call Service for Objects where locking is not supported. Bad_UserAccessDenied shall be returned if the Client User does not have the permission to call the Methods.

The DefaultInstanceBrowseName Property – defined in OPC 10000-3 – is used to specify the recommended BrowseName for instances of the LockingServicesType. Its Value is defined in Table 55.

Table 55 – LockingServicesType Additional Variable Attributes

Source Path

Value

0:DefaultInstanceBrowseName

Lock

A lock is typically initiated by a Client calling the InitLock Method and removed by calling the ExitLock Method. The lock-owner ObjectTypes can define mechanisms that automatically initiate and remove a lock.

A lock request will be rejected if operations are active that will be prevented by the lock.

The lock is automatically removed if the MaxInactiveLockTime has elapsed (see 7.4). The lock is also removed when the Session ends during inactivity. This is typically the case when the connection to the Client breaks and the Session times out.

The following LockingServices Properties offer lock-status information.

Locked when True indicates that this element has been locked by some Application and that no or just limited access is available for other Applications.

When the lock is initiated by a Client, LockingClient contains the ApplicationUri of the Client as provided in the CreateSession Service call (see OPC 10000-4). Other options to get this information can be specified on the lock-owner ObjectType.

LockingUser contains information to identify the user. When the lock is initiated by a Client it is obtained directly or indirectly from the UserIdentityToken passed by the Client in the ActivateSession Service call (see OPC 10000-4). Other options to get this information can be specified on the lock-owner ObjectType.

RemainingLockTime denotes the remaining time in milliseconds after which the lock will automatically be removed by the Server. This time is based upon MaxInactiveLockTime (see 7.4).