+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-<link href="../layout/styles.css" rel="stylesheet" type="text/css"/>
-<script src="../scripts/scripts.js" type="text/javascript"></script>
-<title>Network Map</title>
-</head>
-<body>
-
-
-<h2><a href="../">Network Map</a></h2>
-<form acion="">
-<table class="form"><tr class="head"><th colspan=2>Configuration
-<tr><td><td><input type="button" onClick="location.reload()" value="Reload">
-</table>
-</form>
-
-<div style="float:left"><table id="content" class="content map"><tr><th>Register<th>Values</table></div>
-
-
-<script language="javascript">
-
-
-
-function update(data) {
- if(!document.getElementById("content").innerHTML) return;
- var b = data.split("&");
- var c = {};
- var lastlevel = 1;
- o = "<tr class=\"head map\"><th>Board<th>Hardware<th>AddOn<th>Design<th>Compile Time<th>Temperature";
-
- for(j=0;j<b.length-1;j++) {
- c[j] = b[j].split("#");
- o += "<tr class=\"level level"+c[j][2]+" ";
- if(lastlevel!=c[j][2]) o += "newlevel"; else o += "oldlevel";
- o += "\"><td>";
-// if(c[j][2]>1)
- o += "<div>"+c[j][1]+"</div>";
- o += c[j][3];
- o += "<td>";
-
- type = (c[j][4]>>24&0xff);
- switch(type) {
- case 0x90: o+= "TRB3 central"; break;
- case 0x91: o+= "TRB3 periph"; break;
- case 0x92: o+= "CBM-Rich"; break;
- case 0x93: o+= "CBM-Tof"; break;
- case 0x62: o+= "Hub AddOn"; break;
- case 0x52: o+= "CTS"; break;
- case 0x42: o+= "Shower AddOn"; break;
- case 0x33: o+= "RICH ADCM"; break;
- case 0x23: o+= "MDC OEP"; break;
- case 0x12: o+= "MDC Hub"; break;
- }
-
- o += "<td title=\"0x"+(c[j][4]*1).toString(16)+"\">";
- if(type == 0x91) {
- switch(c[j][4]>>12 & 0x7) {
- case 0: o += "ADA v1"; break;
- case 1: o += "ADA v2"; break;
- case 2: o += "Multitest"; break;
- case 3: o += "SFP"; break;
- case 4: o += "Padiwa"; break;
- case 5: o += "GPIN"; break;
- case 6: o += "Nxyter"; break;
- case 7: o += "32PinAddOn"; break;
- default: o+= "---";
- }
- }
- else
- o+= "---";
- o += "<td title=\"0x"+(c[j][4]*1).toString(16)+"\">";
- if(type == 0x91 || type == 0x92 || type == 0x93) {
- if((c[j][4] & 0x8000) == 0x8000) o += "RX sync, ";
- if((c[j][4] & 0x0b00) == 0x000 && (c[j][4]>>12 & 0x7) != 6 && (c[j][4]>>12 & 0x7) != 3 && (c[j][4]>>7 & 0x1) != 1) {o += "TDC, single, "+(Math.pow(2,(c[j][4]>>4)&0xf))+"ch, ";}
- if((c[j][4] & 0xf000) == 0x6000) {o += "Nxyter RDO, ";}
- if((c[j][4] & 0x0900) == 0x100) {o += "TDC, double, "+(Math.pow(2,(c[j][4]>>4)&0xf))+"ch, ";}
- if((c[j][4] & 0x0900) == 0x800) {o += "TDC, dbl-sep, "+(Math.pow(2,(c[j][4]>>4)&0xf))+"ch, ";}
- if((c[j][4] & 0x0200) == 0x200) o += "Hub, ";
- if((c[j][4] & 0x0400) == 0x400) o += "SPI, ";
- if((c[j][4] & 0x00f0) == 0x090) o += "MVD rdo 2013, ";
- o = o.substring(0,o.length-2);
- }
- if(type == 0x90) {
- if((c[j][4] & 0xf001) == 0xc000) o += "CTS, ";
- if((c[j][4] & 0xf001) == 0xc001) o += "CTS w/AddOn, ";
- if((c[j][4] & 0x0f00) == 0x0e00) o += "GbE sctrl rdo, ";
- if((c[j][4] & 0x0f00) == 0x0d00) o += "GbE rdo, ";
- if((c[j][4] & 0x0010) != 0x0000) o += "opt. trg in, ";
- if((c[j][4] & 0x0020) != 0x0000) o += "opt. sctrl in, ";
- if((c[j][4] & 0x0040) != 0x0000) o += "opt. trg out, ";
- if((c[j][4] & 0x0080) != 0x0000) o += "opt. sctrl out, ";
- if(c[j][4] & 0xffff)
- o = o.substring(0,o.length-2);
- }
-
- o += "<td>"+c[j][5];
- o += "<td>"+c[j][6]+"°C";
-
- lastlevel = c[j][2];
- }
- document.getElementById("content").innerHTML = o;
- }
-
-
-getdata('../commands/nettrace.pl',update);
-
-
-//parent port layer board type compiletime
-</script>
-</body></html>
-
}
- 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 (MAC)<th>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>MAC<th>serial\n";
printlist(0,1);
print "</table>";
my $serial = GetSerial($uids->{$addr},$hardware->{$addr}>>24&0xff);
my $mac = '';
- $mac = GetMac($uids->{$addr}) if $feat =~ /GbE/;
- printf("<tr class=\"level level%i%s\"><td><div>%i</div>0x%04x<td title=\"0x%08x\">%s<td title=\"0x%08x%08x\n%s\">%s<td title=\"0x%08x\">%s<td>%.1f°C<td title=\"%s\">%016x - %i<td>%s\n",
+ $mac = GetMac($uids->{$addr},$btype) if $feat =~ /GbE/;
+ printf("<tr class=\"level level%i%s\"><td><div>%i</div>0x%04x<td title=\"0x%08x\">%s<td title=\"0x%08x%08x\n%s\">%s<td title=\"0x%08x\">%s<td>%.1f°C<td>%016x - %i<td>%s<td>%s\n",
$layer,
($layer!=$lastlayer?' newlevel':' oldlevel'),
$p,
$ctime->{$addr},
time2str('%Y-%m-%d %H:%M',$ctime->{$addr}),
($temp->{$addr}>>20)/16,
- $mac,
$uids->{$addr},
$endpid->{$addr},
+ $mac,
$serial);
$lastlayer = $layer;
sub GetMac {
my $id = shift @_;
+ my $btype = shift @_;
$id = sprintf('%08x',$id);
my $r = 'da:7a:3'.substr($id,7,1).':'.substr($id,8,2).':'.substr($id,10,2).':'.substr($id,12,2);
+ if ($btype =~ /TRB3sc/) {
+ $r = 'da:7a:0'.substr($id,7,1).':'.substr($id,8,2).':'.substr($id,10,2).':'.substr($id,12,2);
+ }
return $r;
}