From 6e2917db78d08c5bd90ac68c5d0c76607286caad Mon Sep 17 00:00:00 2001 From: Ferdi Franceschini Date: Mon, 26 Aug 2013 14:56:09 +1000 Subject: [PATCH] Don't poll histogram server for textstatus in simulation and script validator mode. --- .../instrument/config/hmm/hmm_configuration_common_1.tcl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/site_ansto/instrument/config/hmm/hmm_configuration_common_1.tcl b/site_ansto/instrument/config/hmm/hmm_configuration_common_1.tcl index 5fb424ed..c5557398 100644 --- a/site_ansto/instrument/config/hmm/hmm_configuration_common_1.tcl +++ b/site_ansto/instrument/config/hmm/hmm_configuration_common_1.tcl @@ -1782,9 +1782,15 @@ Publish SAT_TABLE user # Make controller for histmem textstatus. Used by hmstat proc set host [dict get $::HISTMEM_HOSTPORT HMSTAT HOST] set port [dict get $::HISTMEM_HOSTPORT HMSTAT PORT] + if {$::histogram_memory::histmem_simulation == "false"} { MakeSctController sct_hmm astvelsel $host:$port + } proc ::histogram_memory::hmstat {args} { + variable histmem_simulation + if {$histmem_simulation == "true"} { + return + } set startIndex -1 # Try three times to get at least some data following the HTTP header. # Usually we get all the data but sometimes we just get the header. @@ -1838,7 +1844,10 @@ Publish SAT_TABLE user } } # Poll to keep HTTP connection alive + if {$::histogram_memory::histmem_simulation == "false"} { sicspoll add ::histogram_memory::hmstat script 30 ::histogram_memory::hmstat + } + namespace eval ::histogram_memory { #TODO Create GumTree commands to setup, start and stop the histmem