Lines Matching refs:event
234 const ::android::hardware::hidl_vec<uint8_t>& event) override { in hciEventReceived()
236 parent_.event_queue.push(event); in hciEventReceived()
238 ALOGV("Event received (length = %d)", static_cast<int>(event.size())); in hciEventReceived()
280 hidl_vec<uint8_t> event = event_queue.front(); in handle_no_ops() local
281 EXPECT_GE(event.size(), in handle_no_ops()
284 (event[EVENT_CODE_BYTE] == EVENT_COMMAND_COMPLETE) && in handle_no_ops()
285 (event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE] == 0x00) && in handle_no_ops()
286 (event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE + 1] == 0x00); in handle_no_ops()
287 event_is_no_op |= (event[EVENT_CODE_BYTE] == EVENT_COMMAND_STATUS) && in handle_no_ops()
288 (event[EVENT_COMMAND_STATUS_OPCODE_LSBYTE] == 0x00) && in handle_no_ops()
289 (event[EVENT_COMMAND_STATUS_OPCODE_LSBYTE + 1] == 0x00); in handle_no_ops()
300 hidl_vec<uint8_t> event; in wait_for_event() local
319 hidl_vec<uint8_t> event = event_queue.front(); in wait_for_command_complete_event() local
322 EXPECT_GT(event.size(), in wait_for_command_complete_event()
324 EXPECT_EQ(EVENT_COMMAND_COMPLETE, event[EVENT_CODE_BYTE]); in wait_for_command_complete_event()
325 EXPECT_EQ(cmd[0], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE]); in wait_for_command_complete_event()
326 EXPECT_EQ(cmd[1], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE + 1]); in wait_for_command_complete_event()
327 EXPECT_EQ(HCI_STATUS_SUCCESS, event[EVENT_COMMAND_COMPLETE_STATUS_BYTE]); in wait_for_command_complete_event()
338 hidl_vec<uint8_t> event = event_queue.front(); in setBufferSizes() local
341 EXPECT_EQ(EVENT_COMMAND_COMPLETE, event[EVENT_CODE_BYTE]); in setBufferSizes()
342 EXPECT_EQ(cmd[0], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE]); in setBufferSizes()
343 EXPECT_EQ(cmd[1], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE + 1]); in setBufferSizes()
344 EXPECT_EQ(HCI_STATUS_SUCCESS, event[EVENT_COMMAND_COMPLETE_STATUS_BYTE]); in setBufferSizes()
347 event[EVENT_COMMAND_COMPLETE_STATUS_BYTE + 1] + in setBufferSizes()
348 (event[EVENT_COMMAND_COMPLETE_STATUS_BYTE + 2] << 8); in setBufferSizes()
349 max_sco_data_packet_length = event[EVENT_COMMAND_COMPLETE_STATUS_BYTE + 3]; in setBufferSizes()
350 max_acl_data_packets = event[EVENT_COMMAND_COMPLETE_STATUS_BYTE + 4] + in setBufferSizes()
351 (event[EVENT_COMMAND_COMPLETE_STATUS_BYTE + 5] << 8); in setBufferSizes()
352 max_sco_data_packets = event[EVENT_COMMAND_COMPLETE_STATUS_BYTE + 6] + in setBufferSizes()
353 (event[EVENT_COMMAND_COMPLETE_STATUS_BYTE + 7] << 8); in setBufferSizes()
389 hidl_vec<uint8_t> event = event_queue.front(); in sendAndCheckHCI() local
394 EXPECT_GT(event.size(), compare_length + EVENT_FIRST_PAYLOAD_BYTE - 1); in sendAndCheckHCI()
396 EXPECT_EQ(EVENT_LOOPBACK_COMMAND, event[EVENT_CODE_BYTE]); in sendAndCheckHCI()
397 EXPECT_EQ(compare_length, event[EVENT_LENGTH_BYTE]); in sendAndCheckHCI()
400 if (compare_length + EVENT_FIRST_PAYLOAD_BYTE > event.size()) { in sendAndCheckHCI()
401 compare_length = event.size() - EVENT_FIRST_PAYLOAD_BYTE; in sendAndCheckHCI()
410 EXPECT_EQ(cmd[i], event[EVENT_FIRST_PAYLOAD_BYTE + i]); in sendAndCheckHCI()
512 hidl_vec<uint8_t> event = event_queue.front(); in wait_for_completed_packets_event() local
515 EXPECT_EQ(EVENT_NUMBER_OF_COMPLETED_PACKETS, event[EVENT_CODE_BYTE]); in wait_for_completed_packets_event()
516 EXPECT_EQ(1, event[EVENT_NUMBER_OF_COMPLETED_PACKETS_NUM_HANDLES]); in wait_for_completed_packets_event()
518 uint16_t event_handle = event[3] + (event[4] << 8); in wait_for_completed_packets_event()
521 packets_processed += event[5] + (event[6] << 8); in wait_for_completed_packets_event()
543 hidl_vec<uint8_t> event = event_queue.front(); in enterLoopbackMode() local
545 EXPECT_GT(event.size(), in enterLoopbackMode()
547 if (event[EVENT_CODE_BYTE] == EVENT_CONNECTION_COMPLETE) { in enterLoopbackMode()
548 EXPECT_GT(event.size(), in enterLoopbackMode()
550 EXPECT_EQ(event[EVENT_LENGTH_BYTE], in enterLoopbackMode()
552 uint8_t connection_type = event[EVENT_CONNECTION_COMPLETE_TYPE]; in enterLoopbackMode()
558 uint16_t handle = event[EVENT_CONNECTION_COMPLETE_HANDLE_LSBYTE] | in enterLoopbackMode()
559 event[EVENT_CONNECTION_COMPLETE_HANDLE_LSBYTE + 1] << 8; in enterLoopbackMode()
566 event[EVENT_CONNECTION_COMPLETE_TYPE], handle); in enterLoopbackMode()
569 EXPECT_EQ(EVENT_COMMAND_COMPLETE, event[EVENT_CODE_BYTE]); in enterLoopbackMode()
570 EXPECT_EQ(cmd[0], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE]); in enterLoopbackMode()
571 EXPECT_EQ(cmd[1], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE + 1]); in enterLoopbackMode()
572 EXPECT_EQ(HCI_STATUS_SUCCESS, event[EVENT_COMMAND_COMPLETE_STATUS_BYTE]); in enterLoopbackMode()
597 hidl_vec<uint8_t> event = event_queue.front(); in TEST_F() local
599 EXPECT_GT(event.size(), static_cast<size_t>(EVENT_LOCAL_LMP_VERSION_BYTE)); in TEST_F()
601 EXPECT_EQ(EVENT_COMMAND_COMPLETE, event[EVENT_CODE_BYTE]); in TEST_F()
602 EXPECT_EQ(cmd[0], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE]); in TEST_F()
603 EXPECT_EQ(cmd[1], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE + 1]); in TEST_F()
604 EXPECT_EQ(HCI_STATUS_SUCCESS, event[EVENT_COMMAND_COMPLETE_STATUS_BYTE]); in TEST_F()
606 EXPECT_LE(HCI_MINIMUM_HCI_VERSION, event[EVENT_LOCAL_HCI_VERSION_BYTE]); in TEST_F()
607 EXPECT_LE(HCI_MINIMUM_LMP_VERSION, event[EVENT_LOCAL_LMP_VERSION_BYTE]); in TEST_F()
618 hidl_vec<uint8_t> event = event_queue.front(); in TEST_F() local
621 EXPECT_GT(event.size(), in TEST_F()
623 if (event[EVENT_CODE_BYTE] == EVENT_COMMAND_COMPLETE) { in TEST_F()
624 EXPECT_EQ(cmd[0], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE]); in TEST_F()
625 EXPECT_EQ(cmd[1], event[EVENT_COMMAND_COMPLETE_OPCODE_LSBYTE + 1]); in TEST_F()
627 event[EVENT_COMMAND_COMPLETE_STATUS_BYTE]); in TEST_F()
629 EXPECT_EQ(EVENT_COMMAND_STATUS, event[EVENT_CODE_BYTE]); in TEST_F()
630 EXPECT_EQ(cmd[0], event[EVENT_COMMAND_STATUS_OPCODE_LSBYTE]); in TEST_F()
631 EXPECT_EQ(cmd[1], event[EVENT_COMMAND_STATUS_OPCODE_LSBYTE + 1]); in TEST_F()
633 event[EVENT_COMMAND_STATUS_STATUS_BYTE]); in TEST_F()