xref: /btstack/src/btstack_defines.h (revision 030e197dd0ee50e64b8cd0e01b839fdef4f8be97)
1 /*
2  * Copyright (C) 2015 BlueKitchen GmbH
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  * 3. Neither the name of the copyright holders nor the names of
14  *    contributors may be used to endorse or promote products derived
15  *    from this software without specific prior written permission.
16  * 4. Any redistribution, use, or modification is done solely for
17  *    personal benefit and not for any commercial purpose or for
18  *    monetary gain.
19  *
20  * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
21  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
24  * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
27  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
30  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31  * SUCH DAMAGE.
32  *
33  * Please inquire about commercial licensing options at
34  * [email protected]
35  *
36  */
37 
38 /*
39  * btstack-defines.h
40  *
41  * BTstack definitions, events, and error codes */
42 
43 #ifndef BTSTACK_DEFINES_H
44 #define BTSTACK_DEFINES_H
45 
46 #include <stdint.h>
47 
48 #include "btstack_linked_list.h"
49 
50 // UNUSED macro
51 #ifndef UNUSED
52 #define UNUSED(x) (void)(sizeof(x))
53 #endif
54 
55 // TYPES
56 
57 // packet handler
58 typedef void (*btstack_packet_handler_t) (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
59 
60 // packet callback supporting multiple registrations
61 typedef struct {
62     btstack_linked_item_t    item;
63     btstack_packet_handler_t callback;
64 } btstack_packet_callback_registration_t;
65 
66 // context callback supporting multiple registrations
67 typedef struct {
68   btstack_linked_item_t * item;
69   void (*callback)(void * context);
70   void * context;
71 } btstack_context_callback_registration_t;
72 
73 /**
74  * @brief 128 bit key used with AES128 in Security Manager
75  */
76 typedef uint8_t sm_key_t[16];
77 
78 // DEFINES
79 
80 // hci con handles (12 bit): 0x0000..0x0fff
81 #define HCI_CON_HANDLE_INVALID 0xffff
82 
83 
84 #define DAEMON_EVENT_PACKET     0x05
85 
86 // L2CAP data
87 #define L2CAP_DATA_PACKET       0x06
88 
89 // RFCOMM data
90 #define RFCOMM_DATA_PACKET      0x07
91 
92 // Attribute protocol data
93 #define ATT_DATA_PACKET         0x08
94 
95 // Security Manager protocol data
96 #define SM_DATA_PACKET          0x09
97 
98 // SDP query result - only used by daemon
99 // format: type (8), record_id (16), attribute_id (16), attribute_length (16), attribute_value (max 1k)
100 #define SDP_CLIENT_PACKET       0x0a
101 
102 // BNEP data
103 #define BNEP_DATA_PACKET        0x0b
104 
105 // Unicast Connectionless Data
106 #define UCD_DATA_PACKET         0x0c
107 
108 // GOEP data
109 #define GOEP_DATA_PACKET        0x0d
110 
111 // PBAP data
112 #define PBAP_DATA_PACKET        0x0e
113 
114 // AVRCP browsing data
115 #define AVRCP_BROWSING_DATA_PACKET     0x0f
116 
117 // MAP data
118 #define MAP_DATA_PACKET        0x10
119 
120 // Mesh Provisioning PDU
121 #define PROVISIONING_DATA_PACKET 0x11
122 
123 // Mesh Proxy PDU
124 #define MESH_PROXY_DATA_PACKET   0x11
125 
126 // Mesh Network PDU
127 #define MESH_NETWORK_PACKET      0x12
128 
129 // Mesh Network PDU
130 #define MESH_BEACON_PACKET       0x13
131 
132 // debug log messages
133 #define LOG_MESSAGE_PACKET      0xfc
134 
135 
136 // DAEMON COMMANDS
137 
138 #define OGF_BTSTACK 0x3d
139 
140 // cmds for BTstack
141 // get state: @returns HCI_STATE
142 #define BTSTACK_GET_STATE                                  0x01
143 
144 // set power mode: param HCI_POWER_MODE
145 #define BTSTACK_SET_POWER_MODE                             0x02
146 
147 // set capture mode: param on
148 #define BTSTACK_SET_ACL_CAPTURE_MODE                       0x03
149 
150 // get BTstack version
151 #define BTSTACK_GET_VERSION                                0x04
152 
153 // get system Bluetooth state
154 #define BTSTACK_GET_SYSTEM_BLUETOOTH_ENABLED               0x05
155 
156 // set system Bluetooth state
157 #define BTSTACK_SET_SYSTEM_BLUETOOTH_ENABLED               0x06
158 
159 // enable inquiry scan for this client
160 #define BTSTACK_SET_DISCOVERABLE                           0x07
161 
162 // set global Bluetooth state
163 #define BTSTACK_SET_BLUETOOTH_ENABLED                      0x08
164 
165 // create l2cap channel: param bd_addr(48), psm (16)
166 #define L2CAP_CREATE_CHANNEL                               0x20
167 
168 // disconnect l2cap disconnect, param channel(16), reason(8)
169 #define L2CAP_DISCONNECT                                   0x21
170 
171 // register l2cap service: param psm(16), mtu (16)
172 #define L2CAP_REGISTER_SERVICE                             0x22
173 
174 // unregister l2cap disconnect, param psm(16)
175 #define L2CAP_UNREGISTER_SERVICE                           0x23
176 
177 // accept connection param bd_addr(48), dest cid (16)
178 #define L2CAP_ACCEPT_CONNECTION                            0x24
179 
180 // decline l2cap disconnect,param bd_addr(48), dest cid (16), reason(8)
181 #define L2CAP_DECLINE_CONNECTION                           0x25
182 
183 // create l2cap channel: param bd_addr(48), psm (16), mtu (16)
184 #define L2CAP_CREATE_CHANNEL_MTU                           0x26
185 
186 // register SDP Service Record: service record (size)
187 #define SDP_REGISTER_SERVICE_RECORD                        0x30
188 
189 // unregister SDP Service Record
190 #define SDP_UNREGISTER_SERVICE_RECORD                      0x31
191 
192 // Get remote RFCOMM services
193 #define SDP_CLIENT_QUERY_RFCOMM_SERVICES                   0x32
194 
195 // Get remote SDP services
196 #define SDP_CLIENT_QUERY_SERVICES                          0x33
197 
198 // RFCOMM "HCI" Commands
199 #define RFCOMM_CREATE_CHANNEL       0x40
200 #define RFCOMM_DISCONNECT     0x41
201 #define RFCOMM_REGISTER_SERVICE     0x42
202 #define RFCOMM_UNREGISTER_SERVICE   0x43
203 #define RFCOMM_ACCEPT_CONNECTION    0x44
204 #define RFCOMM_DECLINE_CONNECTION   0x45
205 #define RFCOMM_PERSISTENT_CHANNEL   0x46
206 #define RFCOMM_CREATE_CHANNEL_WITH_CREDITS   0x47
207 #define RFCOMM_REGISTER_SERVICE_WITH_CREDITS 0x48
208 #define RFCOMM_GRANT_CREDITS                 0x49
209 
210 // GAP Classic 0x50
211 #define GAP_DISCONNECT              0x50
212 
213 // GAP LE      0x60
214 #define GAP_LE_SCAN_START           0x60
215 #define GAP_LE_SCAN_STOP            0x61
216 #define GAP_LE_CONNECT              0x62
217 #define GAP_LE_CONNECT_CANCEL       0x63
218 #define GAP_LE_SET_SCAN_PARAMETERS  0x64
219 
220 // GATT (Client) 0x70
221 #define GATT_DISCOVER_ALL_PRIMARY_SERVICES                       0x70
222 #define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID16                 0x71
223 #define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID128                0x72
224 #define GATT_FIND_INCLUDED_SERVICES_FOR_SERVICE                  0x73
225 #define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE                0x74
226 #define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE_BY_UUID128     0x75
227 #define GATT_DISCOVER_CHARACTERISTIC_DESCRIPTORS                 0x76
228 #define GATT_READ_VALUE_OF_CHARACTERISTIC                        0x77
229 #define GATT_READ_LONG_VALUE_OF_CHARACTERISTIC                   0x78
230 #define GATT_WRITE_VALUE_OF_CHARACTERISTIC_WITHOUT_RESPONSE      0x79
231 #define GATT_WRITE_VALUE_OF_CHARACTERISTIC                       0x7A
232 #define GATT_WRITE_LONG_VALUE_OF_CHARACTERISTIC                  0x7B
233 #define GATT_RELIABLE_WRITE_LONG_VALUE_OF_CHARACTERISTIC         0x7C
234 #define GATT_READ_CHARACTERISTIC_DESCRIPTOR                      0X7D
235 #define GATT_READ_LONG_CHARACTERISTIC_DESCRIPTOR                 0X7E
236 #define GATT_WRITE_CHARACTERISTIC_DESCRIPTOR                     0X7F
237 #define GATT_WRITE_LONG_CHARACTERISTIC_DESCRIPTOR                0X80
238 #define GATT_WRITE_CLIENT_CHARACTERISTIC_CONFIGURATION           0X81
239 #define GATT_GET_MTU                                             0x82
240 
241 // SM 0x90
242 #define SM_SET_AUTHENTICATION_REQUIREMENTS 0x90
243 #define SM_SET_IO_CAPABILITIES             0x92
244 #define SM_BONDING_DECLINE                 0x93
245 #define SM_JUST_WORKS_CONFIRM              0x94
246 #define SM_NUMERIC_COMPARISON_CONFIRM      0x95
247 #define SM_PASSKEY_INPUT                   0x96
248 
249 // ATT
250 
251 // ..
252 // Internal properties reuse some GATT Characteristic Properties fields
253 #define ATT_DB_VERSION                                     0x01
254 
255 // EVENTS
256 
257 // Events from host controller to host
258 
259 /**
260  * @format 1
261  * @param status
262  */
263 #define HCI_EVENT_INQUIRY_COMPLETE                         0x01
264 
265 /**
266  * @format 1B11132
267  * @param num_responses
268  * @param bd_addr
269  * @param page_scan_repetition_mode
270  * @param reserved1
271  * @param reserved2
272  * @param class_of_device
273  * @param clock_offset
274  */
275 #define HCI_EVENT_INQUIRY_RESULT                           0x02
276 
277 /**
278  * @format 12B11
279  * @param status
280  * @param connection_handle
281  * @param bd_addr
282  * @param link_type
283  * @param encryption_enabled
284  */
285 #define HCI_EVENT_CONNECTION_COMPLETE                      0x03
286 /**
287  * @format B31
288  * @param bd_addr
289  * @param class_of_device
290  * @param link_type
291  */
292 #define HCI_EVENT_CONNECTION_REQUEST                       0x04
293 /**
294  * @format 121
295  * @param status
296  * @param connection_handle
297  * @param reason
298  */
299 #define HCI_EVENT_DISCONNECTION_COMPLETE                   0x05
300 /**
301  * @format 12
302  * @param status
303  * @param connection_handle
304  */
305 #define HCI_EVENT_AUTHENTICATION_COMPLETE                 0x06
306 
307 // HCI_EVENT_AUTHENTICATION_COMPLETE_EVENT is deprecated, use HCI_EVENT_AUTHENTICATION_COMPLETE instead
308 #define HCI_EVENT_AUTHENTICATION_COMPLETE_EVENT HCI_EVENT_AUTHENTICATION_COMPLETE
309 
310 /**
311  * @format 1BN
312  * @param status
313  * @param bd_addr
314  * @param remote_name
315  */
316 #define HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE             0x07
317 /**
318  * @format 121
319  * @param status
320  * @param connection_handle
321  * @param encryption_enabled
322  */
323 #define HCI_EVENT_ENCRYPTION_CHANGE                        0x08
324 /**
325  * @format 12
326  * @param status
327  * @param connection_handle
328  */
329 #define HCI_EVENT_CHANGE_CONNECTION_LINK_KEY_COMPLETE      0x09
330 /**
331  * @format 121
332  * @param status
333  * @param connection_handle
334  * @param key_flag
335  */
336 #define HCI_EVENT_MASTER_LINK_KEY_COMPLETE                 0x0A
337 
338 #define HCI_EVENT_READ_REMOTE_SUPPORTED_FEATURES_COMPLETE  0x0B
339 
340 /**
341  * @format 12122
342  * @param status
343  * @param connection_handle
344  * @param version
345  * @param manufacturer_name
346  * @param subversion
347  */
348 #define HCI_EVENT_READ_REMOTE_VERSION_INFORMATION_COMPLETE 0x0C
349 
350 #define HCI_EVENT_QOS_SETUP_COMPLETE                       0x0D
351 
352 /**
353  * @format 12R
354  * @param num_hci_command_packets
355  * @param command_opcode
356  * @param return_parameters
357  */
358 #define HCI_EVENT_COMMAND_COMPLETE                         0x0E
359 /**
360  * @format 112
361  * @param status
362  * @param num_hci_command_packets
363  * @param command_opcode
364  */
365 #define HCI_EVENT_COMMAND_STATUS                           0x0F
366 
367 /**
368  * @format 1
369  * @param hardware_code
370  */
371 #define HCI_EVENT_HARDWARE_ERROR                           0x10
372 
373 #define HCI_EVENT_FLUSH_OCCURRED                           0x11
374 
375 /**
376  * @format 1B1
377  * @param status
378  * @param bd_addr
379  * @param role
380  */
381 #define HCI_EVENT_ROLE_CHANGE                              0x12
382 
383 // TODO: number_of_handles 1, connection_handle[H*i], hc_num_of_completed_packets[2*i]
384 #define HCI_EVENT_NUMBER_OF_COMPLETED_PACKETS              0x13
385 
386 /**
387  * @format 1H12
388  * @param status
389  * @param handle
390  * @param mode
391  * @param interval
392  */
393 #define HCI_EVENT_MODE_CHANGE                              0x14
394 
395 // TODO: num_keys, bd_addr[B*i], link_key[16 octets * i]
396 #define HCI_EVENT_RETURN_LINK_KEYS                         0x15
397 
398 /**
399  * @format B
400  * @param bd_addr
401  */
402 #define HCI_EVENT_PIN_CODE_REQUEST                         0x16
403 
404 /**
405  * @format B
406  * @param bd_addr
407  */
408 #define HCI_EVENT_LINK_KEY_REQUEST                         0x17
409 
410 // TODO: bd_addr B, link_key 16octets, key_type 1
411 #define HCI_EVENT_LINK_KEY_NOTIFICATION                    0x18
412 
413 /**
414  * @format 1
415  * @param link_type
416  */
417 #define HCI_EVENT_DATA_BUFFER_OVERFLOW                     0x1A
418 
419 /**
420  * @format H1
421  * @param handle
422  * @param lmp_max_slots
423  */
424 #define HCI_EVENT_MAX_SLOTS_CHANGED                        0x1B
425 
426 /**
427  * @format 1H2
428  * @param status
429  * @param handle
430  * @param clock_offset
431  */
432 #define HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE               0x1C
433 
434 /**
435  * @format 1H2
436  * @param status
437  * @param handle
438  * @param packet_types
439  * @pnote packet_type is in plural to avoid clash with Java binding Packet.getPacketType()
440  */
441 #define HCI_EVENT_CONNECTION_PACKET_TYPE_CHANGED           0x1D
442 
443 /**
444  * @format 1B11321
445  * @param num_responses
446  * @param bd_addr
447  * @param page_scan_repetition_mode
448  * @param reserved
449  * @param class_of_device
450  * @param clock_offset
451  * @param rssi
452  */
453 #define HCI_EVENT_INQUIRY_RESULT_WITH_RSSI                 0x22
454 
455 #define HCI_EVENT_READ_REMOTE_EXTENDED_FEATURES_COMPLETE   0x23
456 
457 /**
458  * @format 1HB111221
459  * @param status
460  * @param handle
461  * @param bd_addr
462  * @param link_type
463  * @param transmission_interval
464  * @param retransmission_interval
465  * @param rx_packet_length
466  * @param tx_packet_length
467  * @param air_mode
468  */
469 #define HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE          0x2C
470 
471 // TODO: serialize extended_inquiry_response and provide parser
472 /**
473  * @format 1B11321
474  * @param num_responses
475  * @param bd_addr
476  * @param page_scan_repetition_mode
477  * @param reserved
478  * @param class_of_device
479  * @param clock_offset
480  * @param rssi
481  */
482 #define HCI_EVENT_EXTENDED_INQUIRY_RESPONSE                0x2F
483 
484  /**
485   * @format 1H
486   * @param status
487   * @param handle
488   */
489 #define HCI_EVENT_ENCRYPTION_KEY_REFRESH_COMPLETE          0x30
490 
491 #define HCI_EVENT_IO_CAPABILITY_REQUEST                    0x31
492 #define HCI_EVENT_IO_CAPABILITY_RESPONSE                   0x32
493 
494 /**
495  * @format B4
496  * @param bd_addr
497  * @param numeric_value
498  */
499 #define HCI_EVENT_USER_CONFIRMATION_REQUEST                0x33
500 
501 /**
502  * @format B
503  * @param bd_addr
504  */
505 #define HCI_EVENT_USER_PASSKEY_REQUEST                     0x34
506 
507 /**
508  * @format B
509  * @param bd_addr
510  */
511 #define HCI_EVENT_REMOTE_OOB_DATA_REQUEST                  0x35
512 
513 /**
514  * @format 1B
515  * @param status
516  * @param bd_addr
517  */
518 #define HCI_EVENT_SIMPLE_PAIRING_COMPLETE                  0x36
519 
520 /**
521  * @format B4
522  * @param bd_addr
523  * @param numeric_value
524  */
525 #define HCI_EVENT_USER_PASSKEY_NOTIFICATION                0x3B
526 
527 /**
528  * @format B1
529  * @param bd_addr
530  * @param notification_type
531  */
532 #define HCI_EVENT_KEYPRESS_NOTIFICATION                    0x3C
533 
534 #define HCI_EVENT_LE_META                                  0x3E
535 
536 // last used HCI_EVENT in 2.1 is 0x3d
537 // last used HCI_EVENT in 4.1 is 0x57
538 // last used HCI_EVENT in 5.2 is 0x58
539 
540 #define HCI_EVENT_VENDOR_SPECIFIC                          0xFF
541 
542 /**
543  * @format 11H11B2221
544  * @param subevent_code
545  * @param status
546  * @param connection_handle
547  * @param role
548  * @param peer_address_type
549  * @param peer_address
550  * @param conn_interval
551  * @param conn_latency
552  * @param supervision_timeout
553  * @param master_clock_accuracy
554  */
555 #define HCI_SUBEVENT_LE_CONNECTION_COMPLETE                0x01
556 
557 // array of advertisements, not handled by event accessor generator
558 #define HCI_SUBEVENT_LE_ADVERTISING_REPORT                 0x02
559 
560 /**
561  * @format 11H222
562  * @param subevent_code
563  * @param status
564  * @param connection_handle
565  * @param conn_interval
566  * @param conn_latency
567  * @param supervision_timeout
568  */
569  #define HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE         0x03
570 
571 /**
572  * @format 1HD2
573  * @param subevent_code
574  * @param connection_handle
575  * @param random_number
576  * @param encryption_diversifier
577  */
578 #define HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE 0x04
579 
580 /**
581  * @format 1HD2
582  * @param subevent_code
583  * @param connection_handle
584  * @param random_number
585  * @param encryption_diversifier
586  */
587 #define HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST              0x05
588 
589 /**
590  * @format 1H2222
591  * @param subevent_code
592  * @param connection_handle
593  * @param interval_min
594  * @param interval_max
595  * @param latency
596  * @param timeout
597  */
598 #define HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 0x06
599 
600 /**
601  * @format 1H2222
602  * @param subevent_code
603  * @param connection_handle
604  * @param max_tx_octets
605  * @param max_tx_time
606  * @param max_rx_octets
607  * @param max_rx_time
608  */
609 #define HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 0x07
610 
611 /**
612  * @format 11QQ
613  * @param subevent_code
614  * @param status
615  * @param dhkey_x x coordinate of P256 public key
616  * @param dhkey_y y coordinate of P256 public key
617  */
618 #define HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE 0x08
619  /**
620  * @format 11Q
621  * @param subevent_code
622  * @param status
623  * @param dhkey Diffie-Hellman key
624  */
625 #define HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE            0x09
626 
627 /**
628  * @format 11H11BBB2221
629  * @param subevent_code
630  * @param status
631  * @param connection_handle
632  * @param role
633  * @param peer_address_type
634  * @param perr_addresss
635  * @param local_resolvable_private_addres
636  * @param peer_resolvable_private_addres
637  * @param conn_interval
638  * @param conn_latency
639  * @param supervision_timeout
640  * @param master_clock_accuracy
641  */
642 #define HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE       0x0A
643 
644 // array of advertisements, not handled by event accessor generator
645 #define HCI_SUBEVENT_LE_DIRECT_ADVERTISING_REPORT          0x0B
646 
647 
648 /**
649  * @format 1
650  * @param state
651  */
652 #define BTSTACK_EVENT_STATE                                0x60
653 
654 /**
655  * @format 1
656  * @param number_connections
657  */
658 #define BTSTACK_EVENT_NR_CONNECTIONS_CHANGED               0x61
659 
660 /**
661  * @format
662  */
663 #define BTSTACK_EVENT_POWERON_FAILED                       0x62
664 
665 /**
666  * @format 1
667  * @param discoverable
668  */
669 #define BTSTACK_EVENT_DISCOVERABLE_ENABLED                 0x66
670 
671 // Daemon Events
672 
673 /**
674  * @format 112
675  * @param major
676  * @param minor
677  @ @param revision
678  */
679 #define DAEMON_EVENT_VERSION                               0x63
680 
681 // data: system bluetooth on/off (bool)
682 /**
683  * @format 1
684  * param system_bluetooth_enabled
685  */
686 #define DAEMON_EVENT_SYSTEM_BLUETOOTH_ENABLED              0x64
687 
688 // data: event (8), len(8), status (8) == 0, address (48), name (1984 bits = 248 bytes)
689 
690 /*
691  * @format 1BT
692  * @param status == 0 to match read_remote_name_request
693  * @param address
694  * @param name
695  */
696 #define DAEMON_EVENT_REMOTE_NAME_CACHED                    0x65
697 
698 // internal - data: event(8)
699 #define DAEMON_EVENT_CONNECTION_OPENED                     0x67
700 
701 // internal - data: event(8)
702 #define DAEMON_EVENT_CONNECTION_CLOSED                     0x68
703 
704 // data: event(8), len(8), local_cid(16), credits(8)
705 #define DAEMON_EVENT_L2CAP_CREDITS                         0x74
706 
707 /**
708  * @format 12
709  * @param status
710  * @param psm
711  */
712 #define DAEMON_EVENT_L2CAP_SERVICE_REGISTERED              0x75
713 
714 /**
715  * @format 21
716  * @param rfcomm_cid
717  * @param credits
718  */
719 #define DAEMON_EVENT_RFCOMM_CREDITS                        0x84
720 
721 /**
722  * @format 11
723  * @param status
724  * @param channel_id
725  */
726 #define DAEMON_EVENT_RFCOMM_SERVICE_REGISTERED             0x85
727 
728 /**
729  * @format 11
730  * @param status
731  * @param server_channel_id
732  */
733 #define DAEMON_EVENT_RFCOMM_PERSISTENT_CHANNEL             0x86
734 
735 /**
736   * @format 14
737   * @param status
738   * @param service_record_handle
739   */
740 #define DAEMON_EVENT_SDP_SERVICE_REGISTERED                0x90
741 
742 
743 
744 // additional HCI events
745 
746 /**
747  * @brief Indicates HCI transport enters/exits Sleep mode
748  * @format 1
749  * @param active
750  */
751 #define HCI_EVENT_TRANSPORT_SLEEP_MODE                     0x69
752 
753 /**
754  * @brief Transport ready
755  */
756 #define HCI_EVENT_TRANSPORT_READY                          0x6D
757 
758 /**
759  * @brief Outgoing packet
760  */
761 #define HCI_EVENT_TRANSPORT_PACKET_SENT                    0x6E
762 
763 /**
764  * @format B
765  * @param handle
766  */
767 #define HCI_EVENT_SCO_CAN_SEND_NOW                         0x6F
768 
769 
770 // L2CAP EVENTS
771 
772 /**
773  * @format 1BH222222111
774  * @param status
775  * @param address
776  * @param handle
777  * @param psm
778  * @param local_cid
779  * @param remote_cid
780  * @param local_mtu
781  * @param remote_mtu
782  * @param flush_timeout
783  * @param incoming
784  * @param mode
785  * @param fcs
786  */
787 #define L2CAP_EVENT_CHANNEL_OPENED                         0x70
788 
789 /*
790  * @format 2
791  * @param local_cid
792  */
793 #define L2CAP_EVENT_CHANNEL_CLOSED                         0x71
794 
795 /**
796  * @format BH222
797  * @param address
798  * @param handle
799  * @param psm
800  * @param local_cid
801  * @param remote_cid
802  */
803 #define L2CAP_EVENT_INCOMING_CONNECTION                    0x72
804 
805 // ??
806 // data: event(8), len(8), handle(16)
807 #define L2CAP_EVENT_TIMEOUT_CHECK                          0x73
808 
809 /**
810  * @format H2222
811  * @param handle
812  * @param interval_min
813  * @param interval_max
814  * @param latencey
815  * @param timeout_multiplier
816  */
817 #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST    0x76
818 
819 // data: event(8), len(8), handle(16), result (16) (0 == ok, 1 == fail)
820  /**
821   * @format H2
822   * @param handle
823   * @param result
824   */
825 #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE   0x77
826 
827 /**
828  * @format 2
829  * @param local_cid
830  */
831 #define L2CAP_EVENT_CAN_SEND_NOW                           0x78
832 
833 // LE Data Channels
834 
835 /**
836  * @format 1BH2222
837  * @param address_type
838  * @param address
839  * @param handle
840  * @param psm
841  * @param local_cid
842  * @param remote_cid
843  * @param remote_mtu
844  */
845 #define L2CAP_EVENT_LE_INCOMING_CONNECTION                 0x79
846 
847 /**
848  * @format 11BH122222
849  * @param status
850  * @param address_type
851  * @param address
852  * @param handle
853  * @param incoming
854  * @param psm
855  * @param local_cid
856  * @param remote_cid
857  * @param local_mtu
858  * @param remote_mtu
859  */
860 #define L2CAP_EVENT_LE_CHANNEL_OPENED                      0x7a
861 
862 /*
863  * @format 2
864  * @param local_cid
865  */
866 #define L2CAP_EVENT_LE_CHANNEL_CLOSED                      0x7b
867 
868 /*
869  * @format 2
870  * @param local_cid
871  */
872 #define L2CAP_EVENT_LE_CAN_SEND_NOW                        0x7c
873 
874 /*
875  * @format 2
876  * @param local_cid
877  */
878 #define L2CAP_EVENT_LE_PACKET_SENT                         0x7d
879 
880 /*
881  * @format 2
882  * @param local_cid
883  */
884 #define L2CAP_EVENT_ERTM_BUFFER_RELEASED                   0x7e
885 
886 /*
887  * @format
888  */
889 #define L2CAP_EVENT_TRIGGER_RUN                            0x7f
890 
891 
892 // RFCOMM EVENTS
893 
894 /**
895  * @format 1B21221
896  * @param status
897  * @param bd_addr
898  * @param con_handle
899  * @param server_channel
900  * @param rfcomm_cid
901  * @param max_frame_size
902  * @param incoming
903  */
904 #define RFCOMM_EVENT_CHANNEL_OPENED                        0x80
905 
906 /**
907  * @format 2
908  * @param rfcomm_cid
909  */
910 #define RFCOMM_EVENT_CHANNEL_CLOSED                        0x81
911 
912 /**
913  * @format B12
914  * @param bd_addr
915  * @param server_channel
916  * @param rfcomm_cid
917  */
918 #define RFCOMM_EVENT_INCOMING_CONNECTION                   0x82
919 
920 /**
921  * @format 21
922  * @param rfcomm_cid
923  * @param line_status
924  */
925 #define RFCOMM_EVENT_REMOTE_LINE_STATUS                    0x83
926 
927 /**
928  * @format 21
929  * @param rfcomm_cid
930  * @param modem_status
931  */
932 #define RFCOMM_EVENT_REMOTE_MODEM_STATUS                   0x87
933 
934  /**
935   * TODO: format for variable data 2?
936   * param rfcomm_cid
937   * param rpn_data
938   */
939 #define RFCOMM_EVENT_PORT_CONFIGURATION                    0x88
940 
941 /**
942  * @format 2
943  * @param rfcomm_cid
944  */
945 #define RFCOMM_EVENT_CAN_SEND_NOW                          0x89
946 
947 
948 /**
949  * @format 1
950  * @param status
951  */
952 #define SDP_EVENT_QUERY_COMPLETE                                 0x91
953 
954 /**
955  * @format 1T
956  * @param rfcomm_channel
957  * @param name
958  */
959 #define SDP_EVENT_QUERY_RFCOMM_SERVICE                           0x92
960 
961 /**
962  * @format 22221
963  * @param record_id
964  * @param attribute_id
965  * @param attribute_length
966  * @param data_offset
967  * @param data
968  */
969 #define SDP_EVENT_QUERY_ATTRIBUTE_BYTE                           0x93
970 
971 /**
972  * @format 22LV
973  * @param record_id
974  * @param attribute_id
975  * @param attribute_length
976  * @param attribute_value
977  */
978 #define SDP_EVENT_QUERY_ATTRIBUTE_VALUE                          0x94
979 
980 /**
981  * @format 224
982  * @param total_count
983  * @param record_index
984  * @param record_handle
985  * @note Not provided by daemon, only used for internal testing
986  */
987 #define SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE                    0x95
988 
989 /**
990  * @format H1
991  * @param handle
992  * @param att_status  see ATT errors in bluetooth.h
993  */
994 #define GATT_EVENT_QUERY_COMPLETE                                0xA0
995 
996 /**
997  * @format HX
998  * @param handle
999  * @param service
1000  */
1001 #define GATT_EVENT_SERVICE_QUERY_RESULT                          0xA1
1002 
1003 /**
1004  * @format HY
1005  * @param handle
1006  * @param characteristic
1007  */
1008 #define GATT_EVENT_CHARACTERISTIC_QUERY_RESULT                   0xA2
1009 
1010 /**
1011  * @format H2X
1012  * @param handle
1013  * @param include_handle
1014  * @param service
1015  */
1016 #define GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT                 0xA3
1017 
1018 /**
1019  * @format HZ
1020  * @param handle
1021  * @param characteristic_descriptor
1022  */
1023 #define GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT   0xA4
1024 
1025 /**
1026  * @format H2LV
1027  * @param handle
1028  * @param value_handle
1029  * @param value_length
1030  * @param value
1031  */
1032 #define GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT             0xA5
1033 
1034 /**
1035  * @format H22LV
1036  * @param handle
1037  * @param value_handle
1038  * @param value_offset
1039  * @param value_length
1040  * @param value
1041  */
1042 #define GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT        0xA6
1043 
1044 /**
1045  * @format H2LV
1046  * @param handle
1047  * @param value_handle
1048  * @param value_length
1049  * @param value
1050  */
1051 #define GATT_EVENT_NOTIFICATION                                  0xA7
1052 
1053 /**
1054  * @format H2LV
1055  * @param handle
1056  * @param value_handle
1057  * @param value_length
1058  * @param value
1059  */
1060 #define GATT_EVENT_INDICATION                                    0xA8
1061 
1062 /**
1063  * @format H2LV
1064  * @param handle
1065  * @param descriptor_handle
1066  * @param descriptor_length
1067  * @param descriptor
1068  */
1069 #define GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT        0xA9
1070 
1071 /**
1072  * @format H2LV
1073  * @param handle
1074  * @param descriptor_offset
1075  * @param descriptor_length
1076  * @param descriptor
1077  */
1078 #define GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT   0xAA
1079 
1080 /**
1081  * @format H2
1082  * @param handle
1083  * @param MTU
1084  */
1085 #define GATT_EVENT_MTU                                           0xAB
1086 
1087 /**
1088  * @format H
1089  * @param handle
1090  */
1091 #define GATT_EVENT_CAN_WRITE_WITHOUT_RESPONSE                    0xAC
1092 
1093 /**
1094  * @format 1BH
1095  * @param address_type
1096  * @param address
1097  * @param handle
1098  */
1099 #define ATT_EVENT_CONNECTED                                      0xB3
1100 
1101 /**
1102  * @format H
1103  * @param handle
1104  */
1105 #define ATT_EVENT_DISCONNECTED                                   0xB4
1106 
1107 /**
1108  * @format H2
1109  * @param handle
1110  * @param MTU
1111  */
1112 #define ATT_EVENT_MTU_EXCHANGE_COMPLETE                          0xB5
1113 
1114  /**
1115   * @format 1H2
1116   * @param status
1117   * @param conn_handle
1118   * @param attribute_handle
1119   */
1120 #define ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE               0xB6
1121 
1122 /**
1123  * @format
1124  */
1125 #define ATT_EVENT_CAN_SEND_NOW                                   0xB7
1126 
1127 // TODO: daemon only event
1128 
1129 /**
1130  * @format 12
1131  * @param status
1132  * @param service_uuid
1133  */
1134  #define BNEP_EVENT_SERVICE_REGISTERED                      0xC0
1135 
1136 /**
1137  * @format 12222BH
1138  * @param status
1139  * @param bnep_cid
1140  * @param source_uuid
1141  * @param destination_uuid
1142  * @param mtu
1143  * @param remote_address
1144  * @param con_handle
1145  */
1146  #define BNEP_EVENT_CHANNEL_OPENED                   0xC1
1147 
1148 /**
1149  * @format 222B
1150  * @param bnep_cid
1151  * @param source_uuid
1152  * @param destination_uuid
1153  * @param remote_address
1154  */
1155  #define BNEP_EVENT_CHANNEL_CLOSED                          0xC2
1156 
1157 /**
1158  * @format 222B1
1159  * @param bnep_cid
1160  * @param source_uuid
1161  * @param destination_uuid
1162  * @param remote_address
1163  * @param channel_state
1164  */
1165 #define BNEP_EVENT_CHANNEL_TIMEOUT                         0xC3
1166 
1167 /**
1168  * @format 222B
1169  * @param bnep_cid
1170  * @param source_uuid
1171  * @param destination_uuid
1172  * @param remote_address
1173  */
1174  #define BNEP_EVENT_CAN_SEND_NOW                           0xC4
1175 
1176  /**
1177   * @format H1B
1178   * @param handle
1179   * @param addr_type
1180   * @param address
1181   */
1182 #define SM_EVENT_JUST_WORKS_REQUEST                              0xD0
1183 
1184  /**
1185   * @format H1B
1186   * @param handle
1187   * @param addr_type
1188   * @param address
1189   */
1190 #define SM_EVENT_JUST_WORKS_CANCEL                               0xD1
1191 
1192  /**
1193   * @format H1B4
1194   * @param handle
1195   * @param addr_type
1196   * @param address
1197   * @param passkey
1198   */
1199 #define SM_EVENT_PASSKEY_DISPLAY_NUMBER                          0xD2
1200 
1201  /**
1202   * @format H1B
1203   * @param handle
1204   * @param addr_type
1205   * @param address
1206   */
1207 #define SM_EVENT_PASSKEY_DISPLAY_CANCEL                          0xD3
1208 
1209  /**
1210   * @format H1B
1211   * @param handle
1212   * @param addr_type
1213   * @param address
1214   */
1215 #define SM_EVENT_PASSKEY_INPUT_NUMBER                            0xD4
1216 
1217  /**
1218   * @format H1B
1219   * @param handle
1220   * @param addr_type
1221   * @param address
1222   */
1223 #define SM_EVENT_PASSKEY_INPUT_CANCEL                            0xD5
1224 
1225  /**
1226   * @format H1B4
1227   * @param handle
1228   * @param addr_type
1229   * @param address
1230   * @param passkey
1231   */
1232 #define SM_EVENT_NUMERIC_COMPARISON_REQUEST                      0xD6
1233 
1234  /**
1235   * @format H1B
1236   * @param handle
1237   * @param addr_type
1238   * @param address
1239   */
1240 #define SM_EVENT_NUMERIC_COMPARISON_CANCEL                       0xD7
1241 
1242  /**
1243   * @format H1B
1244   * @param handle
1245   * @param addr_type
1246   * @param address
1247   */
1248 #define SM_EVENT_IDENTITY_RESOLVING_STARTED                      0xD8
1249 
1250  /**
1251   * @format H1B
1252   * @param handle
1253   * @param addr_type
1254   * @param address
1255   */
1256 #define SM_EVENT_IDENTITY_RESOLVING_FAILED                       0xD9
1257 
1258  /**
1259   * @brief Identify resolving succeeded
1260   *
1261   * @format H1B1B2
1262   * @param handle
1263   * @param addr_type
1264   * @param address
1265   * @param identity_addr_type
1266   * @param identity_address
1267   * @param index
1268   *
1269   */
1270 #define SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED                    0xDA
1271 
1272  /**
1273   * @format H1B
1274   * @param handle
1275   * @param addr_type
1276   * @param address
1277   */
1278 #define SM_EVENT_AUTHORIZATION_REQUEST                           0xDB
1279 
1280  /**
1281   * @format H1B1
1282   * @param handle
1283   * @param addr_type
1284   * @param address
1285   * @param authorization_result
1286   */
1287 #define SM_EVENT_AUTHORIZATION_RESULT                            0xDC
1288 
1289  /**
1290   * @format H1
1291   * @param handle
1292   * @param action see SM_KEYPRESS_*
1293   */
1294 #define SM_EVENT_KEYPRESS_NOTIFICATION                           0xDD
1295 
1296  /**
1297   * @brief Emitted during pairing to inform app about address used as identity
1298   *
1299   * @format H1B1B2
1300   * @param handle
1301   * @param addr_type
1302   * @param address
1303   * @param identity_addr_type
1304   * @param identity_address
1305   * @param index
1306   */
1307 #define SM_EVENT_IDENTITY_CREATED                                0xDE
1308 
1309  /**
1310   * @brief Emitted to inform app that pairing is complete. Possible status values:
1311   *        ERROR_CODE_SUCCESS                            -> pairing success
1312   *        ERROR_CODE_CONNECTION_TIMEOUT                 -> timeout
1313   *        ERROR_CODE_REMOTE_USER_TERMINATED_CONNECTION  -> disconnect
1314   *        ERROR_CODE_AUTHENTICATION_FAILURE             -> SM protocol error, see reason field with SM_REASON_* from bluetooth.h
1315   *
1316   * @format H1B11
1317   * @param handle
1318   * @param addr_type
1319   * @param address
1320   * @param status
1321   * @param reason if status == ERROR_CODE_AUTHENTICATION_FAILURE
1322   */
1323 #define SM_EVENT_PAIRING_COMPLETE                                0xDF
1324 
1325 
1326 // GAP
1327 
1328 /**
1329  * @format H1
1330  * @param handle
1331  * @param security_level
1332  */
1333 #define GAP_EVENT_SECURITY_LEVEL                                 0xE0
1334 
1335 /**
1336  * @format 1B
1337  * @param status
1338  * @param address
1339  */
1340 #define GAP_EVENT_DEDICATED_BONDING_COMPLETED                    0xE1
1341 
1342 /**
1343  * @format 11B1JV
1344  * @param advertising_event_type
1345  * @param address_type
1346  * @param address
1347  * @param rssi
1348  * @param data_length
1349  * @param data
1350  */
1351 #define GAP_EVENT_ADVERTISING_REPORT                          0xE2
1352 
1353  /**
1354  * @format B132111JV
1355  * @param bd_addr
1356  * @param page_scan_repetition_mode
1357  * @param class_of_device
1358  * @param clock_offset
1359  * @param rssi_available
1360  * @param rssi
1361  * @param name_available
1362  * @param name_len
1363  * @param name
1364  */
1365 #define GAP_EVENT_INQUIRY_RESULT                              0xE3
1366 
1367 /**
1368  * @format 1
1369  * @param status
1370  */
1371 #define GAP_EVENT_INQUIRY_COMPLETE                            0xE4
1372 
1373 /**
1374  * @format H1
1375  * @param con_handle
1376  * @param rssi (signed integer -127..127)
1377  * @note Classic: rssi is in dB relative to Golden Receive Power Range
1378  * @note LE: rssi is absolute dBm
1379  */
1380 #define GAP_EVENT_RSSI_MEASUREMENT                            0xE5
1381 
1382 // Meta Events, see below for sub events
1383 #define HCI_EVENT_HSP_META                                 0xE8
1384 #define HCI_EVENT_HFP_META                                 0xE9
1385 #define HCI_EVENT_ANCS_META                                0xEA
1386 #define HCI_EVENT_AVDTP_META                               0xEB
1387 #define HCI_EVENT_AVRCP_META                               0xEC
1388 #define HCI_EVENT_GOEP_META                                0xED
1389 #define HCI_EVENT_PBAP_META                                0xEE
1390 #define HCI_EVENT_HID_META                                 0xEF
1391 #define HCI_EVENT_A2DP_META                                0xF0
1392 #define HCI_EVENT_HIDS_META                                0xF1
1393 #define HCI_EVENT_GATTSERVICE_META                         0xF2
1394 #define HCI_EVENT_BIP_META                                 0xF3
1395 #define HCI_EVENT_MAP_META                                 0xF4
1396 #define HCI_EVENT_MESH_META                                0xF5
1397 
1398 // Potential other meta groups
1399 // #define HCI_EVENT_BNEP_META                                0xxx
1400 // #define HCI_EVENT_GAP_META                                 0xxx
1401 // #define HCI_EVENT_GATT_META                                0xxx
1402 // #define HCI_EVENT_PAN_META                                 0xxx
1403 // #define HCI_EVENT_SDP_META                                 0xxx
1404 // #define HCI_EVENT_SM_META                                  0xxx
1405 
1406 
1407 /** HSP Subevent */
1408 
1409 /**
1410  * @format 11
1411  * @param subevent_code
1412  * @param status 0 == OK
1413  */
1414 #define HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE             0x01
1415 
1416 /**
1417  * @format 11
1418  * @param subevent_code
1419  * @param status 0 == OK
1420  */
1421 #define HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE           0x02
1422 
1423 
1424 /**
1425  * @format 11H
1426  * @param subevent_code
1427  * @param status 0 == OK
1428  * @param handle
1429  */
1430 #define HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE             0x03
1431 
1432 /**
1433  * @format 11
1434  * @param subevent_code
1435  * @param status 0 == OK
1436  */
1437 #define HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE          0x04
1438 
1439 /**
1440  * @format 1
1441  * @param subevent_code
1442  */
1443 #define HSP_SUBEVENT_RING                                  0x05
1444 
1445 /**
1446  * @format 11
1447  * @param subevent_code
1448  * @param gain Valid range: [0,15]
1449  */
1450 #define HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED               0x06
1451 
1452 /**
1453  * @format 11
1454  * @param subevent_code
1455  * @param gain Valid range: [0,15]
1456  */
1457 #define HSP_SUBEVENT_SPEAKER_GAIN_CHANGED                  0x07
1458 
1459 /**
1460  * @format 1JV
1461  * @param subevent_code
1462  * @param value_length
1463  * @param value
1464  */
1465 #define HSP_SUBEVENT_HS_COMMAND                            0x08
1466 
1467 /**
1468  * @format 1JV
1469  * @param subevent_code
1470  * @param value_length
1471  * @param value
1472  */
1473 #define HSP_SUBEVENT_AG_INDICATION                         0x09
1474 
1475 
1476 /** HFP Subevent */
1477 
1478 /**
1479  * @format 11HB
1480  * @param subevent_code
1481  * @param status 0 == OK
1482  * @param con_handle
1483  * @param bd_addr
1484  */
1485 #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED  0x01
1486 
1487 /**
1488  * @format 1
1489  * @param subevent_code
1490  */
1491 #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED     0x02
1492 
1493 /**
1494  * @format 11HB1
1495  * @param subevent_code
1496  * @param status 0 == OK
1497  * @param handle
1498  * @param bd_addr
1499  * @param negotiated_codec
1500  */
1501 #define HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED          0x03
1502 
1503 /**
1504  * @format 1
1505  * @param subevent_code
1506  */
1507 #define HFP_SUBEVENT_AUDIO_CONNECTION_RELEASED             0x04
1508 
1509 /**
1510  * @format 11
1511  * @param subevent_code
1512  * @param status 0 == OK
1513  */
1514 #define HFP_SUBEVENT_COMPLETE                              0x05
1515 
1516 /**
1517  * @format 11111111T
1518  * @param subevent_code
1519  * @param indicator_index
1520  * @param indicator_status
1521  * @param indicator_min_range
1522  * @param indicator_max_range
1523  * @param indicator_mandatory
1524  * @param indicator_enabled
1525  * @param indicator_status_changed
1526  * @param indicator_name
1527  */
1528 #define HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED           0x06
1529 
1530 /**
1531  * @format 111T
1532  * @param subevent_code
1533  * @param network_operator_mode
1534  * @param network_operator_format
1535  * @param network_operator_name
1536  */
1537 #define HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED              0x07
1538 
1539 /**
1540  * @format 11
1541  * @param subevent_code
1542  * @param error
1543  */
1544 #define HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR             0x08
1545 
1546 /**
1547  * @format 1
1548  * @param subevent_code
1549  */
1550 #define HFP_SUBEVENT_START_RINGINIG                           0x0A
1551 
1552 /**
1553  * @format 1
1554  * @param subevent_code
1555  */
1556 #define HFP_SUBEVENT_STOP_RINGINIG                            0x0B
1557 
1558 /**
1559  * @format 1
1560  * @param subevent_code
1561  */
1562 #define HFP_SUBEVENT_CALL_TERMINATED                          0x0C
1563 
1564 /**
1565  * @format 1T
1566  * @param subevent_code
1567  * @param number
1568  */
1569 #define HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER                   0x0D
1570 
1571 /**
1572  * @format 1
1573  * @param subevent_code
1574  */
1575 #define HFP_SUBEVENT_ATTACH_NUMBER_TO_VOICE_TAG               0x0E
1576 
1577 /**
1578  * @format 1T
1579  * @param subevent_code
1580  * @param number
1581  */
1582 #define HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG                     0x0F
1583 
1584 /**
1585  * @format 1T
1586  * @param subevent_code
1587  * @param dtmf code
1588  */
1589 #define HFP_SUBEVENT_TRANSMIT_DTMF_CODES                      0x10
1590 
1591 /**
1592  * @format 1
1593  * @param subevent_code
1594  */
1595  #define HFP_SUBEVENT_CALL_ANSWERED                            0x11
1596 
1597 /**
1598  * @format 1
1599  * @param subevent_code
1600  */
1601 #define HFP_SUBEVENT_CONFERENCE_CALL                          0x12
1602 
1603 /**
1604  * @format 1
1605  * @param subevent_code
1606  */
1607 #define HFP_SUBEVENT_RING                                     0x13
1608 
1609 /**
1610  * @format 11
1611  * @param subevent_code
1612  * @param gain
1613  */
1614  #define HFP_SUBEVENT_SPEAKER_VOLUME                           0x14
1615 
1616 /**
1617  * @format 11
1618  * @param subevent_code
1619  * @param gain
1620  */
1621 #define HFP_SUBEVENT_MICROPHONE_VOLUME                        0x15
1622 
1623 /**
1624  * @format 11T
1625  * @param subevent_code
1626  * @param type
1627  * @param number
1628  */
1629 #define HFP_SUBEVENT_CALL_WAITING_NOTIFICATION                0x16
1630 
1631 /**
1632  * @format 11T
1633  * @param subevent_code
1634  * @param type
1635  * @param number
1636  */
1637 #define HFP_SUBEVENT_CALLING_LINE_IDENTIFICATION_NOTIFICATION 0x17
1638 
1639 /**
1640  * @format 1111111T
1641  * @param subevent_code
1642  * @param clcc_idx
1643  * @param clcc_dir
1644  * @param clcc_status
1645  * @param clcc_mode
1646  * @param clcc_mpty
1647  * @param bnip_type
1648  * @param bnip_number
1649  */
1650 #define HFP_SUBEVENT_ENHANCED_CALL_STATUS                     0x18
1651 
1652 /**
1653  * @format 111T
1654  * @param subevent_code
1655  * @param status
1656  * @param bnip_type
1657  * @param bnip_number
1658  */
1659  #define HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION            0x19
1660 
1661 /**
1662  * @format 1T
1663  * @param subevent_code
1664  * @param value
1665  */
1666 #define HFP_SUBEVENT_RESPONSE_AND_HOLD_STATUS                 0x1A
1667 
1668 // ANCS Client
1669 
1670 /**
1671  * @format 1H
1672  * @param subevent_code
1673  * @param handle
1674  */
1675 #define ANCS_SUBEVENT_CLIENT_CONNECTED                              0xF0
1676 
1677 /**
1678  * @format 1H2T
1679  * @param subevent_code
1680  * @param handle
1681  * @param attribute_id
1682  * @param text
1683  */
1684 #define ANCS_SUBEVENT_CLIENT_NOTIFICATION                           0xF1
1685 
1686 /**
1687  * @format 1H
1688  * @param subevent_code
1689  * @param handle
1690  */
1691 #define ANCS_SUBEVENT_CLIENT_DISCONNECTED                           0xF2
1692 
1693 
1694 /** AVDTP Subevent */
1695 
1696 /**
1697  * @format 12111
1698  * @param subevent_code
1699  * @param avdtp_cid
1700  * @param local_seid
1701  * @param is_initiator
1702  * @param signal_identifier
1703  */
1704 #define AVDTP_SUBEVENT_SIGNALING_ACCEPT                     0x01
1705 
1706 /**
1707  * @format 12111
1708  * @param subevent_code
1709  * @param avdtp_cid
1710  * @param local_seid
1711  * @param is_initiator
1712  * @param signal_identifier
1713  */
1714 #define AVDTP_SUBEVENT_SIGNALING_REJECT                     0x02
1715 
1716 /**
1717  * @format 12111
1718  * @param subevent_code
1719  * @param avdtp_cid
1720  * @param local_seid
1721  * @param is_initiator
1722  * @param signal_identifier
1723  */
1724 #define AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT             0x03
1725 
1726 /**
1727  * @format 12B21
1728  * @param subevent_code
1729  * @param avdtp_cid
1730  * @param bd_addr
1731  * @param con_handle
1732  * @param status 0 == OK
1733  */
1734 #define AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED     0x04
1735 
1736 /**
1737  * @format 12
1738  * @param subevent_code
1739  * @param avdtp_cid
1740  */
1741 #define AVDTP_SUBEVENT_SIGNALING_CONNECTION_RELEASED        0x05
1742 
1743 /**
1744  * @format 121111
1745  * @param subevent_code
1746  * @param avdtp_cid
1747  * @param remote_seid        0x01 – 0x3E
1748  * @param in_use      0-not in use, 1-in use
1749  * @param media_type  0-audio, 1-video, 2-multimedia
1750  * @param sep_type    0-source, 1-sink
1751  */
1752 #define AVDTP_SUBEVENT_SIGNALING_SEP_FOUND                  0x06
1753 
1754 /**
1755  * @format 121111111111
1756  * @param subevent_code
1757  * @param avdtp_cid
1758  * @param local_seid
1759  * @param remote_seid
1760  * @param media_type
1761  * @param sampling_frequency_bitmap
1762  * @param channel_mode_bitmap
1763  * @param block_length_bitmap
1764  * @param subbands_bitmap
1765  * @param allocation_method_bitmap
1766  * @param min_bitpool_value
1767  * @param max_bitpool_value
1768  */
1769 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY          0x07
1770 
1771 /**
1772  * @format 121112LV
1773  * @param subevent_code
1774  * @param avdtp_cid
1775  * @param local_seid
1776  * @param remote_seid
1777  * @param media_type
1778  * @param media_codec_type
1779  * @param media_codec_information_len
1780  * @param media_codec_information
1781  */
1782 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY        0x08
1783 
1784 
1785 /**
1786  * @format 1211
1787  * @param subevent_code
1788  * @param avdtp_cid
1789  * @param local_seid
1790  * @param remote_seid
1791  */
1792 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY        0x09
1793 
1794 
1795 /**
1796  * @format 1211
1797  * @param subevent_code
1798  * @param avdtp_cid
1799  * @param local_seid
1800  * @param remote_seid
1801  */
1802 #define AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY        0x0A
1803 
1804 
1805 /**
1806  * @format 1211111
1807  * @param subevent_code
1808  * @param avdtp_cid
1809  * @param local_seid
1810  * @param remote_seid
1811  * @param recovery_type
1812  * @param maximum_recovery_window_size
1813  * @param maximum_number_media_packets
1814  */
1815 #define AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY        0x0B
1816 
1817 
1818 /**
1819  * @format 12112LV
1820  * @param subevent_code
1821  * @param avdtp_cid
1822  * @param local_seid
1823  * @param remote_seid
1824  * @param cp_type
1825  * @param cp_type_value_len
1826  * @param cp_type_value
1827  */
1828 #define AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY        0x0C
1829 
1830 
1831 /**
1832  * @format 121111111111
1833  * @param subevent_code
1834  * @param avdtp_cid
1835  * @param local_seid
1836  * @param remote_seid
1837  * @param fragmentation
1838  * @param transport_identifiers_num
1839  * @param transport_session_identifier_1
1840  * @param transport_session_identifier_2
1841  * @param transport_session_identifier_3
1842  * @param tcid_1
1843  * @param tcid_2
1844  * @param tcid_3
1845  */
1846 #define AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY        0x0D
1847 
1848 
1849 /**
1850  * @format 1211
1851  * @param subevent_code
1852  * @param avdtp_cid
1853  * @param local_seid
1854  * @param remote_seid
1855  */
1856 #define AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY        0x0E
1857 
1858 
1859 /**
1860  * @format 1211111
1861  * @param subevent_code
1862  * @param avdtp_cid
1863  * @param local_seid
1864  * @param remote_seid
1865  * @param back_ch
1866  * @param media
1867  * @param recovery
1868  */
1869 #define AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY        0x0F
1870 
1871 
1872 /**
1873  * @format 12111121111111
1874  * @param subevent_code
1875  * @param avdtp_cid
1876  * @param local_seid
1877  * @param remote_seid
1878  * @param reconfigure
1879  * @param media_type
1880  * @param sampling_frequency
1881  * @param channel_mode
1882  * @param num_channels
1883  * @param block_length
1884  * @param subbands
1885  * @param allocation_method
1886  * @param min_bitpool_value
1887  * @param max_bitpool_value
1888  */
1889 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION        0x10
1890 
1891 /**
1892  * @format 1211112LV
1893  * @param subevent_code
1894  * @param avdtp_cid
1895  * @param local_seid
1896  * @param remote_seid
1897  * @param reconfigure
1898  * @param media_type
1899  * @param media_codec_type
1900  * @param media_codec_information_len
1901  * @param media_codec_information
1902  */
1903 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION        0x11
1904 
1905 /**
1906  * @format 12B111
1907  * @param subevent_code
1908  * @param avdtp_cid
1909  * @param bd_addr
1910  * @param local_seid
1911  * @param remote_seid
1912  * @param status 0 == OK
1913  */
1914 #define AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED     0x12
1915 
1916 /**
1917  * @format 121
1918  * @param subevent_code
1919  * @param avdtp_cid
1920  * @param local_seid
1921  */
1922 #define AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED        0x13
1923 
1924 /**
1925  * @format 1212
1926  * @param subevent_code
1927  * @param avdtp_cid
1928  * @param local_seid
1929  * @param sequence_number
1930  */
1931 #define AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW   0x14
1932 
1933 /**
1934  * @format 1211
1935  * @param subevent_code
1936  * @param avdtp_cid
1937  * @param local_seid
1938  * @param remote_seid
1939  */
1940 #define AVDTP_SUBEVENT_SIGNALING_CAPABILITIES_DONE           0x15
1941 
1942 
1943 /**
1944  * @format 12
1945  * @param subevent_code
1946  * @param avdtp_cid
1947  */
1948 #define AVDTP_SUBEVENT_SIGNALING_SEP_DICOVERY_DONE           0x16
1949 
1950 /**
1951  * @format 1212
1952  * @param subevent_code
1953  * @param avdtp_cid
1954  * @param local_seid
1955  * @param delay_100us
1956  */
1957 #define AVDTP_SUBEVENT_SIGNALING_DELAY_REPORT               0x17
1958 
1959 /** A2DP Subevent */
1960 /* Stream goes through following states:
1961  * - OPEN         - indicated with A2DP_SUBEVENT_STREAM_ESTABLISHED event
1962  * - START        - indicated with A2DP_SUBEVENT_STREAM_STARTED event
1963  * - SUSPEND      - indicated with A2DP_SUBEVENT_STREAM_SUSPENDED event
1964  * - ABORT/STOP   - indicated with A2DP_SUBEVENT_STREAM_RELEASED event
1965 
1966  OPEN state will be followed by ABORT/STOP. Stream is ready but media transfer is not started.
1967  START can come only after the stream is OPENED, and indicates that media transfer is started.
1968  SUSPEND is optional, it pauses the stream.
1969  */
1970 
1971 /**
1972  * @format 121            Sent only by A2DP source.
1973  * @param subevent_code
1974  * @param a2dp_cid
1975  * @param local_seid
1976  */
1977 #define A2DP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW         0x01
1978 
1979 /**
1980  * @format 12111121111111
1981  * @param subevent_code
1982  * @param a2dp_cid
1983  * @param int_seid
1984  * @param acp_seid
1985  * @param reconfigure
1986  * @param media_type
1987  * @param sampling_frequency
1988  * @param channel_mode
1989  * @param num_channels
1990  * @param block_length
1991  * @param subbands
1992  * @param allocation_method
1993  * @param min_bitpool_value
1994  * @param max_bitpool_value
1995  */
1996 #define A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION      0x02
1997 
1998 /**
1999  * @format 1211112LV
2000  * @param subevent_code
2001  * @param a2dp_cid
2002  * @param int_seid
2003  * @param acp_seid
2004  * @param reconfigure
2005  * @param media_type
2006  * @param media_codec_type
2007  * @param media_codec_information_len
2008  * @param media_codec_information
2009  */
2010 #define A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION    0x03
2011 
2012 /**
2013  * @format 12B111          Stream is opened byt not started.
2014  * @param subevent_code
2015  * @param a2dp_cid
2016  * @param bd_addr
2017  * @param local_seid
2018  * @param remote_seid
2019  * @param status
2020  */
2021 #define A2DP_SUBEVENT_STREAM_ESTABLISHED                           0x04
2022 
2023 /**
2024  * @format 121            Indicates that media transfer is started.
2025  * @param subevent_code
2026  * @param a2dp_cid
2027  * @param local_seid
2028  */
2029 #define A2DP_SUBEVENT_STREAM_STARTED                               0x05
2030 
2031 /**
2032  * @format 121           Stream is paused.
2033  * @param subevent_code
2034  * @param a2dp_cid
2035  * @param local_seid
2036  */
2037 #define A2DP_SUBEVENT_STREAM_SUSPENDED                              0x06
2038 
2039 /**
2040  * @format 121           Stream is stoped or aborted.
2041  * @param subevent_code
2042  * @param a2dp_cid
2043  * @param local_seid
2044  */
2045 #define A2DP_SUBEVENT_STREAM_STOPPED                                0x07
2046 
2047 /**
2048  * @format 121            Stream is released.
2049  * @param subevent_code
2050  * @param a2dp_cid
2051  * @param local_seid
2052  */
2053 #define A2DP_SUBEVENT_STREAM_RELEASED                               0x08
2054 
2055 /**
2056  * @format 1211
2057  * @param subevent_code
2058  * @param a2dp_cid
2059  * @param local_seid
2060  * @param signal_identifier
2061  */
2062 #define A2DP_SUBEVENT_COMMAND_ACCEPTED                              0x09
2063 
2064 /**
2065  * @format 1211
2066  * @param subevent_code
2067  * @param a2dp_cid
2068  * @param local_seid
2069  * @param signal_identifier
2070  */
2071 #define A2DP_SUBEVENT_COMMAND_REJECTED                              0x0A
2072 
2073 /**
2074  * @format 12B21
2075  * @param subevent_code
2076  * @param a2dp_cid
2077  * @param bd_addr
2078  * @param con_handle
2079  * @param status 0 == OK
2080  */
2081 #define A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED              0x0B
2082 
2083 /**
2084  * @format 12            Signaling channel is released.
2085  * @param subevent_code
2086  * @param a2dp_cid
2087  */
2088 #define A2DP_SUBEVENT_SIGNALING_CONNECTION_RELEASED                  0x0C
2089 
2090 /**
2091  * @format 1211          Stream was reconfigured
2092  * @param subevent_code
2093  * @param a2dp_cid
2094  * @param local_seid
2095  * @param status
2096  */
2097 #define A2DP_SUBEVENT_STREAM_RECONFIGURED                            0x0D
2098 
2099 /**
2100  * @format 1211
2101  * @param subevent_code
2102  * @param avdtp_cid
2103  * @param local_seid
2104  * @param remote_seid
2105  */
2106 #define A2DP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY           0x0E
2107 
2108 
2109 /**
2110  * @format 1212
2111  * @param subevent_code
2112  * @param avdtp_cid
2113  * @param local_seid
2114  * @param delay_100us
2115  */
2116 #define A2DP_SUBEVENT_SIGNALING_DELAY_REPORT                         0x0F
2117 
2118 /**
2119  * @format 1211
2120  * @param subevent_code
2121  * @param avdtp_cid
2122  * @param local_seid
2123  * @param remote_seid
2124  */
2125 #define A2DP_SUBEVENT_SIGNALING_CAPABILITIES_DONE                    0x10
2126 
2127 /** AVRCP Subevent */
2128 
2129 /**
2130  * @format 1211
2131  * @param subevent_code
2132  * @param avrcp_cid
2133  * @param command_type
2134  * @param play_status
2135  */
2136 #define AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED                         0x01
2137 
2138 /**
2139  * @format 121
2140  * @param subevent_code
2141  * @param avrcp_cid
2142  * @param command_type
2143  */
2144 #define AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED                                   0x02
2145 
2146 /**
2147  * @format 121
2148  * @param subevent_code
2149  * @param avrcp_cid
2150  * @param command_type
2151  */
2152 #define AVRCP_SUBEVENT_NOTIFICATION_EVENT_TRACK_REACHED_END                         0x03
2153 
2154 /**
2155  * @format 121
2156  * @param subevent_code
2157  * @param avrcp_cid
2158  * @param command_type
2159  */
2160 #define AVRCP_SUBEVENT_NOTIFICATION_EVENT_TRACK_REACHED_START                       0x04
2161 
2162 /**
2163  * @format 1214
2164  * @param subevent_code
2165  * @param avrcp_cid
2166  * @param command_type
2167  * @param playback_position  If no track currently selected, then return 0xFFFFFFFF in the INTERIM response.
2168  */
2169 #define AVRCP_SUBEVENT_NOTIFICATION_EVENT_PLAYBACK_POS_CHANGED                      0x05
2170 
2171 /**
2172  * @format 1211
2173  * @param subevent_code
2174  * @param avrcp_cid
2175  * @param command_type
2176  * @param battery_status  see avrcp_battery_status_t
2177  */
2178 #define AVRCP_SUBEVENT_NOTIFICATION_EVENT_BATT_STATUS_CHANGED                       0x06
2179 
2180 /**
2181  * @format 1211
2182  * @param subevent_code
2183  * @param avrcp_cid
2184  * @param command_type
2185  * @param system_status  see avrcp_system_status_t
2186  */
2187 #define AVRCP_SUBEVENT_NOTIFICATION_EVENT_SYSTEM_STATUS_CHANGED                     0x07
2188 
2189 
2190 // Recquires 1 byte for num_attributes, followed by num_attributes tuples [attribute_id(1), value_id(1)], see avrcp_player_application_setting_attribute_id_t
2191 #define AVRCP_SUBEVENT_NOTIFICATION_EVENT_PLAYER_APPLICATION_SETTING_CHANGED        0x08
2192 
2193 /**
2194  * @format 121
2195  * @param subevent_code
2196  * @param avrcp_cid
2197  * @param command_type
2198  */
2199 #define AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED                     0x09
2200 
2201 /**
2202  * @format 121
2203  * @param subevent_code
2204  * @param avrcp_cid
2205  * @param command_type
2206  */
2207 #define AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED                       0x0A
2208 
2209 // AVRCP_SUBEVENT_NOTIFICATION_EVENT_ADDRESSED_PLAYER_CHANGED = 0x0b,           -- The Addressed Player has been changed, see 6.9.2.
2210 
2211 /**
2212  * @format 1212
2213  * @param subevent_code
2214  * @param avrcp_cid
2215  * @param command_type
2216  * @param uid_counter of the currently browsed player
2217  */
2218 #define AVRCP_SUBEVENT_NOTIFICATION_EVENT_UIDS_CHANGED                              0x0C
2219 
2220 /**
2221  * @format 1211
2222  * @param subevent_code
2223  * @param avrcp_cid
2224  * @param command_type
2225  * @param absolute_volume
2226  */
2227 #define AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED                                  0x0D
2228 
2229 
2230 /**
2231  * @format 1211
2232  * @param subevent_code
2233  * @param avrcp_cid
2234  * @param command_type
2235  * @param absolute_volume
2236  */
2237 #define AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE                      0x10
2238 
2239 /**
2240  * @format 1211
2241  * @param subevent_code
2242  * @param avrcp_cid
2243  * @param command_type
2244  * @param notification_id
2245  */
2246 #define AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE                       0x11
2247 
2248 /**
2249  * @format 112B2
2250  * @param subevent_code
2251  * @param status 0 == OK
2252  * @param avrcp_cid
2253  * @param bd_addr
2254  * @param con_handle
2255  */
2256 #define AVRCP_SUBEVENT_CONNECTION_ESTABLISHED                           0x12
2257 
2258 /**
2259  * @format 12
2260  * @param subevent_code
2261  * @param avrcp_cid
2262  */
2263 #define AVRCP_SUBEVENT_CONNECTION_RELEASED                              0x13
2264 
2265 /**
2266  * @format 12111
2267  * @param subevent_code
2268  * @param avrcp_cid
2269  * @param command_type
2270  * @param repeat_mode
2271  * @param shuffle_mode
2272  */
2273 #define AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE                          0x14
2274 
2275 /**
2276  * @format 121441
2277  * @param subevent_code
2278  * @param avrcp_cid
2279  * @param command_type
2280  * @param song_length
2281  * @param song_position
2282  * @param play_status
2283  */
2284  #define AVRCP_SUBEVENT_PLAY_STATUS                                     0x15
2285 
2286 /**
2287  * @format 1211
2288  * @param subevent_code
2289  * @param avrcp_cid
2290  * @param command_type
2291  * @param operation_id
2292  */
2293 #define AVRCP_SUBEVENT_OPERATION_START                                    0x16
2294 
2295 /**
2296  * @format 1211
2297  * @param subevent_code
2298  * @param avrcp_cid
2299  * @param command_type
2300  * @param operation_id
2301  */
2302 #define AVRCP_SUBEVENT_OPERATION_COMPLETE                                 0x17
2303 
2304 /**
2305  * @format 121
2306  * @param subevent_code
2307  * @param avrcp_cid
2308  * @param command_type
2309  */
2310 #define AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE                   0x18
2311 
2312 /**
2313  * @format 12
2314  * @param subevent_code
2315  * @param avrcp_cid
2316  */
2317 #define AVRCP_SUBEVENT_COMPANY_IDS_QUERY                                    0x19
2318 
2319 /**
2320  * @format 12
2321  * @param subevent_code
2322  * @param avrcp_cid
2323  */
2324 #define AVRCP_SUBEVENT_EVENT_IDS_QUERY                                      0x1A
2325 
2326 /**
2327  * @format 12
2328  * @param subevent_code
2329  * @param avrcp_cid
2330  */
2331 #define AVRCP_SUBEVENT_PLAY_STATUS_QUERY                                    0x1B
2332 
2333 /**
2334  * @format 12111
2335  * @param subevent_code
2336  * @param avrcp_cid
2337  * @param operation_id
2338  * @param operands_length
2339  * @param operand
2340  */
2341 #define AVRCP_SUBEVENT_OPERATION                                            0x1C
2342 
2343 /**
2344  * @format 1211
2345  * @param subevent_code
2346  * @param avrcp_cid
2347  * @param command_type
2348  * @param track
2349  */
2350 #define AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO                               0x1D
2351 
2352 /**
2353  * @format 1211
2354  * @param subevent_code
2355  * @param avrcp_cid
2356  * @param command_type
2357  * @param total_tracks
2358  */
2359 #define AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO                        0x1E
2360 
2361 /**
2362  * @format 1214
2363  * @param subevent_code
2364  * @param avrcp_cid
2365  * @param command_type
2366  * @param song_length in ms
2367  */
2368 #define AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO                      0x1F
2369 
2370 /**
2371  * @format 121JV
2372  * @param subevent_code
2373  * @param avrcp_cid
2374  * @param command_type
2375  * @param value_len
2376  * @param value
2377  */
2378 #define AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO                                 0x20
2379 
2380  /*
2381  * @format 121JV
2382  * @param subevent_code
2383  * @param avrcp_cid
2384  * @param command_type
2385  * @param value_len
2386  * @param value
2387  */
2388 #define AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO                                0x21
2389 
2390  /*
2391  * @format 121JV
2392  * @param subevent_code
2393  * @param avrcp_cid
2394  * @param command_type
2395  * @param value_len
2396  * @param value
2397  */
2398 #define AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO                                 0x22
2399 
2400  /*
2401  * @format 121JV
2402  * @param subevent_code
2403  * @param avrcp_cid
2404  * @param command_type
2405  * @param value_len
2406  * @param value
2407  */
2408 #define AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO                                 0x23
2409 
2410 /*
2411  * @format 1211
2412  * @param subevent_code
2413  * @param avrcp_cid
2414  * @param command_type
2415  * @param status
2416  */
2417 #define AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE                                  0x24
2418 
2419 /**
2420  * @format 1214
2421  * @param subevent_code
2422  * @param avrcp_cid
2423  * @param command_type
2424  * @param playback_position_ms
2425  */
2426 #define AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_POS_CHANGED                      0x25
2427 
2428 /*
2429  * @format 12111
2430  * @param subevent_code
2431  * @param avrcp_cid
2432  * @param command_type
2433  * @param status
2434  * @param event_id
2435  */
2436 #define AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID                                0x26
2437 /*
2438  * @format 1211
2439  * @param subevent_code
2440  * @param avrcp_cid
2441  * @param command_type
2442  * @param status
2443  */
2444 #define AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID_DONE                           0x27
2445 
2446 /*
2447  * @format 12113
2448  * @param subevent_code
2449  * @param avrcp_cid
2450  * @param command_type
2451  * @param status
2452  * @param company_id
2453  */
2454 #define AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID                              0x28
2455 /*
2456  * @format 1211
2457  * @param subevent_code
2458  * @param avrcp_cid
2459  * @param command_type
2460  * @param status
2461  */
2462 #define AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID_DONE                         0x29
2463 
2464 
2465 
2466 /**
2467  * @format 1B2
2468  * @param subevent_code
2469  * @param bd_addr
2470  * @param browsing_cid
2471  */
2472 #define AVRCP_SUBEVENT_INCOMING_BROWSING_CONNECTION                          0x30
2473 
2474 /**
2475  * @format 11B2
2476  * @param subevent_code
2477  * @param status 0 == OK
2478  * @param bd_addr
2479  * @param browsing_cid
2480  */
2481 #define AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED                        0x31
2482 
2483 /**
2484  * @format 12
2485  * @param subevent_code
2486  * @param browsing_cid
2487  */
2488 #define AVRCP_SUBEVENT_BROWSING_CONNECTION_RELEASED                           0x32
2489 
2490 /**
2491  * @format 12211
2492  * @param subevent_code
2493  * @param browsing_cid
2494  * @param uid_counter
2495  * @param browsing_status
2496  * @param bluetooth_status
2497  */
2498 #define AVRCP_SUBEVENT_BROWSING_DONE                                          0x33
2499 
2500 /**
2501  * @format 1214
2502  * @param subevent_code
2503  * @param browsing_cid
2504  * @param scope
2505  * @param attr_bitmap
2506  */
2507 #define AVRCP_SUBEVENT_BROWSING_GET_FOLDER_ITEMS                              0x34
2508 
2509 /**
2510  * @format 121
2511  * @param subevent_code
2512  * @param browsing_cid
2513  * @param scope
2514  */
2515 #define AVRCP_SUBEVENT_BROWSING_GET_TOTAL_NUM_ITEMS                           0x35
2516 
2517 
2518 
2519 
2520 /**
2521  * @format 121BH1
2522  * @param subevent_code
2523  * @param goep_cid
2524  * @param status
2525  * @param bd_addr
2526  * @param con_handle
2527  * @param incoming
2528  */
2529 #define GOEP_SUBEVENT_CONNECTION_OPENED                                    0x01
2530 
2531 /**
2532  * @format 12
2533  * @param subevent_code
2534  * @param goep_cid
2535 */
2536 #define GOEP_SUBEVENT_CONNECTION_CLOSED                                    0x02
2537 
2538 /**
2539  * @format 12
2540  * @param subevent_code
2541  * @param goep_cid
2542 */
2543 #define GOEP_SUBEVENT_CAN_SEND_NOW                                         0x03
2544 
2545 /**
2546  * @format 121BH1
2547  * @param subevent_code
2548  * @param pbap_cid
2549  * @param status
2550  * @param bd_addr
2551  * @param con_handle
2552  * @param incoming
2553  */
2554 #define PBAP_SUBEVENT_CONNECTION_OPENED                                    0x01
2555 
2556 /**
2557  * @format 12
2558  * @param subevent_code
2559  * @param goep_cid
2560 */
2561 #define PBAP_SUBEVENT_CONNECTION_CLOSED                                    0x02
2562 
2563 /**
2564  * @format 121
2565  * @param subevent_code
2566  * @param goep_cid
2567  * @param status
2568  */
2569 #define PBAP_SUBEVENT_OPERATION_COMPLETED                                  0x03
2570 
2571 /**
2572  * @format 1212
2573  * @param subevent_code
2574  * @param goep_cid
2575  * @param status
2576  * @param phoneboook_size
2577  */
2578 #define PBAP_SUBEVENT_PHONEBOOK_SIZE                                       0x04
2579 
2580 /**
2581  * @format 1211
2582  * @param subevent_code
2583  * @param goep_cid
2584  * @param user_id_required
2585  * @param full_access
2586  */
2587 #define PBAP_SUBEVENT_AUTHENTICATION_REQUEST                               0x05
2588 
2589 /**
2590  * @format 12JVJV
2591  * @param subevent_code
2592  * @param goep_cid
2593  * @param name_len
2594  * @param name
2595  * @param handle_len
2596  * @param handle
2597  */
2598 #define PBAP_SUBEVENT_CARD_RESULT                                          0x06
2599 
2600 
2601 // HID Meta Event Group
2602 
2603 /**
2604  * @format 121BH1
2605  * @param subevent_code
2606  * @param hid_cid
2607  * @param status
2608  * @param bd_addr
2609  * @param con_handle
2610  * @param incoming
2611  */
2612 #define HID_SUBEVENT_CONNECTION_OPENED                                     0x01
2613 
2614 /**
2615  * @format 12
2616  * @param subevent_code
2617  * @param hid_cid
2618 */
2619 #define HID_SUBEVENT_CONNECTION_CLOSED                                     0x02
2620 
2621 /**
2622  * @format 12
2623  * @param subevent_code
2624  * @param hid_cid
2625 */
2626 #define HID_SUBEVENT_CAN_SEND_NOW                                          0x03
2627 
2628 /**
2629  * @format 12
2630  * @param subevent_code
2631  * @param con_handle
2632 */
2633 #define HID_SUBEVENT_SUSPEND                                               0x04
2634 
2635 /**
2636  * @format 12
2637  * @param subevent_code
2638  * @param con_handle
2639 */
2640 #define HID_SUBEVENT_EXIT_SUSPEND                                          0x05
2641 
2642 
2643 // HIDS Meta Event Group
2644 
2645 /**
2646  * @format 12
2647  * @param subevent_code
2648  * @param con_handle
2649 */
2650 #define HIDS_SUBEVENT_CAN_SEND_NOW                                          0x01
2651 
2652 /**
2653  * @format 121
2654  * @param subevent_code
2655  * @param con_handle
2656  * @param protocol_mode
2657 */
2658 #define HIDS_SUBEVENT_PROTOCOL_MODE                                         0x02
2659 
2660 /**
2661  * @format 121
2662  * @param subevent_code
2663  * @param con_handle
2664  * @param enable
2665 */
2666 #define HIDS_SUBEVENT_BOOT_MOUSE_INPUT_REPORT_ENABLE                        0x03
2667 
2668 /**
2669  * @format 121
2670  * @param subevent_code
2671  * @param con_handle
2672  * @param enable
2673 */
2674 #define HIDS_SUBEVENT_BOOT_KEYBOARD_INPUT_REPORT_ENABLE                     0x04
2675 
2676 /**
2677  * @format 121
2678  * @param subevent_code
2679  * @param con_handle
2680  * @param enable
2681 */
2682 #define HIDS_SUBEVENT_INPUT_REPORT_ENABLE                                   0x05
2683 
2684 /**
2685  * @format 121
2686  * @param subevent_code
2687  * @param con_handle
2688  * @param enable
2689 */
2690 #define HIDS_SUBEVENT_OUTPUT_REPORT_ENABLE                                  0x06
2691 
2692 /**
2693  * @format 121
2694  * @param subevent_code
2695  * @param con_handle
2696  * @param enable
2697 */
2698 #define HIDS_SUBEVENT_FEATURE_REPORT_ENABLE                                 0x07
2699 
2700 /**
2701  * @format 12
2702  * @param subevent_code
2703  * @param con_handle
2704 */
2705 #define HIDS_SUBEVENT_SUSPEND                                               0x08
2706 
2707 /**
2708  * @format 12
2709  * @param subevent_code
2710  * @param con_handle
2711 */
2712 #define HIDS_SUBEVENT_EXIT_SUSPEND                                          0x09
2713 
2714 /**
2715  * @format 1211
2716  * @param subevent_code
2717  * @param con_handle
2718  * @param measurement_type 0 - force magnitude, 1 - torque magnitude, see cycling_power_sensor_measurement_context_t
2719  * @param is_enhanced
2720 */
2721 #define GATTSERVICE_SUBEVENT_CYCLING_POWER_START_CALIBRATION               0x01
2722 
2723 /**
2724  * @format 12
2725  * @param subevent_code
2726  * @param con_handle
2727 */
2728 #define GATTSERVICE_SUBEVENT_CYCLING_POWER_BROADCAST_START                 0x02
2729 
2730 /**
2731  * @format 12
2732  * @param subevent_code
2733  * @param con_handle
2734 */
2735 #define GATTSERVICE_SUBEVENT_CYCLING_POWER_BROADCAST_STOP                  0x03
2736 
2737 
2738 // MAP Meta Event Group
2739 
2740 /**
2741  * @format 121BH1
2742  * @param subevent_code
2743  * @param map_cid
2744  * @param status
2745  * @param bd_addr
2746  * @param con_handle
2747  * @param incoming
2748  */
2749 #define MAP_SUBEVENT_CONNECTION_OPENED                                    0x01
2750 
2751 /**
2752  * @format 12
2753  * @param subevent_code
2754  * @param map_cid
2755 */
2756 #define MAP_SUBEVENT_CONNECTION_CLOSED                                    0x02
2757 
2758 /**
2759  * @format 121
2760  * @param subevent_code
2761  * @param map_cid
2762  * @param status
2763  */
2764 #define MAP_SUBEVENT_OPERATION_COMPLETED                                  0x03
2765 
2766 
2767 /**
2768  * @format 12LV
2769  * @param subevent_code
2770  * @param map_cid
2771  * @param name_len
2772  * @param name
2773  */
2774 #define MAP_SUBEVENT_FOLDER_LISTING_ITEM                                  0x04
2775 
2776 /**
2777  * @format 12D
2778  * @param subevent_code
2779  * @param map_cid
2780  * @param handle
2781 
2782  */
2783 #define MAP_SUBEVENT_MESSAGE_LISTING_ITEM                                 0x05
2784 
2785 /**
2786  * @format 12
2787  * @param subevent_code
2788  * @param map_cid
2789  */
2790 #define MAP_SUBEVENT_PARSING_DONE                                         0x06
2791 
2792 
2793 // MESH Meta Event Group
2794 
2795 /**
2796  * @format 1
2797  * @param subevent_code
2798  */
2799 #define MESH_SUBEVENT_CAN_SEND_NOW                                          0x01
2800 
2801 /**
2802  * @format 11
2803  * @param subevent_code
2804  * @param status
2805  */
2806 #define MESH_SUBEVENT_PB_TRANSPORT_PDU_SENT                                          0x02
2807 
2808 /**
2809  * @format 1121
2810  * @param subevent_code
2811  * @param status
2812  * @param pb_transport_cid
2813  * @param pb_type
2814  */
2815 #define MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN                                         0x03
2816 
2817 /**
2818  * @format 112
2819  * @param subevent_code
2820  * @param pb_transport_cid
2821  * @param reason
2822  */
2823 #define MESH_SUBEVENT_PB_TRANSPORT_LINK_CLOSED                                       0x04
2824 
2825 /**
2826  * @format 121
2827  * @param subevent_code
2828  * @param pb_transport_cid
2829  * @param attention_time in seconds
2830  */
2831 #define MESH_SUBEVENT_PB_PROV_ATTENTION_TIMER                                        0x10
2832 
2833 /**
2834  * Device Role
2835  * @format 12
2836  * @param subevent_code
2837  * @param pb_transport_cid
2838  */
2839 #define MESH_SUBEVENT_PB_PROV_START_EMIT_PUBLIC_KEY_OOB                              0x11
2840 
2841 /**
2842  * Device Role
2843  * @format 12
2844  * @param subevent_code
2845  * @param pb_transport_cid
2846  */
2847 #define MESH_SUBEVENT_PB_PROV_STOP_EMIT_PUBLIC_KEY_OOB                               0x12
2848 
2849 /**
2850  * Device Role
2851  * @format 12
2852  * @param subevent_code
2853  * @param pb_transport_cid
2854  */
2855 #define MESH_SUBEVENT_PB_PROV_INPUT_OOB_REQUEST                                      0x13
2856 
2857 /**
2858  * Device Role
2859  * @format 124
2860  * @param subevent_code
2861  * @param pb_transport_cid
2862  * @param output_oob number
2863  */
2864 #define MESH_SUBEVENT_PB_PROV_START_EMIT_OUTPUT_OOB                                  0x15
2865 
2866 /**
2867  * Device Role
2868  * @format 12
2869  * @param subevent_code
2870  * @param pb_transport_cid
2871  */
2872 #define MESH_SUBEVENT_PB_PROV_STOP_EMIT_OUTPUT_OOB                                   0x16
2873 
2874 /**
2875  * Provisioner Role
2876  * @format 12
2877  * @param subevent_code
2878  * @param pb_transport_cid
2879  */
2880 #define MESH_SUBEVENT_PB_PROV_START_RECEIVE_PUBLIC_KEY_OOB                           0x17
2881 
2882 /**
2883  * Provisioner Role
2884  * @format 12
2885  * @param subevent_code
2886  * @param pb_transport_cid
2887  */
2888 #define MESH_SUBEVENT_PB_PROV_STOP_RECEIVE_PUBLIC_KEY_OOB                            0x18
2889 
2890 /**
2891  * Provisioner Role
2892  * @format 12
2893  * @param subevent_code
2894  * @param pb_transport_cid
2895  */
2896 #define MESH_SUBEVENT_PB_PROV_OUTPUT_OOB_REQUEST                                     0x19
2897 
2898 /**
2899  * Provisioner Role
2900  * @format 124
2901  * @param subevent_code
2902  * @param pb_transport_cid
2903  * @param output_oob number
2904  */
2905 #define MESH_SUBEVENT_PB_PROV_START_EMIT_INPUT_OOB                                   0x1a
2906 
2907 /**
2908  * Provisioner Role
2909  * @format 12
2910  * @param subevent_code
2911  * @param pb_transport_cid
2912  */
2913 #define MESH_SUBEVENT_PB_PROV_STOP_EMIT_INPUT_OOB                                    0x1b
2914 
2915 /**
2916  * Provisioner Role
2917  * @format 1212111212
2918  * @param subevent_code
2919  * @param pb_transport_cid
2920  * @param num_elements
2921  * @param algorithms
2922  * @param public_key
2923  * @param static_oob_type
2924  * @param output_oob_size
2925  * @param output_oob_action
2926  * @param input_oob_size
2927  * @param input_oob_action
2928  */
2929 #define MESH_SUBEVENT_PB_PROV_CAPABILITIES                                           0x1c
2930 
2931 /**
2932  * @format 12
2933  * @param subevent_code
2934  * @param pb_transport_cid
2935  */
2936 #define MESH_SUBEVENT_PB_PROV_COMPLETE                                               0x1d
2937 
2938 /**
2939  * @format 11
2940  * @param subevent_code
2941  * @param attention_time in seconds
2942  */
2943 #define MESH_SUBEVENT_ATTENTION_TIMER                                                0x1e
2944 
2945 /**
2946  * @format 1H
2947  * @param subevent_code
2948  * @param con_handle
2949  */
2950 #define MESH_SUBEVENT_PROXY_CONNECTED                                                0x20
2951 
2952 /**
2953  * @format 1H
2954  * @param subevent_code
2955  * @param con_handle
2956  */
2957 #define MESH_SUBEVENT_PROXY_PDU_SENT                                                 0x21
2958 
2959 /**
2960  * @format 1H
2961  * @param subevent_code
2962  * @param con_handle
2963  */
2964 #define MESH_SUBEVENT_PROXY_DISCONNECTED                                             0x22
2965 
2966 /**
2967  * @format 1H
2968  * @param subevent_code
2969  * @param con_handle
2970  */
2971 #define MESH_SUBEVENT_MESSAGE_SENT                                                   0x23
2972 
2973 /**
2974  * @format 114411
2975  * @param subevent_code
2976  * @param element_index
2977  * @param model_identifier
2978  * @param state_identifier
2979  * @param reason
2980  * @param value
2981  */
2982 #define MESH_SUBEVENT_STATE_UPDATE_BOOL                                              0x24
2983 
2984 /**
2985  * @format 114412
2986  * @param subevent_code
2987  * @param element_index
2988  * @param model_identifier
2989  * @param state_identifier
2990  * @param reason
2991  * @param value
2992  */
2993 #define MESH_SUBEVENT_STATE_UPDATE_INT16                                              0x25
2994 
2995 // Mesh Client Events
2996 /**
2997  * @format 11442
2998  * @param subevent_code
2999  * @param element_index
3000  * @param model_identifier
3001  * @param opcode
3002  * @param dest
3003  */
3004 #define MESH_SUBEVENT_MESSAGE_NOT_ACKNOWLEDGED                                        0x30
3005 
3006 /**
3007  * @format 121114
3008  * @param subevent_code
3009  * @param dest
3010  * @param status
3011  * @param present_value
3012  * @param target_value       optional, if value > 0, than remaining_time_ms must be read
3013  * @param remaining_time_ms
3014  */
3015 #define MESH_SUBEVENT_GENERIC_ON_OFF                                                  0x31
3016 
3017 /**
3018  * @format 121224
3019  * @param subevent_code
3020  * @param dest
3021  * @param status
3022  * @param present_value
3023  * @param target_value       optional, if value > 0, than remaining_time_ms must be read
3024  * @param remaining_time_ms
3025  */
3026 #define MESH_SUBEVENT_GENERIC_LEVEL                                                   0x32
3027 
3028 /**
3029  * @format 1222211
3030  * @param subevent_code
3031  * @param dest
3032  * @param netkey_index
3033  * @param appkey_index
3034  * @param company_id
3035  * @param test_id
3036  * @param acknowledged
3037  */
3038 #define MESH_SUBEVENT_HEALTH_PERFORM_TEST                                            0x33
3039 
3040 /**
3041  * @format 11
3042  * @param subevent_code
3043  * @param element_index
3044  */
3045 #define MESH_SUBEVENT_HEALTH_ATTENTION_TIMER_CHANGED                                 0x34
3046 
3047 /**
3048  * @format 1211
3049  * @param subevent_code
3050  * @param dest
3051  * @param status
3052  * @param transition_time_gdtt
3053  */
3054 #define MESH_SUBEVENT_GENERIC_DEFAULT_TRANSITION_TIME                                0x35
3055 
3056 /**
3057  * @format 1211
3058  * @param subevent_code
3059  * @param dest
3060  * @param foundation_status
3061  * @param secure_network_beacon_state
3062  */
3063 #define MESH_SUBEVENT_CONFIGURATION_BEACON                                           0x36
3064 
3065 // Composition Data has variable of element descriptions, with two lists of model lists
3066 // Use .. getters to access data
3067 #define MESH_SUBEVENT_CONFIGURATION_COMPOSITION_DATA                                 0x37
3068 
3069 /**
3070  * @format 1211
3071  * @param subevent_code
3072  * @param dest
3073  * @param foundation_status
3074  * @param default_ttl
3075  */
3076 #define MESH_SUBEVENT_CONFIGURATION_DEFAULT_TTL                                      0x38
3077 
3078 /**
3079  * @format 1211
3080  * @param subevent_code
3081  * @param dest
3082  * @param foundation_status
3083  * @param gatt_proxy_state
3084  */
3085 #define MESH_SUBEVENT_CONFIGURATION_GATT_PROXY                                       0x39
3086 
3087 /**
3088  * @format 121111
3089  * @param subevent_code
3090  * @param dest
3091  * @param foundation_status
3092  * @param relay
3093  * @param retransmit_count                          the number of times that packet is transmitted for each packet that is relayed.
3094  * @param retransmit_interval_ms                    retransmission interval in ms
3095  */
3096 #define MESH_SUBEVENT_CONFIGURATION_RELAY                                            0x40
3097 
3098 
3099 /**
3100  * @format 12122111114
3101  * @param subevent_code
3102  * @param dest                                      element_address
3103  * @param foundation_status
3104  * @param publish_address
3105  * @param appkey_index
3106  * @param credential_flag
3107  * @param publish_ttl
3108  * @param publish_period
3109  * @param publish_retransmit_count
3110  * @param publish_retransmit_interval_steps
3111  * @param model_identifier
3112  */
3113 #define MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION                                0x41
3114 
3115 /**
3116  * @format 12124
3117  * @param subevent_code
3118  * @param dest
3119  * @param foundation_status
3120  * @param address
3121  * @param model_identifier
3122  */
3123 #define MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION                               0x42
3124 
3125 /**
3126  * @format 1214112
3127  * @param subevent_code
3128  * @param dest
3129  * @param foundation_status
3130  * @param model_identifier
3131  * @param num_subscription_addresses
3132  * @param subscription_address_pos
3133  * @param subscription_address_item
3134  */
3135 #define MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION_LIST_ITEM                     0x43
3136 
3137 
3138 /**
3139  * @format 121
3140  * @param subevent_code
3141  * @param dest
3142  * @param foundation_status
3143  */
3144 #define MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX                                      0x44
3145 
3146 /**
3147  * @format 121112
3148  * @param subevent_code
3149  * @param dest
3150  * @param foundation_status
3151  * @param num_netkey_indexes
3152  * @param netkey_index_pos
3153  * @param netkey_index_item
3154  */
3155 #define MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX_LIST_ITEM                             0x45
3156 
3157 /**
3158  * @format 12122
3159  * @param subevent_code
3160  * @param dest
3161  * @param foundation_status
3162  * @param netkey_index_item
3163  * @param appkey_index_item
3164  */
3165 #define MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX                                       0x46
3166 
3167 /**
3168  * @format 12121122
3169  * @param subevent_code
3170  * @param dest
3171  * @param foundation_status
3172  * @param netkey_index
3173  * @param num_appkey_indexes
3174  * @param appkey_index_pos
3175  * @param netkey_index_item
3176  * @param appkey_index_item
3177  */
3178  #define MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX_LIST_ITEM                            0x47
3179 
3180 /**
3181  * @format 12121
3182  * @param subevent_code
3183  * @param dest
3184  * @param foundation_status
3185  * @param netkey_index_item
3186  * @param identity_status
3187  */
3188 #define MESH_SUBEVENT_CONFIGURATION_NODE_IDENTITY                                      0x48
3189 
3190 /**
3191  * @format 12124
3192  * @param subevent_code
3193  * @param dest
3194  * @param foundation_status
3195  * @param appkey_index
3196  * @param model_identifier
3197  */
3198 #define MESH_SUBEVENT_CONFIGURATION_MODEL_APP                                           0x49
3199 
3200 /**
3201  * @format 1214112
3202  * @param subevent_code
3203  * @param dest
3204  * @param foundation_status
3205  * @param model_id
3206  * @param num_appkey_indexes
3207  * @param appkey_index_pos
3208  * @param appkey_index_item
3209  */
3210 #define MESH_SUBEVENT_CONFIGURATION_MODEL_APP_LIST_ITEM                                 0x50
3211 
3212 /**
3213  * @format 121
3214  * @param subevent_code
3215  * @param dest
3216  * @param foundation_status
3217  */
3218 #define MESH_SUBEVENT_CONFIGURATION_NODE_RESET                                          0x51
3219 
3220 /**
3221  * @format 1211
3222  * @param subevent_code
3223  * @param dest
3224  * @param foundation_status
3225  * @param friend_state
3226  */
3227 #define MESH_SUBEVENT_CONFIGURATION_FRIEND                                              0x52
3228 
3229 /**
3230  * @format 12121
3231  * @param subevent_code
3232  * @param dest
3233  * @param foundation_status
3234  * @param netkey_index
3235  * @param phase
3236  */
3237 #define MESH_SUBEVENT_CONFIGURATION_KEY_REFRESH_PHASE                                   0x53
3238 
3239 /**
3240  * @format 121222122
3241  * @param subevent_code
3242  * @param dest
3243  * @param foundation_status
3244  * @param heartbeat_destination
3245  * @param count_S
3246  * @param period_S
3247  * @param ttl
3248  * @param features
3249  * @param netkey_index
3250  */
3251 #define MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION                               0x54
3252 
3253 /**
3254  * @format 121222211
3255  * @param subevent_code
3256  * @param dest
3257  * @param foundation_status
3258  * @param heartbeat_destination
3259  * @param heartbeat_source
3260  * @param count_S
3261  * @param period_S
3262  * @param min_hops
3263  * @param max_hops
3264  */
3265 #define MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION                              0x55
3266 
3267 /**
3268  * @format 12123
3269  * @param subevent_code
3270  * @param dest
3271  * @param foundation_status
3272  * @param lpn_address
3273  * @param poll_timeout
3274  */
3275 #define MESH_SUBEVENT_CONFIGURATION_LOW_POWER_NODE_POLL_TIMEOUT                         0x56
3276 
3277 /**
3278  * @format 12112
3279  * @param subevent_code
3280  * @param dest
3281  * @param foundation_status
3282  * @param transmit_count
3283  * @param transmit_interval_steps_ms
3284  */
3285 #define MESH_SUBEVENT_CONFIGURATION_NETWORK_TRANSMIT                                    0x57
3286 
3287 
3288 #endif
3289