Remove superfluous trailing white space from TCL files

This commit is contained in:
Douglas Clowes
2014-05-16 12:30:51 +10:00
parent 89e4e37f9e
commit 92d3acb5d5
230 changed files with 1835 additions and 1835 deletions

View File

@@ -4,10 +4,10 @@
##
# @file Provides generic code and parameters for configuring the ANSTO histogram memory server
# The instrument specific histogram memory configuration files must define an initialisation
# function with the following signature
# The instrument specific histogram memory configuration files must define an initialisation
# function with the following signature
# @code proc ::histogram_memory::initialize {}
# this function should call the generic initalisation function,
# this function should call the generic initalisation function,
# ::histogram_memory::ic_initialize
#
#@see ::histogram_memory::ic_initialize
@@ -104,7 +104,7 @@ namespace eval histogram_memory {
::utility::mkVar detector_active_width_mm Float user active_width true detector true true
sicslist setatt detector_active_width_mm units mm
::utility::mkVar hmm_user_configpath Text manager user_configpath false detector false false
::utility::mkVar hmm_user_configpath Text manager user_configpath false detector false false
hmm_user_configpath ../user_config/hmm
::utility::mkVar hmm_mode Text user mode true detector true true
::utility::mkVar hmm_preset Float user preset true detector true true
@@ -232,9 +232,9 @@ namespace eval histogram_memory {
} message ] {
return -code error "([info level 0]) $message"
}
}
}
##
# @brief Returns the histogram memory server clock scale.
#
@@ -454,7 +454,7 @@ namespace eval histogram_memory {
sicslist setatt $script_name long_name x_pixel_offset
sicslist setatt $script_name units "mm"
unset script_name
sicsdatafactory new ::histogram_memory::time_channel_array
proc time_channel {args} {
variable state
@@ -502,7 +502,7 @@ proc ::histogram_memory::calc_boundaries {values channels} {
if {$bbnum > $maxbblen} {
error "ERROR: The number of bin boundaries must be less than or equal to $maxbblen"
}
set BOUNDARIES ""
set BOUNDARIES ""
if {$bbnum > 2} {
set BOUNDARIES $values
} elseif {$bbnum == 2} {
@@ -517,7 +517,7 @@ proc ::histogram_memory::calc_boundaries {values channels} {
# error "ERROR: $leftbb and $rightbb must bound a channel >= 0 or <= $maxchan"
# }
for {set bb $leftbb; set i 0} {$i < $maxbblen} {incr i; set bb [expr {$bb + $bstep}]} {
lappend BOUNDARIES $bb
lappend BOUNDARIES $bb
}
} else {
error "ERROR: You must specify at least two bin boundaries"
@@ -534,7 +534,7 @@ set hmm_xml ""
# @brief Provides a standard set of subcommands for the histogram server table
# configuration commands.
#
# @param tag Table identifier, one of BAT CAT FAT NAT OAT SAT SRV
# @param tag Table identifier, one of BAT CAT FAT NAT OAT SAT SRV
# @param attributes Defines the list of attributes which you will be allowed to set.
# @param element_list Defines the list of elements which you will be allowed to set.
# Use "" if your table doesn't contain any elements.
@@ -546,15 +546,15 @@ set hmm_xml ""
# -clear clears the table\n
# -init A list of name value pairs. If you use attribute or element names then
# the corresponding table entries will be initilised to the given values, any
# attributes or elements which aren't specified will be cleared. You can also
# specify extra parameters to store in the table which might be required to
# attributes or elements which aren't specified will be cleared. You can also
# specify extra parameters to store in the table which might be required to
# specify limits or constants which may be necessary for deriving configuration
# parameters.\n
# -get return the value for the named attribute or element\n
# -attlist list all of the attributes with their values.\n
# TODO Maintain "proposed" and "current" tables. Provide a setcurrent command which can
# only be called by the upload_config command to set the proposed tables as current
# TODO Allow for top level content in tables and attributes in sub-elements
# TODO Allow for top level content in tables and attributes in sub-elements
proc HISTMEM_TABLE {tpath args} {
global hmm_xml
@@ -564,25 +564,25 @@ proc HISTMEM_TABLE {tpath args} {
foreach {opt arglist} [::utility::get_opt_arglist $args] {}
switch -- $opt {
"-dump" {
foreach {k v} $hmm_xml {clientput $k; foreach {name val} $v {clientput "$name: $val"}}
foreach {k v} $hmm_xml {clientput $k; foreach {name val} $v {clientput "$name: $val"}}
}
"-allowed_attributes" {
if {[llength $arglist] == 0} {
set retVal [::utility::tabget hmm_xml $tpath/_ALLOWED_ATTRIBUTES_]
} else {
} else {
::utility::tabset hmm_xml $tpath/_ALLOWED_ATTRIBUTES_ [lindex $arglist 0]
}
}
"-allowed_elements" {
if {[llength $arglist] == 0} {
set retVal [::utility::tabget hmm_xml $tpath/_ALLOWED_ELEMENTS_]
} else {
} else {
::utility::tabset hmm_xml $tpath/_ALLOWED_ELEMENTS_ [lindex $arglist 0]
::utility::tabset hmm_xml $tpath/_ELEMENTS_ [lindex $arglist 0]
}
}
"-setel" {
set element [lindex $arglist 0]
set element [lindex $arglist 0]
set value [lindex $arglist 1]
if {[lsearch [::utility::tabget hmm_xml $tpath/_ALLOWED_ELEMENTS_] $element] >= 0} {
::utility::tabset hmm_xml $tpath/$element/_CONTENT_ $value
@@ -591,7 +591,7 @@ proc HISTMEM_TABLE {tpath args} {
}
}
"-setatt" {
set attname [lindex $arglist 0]
set attname [lindex $arglist 0]
set value [lindex $arglist 1]
if {[lsearch [::utility::tabget hmm_xml $tpath/_ALLOWED_ATTRIBUTES_] $attname] >= 0} {
::utility::tabset hmm_xml $tpath/_ATTLIST_/$attname $value
@@ -600,19 +600,19 @@ proc HISTMEM_TABLE {tpath args} {
}
}
"-getel" {
set element [lindex $arglist 0]
set element [lindex $arglist 0]
set retVal [::utility::tabget hmm_xml $tpath/$element/_CONTENT_]
}
"-getatt" {
set attribute [lindex $arglist 0]
set attribute [lindex $arglist 0]
set retVal [::utility::tabget hmm_xml $tpath/_ATTLIST_/$attribute]
}
"-delel" {
set element [lindex $arglist 0]
set element [lindex $arglist 0]
::utility::tabdel hmm_xml $tpath/$element
}
"-delatt" {
set attribute [lindex $arglist 0]
set attribute [lindex $arglist 0]
::utility::tabdel hmm_xml $tpath/_ATTLIST_/$attribute
}
"-clear" {
@@ -657,7 +657,7 @@ proc HISTMEM_TABLE {tpath args} {
}
}
##
##
# @brief Base Address Table configuration parameters as maintained by SICS
#
proc BAT_TABLE {args} {
@@ -665,7 +665,7 @@ proc BAT_TABLE {args} {
set attributes { NO_BAT_ENTRIES NO_BAT_PERIODS NO_REPEAT_ENTRY NO_REPEAT_TABLE NO_EXECUTE_TABLE }
set elements {{PERIOD_INDICES }}
set tag BAT
set tag BAT
foreach {opt arglist} [::utility::get_opt_arglist $args] {}
switch -- $opt {
"" {
@@ -745,7 +745,7 @@ proc BAT_TABLE {args} {
}
}
##
##
# @brief CAlibration Table configuration parameters as maintained by SICS
#
proc CAT_TABLE {args} {
@@ -753,7 +753,7 @@ proc CAT_TABLE {args} {
set attributes { FRAME_FREQUENCY SIZE_PERIOD COUNT_METHOD COUNT_SIZE READ_DATA_TYPE }
set elements {{MESYTEC_MPSD8_CHANNEL_GAINS MESYTEC_MPSD8_THRESHOLDS MESYTEC_TUBE_PAIR_RESISTANCE_RATIOS MESYTEC_TUBE_MAGNIFICATIONS MESYTEC_TUBE_OFFSETS MESYTEC_TUBE_HISTOGRAM_WEIGHTS }}
set tag CAT
set tag CAT
foreach {opt arglist} [::utility::get_opt_arglist $args] {}
switch -- $opt {
"" {
@@ -833,7 +833,7 @@ proc CAT_TABLE {args} {
}
}
##
##
# @brief Frequency Address Table configuration parameters as maintained by SICS
#
proc FAT_TABLE {args} {
@@ -842,7 +842,7 @@ proc FAT_TABLE {args} {
set elements {{ }}
set tag FAT
set tag FAT
foreach {opt arglist} [::utility::get_opt_arglist $args] {}
switch -- $opt {
"" {
@@ -1052,7 +1052,7 @@ proc OAT_TABLE {args} {
}
}
# @brief Spatial Allocation Table configuration parameters as maintained by SICS
# @brief Spatial Allocation Table configuration parameters as maintained by SICS
#
# Only one element, ie SPLIT with no content just attributes.
proc SAT_TABLE {args} {
@@ -1198,7 +1198,7 @@ proc ::histogram_memory::max_chan_num {axis} {
}
##
# @brief When called without arguments this returns the name of the filler defaults file
# for the histogram server. When called with an argument it sets the current name of the
# for the histogram server. When called with an argument it sets the current name of the
# filler defaults file.
#
# When anstohm_linked.xml is uploaded to the histogram server it calls this via
@@ -1245,7 +1245,7 @@ proc ::histogram_memory::number_of_channels {axis} {
# TODO Set current oat table after uploading proposed oat_table
proc ::histogram_memory::upload_config {filler_defaults} {
if [ catch {
::histogram_memory::synch_tables
::histogram_memory::synch_tables
::histogram_memory::filler_defaults $filler_defaults
hmm astop
hmm configure init 1
@@ -1325,7 +1325,7 @@ proc ::histogram_memory::get_frame_source {} {
proc ::histogram_memory::set_frame_source {srce} {
variable ic_fsrce_values
if [ catch {
if [ catch {
if {[lsearch $ic_fsrce_values $srce] == -1} {
error "ERROR: $srce is invalid, valid values are \"$ic_fsrce_values\""
}
@@ -1359,7 +1359,7 @@ proc ::histogram_memory::get_frame_freq {} {
# @param freq Frequency in Hz.\n
# @param frame_source INTERNAL or EXTERNAL(default)
#
# If freq=0 then it sets the frequency to 50Hz with an internal frame source. This is useful
# If freq=0 then it sets the frequency to 50Hz with an internal frame source. This is useful
# if you are setting the frequency from a chopper which is stopped.
proc ::histogram_memory::set_frame_freq {freq {frame_source EXTERNAL}} {
variable state
@@ -1521,7 +1521,7 @@ proc ::histogram_memory::ic_initialize {} {
::histogram_memory::clear_tables
# FAT_TABLE -set VIEW_MAG_X -1 VIEW_MAG_Y -1
foreach hm_obj [sicslist type histmem] {
foreach hm_obj [sicslist type histmem] {
set host [dict get $::HISTMEM_HOSTPORT HMM HOST]
set port [dict get $::HISTMEM_HOSTPORT HMM PORT]
$hm_obj configure hmaddress http://$host:$port
@@ -1578,7 +1578,7 @@ Publish SAT_TABLE user
# if {$monitor_controlled == "true"} {
# set hm_start {hmm count}
# } else {
# bm setmode timer
# bm setmode timer
# bm setpreset 32000000
# }
if {$blocking == "block"} {
@@ -1607,7 +1607,7 @@ Publish SAT_TABLE user
}
}
}
proc ::histogram_memory::veto {action} {
switch $action {
"on" {
@@ -1671,7 +1671,7 @@ Publish SAT_TABLE user
return [SplitReply [hmm_mode]]
}
if [ catch {
set modes $ic_count_methods
set modes $ic_count_methods
if {[lsearch $modes $method] == -1} {
error "ERROR: Count mode, $method, must be one of $modes"
}
@@ -1744,7 +1744,7 @@ Publish SAT_TABLE user
proc ::histogram_memory::stop_condition {condition} {
variable state
if [ catch {
array set count_stop {immediate IMMEDIATE period AT_END_OF_PERIOD}
array set count_stop {immediate IMMEDIATE period AT_END_OF_PERIOD}
if {$condition == ""} {
return $state(stop_cond)
} else {
@@ -1843,7 +1843,7 @@ namespace eval ::histogram_memory {
# @brief Set stop condition for histogram memory
#
# @param condition
#command stop_condition {text:immediate,period condition}
#command stop_condition {text:immediate,period condition}
}
@@ -1855,7 +1855,7 @@ namespace eval ::histogram_memory {
proc _histmem {cmd args} {
#TODO Add "continue"
set reply ""
if [ catch {
if [ catch {
switch $cmd {
"start" {
eval "::histogram_memory::start $args"

View File

@@ -11,7 +11,7 @@ namespace eval histogram_memory {
variable state
if [ catch {
#set deg_per_radian [SplitReply [deg_per_rad]]
set deg_per_radian 57.29577951308232
set deg_per_radian 57.29577951308232
set max_chan [OAT_TABLE X -getdata MAX_CHAN]
set bb_zero_offset [expr -1*($max_chan-1)]
set det_width_mm [SplitReply [detector_active_width_mm]]

View File

@@ -25,7 +25,7 @@ proc ::histogram_memory::select_read_type {type} {
# Instrument specific X and Y dimension names
variable INST_NXC
variable INST_NYC
if [catch {
$HMOBJ configure read_data_period_number 0
@@ -49,67 +49,67 @@ proc ::histogram_memory::select_read_type {type} {
$HMOBJ configure rank 2
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure $INST_NXC]]
$HMOBJ configure dim1 [SplitReply [$HMOBJ configure oat_ntc_eff]]
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_XT"
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_XT"
set hmm_ext "_xt"
}
"HISTOGRAM_YT" - "HISTOPERIOD_YT" {
$HMOBJ configure rank 2
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure oat_ntc_eff]]
$HMOBJ configure dim1 [SplitReply [$HMOBJ configure $INST_NYC]]
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_YT"
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_YT"
set hmm_ext "_ty"
}
"HISTOGRAM_X" - "HISTOPERIOD_X" {
$HMOBJ configure rank 1
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure $INST_NXC]]
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_X"
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_X"
set hmm_ext "_x"
}
"HISTOGRAM_Y" - "HISTOPERIOD_Y" {
$HMOBJ configure rank 1
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure $INST_NYC]]
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_Y"
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_Y"
set hmm_ext "_y"
}
"HISTOGRAM_T" - "HISTOPERIOD_T" {
$HMOBJ configure rank 1
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure oat_ntc_eff]]
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_T"
$HMOBJ configure READ_DATA_TYPE "HISTOPERIOD_T"
set hmm_ext "_t"
}
"TOTAL_HISTOGRAM_XY" {
$HMOBJ configure rank 2
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure $INST_NXC]]
$HMOBJ configure dim1 [SplitReply [$HMOBJ configure $INST_NYC]]
$HMOBJ configure READ_DATA_TYPE $type
$HMOBJ configure READ_DATA_TYPE $type
set hmm_ext "_total_xy"
}
"TOTAL_HISTOGRAM_XT" {
$HMOBJ configure rank 2
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure $INST_NXC]]
$HMOBJ configure dim1 [SplitReply [$HMOBJ configure oat_ntc_eff]]
$HMOBJ configure READ_DATA_TYPE $type
$HMOBJ configure READ_DATA_TYPE $type
set hmm_ext "_total_xt"
}
"TOTAL_HISTOGRAM_YT" {
$HMOBJ configure rank 2
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure oat_ntc_eff]]
$HMOBJ configure dim1 [SplitReply [$HMOBJ configure $INST_NYC]]
$HMOBJ configure READ_DATA_TYPE $type
$HMOBJ configure READ_DATA_TYPE $type
set hmm_ext "_total_ty"
}
"TOTAL_HISTOGRAM_XP" {
$HMOBJ configure rank 2
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure $INST_NXC]]
$HMOBJ configure dim1 [expr 1 + [SplitReply [$HMOBJ configure maximum_period]]]
$HMOBJ configure READ_DATA_TYPE $type
$HMOBJ configure READ_DATA_TYPE $type
set hmm_ext "_total_xp"
}
"TOTAL_HISTOGRAM_YP" {
$HMOBJ configure rank 2
$HMOBJ configure dim0 [expr 1 + [SplitReply [$HMOBJ configure maximum_period]]]
$HMOBJ configure dim1 [SplitReply [$HMOBJ configure $INST_NYC]]
$HMOBJ configure READ_DATA_TYPE $type
$HMOBJ configure READ_DATA_TYPE $type
set hmm_ext "_total_py"
}
"TOTAL_HISTOGRAM_X" {
@@ -149,14 +149,14 @@ publish ::histogram_memory::select_read_type user
##
# @brief Instrument specific configurations can redefine this
# to select extra read data types or override one of the
# to select extra read data types or override one of the
# common data types for the histogram memory.
proc ::histogram_memory::is_select_read_type {type} {
variable HMOBJ
# Instrument specific X and Y dimension names
variable INST_NXC
variable INST_NYC
return "notfound"
}
publish ::histogram_memory::is_select_read_type user
@@ -166,7 +166,7 @@ publish ::histogram_memory::is_select_read_type user
# specific type then set a common type.
proc ::histogram_memory::hmm_set_read_type {type} {
variable HMOBJ
if [ catch {
set hmm_ext [is_select_read_type $type]
if {$hmm_ext == "notfound"} {
@@ -205,7 +205,7 @@ proc ::histogram_memory::set_axes {typelist} {
# Instrument specific X and Y dimension names
variable INST_NXC
variable INST_NYC
if [catch {
set signal 1
foreach type $typelist {
@@ -555,7 +555,7 @@ hsetprop $HP_HMM data true
hsetprop $HP_HMM klass parameter
hsetprop $HP_HMM nxalias hmscobj_hmm
hsetprop $HP_HMM sicsdev none
#hsetprop /sics/hmscobj/data
#hsetprop /sics/hmscobj/data
#sicspoll add /sics/hmscobj/data hdb
sicslist setatt $HMSCOBJ kind scobj

View File

@@ -1,6 +1,6 @@
##
# @file Implements control for the Ordela high voltage power supply using the odrhvps protocol handler.
#
#
# This controller implements voltage ramping and always reads the current value before
# attempting to set the new voltage.
@@ -28,10 +28,10 @@ proc ::scobj::dethvps::rqValue {nextSubState cmd} {
#
# @param vPath, Hdb node path for the voltage.
proc ::scobj::dethvps::rdValue {vPath} {
variable RAMPIDLE
variable RAMPSTOP
variable RAMPIDLE
variable RAMPSTOP
variable RAMPSTART
variable RAMPBUSY
variable RAMPBUSY
variable MAXPOTVAL
variable RAMPINTEREST
@@ -98,10 +98,10 @@ proc ::scobj::dethvps::rdValue {vPath} {
##
# @brief Checks the target voltage and sets the ramping superstate and ramp direction.
proc ::scobj::dethvps::setValue {nextSubState} {
variable RAMPIDLE
variable RAMPSTOP
variable RAMPIDLE
variable RAMPSTOP
variable RAMPSTART
variable RAMPBUSY
variable RAMPBUSY
set catch_status [ catch {
set par [sct target]
@@ -135,10 +135,10 @@ proc ::scobj::dethvps::setValue {nextSubState} {
##
# @brief Checks that a command has been acknowledged
proc ::scobj::dethvps::getACK {} {
variable RAMPIDLE
variable RAMPSTOP
variable RAMPIDLE
variable RAMPSTOP
variable RAMPSTART
variable RAMPBUSY
variable RAMPBUSY
set catch_status [ catch {
set currSuperState [sct ramping]
@@ -173,11 +173,11 @@ proc ::scobj::dethvps::getACK {} {
#
# @param cmd, The set voltage command
proc ::scobj::dethvps::ramping {cmd} {
variable RAMPIDLE
variable RAMPSTOP
variable RAMPIDLE
variable RAMPSTOP
variable RAMPSTART
variable RAMPBUSY
variable MINRAMPINTERVAL
variable RAMPBUSY
variable MINRAMPINTERVAL
set catch_status [ catch {
set rampstep [sct rampstep]
@@ -213,10 +213,10 @@ proc ::scobj::dethvps::ramping {cmd} {
##
# @brief Command interface for voltage controller
proc ::scobj::dethvps::drvCmd {} {
variable RAMPIDLE
variable RAMPSTOP
variable RAMPIDLE
variable RAMPSTOP
variable RAMPSTART
variable RAMPBUSY
variable RAMPBUSY
variable potValPath
set catch_status [ catch {