----------------------------------------------------------------------
($frame, $binary_mode = false)
| 798 | |
| 799 | //---------------------------------------------------------------------- |
| 800 | public static function debug($frame, $binary_mode = false) |
| 801 | { |
| 802 | if ($binary_mode) { |
| 803 | |
| 804 | foreach ($frame as &$frameLine) { |
| 805 | $frameLine = join('<span class="m"> </span>', explode('0', $frameLine)); |
| 806 | $frameLine = join('██', explode('1', $frameLine)); |
| 807 | } |
| 808 | |
| 809 | ?> |
| 810 | <style> |
| 811 | .m { background-color: white; } |
| 812 | </style> |
| 813 | <?php |
| 814 | echo '<pre><tt><br/ ><br/ ><br/ > '; |
| 815 | echo join("<br/ > ", $frame); |
| 816 | echo '</tt></pre><br/ ><br/ ><br/ ><br/ ><br/ ><br/ >'; |
| 817 | |
| 818 | } else { |
| 819 | |
| 820 | foreach ($frame as &$frameLine) { |
| 821 | $frameLine = join('<span class="m"> </span>', explode("\xc0", $frameLine)); |
| 822 | $frameLine = join('<span class="m">▒</span>', explode("\xc1", $frameLine)); |
| 823 | $frameLine = join('<span class="p"> </span>', explode("\xa0", $frameLine)); |
| 824 | $frameLine = join('<span class="p">▒</span>', explode("\xa1", $frameLine)); |
| 825 | $frameLine = join('<span class="s">◇</span>', explode("\x84", $frameLine)); //format 0 |
| 826 | $frameLine = join('<span class="s">◆</span>', explode("\x85", $frameLine)); //format 1 |
| 827 | $frameLine = join('<span class="x">☢</span>', explode("\x81", $frameLine)); //special bit |
| 828 | $frameLine = join('<span class="c"> </span>', explode("\x90", $frameLine)); //clock 0 |
| 829 | $frameLine = join('<span class="c">◷</span>', explode("\x91", $frameLine)); //clock 1 |
| 830 | $frameLine = join('<span class="f"> </span>', explode("\x88", $frameLine)); //version |
| 831 | $frameLine = join('<span class="f">▒</span>', explode("\x89", $frameLine)); //version |
| 832 | $frameLine = join('♦', explode("\x01", $frameLine)); |
| 833 | $frameLine = join('⋅', explode("\0", $frameLine)); |
| 834 | } |
| 835 | |
| 836 | ?> |
| 837 | <style> |
| 838 | .p { background-color: yellow; } |
| 839 | .m { background-color: #00FF00; } |
| 840 | .s { background-color: #FF0000; } |
| 841 | .c { background-color: aqua; } |
| 842 | .x { background-color: pink; } |
| 843 | .f { background-color: gold; } |
| 844 | </style> |
| 845 | <?php |
| 846 | echo "<pre><tt>"; |
| 847 | echo join("<br/ >", $frame); |
| 848 | echo "</tt></pre>"; |
| 849 | |
| 850 | } |
| 851 | } |
| 852 | |
| 853 | //---------------------------------------------------------------------- |
| 854 | public static function serial($frame) |
nothing calls this directly
no outgoing calls
no test coverage detected