%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/serial/urlhandler/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/serial/urlhandler/__pycache__/protocol_spy.cpython-312.pyc |
� �1�_�# � � � d dl mZ d dlZd dlZd dlZd dlmZ d dlZd� Zd� Z G d� de � Z G d� d e � Z G d � dej � Zedk( r ed� Zd e_ ee� yy# e$ r d dl m Z Y �\w xY w)� )�absolute_importN)�to_bytesc # �B K � d}t j | � D ]Z }dj t |� � d|cxk rdk rn n|j d� ndf�� |dz }|dk( rd �� �O|d k\ s�Ud�� d}�\ |dkD r"|d k r|dz }|dk( rd �� d�� |d k r�d�� y y �w)z� yield tuples of hex and ASCII display in multiples of 16. Includes a space after 8 bytes and (None, None) after 16 bytes and at the end. r z{:02X} � � �ascii�.� � )� � � )NN)z r N)�serial� iterbytes�format�ord�decode)�data�n�bs �@/usr/lib/python3/dist-packages/serial/urlhandler/protocol_spy.py�sixteenr % s� � �� � �A� � � �d� #� ������A��'�d�a�>Q�'�>Q����'�):�WZ�[�[� �Q�����6��O� �"�W����A�� �1�u��"�f� ��F�A��A�v����� �"�f� �� �s �A,B�/)B�Bc # � K � g }g }d}t | � D ]n \ }}|�E|dj dj |� dj |� g� f�� |dd�= |dd�= |dz }�M|j |� |j |� �p y�w)z yield lines with hexdump of datar Nr r r )r �join�append)r �valuesr �offset�h�as r �hexdumpr <