404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.188.211.4: ~ $
3

M�]W��@s:dZddlZddlZGdd�de�ZGdd�dej�ZdS)z�The settings for RS485 are stored in a dedicated object that can be applied to
serial ports (where supported).
NOTE: Some implementations may only support a subset of the settings.
�Nc@seZdZddd�ZdS)�
RS485SettingsTFNcCs"||_||_||_||_||_dS)N)�rts_level_for_tx�rts_level_for_rx�loopback�delay_before_tx�delay_before_rx)�selfrrrrr�r	�/usr/lib/python3.6/rs485.py�__init__s
zRS485Settings.__init__)TFFNN)�__name__�
__module__�__qualname__rr	r	r	r
rs
rcsFeZdZdZ�fdd�Z�fdd�Zedd��Zejdd��Z�Z	S)	�RS485a5    A subclass that replaces the write method with one that toggles RTS
    according to the RS485 settings.

    NOTE: This may work unreliably on some serial ports (control signals not
          synchronized or delayed compared to data). Using delays may be
          unreliable (varying times, larger than expected) as the OS may not
          support very fine grained delays (no smaller than in the order of
          tens of milliseconds).

    NOTE: Some implementations support this natively. Better performance
          can be expected when the native version is used.

    NOTE: The loopback property is ignored by this implementation. The actual
          behavior depends on the used hardware.

    Usage:

        ser = RS485(...)
        ser.rs485_mode = RS485Settings(...)
        ser.write(b'hello')
    cstt|�j||�d|_dS)N)�superrr�_alternate_rs485_settings)r�args�kwargs)�	__class__r	r
r;szRS485.__init__cs�|jdk	rz|j|jj�|jjdk	r2tj|jj�tt|�j|�tt|�j	�|jj
dk	rjtj|jj
�|j|jj�ntt|�j|�dS)z=Write to port, controlling RTS before and after transmitting.N)rZsetRTSrr�timeZsleeprr�write�flushrr)r�b)rr	r
r?s
zRS485.writecCs|jS)z�        Enable RS485 mode and apply new settings, set to None to disable.
        See serial.rs485.RS485Settings for more info about the value.
        )r)rr	r	r
�
rs485_modeRszRS485.rs485_modecCs
||_dS)N)r)rZrs485_settingsr	r	r
rZs)
rr
r�__doc__rr�propertyr�setter�
__classcell__r	r	)rr
r#s
r)rr�serial�objectrZSerialrr	r	r	r
�<module>s

Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 2 KB 0644
__init__.cpython-36.pyc File 2 KB 0644
aio.cpython-36.opt-1.pyc File 14 KB 0644
aio.cpython-36.pyc File 14.18 KB 0644
rfc2217.cpython-36.opt-1.pyc File 31.88 KB 0644
rfc2217.cpython-36.pyc File 31.88 KB 0644
rs485.cpython-36.opt-1.pyc File 2.72 KB 0644
rs485.cpython-36.pyc File 2.72 KB 0644
serialcli.cpython-36.opt-1.pyc File 6.45 KB 0644
serialcli.cpython-36.pyc File 6.45 KB 0644
serialjava.cpython-36.opt-1.pyc File 7.08 KB 0644
serialjava.cpython-36.pyc File 7.08 KB 0644
serialposix.cpython-36.opt-1.pyc File 18.69 KB 0644
serialposix.cpython-36.pyc File 18.72 KB 0644
serialutil.cpython-36.opt-1.pyc File 16.04 KB 0644
serialutil.cpython-36.pyc File 16.04 KB 0644
serialwin32.cpython-36.opt-1.pyc File 12.11 KB 0644
serialwin32.cpython-36.pyc File 12.11 KB 0644
win32.cpython-36.opt-1.pyc File 6.15 KB 0644
win32.cpython-36.pyc File 6.15 KB 0644