This Method closes the File and applies updates to the ConnectionConfigurationSets. It can only be called if the File was opened for writing. If the Close Method is called, any cached data is discarded, and the ConnectionManager configuration is not changed.

The file content shall be a UABinaryFileDataType as defined in Table F.35.Table F.41

The Client shall be authorized to modify the configuration for the ConnectionManager functionality when invoking this Method on the Server. It is recommended that this Method be restricted to Client connections that have the well-known Role ConfigureAdmin (see 5.9). If the file also contains SKS configuration, then it is recommended that the Client also have the well-known Role SecurityKeyServerAdmin (see OPC 10000-14).

The signature of the Method is described below, and the arguments are described in Table 37.

Signature

CloseAndUpdate (

[in]UInt32 FileHandle,

[in]Boolean RequireCompleteUpdate,

[in] ConnectionConfigurationSetOperation[] Operations,

[out]Boolean ChangesApplied,

[out]StatusCode[] OperationResults,

[out]NodeId[] ConfigurationObjects

);

Table F. 37 – CloseAndUpdate Arguments

Argument

Description

FileHandle

The handle of the previously opened file.

RequireCompleteUpdate

If TRUE, the modification is only applied if all changes can be applied to all objects.

Operations

Defines the operations to apply to a ConnectionManager’s ConnectionConfigurationSets for the array of ConnectionConfigurationSetConfDataType elements in the written file.

The length of the array and the order of its elements shall match the array of ConnectionConfigurationSetConfDataType in the written file.

ChangesApplied

If TRUE and RequireCompleteUpdate was set to TRUE, all changes were applied.

If TRUE and RequireCompleteUpdate was set to FALSE, one or more changes were applied.

If FALSE, no changes were applied.

Detailed errors are provided in the OperationResults argument.

OperationResults

Results of the Operations.

The length of the array and the order of its elements shall match the length and order of the Operations array.

ConfigurationObjects

NodeIds of the related Objects

If NodeIds are returned, the length of the array and the order of its elements shall match the array contained in the written file.

If the Server does not support the creation of NodeIds, the array is null or empty.

The possible Method result codes are formally defined in Table 38, and the OperationResult Element Result Codes are defined in Table 39.

Table F.38 - Method Result Codes

ResultCode

Description

Bad_TypeMismatch

The file content is not a UABinaryFileDataType with an array of ConnectionConfigurationSetConfDataType as Body.

Bad_InvalidArgument

The FileHandle is not valid.

Bad_InvalidState

The File was not opened for write access.

Bad_UserAccessDenied

The Session user is not allowed to modify the ConnectionManager configuration.

Bad_NothingToDo

The array in the Body of the File is null or empty.

Table F.39 - OperationResult Element Result Codes

ResultCode

Description

Bad_BrowseNameDuplicated

A ConnectionConfigurationSet with the BrowseName already exists in the ConnectionConfigurationSetFolder.The ConnectionConfigurationSet cannot be added.

Bad_NoMatch

A ConnectionConfigurationSet with the BrowseName does not exist in the ConnectionConfigurationSetFolder.The ConnectionConfigurationSet cannot be removed or replaced.

Bad_NothingToDo

No ConnectionConfigurationSetOperation was specified.

Bad_InvalidArgument

An invalid combination of ConnectionConfigurationSetOperation was set, or a ConnectionConfigurationSetOperation unknown to the implementation.

Bad_UserAccessDenied

The user has no permissions to modify the ConnectionConfigurationSets.

Bad_InvalidState

A ConnectionConfigurationSet with the name is currently being processed or edited. The ConnectionConfigurationSet cannot be removed or replaced.

The CloseAndUpdate Method representation in the AddressSpace is formally defined in Table F.40.

Table F.40 - CloseAndUpdate Method AddressSpace definition

Attribute

Value

BrowseName

4:CloseAndUpdate

References

Node Class

BrowseName

DataType

TypeDefinition

Other

0:HasProperty

Variable

0:InputArguments

0:Argument[]

0:PropertyType

M

0:HasProperty

Variable

0:OutputArguments

0:Argument[]

0:PropertyType

M

ConformanceUnits

UAFX AutomationComponent Base

The CloseAndUpdate Method allows to add, remove, or replace ConnectionConfigurationSets.

ConnectionConfigurationSets are addressed by BrowseName and ConnectionConfigurationSetFolder (see 6.7.2).

The ConnectionConfigurationSetOperation ElementAdd adds the ConnectionConfigurationSet to the ConnectionConfigurationSets Folder tree in the Folder specified by the ConnectionConfigurationSetFolder. If Folders on the given path do not exist, they will be created.

The operation ElementAdd does not include processing the ConnectionConfigurationSet. Processing may be triggered either by a Client using the ProcessConnectionConfigurationSets Method (see 6.7.5) or by vendor-specific means.

The ConnectionConfigurationSetOperation ElementRemove removes the ConnectionConfigurationSet from the ConnectionConfigurationSetFolder. For ElementRemove, all elements of the ConnectionConfigurationSetConfDataType except BrowseName and ConnectionConfigurationSetFolder are ignored and may be set to null or empty by the caller.

The ConnectionManager shall call the CloseConnections Method on all affected AutomationComponents (see 6.2.5) with Remove set to TRUE for all Connections contained in the ConnectionConfigurationSet.

The ConnectionConfigurationSetOperation ElementReplace replaces the ConnectionConfigurationSet in the ConnectionConfigurationSetFolder.

The ConnectionManager shall call the CloseConnections Method on all affected AutomationComponents (see 6.2.5) with Remove set to TRUE for all contained Connections in the ConnectionConfigurationSet.

The operation ElementReplace does not include processing the new ConnectionConfigurationSet. Processing may be triggered either by a Client using the ProcessConnectionConfigurationSets Method (see 6.7.5) or by vendor-specific means.