This type defines a FileType that can be used to access the configuration associated with an Object.
The file is a stream containing an instance of UABinaryFileDataType serialized using one of the DataEncodings defined in OPC 10000-6. The DataEncoding used depends on the DataEncoding used for the messages sent to the Server. The body of the UABinaryFileDataType shall be an instance of the DataType specified by the SupportedDataType Property.
An instance of a ConfigurationFileType shall restrict access to appropriate users or applications. This should be ConfigureAdmin, SecurityAdmin or an equivalent administrative Role.
The Open Method shall not support modes other than Read (0x01) and Read + Write (0x03).
When a Client opens the file for reading and writing, the Client shall follow the following steps.
- Read the existing configuration with the FileType Read Method.
- Set the position to the beginning of the file with the FileType SetPosition Method.
- Write the changes with the FileType Write Method.
- Apply the changes with the CloseAndUpdate Method.
Servers shall automatically Close ConfigurationFiles if there are no calls to Methods on the ConfigurationFile Object within the time specified by the ActivityTimeout Property.
The Size Property inherited from FileType has no meaning for ConfigurationFile and returns the error code defined in OPC 10000-20.
When the CloseAndUpdate Method is called the Server will validate the configuration and then schedules the update. The Server returns initial results in the CloseAndUpdate response and may return additional errors after applying the changes in the response to ConfirmUpdate.
If CloseAndUpdate succeeds it returns a UpdateId that is used to confirm that the Client can connect after the update by calling the ConfirmUpdate Method. If it is not necessary to call ConfirmUpdate, the Server returns a empty value for the UpdateId.
Table 62 – ConfigurationFileType Definition
Attribute |
Value |
||||
BrowseName |
0:ConfigurationFileType |
||||
IsAbstract |
False |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Modelling Rule |
Subtype of the 0:FileType defined in OPC 10000-20. |
|||||
0:HasProperty |
Variable |
0:LastUpdateTime |
0:UtcTime |
0:PropertyType |
Mandatory |
0:HasProperty |
Variable |
0:CurrentVersion |
0:VersionTime |
0:PropertyType |
Mandatory |
0:HasProperty |
Variable |
0:ActivityTimeout |
0:Duration |
0:PropertyType |
Mandatory |
0:HasProperty |
Variable |
0:SupportedDataType |
0:NodeId |
0:PropertyType |
Mandatory |
0:HasComponent |
Method |
0:CloseAndUpdate |
Defined in 7.8.5.2. |
Mandatory |
|
0:HasComponent |
Method |
0:ConfirmUpdate |
Defined in 7.8.5.3. |
Mandatory |
|
|
|||||
Conformance Units |
|||||
Base Configuration Management |
The LastUpdateTime Property indicates when the configuration was last updated. The LastUpdateTime shall reflect changes made using the ConfigurationFile Object Methods. A ConfigurationFile Object should also reflect changes made in other ways.
The CurrentVersion Property is the value of the Version for the currently active configuration.
The ActivityTimeout Property specifies the maximum elapsed time between the calls to Methods on the ConfigurationFile Object after Open is called. If this time elapses the ConfigurationFile is automatically closed by the Server and any changes are discarded. The default value is 60 000 milliseconds (1 minute).
The SupportedDataType Property specifies the NodeId of the DataType that is put into the body of the UABinaryFileDataType during reading and writing. Any DataType shall be a subtype of BaseConfigurationDataType which is defined in 7.8.5.4.
The CloseAndUpdate Method validates the configuration and returns any validation errors.
The ConfirmUpdate Method is used to confirm that the Client can reconnect after the changes were applied.
The CloseAndUpdate Method closes the ConfigurationFile and applies the changes to the configuration. It can only be called if the ConfigurationFile was opened for writing. If the Close Method is called any cached data is discarded and the configuration is not changed.
The Client may partially update the configuration by specifying one or more targets. Each target refers to a component of the configuration that will be inserted, updated or deleted. The Server shall attempt to apply all changes. If any errors occur then all changes are rolled back.
Updating the configuration will often require the endpoints to be closed and all active Sessions be interrupted. When the new configuration is applied it is possible that a configuration error made the Server unreachable. The restartDelayTime argument is used to delay the restart process to give the Client a chance to receive results from the CloseAndUpdate call. The revertAfterTime argument is used to automatically restore the previous configuration if the Client is not able to reconnect and call the ConfirmUpdate Method.
If auditing is supported, the Server shall generate the ConfigurationUpdatedAuditEventType (see 7.8.5.8) when the configuration is updated. This may occur before CloseAndUpdate completes or when the update is scheduled to occur based on the restartDelayTime.
Signature
CloseAndUpdate(
[in] 0:UInt32 fileHandle
[in] 0:VersionTime versionToUpdate
[in] 0:ConfigurationUpdateTargetType[] targets
[in] 0:Duration revertAfterTime
[in] 0:Duration restartDelayTime
[out] 0:StatusCode[] updateResults
[out] 0:VersionTime newVersion
[out] 0:Guid updateId
);
Argument |
Description |
fileHandle |
The handle of the previously opened file. |
versionToUpdate |
Specifies the version of the configuration that the Client believes it is updating. If the CurrentVersion is not the same a Bad_InvalidState error is returned. |
targets |
The list of targets to update. There must be at least one target. Contents of the file which are not referenced by a target are ignored. |
revertAfterTime |
How long the Server should wait before reverting the configuration changes if ConfirmUpdate is not called after CloseAndUpdate returns a response. The revertAfterTime countdown starts after the restartDelayTime time elapses. After getting a response, the Client must wait at least restartDelayTime before attempting to reconnect but no longer than restartDelayTime + revertAfterTime. |
restartDelayTime |
How long the Server should wait before applying the configuration changes if applying the configuration changes will interrupt active Sessions. Clients set this value based on how long it takes for them to receive the response to the Method. |
updateResults |
The result for each target update operation. The length and order of the array shall match the targets array. If any element is not Good then no changes are applied and the Method return code is Uncertain. |
newVersion |
The new ConfigurationVersion. If it is null, then no changes were applied. |
updateId |
An id to passed into ConfirmUpdate to tell the Server that the update was successful. If this value is a null Guid then ConfirmUpdate does not need to be called. |
Method Result Codes (defined in Call Service)
Result Code |
Description |
Uncertain |
Errors occurred processing individual targets. |
Bad_UserAccessDenied |
The current user does not have the rights required. |
Bad_InvalidState |
The versionToUpdate does not match the CurrentVersion. |
Bad_ChangesPending |
|
Bad_SecurityModeInsufficient |
The SecureChannel is not authenticated. |
Operation Result Codes (Returned in UpdateResults)
Result Code |
Description |
Bad_NoEntryExists |
An existing record was not found. |
Bad_EntryExists |
Another record with the same name was found. |
Good_EntryInserted |
A new record was created successfully, |
Good_EntryReplaced |
An existing record was updated successfully, |
Bad_NoDeleteRights |
A record exists but it cannot be deleted. |
Bad_NotSupported |
A field in the record cannot be changed to the value specified. |
Bad_InvalidArgument |
The target definition is not valid. |
Bad_ResourceUnavailable |
The maximum number of supported elements would be exceeded. |
Bad_InvalidState |
The current state of the record does not allow the operation. For example, a CertificateGroup has Certificates assigned. |
Table 29 specifies the AddressSpace representation for the CloseAndUpdate Method.
Table 63 – CloseAndUpdate Method AddressSpace Definition
Attribute |
Value |
||||
BrowseName |
0:CloseAndUpdate |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
0:HasProperty |
Variable |
0:InputArguments |
0:Argument[] |
0:PropertyType |
Mandatory |
0:HasProperty |
Variable |
0:OutputArguments |
0:Argument[] |
0:PropertyType |
Mandatory |
The ConfirmUpdate Method allows a Client to confirm that it can connect after the configuration has been applied. The Client shall disconnect from the Server and reconnect before calling ConfirmUpdate. The RevertAfterTime parameter passed to the CloseAndUpdate Method specifies how long the Server shall wait for confirmation.
If the Server could not apply all changes then the return code is Bad_TransactionFailed and no changes were applied.
If the Method is called too soon the Server returns Bad_InvalidState.
The permissions needed to call this method shall be specified by the subtype and should require one of the administrator Roles.
Signature
ConfirmUpdate(
[in] 0:Guid updateId
);
Argument |
Description |
updateId |
The id returned by CloseAndUpdate. |
Method Result Codes (defined in Call Service)
Result Code |
Description |
Bad_TransactionFailed |
An error occurred applying the changes and they have been rolled back and the ConfigurationVersion does not change. |
Bad_UserAccessDenied |
The current user does not have the rights required. |
Bad_InvalidArgument |
The updateId is not valid or is no longer valid. Any transaction associated with the updateId has been rolled back. |
Bad_InvalidState |
The Server has not had a chance to apply the changes and the Client needs to wait and call the Method again. |
Bad_SecurityModeInsufficient |
The SecureChannel is not authenticated. |
Table 28 specifies the AddressSpace representation for the ConfirmUpdate Method.
Table 64 – ConfirmUpdate Method AddressSpace Definition
Attribute |
Value |
||||
BrowseName |
0:ConfirmUpdate |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
0:HasProperty |
Variable |
0:InputArguments |
0:Argument[] |
0:PropertyType |
Mandatory |
This DataType is the base DataType used to serialize configurations. It is defined in Table 65.
Table 65 – BaseConfigurationDataType Structure
Name |
Type |
Description |
BaseConfigurationDataType |
Structure |
|
ConfigurationVersion |
0:VersionTime |
This field is ignored when updating the configuration. |
ConfigurationProperties |
0:KeyValuePair[] |
Additional configuration properties |
Its representation in the AddressSpace is defined in Table 66.
Table 66 – BaseConfigurationDataType Definition
Attribute |
Value |
|||||
BrowseName |
0:BaseConfigurationDataType |
|||||
IsAbstract |
True |
|||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Other |
|
Subtype of the 0:Structure DataType defined in OPC 10000-5. |
||||||
|
||||||
Conformance Units |
||||||
Base Configuration Management |
This DataType is the base DataType for a named record contained within a configuration. It is defined in Table 67.
Table 67 – BaseConfigurationRecordDataType Structure
Name |
Type |
Description |
BaseConfigurationRecordDataType |
Structure |
|
Name |
0:String |
The name of the record used when updating or deleting a single record. If the record corresponds to an Object in the AddressSpace then this shall be the Name portion of the BrowseName. If the record does not have a matching Object, then Name is only unique within an instance of a configuration file. For these cases, the Server may generate new names each time the ConfigurationVersion changes. The names may be persisted by the Server with the ConfigurationVersion or may be generated with an algorithm that produces the same value given a fixed set of records. Which behaviour to use is defined by the subtype. |
RecordProperties |
0:KeyValuePair[] |
Additional record properties |
Its representation in the AddressSpace is defined in Table 66.
Table 68 – BaseConfigurationRecordDataType Definition
Attribute |
Value |
|||||
BrowseName |
0:BaseConfigurationRecordDataType |
|||||
IsAbstract |
True |
|||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Other |
|
Subtype of the 0:Structure DataType defined in OPC 10000-5. |
||||||
|
||||||
Conformance Units |
||||||
Base Configuration Management |
This is a DataType that defines a target for an update operation It allows the Client to specify the type of update operation (insert, replace or delete).
The Path field defines the path to the target record of the update operation within the configuration. Only fields which are subtypes of BaseConfigurationRecordDataType are valid targets of the path.
The UpdateType specifies that operation to be performed.
Examples of paths:
- CertificateGroups.[1]
- ApplicationIdentity
- UserTokenSettings.[2]
The ConfigurationUpdateTargetType is defined in Table 69.
Table 69 – ConfigurationUpdateTargetType Structure
Name |
Type |
Description |
ConfigurationUpdateTargetType |
Structure |
|
Path |
0:String |
A path to the target record for the update operation. The path uses the DataType FieldPath syntax defined in OPC 10000-6.
|
UpdateType |
0:ConfigurationUpdateType |
The type of update. |
Its representation in the AddressSpace is defined in Table 70.
Table 70 – ConfigurationUpdateTargetType Definition
Attribute |
Value |
|||||
BrowseName |
0:ConfigurationUpdateTargetType |
|||||
IsAbstract |
False |
|||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Other |
|
Subtype of the 0:Structure DataType defined in OPC 10000-5. |
||||||
|
||||||
Conformance Units |
||||||
Base Configuration Management |
This is a DataType that defines the values used for the UpdateType field in the ConfigurationUpdateTargetType. Its values are defined in Table 71.
The update operation is applied to a target within the configuration identified by a path (see 7.8.5.6). The Replace and Delete operations use the Name field in the Structure to match a target with an existing record. For Insert operations no existing record with the same Name may exist. For Delete operations the contents of the record are ignored.
Table 71 – ConfigurationUpdateType Enumeration
Name |
Value |
Description |
Insert |
1 |
The target is added. An error occurs if a name conflict occurs. |
Replace |
2 |
The existing record is updated. An error occurs if a name cannot be matched to an existing record. |
InsertOrReplace |
3 |
The existing record is updated. New records are created if the name does not match an existing record. |
Delete |
4 |
Any existing record is deleted. An error occurs if the name cannot be matched to an existing record. |
Its representation in the AddressSpace is defined in Table 72.
Table 72 – ConfigurationUpdateType Definition
Attribute |
Value |
|||||
BrowseName |
0:ConfigurationUpdateType |
|||||
IsAbstract |
False |
|||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Other |
|
Subtype of the Enumeration DataType defined in OPC 10000-5. |
||||||
0:HasProperty |
Variable |
0:EnumValues |
0:EnumValueType [] |
0:PropertyType |
|
|
|
||||||
Conformance Units |
||||||
Base Configuration Management |
This event is raised when a configuration been updated.
The SourceNode Property for Events of this type shall be assigned to the NodeId for the Node that owns the configuration (usually the parent of the ConfigurationFile Object). The SourceName for Events of this type shall be the BrowseName of the configuration owner.
Its representation in the AddressSpace is formally defined in Table 73.
Table 73 – ConfigurationUpdatedAuditEventType Definition
Attribute |
Value |
|||||
BrowseName |
0:ConfigurationUpdatedAuditEventType |
|||||
IsAbstract |
True |
|||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Modelling Rule |
|
Subtype of the 0:AuditEventType defined in OPC 10000-5. |
||||||
0:HasProperty |
Variable |
0:OldVersion |
0:VersionTime |
0:PropertyType |
Mandatory |
|
0:HasProperty |
Variable |
0:NewVersion |
0:VersionTime |
0:PropertyType |
Mandatory |
|
|
|
|
|
|
|
|
|
||||||
Conformance Units |
||||||
Base Configuration Management |
This EventType inherits all Properties of the AuditEventType. Their semantic is defined in OPC 10000-5.
The DataType Property specifies the DataType of the configuration that was updated.