Regen sct drivers after refactoring
This commit is contained in:
@@ -257,9 +257,7 @@ proc ::scobj::mercury_valve::mkDriver { sct_controller name device_class simulat
|
||||
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}
|
||||
@@ -276,6 +274,13 @@ proc ::scobj::mercury_valve::mkDriver { sct_controller name device_class simulat
|
||||
hsetprop ${scobj_hpath}/Valve/sensor type "part"
|
||||
hsetprop ${scobj_hpath}/Valve/sensor nxalias "${name}_Valve_sensor"
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/Valve/sensor 5
|
||||
} else {
|
||||
::scobj::mercury_valve::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for mercury_valve"
|
||||
}
|
||||
|
||||
|
||||
hfactory ${scobj_hpath}/Valve/setpoint plain user float
|
||||
hsetprop ${scobj_hpath}/Valve/setpoint write ${ns}::setValve ${scobj_hpath} noResponse {SET:DEV:DB4.G1:AUX:SIG:OPEN:}
|
||||
hsetprop ${scobj_hpath}/Valve/setpoint noResponse ${ns}::noResponse ${scobj_hpath}
|
||||
@@ -302,17 +307,17 @@ proc ::scobj::mercury_valve::mkDriver { sct_controller name device_class simulat
|
||||
hsetprop ${scobj_hpath}/Valve/setpoint nxalias "${name}_Valve_setpoint"
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/Valve/sensor 5
|
||||
${sct_controller} write ${scobj_hpath}/Valve/setpoint
|
||||
} else {
|
||||
::scobj::mercury_valve::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for mercury_valve"
|
||||
}
|
||||
hsetprop ${scobj_hpath}/Valve data "true"
|
||||
hsetprop ${scobj_hpath}/Valve klass "@none"
|
||||
hsetprop ${scobj_hpath}/Valve type "part"
|
||||
ansto_makesctdrive ${name}_Valve_setpoint ${scobj_hpath}/Valve/setpoint ${scobj_hpath}/Valve/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}_Valve_setpoint ${scobj_hpath}/Valve/setpoint ${scobj_hpath}/Valve/sensor ${sct_controller}
|
||||
}
|
||||
# mkDriver hook code goes here
|
||||
} catch_message ]
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
|
||||
Reference in New Issue
Block a user