diff --git a/NodeSetToAML.cs b/NodeSetToAML.cs index e684fc5..611b1e8 100644 --- a/NodeSetToAML.cs +++ b/NodeSetToAML.cs @@ -3426,6 +3426,11 @@ InternalElementType RecursiveAddModifyInstance(ref T parent, UANode toAdd, bo AddModifyAttribute( ie.Attribute, "ValueRank", "Int32", varnode.ValueRank ); SetArrayDimensions( ie, varnode.ArrayDimensions ); + + if (varnode.MinimumSamplingInterval > 0) + { + AddModifyAttribute(ie.Attribute, "MinimumSamplingInterval", "Double", varnode.MinimumSamplingInterval); + } } if( toAdd.DecodedNodeId.Equals( Opc.Ua.ObjectIds.Server_ServerDiagnostics ) ) diff --git a/SystemTest/NodeSetFiles/TestAml.xml b/SystemTest/NodeSetFiles/TestAml.xml index eba26fe..96acbf3 100644 --- a/SystemTest/NodeSetFiles/TestAml.xml +++ b/SystemTest/NodeSetFiles/TestAml.xml @@ -3502,14 +3502,44 @@ - - - + + NegativeMinimumSamplingInterval + + i=63 + ns=1;i=5013 + + + -1 + + + + + ZeroMinimumSamplingInterval + + i=63 + ns=1;i=5013 + + + 0 + + + + + PositiveMinimumSamplingInterval + + i=63 + ns=1;i=5013 + + + 1 + + + diff --git a/SystemTest/TestAttributes.cs b/SystemTest/TestAttributes.cs index 555e901..ac5aa6d 100644 --- a/SystemTest/TestAttributes.cs +++ b/SystemTest/TestAttributes.cs @@ -1,4 +1,4 @@ -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.VisualStudio.TestTools.UnitTesting; using System.IO; using Aml.Engine.AmlObjects; using Aml.Engine.CAEX; @@ -43,6 +43,11 @@ public class TestAttributes [DataRow("IsAbstract", "2881", "false", true, true, DisplayName = "AcknowledgeableConditionType should not be Abstract")] + [DataRow("MinimumSamplingInterval", "2253", "", + false, true, DisplayName = "Server should not have MinimumSamplingInterval")] + [DataRow("MinimumSamplingInterval", "2994", "1000", + true, true, DisplayName = "Auditing should have MinimumSamplingInterval")] + [DataRow("ValueRank", "62", "-2", true, true, DisplayName = "BaseVariableType ValueRank -2")] [DataRow("ValueRank", "58", "",