Regenerate SCT drivers
This commit is contained in:
@@ -88,7 +88,7 @@ proc ::scobj::mercury_valve::checkstatus {tc_root} {
|
||||
set sp "[sct target]"
|
||||
if {[hpropexists [sct] simulated] && [sct simulated] == "true"} {
|
||||
set pv "${sp}"
|
||||
hset ${tc_root}/[sct driveable] ${sp}
|
||||
hupdateif ${tc_root}/[sct driveable] ${sp}
|
||||
}
|
||||
set pv "[hval ${tc_root}/[sct driveable]]"
|
||||
}
|
||||
@@ -261,10 +261,8 @@ proc ::scobj::mercury_valve::mkDriver { sct_controller name device_class simulat
|
||||
|
||||
set scobj_hpath /sics/${name}
|
||||
|
||||
# Start of named group: Valve
|
||||
hfactory ${scobj_hpath}/Valve plain spy none
|
||||
|
||||
# Start of var: sensor
|
||||
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}
|
||||
@@ -288,7 +286,6 @@ proc ::scobj::mercury_valve::mkDriver { sct_controller name device_class simulat
|
||||
hsetprop ${scobj_hpath}/Valve/sensor simulated true
|
||||
}
|
||||
|
||||
# Start of var: setpoint
|
||||
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}
|
||||
@@ -324,7 +321,6 @@ proc ::scobj::mercury_valve::mkDriver { sct_controller name device_class simulat
|
||||
hsetprop ${scobj_hpath}/Valve data "true"
|
||||
hsetprop ${scobj_hpath}/Valve klass "@none"
|
||||
hsetprop ${scobj_hpath}/Valve type "part"
|
||||
# End of named group: Valve
|
||||
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
|
||||
@@ -369,8 +365,8 @@ proc add_mercury_valve {name ip_address tcp_port {id 99} {valve_tol 2}} {
|
||||
::scobj::mercury_valve::add_driver ${name} "environment" ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${valve_tol}
|
||||
}
|
||||
|
||||
clientput "file evaluation of sct_mercury_valve.tcl"
|
||||
::scobj::mercury_valve::sics_log 9 "file evaluation of sct_mercury_valve.tcl"
|
||||
clientput "file evaluation of mercury_valve_sct.tcl"
|
||||
::scobj::mercury_valve::sics_log 9 "file evaluation of mercury_valve_sct.tcl"
|
||||
|
||||
proc ::scobj::mercury_valve::read_config {} {
|
||||
set catch_status [ catch {
|
||||
@@ -457,7 +453,7 @@ proc ::scobj::mercury_valve::read_config {} {
|
||||
if { [llength $missing_list] > 0 } {
|
||||
error "$name is missing configuration values $missing_list"
|
||||
}
|
||||
${ns}::mkDriver sct_${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} {*}$arg_list
|
||||
${ns}::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} {*}$arg_list
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user