View Issue Details

IDProjectCategoryView StatusLast Update
000654710000-006: MappingsSpecpublic2021-08-31 17:06
ReporterEtienne Rossignon Assigned ToRandy Armstrong  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionno change required 
Summary0006547: Structure Definition in BSD file may content fields already defined in base ExtensionObject definition
Description

In the BSD file associated with the core UA nodeset.xml file, one can find fields

for instance in UABinaryFileDataTypeopc:StructuredType definition the Namespaces fields is defined, but is already defined in baseDatType DataTypeSchemaHeader
<!-- from Opc.Ua.Types.bsd -->
<opc:StructuredType Name="DataTypeSchemaHeader" BaseType="ua:ExtensionObject">
<opc:Field Name="NoOfNamespaces" TypeName="opc:Int32" />
<opc:Field Name="Namespaces" TypeName="opc:String" LengthField="NoOfNamespaces" />
<opc:Field Name="NoOfStructureDataTypes" TypeName="opc:Int32" />
<opc:Field Name="StructureDataTypes" TypeName="tns:StructureDescription" LengthField="NoOfStructureDataTypes" />
<opc:Field Name="NoOfEnumDataTypes" TypeName="opc:Int32" />
<opc:Field Name="EnumDataTypes" TypeName="tns:EnumDescription" LengthField="NoOfEnumDataTypes" />
<opc:Field Name="NoOfSimpleDataTypes" TypeName="opc:Int32" />
<opc:Field Name="SimpleDataTypes" TypeName="tns:SimpleTypeDescription" LengthField="NoOfSimpleDataTypes" />
</opc:StructuredType>

<opc:StructuredType Name="UABinaryFileDataType" BaseType="tns:DataTypeSchemaHeader">
<!-- Start of dupicated fields definitin that are already in the base class -->
<opc:Field Name="NoOfNamespaces" TypeName="opc:Int32" />
<opc:Field Name="Namespaces" TypeName="opc:String" LengthField="NoOfNamespaces" />
<opc:Field Name="NoOfStructureDataTypes" TypeName="opc:Int32" />
<opc:Field Name="StructureDataTypes" TypeName="tns:StructureDescription" LengthField="NoOfStructureDataTypes" />
<opc:Field Name="NoOfEnumDataTypes" TypeName="opc:Int32" />
<opc:Field Name="EnumDataTypes" TypeName="tns:EnumDescription" LengthField="NoOfEnumDataTypes" />
<opc:Field Name="NoOfSimpleDataTypes" TypeName="opc:Int32" />
<opc:Field Name="SimpleDataTypes" TypeName="tns:SimpleTypeDescription" LengthField="NoOfSimpleDataTypes" />
<!-- end of dupicated fields definitin that are already in the base class -->
<opc:Field Name="SchemaLocation" TypeName="opc:String" />
<opc:Field Name="NoOfFileHeader" TypeName="opc:Int32" />
<opc:Field Name="FileHeader" TypeName="tns:KeyValuePair" LengthField="NoOfFileHeader" />
<opc:Field Name="Body" TypeName="ua:Variant" />
</opc:StructuredType>

<opc:StructuredType Name="DataSetMetaDataType" BaseType="tns:DataTypeSchemaHeader">
<!-- Start of dupicated fields definitin that are already in the base class -->
<opc:Field Name="NoOfNamespaces" TypeName="opc:Int32" />
<opc:Field Name="Namespaces" TypeName="opc:String" LengthField="NoOfNamespaces" />
<opc:Field Name="NoOfStructureDataTypes" TypeName="opc:Int32" />
<opc:Field Name="StructureDataTypes" TypeName="tns:StructureDescription" LengthField="NoOfStructureDataTypes" />
<opc:Field Name="NoOfEnumDataTypes" TypeName="opc:Int32" />
<opc:Field Name="EnumDataTypes" TypeName="tns:EnumDescription" LengthField="NoOfEnumDataTypes" />
<opc:Field Name="NoOfSimpleDataTypes" TypeName="opc:Int32" />
<opc:Field Name="SimpleDataTypes" TypeName="tns:SimpleTypeDescription" LengthField="NoOfSimpleDataTypes" />
<!-- end of dupicated fields definitin that are already in the base class -->
<opc:Field Name="Name" TypeName="opc:String" />
<opc:Field Name="Description" TypeName="ua:LocalizedText" />
<opc:Field Name="NoOfFields" TypeName="opc:Int32" />
<opc:Field Name="Fields" TypeName="tns:FieldMetaData" LengthField="NoOfFields" />
<opc:Field Name="DataSetClassId" TypeName="opc:Guid" />
<opc:Field Name="ConfigurationVersion" TypeName="tns:ConfigurationVersionDataType" />
</opc:StructuredType>

In some other place, the fileds are not duplicated for instance :

