toio.cube.api.id_information module¶
- class toio.cube.api.id_information.PositionId(payload: bytearray)[source]¶
Bases:
CubeResponse
Position id information response
References
- class toio.cube.api.id_information.StandardId(payload: bytearray)[source]¶
Bases:
CubeResponse
Standard id information response
References
- class toio.cube.api.id_information.PositionIdMissed(payload: bytearray)[source]¶
Bases:
CubeResponse
Position id missed response
References
https://toio.github.io/toio-spec/en/docs/ble_id#position-id-missed
- class toio.cube.api.id_information.StandardIdMissed(payload: bytearray)[source]¶
Bases:
CubeResponse
Standard id information response
References
https://toio.github.io/toio-spec/en/docs/ble_id#standard-id-missed
- toio.cube.api.id_information.IdInformationResponseType¶
Response types of id information characteristic
alias of
Union
[PositionId
,StandardId
,PositionIdMissed
,StandardIdMissed
]
- class toio.cube.api.id_information.IdInformation(interface: CubeInterface, device: Any)[source]¶
Bases:
CubeCharacteristic
ID sensor characteristic
References
https://toio.github.io/toio-spec/en/docs/ble_id
- static is_my_data(payload: bytearray) PositionId | StandardId | PositionIdMissed | StandardIdMissed | None [source]¶
If payload is my characteristic response, this function returns CubeResponse object. Otherwise, it returns None.
- Parameters:
payload (GattReadData) – received data from the cube.
- __init__(interface: CubeInterface, device: Any)[source]¶
- async read() PositionId | StandardId | PositionIdMissed | StandardIdMissed | None [source]¶
Read id information response
- Returns:
One of IdInformationData or None (None returns when read fails)