Skip to content
Snippets Groups Projects

Disambiguate tag names in RCG

Merged Erik von Reis requested to merge erik.vonreis/advligorts:disambiguate_goto_tags into master
1 file
+ 21
0
Compare changes
  • Side-by-side
  • Inline
@@ -1542,6 +1542,26 @@ if (0) {
}
}
#// \b sub \b prefix_tag_names \n
#// Prefix the system name on all child From and Goto tag names
#// Use only on top level subsystems because they are not flattened
#// necessary to differentiate top level tags from other tags.
sub prefix_tag_names {
my ($node, $sysname) = @_;
foreach (@{$node->{NEXT}}) {
my $btype = ${$_->{FIELDS}}{BlockType};
if(($btype eq "From") || ($btype eq "Goto")) {
print("prefixing tag ${$_->{FIELDS}}{GotoTag} to ");
${$_->{FIELDS}}{GotoTag} = $sysname . "_" . ${$_->{FIELDS}}{GotoTag};
print("${$_->{FIELDS}}{GotoTag}\n");
}
prefix_tag_names($_, $sysname);
}
}
#// \b sub \b flatten_nested_subsystems \n
sub flatten_nested_subsystems {
my ($node) = @_;
@@ -1584,6 +1604,7 @@ if (1) {
flatten($ssub);
}
}
prefix_tag_names($_, ${$_->{FIELDS}}{Name});
}
}
#print ::EPICS "test_points ONE_PPS $::extraTestPoints\n";
Loading