Figure 40depicts the PublishSubscribeTypeand the components used to represent the PublishSubscribeObject.

image043.png

Figure 40– PublishSubscribe Object Types overview

The PublishSubscribe Objectis the root node for all PubSubrelated configuration Objects. It is an instance of the PublishSubscribeTypeand a component of the Server Object.

The PublishSubscribeTypecontains the entry point for PublishedDataSetconfiguration, the entry point for PubSubconnections. In addition, it provides Methodsfor connection management.

An instance of this ObjectTyperepresents the root Objectfor all PubSubrelated configuration and metadata Objects. The one instance of this ObjectTypethat represents the root Objectis defined in 8.3.2. The ObjectTypeis formally defined in Table 192.

Table 192– PublishSubscribeType definition

Attribute

Value

BrowseName

PublishSubscribeType

IsAbstract

False

References

Node Class

BrowseName

DataType

TypeDefinition

Modelling Rule

Subtype of PubSubKeyServiceType defined in 8.2.

HasPubSub‌Connection

Object

<ConnectionName>

PubSubConnectionType

Optional‌Placeholder

HasComponent

Method

SetSecurityKeys

Defined in 9.1.3.3.

Optional

HasComponent

Method

AddConnection

Defined in 9.1.3.4.

Optional

HasComponent

Method

RemoveConnection

Defined in 9.1.3.5.

Optional

HasComponent

Object

PublishedDataSets

DataSetFolderType

Mandatory

HasComponent

Object

SubscribedDataSets

SubscribedDataSetFolderType

Optional

HasComponent

Object

PubSubConfiguration

PubSubConfigurationType

Optional

HasComponent

Object

Status

PubSubStatusType

Mandatory

HasComponent

Object

Diagnostics

PubSubDiagnosticsRootType

Optional

HasComponent

Object

PubSubCapablities

PubSubCapabilitiesType

Optional

HasComponent

Object

DataSetClasses

FolderType

Optional

HasProperty

Variable

SupportedTransportProfiles

String[]

PropertyType

Mandatory

HasProperty

Variable

DefaultDatagramPublisherId

UInt64

PropertyType

Optional

HasProperty

Variable

ConfigurationVersion

VersionTime

PropertyType

Optional

HasProperty

Variable

DefaultSecurityKeyServices

Endpoint‌Description[]

PropertyType

Optional

HasProperty

Variable

ConfigurationProperties

KeyValuePair []

PropertyType

Optional

Conformance Units

PubSub Model Base

The PublishSubscribeType ObjectTypeis a concrete type and can be used directly.

The configured connectionObjectsare added as components to the instance of the PublishSubscribeType. ConnectionObjectsmay be configured with product-specific configuration tools or added and removed through the Methods AddConnectionand RemoveConnection. The PubSubConnectionTypeis defined in 9.1.5.2. The HasPubSubConnection ReferenceTypeis defined in 9.1.3.6.

The PublishedDataSets Objectcontains the configured PublishedDataSets. The DataSetFolderTypeis defined in 9.1.4.5.1. The DataSetFolderTypecan be used to build a tree of DataSetFolders.

The SubscribedDataSets Objectcontains the configured SubscribedDataSets. The SubscribedDataSetFolderTypeis defined in 9.1.9.4. The SubscribedDataSetFolderTypecan be used to build a tree of SubscribedDataSetFolders.

The PubSubConfiguration Objectprovides read and write access to the PubSub configuration through a PubSubConfigurationTypewith is a subtype of FileType. The read access is to the complete configuration. The write access allows add, modify and delete operations to the existing PubSub configuration. The PubSubConfigurationTypeand the related DataTypes are defined in 9.1.3.7.

The Status Objectprovides the current operational status of the PublishSubscribefunctionality. The PubSubStatusTypeis defined in 9.1.10. The state machine for the status and the relation to other PubSub Objectslike PubSubConnection, PubSubGroup, DataSetWriterand DataSetReaderare defined in 6.2.1.

