Added the "is_drivable" query. This is useful for scan commands.
Added some error checking. r2212 | ffr | 2007-10-31 17:15:17 +1100 (Wed, 31 Oct 2007) | 3 lines
This commit is contained in:
committed by
Douglas Clowes
parent
991662fa5d
commit
16ec7dddff
@@ -1,9 +1,9 @@
|
||||
# Some useful functions for SICS configuration.
|
||||
|
||||
# $Revision: 1.8 $
|
||||
# $Date: 2007-10-29 03:00:55 $
|
||||
# $Revision: 1.9 $
|
||||
# $Date: 2007-10-31 06:15:17 $
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
# Last revision by $Author: dcl $
|
||||
# Last revision by $Author: ffr $
|
||||
|
||||
source util/extra_utility.tcl
|
||||
source util/motor_utility.tcl
|
||||
@@ -11,7 +11,26 @@ source util/command.tcl
|
||||
|
||||
# Returns attribute name and value
|
||||
proc getatt {sicsobj att} {
|
||||
lindex [split [tolower_sicslist $sicsobj $att] =] 1
|
||||
if [catch {
|
||||
lindex [split [tolower_sicslist $sicsobj $att] =] 1
|
||||
} reply ] {
|
||||
return -code error $reply
|
||||
} else {
|
||||
return $reply
|
||||
}
|
||||
}
|
||||
|
||||
proc is_drivable {sicsobj} {
|
||||
if [catch {
|
||||
getatt $sicsobj drivable
|
||||
} reply] {
|
||||
return -code error $reply
|
||||
}
|
||||
if {$reply == "true"} {
|
||||
return 1
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
# Utility fucntion for setting the home and upper and lower
|
||||
|
||||
Reference in New Issue
Block a user