----------------------------------------------------------------------
($frame, $binary_mode = false)
| 486 | |
| 487 | //---------------------------------------------------------------------- |
| 488 | public static function debug($frame, $binary_mode = false) |
| 489 | { |
| 490 | if ($binary_mode) { |
| 491 | |
| 492 | foreach ($frame as &$frameLine) { |
| 493 | $frameLine = join('<span class="m"> </span>', explode('0', $frameLine)); |
| 494 | $frameLine = join('██', explode('1', $frameLine)); |
| 495 | } |
| 496 | |
| 497 | ?> |
| 498 | <style> |
| 499 | .m { background-color: white; } |
| 500 | </style> |
| 501 | <?php |
| 502 | echo '<pre><tt><br/ ><br/ ><br/ > '; |
| 503 | echo join("<br/ > ", $frame); |
| 504 | echo '</tt></pre><br/ ><br/ ><br/ ><br/ ><br/ ><br/ >'; |
| 505 | |
| 506 | } else { |
| 507 | |
| 508 | foreach ($frame as &$frameLine) { |
| 509 | $frameLine = join('<span class="m"> </span>', explode("\xc0", $frameLine)); |
| 510 | $frameLine = join('<span class="m">▒</span>', explode("\xc1", $frameLine)); |
| 511 | $frameLine = join('<span class="p"> </span>', explode("\xa0", $frameLine)); |
| 512 | $frameLine = join('<span class="p">▒</span>', explode("\xa1", $frameLine)); |
| 513 | $frameLine = join('<span class="s">◇</span>', explode("\x84", $frameLine)); //format 0 |
| 514 | $frameLine = join('<span class="s">◆</span>', explode("\x85", $frameLine)); //format 1 |
| 515 | $frameLine = join('<span class="x">☢</span>', explode("\x81", $frameLine)); //special bit |
| 516 | $frameLine = join('<span class="c"> </span>', explode("\x90", $frameLine)); //clock 0 |
| 517 | $frameLine = join('<span class="c">◷</span>', explode("\x91", $frameLine)); //clock 1 |
| 518 | $frameLine = join('<span class="f"> </span>', explode("\x88", $frameLine)); //version |
| 519 | $frameLine = join('<span class="f">▒</span>', explode("\x89", $frameLine)); //version |
| 520 | $frameLine = join('♦', explode("\x01", $frameLine)); |
| 521 | $frameLine = join('⋅', explode("\0", $frameLine)); |
| 522 | } |
| 523 | |
| 524 | ?> |
| 525 | <style> |
| 526 | .p { background-color: yellow; } |
| 527 | .m { background-color: #00FF00; } |
| 528 | .s { background-color: #FF0000; } |
| 529 | .c { background-color: aqua; } |
| 530 | .x { background-color: pink; } |
| 531 | .f { background-color: gold; } |
| 532 | </style> |
| 533 | <?php |
| 534 | echo "<pre><tt>"; |
| 535 | echo join("<br/ >", $frame); |
| 536 | echo "</tt></pre>"; |
| 537 | |
| 538 | } |
| 539 | } |
| 540 | |
| 541 | //---------------------------------------------------------------------- |
| 542 | public static function serial($frame) |
nothing calls this directly
no outgoing calls
no test coverage detected