403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.149.239.180
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/python3.6/site-packages/serial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.6/site-packages/serial/__pycache__/rs485.cpython-36.pyc
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

Youez - 2016 - github.com/yon3zu
LinuXploit