File: //usr/lib/python3/dist-packages/twisted/internet/__pycache__/_posixserialport.cpython-38.pyc
U
W[� � @ sl d Z ddlmZmZ ddlmZ ddlmZ ddlmZ ddlm Z ddl
mZmZ G dd � d e ej
�Zd
S )z
Serial Port Protocol
� )�division�absolute_import)�PARITY_NONE)�STOPBITS_ONE)� EIGHTBITS)�BaseSerialPort)�abstract�fdescc @ sL e Zd ZdZdZdeeedddfdd�Zdd� Z d d
� Z
dd� Zd
d� ZdS )�
SerialPortz>
A select()able serial device, acting as a transport.
� i�% r c
C s^ t j�| |� | j||||||| |
d�| _|| _| �� | �� || _| j� | � | �
� d S )N)�baudrate�bytesize�parity�stopbits�timeout�xonxoff�rtscts)r �FileDescriptor�__init__Z_serialFactory�_serial�reactorZ
flushInputZflushOutput�protocolZmakeConnectionZstartReading)�selfr ZdeviceNameOrPortNumberr r r
r r r r r � r �C/usr/lib/python3/dist-packages/twisted/internet/_posixserialport.pyr s"