Remove superfluous trailing white space from TCL files
This commit is contained in:
@@ -98,7 +98,7 @@ proc ::environment::mkSensors {sobj} {
|
||||
#
|
||||
# eg ::environment::mkenvinfo tc1 {heateron {priv user} range {priv manager}}
|
||||
proc ::environment::mkenvinfo {sobj paramlist} {
|
||||
lappend paramlist controlsensor {priv user}
|
||||
lappend paramlist controlsensor {priv user}
|
||||
if [ catch {
|
||||
# Create polling procedure to update hdb sensor data nodes.
|
||||
# proc ::environment::${sobj}_poll [subst {{sobj $sobj}}] {
|
||||
@@ -163,7 +163,7 @@ sicslist setatt $setpoint_script mutable true
|
||||
lappend env_macrolist $ctrlss_script
|
||||
}
|
||||
|
||||
# Create environment information structure for hdb
|
||||
# Create environment information structure for hdb
|
||||
set env_name [getatt $sobj environment_name]
|
||||
eval [subst {
|
||||
proc ::${sobj}_dict {} {
|
||||
@@ -233,13 +233,13 @@ namespace eval utility {
|
||||
return $instrument_name;
|
||||
}
|
||||
|
||||
# Initialise the attributes of sobj
|
||||
# Initialise the attributes of sobj
|
||||
# to make it ready for adding to the hdb tree.
|
||||
proc mkData {sobj name aklass args} {
|
||||
sicslist setatt $sobj long_name $name
|
||||
sicslist setatt $sobj nxalias $sobj
|
||||
sicslist setatt $sobj klass $aklass
|
||||
switch [getatt $sobj type] {
|
||||
switch [getatt $sobj type] {
|
||||
"sicsvariable" {
|
||||
sicslist setatt $sobj kind hobj
|
||||
sicslist setatt $sobj data true
|
||||
@@ -264,8 +264,8 @@ proc mkData {sobj name aklass args} {
|
||||
proc mkVar {name type access {along_name x} {anxsave false} {aklass @none} {acontrol false} {adata false}} {
|
||||
array set sicsAccess {spy spy user user manager mugger internal internal readonly internal}
|
||||
VarMake $name $type $sicsAccess($access);
|
||||
sicslist setatt $name privilege $access;
|
||||
sicslist setatt $name kind hobj;
|
||||
sicslist setatt $name privilege $access;
|
||||
sicslist setatt $name kind hobj;
|
||||
sicslist setatt $name mutable false
|
||||
if {$access != "internal"} {
|
||||
sicslist setatt $name data $adata
|
||||
@@ -306,7 +306,7 @@ proc ::utility::normalattlist {sicsobj} {
|
||||
foreach att [sicslist $sicsobj] {
|
||||
lappend atts [split [string range $att 0 end-1] =]
|
||||
}
|
||||
return [join $atts]
|
||||
return [join $atts]
|
||||
} message ] {
|
||||
if {$::errorCode=="NONE"} {return $message}
|
||||
return -code error $message
|
||||
@@ -341,7 +341,7 @@ with the lower limit at 85 and the upper limit at 97
|
||||
"
|
||||
if {$args == ""} {clientput $usage; return}
|
||||
array set params $args
|
||||
set motor $params(-motor)
|
||||
set motor $params(-motor)
|
||||
set home $params(-home)
|
||||
set lowlim [expr $home - $params(-lowrange)]
|
||||
set uplim [expr $home + $params(-uprange)]
|
||||
@@ -383,14 +383,14 @@ proc getinfo {object} {
|
||||
set wc [format "%s_*" $object];
|
||||
set objlist [sicslist match $wc];
|
||||
foreach v $objlist {
|
||||
if { [SplitReply [sicslist $v type]]== "SicsVariable"} {
|
||||
if { [SplitReply [sicslist $v type]]== "SicsVariable"} {
|
||||
clientput [$v];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Convenience function for setting klass group and name attributes
|
||||
# Convenience function for setting klass group and name attributes
|
||||
# on sics object metadata
|
||||
proc set_sicsobj_atts {sobj aklass agroup aname acontrol adata} {
|
||||
sicslist setatt $sobj klass $aklass;
|
||||
@@ -430,7 +430,7 @@ proc ::utility::set_sobj_attributes {} {
|
||||
}
|
||||
|
||||
proc ::utility::set_histomem_attributes {} {
|
||||
foreach hm [sicslist type histmem] {
|
||||
foreach hm [sicslist type histmem] {
|
||||
sicslist setatt $hm nxalias $hm
|
||||
sicslist setatt $hm mutable true
|
||||
}
|
||||
@@ -450,13 +450,13 @@ proc ::utility::set_motor_attributes {} {
|
||||
# The first entry in [sicslist type motor] is 'motor' when
|
||||
# we run the sicslist command on initialisation. This is because
|
||||
# The 'Motor' command has type motor, so we skip it with lrange.
|
||||
foreach m [lrange [sicslist type motor] 1 end] {
|
||||
foreach m [lrange [sicslist type motor] 1 end] {
|
||||
sicslist setatt $m kind hobj
|
||||
sicslist setatt $m data true
|
||||
sicslist setatt $m control true
|
||||
sicslist setatt $m nxsave true
|
||||
sicslist setatt $m mutable true
|
||||
catch {
|
||||
catch {
|
||||
# This block is specific to the dmc2280 driver.
|
||||
# Skip it for "tclmot" motors which don't
|
||||
# have 'units', 'part' or 'long_name' parameters
|
||||
@@ -476,7 +476,7 @@ proc ::utility::set_motor_attributes {} {
|
||||
3 {sicslist setatt $m privilege spy}
|
||||
}
|
||||
}
|
||||
foreach m [sicslist type configurablevirtualmotor] {
|
||||
foreach m [sicslist type configurablevirtualmotor] {
|
||||
sicslist setatt $m kind hobj
|
||||
sicslist setatt $m data true
|
||||
sicslist setatt $m control true
|
||||
@@ -485,7 +485,7 @@ proc ::utility::set_motor_attributes {} {
|
||||
sicslist setatt $m nxalias $m
|
||||
sicslist setatt $m mutable true
|
||||
}
|
||||
foreach m [sicslist type TasMot] {
|
||||
foreach m [sicslist type TasMot] {
|
||||
sicslist setatt $m klass sample
|
||||
sicslist setatt $m long_name $m
|
||||
sicslist setatt $m kind hobj
|
||||
@@ -498,7 +498,7 @@ proc ::utility::set_motor_attributes {} {
|
||||
}
|
||||
}
|
||||
proc ::utility::set_chopper_attributes {} {
|
||||
foreach ch [lrange [sicslist type chopperadapter] 1 end] {
|
||||
foreach ch [lrange [sicslist type chopperadapter] 1 end] {
|
||||
sicslist setatt $ch kind hobj
|
||||
sicslist setatt $ch data true
|
||||
sicslist setatt $ch control true
|
||||
@@ -575,9 +575,9 @@ proc lstarts_with {l1 l2} {
|
||||
#
|
||||
#\param port this can either be a port name or number
|
||||
#\return always returns the port number
|
||||
proc ::utility::get_portnum {port} {
|
||||
proc ::utility::get_portnum {port} {
|
||||
global env tcl_platform
|
||||
variable sics_port
|
||||
variable sics_port
|
||||
if [ catch {
|
||||
if [string is integer $port] {
|
||||
return $port
|
||||
@@ -643,7 +643,7 @@ proc ::utility::check_valid_options {arglist valid_options} {
|
||||
|
||||
##
|
||||
# @brief Raises an error if any of the required_options are not in the argument list arglist
|
||||
proc ::utility::check_required_options {arglist required_options} {
|
||||
proc ::utility::check_required_options {arglist required_options} {
|
||||
if [ catch {
|
||||
if {$arglist == ""} {
|
||||
error "ERROR: You must provide the following options: [join $required_options {, }]"
|
||||
@@ -655,7 +655,7 @@ proc ::utility::check_required_options {arglist required_options} {
|
||||
if {$req_opt == $opt} {
|
||||
set option_missing "false"
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if {$option_missing} {
|
||||
error "ERROR: Required option $req_opt is missing"
|
||||
@@ -702,10 +702,10 @@ proc ::utility::get_opt_arglist {args} {
|
||||
#
|
||||
# ::utility::tabmktable {NXgeometry geometry NXshape sicsvariable {shape size}}
|
||||
# returns
|
||||
# NXgeometry {geometry {NXshape {sicsvariable {shape size}}}}
|
||||
# NXgeometry {geometry {NXshape {sicsvariable {shape size}}}}
|
||||
# ::utility::tabxml hmm_table SAT
|
||||
# ::utility::tabset hmm_table SAT/SPLIT/_ATTLIST_/MIDPOINT 256
|
||||
# ::utility::tabget hmm_table SAT/SPLIT/_ATTLIST_/MIDPOINT
|
||||
# ::utility::tabget hmm_table SAT/SPLIT/_ATTLIST_/MIDPOINT
|
||||
# ::utility::tabxml hmm_table SAT
|
||||
# ::utility::tabget hmm_table OAT/_DATA_/T_MAX
|
||||
|
||||
@@ -723,7 +723,7 @@ proc ::utility::tabmktable {flatlist} {
|
||||
}
|
||||
set el [lindex $flatlist 0]
|
||||
set table [list $el \$subtable ]
|
||||
foreach el [lrange $flatlist 1 end-2] {
|
||||
foreach el [lrange $flatlist 1 end-2] {
|
||||
set subtable [list $el \$subtable]
|
||||
set table [subst $table]
|
||||
}
|
||||
@@ -737,8 +737,8 @@ proc ::utility::tabmktable {flatlist} {
|
||||
}
|
||||
|
||||
# If some component of the path doesn't exist then return
|
||||
# a list of indices up to the invalid step. Note if the
|
||||
# first step doesn't exist this returns nothing which is a
|
||||
# a list of indices up to the invalid step. Note if the
|
||||
# first step doesn't exist this returns nothing which is a
|
||||
# valid argument to lset and lindex representing the entire list
|
||||
proc ::utility::tabindices {itable tpath} {
|
||||
if [ catch {
|
||||
@@ -772,7 +772,7 @@ proc ::utility::tabdel {itable tpath} {
|
||||
set subtable [lreplace $subtable $datindex $datindex]
|
||||
incr datindex -1
|
||||
set subtable [lreplace $subtable $datindex $datindex]
|
||||
lset table $subtabpos $subtable
|
||||
lset table $subtabpos $subtable
|
||||
} message ] {
|
||||
if {$::errorCode=="NONE"} {return $message}
|
||||
return -code error $message
|
||||
@@ -785,7 +785,7 @@ proc ::utility::tabget {itable tpath} {
|
||||
if {[llength $indices] == [llength [split $tpath "/"] ]} {
|
||||
return [lindex $table $indices]
|
||||
} else {
|
||||
return
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -849,7 +849,7 @@ proc ::utility::macro::getset {type name arglist body} {
|
||||
publish $name spy
|
||||
if {$arglist == ""} {
|
||||
sicslist setatt $name access read_only
|
||||
} else {
|
||||
} else {
|
||||
sicslist setatt $name access user
|
||||
}
|
||||
sicslist setatt $name privilege user
|
||||
|
||||
Reference in New Issue
Block a user