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 59.

image034.png

Figure 31 – LockingServicesType

Table 59 – LockingServicesType definition

Attribute

Value

BrowseName

LockingServicesType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

Other

Subtype of the BaseObjectType defined in OPC 10000-5.

0:HasComponent

Method

InitLock

Defined in 7.5

M

0:HasComponent

Method

RenewLock

Defined in 7.7

M

0:HasComponent

Method

ExitLock

Defined in 7.6

M

0:HasComponent

Method

BreakLock

Defined in 7.8

M

0:HasProperty

Variable

0:DefaultInstanceBrowseName

0:QualifiedName

0:PropertyType

0:HasProperty

Variable

Locked

0:Boolean

0:PropertyType

M

0:HasProperty

Variable

LockingClient

0:String

0:PropertyType

M

0:HasProperty

Variable

LockingUser

0:String

0:PropertyType

M

0:HasProperty

Variable

RemainingLockTime

0:Duration

0:PropertyType

M

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 60.

Table 60 – 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).