The PublishedDataItemsType is used to select a list of OPC UA Variables as the source for the creation of DataSets sent through one or more DataSetWriters.
The PublishedDataItemsType is formally defined Table 226.
Table 226 – PublishedDataItemsType definition
Attribute |
Value |
||||
BrowseName |
PublishedDataItemsType |
||||
IsAbstract |
False |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
Subtype of PublishedDataSetType defined in 9.1.4.2. |
|||||
HasProperty |
Variable |
PublishedData |
PublishedVariableDataType[] |
PropertyType |
Mandatory |
HasComponent |
Method |
AddVariables |
Defined in 9.1.4.3.2. |
Optional |
|
HasComponent |
Method |
RemoveVariables |
Defined in 9.1.4.3.3. |
Optional |
|
Conformance Units |
|||||
PubSub Model PublishedDataSet |
The PublishedDataItemsType ObjectType is a concrete type and can be used directly.
The PublishedData is defined in 6.2.3.7.1. Existing entries in the array can be changed by writing the new settings to the Variable Value. A new Value shall be rejected with Bad_OutOfRange if the array size would be changed. Entries in the array can be added and removed with the Methods AddVariables and RemoveVariables.
The index into the list of entries in the PublishedData has an important role for Subscribers and for configuration tools. It is used as a handle to reference the entry in configuration actions like RemoveVariables or the Value in DataSetMessages received by Subscribers. The index may change after configuration changes. Changes are indicated by the ConfigurationVersion and applications working with the index shall always check the ConfigurationVersion before using the index.
This Method is used to add Variables to the PublishedData Property. The PublishedData contains a list of published Variables of a PublishedDataItemsType Object. The information provided in the input Arguments and information available for the added Variables is also used to create the content of the DataSetMetaData Property. The mapping to the DataSetMetaData is described for the input Arguments.
Variables shall be added at the end of the list in PublishedData. This ensures that Subscribers are only affected by the change if they are interested in the added Variables.
If at least one Variable was added to the PublishedData, the MinorVersion of the ConfigurationVersion shall be updated. The ConfigurationVersionDataType and the rules for setting the version are defined in 6.2.3.2.6.
The Client shall be authorized to modify the configuration for the PubSub functionality when invoking this Method on the Server.
Signature
AddVariables (
[in]ConfigurationVersionDataType ConfigurationVersion,
[in]String[] FieldNameAliases,
[in]Boolean[] PromotedFields,
[in]PublishedVariableDataType[] VariablesToAdd,
[out]ConfigurationVersionDataType NewConfigurationVersion,
[out] StatusCode[] AddResults
);
Argument |
Description |
ConfigurationVersion |
Configuration version of the DataSet. The configuration version shall match the entire current configuration version of the Object when the Method call is processed. If it does not match, the result Bad_InvalidState shall be returned. The ConfigurationVersionDataType is defined in 6.2.3.2.6. |
FieldNameAliases |
The names assigned to the selected Variables for the fields in the DataSetMetaData and in the DataSetMessages for tagged message encoding. The size and the order of the array shall match the VariablesToAdd. The string shall be used to set the name field in the FieldMetaData that is part of the DataSetMetaData. |
PromotedFields |
The flags indicating if the corresponding field is promoted to the DataSetMessage header. The size and the order of the array shall match the VariablesToAdd. The flag is used to set the PromotedField flag in the fieldFlags parameter in the FieldMetaData. |
VariablesToAdd |
Array of Variables to add to PublishedData and the related configuration settings. Successfully added variables are appended to the end of the list of published variables configured in the PublishedData Property. Failed variables are not added to the list. The PublishedVariableDataType is defined in 6.2.3.7.1. The parameters builtInType, dataType, valueRank and arrayDimensions of the FieldMetaData are filled from corresponding Variable Attributes. |
NewConfigurationVersion |
Returns the new configuration version of the PublishedDataSet. |
AddResults |
The result codes for the variables to add. Variables exceeding the maximum number of items in the Object are rejected with Bad_TooManyVariables. |
Method Result Codes
ResultCode |
Description |
Bad_NothingToDo |
An empty list of variables was provided. |
Bad_InvalidState |
The configuration version did not match the current state of the object. |
Bad_NotWritable |
The DataSet is based on a DataSetClass and the size of the PublishedData array cannot be changed. |
Bad_UserAccessDenied |
The Session user is not allowed to configure the object. |
Operation Result Codes
ResultCode |
Description |
Bad_NodeIdInvalid |
See OPC 10000-4 for the description of this result code. |
Bad_NodeIdUnknown |
See OPC 10000-4 for the description of this result code. |
Bad_IndexRangeInvalid |
See OPC 10000-4 for the description of this result code. |
Bad_IndexRangeNoData |
See OPC 10000-4 for the description of this result code. If the ArrayDimensions have a fixed length that cannot change and no data exists within the range of indexes specified, Bad_IndexRangeNoData is returned in AddVariables. Otherwise, if the length of the array is dynamic, the Publisher shall insert this status in a DataSet if no data exists within the range. |
Bad_TooManyVariables |
The Publisher has reached its maximum number of items for the PublishedDataItemsType object. |
Table 227 specifies the AddressSpace representation for the AddVariables Method.
Table 227 – AddVariables Method AddressSpace definition
Attribute |
Value |
||||
BrowseName |
AddVariables |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
HasProperty |
Variable |
InputArguments |
Argument[] |
PropertyType |
Mandatory |
HasProperty |
Variable |
OutputArguments |
Argument[] |
PropertyType |
Mandatory |
ConformanceUnits |
|||||
PubSub Model PublishedDataSet |
This Method is used to remove Variables from the PublishedData list. It contains the list of published Variables of a PublishedDataItemsType Object.
A caller shall read the current Values of PublishedData and ConfigurationVersion prior to calling this Method, to ensure the use of the correct index of the Variables that are being removed.
If at least one Variable was successfully removed from the PublishedData, the MajorVersion of the ConfigurationVersion shall be updated. The ConfigurationVersionDataType and the rules for setting the version are defined in 6.2.3.2.6.
The order of the remaining Variables in the PublishedData shall be preserved.
The Client shall be authorized to modify the configuration for the PubSub functionality when invoking this Method on the Server.
Signature
RemoveVariables (
[in]ConfigurationVersionDataType ConfigurationVersion,
[in]UInt32[] VariablesToRemove,
[out]ConfigurationVersionDataType NewConfigurationVersion,
[out] StatusCode[] RemoveResults
);
Argument |
Description |
ConfigurationVersion |
Configuration version of the DataSet. The configuration version and the indices passed through VariablesToRemove shall match the entire current configuration version of the Object when the Method call is processed. If it does not match, the result Bad_InvalidState shall be returned. The ConfigurationVersionDataType is defined in 6.2.3.2.6. |
VariablesToRemove |
Array of indices of Variables to remove from the list of Variables configured in PublishedData of the PublishedDataItemsType. This matches the list of fields configured in the DataSetMetaData of the PublishedDataSetType. |
NewConfigurationVersion |
Returns the new configuration version of the DataSet. |
RemoveResults |
The result codes for each of the variables to remove. |
Method Result Codes
ResultCode |
Description |
Bad_NothingToDo |
An empty list of variables was provided. |
Bad_InvalidState |
The configuration version did not match the current state of the Object. |
Bad_UserAccessDenied |
Operation Result Codes
ResultCode |
Description |
Bad_InvalidArgument |
The passed index was invalid. |
Table 228 specifies the AddressSpace representation for the RemoveVariables Method.
Table 228 – RemoveVariables Method AddressSpace definition
Attribute |
Value |
||||
BrowseName |
RemoveVariables |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
HasProperty |
Variable |
InputArguments |
Argument[] |
PropertyType |
Mandatory |
HasProperty |
Variable |
OutputArguments |
Argument[] |
PropertyType |
Mandatory |
ConformanceUnits |
|||||
PubSub Model PublishedDataSet |