| Server IP : 138.197.107.151 / Your IP : 216.73.216.170 Web Server : Apache/2.4.58 (Ubuntu) System : Linux BloxBy-Builder 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64 User : wpbetasites_mrakzqskir ( 1022) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/twisted/internet/__pycache__/ |
Upload File : |
�
oj� � �d � d Z ddlmZmZmZ ddlmZmZ ddlm Z G d� de ej � Zy)z
Serial Port Protocol
� )� EIGHTBITS�PARITY_NONE�STOPBITS_ONE)�abstract�fdesc)�BaseSerialPortc �B � e Zd ZdZdZdeeedddfd�Zd� Z d� Z
d� Zd � Zy
)�
SerialPortz>
A select()able serial device, acting as a transport.
� i�% r c
�2 � t j j | |� | j ||||||| |
�� | _ || _ | j
� | j � || _ | j j | � | j � y )N)�baudrate�bytesize�parity�stopbits�timeout�xonxoff�rtscts)r �FileDescriptor�__init__�_serialFactory�_serial�reactor�
flushInput�flushOutput�protocol�makeConnection�startReading)�selfr �deviceNameOrPortNumberr r
r r r r r r s �C/usr/lib/python3/dist-packages/twisted/internet/_posixserialport.pyr zSerialPort.__init__ s� � � ���(�(��w�7��*�*�"�������� +�
��� ����������� ��
��
�
�$�$�T�*����� c �. � | j j S )N)r �fd�r s r �filenozSerialPort.fileno8 s � ��|�|���r! c �J � t j | j � |� S )z7
Write some data to the serial device.
)r � writeToFDr% )r �datas r �
writeSomeDatazSerialPort.writeSomeData; s � � ���t�{�{�}�d�3�3r! c �r � t j | j � | j j � S )z:
Some data's readable from serial device.
)r �
readFromFDr% r �dataReceivedr$ s r �doReadzSerialPort.doReadA s'