Skip to content

Commit 95f03df

Browse files
Add AllowSubTypes back in (#147)
They were removed from a bad interpretation of the spec part 6
1 parent a248217 commit 95f03df

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

NodeSetToAML.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3440,6 +3440,12 @@ private void AddStructureFieldDefinition( AttributeFamilyType attribute, UANode
34403440
RemoveUnwantedAttribute(descriptionCreated,"StructureFieldDefinition");
34413441
}
34423442

3443+
if ( field.AllowSubTypes)
3444+
{
3445+
AddModifyAttribute(structureFieldAttribute.Attribute,
3446+
"AllowSubTypes", "Boolean", new Variant(true));
3447+
}
3448+
34433449
// Remove the NodeId from the structure Field
34443450
AttributeType nodeIdAttribute = structureFieldAttribute.Attribute[ "DataType" ];
34453451
if( nodeIdAttribute != null )

SystemTest/TestStructureFieldDefinition.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,15 @@ public void TestUnwantedAttributes(TestHelper.Uris uriId, uint nodeId)
5555
[DataRow(TestHelper.Uris.Test, PublisherQosDataType, "QosCategory", "ArrayDimensions", null, "", "")]
5656
[DataRow(TestHelper.Uris.Test, PublisherQosDataType, "QosCategory", "MaxStringLength", "123", "", "")]
5757
[DataRow(TestHelper.Uris.Test, PublisherQosDataType, "QosCategory", "IsOptional", "true", "", "")]
58+
[DataRow(TestHelper.Uris.Test, PublisherQosDataType, "QosCategory", "AllowSubTypes", null, "", "")]
5859

5960
[DataRow(TestHelper.Uris.Test, PublisherQosDataType, "DatagramQos", "Name", null, "", "")]
6061
[DataRow(TestHelper.Uris.Test, PublisherQosDataType, "DatagramQos", "Description", "Transmit Quality of Service", "0", "")]
6162
[DataRow(TestHelper.Uris.Test, PublisherQosDataType, "DatagramQos", "ArrayDimensions", "2", "0", "")]
6263
[DataRow(TestHelper.Uris.Test, PublisherQosDataType, "DatagramQos", "ArrayDimensions", "3", "1", "")]
6364
[DataRow(TestHelper.Uris.Test, PublisherQosDataType, "DatagramQos", "ValueRank", "2", "", "")]
6465
[DataRow(TestHelper.Uris.Test, PublisherQosDataType, "DatagramQos", "IsOptional", null, "", "")]
66+
[DataRow(TestHelper.Uris.Test, PublisherQosDataType, "DatagramQos", "AllowSubTypes", "true", "", "")]
6567

6668
[DataRow(TestHelper.Uris.Test, PublisherQosDataType, "NoDescription", "Name", null, "", "")]
6769
[DataRow(TestHelper.Uris.Test, PublisherQosDataType, "NoDescription", "Description", null, "", "")]

0 commit comments

Comments
 (0)