Home
last modified time | relevance | path

Searched full:self (Results 1 – 25 of 328) sorted by relevance

12345678910>>...14

/Zephyr-Core-3.7.0/scripts/west_commands/zspdx/
Dcmakefileapi.py9 def __init__(self): argument
10 super(Codemodel, self).__init__()
12 self.paths_source = ""
13 self.paths_build = ""
14 self.configurations = []
16 def __repr__(self): argument
17 return f"Codemodel: source {self.paths_source}, build {self.paths_build}"
22 def __init__(self): argument
23 super(Config, self).__init__()
25 self.name = ""
[all …]
/Zephyr-Core-3.7.0/scripts/pylib/pytest-twister-harness/src/twister_harness/device/
Dfifo_handler.py23 def __init__(self, fifo_path: str | Path, timeout: float): argument
28 self._fifo_out_path = str(fifo_path) + '.out'
29 self._fifo_in_path = str(fifo_path) + '.in'
30 self._fifo_out_file: io.FileIO | None = None
31 self._fifo_in_file: io.FileIO | None = None
32 self._open_fifo_thread: threading.Thread | None = None
33 self._opening_monitor_thread: threading.Thread | None = None
34 self._fifo_opened: threading.Event = threading.Event()
35 self._stop_waiting_for_opening: threading.Event = threading.Event()
36 self._timeout = timeout
[all …]
Dhardware_adapter.py31 def __init__(self, device_config: DeviceConfig) -> None: argument
33 self._flashing_timeout: float = self.base_timeout
34 self._serial_connection: serial.Serial | None = None
35 self._serial_pty_proc: subprocess.Popen | None = None
36 self._serial_buffer: bytearray = bytearray()
38 self.device_log_path: Path = device_config.build_dir / 'device.log'
39 self._log_files.append(self.device_log_path)
41 def generate_command(self) -> None: argument
44 self.west,
47 '--build-dir', str(self.device_config.build_dir),
[all …]
Dbinary_adapter.py20 def __init__(self, device_config: DeviceConfig) -> None: argument
25 self._process: subprocess.Popen | None = None
26 self.process_kwargs: dict = {
30 'env': self.env,
35 def generate_command(self) -> None: argument
38 def _flash_and_run(self) -> None: argument
39 self._run_subprocess()
41 def _run_subprocess(self) -> None: argument
42 if not self.command:
46 log_command(logger, 'Running command', self.command, level=logging.DEBUG)
[all …]
Ddevice_adapter.py35 def __init__(self, device_config: DeviceConfig) -> None: argument
39 self.device_config: DeviceConfig = device_config
40 self.base_timeout: float = device_config.base_timeout
41 self._device_read_queue: queue.Queue = queue.Queue()
42 self._reader_thread: threading.Thread | None = None
43 self._device_run: threading.Event = threading.Event()
44 self._device_connected: threading.Event = threading.Event()
45 self.command: list[str] = []
46 self._west: str | None = None
48 self.handler_log_path: Path = device_config.build_dir / 'handler.log'
[all …]
/Zephyr-Core-3.7.0/scripts/build/
Dgen_isr_tables.py20 def __init__(self, debug = False): argument
21 self.__debug = debug
23 def debug(self, text): argument
28 if self.__debug:
35 def set_debug(self, state): argument
36 self.__debug = state
59 def __init__(self, args, syms, log): argument
66 self.__args = args
67 self.__syms = syms
68 self.__log = log
[all …]
Delf_parser.py22 def __init__(self, elf, sym): argument
23 self.elf = elf
24 self.sym = sym
25 self.data = self.elf.symbol_data(sym)
27 def __lt__(self, other): argument
28 return self.sym.entry.st_value < other.sym.entry.st_value
30 def _data_native_read(self, offset): argument
31 (format, size) = self.elf.native_struct_format
32 return struct.unpack(format, self.data[offset:offset + size])[0]
43 def __init__(self, elf, sym): argument
[all …]
Dllext_prepare_exptab.py76 def __init__(self, elffile, section_name): argument
77 self.name = section_name
78 self.section = elffile.get_section_by_name(section_name)
79 if not isinstance(self.section, Section):
82 self.shdr_index = elffile.get_section_index(section_name)
83 self.shdr_offset = elffile['e_shoff'] + \
84 self.shdr_index * elffile['e_shentsize']
85 self.size = self.section['sh_size']
86 self.flags = self.section['sh_flags']
87 self.offset = self.section['sh_offset']
[all …]
/Zephyr-Core-3.7.0/scripts/pylib/twister/twisterlib/
Dharness.py47 def __init__(self): argument
48 self.state = None
49 self.reason = None
50 self.type = None
51 self.regex = []
52 self.matches = OrderedDict()
53 self.ordered = True
54 self.id = None
55 self.fail_on_fault = True
56 self.fault = False
[all …]
Dplatform.py20 def __init__(self): argument
25 self.name = ""
26 self.normalized_name = ""
28 self.sysbuild = False
29 self.twister = True
31 self.ram = 128
33 self.timeout_multiplier = 1.0
34 self.ignore_tags = []
35 self.only_tags = []
36 self.default = False
[all …]
Drunner.py60 def __init__(self, total=0): argument
72 self._done = Value('i', 0)
75 self._iteration = Value('i', 0)
79 self._passed = Value('i', 0)
83 self._skipped_configs = Value('i', 0)
87 self._skipped_runtime = Value('i', 0)
91 self._skipped_filter = Value('i', 0)
94 self._skipped_cases = Value('i', 0)
97 self._error = Value('i', 0)
98 self._failed = Value('i', 0)
[all …]
Dtestinstance.py44 def __init__(self, testsuite, platform, outdir): argument
46 self.testsuite: TestSuite = testsuite
47 self.platform: Platform = platform
49 self.status = None
50 self.reason = "Unknown"
51 self.metrics = dict()
52 self.handler = None
53 self.recording = None
54 self.outdir = outdir
55 self.execution_time = 0
[all …]
/Zephyr-Core-3.7.0/scripts/west_commands/runners/
Dlinkserver.py25 def __init__(self, cfg, device, core, argument
35 self.file = cfg.file
36 self.file_type = cfg.file_type
37 self.hex_name = cfg.hex_file
38 self.bin_name = cfg.bin_file
39 self.elf_name = cfg.elf_file
40 self.gdb_cmd = cfg.gdb if cfg.gdb else None
41 self.device = device
42 self.core = core
43 self.linkserver = linkserver
[all …]
Dezflashcli.py15 def __init__(self, cfg, tool, dev_id=None, tool_opt=[], erase=False, reset=True): argument
17 self.bin_ = cfg.bin_file
19 self.tool = tool
20 self.dev_id = dev_id
21 self.erase = bool(erase)
22 self.reset = bool(reset)
24 self.tool_opt = []
26 self.tool_opt += opts
57 def needs_product_header(self): argument
62 is_mcuboot = self.build_conf.getboolean('CONFIG_MCUBOOT')
[all …]
Dpyocd.py19 def __init__(self, cfg, target, argument
30 self.pyocd_config = default
32 self.pyocd_config = None
35 self.target_args = ['-t', target]
36 self.pyocd = pyocd
37 self.flash_addr_args = ['-a', hex(flash_addr)] if flash_addr else []
38 self.erase = erase
39 self.gdb_cmd = [cfg.gdb] if cfg.gdb is not None else None
40 self.gdb_port = gdb_port
41 self.telnet_port = telnet_port
[all …]
Djlink.py38 def __call__(self, parser, args, ignored, option): argument
39 setattr(args, self.dest, not option.startswith('--no-'))
44 def __init__(self, cfg, device, dev_id=None, argument
54 self.file = cfg.file
55 self.file_type = cfg.file_type
56 self.hex_name = cfg.hex_file
57 self.bin_name = cfg.bin_file
58 self.elf_name = cfg.elf_file
59 self.gdb_cmd = [cfg.gdb] if cfg.gdb else None
60 self.device = device
[all …]
Dcanopen_program.py52 def __call__(self, parser, namespace, values, option_string=None): argument
53 setattr(namespace, self.dest, not option_string.startswith('--no-'))
57 def __init__(self, cfg, dev_id, can_context=DEFAULT_CAN_CONTEXT, argument
68 self.dev_id = dev_id # Only use for error checking in do_run()
69 self.bin_file = cfg.bin_file
70 self.confirm = confirm
71 self.confirm_only = confirm_only
72 self.timeout = timeout
73 self.downloader = CANopenProgramDownloader(logger=self.logger,
133 def do_run(self, command, **kwargs): argument
[all …]
Dopenocd.py32 def __init__(self, cfg, pre_init=None, reset_halt_cmd=DEFAULT_OPENOCD_RESET_HALT_CMD, argument
58 self.openocd_config = config
65 if self.openocd_config is not None:
66 for i in self.openocd_config:
74 self.openocd_cmd = [cfg.openocd or 'openocd'] + search_args
77 self.elf_name = Path(cfg.elf_file).as_posix() if cfg.elf_file else None
78 self.pre_init = pre_init or []
79 self.reset_halt_cmd = reset_halt_cmd
80 self.pre_load = pre_load or []
81 self.load_cmd = load_cmd
[all …]
Dintel_cyclonev.py24 def __init__(self, cfg, pre_init=None, reset_halt_cmd=DEFAULT_OPENOCD_RESET_HALT_CMD, argument
47 self.openocd_config = config
48 self.gdb_cmds = gdb_commands
49 self.gdb_cmds2 = gdb_commands2
50 self.gdb_cmds_deb = gdb_commands_deb
57 if self.openocd_config is not None:
58 for i in self.openocd_config:
66 self.openocd_cmd = [cfg.openocd or 'openocd'] + search_args
69 self.elf_name = Path(cfg.elf_file).as_posix()
70 self.pre_init = pre_init or []
[all …]
/Zephyr-Core-3.7.0/scripts/pylib/pytest-twister-harness/tests/resources/
Dfifo_mock.py16 def __init__(self, filename, mode): argument
17 self.filename = filename
18 self.mode = mode
19 self.thread = None
20 self.file = None
21 self.logger = logging.getLogger(__name__)
23 def _open(self): argument
24 self.logger.info(f'Creating fifo file: {self.filename}')
26 while not os.path.exists(self.filename):
29 self.logger.error(f'Did not able create fifo file: {self.filename}')
[all …]
/Zephyr-Core-3.7.0/scripts/west_commands/
Dbindesc.py69 def __init__(self): argument
70 self.TAG_TO_NAME = {
73 self.bindesc_gen_tag(self.TYPE_STR, 0x800): 'APP_VERSION_STRING',
74 self.bindesc_gen_tag(self.TYPE_UINT, 0x801): 'APP_VERSION_MAJOR',
75 self.bindesc_gen_tag(self.TYPE_UINT, 0x802): 'APP_VERSION_MINOR',
76 self.bindesc_gen_tag(self.TYPE_UINT, 0x803): 'APP_VERSION_PATCHLEVEL',
77 self.bindesc_gen_tag(self.TYPE_UINT, 0x804): 'APP_VERSION_NUMBER',
78 self.bindesc_gen_tag(self.TYPE_STR, 0x900): 'KERNEL_VERSION_STRING',
79 self.bindesc_gen_tag(self.TYPE_UINT, 0x901): 'KERNEL_VERSION_MAJOR',
80 self.bindesc_gen_tag(self.TYPE_UINT, 0x902): 'KERNEL_VERSION_MINOR',
[all …]
/Zephyr-Core-3.7.0/scripts/dts/python-devicetree/src/devicetree/
Dgrutils.py21 def __init__(self, root=None): argument
22 self.__roots = None
24 self.__roots = {root}
25 self.__edge_map = collections.defaultdict(set)
26 self.__reverse_map = collections.defaultdict(set)
27 self.__nodes = set()
29 def add_node(self, node): argument
33 self.__nodes.add(node)
35 def add_edge(self, source, target): argument
41 self.__edge_map[source].add(target)
[all …]
/Zephyr-Core-3.7.0/samples/net/cellular_modem/server/
Dte_udp_receive.py11 def __init__(self, address, timeout = 1): argument
12 self.address = address
13 self.last_packet_received_at = time.monotonic()
14 self.timeout = timeout
15 self.packets_received = 0
16 self.packets_dropped = 0
18 def get_address(self): argument
19 return self.address
21 def on_packet_received(self, data): argument
22 if self._validate_packet_(data):
[all …]
/Zephyr-Core-3.7.0/samples/modules/tflite-micro/magic_wand/train/
Ddata_load_test.py32 def setUp(self): # pylint: disable=g-missing-super-call argument
33 self.loader = DataLoader(
36 def test_get_data(self): argument
37 self.assertIsInstance(self.loader.train_data, list)
38 self.assertIsInstance(self.loader.train_label, list)
39 self.assertIsInstance(self.loader.valid_data, list)
40 self.assertIsInstance(self.loader.valid_label, list)
41 self.assertIsInstance(self.loader.test_data, list)
42 self.assertIsInstance(self.loader.test_label, list)
43 self.assertEqual(self.loader.train_len, len(self.loader.train_data))
[all …]
/Zephyr-Core-3.7.0/scripts/coredump/gdbstubs/arch/
Drisc_v.py60 def __init__(self, logfile, elffile): argument
62 self.registers = None
63 self.gdb_signal = self.GDB_SIGNAL_DEFAULT
65 self.parse_arch_data_block()
67 def parse_arch_data_block(self): argument
68 arch_data_blk = self.logfile.get_arch_data()['data']
69 self.arch_data_ver = self.logfile.get_arch_data()['hdr_ver']
71 if self.arch_data_ver == 1:
72 tu = struct.unpack(self.ARCH_DATA_BLK_STRUCT, arch_data_blk)
73 elif self.arch_data_ver == 2:
[all …]

12345678910>>...14