diff --git a/NodeSetToAML.cs b/NodeSetToAML.cs index e9e33c1..0a1ef60 100644 --- a/NodeSetToAML.cs +++ b/NodeSetToAML.cs @@ -3440,6 +3440,12 @@ private void AddStructureFieldDefinition( AttributeFamilyType attribute, UANode RemoveUnwantedAttribute(descriptionCreated,"StructureFieldDefinition"); } + if ( field.AllowSubTypes) + { + AddModifyAttribute(structureFieldAttribute.Attribute, + "AllowSubTypes", "Boolean", new Variant(true)); + } + // Remove the NodeId from the structure Field AttributeType nodeIdAttribute = structureFieldAttribute.Attribute[ "DataType" ]; if( nodeIdAttribute != null ) diff --git a/SystemTest/TestStructureFieldDefinition.cs b/SystemTest/TestStructureFieldDefinition.cs index 079c178..f788c33 100644 --- a/SystemTest/TestStructureFieldDefinition.cs +++ b/SystemTest/TestStructureFieldDefinition.cs @@ -55,6 +55,7 @@ public void TestUnwantedAttributes(TestHelper.Uris uriId, uint nodeId) [DataRow(TestHelper.Uris.Test, PublisherQosDataType, "QosCategory", "ArrayDimensions", null, "", "")] [DataRow(TestHelper.Uris.Test, PublisherQosDataType, "QosCategory", "MaxStringLength", "123", "", "")] [DataRow(TestHelper.Uris.Test, PublisherQosDataType, "QosCategory", "IsOptional", "true", "", "")] + [DataRow(TestHelper.Uris.Test, PublisherQosDataType, "QosCategory", "AllowSubTypes", null, "", "")] [DataRow(TestHelper.Uris.Test, PublisherQosDataType, "DatagramQos", "Name", null, "", "")] [DataRow(TestHelper.Uris.Test, PublisherQosDataType, "DatagramQos", "Description", "Transmit Quality of Service", "0", "")] @@ -62,6 +63,7 @@ public void TestUnwantedAttributes(TestHelper.Uris uriId, uint nodeId) [DataRow(TestHelper.Uris.Test, PublisherQosDataType, "DatagramQos", "ArrayDimensions", "3", "1", "")] [DataRow(TestHelper.Uris.Test, PublisherQosDataType, "DatagramQos", "ValueRank", "2", "", "")] [DataRow(TestHelper.Uris.Test, PublisherQosDataType, "DatagramQos", "IsOptional", null, "", "")] + [DataRow(TestHelper.Uris.Test, PublisherQosDataType, "DatagramQos", "AllowSubTypes", "true", "", "")] [DataRow(TestHelper.Uris.Test, PublisherQosDataType, "NoDescription", "Name", null, "", "")] [DataRow(TestHelper.Uris.Test, PublisherQosDataType, "NoDescription", "Description", null, "", "")]