Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions NodeSetToAML.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
2 changes: 2 additions & 0 deletions SystemTest/TestStructureFieldDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,15 @@ 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", "")]
[DataRow(TestHelper.Uris.Test, PublisherQosDataType, "DatagramQos", "ArrayDimensions", "2", "0", "")]
[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, "", "")]
Expand Down