This Methodis used to set the SubscribedDataSetto SubscribedDataSetMirrorTypeused to represents the fields of the DataSetas Variablesin the Subscriber Address Space. This Methodcreates an Objectbelow the SubscribedDataSet and below this Objectit creates a Variable Nodefor every field in the DataSetMetaData.
A Variablerepresenting a field of the DataSetshall be created with the following rules
- TypeDefinition is BaseDataVariableTypeor a subtype.
- The Referencefrom the parent Nodeto the Variableis of type HasComponent.
- The initial AccessLevelof the Variablesis CurrentRead.
- The RolePermissionsis derived from the parent Node.
- The other Attributevalues are taken from the FieldMetaData.
- The propertiesin the FieldMetaDataare created as Propertiesof the Variable.
- The DataTypesare created in the Subscriberfrom the DataSetMetaDataif they do not exist. The NamespaceUriof the created DataTypesshall match the namespace contained in the DataSetMetaData.
The Clientshall be authorized to modify the configuration for the PubSubfunctionality when invoking this Methodon the Server.
Signature
CreateDataSetMirror(
[in]String ParentNodeName
[in]RolePermissionType[]RolePermissions
[out]NodeId ParentNodeId
);
Argument |
Description |
ParentNodeName |
This parameter defines the BrowseName and DisplayName of the parent Nodefor the Variablesrepresenting the fields of the subscribed DataSet. |
RolePermissions |
Value of the RolePermissionsAttribute to be set on the parent Node. This value is also used as RolePermissionsfor all Variablesof the DataSetmirror. |
ParentNodeId |
Method Result Codes
ResultCode |
Description |
Bad_InvalidState |
The DataSetReaderis not configured yet or the ConfigurationVersiondoes not match the version in the Publisher. |
Bad_UserAccessDenied |