The Diagnostics Object provides the current diagnostic information for the PublishSubscribe Object. The PubSubDiagnosticsRootTypeis defined in 9.1.11.7.

The SupportedTransportProfiles Propertyprovides a list of TransportProfileUrissupported by the Server. The TransportProfileUrisare defined in OPC 10000-7.

The default unique PublisherIdfor datagram transport protocols is provided through the Property DefaultDatagramPublisherId. Further details for the PublisherIdare defined in 6.2.7.1.

The ConfigurationVersionrepresents the time of the last configuration change.

The DefaultSecurityKeyServicesprovide the default SecurityKeyServicesused for the PubSubconfiguration. The value is used as default if not overwritten in the groups or DataSetReaders. The general definition for the SecurityKeyServicesparameter is in 6.2.5.4.

The ConfigurationPropertiesis an array of DataType KeyValuePairthat specifies additional properties for the PubSubconfiguration. The KeyValuePairtype is defined in OPC 10000-5and consists of a QualifiedNameand a value of BaseDataType. The mapping of the namespace, name, and value to concrete functionality may be defined by transport protocol mappings, future versions of this document or vendor-specific extensions.

The PubSubCapabilities Objectsprovides the PubSub capablitiy information. The PubSubCapabilitiesType ObjectTypeis defined in 9.1.12.

The DataSetClasses Folderallows a Server to expose DataSetClassessupported. These DataSetClassescan be used to create PublishedDataSets. The Folderwould also be used by standard information models to include standardized DataSetClassesinto their namespace.

The DataSetClasses Folderreferences a list of Variableswhere the Valueof a Variablerepresents a DataSetClass. For each Variable, the Namefield of the BrowseNameequals the Namein the DataSetMetaData. The Objectis formally defined in Table 193.

Table 193– PublishSubscribeType Additional Subcomponents

BrowsePath

References

NodeClass

BrowseName

DataType

TypeDefinition

Others

DataSetClasses

HasComponent

Variable

<DataSetName>

DataSetMetaDataType

BaseDataVariableType

OptionalPlaceholder

This Methodis used to push the security keys for a SecurityGroupinto a Publisheror Subscriber. It is used if Publisheror Subscriberhave no OPC UA Clientfunctionality.

Encryption is required for this Method. The Methodshall return Bad_SecurityModeInsufficient if the communication is not encrypted.

The OPC UA Clientcalling this Methodshall be the SKS application with the ApplicationUrithat matches the ApplicationUriin the SecurityKeyServicesparameter of the WriterGroup, ReaderGroupor DataSetReaderobjects using the SecurityGroupId.

Signature

SetSecurityKeys(

[in]String SecurityGroupId,

[in]String SecurityPolicyUri,

[in]IntegerId CurrentTokenId,

[in]ByteString CurrentKey,

[in]ByteString[]FutureKeys,

[in]Duration TimeToNextKey,

[in]Duration KeyLifetime

);

Argument

Description

SecurityGroupId

The identifier for the SecurityGroup.

SecurityPolicyUri

The URI for the set of algorithms and key lengths used to secure the messages. The SecurityPoliciesare defined in OPC 10000-7.

CurrentTokenId

The SecurityTokenIdthat appears in the header of messages secured with the CurrentKey. It starts at 1 and is incremented by 1 each time the KeyLifetimeelapses even if no keys are requested. If the CurrentTokenId increments past the maximum value of UInt32it restarts at 1.

If the PubSub Objecthas key material from previous SetSecurityKeys Methodcalls, the CurrentTokenIdis used to match the existing list with the fetched list and to eliminate duplicates.

If the CurrentTokenId is unknown, the existing list shall be discarded and replaced.

CurrentKey

The current key used to secure the messages. This key is not used directly since the protocol associated with the PubSubGroup(s)specifies an algorithm to generate distinct keys for different types of cryptography operations.

FutureKeys

An ordered list of future keys that are used when the KeyLifetime elapses.The SecurityTokenId associated with the first key in the list is 1 more than the CurrentTokenId. All following keys have a SecurityTokenId that is incremented by 1 for every key returned.

