Allow register HCI packets with custom names

This commit is contained in:
Josh Wu
2025-07-19 20:46:33 +08:00
parent d9d971b8b3
commit fc3fd7f25b
2 changed files with 55 additions and 27 deletions
+9
View File
@@ -238,6 +238,15 @@ def test_HCI_Command():
command = hci.HCI_Command(op_code=0x5566, parameters=bytes.fromhex('AABBCC'))
basic_check(command)
@hci.HCI_Command.command
class CustomCommand(hci.HCI_Command):
op_code = 0x7788
name = 'Custom Command'
basic_check(CustomCommand())
assert CustomCommand().op_code == 0x7788
assert CustomCommand().name == 'Custom Command'
# -----------------------------------------------------------------------------
@pytest.mark.parametrize(