Low-Level API

You probably shouldn’t use this.

Contains the messy details of communicating with a pixels die.

All the messy details of communicating with a Pixels die.

Not really meant to be user-accessible.

_message_handlers: dict[type, list[Callable[[nat20.msglib.Message], NoneType]]]

Event receivers

_wait_queue: dict[type, list[_asyncio.Future]]

Handlers waiting for a one-time response

property address
async connect()[source]

Does the bits necessary to start receiving stuff.

async disconnect(*exc)[source]

Does the bits necessary to stop receiving stuff.

property is_connected
async send(message: Message)[source]

Send a message to the connected device

async send_and_wait(msg: Message, respcls: type[R]) R[source]

Sends a message and waits for the response.

Returns the response.

async wait(msgcls: type[R]) R[source]

Waits for a given message.

Note that if you want to send and receive a response, you should use send_and_wait(), it has better async properties.