⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.144
Server IP:
157.245.143.252
Server:
Linux www 6.11.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 14 13:19:59 UTC 2024 x86_64
Server Software:
nginx/1.26.0
PHP Version:
8.3.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
serial
/
__pycache__
/
View File Name :
rs485.cpython-312.pyc
^ d d Z ddlmZ ddlZddlZ G d de Z G d dej Zy)zThe 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 e Zd Z ddZy) RS485SettingsNc J || _ || _ || _ || _ || _ y N)rts_level_for_txrts_level_for_rxloopbackdelay_before_txdelay_before_rx)selfr r r r r s ./usr/lib/python3/dist-packages/serial/rs485.py__init__zRS485Settings.__init__ s+ !1 0 .. )TFFNN)__name__ __module____qualname__r r r r r s "" /r r c ` e Zd ZdZ fdZ fdZed Zej d Z xZ 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') c : t t | |i | d | _ y r )superr r _alternate_rs485_settings)r argskwargs __class__s r r zRS485.__init__= s eT#T4V4)-&r c | j | j | j j | j j )t j | j j t t | # | t t | ' | j j )t j | j j | j | j j yt t | # | y)z=Write to port, controlling RTS before and after transmitting.N)r setRTSr r timesleepr r writeflushr r )r br s r r! zRS485.writeA s ))5KK66GGH--==I 499IIJ%$Q'%$&--==I 499IIJKK66GGH%$Q'r c | j S )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 s r rs485_modezRS485.rs485_modeT s ---r c || _ y r r% )r rs485_settingss r r&