pyserial の API リファレンス
pyserial (pyserial/pyserial) の公開 API 87 件 —— クラス 20、関数 3、メソッド 64。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。
リポジトリ: pyserial/pyserial
| 種別 | 件数 |
|---|---|
| クラス | 20 |
| 関数 | 3 |
| メソッド | 64 |
API 一覧
class
serial.rfc2217.PortManagerThis class manages the state of Telnet and RFC 2217.
method
serial.rfc2217.PortManager.filter(data)Handle a bunch of incoming bytes.
method
serial.rfc2217.PortManager.telnet_send_option(action, option)Send DO, DONT, WILL, WONT.
class
serial.rfc2217.SerialSerial port implementation for RFC 2217 remote serial ports.
method
serial.rfc2217.Serial.cd()Read terminal status line: Carrier Detect.
method
serial.rfc2217.Serial.close()Close port
method
serial.rfc2217.Serial.cts()Read terminal status line: Clear To Send.
method
serial.rfc2217.Serial.dsr()Read terminal status line: Data Set Ready.
method
serial.rfc2217.Serial.get_modem_state()get last modem state (cached value.
method
serial.rfc2217.Serial.open()Open port with current settings.
method
serial.rfc2217.Serial.read(size=1)Read size bytes from the serial port.
method
serial.rfc2217.Serial.rfc2217_send_purge(value)Send purge request to the remote.
method
serial.rfc2217.Serial.rfc2217_send_subnegotiation(option, value=b'')Subnegotiation of RFC2217 parameters.
method
serial.rfc2217.Serial.ri()Read terminal status line: Ring Indicator.
method
serial.rfc2217.Serial.telnet_send_option(action, option)Send DO, DONT, WILL, WONT.
method
serial.rfc2217.Serial.timeout()Get the current timeout setting.
class
serial.rfc2217.TelnetOptionManage a single telnet option, keeps track of DO/DONT WILL/WONT.
class
serial.rfc2217.TelnetSubnegotiationA object to handle subnegotiation of options.
method
serial.rfc2217.TelnetSubnegotiation.set(value)Request a change of the value.
class
serial.serialposix.PosixPollSerialPoll based read implementation.
class
serial.serialposix.SerialSerial port class POSIX implementation.
method
serial.serialposix.Serial.cd()Read terminal status line: Carrier Detect
method
serial.serialposix.Serial.close()Close port
method
serial.serialposix.Serial.cts()Read terminal status line: Clear To Send
method
serial.serialposix.Serial.dsr()Read terminal status line: Data Set Ready
method
serial.serialposix.Serial.flush()Flush of file like objects.
method
serial.serialposix.Serial.nonblocking()DEPRECATED - has no use
method
serial.serialposix.Serial.open()Open port with current settings.
method
serial.serialposix.Serial.read(size=1)Read size bytes from the serial port.
method
serial.serialposix.Serial.ri()Read terminal status line: Ring Indicator
method
serial.serialposix.Serial.send_break(duration=0.25)Send break condition.
class
serial.serialutil.PortNotOpenErrorPort is not open
class
serial.serialutil.SerialBaseSerial port base class.
method
serial.serialutil.SerialBase.baudrate()Get the current baud rate setting.
method
serial.serialutil.SerialBase.bytesize()Get the current byte size setting.
method
serial.serialutil.SerialBase.parity()Get the current parity setting.
method
serial.serialutil.SerialBase.port()Get the current port setting.
method
serial.serialutil.SerialBase.send_break(duration=0.25)Send break condition.
method
serial.serialutil.SerialBase.stopbits()Get the current stop bits setting.
method
serial.serialutil.SerialBase.timeout()Get the current timeout setting.
method
serial.serialutil.SerialBase.write_timeout()Get the current timeout setting.
method
serial.serialutil.SerialBase.xonxoff()Get the current XON/XOFF setting.
class
serial.serialutil.SerialExceptionBase class for serial port related exceptions.
class
serial.serialutil.SerialTimeoutExceptionWrite timeouts give an exception
class
serial.serialutil.TimeoutAbstraction for timeout operations.
method
serial.serialutil.Timeout.expired() -> boolReturn a boolean, telling if the timeout has expired.
method
serial.serialutil.Timeout.restart(duration:int | float) -> NoneRestart a timeout.
method
serial.serialutil.Timeout.time_left() -> float | NoneCalculate how many seconds are left until the timeout expires.
func
serial.serialutil.to_bytes(seq)convert a sequence to a bytes type
class
serial.serialwin32.SerialSerial port implementation for Win32 based on ctypes.
method
serial.serialwin32.Serial.cd()Read terminal status line: Carrier Detect
method
serial.serialwin32.Serial.close()Close port
method
serial.serialwin32.Serial.cts()Read terminal status line: Clear To Send
method
serial.serialwin32.Serial.dsr()Read terminal status line: Data Set Ready
method
serial.serialwin32.Serial.exclusive(exclusive)Change the exclusive access setting.
method
serial.serialwin32.Serial.flush()Flush of file like objects.
method
serial.serialwin32.Serial.open()Open port with current settings.
method
serial.serialwin32.Serial.read(size=1)Read size bytes from the serial port.
method
serial.serialwin32.Serial.ri()Read terminal status line: Ring Indicator
class
serial.threaded.FramedPacketRead binary packets.
method
serial.threaded.FramedPacket.connection_lost(exc)Forget transport
method
serial.threaded.FramedPacket.connection_made(transport)Store transport
class
serial.threaded.LineReaderRead and write (Unicode) lines from/to serial port.
method
serial.threaded.LineReader.flush()Flush the underlying transport
method
serial.threaded.LineReader.write_line(text)Write text to the transport.
class
serial.threaded.PacketizerRead binary packets from serial port.
method
serial.threaded.Packetizer.connection_lost(exc)Forget transport
method
serial.threaded.Packetizer.connection_made(transport)Store transport
class
serial.threaded.ProtocolProtocol as used by the ReaderThread.
method
serial.urlhandler.protocol_loop.Serial.open()Open port with current settings.
class
serial.urlhandler.protocol_socket.SerialSerial port implementation for plain sockets.
method
serial.urlhandler.protocol_socket.Serial.close()Close port
method
serial.urlhandler.protocol_socket.Serial.open()Open port with current settings.
method
serial.urlhandler.protocol_socket.Serial.send_break(duration=0.25)Send break condition.
class
serial.urlhandler.protocol_spy.FormatLogWrite data to logging module.
method
serial.urlhandler.protocol_spy.FormatLog.control(name, value)show control calls
method
serial.urlhandler.protocol_spy.FormatLog.rx(data)show received data
method
serial.urlhandler.protocol_spy.FormatLog.tx(data)show transmitted data
class
serial.urlhandler.protocol_spy.FormatLogHexWrite data to logging module.
method
serial.urlhandler.protocol_spy.FormatLogHex.rx(data)show received data
method
serial.urlhandler.protocol_spy.FormatLogHex.tx(data)show transmitted data
class
serial.urlhandler.protocol_spy.FormatRawForward only RX and TX data to output.
method
serial.urlhandler.protocol_spy.FormatRaw.control(name, value)(do not) show control calls
method
serial.urlhandler.protocol_spy.FormatRaw.rx(data)show received data
method
serial.urlhandler.protocol_spy.FormatRaw.tx(data)show transmitted data
func
serial.urlhandler.protocol_spy.hexdump(data)yield lines with hexdump of data
func
serial.win32.is_64bit()Returns true when running on a 64 bit system
この情報について
掲載しているシグネチャは pyserial/pyserial の公開ソースコードを
Python の ast モジュールで静的解析し、引数名・デフォルト値・
型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。
詳しくは仕組みの解説をご覧ください。