1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
from types import TracebackType
class SerialError(IOError): ...
class Serial:
def __init__(
self,
devpath: str,
baudrate: int,
databits: int = ...,
parity: str = ...,
stopbits: int = ...,
xonxoff: bool = ...,
rtscts: bool = ...,
) -> None: ...
def __del__(self) -> None: ...
def __enter__(self) -> Serial: ... # noqa: Y034
def __exit__(self, t: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None) -> None: ...
def read(self, length: int, timeout: float | None = ...) -> bytes: ...
def write(self, data: bytes | bytearray | list[int]) -> int: ...
def poll(self, timeout: float | None = ...) -> bool: ...
def flush(self) -> None: ...
def input_waiting(self) -> int: ...
def output_waiting(self) -> int: ...
def close(self) -> None: ...
@property
def fd(self) -> int: ...
@property
def devpath(self) -> str: ...
baudrate: int
databits: int
parity: str
stopbits: int
xonxoff: bool
rtscts: bool
vmin: int
vtime: float
|