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
1 change: 1 addition & 0 deletions NodeSetToAML.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3334,6 +3334,7 @@ private void AddAttributeData( AttributeFamilyType attribute, UANode uaNode )
AttributeType isAbstractAttribute = AddModifyAttribute(
attribute.Attribute, "IsAbstract", "Boolean", true);
isAbstractAttribute.AdditionalInformation.Append(OpcUaTypeOnly);
RemoveUnwantedAttribute(isAbstractAttribute, "NodeId");
}

nodeIdAttribute.AdditionalInformation.Append( OpcUaTypeOnly );
Expand Down
27 changes: 27 additions & 0 deletions SystemTest/IsAbstract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,33 @@ public void TestInterfaceIsAbstract(bool isNull)
}
}


[TestMethod, Timeout(TestHelper.UnitTestTimeout)]
public void TestNodeIdInIsAbstract()
{
CAEXDocument document = GetDocument("AmlFxTest.xml.amlx");
int counter = 0;
foreach( AttributeTypeLibType libType in document.AttributeTypeLib )
{
foreach (AttributeFamilyType familyType in libType)
{
AttributeType isAbstract = familyType.Attribute["IsAbstract"];
if ( isAbstract != null )
{
AttributeType nodeId = isAbstract.Attribute["NodeId"];
if (nodeId != null)
{
Console.WriteLine(familyType.Name + " has NodeId in IsAbstract");
counter++;
// Error
}
}
}
}
Assert.AreEqual(0, counter, "There were " + counter.ToString() +
" IsAbstract attributes with NodeId sub-attributes");
}

public void WriteTestFile( DirectoryInfo outputDirectory, string fileName, List<string> output)
{
if( output.Count == 0 )
Expand Down