Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pygen
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gino Tosti
pygen
Commits
71afde90
Commit
71afde90
authored
3 years ago
by
Gino Tosti
Browse files
Options
Downloads
Patches
Plain Diff
added check on set input values
parent
347dad64
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
templates/BaseJavaIDL.tmpl
+20
-1
20 additions, 1 deletion
templates/BaseJavaIDL.tmpl
templates/CDBInstance.tmpl
+2
-1
2 additions, 1 deletion
templates/CDBInstance.tmpl
test/myDeviceInterfaces.xls
+0
-0
0 additions, 0 deletions
test/myDeviceInterfaces.xls
with
22 additions
and
2 deletions
templates/BaseJavaIDL.tmpl
+
20
−
1
View file @
71afde90
...
...
@@ -416,7 +416,26 @@ public class ${Assembly}BaseImpl extends TCSHardwareDeviceImpl implements ${Asse
}
@Override
public void ${x.SetSheet["Name of command"][$idx]}($($y[$type][4]) arg0) throws IllegalParameterErrorEx,INACTErrorEx {
baciH.set$(($y[$type][4]).capitalize())ValSync(${x.SetSheet["Short name"][$idx]},arg0);
#if str($x.SetSheet["Alarm high"][$idx]) !="nan" and str($x.SetSheet["Alarm high"][$idx]).strip() !="NA" and str($x.SetSheet["Alarm high"][$idx]).strip() !="" and $y[$type][1] != "S"
#if $type[0]=="I" or $type[0]=="U"
$y[$type][4] maxval=str($x.SetSheet["Alarm high"][$idx]).split(".")[0];
#else
$y[$type][4] maxval=$x.SetSheet["Alarm high"][$idx];
#end if
#end if
#if str($x.SetSheet["Alarm low"][$idx]).strip() !="nan" and str($x.SetSheet["Alarm low"][$idx]).strip() !="NA" and str($x.SetSheet["Alarm low"][$idx]).strip() !="" and $y[$type][1] != "S"
#if $type[0]=="I" or $type[0]=="U"
$y[$type][4] minval=str($x.SetSheet["Alarm low"][$idx]).split(".")[0];
#else
$y[$type][4] minval=$x.SetSheet["Alarm low"][$idx];
#end if
#end if
if (arg0>=minval && arg0<=maxval){
baciH.set$(($y[$type][4]).capitalize())ValSync(${x.SetSheet["Short name"][$idx]},arg0);
} else {
m_logger.log(Level.SEVERE, "Value outside range for:"+"$x.SetSheet["Short name"][$idx]");
throws new IllegalParameterErrorEx();
}
}
#end if
...
...
This diff is collapsed.
Click to expand it.
templates/CDBInstance.tmpl
+
2
−
1
View file @
71afde90
...
...
@@ -107,8 +107,9 @@
#else
units=""
#end if
min_timer_trig="0"
#if $y[$type][1] !=
's'
#if $y[$type][1] !=
"S"
min_delta_trig="0"
min_step="1"
#end if
...
...
This diff is collapsed.
Click to expand it.
test/myDeviceInterfaces.xls
0 → 100755
+
0
−
0
View file @
71afde90
File added
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment