private void Update(IVariableTypeFactory nodeDesign, UAVariableType nodeSet) { nodeDesign.ArrayDimensions = nodeSet.ArrayDimensions.ExportString(string.Empty); nodeDesign.DataType = AS.ExportBrowseName(NodeId.Parse(nodeSet.DataType), DataTypes.Number); nodeDesign.DefaultValue = nodeSet.Value; nodeDesign.ValueRank = nodeSet.ValueRank.GetValueRank(Log.TraceEvent); }
private void Update(IVariableInstanceFactory nodeDesign, UAVariable nodeSet) { nodeDesign.AccessLevel = nodeSet.AccessLevel.GetAccessLevel(Log.TraceEvent); nodeDesign.ArrayDimensions = nodeSet.ArrayDimensions.ExportString(string.Empty); nodeDesign.DataType = string.IsNullOrEmpty(nodeSet.DataType) ? null : AS.ExportBrowseName(NodeId.Parse(nodeSet.DataType), DataTypes.Number); //TODO add test case must be DataType, must not be abstract nodeDesign.DefaultValue = nodeSet.Value; //TODO add test case must be of type defined by DataType nodeDesign.Historizing = nodeSet.Historizing.Export(false); nodeDesign.MinimumSamplingInterval = nodeSet.MinimumSamplingInterval.Export(0D); nodeDesign.ValueRank = nodeSet.ValueRank.GetValueRank(Log.TraceEvent); if (nodeSet.Translation != null) { Log.TraceEvent(TraceMessage.BuildErrorTraceMessage(BuildError.NotSupportedFeature, "- the Translation element for the UAVariable")); } }