TimeToNextKey

The time, in milliseconds, before the CurrentKey is expected to expire.

If a Publisheruses this Methodto get the keys from an SKS, the TimeToNextKeyand KeyLifetimeare used to calculate the time the Publishershall use the next key. The TimeToNextKeydefines the time when to switch from CurrentKeyto FutureKeysand the KeyLifetimedefines when to switch from one future key to the next future key.

For a Subscriberthe TimeToNextKeyand KeyLifetimeare used to calculate the time the Subscriberexpects that the Publishersuse the next key. Due to network latency, out of order delivery and the use of keys for several Publishers, a Subscriberneeds to expect some overlap time where NetworkMessagesare received that are using the previous or the next key.

TimeToNextKeyand KeyLifetimeare also used to calculate the time until Publisherand Subscribershall fetch new keys.

KeyLifetime

The lifetime of a key in milliseconds.

The returned keys may expire earlier if the keys are discarded for some reason. An unplanned key rotation is indicated in the NetworkMessageheader before the next key is used to give the Subscribersome time to fetch new keys.

If the CurrentTokenIdin the message is not recognized, the receiver shall call this Methodagain to get new keys.

Method Result Codes

ResultCode

Description

Bad_NotFound

The SecurityGroupIdis unknown.

Bad_UserAccessDenied

The caller is not allowed to set the keys for the SecurityGroup.

Bad_SecurityModeInsufficient

The communication channel is not using encryption.

Table 194specifies the AddressSpacerepresentation for the SetSecurityKeys Method.

Table 194– SetSecurityKeys Method AddressSpace definition

Attribute

Value

BrowseName

SetSecurityKeys

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

ConformanceUnits

PubSub Model Base

This Methodis used to add a new PubSubConnection Objectto the PublishSubscribe Object.

The Clientshall be authorized to modify the configuration for the PubSubfunctionality when invoking this Methodon the Server.

Signature

AddConnection(

[in]PubSubConnectionDataTypeConfiguration,

[out]NodeId ConnectionId

);

Argument

Description

Configuration

Configuration parameters for the PubSubConnection. The parameters and the PubSubConnectionDataTypeare defined in 6.2.7.

ConnectionId

The NodeIdof the new connection.

Method Result Codes

ResultCode

Description

Bad_InvalidArgument

The Serveris not able to apply the name. The name may be too long or may contain invalid characters.

Bad_BrowseNameDuplicated

An Objectwith the name already exists.

Bad_ResourceUnavailable

The Serverhas not enough resources to add the PubSubConnection Object.

Bad_UserAccessDenied

The Sessionuser is not allowed to create a PubSubConnection Object.

Table 195specifies the AddressSpacerepresentation for the AddConnection Method.

Table 195– AddConnection Method AddressSpace definition

Attribute

Value

BrowseName

AddConnection

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

ConformanceUnits

PubSub Model Base

This Methodis used to remove a PubSubConnection Objectfrom the PublishSubscribe Object.

A successful removal of the PubSubConnection Objectremoves all associated groups, DataSetWriterand DataSetReader Objects. Before the Objectsare removed, their state is set to Disabled.

The Clientshall be authorized to modify the configuration for the PubSubfunctionality when invoking this Methodon the Server.

Signature

RemoveConnection(

[in]NodeIdConnectionId

);

Argument

Description

ConnectionId

NodeIdof the PubSubConnection Object to remove from the Server

Method Result Codes

ResultCode

Description

Bad_NodeIdUnknown

The ConnectionIdis unknown.

Bad_UserAccessDenied

The Sessionuser is not allowed to delete the PubSubConnection Object.

Table 196specifies the AddressSpacerepresentation for the RemoveConnection Method.

Table 196– RemoveConnection Method AddressSpace definition

Attribute

Value

BrowseName

RemoveConnection

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

ConformanceUnits

PubSub Model Base

The HasPubSubConnection ReferenceTypeis a concrete ReferenceTypethat can be used directly. It is a subtype of the HasComponent ReferenceType.

