Generated sct tcl drivers from sct templates.

This commit is contained in:
Ferdi Franceschini
2014-08-06 10:59:14 +10:00
parent 18c862a609
commit 639e4dc3c8
31 changed files with 426 additions and 131 deletions

View File

@@ -257,17 +257,21 @@ proc ::scobj::mercury_valve::mkDriver { sct_controller name id valve_tol } {
set scobj_hpath /sics/${name}
hfactory ${scobj_hpath}/Valve plain spy none
hsetprop ${scobj_hpath}/Valve data "true"
hsetprop ${scobj_hpath}/Valve klass "@none"
hsetprop ${scobj_hpath}/Valve type "part"
hfactory ${scobj_hpath}/Valve/sensor plain user float
hsetprop ${scobj_hpath}/Valve/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB4.G1:AUX:SIG:OPEN}
hsetprop ${scobj_hpath}/Valve/sensor rdValue ${ns}::rdValue ${scobj_hpath}
hsetprop ${scobj_hpath}/Valve/sensor control true
hsetprop ${scobj_hpath}/Valve/sensor data true
hsetprop ${scobj_hpath}/Valve/sensor mutable false
hsetprop ${scobj_hpath}/Valve/sensor mutable true
hsetprop ${scobj_hpath}/Valve/sensor nxsave true
hsetprop ${scobj_hpath}/Valve/sensor permlink data_set "G[format "%02d" ${id}]S07"
hsetprop ${scobj_hpath}/Valve/sensor @description "G[format "%02d" ${id}]S07"
hsetprop ${scobj_hpath}/Valve/sensor oldval 0.0
hsetprop ${scobj_hpath}/Valve/sensor klass "parameter"
hsetprop ${scobj_hpath}/Valve/sensor sdsinfo "::nexus::scobj::sdsinfo"
hsetprop ${scobj_hpath}/Valve/sensor type "part"
hsetprop ${scobj_hpath}/Valve/sensor nxalias "${name}_Valve_sensor"
@@ -283,7 +287,7 @@ proc ::scobj::mercury_valve::mkDriver { sct_controller name id valve_tol } {
hsetprop ${scobj_hpath}/Valve/setpoint driveable Valve/sensor
hsetprop ${scobj_hpath}/Valve/setpoint control true
hsetprop ${scobj_hpath}/Valve/setpoint data true
hsetprop ${scobj_hpath}/Valve/setpoint mutable false
hsetprop ${scobj_hpath}/Valve/setpoint mutable true
hsetprop ${scobj_hpath}/Valve/setpoint nxsave true
hsetprop ${scobj_hpath}/Valve/setpoint lowerlimit 0
hsetprop ${scobj_hpath}/Valve/setpoint upperlimit 100
@@ -291,6 +295,7 @@ proc ::scobj::mercury_valve::mkDriver { sct_controller name id valve_tol } {
hsetprop ${scobj_hpath}/Valve/setpoint permlink data_set "G[format "%02d" ${id}]SP07"
hsetprop ${scobj_hpath}/Valve/setpoint @description "G[format "%02d" ${id}]SP07"
hsetprop ${scobj_hpath}/Valve/setpoint oldval 0.0
hsetprop ${scobj_hpath}/Valve/setpoint klass "parameter"
hsetprop ${scobj_hpath}/Valve/setpoint sdsinfo "::nexus::scobj::sdsinfo"
hsetprop ${scobj_hpath}/Valve/setpoint settle_time "30"
hsetprop ${scobj_hpath}/Valve/setpoint type "drivable"
@@ -303,6 +308,7 @@ proc ::scobj::mercury_valve::mkDriver { sct_controller name id valve_tol } {
::scobj::mercury_valve::sics_log 9 "[environment_simulation] => No poll/write for mercury_valve"
}
hsetprop ${scobj_hpath} klass environment
hsetprop ${scobj_hpath} data true
hsetprop ${scobj_hpath} debug_threshold 5
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
ansto_makesctdrive ${name}_Valve_setpoint ${scobj_hpath}/Valve/setpoint ${scobj_hpath}/Valve/sensor ${sct_controller}