Don't make the temperature getset-macro or select the control sensor for the script validator instance of SICS. (fixed in-situ) Use new ls340 and ls336 controllers. script_context_util.tcl Modified hinitprops so that it can take sub-paths nxscripts_common_1.tcl Added ::nexus::OnFirstsave ::nexus:OnLastSave to register commands which will be executed on the first and last save of a data file. sct_julabo_lh45.tcl Added start_temperature and end_temperature parameters to record the initial and final temperature readings in the data files. Also only set the setpoint if the Julabo is in remote mode. sct_positmotor_common.tcl Report 99999 if a posit motor table is out of range. quokka guide_configuration.tcl Updated aperture size for p1, p1lp, p1lens in the guide configuration table. r2969 | ffr | 2010-07-01 22:09:09 +1000 (Thu, 01 Jul 2010) | 20 lines
62 lines
1.7 KiB
Tcl
62 lines
1.7 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
|
|
}
|
|
if [sicslist exists $scobj "argtype"] {
|
|
hsetprop $hpath argtype [SplitReply [sicslist $scobj argtype]]
|
|
}
|
|
if [sicslist exists $scobj "values"] {
|
|
hsetprop $hpath values [SplitReply [sicslist $scobj values]]
|
|
}
|
|
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 args} {
|
|
if {$args == ""} {
|
|
set hpath /sics/$scobj
|
|
::scobj::hinit_scobjprops $scobj $hpath
|
|
} else {
|
|
set hpath /sics/$scobj
|
|
::scobj::hinit_scobjprops $scobj $hpath
|
|
foreach p $args {
|
|
set hpath /sics/$scobj/$p
|
|
set idPath [string map {/ _} $p]
|
|
::scobj::hinit_nodeprops ${scobj}_$idPath $hpath
|
|
}
|
|
}
|
|
}
|