]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
Support for cached enums and new parameter passing from monitoring process to CGI...
authorhadeshyp <hadeshyp>
Sun, 4 Nov 2012 21:37:21 +0000 (21:37 +0000)
committerhadeshyp <hadeshyp>
Sun, 4 Nov 2012 21:37:21 +0000 (21:37 +0000)
cts/cts

diff --git a/cts/cts b/cts/cts
index 992e9649b720c3d36456627c7895f2569259fcd9..36f1b907531f89383c2891db2b22fbe390100045 100755 (executable)
--- 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";