| Server IP : 23.254.227.96 / Your IP : 216.73.216.183 Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64 User : viralblo ( 1001) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/self/root/lib/python3.6/site-packages/serial/__pycache__/ |
Upload File : |
3
M�]W�; � @ s� d Z ddlZddlZG dd� dej�Zejdd� �Zejdd� �Zed kr�G d
d� dej �Z
ej� Zeee
dd
d�Z
eje
� ej� ej� dS )z�Support asyncio with serial ports. EXPERIMENTAL
Posix platforms only, Python 3.4+ only.
Windows event loops can not wait for serial ports with the current
implementation. It should be possible to get that working though.
� Nc s� e Zd ZdZ� fdd�Zedd� �Zdd� Zdd � Zd
d� Z dd
� Z
dd� Zdd� Zdd� Z
dd� Zd:dd�Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+d,� Zd;d-d.�Zd<d0d1�Zd2d3� Zd=d4d5�Zd6d7� Zd8d9� Z� Z S )>�SerialTransportug An asyncio transport model of a serial communication channel.
A transport class is an abstraction of a communication channel.
This allows protocol implementations to be developed against the
transport abstraction without needing to know the details of the
underlying channel, such as whether it is a pipe, a socket, or
indeed a serial port.
You generally won’t instantiate a transport yourself; instead, you
will call `create_serial_connection` which will create the
transport and try to initiate the underlying communication channel,
calling you back when it succeeds.
c sv t � j� || _|| _|| _d| _d| _d| _g | _| j � d| _
d| _d| j_d| j_
|j|j| � |j| j� d S )NFi r )�super�__init__�_loop� _protocol�_serial�_closing�_protocol_paused�_max_read_size�
_write_buffer�_set_write_buffer_limits�_has_reader�_has_writerZtimeoutZ
write_timeout� call_soon�connection_made�_ensure_reader)�self�loop�protocolZserial_instance)� __class__� �/usr/lib/python3.6/aio.pyr % s
zSerialTransport.__init__c C s | j S )zThe underlying Serial instance.)r )r r r r �serial<