The SourceNodeof Referencesof this type shall be the PublishSubscribe Objectdefined in 8.3.2.

The TargetNodeof this ReferenceType shall be an Objectof type PubSubConnectionTypedefined in 9.1.5.2.

Serversshall provide the inverse Referencethat relates a PubSubConnection Objectback to the PublishSubscribeObject.

The representation of the HasPubSubConnection ReferenceTypein the AddressSpaceis specified in Table 197.

Table 197– HasPubSubConnection ReferenceType

Attributes

Value

BrowseName

HasPubSubConnection

InverseName

PubSubConnectionOf

Symmetric

False

IsAbstract

False

References

NodeClass

BrowseName

Comment

Subtype of HasComponent defined in OPC 10000-5.

Conformance Units

PubSub Model Base

This ObjectTyperepresents a FileTypethe can be used to access a PubSub configuration. The PubSubConfigurationType is formally defined in Table 198.

The PubSubConfigurationTypefile is a UA Binary encoded stream containing an instance of UABinaryFileDataTypethat contains a PubSubConfiguration2DataTypeor subtype as Body. The UABinaryFileDataTypeis defined in OPC 10000-5. The PubSubConfiguration2DataTypeis defined in 6.2.12.4.

The FileTypefunctionality is used instead of passing the PubSubConfiguration2DataTypeto read and write Methodsto overcome potential limitations of communication buffers for OPC UA Servicecalls. It is expected that the PubSubConfiguration2DataTypeis used internally in Clientand Serverand that the FileTypeis only used to be able to transfer large configurations.

The Open Methodshall not support modes other than Read(0x01), Write+ EraseExisting(0x06) and Read+ Write(0x03).

When a Clientopens the file for writing the Serverwill not actually update the PubSub configuration until the CloseAndUpdate Methodis called. Simply calling Closewill discard the updates.

When a Clientopens the file for reading and writing, the Client shall follow the following steps.

Access to the PubSubconfiguration may be used by multiple Clientsin parallel. Read access can be done in parallel but open with the Writeflag set requires exclusive access. Therefore Clientsthat have the file open should minimize the time the file is open to the currently required actions. The Clientshall close the file as soon as it completes the sequence of actions needed to read or write the file. Clientswith a user interface shall not keep the file open for user configuration. Such Clientsshould read and close the file to initialize the user interface. If the user changes should be written to the PubSubconfiguration, the Clientshould open the file with Read+ Write(0x03), read the file, compare the version information and then write the changes if the version matches the version from the intial read.

Table 198– PubSubConfigurationType definition

Attribute

Value

BrowseName

PubSubConfigurationType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of FileType defined in OPC 10000-20.

HasComponent

Method

ReserveIds

Defined in 9.1.3.7.5.

Mandatory

HasComponent

Method

CloseAndUpdate

Defined in 9.1.3.7.6.

Mandatory

Conformance Units

PubSub Model Base

This OptionSet defines flags indicating the PubSubConfigurationRefDataTypeoptions.The value of the mask is null, if none of the bits is set.

The PubSubConfigurationRefDataTypeis used to reference a configuration element in a PubSubConfiguration2DataTypestructure. The PubSubConfigurationRefDataTypeindicates the element type referenced and defines the operation to be executed for the referenced configuration element. The possible element operations are ElementAdd, ElementMatch, ElementModifyand ElementRemove.

Only one of the reference bits shall be set. If more than one of these bits are set, the operation shall fail.

The PubSubConfigurationRefMaskvalues are formally defined in Table 199.

Table 199– PubSubConfigurationRefMask values

Value

Bit No.

Description

ElementAdd

0

If this bit is set, the referenced elements is added to the PubSub configuration.

If the name of the element is null or empty a name is assigned.

If PublisherId, WriterGroupIdor DataSetWriterIdare null, unique IDs are assigned.

If this bit is set, the ElementModifyand ElementRemovebits shall be false. If more than one of these bits are set, the operation shall fail.

