8 AddIn Capabilities ToC Previous Next

8.3 Locking ToC Previous Next

8.3.5 InitLock Method ToC Previous Next

InitLock restricts access for other Clients.

A call of this Method for an element that is already locked will be rejected. This may also be due to an implicit lock created by the Server. If InitLock is requested for a Network, it will be rejected if any of the Devices connected to this Network or any sub-ordinate Network including their connected Devices is already locked.

While locked, requests from other Clients to modify the locked element (e.g., writing to Parameters, modifying the topology, or invoking Methods) will be rejected. However, requests to read or navigate will typically work. Servers may choose to implement an exclusive locking where other Clients have no access at all (e.g. in cases where even read operations require certain settings in a TopologyElement).

The lock is removed when ExitLock is called. It is automatically removed when the Session ends. This is typically the case when the connection to the Client breaks and the Session times out. Servers shall also maintain an automatic unlock if Clients do not access the locked element for a certain time (see 8.3.4).

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

Signature

InitLock(
[in]  String       Context,
[out] Int32        InitLockStatus);

Table 57 – 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 58 – InitLock Method AddressSpace definition

Attribute Value
BrowseName InitLock
References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasProperty Variable InputArguments Argument[] PropertyType Mandatory
HasProperty Variable OutputArguments Argument[] PropertyType Mandatory

Previous Next