OSDN Git Service

hcidump: Add parsing for ATT Execute Write command
authorAndre Dieb Martins <andre.dieb@signove.com>
Wed, 30 Mar 2011 14:01:34 +0000 (11:01 -0300)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 17 Dec 2012 22:53:03 +0000 (23:53 +0100)
BT's Core V4.0 document is buggy regarding Execute Write Response, so we'll
leave it out until a proper description is given.

tools/parser/att.c

index 7046357..a6f42df 100644 (file)
@@ -523,6 +523,19 @@ static void att_prep_write_dump(int level, struct frame *frm)
        printf("\n");
 }
 
+static void att_exec_write_req_dump(int level, struct frame *frm)
+{
+       uint8_t flags = get_u8(frm);
+
+       p_indent(level, frm);
+       if (flags == 0x00)
+               printf("cancel all prepared writes ");
+       else
+               printf("immediatelly write all pending prepared values ");
+
+       printf("(0x%2.2x)\n", flags);
+}
+
 static void att_handle_notify_dump(int level, struct frame *frm)
 {
        uint16_t handle = btohs(htons(get_u16(frm)));
@@ -607,6 +620,9 @@ void att_dump(int level, struct frame *frm)
                case ATT_OP_PREP_WRITE_RESP:
                        att_prep_write_dump(level + 1, frm);
                        break;
+               case ATT_OP_EXEC_WRITE_REQ:
+                       att_exec_write_req_dump(level + 1, frm);
+                       break;
                case ATT_OP_HANDLE_NOTIFY:
                        att_handle_notify_dump(level + 1, frm);
                        break;