Lines Matching refs:event
275 const ::android::hardware::hidl_vec<uint8_t>& event) override { in hciEventReceived()
277 parent_.event_queue.push(event); in hciEventReceived()
279 ALOGV("Event received (length = %d)", static_cast<int>(event.size())); in hciEventReceived()
322 hidl_vec<uint8_t> event = event_queue.front(); in handle_no_ops() local
323 ASSERT_GE(event.size(), in handle_no_ops()
326 (event[EVENT_CODE_BYTE] == EVENT_COMMAND_COMPLETE) && in handle_no_ops()
327 (event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE] == 0x00) && in handle_no_ops()
328 (event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE + 1] == 0x00); in handle_no_ops()
329 event_is_no_op |= (event[EVENT_CODE_BYTE] == EVENT_COMMAND_STATUS) && in handle_no_ops()
330 (event[EVENT_COMMAND_STATUS_OPCODE_LSBYTE] == 0x00) && in handle_no_ops()
331 (event[EVENT_COMMAND_STATUS_OPCODE_LSBYTE + 1] == 0x00); in handle_no_ops()
355 hidl_vec<uint8_t> event; in wait_for_event() local
374 hidl_vec<uint8_t> event = event_queue.front(); in wait_for_command_complete_event() local
377 EXPECT_GT(event.size(), in wait_for_command_complete_event()
379 EXPECT_EQ(EVENT_COMMAND_COMPLETE, event[EVENT_CODE_BYTE]); in wait_for_command_complete_event()
380 EXPECT_EQ(cmd[0], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE]); in wait_for_command_complete_event()
381 EXPECT_EQ(cmd[1], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE + 1]); in wait_for_command_complete_event()
382 EXPECT_EQ(HCI_STATUS_SUCCESS, event[EVENT_COMMAND_COMPLETE_STATUS_BYTE]); in wait_for_command_complete_event()
384 return event; in wait_for_command_complete_event()
395 hidl_vec<uint8_t> event = event_queue.front(); in setBufferSizes() local
398 ASSERT_EQ(EVENT_COMMAND_COMPLETE, event[EVENT_CODE_BYTE]); in setBufferSizes()
399 ASSERT_EQ(cmd[0], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE]); in setBufferSizes()
400 ASSERT_EQ(cmd[1], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE + 1]); in setBufferSizes()
401 ASSERT_EQ(HCI_STATUS_SUCCESS, event[EVENT_COMMAND_COMPLETE_STATUS_BYTE]); in setBufferSizes()
404 event[EVENT_COMMAND_COMPLETE_STATUS_BYTE + 1] + in setBufferSizes()
405 (event[EVENT_COMMAND_COMPLETE_STATUS_BYTE + 2] << 8); in setBufferSizes()
406 max_sco_data_packet_length = event[EVENT_COMMAND_COMPLETE_STATUS_BYTE + 3]; in setBufferSizes()
407 max_acl_data_packets = event[EVENT_COMMAND_COMPLETE_STATUS_BYTE + 4] + in setBufferSizes()
408 (event[EVENT_COMMAND_COMPLETE_STATUS_BYTE + 5] << 8); in setBufferSizes()
409 max_sco_data_packets = event[EVENT_COMMAND_COMPLETE_STATUS_BYTE + 6] + in setBufferSizes()
410 (event[EVENT_COMMAND_COMPLETE_STATUS_BYTE + 7] << 8); in setBufferSizes()
446 hidl_vec<uint8_t> event = event_queue.front(); in sendAndCheckHCI() local
451 ASSERT_GT(event.size(), compare_length + EVENT_FIRST_PAYLOAD_BYTE - 1); in sendAndCheckHCI()
453 ASSERT_EQ(EVENT_LOOPBACK_COMMAND, event[EVENT_CODE_BYTE]); in sendAndCheckHCI()
454 ASSERT_EQ(compare_length, event[EVENT_LENGTH_BYTE]); in sendAndCheckHCI()
457 if (compare_length + EVENT_FIRST_PAYLOAD_BYTE > event.size()) { in sendAndCheckHCI()
458 compare_length = event.size() - EVENT_FIRST_PAYLOAD_BYTE; in sendAndCheckHCI()
467 EXPECT_EQ(cmd[i], event[EVENT_FIRST_PAYLOAD_BYTE + i]); in sendAndCheckHCI()
561 hidl_vec<uint8_t> event = event_queue.front(); in wait_for_completed_packets_event() local
564 EXPECT_EQ(EVENT_NUMBER_OF_COMPLETED_PACKETS, event[EVENT_CODE_BYTE]); in wait_for_completed_packets_event()
565 EXPECT_EQ(1, event[EVENT_NUMBER_OF_COMPLETED_PACKETS_NUM_HANDLES]); in wait_for_completed_packets_event()
567 uint16_t event_handle = event[3] + (event[4] << 8); in wait_for_completed_packets_event()
570 packets_processed += event[5] + (event[6] << 8); in wait_for_completed_packets_event()
592 hidl_vec<uint8_t> event = event_queue.front(); in enterLoopbackMode() local
594 ASSERT_GT(event.size(), in enterLoopbackMode()
596 if (event[EVENT_CODE_BYTE] == EVENT_CONNECTION_COMPLETE) { in enterLoopbackMode()
597 ASSERT_GT(event.size(), in enterLoopbackMode()
599 ASSERT_EQ(event[EVENT_LENGTH_BYTE], in enterLoopbackMode()
601 uint8_t connection_type = event[EVENT_CONNECTION_COMPLETE_TYPE]; in enterLoopbackMode()
607 uint16_t handle = event[EVENT_CONNECTION_COMPLETE_HANDLE_LSBYTE] | in enterLoopbackMode()
608 event[EVENT_CONNECTION_COMPLETE_HANDLE_LSBYTE + 1] << 8; in enterLoopbackMode()
615 event[EVENT_CONNECTION_COMPLETE_TYPE], handle); in enterLoopbackMode()
618 ASSERT_EQ(EVENT_COMMAND_COMPLETE, event[EVENT_CODE_BYTE]); in enterLoopbackMode()
619 ASSERT_EQ(cmd[0], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE]); in enterLoopbackMode()
620 ASSERT_EQ(cmd[1], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE + 1]); in enterLoopbackMode()
621 ASSERT_EQ(HCI_STATUS_SUCCESS, event[EVENT_COMMAND_COMPLETE_STATUS_BYTE]); in enterLoopbackMode()
646 hidl_vec<uint8_t> event = event_queue.front(); in TEST_P() local
648 ASSERT_GT(event.size(), static_cast<size_t>(EVENT_LOCAL_LMP_VERSION_BYTE)); in TEST_P()
650 ASSERT_EQ(EVENT_COMMAND_COMPLETE, event[EVENT_CODE_BYTE]); in TEST_P()
651 ASSERT_EQ(cmd[0], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE]); in TEST_P()
652 ASSERT_EQ(cmd[1], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE + 1]); in TEST_P()
653 ASSERT_EQ(HCI_STATUS_SUCCESS, event[EVENT_COMMAND_COMPLETE_STATUS_BYTE]); in TEST_P()
655 ASSERT_LE(HCI_MINIMUM_HCI_VERSION, event[EVENT_LOCAL_HCI_VERSION_BYTE]); in TEST_P()
656 ASSERT_LE(HCI_MINIMUM_LMP_VERSION, event[EVENT_LOCAL_LMP_VERSION_BYTE]); in TEST_P()
669 auto event = wait_for_command_complete_event(cmd); in TEST_P() local
671 EXPECT_LE(HCI_BLUETOOTH4_2_HCI_VERSION, event[EVENT_LOCAL_HCI_VERSION_BYTE]); in TEST_P()
672 EXPECT_LE(HCI_BLUETOOTH4_2_LMP_VERSION, event[EVENT_LOCAL_LMP_VERSION_BYTE]); in TEST_P()
677 event = wait_for_command_complete_event(cmd); in TEST_P()
678 EXPECT_TRUE(event[EVENT_LOCAL_SUPPORTED_FEATURES_LE_SUPPORTED_BYTE] & in TEST_P()
684 event = wait_for_command_complete_event(cmd); in TEST_P()
685 EXPECT_TRUE(event[EVENT_LOCAL_LE_SUPPORTED_FEATURES_DATA_LENGTH_EXTENSION_BYTE] & in TEST_P()
697 hidl_vec<uint8_t> event = event_queue.front(); in TEST_P() local
700 ASSERT_GT(event.size(), in TEST_P()
702 if (event[EVENT_CODE_BYTE] == EVENT_COMMAND_COMPLETE) { in TEST_P()
703 ASSERT_EQ(cmd[0], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE]); in TEST_P()
704 ASSERT_EQ(cmd[1], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE + 1]); in TEST_P()
706 event[EVENT_COMMAND_COMPLETE_STATUS_BYTE]); in TEST_P()
708 ASSERT_EQ(EVENT_COMMAND_STATUS, event[EVENT_CODE_BYTE]); in TEST_P()
709 ASSERT_EQ(cmd[0], event[EVENT_COMMAND_STATUS_OPCODE_LSBYTE]); in TEST_P()
710 ASSERT_EQ(cmd[1], event[EVENT_COMMAND_STATUS_OPCODE_LSBYTE + 1]); in TEST_P()
712 event[EVENT_COMMAND_STATUS_STATUS_BYTE]); in TEST_P()