ElementMatch

1

If this bit is set, the Id and name shall be null and a matching element is searched. This is used to add children to an existing parent configuration object. This flag can be combined with the ElementAddflag to either use an existing element or to add the element if it does not exist.

Match shall only be applied for ReferenceConnection, ReferenceWriterGroupand ReferenceReaderGroup. For all other references the match shall fail with Bad_InvalidArgument.

For the PubSubConnectionDataType, the following structure fields are used for the match, the others are ignored.

For the WriterGroupDataType, the following structure fields are used for the match, the others are ignored.

For the ReaderGroupDataType, the following structure fields are used for the match, the others are ignored.

For the ConnectionPropertiesand GroupPropertiesonly the entries are compared for the match that are provided in the element to match. Additional properties contained in the existing configuration are ignored.

ElementModify

2

If this bit is set, the referenced element will be modified. The related element in the current PubSub configuration is referenced with matching the name of the elements. If no matching name is found, the element operation shall fail.

ElementRemove

3

If this bit is set, the referenced element will be removed. The related element in the current PubSub configuration is referenced with matching the name of the elements. If no matching name is found, the element operation shall fail.

A successful removal of the referenced element shall include the removal of all associated child elements.

ReferenceWriter

4

The element operation is applied to the referenced DataSetWriter.

ReferenceReader

5

The element operation is applied to the referenced DataSetReader.

ReferenceWriterGroup

6

The element operation is applied to the referenced WriterGroup.

ReferenceReaderGroup

7

The element operation is applied to the referenced ReaderGroup.

ReferenceConnection

8

The element operation is applied to the referenced PubSubConnection.

ReferencePubDataset

9

The element operation is applied to the referenced PublishedDataSet.

ReferenceSubDataset

10

The element operation is applied to the referenced SubscribedDataSet.

ReferenceSecurityGroup

11

The element operation is applied to the referenced SecurityGroup.

The access to the security groups may require different user credentials than access to the communication configuration elements.

ReferencePushTarget

12

The element operation is applied to the referenced PubSubKeyServerPushTarget.

The access to the push target configuration may require different user credentials than access to the communication configuration elements.

The PubSubConfigurationRefMaskrepresentation in the AddressSpaceis formally defined in Table 200.

Table 200– PubSubConfigurationRefMask definition

Attribute

Value

BrowseName

PubSubConfigurationRefMask

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the UInt32 type defined in OPC 10000-5.

0:HasProperty

Variable

OptionSetValues

LocalizedText[]

PropertyType

ConformanceUnits

PubSub Model Base

The PubSubConfigurationRefDataType allows to reference an element contained in the PubSubConfiguration2DataType Structure.

The PubSubConfigurationRefDataTypeis formally defined in Table 201.

Table 201– PubSubConfigurationRefDataType structure

Name

Type

Description

PubSubConfigurationRefDataType

Structure

ConfigurationMask

PubSubConfigurationRefMask

Specifies the add, match, modify or remove element operation and the type of configuration element that is referenced.

ElementIndex

UInt16

Specifies the index into the DataSetWriters, DataSetReaders, PublishedDataSets, SubscribedDataSets, SecurityGroupsor PubSubKeyPushTargetsarray of the PubSubConfigurationdepending on the bits ReferenceWriter, ReferenceReader, ReferencePubDataset, ReferenceSubDataset, ReferenceSecurityGroupor ReferencePushTarget.

If this index is not used for referencing, it shall be set to 0.

ConnectionIndex

UInt16

Specifies the index within the Connections array of the PubSubConfigurationif the connection, group, reader or writer bits is set.

If ReferenceConnectionis true, the add, modify or remove element operation is applied. If ReferenceConnectionis false, the name of the connection is used to identify the matching connection in the current PubSub configuration.

If this index is not used for referencing, it shall be set to 0.

GroupIndex

UInt16

If the ReferenceReaderGroupand/or ReferenceReaderbits are true, it speficies the index within the ReaderGroups array of the related connection.

