xref: /btstack/src/btstack_defines.h (revision 6f6f8b16b187b6f853cd67c766447d952356c78d)
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 12B1
1728  * @param subevent_code
1729  * @param avdtp_cid
1730  * @param bd_addr
1731  * @param status 0 == OK
1732  */
1733 #define AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED     0x04
1734 
1735 /**
1736  * @format 12
1737  * @param subevent_code
1738  * @param avdtp_cid
1739  */
1740 #define AVDTP_SUBEVENT_SIGNALING_CONNECTION_RELEASED        0x05
1741 
1742 /**
1743  * @format 121111
1744  * @param subevent_code
1745  * @param avdtp_cid
1746  * @param remote_seid        0x01 – 0x3E
1747  * @param in_use      0-not in use, 1-in use
1748  * @param media_type  0-audio, 1-video, 2-multimedia
1749  * @param sep_type    0-source, 1-sink
1750  */
1751 #define AVDTP_SUBEVENT_SIGNALING_SEP_FOUND                  0x06
1752 
1753 /**
1754  * @format 121111111111
1755  * @param subevent_code
1756  * @param avdtp_cid
1757  * @param local_seid
1758  * @param remote_seid
1759  * @param media_type
1760  * @param sampling_frequency_bitmap
1761  * @param channel_mode_bitmap
1762  * @param block_length_bitmap
1763  * @param subbands_bitmap
1764  * @param allocation_method_bitmap
1765  * @param min_bitpool_value
1766  * @param max_bitpool_value
1767  */
1768 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY          0x07
1769 
1770 /**
1771  * @format 121112LV
1772  * @param subevent_code
1773  * @param avdtp_cid
1774  * @param local_seid
1775  * @param remote_seid
1776  * @param media_type
1777  * @param media_codec_type
1778  * @param media_codec_information_len
1779  * @param media_codec_information
1780  */
1781 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY        0x08
1782 
1783 
1784 /**
1785  * @format 1211
1786  * @param subevent_code
1787  * @param avdtp_cid
1788  * @param local_seid
1789  * @param remote_seid
1790  */
1791 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY        0x09
1792 
1793 
1794 /**
1795  * @format 1211
1796  * @param subevent_code
1797  * @param avdtp_cid
1798  * @param local_seid
1799  * @param remote_seid
1800  */
1801 #define AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY        0x0A
1802 
1803 
1804 /**
1805  * @format 1211111
1806  * @param subevent_code
1807  * @param avdtp_cid
1808  * @param local_seid
1809  * @param remote_seid
1810  * @param recovery_type
1811  * @param maximum_recovery_window_size
1812  * @param maximum_number_media_packets
1813  */
1814 #define AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY        0x0B
1815 
1816 
1817 /**
1818  * @format 12112LV
1819  * @param subevent_code
1820  * @param avdtp_cid
1821  * @param local_seid
1822  * @param remote_seid
1823  * @param cp_type
1824  * @param cp_type_value_len
1825  * @param cp_type_value
1826  */
1827 #define AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY        0x0C
1828 
1829 
1830 /**
1831  * @format 121111111111
1832  * @param subevent_code
1833  * @param avdtp_cid
1834  * @param local_seid
1835  * @param remote_seid
1836  * @param fragmentation
1837  * @param transport_identifiers_num
1838  * @param transport_session_identifier_1
1839  * @param transport_session_identifier_2
1840  * @param transport_session_identifier_3
1841  * @param tcid_1
1842  * @param tcid_2
1843  * @param tcid_3
1844  */
1845 #define AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY        0x0D
1846 
1847 
1848 /**
1849  * @format 1211
1850  * @param subevent_code
1851  * @param avdtp_cid
1852  * @param local_seid
1853  * @param remote_seid
1854  */
1855 #define AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY        0x0E
1856 
1857 
1858 /**
1859  * @format 1211111
1860  * @param subevent_code
1861  * @param avdtp_cid
1862  * @param local_seid
1863  * @param remote_seid
1864  * @param back_ch
1865  * @param media
1866  * @param recovery
1867  */
1868 #define AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY        0x0F
1869 
1870 
1871 /**
1872  * @format 12111121111111
1873  * @param subevent_code
1874  * @param avdtp_cid
1875  * @param local_seid
1876  * @param remote_seid
1877  * @param reconfigure
1878  * @param media_type
1879  * @param sampling_frequency
1880  * @param channel_mode
1881  * @param num_channels
1882  * @param block_length
1883  * @param subbands
1884  * @param allocation_method
1885  * @param min_bitpool_value
1886  * @param max_bitpool_value
1887  */
1888 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION        0x10
1889 
1890 /**
1891  * @format 1211112LV
1892  * @param subevent_code
1893  * @param avdtp_cid
1894  * @param local_seid
1895  * @param remote_seid
1896  * @param reconfigure
1897  * @param media_type
1898  * @param media_codec_type
1899  * @param media_codec_information_len
1900  * @param media_codec_information
1901  */
1902 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION        0x11
1903 
1904 /**
1905  * @format 12B111
1906  * @param subevent_code
1907  * @param avdtp_cid
1908  * @param bd_addr
1909  * @param local_seid
1910  * @param remote_seid
1911  * @param status 0 == OK
1912  */
1913 #define AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED     0x12
1914 
1915 /**
1916  * @format 121
1917  * @param subevent_code
1918  * @param avdtp_cid
1919  * @param local_seid
1920  */
1921 #define AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED        0x13
1922 
1923 /**
1924  * @format 1212
1925  * @param subevent_code
1926  * @param avdtp_cid
1927  * @param local_seid
1928  * @param sequence_number
1929  */
1930 #define AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW   0x14
1931 
1932 /**
1933  * @format 1211
1934  * @param subevent_code
1935  * @param avdtp_cid
1936  * @param local_seid
1937  * @param remote_seid
1938  */
1939 #define AVDTP_SUBEVENT_SIGNALING_CAPABILITIES_DONE           0x15
1940 
1941 
1942 /**
1943  * @format 12
1944  * @param subevent_code
1945  * @param avdtp_cid
1946  */
1947 #define AVDTP_SUBEVENT_SIGNALING_SEP_DICOVERY_DONE           0x16
1948 
1949 /**
1950  * @format 1212
1951  * @param subevent_code
1952  * @param avdtp_cid
1953  * @param local_seid
1954  * @param delay_100us
1955  */
1956 #define AVDTP_SUBEVENT_SIGNALING_DELAY_REPORT               0x17
1957 
1958 /** A2DP Subevent */
1959 /* Stream goes through following states:
1960  * - OPEN         - indicated with A2DP_SUBEVENT_STREAM_ESTABLISHED event
1961  * - START        - indicated with A2DP_SUBEVENT_STREAM_STARTED event
1962  * - SUSPEND      - indicated with A2DP_SUBEVENT_STREAM_SUSPENDED event
1963  * - ABORT/STOP   - indicated with A2DP_SUBEVENT_STREAM_RELEASED event
1964 
1965  OPEN state will be followed by ABORT/STOP. Stream is ready but media transfer is not started.
1966  START can come only after the stream is OPENED, and indicates that media transfer is started.
1967  SUSPEND is optional, it pauses the stream.
1968  */
1969 
1970 /**
1971  * @format 121            Sent only by A2DP source.
1972  * @param subevent_code
1973  * @param a2dp_cid
1974  * @param local_seid
1975  */
1976 #define A2DP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW         0x01
1977 
1978 /**
1979  * @format 12111121111111
1980  * @param subevent_code
1981  * @param a2dp_cid
1982  * @param int_seid
1983  * @param acp_seid
1984  * @param reconfigure
1985  * @param media_type
1986  * @param sampling_frequency
1987  * @param channel_mode
1988  * @param num_channels
1989  * @param block_length
1990  * @param subbands
1991  * @param allocation_method
1992  * @param min_bitpool_value
1993  * @param max_bitpool_value
1994  */
1995 #define A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION      0x02
1996 
1997 /**
1998  * @format 1211112LV
1999  * @param subevent_code
2000  * @param a2dp_cid
2001  * @param int_seid
2002  * @param acp_seid
2003  * @param reconfigure
2004  * @param media_type
2005  * @param media_codec_type
2006  * @param media_codec_information_len
2007  * @param media_codec_information
2008  */
2009 #define A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION    0x03
2010 
2011 /**
2012  * @format 12B111          Stream is opened byt not started.
2013  * @param subevent_code
2014  * @param a2dp_cid
2015  * @param bd_addr
2016  * @param local_seid
2017  * @param remote_seid
2018  * @param status
2019  */
2020 #define A2DP_SUBEVENT_STREAM_ESTABLISHED                           0x04
2021 
2022 /**
2023  * @format 121            Indicates that media transfer is started.
2024  * @param subevent_code
2025  * @param a2dp_cid
2026  * @param local_seid
2027  */
2028 #define A2DP_SUBEVENT_STREAM_STARTED                               0x05
2029 
2030 /**
2031  * @format 121           Stream is paused.
2032  * @param subevent_code
2033  * @param a2dp_cid
2034  * @param local_seid
2035  */
2036 #define A2DP_SUBEVENT_STREAM_SUSPENDED                              0x06
2037 
2038 /**
2039  * @format 121           Stream is stoped or aborted.
2040  * @param subevent_code
2041  * @param a2dp_cid
2042  * @param local_seid
2043  */
2044 #define A2DP_SUBEVENT_STREAM_STOPPED                                0x07
2045 
2046 /**
2047  * @format 121            Stream is released.
2048  * @param subevent_code
2049  * @param a2dp_cid
2050  * @param local_seid
2051  */
2052 #define A2DP_SUBEVENT_STREAM_RELEASED                               0x08
2053 
2054 /**
2055  * @format 1211
2056  * @param subevent_code
2057  * @param a2dp_cid
2058  * @param local_seid
2059  * @param signal_identifier
2060  */
2061 #define A2DP_SUBEVENT_COMMAND_ACCEPTED                              0x09
2062 
2063 /**
2064  * @format 1211
2065  * @param subevent_code
2066  * @param a2dp_cid
2067  * @param local_seid
2068  * @param signal_identifier
2069  */
2070 #define A2DP_SUBEVENT_COMMAND_REJECTED                              0x0A
2071 
2072 /**
2073  * @format 12B1
2074  * @param subevent_code
2075  * @param a2dp_cid
2076  * @param bd_addr
2077  * @param status 0 == OK
2078  */
2079 #define A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED              0x0B
2080 
2081 /**
2082  * @format 12            Signaling channel is released.
2083  * @param subevent_code
2084  * @param a2dp_cid
2085  */
2086 #define A2DP_SUBEVENT_SIGNALING_CONNECTION_RELEASED                  0x0C
2087 
2088 /**
2089  * @format 1211          Stream was reconfigured
2090  * @param subevent_code
2091  * @param a2dp_cid
2092  * @param local_seid
2093  * @param status
2094  */
2095 #define A2DP_SUBEVENT_STREAM_RECONFIGURED                            0x0D
2096 
2097 /**
2098  * @format 1211
2099  * @param subevent_code
2100  * @param avdtp_cid
2101  * @param local_seid
2102  * @param remote_seid
2103  */
2104 #define A2DP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY           0x0E
2105 
2106 
2107 /**
2108  * @format 1212
2109  * @param subevent_code
2110  * @param avdtp_cid
2111  * @param local_seid
2112  * @param delay_100us
2113  */
2114 #define A2DP_SUBEVENT_SIGNALING_DELAY_REPORT                         0x0F
2115 
2116 /**
2117  * @format 1211
2118  * @param subevent_code
2119  * @param avdtp_cid
2120  * @param local_seid
2121  * @param remote_seid
2122  */
2123 #define A2DP_SUBEVENT_SIGNALING_CAPABILITIES_DONE                    0x10
2124 
2125 /** AVRCP Subevent */
2126 
2127 /**
2128  * @format 1211
2129  * @param subevent_code
2130  * @param avrcp_cid
2131  * @param command_type
2132  * @param play_status
2133  */
2134 #define AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED                         0x01
2135 
2136 /**
2137  * @format 121
2138  * @param subevent_code
2139  * @param avrcp_cid
2140  * @param command_type
2141  */
2142 #define AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED                                   0x02
2143 
2144 /**
2145  * @format 121
2146  * @param subevent_code
2147  * @param avrcp_cid
2148  * @param command_type
2149  */
2150 #define AVRCP_SUBEVENT_NOTIFICATION_EVENT_TRACK_REACHED_END                         0x03
2151 
2152 /**
2153  * @format 121
2154  * @param subevent_code
2155  * @param avrcp_cid
2156  * @param command_type
2157  */
2158 #define AVRCP_SUBEVENT_NOTIFICATION_EVENT_TRACK_REACHED_START                       0x04
2159 
2160 /**
2161  * @format 1214
2162  * @param subevent_code
2163  * @param avrcp_cid
2164  * @param command_type
2165  * @param playback_position  If no track currently selected, then return 0xFFFFFFFF in the INTERIM response.
2166  */
2167 #define AVRCP_SUBEVENT_NOTIFICATION_EVENT_PLAYBACK_POS_CHANGED                      0x05
2168 
2169 /**
2170  * @format 1211
2171  * @param subevent_code
2172  * @param avrcp_cid
2173  * @param command_type
2174  * @param battery_status  see avrcp_battery_status_t
2175  */
2176 #define AVRCP_SUBEVENT_NOTIFICATION_EVENT_BATT_STATUS_CHANGED                       0x06
2177 
2178 /**
2179  * @format 1211
2180  * @param subevent_code
2181  * @param avrcp_cid
2182  * @param command_type
2183  * @param system_status  see avrcp_system_status_t
2184  */
2185 #define AVRCP_SUBEVENT_NOTIFICATION_EVENT_SYSTEM_STATUS_CHANGED                     0x07
2186 
2187 
2188 // 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
2189 #define AVRCP_SUBEVENT_NOTIFICATION_EVENT_PLAYER_APPLICATION_SETTING_CHANGED        0x08
2190 
2191 /**
2192  * @format 121
2193  * @param subevent_code
2194  * @param avrcp_cid
2195  * @param command_type
2196  */
2197 #define AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED                     0x09
2198 
2199 /**
2200  * @format 121
2201  * @param subevent_code
2202  * @param avrcp_cid
2203  * @param command_type
2204  */
2205 #define AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED                       0x0A
2206 
2207 // AVRCP_SUBEVENT_NOTIFICATION_EVENT_ADDRESSED_PLAYER_CHANGED = 0x0b,           -- The Addressed Player has been changed, see 6.9.2.
2208 
2209 /**
2210  * @format 1212
2211  * @param subevent_code
2212  * @param avrcp_cid
2213  * @param command_type
2214  * @param uid_counter of the currently browsed player
2215  */
2216 #define AVRCP_SUBEVENT_NOTIFICATION_EVENT_UIDS_CHANGED                              0x0C
2217 
2218 /**
2219  * @format 1211
2220  * @param subevent_code
2221  * @param avrcp_cid
2222  * @param command_type
2223  * @param absolute_volume
2224  */
2225 #define AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED                                  0x0D
2226 
2227 
2228 /**
2229  * @format 1211
2230  * @param subevent_code
2231  * @param avrcp_cid
2232  * @param command_type
2233  * @param absolute_volume
2234  */
2235 #define AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE                      0x10
2236 
2237 /**
2238  * @format 1211
2239  * @param subevent_code
2240  * @param avrcp_cid
2241  * @param command_type
2242  * @param notification_id
2243  */
2244 #define AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE                       0x11
2245 
2246 /**
2247  * @format 11B2
2248  * @param subevent_code
2249  * @param status 0 == OK
2250  * @param bd_addr
2251  * @param avrcp_cid
2252  */
2253 #define AVRCP_SUBEVENT_CONNECTION_ESTABLISHED                           0x12
2254 
2255 /**
2256  * @format 12
2257  * @param subevent_code
2258  * @param avrcp_cid
2259  */
2260 #define AVRCP_SUBEVENT_CONNECTION_RELEASED                              0x13
2261 
2262 /**
2263  * @format 12111
2264  * @param subevent_code
2265  * @param avrcp_cid
2266  * @param command_type
2267  * @param repeat_mode
2268  * @param shuffle_mode
2269  */
2270 #define AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE                          0x14
2271 
2272 /**
2273  * @format 121441
2274  * @param subevent_code
2275  * @param avrcp_cid
2276  * @param command_type
2277  * @param song_length
2278  * @param song_position
2279  * @param play_status
2280  */
2281  #define AVRCP_SUBEVENT_PLAY_STATUS                                     0x15
2282 
2283 /**
2284  * @format 1211
2285  * @param subevent_code
2286  * @param avrcp_cid
2287  * @param command_type
2288  * @param operation_id
2289  */
2290 #define AVRCP_SUBEVENT_OPERATION_START                                    0x16
2291 
2292 /**
2293  * @format 1211
2294  * @param subevent_code
2295  * @param avrcp_cid
2296  * @param command_type
2297  * @param operation_id
2298  */
2299 #define AVRCP_SUBEVENT_OPERATION_COMPLETE                                 0x17
2300 
2301 /**
2302  * @format 121
2303  * @param subevent_code
2304  * @param avrcp_cid
2305  * @param command_type
2306  */
2307 #define AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE                   0x18
2308 
2309 /**
2310  * @format 12
2311  * @param subevent_code
2312  * @param avrcp_cid
2313  */
2314 #define AVRCP_SUBEVENT_COMPANY_IDS_QUERY                                    0x19
2315 
2316 /**
2317  * @format 12
2318  * @param subevent_code
2319  * @param avrcp_cid
2320  */
2321 #define AVRCP_SUBEVENT_EVENT_IDS_QUERY                                      0x1A
2322 
2323 /**
2324  * @format 12
2325  * @param subevent_code
2326  * @param avrcp_cid
2327  */
2328 #define AVRCP_SUBEVENT_PLAY_STATUS_QUERY                                    0x1B
2329 
2330 /**
2331  * @format 12111
2332  * @param subevent_code
2333  * @param avrcp_cid
2334  * @param operation_id
2335  * @param operands_length
2336  * @param operand
2337  */
2338 #define AVRCP_SUBEVENT_OPERATION                                            0x1C
2339 
2340 /**
2341  * @format 1211
2342  * @param subevent_code
2343  * @param avrcp_cid
2344  * @param command_type
2345  * @param track
2346  */
2347 #define AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO                               0x1D
2348 
2349 /**
2350  * @format 1211
2351  * @param subevent_code
2352  * @param avrcp_cid
2353  * @param command_type
2354  * @param total_tracks
2355  */
2356 #define AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO                        0x1E
2357 
2358 /**
2359  * @format 1214
2360  * @param subevent_code
2361  * @param avrcp_cid
2362  * @param command_type
2363  * @param song_length in ms
2364  */
2365 #define AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO                      0x1F
2366 
2367 /**
2368  * @format 121JV
2369  * @param subevent_code
2370  * @param avrcp_cid
2371  * @param command_type
2372  * @param value_len
2373  * @param value
2374  */
2375 #define AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO                                 0x20
2376 
2377  /*
2378  * @format 121JV
2379  * @param subevent_code
2380  * @param avrcp_cid
2381  * @param command_type
2382  * @param value_len
2383  * @param value
2384  */
2385 #define AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO                                0x21
2386 
2387  /*
2388  * @format 121JV
2389  * @param subevent_code
2390  * @param avrcp_cid
2391  * @param command_type
2392  * @param value_len
2393  * @param value
2394  */
2395 #define AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO                                 0x22
2396 
2397  /*
2398  * @format 121JV
2399  * @param subevent_code
2400  * @param avrcp_cid
2401  * @param command_type
2402  * @param value_len
2403  * @param value
2404  */
2405 #define AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO                                 0x23
2406 
2407 /*
2408  * @format 1211
2409  * @param subevent_code
2410  * @param avrcp_cid
2411  * @param command_type
2412  * @param status
2413  */
2414 #define AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE                                  0x24
2415 
2416 /**
2417  * @format 1214
2418  * @param subevent_code
2419  * @param avrcp_cid
2420  * @param command_type
2421  * @param playback_position_ms
2422  */
2423 #define AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_POS_CHANGED                      0x25
2424 
2425 /*
2426  * @format 12111
2427  * @param subevent_code
2428  * @param avrcp_cid
2429  * @param command_type
2430  * @param status
2431  * @param event_id
2432  */
2433 #define AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID                                0x26
2434 /*
2435  * @format 1211
2436  * @param subevent_code
2437  * @param avrcp_cid
2438  * @param command_type
2439  * @param status
2440  */
2441 #define AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID_DONE                           0x27
2442 
2443 /*
2444  * @format 12113
2445  * @param subevent_code
2446  * @param avrcp_cid
2447  * @param command_type
2448  * @param status
2449  * @param company_id
2450  */
2451 #define AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID                              0x28
2452 /*
2453  * @format 1211
2454  * @param subevent_code
2455  * @param avrcp_cid
2456  * @param command_type
2457  * @param status
2458  */
2459 #define AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID_DONE                         0x29
2460 
2461 
2462 
2463 /**
2464  * @format 1B2
2465  * @param subevent_code
2466  * @param bd_addr
2467  * @param browsing_cid
2468  */
2469 #define AVRCP_SUBEVENT_INCOMING_BROWSING_CONNECTION                          0x30
2470 
2471 /**
2472  * @format 11B2
2473  * @param subevent_code
2474  * @param status 0 == OK
2475  * @param bd_addr
2476  * @param browsing_cid
2477  */
2478 #define AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED                        0x31
2479 
2480 /**
2481  * @format 12
2482  * @param subevent_code
2483  * @param browsing_cid
2484  */
2485 #define AVRCP_SUBEVENT_BROWSING_CONNECTION_RELEASED                           0x32
2486 
2487 /**
2488  * @format 12211
2489  * @param subevent_code
2490  * @param browsing_cid
2491  * @param uid_counter
2492  * @param browsing_status
2493  * @param bluetooth_status
2494  */
2495 #define AVRCP_SUBEVENT_BROWSING_DONE                                          0x33
2496 
2497 /**
2498  * @format 1214
2499  * @param subevent_code
2500  * @param browsing_cid
2501  * @param scope
2502  * @param attr_bitmap
2503  */
2504 #define AVRCP_SUBEVENT_BROWSING_GET_FOLDER_ITEMS                              0x34
2505 
2506 /**
2507  * @format 121
2508  * @param subevent_code
2509  * @param browsing_cid
2510  * @param scope
2511  */
2512 #define AVRCP_SUBEVENT_BROWSING_GET_TOTAL_NUM_ITEMS                           0x35
2513 
2514 
2515 
2516 
2517 /**
2518  * @format 121BH1
2519  * @param subevent_code
2520  * @param goep_cid
2521  * @param status
2522  * @param bd_addr
2523  * @param con_handle
2524  * @param incoming
2525  */
2526 #define GOEP_SUBEVENT_CONNECTION_OPENED                                    0x01
2527 
2528 /**
2529  * @format 12
2530  * @param subevent_code
2531  * @param goep_cid
2532 */
2533 #define GOEP_SUBEVENT_CONNECTION_CLOSED                                    0x02
2534 
2535 /**
2536  * @format 12
2537  * @param subevent_code
2538  * @param goep_cid
2539 */
2540 #define GOEP_SUBEVENT_CAN_SEND_NOW                                         0x03
2541 
2542 /**
2543  * @format 121BH1
2544  * @param subevent_code
2545  * @param pbap_cid
2546  * @param status
2547  * @param bd_addr
2548  * @param con_handle
2549  * @param incoming
2550  */
2551 #define PBAP_SUBEVENT_CONNECTION_OPENED                                    0x01
2552 
2553 /**
2554  * @format 12
2555  * @param subevent_code
2556  * @param goep_cid
2557 */
2558 #define PBAP_SUBEVENT_CONNECTION_CLOSED                                    0x02
2559 
2560 /**
2561  * @format 121
2562  * @param subevent_code
2563  * @param goep_cid
2564  * @param status
2565  */
2566 #define PBAP_SUBEVENT_OPERATION_COMPLETED                                  0x03
2567 
2568 /**
2569  * @format 1212
2570  * @param subevent_code
2571  * @param goep_cid
2572  * @param status
2573  * @param phoneboook_size
2574  */
2575 #define PBAP_SUBEVENT_PHONEBOOK_SIZE                                       0x04
2576 
2577 /**
2578  * @format 1211
2579  * @param subevent_code
2580  * @param goep_cid
2581  * @param user_id_required
2582  * @param full_access
2583  */
2584 #define PBAP_SUBEVENT_AUTHENTICATION_REQUEST                               0x05
2585 
2586 /**
2587  * @format 12JVJV
2588  * @param subevent_code
2589  * @param goep_cid
2590  * @param name_len
2591  * @param name
2592  * @param handle_len
2593  * @param handle
2594  */
2595 #define PBAP_SUBEVENT_CARD_RESULT                                          0x06
2596 
2597 
2598 // HID Meta Event Group
2599 
2600 /**
2601  * @format 121BH1
2602  * @param subevent_code
2603  * @param hid_cid
2604  * @param status
2605  * @param bd_addr
2606  * @param con_handle
2607  * @param incoming
2608  */
2609 #define HID_SUBEVENT_CONNECTION_OPENED                                     0x01
2610 
2611 /**
2612  * @format 12
2613  * @param subevent_code
2614  * @param hid_cid
2615 */
2616 #define HID_SUBEVENT_CONNECTION_CLOSED                                     0x02
2617 
2618 /**
2619  * @format 12
2620  * @param subevent_code
2621  * @param hid_cid
2622 */
2623 #define HID_SUBEVENT_CAN_SEND_NOW                                          0x03
2624 
2625 /**
2626  * @format 12
2627  * @param subevent_code
2628  * @param con_handle
2629 */
2630 #define HID_SUBEVENT_SUSPEND                                               0x04
2631 
2632 /**
2633  * @format 12
2634  * @param subevent_code
2635  * @param con_handle
2636 */
2637 #define HID_SUBEVENT_EXIT_SUSPEND                                          0x05
2638 
2639 
2640 // HIDS Meta Event Group
2641 
2642 /**
2643  * @format 12
2644  * @param subevent_code
2645  * @param con_handle
2646 */
2647 #define HIDS_SUBEVENT_CAN_SEND_NOW                                          0x01
2648 
2649 /**
2650  * @format 121
2651  * @param subevent_code
2652  * @param con_handle
2653  * @param protocol_mode
2654 */
2655 #define HIDS_SUBEVENT_PROTOCOL_MODE                                         0x02
2656 
2657 /**
2658  * @format 121
2659  * @param subevent_code
2660  * @param con_handle
2661  * @param enable
2662 */
2663 #define HIDS_SUBEVENT_BOOT_MOUSE_INPUT_REPORT_ENABLE                        0x03
2664 
2665 /**
2666  * @format 121
2667  * @param subevent_code
2668  * @param con_handle
2669  * @param enable
2670 */
2671 #define HIDS_SUBEVENT_BOOT_KEYBOARD_INPUT_REPORT_ENABLE                     0x04
2672 
2673 /**
2674  * @format 121
2675  * @param subevent_code
2676  * @param con_handle
2677  * @param enable
2678 */
2679 #define HIDS_SUBEVENT_INPUT_REPORT_ENABLE                                   0x05
2680 
2681 /**
2682  * @format 121
2683  * @param subevent_code
2684  * @param con_handle
2685  * @param enable
2686 */
2687 #define HIDS_SUBEVENT_OUTPUT_REPORT_ENABLE                                  0x06
2688 
2689 /**
2690  * @format 121
2691  * @param subevent_code
2692  * @param con_handle
2693  * @param enable
2694 */
2695 #define HIDS_SUBEVENT_FEATURE_REPORT_ENABLE                                 0x07
2696 
2697 /**
2698  * @format 12
2699  * @param subevent_code
2700  * @param con_handle
2701 */
2702 #define HIDS_SUBEVENT_SUSPEND                                               0x08
2703 
2704 /**
2705  * @format 12
2706  * @param subevent_code
2707  * @param con_handle
2708 */
2709 #define HIDS_SUBEVENT_EXIT_SUSPEND                                          0x09
2710 
2711 /**
2712  * @format 1211
2713  * @param subevent_code
2714  * @param con_handle
2715  * @param measurement_type 0 - force magnitude, 1 - torque magnitude, see cycling_power_sensor_measurement_context_t
2716  * @param is_enhanced
2717 */
2718 #define GATTSERVICE_SUBEVENT_CYCLING_POWER_START_CALIBRATION               0x01
2719 
2720 /**
2721  * @format 12
2722  * @param subevent_code
2723  * @param con_handle
2724 */
2725 #define GATTSERVICE_SUBEVENT_CYCLING_POWER_BROADCAST_START                 0x02
2726 
2727 /**
2728  * @format 12
2729  * @param subevent_code
2730  * @param con_handle
2731 */
2732 #define GATTSERVICE_SUBEVENT_CYCLING_POWER_BROADCAST_STOP                  0x03
2733 
2734 
2735 // MAP Meta Event Group
2736 
2737 /**
2738  * @format 121BH1
2739  * @param subevent_code
2740  * @param map_cid
2741  * @param status
2742  * @param bd_addr
2743  * @param con_handle
2744  * @param incoming
2745  */
2746 #define MAP_SUBEVENT_CONNECTION_OPENED                                    0x01
2747 
2748 /**
2749  * @format 12
2750  * @param subevent_code
2751  * @param map_cid
2752 */
2753 #define MAP_SUBEVENT_CONNECTION_CLOSED                                    0x02
2754 
2755 /**
2756  * @format 121
2757  * @param subevent_code
2758  * @param map_cid
2759  * @param status
2760  */
2761 #define MAP_SUBEVENT_OPERATION_COMPLETED                                  0x03
2762 
2763 
2764 /**
2765  * @format 12LV
2766  * @param subevent_code
2767  * @param map_cid
2768  * @param name_len
2769  * @param name
2770  */
2771 #define MAP_SUBEVENT_FOLDER_LISTING_ITEM                                  0x04
2772 
2773 /**
2774  * @format 12D
2775  * @param subevent_code
2776  * @param map_cid
2777  * @param handle
2778 
2779  */
2780 #define MAP_SUBEVENT_MESSAGE_LISTING_ITEM                                 0x05
2781 
2782 /**
2783  * @format 12
2784  * @param subevent_code
2785  * @param map_cid
2786  */
2787 #define MAP_SUBEVENT_PARSING_DONE                                         0x06
2788 
2789 
2790 // MESH Meta Event Group
2791 
2792 /**
2793  * @format 1
2794  * @param subevent_code
2795  */
2796 #define MESH_SUBEVENT_CAN_SEND_NOW                                          0x01
2797 
2798 /**
2799  * @format 11
2800  * @param subevent_code
2801  * @param status
2802  */
2803 #define MESH_SUBEVENT_PB_TRANSPORT_PDU_SENT                                          0x02
2804 
2805 /**
2806  * @format 1121
2807  * @param subevent_code
2808  * @param status
2809  * @param pb_transport_cid
2810  * @param pb_type
2811  */
2812 #define MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN                                         0x03
2813 
2814 /**
2815  * @format 112
2816  * @param subevent_code
2817  * @param pb_transport_cid
2818  * @param reason
2819  */
2820 #define MESH_SUBEVENT_PB_TRANSPORT_LINK_CLOSED                                       0x04
2821 
2822 /**
2823  * @format 121
2824  * @param subevent_code
2825  * @param pb_transport_cid
2826  * @param attention_time in seconds
2827  */
2828 #define MESH_SUBEVENT_PB_PROV_ATTENTION_TIMER                                        0x10
2829 
2830 /**
2831  * Device Role
2832  * @format 12
2833  * @param subevent_code
2834  * @param pb_transport_cid
2835  */
2836 #define MESH_SUBEVENT_PB_PROV_START_EMIT_PUBLIC_KEY_OOB                              0x11
2837 
2838 /**
2839  * Device Role
2840  * @format 12
2841  * @param subevent_code
2842  * @param pb_transport_cid
2843  */
2844 #define MESH_SUBEVENT_PB_PROV_STOP_EMIT_PUBLIC_KEY_OOB                               0x12
2845 
2846 /**
2847  * Device Role
2848  * @format 12
2849  * @param subevent_code
2850  * @param pb_transport_cid
2851  */
2852 #define MESH_SUBEVENT_PB_PROV_INPUT_OOB_REQUEST                                      0x13
2853 
2854 /**
2855  * Device Role
2856  * @format 124
2857  * @param subevent_code
2858  * @param pb_transport_cid
2859  * @param output_oob number
2860  */
2861 #define MESH_SUBEVENT_PB_PROV_START_EMIT_OUTPUT_OOB                                  0x15
2862 
2863 /**
2864  * Device Role
2865  * @format 12
2866  * @param subevent_code
2867  * @param pb_transport_cid
2868  */
2869 #define MESH_SUBEVENT_PB_PROV_STOP_EMIT_OUTPUT_OOB                                   0x16
2870 
2871 /**
2872  * Provisioner Role
2873  * @format 12
2874  * @param subevent_code
2875  * @param pb_transport_cid
2876  */
2877 #define MESH_SUBEVENT_PB_PROV_START_RECEIVE_PUBLIC_KEY_OOB                           0x17
2878 
2879 /**
2880  * Provisioner Role
2881  * @format 12
2882  * @param subevent_code
2883  * @param pb_transport_cid
2884  */
2885 #define MESH_SUBEVENT_PB_PROV_STOP_RECEIVE_PUBLIC_KEY_OOB                            0x18
2886 
2887 /**
2888  * Provisioner Role
2889  * @format 12
2890  * @param subevent_code
2891  * @param pb_transport_cid
2892  */
2893 #define MESH_SUBEVENT_PB_PROV_OUTPUT_OOB_REQUEST                                     0x19
2894 
2895 /**
2896  * Provisioner Role
2897  * @format 124
2898  * @param subevent_code
2899  * @param pb_transport_cid
2900  * @param output_oob number
2901  */
2902 #define MESH_SUBEVENT_PB_PROV_START_EMIT_INPUT_OOB                                   0x1a
2903 
2904 /**
2905  * Provisioner Role
2906  * @format 12
2907  * @param subevent_code
2908  * @param pb_transport_cid
2909  */
2910 #define MESH_SUBEVENT_PB_PROV_STOP_EMIT_INPUT_OOB                                    0x1b
2911 
2912 /**
2913  * Provisioner Role
2914  * @format 1212111212
2915  * @param subevent_code
2916  * @param pb_transport_cid
2917  * @param num_elements
2918  * @param algorithms
2919  * @param public_key
2920  * @param static_oob_type
2921  * @param output_oob_size
2922  * @param output_oob_action
2923  * @param input_oob_size
2924  * @param input_oob_action
2925  */
2926 #define MESH_SUBEVENT_PB_PROV_CAPABILITIES                                           0x1c
2927 
2928 /**
2929  * @format 12
2930  * @param subevent_code
2931  * @param pb_transport_cid
2932  */
2933 #define MESH_SUBEVENT_PB_PROV_COMPLETE                                               0x1d
2934 
2935 /**
2936  * @format 11
2937  * @param subevent_code
2938  * @param attention_time in seconds
2939  */
2940 #define MESH_SUBEVENT_ATTENTION_TIMER                                                0x1e
2941 
2942 /**
2943  * @format 1H
2944  * @param subevent_code
2945  * @param con_handle
2946  */
2947 #define MESH_SUBEVENT_PROXY_CONNECTED                                                0x20
2948 
2949 /**
2950  * @format 1H
2951  * @param subevent_code
2952  * @param con_handle
2953  */
2954 #define MESH_SUBEVENT_PROXY_PDU_SENT                                                 0x21
2955 
2956 /**
2957  * @format 1H
2958  * @param subevent_code
2959  * @param con_handle
2960  */
2961 #define MESH_SUBEVENT_PROXY_DISCONNECTED                                             0x22
2962 
2963 /**
2964  * @format 1H
2965  * @param subevent_code
2966  * @param con_handle
2967  */
2968 #define MESH_SUBEVENT_MESSAGE_SENT                                                   0x23
2969 
2970 /**
2971  * @format 114411
2972  * @param subevent_code
2973  * @param element_index
2974  * @param model_identifier
2975  * @param state_identifier
2976  * @param reason
2977  * @param value
2978  */
2979 #define MESH_SUBEVENT_STATE_UPDATE_BOOL                                              0x24
2980 
2981 /**
2982  * @format 114412
2983  * @param subevent_code
2984  * @param element_index
2985  * @param model_identifier
2986  * @param state_identifier
2987  * @param reason
2988  * @param value
2989  */
2990 #define MESH_SUBEVENT_STATE_UPDATE_INT16                                              0x25
2991 
2992 // Mesh Client Events
2993 /**
2994  * @format 11442
2995  * @param subevent_code
2996  * @param element_index
2997  * @param model_identifier
2998  * @param opcode
2999  * @param dest
3000  */
3001 #define MESH_SUBEVENT_MESSAGE_NOT_ACKNOWLEDGED                                        0x30
3002 
3003 /**
3004  * @format 121114
3005  * @param subevent_code
3006  * @param dest
3007  * @param status
3008  * @param present_value
3009  * @param target_value       optional, if value > 0, than remaining_time_ms must be read
3010  * @param remaining_time_ms
3011  */
3012 #define MESH_SUBEVENT_GENERIC_ON_OFF                                                  0x31
3013 
3014 /**
3015  * @format 121224
3016  * @param subevent_code
3017  * @param dest
3018  * @param status
3019  * @param present_value
3020  * @param target_value       optional, if value > 0, than remaining_time_ms must be read
3021  * @param remaining_time_ms
3022  */
3023 #define MESH_SUBEVENT_GENERIC_LEVEL                                                   0x32
3024 
3025 /**
3026  * @format 1222211
3027  * @param subevent_code
3028  * @param dest
3029  * @param netkey_index
3030  * @param appkey_index
3031  * @param company_id
3032  * @param test_id
3033  * @param acknowledged
3034  */
3035 #define MESH_SUBEVENT_HEALTH_PERFORM_TEST                                            0x33
3036 
3037 /**
3038  * @format 11
3039  * @param subevent_code
3040  * @param element_index
3041  */
3042 #define MESH_SUBEVENT_HEALTH_ATTENTION_TIMER_CHANGED                                 0x34
3043 
3044 /**
3045  * @format 1211
3046  * @param subevent_code
3047  * @param dest
3048  * @param status
3049  * @param transition_time_gdtt
3050  */
3051 #define MESH_SUBEVENT_GENERIC_DEFAULT_TRANSITION_TIME                                0x35
3052 
3053 /**
3054  * @format 1211
3055  * @param subevent_code
3056  * @param dest
3057  * @param foundation_status
3058  * @param secure_network_beacon_state
3059  */
3060 #define MESH_SUBEVENT_CONFIGURATION_BEACON                                           0x36
3061 
3062 // Composition Data has variable of element descriptions, with two lists of model lists
3063 // Use .. getters to access data
3064 #define MESH_SUBEVENT_CONFIGURATION_COMPOSITION_DATA                                 0x37
3065 
3066 /**
3067  * @format 1211
3068  * @param subevent_code
3069  * @param dest
3070  * @param foundation_status
3071  * @param default_ttl
3072  */
3073 #define MESH_SUBEVENT_CONFIGURATION_DEFAULT_TTL                                      0x38
3074 
3075 /**
3076  * @format 1211
3077  * @param subevent_code
3078  * @param dest
3079  * @param foundation_status
3080  * @param gatt_proxy_state
3081  */
3082 #define MESH_SUBEVENT_CONFIGURATION_GATT_PROXY                                       0x39
3083 
3084 /**
3085  * @format 121111
3086  * @param subevent_code
3087  * @param dest
3088  * @param foundation_status
3089  * @param relay
3090  * @param retransmit_count                          the number of times that packet is transmitted for each packet that is relayed.
3091  * @param retransmit_interval_ms                    retransmission interval in ms
3092  */
3093 #define MESH_SUBEVENT_CONFIGURATION_RELAY                                            0x40
3094 
3095 
3096 /**
3097  * @format 12122111114
3098  * @param subevent_code
3099  * @param dest                                      element_address
3100  * @param foundation_status
3101  * @param publish_address
3102  * @param appkey_index
3103  * @param credential_flag
3104  * @param publish_ttl
3105  * @param publish_period
3106  * @param publish_retransmit_count
3107  * @param publish_retransmit_interval_steps
3108  * @param model_identifier
3109  */
3110 #define MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION                                0x41
3111 
3112 /**
3113  * @format 12124
3114  * @param subevent_code
3115  * @param dest
3116  * @param foundation_status
3117  * @param address
3118  * @param model_identifier
3119  */
3120 #define MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION                               0x42
3121 
3122 /**
3123  * @format 1214112
3124  * @param subevent_code
3125  * @param dest
3126  * @param foundation_status
3127  * @param model_identifier
3128  * @param num_subscription_addresses
3129  * @param subscription_address_pos
3130  * @param subscription_address_item
3131  */
3132 #define MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION_LIST_ITEM                     0x43
3133 
3134 
3135 /**
3136  * @format 121
3137  * @param subevent_code
3138  * @param dest
3139  * @param foundation_status
3140  */
3141 #define MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX                                      0x44
3142 
3143 /**
3144  * @format 121112
3145  * @param subevent_code
3146  * @param dest
3147  * @param foundation_status
3148  * @param num_netkey_indexes
3149  * @param netkey_index_pos
3150  * @param netkey_index_item
3151  */
3152 #define MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX_LIST_ITEM                             0x45
3153 
3154 /**
3155  * @format 12122
3156  * @param subevent_code
3157  * @param dest
3158  * @param foundation_status
3159  * @param netkey_index_item
3160  * @param appkey_index_item
3161  */
3162 #define MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX                                       0x46
3163 
3164 /**
3165  * @format 12121122
3166  * @param subevent_code
3167  * @param dest
3168  * @param foundation_status
3169  * @param netkey_index
3170  * @param num_appkey_indexes
3171  * @param appkey_index_pos
3172  * @param netkey_index_item
3173  * @param appkey_index_item
3174  */
3175  #define MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX_LIST_ITEM                            0x47
3176 
3177 /**
3178  * @format 12121
3179  * @param subevent_code
3180  * @param dest
3181  * @param foundation_status
3182  * @param netkey_index_item
3183  * @param identity_status
3184  */
3185 #define MESH_SUBEVENT_CONFIGURATION_NODE_IDENTITY                                      0x48
3186 
3187 /**
3188  * @format 12124
3189  * @param subevent_code
3190  * @param dest
3191  * @param foundation_status
3192  * @param appkey_index
3193  * @param model_identifier
3194  */
3195 #define MESH_SUBEVENT_CONFIGURATION_MODEL_APP                                           0x49
3196 
3197 /**
3198  * @format 1214112
3199  * @param subevent_code
3200  * @param dest
3201  * @param foundation_status
3202  * @param model_id
3203  * @param num_appkey_indexes
3204  * @param appkey_index_pos
3205  * @param appkey_index_item
3206  */
3207 #define MESH_SUBEVENT_CONFIGURATION_MODEL_APP_LIST_ITEM                                 0x50
3208 
3209 /**
3210  * @format 121
3211  * @param subevent_code
3212  * @param dest
3213  * @param foundation_status
3214  */
3215 #define MESH_SUBEVENT_CONFIGURATION_NODE_RESET                                          0x51
3216 
3217 /**
3218  * @format 1211
3219  * @param subevent_code
3220  * @param dest
3221  * @param foundation_status
3222  * @param friend_state
3223  */
3224 #define MESH_SUBEVENT_CONFIGURATION_FRIEND                                              0x52
3225 
3226 /**
3227  * @format 12121
3228  * @param subevent_code
3229  * @param dest
3230  * @param foundation_status
3231  * @param netkey_index
3232  * @param phase
3233  */
3234 #define MESH_SUBEVENT_CONFIGURATION_KEY_REFRESH_PHASE                                   0x53
3235 
3236 /**
3237  * @format 121222122
3238  * @param subevent_code
3239  * @param dest
3240  * @param foundation_status
3241  * @param heartbeat_destination
3242  * @param count_S
3243  * @param period_S
3244  * @param ttl
3245  * @param features
3246  * @param netkey_index
3247  */
3248 #define MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION                               0x54
3249 
3250 /**
3251  * @format 121222211
3252  * @param subevent_code
3253  * @param dest
3254  * @param foundation_status
3255  * @param heartbeat_destination
3256  * @param heartbeat_source
3257  * @param count_S
3258  * @param period_S
3259  * @param min_hops
3260  * @param max_hops
3261  */
3262 #define MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION                              0x55
3263 
3264 /**
3265  * @format 12123
3266  * @param subevent_code
3267  * @param dest
3268  * @param foundation_status
3269  * @param lpn_address
3270  * @param poll_timeout
3271  */
3272 #define MESH_SUBEVENT_CONFIGURATION_LOW_POWER_NODE_POLL_TIMEOUT                         0x56
3273 
3274 /**
3275  * @format 12112
3276  * @param subevent_code
3277  * @param dest
3278  * @param foundation_status
3279  * @param transmit_count
3280  * @param transmit_interval_steps_ms
3281  */
3282 #define MESH_SUBEVENT_CONFIGURATION_NETWORK_TRANSMIT                                    0x57
3283 
3284 
3285 #endif
3286