script_context_util.tcl

hinitprops can now be called with a list of parameters.
SICS-403 hinitprops will now check for "argtype" and "values" attributes on script context objects to create drop down lists valid arguments for GumTree

sct_positmotor_common.tcl
SICS-403 Now sets "argtype" and a list of "values" properties so GumTree can create drop-down lists of arguments.

quokka positmotor_configuration.tcl
SICS-401 diameter and sampleNum selectors report communications errors

sct_rfamp.c
The controller state should be set before calling AsconError.

r2931 | ffr | 2010-05-22 13:56:13 +1000 (Sat, 22 May 2010) | 13 lines
This commit is contained in:
Ferdi Franceschini
2010-05-22 13:56:13 +10:00
committed by Douglas Clowes
parent 7c90c9d440
commit b8811330f1
4 changed files with 20 additions and 9 deletions

View File

@@ -285,8 +285,8 @@ int RFAmpReading (Ascon *a)
}
if (a->timeout > 0) {
if (DoubleTime() - a->start > a->timeout) {
AsconError(a, "ANSRFAMP: read timeout", 0);
a->state = AsconTimeout;
AsconError(a, "ANSRFAMP: read timeout", 0);
}
}
return 1;

View File

@@ -53,6 +53,11 @@ proc ::scobj::positmotor::noResponse {} {
proc mkPosit {sct_controller name type motor klass table} {
set ns ::scobj::positmotor
MakeSICSObj $name SCT_OBJECT user $type
sicslist setatt $name argtype $type
foreach {i m} $table {
lappend ilist $i
}
sicslist setatt $name values [join $ilist ","]
sicslist setatt $name klass $klass
sicslist setatt $name long_name $name
hfactory /sics/$name/precision script "getmotpar $motor precision" "$motor precision " float 1

View File

@@ -1,13 +1,13 @@
source $cfPath(motors)/sct_positmotor_common.tcl
set port1 [::utility::get_portnum pmc1-quokka]
set port2 [::utility::get_portnum pmc2-quokka]
set port3 [::utility::get_portnum pmc3-quokka]
set port4 [::utility::get_portnum pmc4-quokka]
makesctcontroller sct_mc1 std mc1:$port1
makesctcontroller sct_mc2 std mc2:$port2
makesctcontroller sct_mc3 std mc3:$port3
makesctcontroller sct_mc4 std mc4:$port4
set port1 [portnum pmc1-quokka]
set port2 [portnum pmc2-quokka]
set port3 [portnum pmc3-quokka]
set port4 [portnum pmc4-quokka]
makesctcontroller sct_mc1 std mc1-quokka:$port1
makesctcontroller sct_mc2 std mc2-quokka:$port2
makesctcontroller sct_mc3 std mc3-quokka:$port3
makesctcontroller sct_mc4 std mc4-quokka:$port4
# label pos
#index position

View File

@@ -31,6 +31,12 @@ proc ::scobj::hinit_scobjprops {scobj hpath} {
} 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
}