If ReferenceReaderGroupis true, the add, modify or remove element operation is applied. If ReferenceReaderGroupis false, the name of the ReaderGroupis used to identify the matching group in the current PubSub configuration.

If the ReferenceWriterGroupand/or ReferenceWriterbits are true, it specifies the index within the WriterGroups array of the related connection.

If ReferenceWriterGroupis true, the add, modify or delete bit is applied. If ReferenceReaderGroupis false, the name of the ReaderGroupis used to identify the matching group in the current PubSub configuration.

If this index is not used for referencing, it shall be set to 0.

The PubSubConfigurationRefDataTyperepresentation in the AddressSpaceis formally defined in Table 202.

Table 202– PubSubConfigurationRefDataType definition

Attribute

Value

BrowseName

PubSubConfigurationRefDataType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of Structuredefined in OPC 10000-5.

ConformanceUnits

PubSub Model Base

The PubSubConfigurationValueDataType allows to indicate specific values contained in PubSubConfiguration elements.

The PubSubConfigurationValueDataTypeis formally defined in Table 203.

Table 203– PubSubConfigurationValueDataType structure

Name

Type

Description

PubSubConfigurationValueDataType

Structure

ConfigurationElement

PubSubConfigurationRefDataType

Refers to a configuration element in the related PubSubConfiguration2DataType Structure.

Name

String

The name of the referenced PubSub configuration element.

Identifier

BaseDataType

The identifier value used for the referenced element in the PubSub NetworkMessages.

The value is only provided if the element is a PubSubConneciton, WriterGroupor DataSetWriter. The value is null otherwise.

If ConfigurationElement references a PubSubConnection, Identifier will contain the value of the PublisherId.

If ConfigurationElement references a WriterGroup, Identifier will contain the value of the WriterGroupId.

If ConfigurationElement references a DataSetWriter, Identifier will contain the value of the DataSetWriterId.

The PubSubConfigurationValueDataTyperepresentation in the AddressSpaceis formally defined in Table 204.

Table 204– PubSubConfigurationValueDataType definition

Attribute

Value

BrowseName

PubSubConfigurationValueDataType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of Structuredefined in OPC 10000-5.

ConformanceUnits

PubSub Model Base

This Methodreserves unique WriterGroupIdsand DataSetWriterIdsto allow PubSubconfiguration applications to apply unique Ids to new PubSubconfiguration elements when preparing a update to the PubSubconfiguration. It also returns the related default PublisherId. See 6.2.7.1for more details on PublisherIdand default values.

The ID shall be returned from the range 0x8000 - 0xFFFF for internal assignment. The Server shall ensure that the IDs returned are not used in the current PubSubconfiguration or are not reserved yet.

When a Clientreserves IDs, these reservations are valid while the Sessionis open. The reserved IDs can only be used for configuration modifications through the same Session. The reservation is only valid until the ID is used in the configuration or until the Sessionis closed. The IDs can be re-used if a PubSubcomponent that uses the ID is deleted.

The Clientshall be authorized to modify the configuration for the PubSubfunctionality when invoking this Methodon the Server.

Signature

ReserveIds(

[in]String TransportProfileUri,

[in]UInt16 NumReqWriterGroupIds,

[in]UInt16 NumReqDataSetWriterIds,

[out]BaseDataTypeDefaultPublisherId,

[out]UInt16[] WriterGroupIds,

[out]UInt16[] DataSetWriterIds

);

Argument

Description

TransportProfileUri

Transport protocol and message mapping profile scope for the ID request.

NumReqWriterGroupIds

The number of requested Ids for WriterGroups.

NumReqDataSetWriterIds

The number of requested Ids for DataSetWriters.

DefaultPublisherId

The default PublisherIdof the Server for the requested TransportProfileUri.

WriterGroupIds

The reserved Ids for WriterGroups for the requested TransportProfileUri.

DataSetWriterIds

The reserved Ids for DataSetWritersfor the requested TransportProfileUri

Method Result Codes

ResultCode

Description

