mirror of
https://github.com/google/bumble.git
synced 2026-05-10 04:18:03 +00:00
typing surrport for HCI commands return parameters
This commit is contained in:
42
bumble/vendor/zephyr/hci.py
vendored
42
bumble/vendor/zephyr/hci.py
vendored
@@ -46,9 +46,19 @@ class TX_Power_Level_Command:
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
@hci.HCI_Command.command
|
||||
@dataclasses.dataclass
|
||||
class HCI_Write_Tx_Power_Level_Command(hci.HCI_Command, TX_Power_Level_Command):
|
||||
class HCI_Write_Tx_Power_Level_ReturnParameters(hci.HCI_StatusReturnParameters):
|
||||
handle_type: int = hci.field(metadata=hci.metadata(1))
|
||||
connection_handle: int = hci.field(metadata=hci.metadata(2))
|
||||
selected_tx_power_level: int = hci.field(metadata=hci.metadata(-1))
|
||||
|
||||
|
||||
@hci.HCI_SyncCommand.sync_command(HCI_Write_Tx_Power_Level_ReturnParameters)
|
||||
@dataclasses.dataclass
|
||||
class HCI_Write_Tx_Power_Level_Command(
|
||||
hci.HCI_SyncCommand[HCI_Write_Tx_Power_Level_ReturnParameters],
|
||||
TX_Power_Level_Command,
|
||||
):
|
||||
'''
|
||||
Write TX power level. See BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL in
|
||||
https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/bluetooth/hci_vs.h
|
||||
@@ -61,18 +71,21 @@ class HCI_Write_Tx_Power_Level_Command(hci.HCI_Command, TX_Power_Level_Command):
|
||||
connection_handle: int = dataclasses.field(metadata=hci.metadata(2))
|
||||
tx_power_level: int = dataclasses.field(metadata=hci.metadata(-1))
|
||||
|
||||
return_parameters_fields = [
|
||||
('status', hci.STATUS_SPEC),
|
||||
('handle_type', 1),
|
||||
('connection_handle', 2),
|
||||
('selected_tx_power_level', -1),
|
||||
]
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
@hci.HCI_Command.command
|
||||
@dataclasses.dataclass
|
||||
class HCI_Read_Tx_Power_Level_Command(hci.HCI_Command, TX_Power_Level_Command):
|
||||
class HCI_Read_Tx_Power_Level_ReturnParameters(hci.HCI_StatusReturnParameters):
|
||||
handle_type: int = hci.field(metadata=hci.metadata(1))
|
||||
connection_handle: int = hci.field(metadata=hci.metadata(2))
|
||||
tx_power_level: int = hci.field(metadata=hci.metadata(-1))
|
||||
|
||||
|
||||
@hci.HCI_SyncCommand.sync_command(HCI_Read_Tx_Power_Level_ReturnParameters)
|
||||
@dataclasses.dataclass
|
||||
class HCI_Read_Tx_Power_Level_Command(
|
||||
hci.HCI_SyncCommand[HCI_Read_Tx_Power_Level_ReturnParameters],
|
||||
TX_Power_Level_Command,
|
||||
):
|
||||
'''
|
||||
Read TX power level. See BT_HCI_OP_VS_READ_TX_POWER_LEVEL in
|
||||
https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/bluetooth/hci_vs.h
|
||||
@@ -83,10 +96,3 @@ class HCI_Read_Tx_Power_Level_Command(hci.HCI_Command, TX_Power_Level_Command):
|
||||
|
||||
handle_type: int = dataclasses.field(metadata=hci.metadata(1))
|
||||
connection_handle: int = dataclasses.field(metadata=hci.metadata(2))
|
||||
|
||||
return_parameters_fields = [
|
||||
('status', hci.STATUS_SPEC),
|
||||
('handle_type', 1),
|
||||
('connection_handle', 2),
|
||||
('tx_power_level', -1),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user