Regenerate with nxalias and sdsinfo
This commit is contained in:
@@ -34,6 +34,7 @@ proc ::scobj::isotech_ps::checkrange {tc_root} {
|
||||
# upperlimit not set, use target
|
||||
set hilimit [sct target]
|
||||
}
|
||||
# hook code goes here
|
||||
if { ${setpoint} < ${lolimit} || ${setpoint} > ${hilimit} } {
|
||||
error "setpoint ${setpoint} violates limits (${lolimit}..${hilimit}) on [sct]"
|
||||
}
|
||||
@@ -50,6 +51,7 @@ proc ::scobj::isotech_ps::getValue {tc_root nextState cmd_str} {
|
||||
hdelprop [sct] geterror
|
||||
}
|
||||
set cmd "${cmd_str}"
|
||||
# hook code goes here
|
||||
debug_log 1 "getValue sct send ${cmd}"
|
||||
sct send "${cmd}"
|
||||
return ${nextState}
|
||||
@@ -61,6 +63,7 @@ proc ::scobj::isotech_ps::getValue {tc_root nextState cmd_str} {
|
||||
proc ::scobj::isotech_ps::noResponse {tc_root} {
|
||||
set catch_status [ catch {
|
||||
debug_log 1 "noResponse tc_root=${tc_root} sct=[sct] resp=[sct result]"
|
||||
# hook code goes here
|
||||
return "idle"
|
||||
} catch_message ]
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
@@ -145,6 +148,7 @@ proc ::scobj::isotech_ps::setValue {tc_root nextState cmd_str} {
|
||||
}
|
||||
set par [sct target]
|
||||
set cmd "${cmd_str}${par}"
|
||||
# hook code goes here
|
||||
if { [hpropexists [sct] driving] } {
|
||||
if { [hpropexists [sct] writestatus] && [sct writestatus] == "start" } {
|
||||
sct driving 1
|
||||
@@ -245,7 +249,9 @@ proc ::scobj::isotech_ps::mk_sct_isotech_ps { sct_controller name } {
|
||||
hsetprop ${scobj_hpath}/amps nxsave true
|
||||
hsetprop ${scobj_hpath}/amps units A
|
||||
hsetprop ${scobj_hpath}/amps oldval 0.0
|
||||
hsetprop ${scobj_hpath}/amps sdsinfo "::nexus::scobj::sdsinfo"
|
||||
hsetprop ${scobj_hpath}/amps type "part"
|
||||
hsetprop ${scobj_hpath}/amps nxalias "${name}_amps"
|
||||
|
||||
hfactory ${scobj_hpath}/relay plain user int
|
||||
hsetprop ${scobj_hpath}/relay read ${ns}::getValue ${scobj_hpath} read_relay {F}
|
||||
@@ -258,7 +264,9 @@ proc ::scobj::isotech_ps::mk_sct_isotech_ps { sct_controller name } {
|
||||
hsetprop ${scobj_hpath}/relay mutable true
|
||||
hsetprop ${scobj_hpath}/relay nxsave true
|
||||
hsetprop ${scobj_hpath}/relay oldval 0
|
||||
hsetprop ${scobj_hpath}/relay sdsinfo "::nexus::scobj::sdsinfo"
|
||||
hsetprop ${scobj_hpath}/relay type "part"
|
||||
hsetprop ${scobj_hpath}/relay nxalias "${name}_relay"
|
||||
|
||||
hfactory ${scobj_hpath}/volts plain user float
|
||||
hsetprop ${scobj_hpath}/volts read ${ns}::getValue ${scobj_hpath} rdValue {V}
|
||||
@@ -272,7 +280,9 @@ proc ::scobj::isotech_ps::mk_sct_isotech_ps { sct_controller name } {
|
||||
hsetprop ${scobj_hpath}/volts nxsave true
|
||||
hsetprop ${scobj_hpath}/volts units V
|
||||
hsetprop ${scobj_hpath}/volts oldval 0.0
|
||||
hsetprop ${scobj_hpath}/volts sdsinfo "::nexus::scobj::sdsinfo"
|
||||
hsetprop ${scobj_hpath}/volts type "part"
|
||||
hsetprop ${scobj_hpath}/volts nxalias "${name}_volts"
|
||||
|
||||
if {[SplitReply [environment_simulation]]=="false"} {
|
||||
${sct_controller} poll ${scobj_hpath}/amps 5
|
||||
@@ -282,6 +292,7 @@ proc ::scobj::isotech_ps::mk_sct_isotech_ps { sct_controller name } {
|
||||
${sct_controller} write ${scobj_hpath}/volts
|
||||
}
|
||||
hsetprop ${scobj_hpath} klass environment
|
||||
# hook code goes here
|
||||
} catch_message ]
|
||||
handle_exception ${catch_status} ${catch_message}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user