Bad_UserAccessDenied

The Sessionuser is not allowed to modify the PubSub configuration.

Table 205specifies the AddressSpacerepresentation for the ReserveIds Method.

Table 205– ReserveIds Method AddressSpace definition

Attribute

Value

BrowseName

ReserveIds

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

ConformanceUnits

PubSub Model Base

This Methodcloses the file and applies the changes to the PubSub configuration as defined in the ConfigurationReferencesargument. It can only be called if the file was opened for writing. If the Close Methodis called any cached data is discarded and the PubSub configuration is not changed.

The file content shall be a UABinaryFileDataTypewith a PubSubConfiguration2DataTypeas Body. The ConfigurationReferencesargument specifies the configuration elements to add, modify or remove. Configuration elements in PubSubConfiguration2DataTypethat are not referenced by ConfigurationReferencesmay be used indirectly as parent elements for referencing. In this case only the name of the element is relevant and all other fields of the element are ignored. Configuration elements in PubSubConfiguration2DataTypenot referenced and not used as parent elements are ignored.

Remove element operations shall be processed before any other operations are processed. The PubSubConfiguration2DataTypemay contain duplicate names for cases where elements are removed and added with the same name.

The top-level fields in the PubSubConfiguration2DataTypeare not referenced in ConfigurationReferencesargument. Most of them are only relevant for the read case.

The Clientshall be authorized to modify the configuration for the PubSubfunctionality when invoking this Methodon the Server.

Signature

CloseAndUpdate(

[in]UInt32 FileHandle,

[in]Boolean RequireCompleteUpdate,

[in]PubSubConfigurationRefDataType[]ConfigurationReferences,

[out]Boolean ChangesApplied,

[out]StatusCode[] ReferencesResults,

[out]PubSubConfigurationValueDataType[] ConfigurationValues,

[out]NodeId[] ConfigurationObjects

);

Argument

Description

FileHandle

The handle of the previously opened file.

RequireCompleteUpdate

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

ConfigurationReferences

References to the PubSub configuration elements in the written file that should be added, modified or removed.

ChangesApplied

If true, one or more changes were applied. If RequireCompleteUpdatewas set to false, the ReferencesResultsargument indicates if referenced configuration elements failed.

If false, no changes were applied. The detailed errors are provided in the ReferencesResultsargument.

ReferencesResults

Results of the add, modify, match or remove operation for the referenced element. The length and order of the array shall match the ConfigurationReferencesarray.

ConfigurationValues

The assigned names and identifiers for the elements where empty names or null identifiers where provided in the elements. The values are only provided for elements with the bits ElementAddor ElementMatchset and where a name and identifier was assigned.

ConfigurationObjects

NodeIds of the related Objectsto referenced

If NodeIds are returned, the length and order of the array shall match the ConfigurationReferencesarray.

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

Method Result Codes

ResultCode

Description

Bad_TypeMismatch

The file content is not a UABinaryFileDataTypewith a PubSubConfiguration2DataTypeas Body.

Bad_InvalidArgument

The file handle is not valid.

Bad_InvalidState

The file was not opened for writer access.

Bad_UserAccessDenied

The Sessionuser is not allowed to modify the PubSub configuration.

Bad_NothingToDo

The ConfigurationReferences array is null or empty.

Element Result Codes

ResultCode

Description

Bad_BrowseNameDuplicated

An element with the name already exists. The element cannot be added.

Bad_NoMatch

An element with the name does not exist or there is no element with matching parameters. The element cannot be matched, modified or removed.

Bad_NotFound

One of the parent elements does not exist or was not added or matched. The element cannot be processed.

Bad_InvalidArgument

The element reference is invalid or has invalid index entries.

Bad_UserAccessDenied

The user has not the rights to access the element.

Table 206specifies the AddressSpacerepresentation for the CloseAndUpdate Method.

Table 206– CloseAndUpdate Method AddressSpace definition

Attribute

Value

BrowseName

CloseAndUpdate

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

ConformanceUnits

PubSub Model Base