<!-- other classes definition where fields are correctly described -->
<opc:StructuredType Name="PublishedVariableDataType" BaseType="ua:ExtensionObject">
<opc:Field Name="PublishedVariable" TypeName="ua:NodeId" />
<opc:Field Name="AttributeId" TypeName="opc:UInt32" />
<opc:Field Name="SamplingIntervalHint" TypeName="opc:Double" />
<opc:Field Name="DeadbandType" TypeName="opc:UInt32" />
<opc:Field Name="DeadbandValue" TypeName="opc:Double" />
<opc:Field Name="IndexRange" TypeName="opc:String" />
<opc:Field Name="SubstituteValue" TypeName="ua:Variant" />
<opc:Field Name="NoOfMetaDataProperties" TypeName="opc:Int32" />
<opc:Field Name="MetaDataProperties" TypeName="ua:QualifiedName" LengthField="NoOfMetaDataProperties" />
</opc:StructuredType>

<opc:StructuredType Name="PublishedDataItemsDataType" BaseType="tns:PublishedDataSetSourceDataType">
<opc:Field Name="NoOfPublishedData" TypeName="opc:Int32" />
<opc:Field Name="PublishedData" TypeName="tns:PublishedVariableDataType" LengthField="NoOfPublishedData" />
</opc:StructuredType>

this could create automatic code generators that reiies on the BSD definition to incorrectly create cncoder/decoder code.

Some other structure are already affected:

( extract of warning from node-opcua ):
Warning : find duplicated field from base structure : field name Namespaces baseSchema = DataTypeSchemaHeader schema = UABinaryFileDataType
Warning : find duplicated field from base structure : field name StructureDataTypes baseSchema = DataTypeSchemaHeader schema = UABinaryFileDataType
Warning : find duplicated field from base structure : field name EnumDataTypes baseSchema = DataTypeSchemaHeader schema = UABinaryFileDataType
Warning : find duplicated field from base structure : field name SimpleDataTypes baseSchema = DataTypeSchemaHeader schema = UABinaryFileDataType
Warning : find duplicated field from base structure : field name Namespaces baseSchema = DataTypeSchemaHeader schema = DataSetMetaDataType
Warning : find duplicated field from base structure : field name StructureDataTypes baseSchema = DataTypeSchemaHeader schema = DataSetMetaDataType
Warning : find duplicated field from base structure : field name EnumDataTypes baseSchema = DataTypeSchemaHeader schema = DataSetMetaDataType
Warning : find duplicated field from base structure : field name SimpleDataTypes baseSchema = DataTypeSchemaHeader schema = DataSetMetaDataType
Warning : find duplicated field from base structure : field name SecurityKeyServices baseSchema = PubSubGroupDataType schema = WriterGroupDataType
Warning : find duplicated field from base structure : field name GroupProperties baseSchema = PubSubGroupDataType schema = WriterGroupDataType
Warning : find duplicated field from base structure : field name SecurityKeyServices baseSchema = PubSubGroupDataType schema = ReaderGroupDataType
Warning : find duplicated field from base structure : field name GroupProperties baseSchema = PubSubGroupDataType schema = ReaderGroupDataType
Warning : find duplicated field from base structure : field name RolePermissions baseSchema = Node schema = InstanceNode
Warning : find duplicated field from base structure : field name UserRolePermissions baseSchema = Node schema = InstanceNode
Warning : find duplicated field from base structure : field name References baseSchema = Node schema = InstanceNode
Warning : find duplicated field from base structure : field name RolePermissions baseSchema = Node schema = TypeNode
Warning : find duplicated field from base structure : field name UserRolePermissions baseSchema = Node schema = TypeNode
Warning : find duplicated field from base structure : field name References baseSchema = Node schema = TypeNode
Warning : find duplicated field from base structure : field name DataValues baseSchema = HistoryData schema = HistoryModifiedData

TagsNo tags attached.
Commit Version
Fix Due Date

Activities

Jim Luth

2021-04-13 16:51

administrator   ~0014209

no-fix. Randy to provide explanation.

Randy Armstrong

2021-08-14 03:50

administrator   ~0014744

1) PublishedDataItemsDataType inherits from PublishedDataSetSourceDataType not PublishedVariableDataType so there are no missing duplicated fields.

2) The BSD format provides self-contained descriptions of binary data that could be exposed as the value in the AddressSpace. The duplicated fields are intentional and there is nothing to fix.

3) The BSD has been replaced by the DataTypeDefinition in the UANodeSet so this issue is moot moving forward.

Jim Luth

2021-08-31 17:06

administrator   ~0014803

agreed to no-fix.

Issue History

Date Modified Username Field Change
2021-03-04 18:52 Etienne Rossignon New Issue
2021-04-13 16:51 Jim Luth Note Added: 0014209
2021-04-13 16:51 Jim Luth Assigned To => Randy Armstrong
2021-04-13 16:51 Jim Luth Status new => assigned
2021-06-03 18:40 Jim Luth Project UA Specification => 10000-006: Mappings
2021-08-14 03:50 Randy Armstrong Status assigned => resolved
2021-08-14 03:50 Randy Armstrong Resolution open => no change required
2021-08-14 03:50 Randy Armstrong Note Added: 0014744
2021-08-31 17:06 Jim Luth Status resolved => closed
2021-08-31 17:06 Jim Luth Note Added: 0014803