blatann.gatt.reader module¶
- class blatann.gatt.reader.GattcReader(ble_device, peer)¶
Bases:
object
Class which implements the state machine for completely reading a peripheral’s attribute
- property on_read_complete¶
Event that is emitted when a read completes on an attribute handle.
Handler args: (int attribute_handle, gatt.GattStatusCode, bytes data_read)
- Returns
an Event which can have handlers registered to and deregistered from
- Return type
- read(handle)¶
Reads the attribute value from the handle provided. Can only read from a single attribute at a time. If a read is in progress, raises an InvalidStateException
- Parameters
handle – the attribute handle to read
- Returns
A waitable that will fire when the read finishes. See on_read_complete for the values returned from the waitable
- Return type