trb_init_ports() or
die("can not connect to trbnet-daemon on the $ENV{'DAQOPSERVER'}");
-my @regs = (0,1,2,4,5,6,8,9,10,12,13,14,0x31,0x32,0x33,0x34,0x35,0x37,0x38,0x39,0x3a,0x3b
+my @regs = (0,1,2,4,5,6,8,9,10,12,13,14,0x31,0x32,0x33,0x34,0x35,0x37,0x38,0x39,0x3a,0x3b,0x8c,0x8d
);
'0x8a04' => [0x8a04,0x6050,0x6051,0x6052,0x6043,0x6044,0x6045,0x6046],
'0x8a05' => [0x8a05,0x6000,0x6001,0x6002,0x6053,0x6054,0x6055,0x6056],
'0x0100' => [0x0100],
- '0x8880' => [0x8880,0x5000,0x5001,0x5002,0x5003],
};
my $types = {
'0x8a04' => 'trb3sc',
'0x8a05' => 'trb3sc',
'0x0100' => 'rjkel',
- '0x8880' => 'trb3sc',
};
my $data;
foreach my $b (@boards) {
my $offset = 0xdf00;
- $offset = 0xcf00 if $b == 0x8880;
foreach my $r (@regs) {
my $o = trb_register_read($b,$r+$offset);
my @m0 = split('',$_[1]);
my @m1 = split('',$_[2]);
my @m2 = split('',$_[3]);
- my $length = $_[4];
+ my $active = $_[4];
+ my $length = $_[5];
my $out = "";
foreach my $i (0..$length-1) {
+ my $act = "";
+ $act = "̊" if ($active & (1<<$i));
+ $act = "̥" if (defined $active && !($active & (1<<$i)));
+
if($m0[$i] == 1) {
- $out .= "<font style=\"color:#0a0;\">◼</font>";
+ $out .= "<font style=\"color:#0a0;\">◼$act</font>";
}
elsif($m1[$i] == 1) {
- $out .= "<font style=\"color:#0da;\">◼</font>";
+ $out .= "<font style=\"color:#0da;\">◼$act</font>";
}
elsif($m2[$i] == 1) {
- $out .= "<font style=\"color:#aa0;\">◼</font>";
+ $out .= "<font style=\"color:#aa0;\">◼$act</font>";
}
else {
- $out .= "<font style=\"color:black\">◼</font>" if (($t[$i] eq '1'));
- $out .= "<font style=\"color:black\">◻</font>" if (($t[$i] eq '0'));
+ $out .= "<font style=\"color:black\">◼$act</font>" if (($t[$i] eq '1'));
+ $out .= "<font style=\"color:black\">◻$act</font>" if (($t[$i] eq '0'));
}
if ($i%4 == 3) {$out .=' ';}
my $multtmp2 = $d->{0x3a};
$multtmp2 = 0 if (! ($d->{0x37} & (1 << (8+$s))));
$multtmp2 = sprintf("%0".$length."b", $multtmp2);
+ my $active = $d->{0x8c};
- $o .= convbox($tmp,$multtmp0,$multtmp1,$multtmp2,$length)."<br>";
+ $o .= convbox($tmp,$multtmp0,$multtmp1,$multtmp2,$active,$length)."<br>";
$length = ($d->{0x31} & 0x3f) - 32;
return $o if $length <= 0;
$multtmp2 = $d->{0x3b};
$multtmp2 = 0 if (! ($d->{0x37} & (1 << (8+$s))));
$multtmp2 = sprintf("%0".$length."b", $multtmp2);
+ $active = $d->{0x8d};
- $o .= convbox($tmp,$multtmp0,$multtmp1,$multtmp2,$length);
+ $o .= convbox($tmp,$multtmp0,$multtmp1,$multtmp2,$active,$length);
return $o;
}
$multtmp = sprintf("%04b", $multtmp);
$tmp = sprintf("%04b", $tmp);
- $tmp = convbox($tmp,$multtmp,0,0,4);
+ $tmp = convbox($tmp,$multtmp,0,0,0,4);
$o .= $tmp."<br>";
$multtmp = sprintf("%04b",0);
$tmp = ($data->{$outp*4+1} >> (4*$slice)) & 0xF;
$tmp = sprintf("%04b",$tmp);
- $tmp = convbox($tmp,$multtmp,0,0,4);
+ $tmp = convbox($tmp,$multtmp,0,0,0,4);
$o .= $tmp;
return $o;
my $o = "";
my $val = ($data->{$outp*4}>>22) | ($data->{$outp*4+1} << 10);
+ my $act = ($data->{0x8c}>>22) | ($data->{0x8d} << 10);
my $tmp = sprintf("%016b",$val & 0xFFFF);
- $tmp = convbox($tmp,0,0,0,16);
+ $tmp = convbox($tmp,0,0,0,$act,16);
$o .= $tmp."<br>";
+
$tmp = sprintf("%016b",$val>>16 & 0xFFFF);
- $tmp = convbox($tmp,0,0,0,16);
+ $tmp = convbox($tmp,0,0,0,$act>>16,16);
$o .= $tmp;
}