/packages/modules/Bluetooth/system/blueberry/controllers/ |
D | android_bt_target_device.py | 60 def __init__(self, config: Dict[str, Any]) -> None: argument 63 self.config = config 64 self.pri_ad = None 65 self.sec_ad = None 66 self.serial = config.get('device_id', None) 67 self.audio_params = config.get('audio_params', None) 69 if self.serial: 71 self._ad = android_device.AndroidDevice(self.serial) 72 self.aud = adb_ui_device.AdbUiDevice(self._ad) 73 self.pri_ad = android_bluetooth_decorator.AndroidBluetoothDecorator( [all …]
|
/packages/modules/NeuralNetworks/tools/api/ |
D | generate_api.py | 13 def __init__(self, filename): argument 14 self.filename = filename 15 self.line = None # most recently read line 16 self.lineno = -1 # zero-based 17 def finish(self): argument 21 def handle_line(self): argument 25 def read(self): argument 26 with open(self.filename) as f: 28 for self.lineno in range(len(lines)): 29 self.line = lines[self.lineno] [all …]
|
/packages/modules/NeuralNetworks/tools/systrace_parser/parser/test/ |
D | test_stats.py | 7 def setUp(self): argument 8 self.app_phase = AppPhase() 9 self.tracker1 = Tracker(1, False, self.app_phase) 10 self.tracker2 = Tracker(2, True, self.app_phase) 11 self.timevars = dict() 14 self.timevars[name] = self.from_spectime(name) 16 def from_spectime(self, spectime): argument 19 def feed_spec_text(self, text): argument 28 self.tracker1.handle_mark(self.from_spectime(time), mark) 30 self.tracker2.handle_mark(self.from_spectime(time), mark) [all …]
|
/packages/modules/Bluetooth/system/embdrv/lc3/test/ |
D | bitstream.py | 21 def __init__(self, data): argument 23 self.bytes = data 25 self.bp_bw = len(data) - 1 26 self.mask_bw = 1 28 self.bp = 0 29 self.low = 0 30 self.range = 0xffffff 32 def dump(self): argument 34 b = self.bytes 42 def __init__(self, data): argument [all …]
|
/packages/modules/Bluetooth/system/blueberry/tests/gd/security/ |
D | le_security_test.py | 54 def setup_class(self): argument 55 … gd_base_test.GdBaseTestClass.setup_class(self, dut_module='SECURITY', cert_module='SECURITY') 57 def setup_test(self): argument 59 gd_base_test.GdBaseTestClass.setup_test(self) 61 self.dut_security = PyLeSecurity(self.dut) 62 self.cert_security = PyLeSecurity(self.cert) 63 self.dut_hci = PyHci(self.dut) 65 raw_addr = self.dut.hci_controller.GetMacAddress(empty_proto.Empty()).address 67 …self.dut_address = common.BluetoothAddressWithType(address=common.BluetoothAddress(address=raw_add… 71 address_with_type=self.dut_address) [all …]
|
/packages/modules/Bluetooth/system/blueberry/tests/gd/cert/ |
D | gd_device.py | 147 …def __init__(self, grpc_port: str, grpc_root_server_port: str, signal_port: str, cmd: List[str], l… argument 164 self.verbose_mode = verbose_mode 165 self.host_only_device = False 166 self.grpc_root_server_port = int(grpc_root_server_port) 167 self.grpc_port = int(grpc_port) 168 self.signal_port = int(signal_port) 169 self.name = name 170 self.type_identifier = type_identifier 171 self.label = label 172 self.log_path_base = get_current_context().get_full_output_path() [all …]
|
D | py_l2cap.py | 36 def __init__(self, device, psm, l2cap_stream): argument 37 self._device = device 38 self._psm = psm 39 self._le_l2cap_stream = l2cap_stream 40 self._our_le_l2cap_view = FilteringEventStream(self._le_l2cap_stream, 41 … L2capMatchers.PacketPayloadWithMatchingPsm(self._psm)) 43 def get_event_queue(self): argument 44 return self._our_le_l2cap_view.get_event_queue() 46 def send(self, payload): argument 47 self._device.l2cap.SendDynamicChannelPacket( [all …]
|
/packages/modules/Bluetooth/system/blueberry/tests/gd/l2cap/classic/ |
D | pts_l2cap_test.py | 31 def setup_test(self): argument 32 self.device_under_test = self.gd_devices[0] 34 self.device_under_test.rootservice.StartStack( 38 self.device_under_test.wait_channel_ready() 40 …dut_address = self.device_under_test.controller_read_only_property.ReadLocalAddress(empty_pb2.Empt… 41 pts_address = self.controller_configs.get('pts_address').lower() 42 self.device_under_test.address = dut_address 44 self.dut_address = common_pb2.BluetoothAddress(address=self.device_under_test.address) 45 self.pts_address = common_pb2.BluetoothAddress(address=str.encode(pts_address)) 47 self.device_under_test.neighbor.EnablePageScan(neighbor_facade.EnableMsg(enabled=True)) [all …]
|
D | cert_l2cap.py | 42 def __init__(self, device, scid, dcid, acl_stream, acl, control_channel, fcs=None): argument 43 self._device = device 44 self._scid = scid 45 self._dcid = dcid 46 self._acl_stream = acl_stream 47 self._acl = acl 48 self._control_channel = control_channel 49 self._config_rsp_received = False 50 self._config_rsp_sent = False 52 …self._our_acl_view = FilteringEventStream(acl_stream, L2capMatchers.ExtractBasicFrameWithFcs(scid)) [all …]
|
/packages/modules/Bluetooth/android/pandora/mmi2grpc/mmi2grpc/ |
D | gatt.py | 80 def __init__(self, channel): argument 82 self.gatt = GATT(channel) 83 self.host = Host(channel) 84 self.security_storage = SecurityStorage(channel) 85 self.connection = None 86 self.services = None 87 self.characteristics = None 88 self.descriptors = None 89 self.read_response = None 90 self.write_response = None [all …]
|
D | gap.py | 16 def __init__(self, channel): argument 18 self.gatt = GATT(channel) 19 self.host = Host(channel) 20 self.security = Security(channel) 21 self.security_storage = SecurityStorage(channel) 23 self.connection = None 24 self.pairing_events = None 25 self.inquiry_responses = None 26 self.scan_responses = None 28 self.counter = 0 [all …]
|
D | avrcp.py | 42 def __init__(self, channel): argument 45 self.host = Host(channel) 46 self.a2dp = A2DP(channel) 47 self.avrcp = AVRCP(channel) 48 self.mediaplayer = MediaPlayer(channel) 51 def TSC_AVDTP_mmi_iut_accept_connect(self, test: str, pts_addr: bytes, **kwargs): argument 64 self.connection = self.host.WaitConnection(address=pts_addr).connection 67 self.source = self.a2dp.WaitSource(connection=self.connection).source 72 self.sink = self.a2dp.WaitSink(connection=self.connection).sink 78 def TSC_AVCTP_mmi_iut_accept_connect_control(self, **kwargs): argument [all …]
|
D | hfp.py | 39 def __init__(self, test, channel, rootcanal, modem): argument 41 self.hfp = HFP(channel) 42 self.host = Host(channel) 43 self.security = Security(channel) 44 self.security_storage = SecurityStorage(channel) 45 self.rootcanal = rootcanal 46 self.modem = modem 47 self.connection = None 49 self._auto_confirm_requests() 51 def asyncWaitConnection(self, pts_addr, delay=WAIT_DELAY_BEFORE_CONNECTION): argument [all …]
|
/packages/modules/Bluetooth/system/blueberry/tests/topshim/lib/ |
D | gatt_client.py | 39 def __init__(self, port=8999): argument 40 self.__channel = grpc.aio.insecure_channel("localhost:%d" % port) 41 self.__gatt_stub = facade_pb2_grpc.GattServiceStub(self.__channel) 44 async def close(self): argument 48 for task in self.__task_list: 51 self.__task_list.clear() 52 await self.__channel.close() 54 async def register_advertiser(self): argument 57 await self.__gatt_stub.RegisterAdvertiser(empty_proto.Empty()) 59 async def unregister_advertiser(self, advertiser_id): argument [all …]
|
/packages/modules/Bluetooth/ |
D | build.py | 150 def __init__(self, use_flags): argument 156 self.flags = {} 160 self.set_flag(use, False) 164 self.set_flag(use, value) 170 self.set_flag(use, value) 172 def set_flag(self, key, value=True): argument 173 setattr(self, key, value) 174 self.flags[key] = value 179 def __init__(self, args): argument 185 self.args = args [all …]
|
/packages/modules/Uwb/tests/cts/hostsidetests/multidevices/uwb/FiraRangingTests/ |
D | ranging_test.py | 56 def __init__(self, configs: config_parser.TestRunConfig): argument 63 self.tests = _TEST_CASES 65 def setup_class(self): argument 67 self.uwb_devices = [ 69 for ad in self.android_devices 71 self.initiator, self.responder = self.uwb_devices 72 self.device_addresses = self.user_params.get("device_addresses", 74 self.initiator_addr, self.responder_addr = self.device_addresses 75 self.new_responder_addr = [4, 5] 76 self.p_sts_sub_session_id = 11 [all …]
|
/packages/modules/NeuralNetworks/tools/test_generator/ |
D | test_generator.py | 86 def __init__(self, *args, sep="_", showZero=False, startsFrom=0, skipRenaming=False): argument 89 self.name = name 93 while uniqueName in self.__class__.existingNames: 96 self.__class__.existingNames.add(uniqueName) 97 self.name = uniqueName 99 def __str__(self): argument 100 return self.name 104 def __eq__(self, other): argument 105 return isinstance(other, NamedObject) and self.name == other.name 107 def __ne__(self, other): argument [all …]
|
/packages/modules/adb/ |
D | test_device.py | 43 def wrapper(self, *args): argument 44 was_root = self.device.shell(['id', '-un'])[0].strip() == 'root' 46 self.device.unroot() 47 self.device.wait() 50 func(self, *args) 53 self.device.root() 54 self.device.wait() 64 def test_smoke(self): argument 69 self.assertEqual(abb.returncode == 0, cmd.returncode == 0) 70 self.assertEqual(abb.stdout, cmd.stdout) [all …]
|
/packages/modules/Bluetooth/system/blueberry/tests/avrcp/ |
D | bluetooth_avrcp_test.py | 35 def __init__(self, configs): argument 37 self.derived_bt_device = None 38 self.pri_device = None 39 self.is_android_bt_target_device = None 40 self.tracks = None 42 def setup_class(self): argument 44 super(BluetoothAvrcpTest, self).setup_class() 46 for device in self.android_devices: 51 self.pri_device = self.android_devices[0] 53 if len(self.android_devices) > 1 and not self.derived_bt_devices: [all …]
|
/packages/modules/Bluetooth/system/blueberry/utils/ |
D | blueberry_base_test.py | 25 def __init__(self, configs): argument 27 self._upload_test_report = None 28 self.capture_bugreport_on_fail = None 29 self.android_devices = None 30 self.derived_bt_devices = None 31 self.ignore_device_setup_failures = None 32 self._test_metrics = [] 34 def setup_generated_tests(self): argument 51 test_iterations = int(self.user_params.get('test_iterations', 0)) 55 test_method_selector = self.user_params.get('test_method_selector', 'all') [all …]
|
/packages/modules/Bluetooth/system/blueberry/tests/gd/l2cap/le/ |
D | le_l2cap_test.py | 40 def setup_class(self): argument 41 … gd_base_test.GdBaseTestClass.setup_class(self, dut_module='L2CAP', cert_module='HCI_INTERFACES') 43 def setup_test(self): argument 44 gd_base_test.GdBaseTestClass.setup_test(self) 46 self.dut_l2cap = PyLeL2cap(self.dut) 47 self.cert_l2cap = CertLeL2cap(self.cert) 48 self.dut_address = common.BluetoothAddressWithType( 50 self.cert_address = common.BluetoothAddressWithType( 54 address_with_type=self.dut_address, 58 …self.dut_l2cap._device.hci_le_initiator_address.SetPrivacyPolicyForInitiatorAddress(dut_privacy_po… [all …]
|
D | cert_le_l2cap.py | 33 def __init__(self, device, scid, dcid, acl_stream, acl, control_channel, initial_credits=0): argument 34 self._device = device 35 self._scid = scid 36 self._dcid = dcid 37 self._acl_stream = acl_stream 38 self._acl = acl 39 self._control_channel = control_channel 40 self._our_acl_view = FilteringEventStream(acl_stream, L2capMatchers.ExtractBasicFrame(scid)) 41 self._credits_left = initial_credits 43 def get_event_queue(self): argument [all …]
|
/packages/services/Car/tools/hidl_parser/ |
D | parser.py | 87 def __init__(self, name): argument 88 self.name = name 90 def __str__(self): argument 91 return self.name 94 def __init__(self, name, arg): argument 95 self.name = name 96 self.arg = arg 98 def __str__(self): argument 99 return '%s<%s>' % (self.name, self.arg) 102 def __init__(self, name, base): argument [all …]
|
/packages/modules/Bluetooth/system/blueberry/tests/sl4a_sl4a/lib/ |
D | le_scanner.py | 38 def __init__(self, device): argument 39 self.device = device 41 def __wait_for_scan_result_event(self, expected_event_name, timeout=60): argument 43 event_info = self.device.ed.pop_event(expected_event_name, timeout) 49 def scan_for_address_expect_none(self, address, addr_type): argument 50 if self.is_scanning: 53 self.is_scanning = True 55 self.device.sl4a.bleSetScanSettingsScanMode(ble_scan_settings_modes['low_latency']) 56 self.device.sl4a.bleSetScanSettingsLegacy(False) 57 …self.filter_list, self.scan_settings, self.scan_callback = generate_ble_scan_objects(self.device.s… [all …]
|
/packages/modules/Bluetooth/system/blueberry/tests/sl4a_sl4a/gatt/ |
D | gatt_connect_test.py | 66 def setup_class(self): argument 68 self.central = self.dut 69 self.peripheral = self.cert 71 def setup_test(self): argument 74 self.gatt_server_list = [] 75 self.adv_instances = [] 81 def teardown_test(self): argument 82 for bluetooth_gatt in self.bluetooth_gatt_list: 83 self.central.sl4a.gattClientClose(bluetooth_gatt) 84 for gatt_server in self.gatt_server_list: [all …]
|