Skip to content
Back to top
View this page
Edit this page

# POSIX

class serialx.platforms.serial_posix.PosixSerial

  Bases: `BaseSerial`

  POSIX serial port implementation.

  __init__(*args, fileno=None, inter_byte_timeout=0.01, min_read_size=1, **kwargs)

    Initialize POSIX serial port.

    Parameters:

      - args (Any)

      - fileno (int | None)

      - inter_byte_timeout (float)

      - min_read_size (int)

      - kwargs (Any)

    Return type:

      None

  property is_open: bool

    Check if the serial port is open.

  fileno()

    Get the file descriptor number.

    Return type:

      int

  num_unread_bytes()

    Return the number of bytes waiting to be read.

    Return type:

      int

  num_unwritten_bytes()

    Return the number of bytes waiting to be written.

    Return type:

      int

class serialx.platforms.serial_posix.PosixSerialTransport

  Bases: `DescriptorTransport`

  POSIX serial port transport using asyncio.