]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
update network map for new MDC
authorJan Michel <j.michel@gsi.de>
Wed, 5 Aug 2020 13:30:27 +0000 (15:30 +0200)
committerJan Michel <j.michel@gsi.de>
Wed, 5 Aug 2020 13:30:27 +0000 (15:30 +0200)
web/htdocs/network/map.pl

index 53949085ccbc5569bbba529911daf5e5fe78c0fa..c1b0e8a87dfa4c1571f058a457bf799fe631776c 100755 (executable)
@@ -24,7 +24,6 @@ use Time::HiRes qw(usleep);
 use List::Util qw(min);
 use v5.10;
 
-my $detailed = 1;
 
 ###############################################################################  
 ##  Network Map
@@ -76,7 +75,16 @@ if($ENV{'QUERY_STRING'} =~ /getmap/) {
   }
   
 
-  print "<table id=\"content\" class=\"content map\"><tr class=\"head map\"><th>Board<th>Hardware<th>Design<th>Compile Time<th>Temperature<th>UID - Endp<th title=\"overlay: GbE data %\">MAC<th title=\"overlay: deadtime %\">serial\n";
+  print "<table id=\"content\" class=\"content map\"><tr class=\"head map\">
+  <th>Board
+  <th>Hardware
+  <th>Design
+  <th>Compile Time
+  <th>Temperature
+  <th>UID - Endp
+  <th title=\"overlay: GbE data %\">MAC
+  <th title=\"overlay: deadtime %\">serial\n";
+  
   printlist(0,1);
   print "</table>";
   
@@ -90,6 +98,8 @@ if($ENV{'QUERY_STRING'} =~ /getmap/) {
       my $btype = "";
       my $value = $hardware->{$addr}>>24&0xff;
       
+      if ($value==0xa7) {$btype= "MDC TDC"; }      
+      if ($value==0xa6) {$btype= "MDC Hub"; }      
       if ($value==0xa5) {$btype= "Trb5sc"; }      
       if ($value==0x90) {$btype= "Trb3 central";}
       if ($value==0x91) {$btype= "Trb3 periph";}
@@ -231,14 +241,15 @@ if($ENV{'QUERY_STRING'} =~ /getmap/) {
             if ($value==5) {$feat .="\nClock: external 120 MHz";}
       }
 
-      my $busy = $hubbusy->{$parent} & (1<<$p);
       my $serial = GetSerial($uids->{$addr},$hardware->{$addr}>>24&0xff);
-     
+#Busy     
+      my $busy = $hubbusy->{$parent} & (1<<$p);
       my $hubval = $hubbusy2->{$parent}[$p] - $hubbusy1->{$parent}[$p];
          $hubval += 2**32 if $hubval < 0;
          $hubval /= 10E6; 
          $hubval = ceil(min($hubval*100,100));
       my $hublevel =  'style="background:linear-gradient(to right,rgba(0,0,255,0.3) '.($hubval-1).'%,transparent '.$hubval.'%);"' ;
+#GbE
       my $mac = '';
       my $gbelevel = '';
       if ($feat =~ /GbE/) {
@@ -346,7 +357,7 @@ sub GetSerial {
   if($type == 0x96) { $file = 'dirich'; }
   if($type == 0x97) { $file = 'dirich_concentrator'; }
   if($type == 0xa5) { $file = 'trb5sc'; }
-  if($type == 0xa6) { $file = 'mdcmbo'; }
+  if($type == 0xa6 || $type == 0xa7) { $file = 'mdcmbo'; }
   if($type == 0x23 && -e "/home/hadaq/trbsoft/daq/mdc/serials_oep.db"  ) {$file = "/home/hadaq/trbsoft/daq/mdc/serials_oep.db";}
   return '-' unless $file;
   
@@ -372,6 +383,3 @@ sub GetMac {
   }
   
 1;
-
-#da:7a:34:6f:39:7d
-#2f0000046f397d28