SICS-263 Provide access to histogram memory veto

Added a ::histogram_memory::veto proc but it can't be used yet because you need to run hmm init to update the veto flag

r2690 | ffr | 2008-08-29 22:22:53 +1000 (Fri, 29 Aug 2008) | 3 lines
This commit is contained in:
Ferdi Franceschini
2008-08-29 22:22:53 +10:00
committed by Douglas Clowes
parent c35f37420e
commit 7d36e98479

View File

@@ -1,5 +1,5 @@
# $Revision: 1.37 $
# $Date: 2008-08-07 03:17:28 $
# $Revision: 1.38 $
# $Date: 2008-08-29 12:22:53 $
# Author: Ferdi Franceschini
# Based on the examples in the hs_test.tcl sample configuration by Mark Lesha.
# http://gumtree.ansto.gov.au:9080/nbicms/bragg-systems/histogram-server/hs_test.tcl/view
@@ -1633,6 +1633,7 @@ proc ::histogram_memory::ic_initialize {} {
::histogram_memory::set_frame_source $default_frame_source_when_there_is_no_frame_signal([instname])
::histogram_memory::count_method unlimited
::histogram_memory::count_size 0
::histogram_memory::veto false
hmm configure hmDataPath ../HMData
hmm configure hmconfigscript $configuration
::histogram_memory::configure_dims
@@ -1699,6 +1700,23 @@ proc ::histogram_memory::post_count {} {}
}
}
proc ::histogram_memory::veto {{enable ""}} {
variable state
if {$enable == ""} {
return $state(veto)
}
if {[string is boolean $enable] == 0} {
error "ERROR: $args must be a boolean"
} else {
if {$enable} {
hmm configure FAT_SOFT_VETO_1 ENABLE
} else {
hmm configure FAT_SOFT_VETO_1 DISABLE
}
}
}
##
# @brief This sends the magic incantation which stops the histogram server.
proc ::histogram_memory::stop {} {