pyxcp 0.23.8__cp313-cp313-macosx_11_0_arm64.whl → 0.25.7__cp313-cp313-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyxcp/__init__.py +1 -1
- pyxcp/cmdline.py +14 -29
- pyxcp/config/__init__.py +1257 -1258
- pyxcp/cpp_ext/aligned_buffer.hpp +168 -0
- pyxcp/cpp_ext/bin.hpp +7 -6
- pyxcp/cpp_ext/cpp_ext.cpython-310-darwin.so +0 -0
- pyxcp/cpp_ext/cpp_ext.cpython-311-darwin.so +0 -0
- pyxcp/cpp_ext/cpp_ext.cpython-312-darwin.so +0 -0
- pyxcp/cpp_ext/cpp_ext.cpython-313-darwin.so +0 -0
- pyxcp/cpp_ext/daqlist.hpp +241 -73
- pyxcp/cpp_ext/extension_wrapper.cpp +123 -15
- pyxcp/cpp_ext/framing.hpp +360 -0
- pyxcp/cpp_ext/helper.hpp +280 -280
- pyxcp/cpp_ext/mcobject.hpp +248 -246
- pyxcp/cpp_ext/sxi_framing.hpp +332 -0
- pyxcp/daq_stim/__init__.py +145 -67
- pyxcp/daq_stim/optimize/binpacking.py +2 -2
- pyxcp/daq_stim/scheduler.cpp +8 -8
- pyxcp/errormatrix.py +2 -2
- pyxcp/examples/run_daq.py +5 -4
- pyxcp/examples/xcp_policy.py +6 -6
- pyxcp/examples/xcp_read_benchmark.py +2 -2
- pyxcp/examples/xcp_skel.py +1 -2
- pyxcp/examples/xcp_unlock.py +10 -12
- pyxcp/examples/xcp_user_supplied_driver.py +1 -2
- pyxcp/examples/xcphello.py +2 -15
- pyxcp/examples/xcphello_recorder.py +2 -2
- pyxcp/master/__init__.py +1 -0
- pyxcp/master/errorhandler.py +134 -4
- pyxcp/master/master.py +823 -252
- pyxcp/recorder/.idea/.gitignore +8 -0
- pyxcp/recorder/.idea/misc.xml +4 -0
- pyxcp/recorder/.idea/modules.xml +8 -0
- pyxcp/recorder/.idea/recorder.iml +6 -0
- pyxcp/recorder/.idea/sonarlint/issuestore/3/8/3808afc69ac1edb9d760000a2f137335b1b99728 +7 -0
- pyxcp/recorder/.idea/sonarlint/issuestore/9/a/9a2aa4db38d3115ed60da621e012c0efc0172aae +0 -0
- pyxcp/recorder/.idea/sonarlint/issuestore/b/4/b49006702b459496a8e8c94ebe60947108361b91 +0 -0
- pyxcp/recorder/.idea/sonarlint/issuestore/index.pb +7 -0
- pyxcp/recorder/.idea/sonarlint/securityhotspotstore/3/8/3808afc69ac1edb9d760000a2f137335b1b99728 +0 -0
- pyxcp/recorder/.idea/sonarlint/securityhotspotstore/9/a/9a2aa4db38d3115ed60da621e012c0efc0172aae +0 -0
- pyxcp/recorder/.idea/sonarlint/securityhotspotstore/b/4/b49006702b459496a8e8c94ebe60947108361b91 +0 -0
- pyxcp/recorder/.idea/sonarlint/securityhotspotstore/index.pb +7 -0
- pyxcp/recorder/.idea/vcs.xml +10 -0
- pyxcp/recorder/__init__.py +96 -98
- pyxcp/recorder/converter/__init__.py +4 -10
- pyxcp/recorder/reader.hpp +138 -139
- pyxcp/recorder/reco.py +1 -0
- pyxcp/recorder/rekorder.cpython-310-darwin.so +0 -0
- pyxcp/recorder/rekorder.cpython-311-darwin.so +0 -0
- pyxcp/recorder/rekorder.cpython-312-darwin.so +0 -0
- pyxcp/recorder/rekorder.cpython-313-darwin.so +0 -0
- pyxcp/recorder/rekorder.hpp +274 -274
- pyxcp/recorder/unfolder.hpp +1354 -1319
- pyxcp/recorder/wrap.cpp +184 -183
- pyxcp/recorder/writer.hpp +302 -302
- pyxcp/scripts/xcp_daq_recorder.py +54 -0
- pyxcp/scripts/xcp_fetch_a2l.py +2 -2
- pyxcp/scripts/xcp_id_scanner.py +1 -2
- pyxcp/scripts/xcp_info.py +66 -51
- pyxcp/scripts/xcp_profile.py +1 -2
- pyxcp/tests/test_daq.py +1 -1
- pyxcp/tests/test_framing.py +262 -0
- pyxcp/tests/test_master.py +210 -100
- pyxcp/tests/test_transport.py +138 -42
- pyxcp/timing.py +1 -1
- pyxcp/transport/__init__.py +8 -5
- pyxcp/transport/base.py +70 -180
- pyxcp/transport/can.py +58 -7
- pyxcp/transport/eth.py +32 -15
- pyxcp/transport/hdf5_policy.py +167 -0
- pyxcp/transport/sxi.py +126 -52
- pyxcp/transport/transport_ext.cpython-310-darwin.so +0 -0
- pyxcp/transport/transport_ext.cpython-311-darwin.so +0 -0
- pyxcp/transport/transport_ext.cpython-312-darwin.so +0 -0
- pyxcp/transport/transport_ext.cpython-313-darwin.so +0 -0
- pyxcp/transport/transport_ext.hpp +214 -0
- pyxcp/transport/transport_wrapper.cpp +249 -0
- pyxcp/transport/usb_transport.py +47 -31
- pyxcp/types.py +0 -13
- pyxcp/{utils.py → utils/__init__.py} +1 -2
- pyxcp/utils/cli.py +78 -0
- {pyxcp-0.23.8.dist-info → pyxcp-0.25.7.dist-info}/METADATA +4 -2
- pyxcp-0.25.7.dist-info/RECORD +158 -0
- {pyxcp-0.23.8.dist-info → pyxcp-0.25.7.dist-info}/WHEEL +1 -1
- pyxcp/examples/conf_sxi.json +0 -9
- pyxcp/examples/conf_sxi.toml +0 -7
- pyxcp-0.23.8.dist-info/RECORD +0 -135
- {pyxcp-0.23.8.dist-info → pyxcp-0.25.7.dist-info}/entry_points.txt +0 -0
- {pyxcp-0.23.8.dist-info → pyxcp-0.25.7.dist-info/licenses}/LICENSE +0 -0
pyxcp/__init__.py
CHANGED
pyxcp/cmdline.py
CHANGED
|
@@ -4,9 +4,8 @@ Parse (transport-layer specific) command line parameters
|
|
|
4
4
|
and create a XCP master instance.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
+
import argparse
|
|
7
8
|
import warnings
|
|
8
|
-
from dataclasses import dataclass
|
|
9
|
-
from typing import List
|
|
10
9
|
|
|
11
10
|
from pyxcp.config import ( # noqa: F401
|
|
12
11
|
create_application,
|
|
@@ -14,33 +13,12 @@ from pyxcp.config import ( # noqa: F401
|
|
|
14
13
|
reset_application,
|
|
15
14
|
)
|
|
16
15
|
from pyxcp.master import Master
|
|
16
|
+
from pyxcp.utils.cli import StrippingParser
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
warnings.simplefilter("always")
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
@dataclass
|
|
23
|
-
class Option:
|
|
24
|
-
short_opt: str
|
|
25
|
-
long_opt: str = ""
|
|
26
|
-
dest: str = ""
|
|
27
|
-
help: str = ""
|
|
28
|
-
type: str = ""
|
|
29
|
-
default: str = ""
|
|
30
|
-
action: str = ""
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class FakeParser:
|
|
34
|
-
"""Parser that collects arguments for later processing."""
|
|
35
|
-
|
|
36
|
-
def __init__(self):
|
|
37
|
-
self.options = []
|
|
38
|
-
|
|
39
|
-
def add_argument(self, short_opt, long_opt="", dest="", help="", type=None, default=None, action=None):
|
|
40
|
-
"""Collect argument definitions without issuing warnings."""
|
|
41
|
-
self.options.append(Option(short_opt, long_opt, dest, help, type, default, action))
|
|
42
|
-
|
|
43
|
-
|
|
44
22
|
class ArgumentParser:
|
|
45
23
|
"""Argument parser for pyXCP applications.
|
|
46
24
|
|
|
@@ -49,10 +27,17 @@ class ArgumentParser:
|
|
|
49
27
|
the parsed arguments.
|
|
50
28
|
"""
|
|
51
29
|
|
|
52
|
-
def __init__(self,
|
|
53
|
-
|
|
54
|
-
|
|
30
|
+
def __init__(self, user_parser=None, description=None, *args, **kws):
|
|
31
|
+
if isinstance(user_parser, argparse.ArgumentParser):
|
|
32
|
+
self._parser = StrippingParser(user_parser)
|
|
33
|
+
self._callout = None
|
|
34
|
+
else:
|
|
35
|
+
# Create a default parser. user_parser might be a callout function or None.
|
|
36
|
+
parser = argparse.ArgumentParser(description=description)
|
|
37
|
+
self._parser = StrippingParser(parser)
|
|
38
|
+
self._callout = user_parser
|
|
55
39
|
self._description = description
|
|
40
|
+
self.args = self._parser.parse_and_strip()
|
|
56
41
|
|
|
57
42
|
def run(self, policy=None, transport_layer_interface=None):
|
|
58
43
|
"""Create and configure a synchronous master instance.
|
|
@@ -65,7 +50,7 @@ class ArgumentParser:
|
|
|
65
50
|
A configured master instance
|
|
66
51
|
"""
|
|
67
52
|
# Create the application with custom arguments and callout
|
|
68
|
-
application = get_application(
|
|
53
|
+
application = get_application(options=[], callout=self._callout)
|
|
69
54
|
|
|
70
55
|
# Create the master instance
|
|
71
56
|
master = Master(
|
|
@@ -81,4 +66,4 @@ class ArgumentParser:
|
|
|
81
66
|
|
|
82
67
|
@property
|
|
83
68
|
def parser(self):
|
|
84
|
-
return self._parser
|
|
69
|
+
return self._parser.parser
|