Loading tools/rootcanal/py/controller.py +29 −19 Original line number Diff line number Diff line Loading @@ -305,13 +305,23 @@ class ControllerTest(unittest.IsolatedAsyncioTestCase): async def expect_ll(self, expected_pdus: typing.Union[list, typing.Union[ll.LinkLayerPacket, type]], ignored_pdus: typing.Union[list, type] = [], timeout: int = 3) -> ll.LinkLayerPacket: if not isinstance(ignored_pdus, list): ignored_pdus = [ignored_pdus] if not isinstance(expected_pdus, list): expected_pdus = [expected_pdus] packet = await asyncio.wait_for(self.controller.receive_ll(), timeout=timeout) async with asyncio.timeout(timeout): while True: packet = await asyncio.wait_for(self.controller.receive_ll()) pdu = ll.LinkLayerPacket.parse_all(packet) for ignored_pdu in ignored_pdus: if isinstance(pdu, ignored_pdu): continue for expected_pdu in expected_pdus: if isinstance(expected_pdu, type) and isinstance(pdu, expected_pdu): return pdu Loading tools/rootcanal/test/LL/DDI/ADV/BV_11_C.py +2 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,8 @@ class Test(ControllerTest): advertising_address_type=ll.AddressType.PUBLIC, conn_interval=self.LL_initiator_connInterval, conn_peripheral_latency=self.LL_initiator_connPeripheralLatency, conn_supervision_timeout=self.LL_initiator_connSupervisionTimeout)) conn_supervision_timeout=self.LL_initiator_connSupervisionTimeout), ignored_pdus=[ll.LeLegacyAdvertisingPdu]) # 11. Upper Tester receives an HCI_LE_Connection_Complete event from the IUT including the # parameters sent to the IUT in step 8. Loading Loading
tools/rootcanal/py/controller.py +29 −19 Original line number Diff line number Diff line Loading @@ -305,13 +305,23 @@ class ControllerTest(unittest.IsolatedAsyncioTestCase): async def expect_ll(self, expected_pdus: typing.Union[list, typing.Union[ll.LinkLayerPacket, type]], ignored_pdus: typing.Union[list, type] = [], timeout: int = 3) -> ll.LinkLayerPacket: if not isinstance(ignored_pdus, list): ignored_pdus = [ignored_pdus] if not isinstance(expected_pdus, list): expected_pdus = [expected_pdus] packet = await asyncio.wait_for(self.controller.receive_ll(), timeout=timeout) async with asyncio.timeout(timeout): while True: packet = await asyncio.wait_for(self.controller.receive_ll()) pdu = ll.LinkLayerPacket.parse_all(packet) for ignored_pdu in ignored_pdus: if isinstance(pdu, ignored_pdu): continue for expected_pdu in expected_pdus: if isinstance(expected_pdu, type) and isinstance(pdu, expected_pdu): return pdu Loading
tools/rootcanal/test/LL/DDI/ADV/BV_11_C.py +2 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,8 @@ class Test(ControllerTest): advertising_address_type=ll.AddressType.PUBLIC, conn_interval=self.LL_initiator_connInterval, conn_peripheral_latency=self.LL_initiator_connPeripheralLatency, conn_supervision_timeout=self.LL_initiator_connSupervisionTimeout)) conn_supervision_timeout=self.LL_initiator_connSupervisionTimeout), ignored_pdus=[ll.LeLegacyAdvertisingPdu]) # 11. Upper Tester receives an HCI_LE_Connection_Complete event from the IUT including the # parameters sent to the IUT in step 8. Loading