src.bluetooth_sig.gatt.characteristics.pushbutton_status_8¶
Pushbutton Status 8 characteristic (0x2C21).
Represents the status of up to 4 pushbuttons packed into a single byte. Each button occupies 2 bits, yielding four independent status values.
Classes¶
Name | Description |
|---|---|
Status of an individual pushbutton. |
|
Pushbutton Status 8 characteristic (0x2C21). |
|
Decoded pushbutton status for four buttons. |
Module Contents¶
- class src.bluetooth_sig.gatt.characteristics.pushbutton_status_8.ButtonStatus¶
Bases:
enum.IntEnumStatus of an individual pushbutton.
- Values:
NOT_ACTUATED: Button not actuated or not in use (0) PRESSED: Button pressed (1) RELEASED: Button released (2) RESERVED: Reserved for future use (3)
- NOT_ACTUATED = 0¶
- PRESSED = 1¶
- RELEASED = 2¶
- RESERVED = 3¶
- class src.bluetooth_sig.gatt.characteristics.pushbutton_status_8.PushbuttonStatus8Characteristic(info: src.bluetooth_sig.types.CharacteristicInfo | None = None, validation: src.bluetooth_sig.gatt.characteristics.characteristic_meta.ValidationConfig | None = None)¶
Bases:
src.bluetooth_sig.gatt.characteristics.base.BaseCharacteristic[PushbuttonStatus8Data]Pushbutton Status 8 characteristic (0x2C21).
org.bluetooth.characteristic.pushbutton_status_8
Four independent 2-bit button status fields packed into a single byte. Bits [1:0] → Button 0, [3:2] → Button 1, [5:4] → Button 2, [7:6] → Button 3.
- expected_length = 1¶
- class src.bluetooth_sig.gatt.characteristics.pushbutton_status_8.PushbuttonStatus8Data¶
Bases:
msgspec.StructDecoded pushbutton status for four buttons.
- button_0: ButtonStatus¶
- button_1: ButtonStatus¶
- button_2: ButtonStatus¶
- button_3: ButtonStatus¶