31 #ifndef HCIRESPONSEPACKET_H
32 #define HCIRESPONSEPACKET_H
34 #include "json/json.h"
71 for (
unsigned int i = 0 ; i < 64;i++){
72 supported_hci_command_mask.push_back(data[1+i]);
79 Json::Value supported_hci_command_mask_vals(Json::arrayValue);
80 for (
unsigned int i = 0;i<64;i++){
81 supported_hci_command_mask_vals.append(supported_hci_command_mask[i]);
83 output[
"supported_hci_command_mask"] = supported_hci_command_mask_vals;
99 acl_data_packet_length = data[1] + (data[2]<<8);
100 synchronous_data_packet_length = data[3];
101 total_num_acld_data_packet_length = data[4] + (data[5]<<8);
102 total_num_synchronous_data_packet_length = data[6] + (data[7]<<8);
107 output[
"status"] =
status;
134 output[
"status"] =
status;
135 output[
"bd_addr"] = bd_addr.
toString();
151 hci_version = data[1] + (data[2]<<8);
152 lmp_pal_version = data[3];
153 manufacturer_name = data[4] + (data[5]<<8);
154 lmp_pal_subversion = data[6] + (data[7]<<8);
159 output[
"status"] =
status;
178 page_number = data[1];
179 maximum_page_number = data[2];
180 for (
unsigned int i = 0; i < 8;i++){
181 extended_lmp_features.push_back(data[3+i]);
187 output[
"status"] =
status;
190 Json::Value extended_lmp_features_val(Json::arrayValue);
192 for (
unsigned int i = 0; i < 8;i++){
193 extended_lmp_features_val.append(extended_lmp_features[i]);
195 output[
"extended_lmp_features"] = extended_lmp_features_val;
214 white_list_size = data[1];
219 output[
"status"] =
status;
234 le_data_packet_length = data[1] + (data[2]<<8);
235 total_num_le_data_packet_length = data[3];
240 output[
"status"] =
status;
255 for (
unsigned int i = 0; i < 8;i++){
256 supported_le_features.push_back(data[1+i]);
262 output[
"status"] =
status;
263 Json::Value supported_le_features_vals(Json::arrayValue);
264 for (
unsigned int i = 0 ; i< 8;i++){
265 supported_le_features_vals.append(supported_le_features[i]);
267 output[
"supported_le_features"] = supported_le_features_vals;
288 for (
unsigned int i = 0; i <248 && !found;i++){
289 if (data[1+i]!=
'\0'){
290 local_name+=data[1+i];
300 output[
"status"] =
status;
314 device_class = data[1] + (data[2]<<8) + (data[3]<<16);
319 output[
"status"] =
status;
334 inquiry_mode = data[1];
339 output[
"status"] =
status;
354 le_supported_host = data[1];
355 simultaneous_le_host = data[2];
360 output[
"status"] =
status;
376 inquiry_scan_interval = data[1] + (data[2]<<8);
377 inquiry_scan_window =data[3] + (data[4]<<8);
382 output[
"status"] =
status;
397 voice_settings = data[1] + (data[2]<<8);
402 output[
"status"] =
status;
420 num_current_iac = data[1];
422 uint32_t lap = data[2+i] + (data[3+i]<<8) + (data[4+i]<<16);
423 lap_iac.push_back(lap);
429 output[
"status"] =
status;
431 Json::Value laps(Json::arrayValue);
433 laps.append(lap_iac[i]);
435 output[
"lap_iac"] = laps;
448 page_scan_type = data[1];
453 output[
"status"] =
status;
467 simple_pairing_mode = data[1];
472 output[
"status"] =
status;
487 fec_required = data[1];
488 for (
unsigned int i = 0;i < 240;i++){
489 extended_inquiry_response.push_back(data[2+i]);
496 Json::Value extended_inquiry_response_val(Json::arrayValue);
497 for (
unsigned int i = 0;i < 240;i++){
498 extended_inquiry_response_val.append(extended_inquiry_response[i]);
500 output[
"extended_inquiry_response"] = extended_inquiry_response_val;
513 scan_enable = data[1];
518 output[
"status"] =
status;
537 output[
"status"] =
status;
551 page_timeout = data[1] + (data[2]<<8);
556 output[
"status"] =
status;
563 #endif //HCIRESPONSEPACKET_H
ctrl_bsb_read_page_scan_type_response_cmd ctrl_bsb_read_page_scan_type_response_cmd_t
ctrl_bsb_read_scan_enable_response_cmd ctrl_bsb_read_scan_enable_response_cmd_t
ctrl_bsb_read_class_of_device_response_cmd(const std::vector< uint8_t > &data)
Definition: hci_response_packet.h:312
std::string toString()
Definition: hci_global.h:144
ctrl_bsb_read_inquiry_scan_type_response_cmd(const std::vector< uint8_t > &data)
Definition: hci_response_packet.h:530
Definition: hci_response_packet.h:227
ctrl_bsb_read_simple_pairing_mode_response_cmd ctrl_bsb_read_simple_pairing_mode_response_cmd_t
Definition: hci_response_packet.h:545
uint8_t fec_required
Definition: hci_response_packet.h:482
Definition: hci_response_packet.h:347
ctrl_bsb_read_extended_inquiry_response_response_cmd ctrl_bsb_read_extended_inquiry_response_response_cmd_t
ctrl_bsb_read_voice_settings_response_cmd ctrl_bsb_read_voice_settings_response_cmd_t
Definition: hci_response_packet.h:369
uint16_t inquiry_scan_window
Definition: hci_response_packet.h:372
Json::Value toJson()
Definition: hci_response_packet.h:470
uint8_t address[6]
Definition: hci_global.h:138
uint8_t total_num_le_data_packet_length
Definition: hci_response_packet.h:230
ctrl_bsb_read_simple_pairing_mode_response_cmd(const std::vector< uint8_t > &data)
Definition: hci_response_packet.h:465
ctrl_bsb_read_iac_lap_response_cmd ctrl_bsb_read_iac_lap_response_cmd_t
uint8_t le_supported_host
Definition: hci_response_packet.h:349
Definition: hci_response_packet.h:308
Definition: hci_response_packet.h:38
Definition: hci_response_packet.h:410
uint16_t page_timeout
Definition: hci_response_packet.h:547
le_read_white_list_response_cmd le_read_white_list_response_cmd_t
Definition: hci_response_packet.h:280
le_read_white_list_response_cmd(const std::vector< uint8_t > &data)
Definition: hci_response_packet.h:212
Definition: hci_response_packet.h:391
ctrl_bsb_read_local_name_response_cmd(const std::vector< uint8_t > &data)
Definition: hci_response_packet.h:284
uint8_t scan_enable
Definition: hci_response_packet.h:509
Definition: hci_response_packet.h:507
ctrl_bsb_read_page_timeout_response_cmd(const std::vector< uint8_t > &data)
Definition: hci_response_packet.h:549
std::vector< uint8_t > supported_le_features
Definition: hci_response_packet.h:251
Json::Value toJson()
Definition: hci_response_packet.h:535
std::vector< uint32_t > lap_iac
Definition: hci_response_packet.h:415
ctrl_bsb_read_inquiry_scan_activity_response_cmd ctrl_bsb_read_inquiry_scan_activity_response_cmd_t
std::string local_name
Definition: hci_response_packet.h:282
ctrl_bsb_read_le_host_support_response_cmd ctrl_bsb_read_le_host_support_response_cmd_t
Definition: hci_response_packet.h:442
Json::Value toJson()
Definition: hci_response_packet.h:400
Json::Value toJson()
Definition: hci_response_packet.h:44
uint16_t le_data_packet_length
Definition: hci_response_packet.h:229
Json::Value toJson()
Definition: hci_response_packet.h:260
uint8_t inquiry_mode
Definition: hci_response_packet.h:330
Definition: hci_response_packet.h:461
uint8_t simple_pairing_mode
Definition: hci_response_packet.h:463
IHciResponseFrame class Interface defining all a generic HCI Response Frame.
Definition: IHciResponseFrame.h:43
ctrl_bsb_read_page_timeout_response_cmd ctrl_bsb_read_page_timeout_response_cmd_t
uint16_t voice_settings
Definition: hci_response_packet.h:393
le_read_local_supported_features_response_cmd(const std::vector< uint8_t > &data)
Definition: hci_response_packet.h:253
uint8_t status
Definition: IHciResponseFrame.h:59
ctrl_bsb_read_inquiry_mode_response_cmd ctrl_bsb_read_inquiry_mode_response_cmd_t
uint8_t page_scan_type
Definition: hci_response_packet.h:444
informational_read_local_version_information_response_cmd informational_read_local_version_information_response_cmd_t
uint8_t simultaneous_le_host
Definition: hci_response_packet.h:350
Definition: hci_response_packet.h:208
le_read_local_supported_features_response_cmd le_read_local_supported_features_response_cmd_t
ctrl_bsb_read_le_host_support_response_cmd(const std::vector< uint8_t > &data)
Definition: hci_response_packet.h:352
Json::Value toJson()
Definition: hci_response_packet.h:358
informational_read_local_extended_features_response_cmd informational_read_local_extended_features_response_cmd_t
Json::Value toJson()
Definition: hci_response_packet.h:493
ctrl_bsb_read_iac_lap_response_cmd(const std::vector< uint8_t > &data)
Definition: hci_response_packet.h:418
Definition: hci_response_packet.h:249
uint8_t num_current_iac
Definition: hci_response_packet.h:412
uint16_t inquiry_scan_interval
Definition: hci_response_packet.h:371
Json::Value toJson()
Definition: hci_response_packet.h:516
uint32_t device_class
Definition: hci_response_packet.h:310
Json::Value toJson()
Definition: hci_response_packet.h:298
Json::Value toJson()
Definition: hci_response_packet.h:380
status_response_cmd status_response_cmd_t
Json::Value toJson()
Definition: hci_response_packet.h:554
Definition: hci_response_packet.h:526
ctrl_bsb_read_inquiry_mode_response_cmd(const std::vector< uint8_t > &data)
Definition: hci_response_packet.h:332
Json::Value toJson()
Definition: hci_response_packet.h:217
informational_read_bd_addr_response_cmd informational_read_bd_addr_response_cmd_t
informational_read_local_supported_cmd_response_cmd informational_read_local_supported_cmd_response_cmd_t
ctrl_bsb_read_extended_inquiry_response_response_cmd(const std::vector< uint8_t > &data)
Definition: hci_response_packet.h:485
Definition: hci_response_packet.h:480
ctrl_bsb_read_local_name_response_cmd ctrl_bsb_read_local_name_response_cmd_t
std::vector< uint8_t > extended_inquiry_response
Definition: hci_response_packet.h:483
ctrl_bsb_read_inquiry_scan_activity_response_cmd(const std::vector< uint8_t > &data)
Definition: hci_response_packet.h:374
ctrl_bsb_read_scan_enable_response_cmd(const std::vector< uint8_t > &data)
Definition: hci_response_packet.h:511
uint8_t white_list_size
Definition: hci_response_packet.h:210
Json::Value toJson()
Definition: hci_response_packet.h:317
le_read_buffer_size_response_cmd(const std::vector< uint8_t > &data)
Definition: hci_response_packet.h:232
le_read_buffer_size_response_cmd le_read_buffer_size_response_cmd_t
Json::Value toJson()
Definition: hci_response_packet.h:337
informational_read_buffer_size_response_cmd informational_read_buffer_size_response_cmd_t
ctrl_bsb_read_voice_settings_response_cmd(const std::vector< uint8_t > &data)
Definition: hci_response_packet.h:395
Json::Value toJson()
Definition: hci_response_packet.h:427
uint8_t scan_type
Definition: hci_response_packet.h:528
ctrl_bsb_read_page_scan_type_response_cmd(const std::vector< uint8_t > &data)
Definition: hci_response_packet.h:446
Definition: hci_global.h:136
ctrl_bsb_read_class_of_device_response_cmd ctrl_bsb_read_class_of_device_response_cmd_t
Json::Value toJson()
Definition: hci_response_packet.h:451
ctrl_bsb_read_inquiry_scan_type_response_cmd ctrl_bsb_read_inquiry_scan_type_response_cmd_t
Json::Value toJson()
Definition: hci_response_packet.h:238
Definition: hci_response_packet.h:328
status_response_cmd(const std::vector< uint8_t > &data)
Definition: hci_response_packet.h:40