Regen sct drivers after refactoring

This commit is contained in:
Douglas Clowes
2014-09-29 15:38:32 +10:00
parent 814c8741c3
commit 29650b420c
20 changed files with 1014 additions and 322 deletions

View File

@@ -384,6 +384,7 @@ proc ::scobj::pfeiffer_hg::mkDriver { sct_controller name device_class simulatio
set scobj_hpath /sics/${name}
hfactory ${scobj_hpath}/status plain user int
hsetprop ${scobj_hpath}/status control true
hsetprop ${scobj_hpath}/status data true
@@ -400,9 +401,7 @@ proc ::scobj::pfeiffer_hg::mkDriver { sct_controller name device_class simulatio
hsetprop ${scobj_hpath} type "part"
hfactory ${scobj_hpath}/pressure plain spy none
hsetprop ${scobj_hpath}/pressure data "true"
hsetprop ${scobj_hpath}/pressure klass "@none"
hsetprop ${scobj_hpath}/pressure type "part"
hfactory ${scobj_hpath}/pressure/sensor plain user float
hsetprop ${scobj_hpath}/pressure/sensor read ${ns}::sendPR1 ${scobj_hpath} readPR1 {PR1}
@@ -428,6 +427,13 @@ proc ::scobj::pfeiffer_hg::mkDriver { sct_controller name device_class simulatio
hsetprop ${scobj_hpath}/pressure/sensor type "part"
hsetprop ${scobj_hpath}/pressure/sensor nxalias "${name}_pressure_sensor"
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/pressure/sensor 1
} else {
::scobj::pfeiffer_hg::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for pfeiffer_hg"
}
hfactory ${scobj_hpath}/pressure/setpoint plain user float
hsetprop ${scobj_hpath}/pressure/setpoint write ${ns}::setPoint ${scobj_hpath} noResponse {@}
hsetprop ${scobj_hpath}/pressure/setpoint noResponse ${ns}::noResponse ${scobj_hpath}
@@ -454,17 +460,17 @@ proc ::scobj::pfeiffer_hg::mkDriver { sct_controller name device_class simulatio
hsetprop ${scobj_hpath}/pressure/setpoint nxalias "${name}_pressure_setpoint"
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/pressure/sensor 1
${sct_controller} write ${scobj_hpath}/pressure/setpoint
} else {
::scobj::pfeiffer_hg::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for pfeiffer_hg"
}
hsetprop ${scobj_hpath}/pressure data "true"
hsetprop ${scobj_hpath}/pressure klass "@none"
hsetprop ${scobj_hpath}/pressure type "part"
ansto_makesctdrive ${name}_pressure_setpoint ${scobj_hpath}/pressure/setpoint ${scobj_hpath}/pressure/sensor ${sct_controller}
hsetprop ${scobj_hpath} klass ${device_class}
hsetprop ${scobj_hpath} data true
hsetprop ${scobj_hpath} debug_threshold 5
if {[string equal -nocase "${simulation_flag}" "false"]} {
ansto_makesctdrive ${name}_pressure_setpoint ${scobj_hpath}/pressure/setpoint ${scobj_hpath}/pressure/sensor ${sct_controller}
}
# mkDriver hook code starts
hsetprop ${scobj_hpath}/pressure/sensor read ${ns}::sendPR1 ${scobj_hpath} ack_enq {PR1}
hsetprop ${scobj_hpath}/pressure/sensor ack_enq ${ns}::ack_enq ${scobj_hpath}