CharacteristicBuffer – BLE Service incoming values buffer.¶
Accumulates a Characteristic’s incoming values in a FIFO buffer.
CharacteristicBuffer(characteristic, *, timeout=1, buffer_size=64)¶
Create a new Characteristic object identified by the specified UUID.
Read characters. If
nbytesis specified then read at most that many bytes. Otherwise, read everything that arrives until the connection times out. Providing the number of bytes expected is highly recommended because it will be faster.
Returns: Data read Return type: bytes or None
Read bytes into the
buf. Read at most
Returns: number of bytes read and stored into
Return type: int or None (on a non-blocking error)
Read a line, ending in a newline character.
Returns: the line read Return type: int or None
The number of bytes in the input buffer, available to be read
Discard any unread characters in the input buffer.