Skip to content

Commit

Permalink
Fixes #139
Browse files Browse the repository at this point in the history
  • Loading branch information
randy-armstrong committed Oct 31, 2023
1 parent 51aae10 commit 14c28ce
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
10 changes: 9 additions & 1 deletion Opc.Ua.ModelCompiler/ModelDesignerValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5073,7 +5073,15 @@ private void BuildInstanceHierarchy2(
child.StaticValue = true;
}
}


if (instance.ModellingRule == ModellingRule.OptionalPlaceholder || instance.ModellingRule == ModellingRule.MandatoryPlaceholder)
{
if (depth > 3)
{
continue;
}
}

nodes.Add(child);

BuildInstanceHierarchy2(instance, browsePath, nodes, references, inherited, depth + 1);
Expand Down
5 changes: 3 additions & 2 deletions Opc.Ua.ModelCompiler/ModelGenerator2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4376,7 +4376,8 @@ private InstanceDesign GetMergedInstance(InstanceDesign instance)
{
"Description",
"Save",
"Value"
"Handle",
"Specification"
};

private bool IsIndeterminateType(InstanceDesign instance)
Expand Down Expand Up @@ -4469,7 +4470,7 @@ private bool WriteTemplate_ListOfPropertiesForType(Template template, Context co

if (!IsOverridden(instance))
{
if (!BuiltInPropertyNames.Contains(instance.SymbolicName.Name))
if (!BuiltInPropertyNames.Contains(instance.SymbolicName.Name) || (instance is VariableDesign && instance.SymbolicName.Name == "Value"))
{
template.AddReplacement("public new", "public");
}
Expand Down
1 change: 1 addition & 0 deletions Tests/DemoModel/BuildModel.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set MODEL=DemoModel
set VERSION=v105
set EXCLUDE=Draft
set INPUT=.
set CSVINPUT=.
set OUTPUT=.
set USEALLOWSUBTYPES=-useAllowSubtypes

Expand Down

0 comments on commit 14c28ce

Please sign in to comment.