@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 = {};
} 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";