One typo and forgetting to clear a temporary variable meant that the list of candidates for removal never shrank while pruning reflectometer/config/motors/sct_batmotor.tcl The beam attenuator is on axis D not A. Also provide statemon feedback, "busy" or "idle" sans/config/velsel/velsel.tcl Update velocity selector parameters for NVS 43 SICS-374 sans/config/velsel/sct_velsel.tcl Set velocity selector identifier script_context_util.tcl Don't override the "klass' attribute, just make sure that it matches the hdb klass property if it's defined. event.h and statemon.c Added statemon BUSY and IDLE events for the scbat because it when it oscillates it's busy doing something. r2875 | ffr | 2010-01-22 20:41:36 +1100 (Fri, 22 Jan 2010) | 18 lines
51 lines
1.4 KiB
Tcl
51 lines
1.4 KiB
Tcl
namespace eval ::scobj { }
|
|
proc ::scobj::set_required_props {hpath} {
|
|
foreach child [hlist $hpath] {
|
|
hsetprop $hpath/$child data false
|
|
::scobj::set_required_props $hpath/$child
|
|
}
|
|
}
|
|
|
|
proc ::scobj::hinit_nodeprops {node hpath} {
|
|
hsetprop $hpath nxalias $node
|
|
foreach {prop propval} [subst {
|
|
control true
|
|
data true
|
|
nxsave true
|
|
mutable true
|
|
klass parameter
|
|
sdsinfo ::nexus::scobj::sdsinfo
|
|
long_name $node
|
|
}] {
|
|
if {[hpropexists $hpath $prop] == false} {
|
|
hsetprop $hpath $prop $propval
|
|
}
|
|
}
|
|
}
|
|
proc ::scobj::hinit_scobjprops {scobj hpath} {
|
|
if {[hpropexists $hpath klass]} {
|
|
sicslist setatt $scobj klass [hgetpropval $hpath klass]
|
|
}
|
|
if {[hpropexists $hpath long_name]} {
|
|
sicslist setatt $scobj long_name [hgetpropval $hpath long_name]
|
|
} else {
|
|
sicslist setatt $scobj long_name $scobj
|
|
}
|
|
hsetprop $hpath sicsdev $scobj
|
|
::scobj::hinit_nodeprops $scobj $hpath
|
|
}
|
|
##
|
|
# @brief Initialise the hdb properties required for generating the GumTree interface and
|
|
# saving data for script context objects
|
|
# @param scobj, name of script context object
|
|
# @param par, optional parameter
|
|
proc ::scobj::hinitprops {scobj {par "@none"}} {
|
|
if {$par == "@none"} {
|
|
set hpath /sics/$scobj
|
|
::scobj::hinit_scobjprops $scobj $hpath
|
|
} else {
|
|
set hpath /sics/$scobj/$par
|
|
::scobj::hinit_nodeprops ${scobj}_$par $hpath
|
|
}
|
|
}
|