diff --git a/NodeSetToAML.cs b/NodeSetToAML.cs index e01d946..e9e33c1 100644 --- a/NodeSetToAML.cs +++ b/NodeSetToAML.cs @@ -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 ); diff --git a/SystemTest/IsAbstract.cs b/SystemTest/IsAbstract.cs index be93b5d..350dda1 100644 --- a/SystemTest/IsAbstract.cs +++ b/SystemTest/IsAbstract.cs @@ -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 output) { if( output.Count == 0 )