toio.device_interface.dummy module

Dummy device interface (for debugging)

class toio.device_interface.dummy.DummyCube[source]

Bases: CubeInterface

Dummy cube interface for debugging.

All functions succeed but do nothing. read() returns empty list ‘[]’.

async connect() bool[source]
async disconnect() bool[source]
async read(char_uuid: UUID) bytearray[source]
async write(char_uuid: UUID, data: bytes | bytearray | memoryview, response: bool = False) None[source]
async register_notification_handler(char_uuid: UUID, notification_handler: Callable[[BleakGATTCharacteristic, bytearray], None | Awaitable[None]]) bool[source]
async unregister_notification_handler(char_uuid: UUID) bool[source]
is_connect()[source]

Implemented in v1.1.0 or later

get current connection state