tests: Bluetooth: Tester: Redefine service IDs as hex

Everything else is defined as hex, so it makes sense to
be consistent. This will also make it easier to find the
service IDs in the logs that primarily already log
commands and events as hex.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2024-11-04 13:36:16 +01:00 committed by Anas Nashif
commit 75f5f71200
2 changed files with 35 additions and 35 deletions

View file

@ -96,7 +96,7 @@ static void cmd_handler(void *p1, void *p2, void *p3)
cmd = k_fifo_get(&cmds_queue, K_FOREVER);
LOG_DBG("cmd service %u opcode 0x%02x index 0x%02x", cmd->hdr.service,
LOG_DBG("cmd service 0x%02x opcode 0x%02x index 0x%02x", cmd->hdr.service,
cmd->hdr.opcode, cmd->hdr.index);
len = sys_le16_to_cpu(cmd->hdr.len);
@ -296,7 +296,7 @@ static void tester_rsp_with_index(uint8_t service, uint8_t opcode, uint8_t index
{
struct btp_status s;
LOG_DBG("service %u opcode 0x%02x index 0x%02x status 0x%02x", service, opcode, index,
LOG_DBG("service 0x%02x opcode 0x%02x index 0x%02x status 0x%02x", service, opcode, index,
status);
if (status == BTP_STATUS_SUCCESS) {
@ -312,7 +312,7 @@ void tester_event(uint8_t service, uint8_t opcode, const void *data, size_t len)
{
__ASSERT_NO_MSG(opcode >= 0x80);
LOG_DBG("service %u opcode 0x%02x", service, opcode);
LOG_DBG("service 0x%02x opcode 0x%02x", service, opcode);
tester_send_with_index(service, opcode, BTP_INDEX, data, len);
}
@ -324,7 +324,7 @@ void tester_rsp_full(uint8_t service, uint8_t opcode, const void *rsp, size_t le
__ASSERT_NO_MSG(opcode < 0x80);
__ASSERT_NO_MSG(delayed_cmd != NULL);
LOG_DBG("service %u opcode 0x%02x", service, opcode);
LOG_DBG("service 0x%02x opcode 0x%02x", service, opcode);
tester_send_with_index(service, opcode, BTP_INDEX, rsp, len);
@ -342,7 +342,7 @@ void tester_rsp(uint8_t service, uint8_t opcode, uint8_t status)
__ASSERT_NO_MSG(opcode < 0x80);
__ASSERT_NO_MSG(delayed_cmd != NULL);
LOG_DBG("service %u opcode 0x%02x status 0x%02x", service, opcode, status);
LOG_DBG("service 0x%02x opcode 0x%02x status 0x%02x", service, opcode, status);
tester_rsp_with_index(service, opcode, BTP_INDEX, status);

View file

@ -45,36 +45,36 @@
#define BTP_INDEX_NONE 0xff
#define BTP_INDEX 0x00
#define BTP_SERVICE_ID_CORE 0
#define BTP_SERVICE_ID_GAP 1
#define BTP_SERVICE_ID_GATT 2
#define BTP_SERVICE_ID_L2CAP 3
#define BTP_SERVICE_ID_MESH 4
#define BTP_SERVICE_ID_MESH_MDL 5
#define BTP_SERVICE_GATT_CLIENT 6
#define BTP_SERVICE_GATT_SERVER 7
#define BTP_SERVICE_ID_VCS 8
#define BTP_SERVICE_ID_IAS 9
#define BTP_SERVICE_ID_AICS 10
#define BTP_SERVICE_ID_VOCS 11
#define BTP_SERVICE_ID_PACS 12
#define BTP_SERVICE_ID_ASCS 13
#define BTP_SERVICE_ID_BAP 14
#define BTP_SERVICE_ID_HAS 15
#define BTP_SERVICE_ID_MICP 16
#define BTP_SERVICE_ID_CSIS 17
#define BTP_SERVICE_ID_MICS 18
#define BTP_SERVICE_ID_CCP 19
#define BTP_SERVICE_ID_VCP 20
#define BTP_SERVICE_ID_CAS 21
#define BTP_SERVICE_ID_MCP 22
#define BTP_SERVICE_ID_GMCS 23
#define BTP_SERVICE_ID_HAP 24
#define BTP_SERVICE_ID_CSIP 25
#define BTP_SERVICE_ID_CAP 26
#define BTP_SERVICE_ID_TBS 27
#define BTP_SERVICE_ID_TMAP 28
#define BTP_SERVICE_ID_OTS 29
#define BTP_SERVICE_ID_CORE 0x00
#define BTP_SERVICE_ID_GAP 0x01
#define BTP_SERVICE_ID_GATT 0x02
#define BTP_SERVICE_ID_L2CAP 0x03
#define BTP_SERVICE_ID_MESH 0x04
#define BTP_SERVICE_ID_MESH_MDL 0x05
#define BTP_SERVICE_GATT_CLIENT 0x06
#define BTP_SERVICE_GATT_SERVER 0x07
#define BTP_SERVICE_ID_VCS 0x08
#define BTP_SERVICE_ID_IAS 0x09
#define BTP_SERVICE_ID_AICS 0x0a
#define BTP_SERVICE_ID_VOCS 0x0b
#define BTP_SERVICE_ID_PACS 0x0c
#define BTP_SERVICE_ID_ASCS 0x0d
#define BTP_SERVICE_ID_BAP 0x0e
#define BTP_SERVICE_ID_HAS 0x0f
#define BTP_SERVICE_ID_MICP 0x10
#define BTP_SERVICE_ID_CSIS 0x11
#define BTP_SERVICE_ID_MICS 0x12
#define BTP_SERVICE_ID_CCP 0x13
#define BTP_SERVICE_ID_VCP 0x14
#define BTP_SERVICE_ID_CAS 0x15
#define BTP_SERVICE_ID_MCP 0x16
#define BTP_SERVICE_ID_GMCS 0x17
#define BTP_SERVICE_ID_HAP 0x18
#define BTP_SERVICE_ID_CSIP 0x19
#define BTP_SERVICE_ID_CAP 0x1a
#define BTP_SERVICE_ID_TBS 0x1b
#define BTP_SERVICE_ID_TMAP 0x1c
#define BTP_SERVICE_ID_OTS 0x1d
#define BTP_SERVICE_ID_MAX BTP_SERVICE_ID_OTS