InitLock restricts access for other UA Applications.

A call of this Method for an element that is already locked will be rejected.

While locked, requests from other Applications to modify the locked element (e.g., writing to Variables, or invoking Methods) should be rejected with Bad_Locked. However, requests to read or navigate will typically work. Servers can choose to implement an exclusive locking where other Applications have no access at all.

The lock is removed when ExitLock is called. It is automatically removed when the MaxInactiveLockTime elapsed (see 7.4).

The signature of this Method is specified below. Table 68 and Table 69 specify the arguments and AddressSpace representation, respectively.

Signature

InitLock(

[in] 0:String Context,

[out] 0:Int32 InitLockStatus);

Table 68 – InitLock Method Arguments

Argument

Description

Context

A string used to provide context information about the current activity going on in the Client.

InitLockStatus

0 – OK

-1 – E_AlreadyLocked – the element is already locked

-2 – E_Invalid – the element cannot be locked

Table 69 – InitLock Method AddressSpace definition

Attribute

Value

BrowseName

1:InitLock

References

NodeClass

BrowseName

DataType

TypeDefinition

Other

0:HasProperty

Variable

0:InputArguments

0:Argument[]

0:PropertyType

M

0:HasProperty

Variable

0:OutputArguments

0:Argument[]

0:PropertyType

M

Conformance Units

DI Locking