From: hadeshyp Date: Sun, 4 Nov 2012 21:37:21 +0000 (+0000) Subject: Support for cached enums and new parameter passing from monitoring process to CGI... X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=cfa9750f320044ac60ad4abdd293618a42231ae3;p=daqtools.git Support for cached enums and new parameter passing from monitoring process to CGI script --- diff --git a/cts/cts b/cts/cts index 992e964..36f1b90 100755 --- a/cts/cts +++ b/cts/cts @@ -371,7 +371,18 @@ sub commandMonitor { @monRegs = sort @monRegs; @rateRegs = sort @rateRegs; - + +# write enumration + enviroment into cache + if ($filename) { + open FH, ">$filename/enum.js"; + print FH JSON_BIND->new->encode({ + 'endpoint' => sprintf("0x%04x", $trb->getEndpoint()), + 'daqop' => $ENV{'DAQOPSERVER'}, + 'enumCache' => $cts->{'_enumCache'} + }); + close FH; + } + # monitor ! my $t0; my $rates = {}; @@ -636,6 +647,7 @@ for(my $i=0; $i < @ARGV; $i++) { } elsif ($arg eq "m" or $arg eq "monitor") { my $cts = connectToCTS($endpoint); commandMonitor($cts, $ARGV[++$i], $updateInterval, $rateNumber); + exit(); } else { print "Invalid argument: $arg \n";