Home
last modified time | relevance | path

Searched refs:self (Results 1 – 25 of 264) sorted by relevance

1234567891011

/Zephyr-latest/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
22 def __init__(self): argument
23 super(Config, self).__init__()
25 self.name = ""
26 self.directories = []
[all …]
Ddatatypes.py11 def __init__(self): argument
12 super(DocumentConfig, self).__init__()
15 self.name = ""
18 self.namespace = ""
22 self.docRefID = ""
29 def __init__(self, cfg): argument
30 super(Document, self).__init__()
33 self.cfg = cfg
36 self.pkgs = {}
40 self.relationships = []
[all …]
/Zephyr-latest/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 …]
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 …]
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 …]
Dhardware_adapter.py31 def __init__(self, device_config: DeviceConfig) -> None: argument
33 self._flashing_timeout: float = device_config.flash_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 …]
/Zephyr-latest/scripts/pylib/twister/twisterlib/
Dplatform.py24 def __init__(self, data: dict[str, str]): argument
27 self.name = data["name"]
28 self.exec = data.get("exec")
30 def is_runnable(self) -> bool: argument
31 return not bool(self.exec) or bool(shutil.which(self.exec))
33 def __str__(self): argument
36 def __eq__(self, other): argument
38 return self.name == other.name and self.exec == other.exec
52 def __init__(self): argument
57 self.name = ""
[all …]
Dharness.py42 def __init__(self): argument
43 self._status = TwisterStatus.NONE
44 self.reason = None
45 self.type = None
46 self.regex = []
47 self.matches = OrderedDict()
48 self.ordered = True
49 self.id = None
50 self.fail_on_fault = True
51 self.fault = False
[all …]
/Zephyr-latest/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 …]
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 …]
Dgen_isr_tables_parser_local.py43 def __init__(self, intlist_data, config, log): argument
52 self.__config = config
53 self.__log = log
54 intlist = self.__read_intlist(intlist_data)
55 self.__vt, self.__swt, self.__nv, header = self.__parse_intlist(intlist)
56 self.__swi_table_entry_size = header["swi_table_entry_size"]
57 self.__shared_isr_table_entry_size = header["shared_isr_table_entry_size"]
58 self.__shared_isr_client_num_offset = header["shared_isr_client_num_offset"]
60 def __read_intlist(self, intlist_data): argument
87 prefix = self.__config.endian_prefix()
[all …]
/Zephyr-latest/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 …]
Ddtlib.py88 def __init__(self, name: str, parent: Optional['Node'], dt: 'DT'): argument
94 self._name = name
95 self.props: Dict[str, 'Property'] = {}
96 self.nodes: Dict[str, 'Node'] = {}
97 self.labels: List[str] = []
98 self.parent = parent
99 self.dt = dt
101 self._omit_if_no_ref = False
102 self._is_referenced = False
113 def name(self) -> str: argument
[all …]
/Zephyr-latest/scripts/west_commands/runners/
Dlinkserver.py24 def __init__(self, cfg, device, core, argument
34 self.file = cfg.file
35 self.file_type = cfg.file_type
36 self.hex_name = cfg.hex_file
37 self.bin_name = cfg.bin_file
38 self.elf_name = cfg.elf_file
39 self.gdb_cmd = cfg.gdb if cfg.gdb else None
40 self.device = device
41 self.core = core
42 self.linkserver = linkserver
[all …]
Djlink.py46 def __call__(self, parser, args, ignored, option): argument
47 setattr(args, self.dest, not option.startswith('--no-'))
52 def __init__(self, cfg, device, dev_id=None, argument
63 self.file = cfg.file
64 self.file_type = cfg.file_type
65 self.hex_name = cfg.hex_file
66 self.bin_name = cfg.bin_file
67 self.elf_name = cfg.elf_file
68 self.gdb_cmd = [cfg.gdb] if cfg.gdb else None
69 self.device = device
[all …]
Dnrf_common.py78 def __init__(self, cfg, family, softreset, dev_id, erase=False, argument
81 self.hex_ = cfg.hex_file
84 self.family = family
85 self.softreset = softreset
86 self.dev_id = dev_id
87 self.erase = bool(erase)
88 self.reset = bool(reset)
89 self.force = force
90 self.recover = bool(recover)
93 self.suit_starter = False
[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 …]
Dezflashcli.py15 def __init__(self, cfg, tool, dev_id=None, tool_opt=None, 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 = []
27 self.tool_opt += opts
58 def needs_product_header(self): argument
63 is_mcuboot = self.build_conf.getboolean('CONFIG_MCUBOOT')
[all …]
/Zephyr-latest/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 …]
Ddata_split_test.py31 def setUp(self): # pylint: disable=g-missing-super-call argument
32 self.data = read_data("./data/complete_data")
33 self.num_dic = {"wing": 0, "ring": 0, "slope": 0, "negative": 0}
36 self.num = len(lines)
38 def test_read_data(self): argument
39 self.assertEqual(len(self.data), self.num)
40 self.assertIsInstance(self.data, list)
41 self.assertIsInstance(self.data[0], dict)
42 self.assertEqual(
43 set(list(self.data[-1])), set(["gesture", "accel_ms2_xyz", "name"]))
[all …]
/Zephyr-latest/scripts/logging/dictionary/dictionary_parser/
Ddata_types.py27 def __init__(self, database): argument
28 self.database = database
29 self.data_types = {}
32 self.add_data_type(self.LONG, "q")
33 self.add_data_type(self.ULONG, "Q")
34 self.add_data_type(self.LONG_LONG, "q")
35 self.add_data_type(self.ULONG_LONG, "Q")
36 self.add_data_type(self.PTR, "Q")
38 self.add_data_type(self.LONG, "i")
39 self.add_data_type(self.ULONG, "I")
[all …]
Dlog_database.py73 def __init__(self): argument
76 new_db['version'] = self.ZEPHYR_DICT_LOG_VER
84 self.database = new_db
87 def get_version(self): argument
89 return self.database['version']
92 def get_build_id(self): argument
94 return self.database['build_id']
97 def set_build_id(self, build_id): argument
99 self.database['build_id'] = build_id
102 def get_arch(self): argument
[all …]
/Zephyr-latest/scripts/west_commands/
Dbuild.py66 def __call__(self, parser, namespace, values, option_string=None): argument
67 setattr(namespace, self.dest, values or 'always')
71 def __init__(self): argument
72 super(Build, self).__init__(
79 self.source_dir = None
82 self.build_dir = None
85 self.created_build_dir = False
88 self.run_cmake = False
95 self.cmake_cache = None
98 def _banner(self, msg): argument
[all …]
Dbindesc.py68 def __init__(self): argument
69 self.TAG_TO_NAME = {
72 self.bindesc_gen_tag(self.TYPE_STR, 0x800): 'APP_VERSION_STRING',
73 self.bindesc_gen_tag(self.TYPE_UINT, 0x801): 'APP_VERSION_MAJOR',
74 self.bindesc_gen_tag(self.TYPE_UINT, 0x802): 'APP_VERSION_MINOR',
75 self.bindesc_gen_tag(self.TYPE_UINT, 0x803): 'APP_VERSION_PATCHLEVEL',
76 self.bindesc_gen_tag(self.TYPE_UINT, 0x804): 'APP_VERSION_NUMBER',
77 self.bindesc_gen_tag(self.TYPE_STR, 0x805): 'APP_BUILD_VERSION',
78 self.bindesc_gen_tag(self.TYPE_STR, 0x900): 'KERNEL_VERSION_STRING',
79 self.bindesc_gen_tag(self.TYPE_UINT, 0x901): 'KERNEL_VERSION_MAJOR',
[all …]
/Zephyr-latest/scripts/kconfig/
Dkconfiglib.py867 def __init__(self, filename="Kconfig", warn=True, warn_to_stderr=True, argument
947 self._init(filename, warn, warn_to_stderr, encoding)
959 def _init(self, filename, warn, warn_to_stderr, encoding): argument
962 self._encoding = encoding
964 self.srctree = os.getenv("srctree", "")
968 self._srctree_prefix = realpath(self.srctree) + os.sep
970 self.warn = warn
971 self.warn_to_stderr = warn_to_stderr
972 self.warn_assign_undef = os.getenv("KCONFIG_WARN_UNDEF_ASSIGN") == "y"
973 self.warn_assign_override = True
[all …]

1234567891011