pyxcp 0.23.4__cp310-cp310-macosx_11_0_arm64.whl → 0.23.7__cp310-cp310-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.

Potentially problematic release.


This version of pyxcp might be problematic. Click here for more details.

@@ -0,0 +1,339 @@
1
+ Metadata-Version: 2.3
2
+ Name: pyxcp
3
+ Version: 0.23.7
4
+ Summary: Universal Calibration Protocol for Python
5
+ License: LGPLv3
6
+ Keywords: automotive,ecu,xcp,asam,autosar
7
+ Author: Christoph Schueler
8
+ Author-email: cpu.gems@googlemail.com
9
+ Requires-Python: >=3.10,<4.0
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
13
+ Classifier: License :: Other/Proprietary License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: Scientific/Engineering
21
+ Classifier: Topic :: Software Development
22
+ Requires-Dist: bandit (>=1.7.8,<2.0.0)
23
+ Requires-Dist: chardet (>=5.2.0,<6.0.0)
24
+ Requires-Dist: construct (>=2.10.68,<3.0.0)
25
+ Requires-Dist: line-profiler-pycharm (>=1.1.0,<2.0.0)
26
+ Requires-Dist: mako (>=1.2.4,<2.0.0)
27
+ Requires-Dist: pyserial (>=3.5,<4.0)
28
+ Requires-Dist: python-can (>=4.2.2,<5.0.0)
29
+ Requires-Dist: pytz (>=2025.2,<2026.0)
30
+ Requires-Dist: pyusb (>=1.2.1,<2.0.0)
31
+ Requires-Dist: rich (>=14.0.0,<15.0.0)
32
+ Requires-Dist: toml (>=0.10.2,<0.11.0)
33
+ Requires-Dist: tomlkit (>=0.13.3,<0.14.0)
34
+ Requires-Dist: traitlets (<=5.11.2)
35
+ Requires-Dist: uptime (>=3.0.1,<4.0.0)
36
+ Project-URL: Homepage, https://github.com/christoph2/pyxcp
37
+ Description-Content-Type: text/x-rst
38
+
39
+ Readme
40
+ ======
41
+
42
+ .. image:: pyxcp_social.jpg
43
+ :align: center
44
+
45
+ Reliable Python tooling for the ASAM MCD-1 XCP protocol (measurement,
46
+ calibration, flashing) with multiple transports (CAN, Ethernet, USB,
47
+ Serial) and handy CLI utilities.
48
+
49
+ |PyPI| |Python Versions| |License: LGPL v3+| |Code style: black|
50
+
51
+ ``pyXCP`` is a production-ready Python library for communicating with
52
+ XCP-enabled devices, most commonly automotive ECUs. Use it to take
53
+ measurements, adjust parameters (calibration), stream DAQ/STIM, and
54
+ program devices during development.
55
+
56
+ Highlights:
57
+
58
+ - Transports: Ethernet (TCP/IP), CAN, USB, Serial (SxI)
59
+ - Cross-platform: Windows, Linux, macOS
60
+ - Rich CLI tools for common XCP tasks
61
+ - Extensible architecture and layered design
62
+
63
+ --------------
64
+
65
+ Installation
66
+ ------------
67
+
68
+ The easiest way is from PyPI:
69
+
70
+ .. code:: shell
71
+
72
+ pip install pyxcp
73
+
74
+ To install from the main branch:
75
+
76
+ .. code:: shell
77
+
78
+ pip install git+https://github.com/christoph2/pyxcp.git
79
+
80
+ Requirements
81
+ ~~~~~~~~~~~~
82
+
83
+ - Python >= 3.10
84
+ - Building from source requires a working C/C++ toolchain (native
85
+ extensions are used for performance). Wheels are provided for common
86
+ platforms and Python versions; if a wheel is not available, pip will
87
+ build from source.
88
+ - An XCP slave device (or simulator)
89
+
90
+ Quick start
91
+ -----------
92
+
93
+ The tutorial walks you through typical tasks end-to-end: see `tutorial <tutorial.rst>`_.
94
+
95
+ Minimal example using the built-in argument parser and context manager:
96
+
97
+ .. code:: python
98
+
99
+ from pyxcp.cmdline import ArgumentParser
100
+
101
+ ap = ArgumentParser(description="pyXCP hello world")
102
+
103
+ with ap.run() as x:
104
+ x.connect()
105
+ identifier = x.identifier(0x01)
106
+ print(f"ID: {identifier!r}")
107
+ print(x.slaveProperties)
108
+ x.disconnect()
109
+
110
+ Configuration
111
+ ~~~~~~~~~~~~~
112
+
113
+ ``pyXCP`` supports a
114
+ `traitlets <https://github.com/ipython/traitlets>`__\-based configuration system.
115
+
116
+ - Recommended Python config example and generator: `tutorial <tutorial.rst>`__ and `configuration <configuration.rst>`__
117
+ - Legacy TOML examples remain available for compatibility.
118
+
119
+ Command‑line tools
120
+ ~~~~~~~~~~~~~~~~~~
121
+
122
+ Installed entry points (see pyproject.toml):
123
+
124
+ - xcp-info — print capabilities and properties
125
+ - xcp-id-scanner — scan for slave identifiers
126
+ - xcp-fetch-a2l — retrieve A2L from target (if supported)
127
+ - xcp-profile — generate/convert config files
128
+ - xcp-examples — launch assorted demos/examples
129
+ - xmraw-converter — convert recorder .xmraw data
130
+ - pyxcp-probe-can-drivers — list available CAN interfaces
131
+
132
+ Run any tool with -h for options.
133
+
134
+ Features
135
+ --------
136
+
137
+ - Multiple transport layers: Ethernet (TCP), CAN, USB, SxI (serial/UART)
138
+ - Data Acquisition (DAQ) and Stimulation (STIM)
139
+ - Calibration (read/write parameters)
140
+ - Flashing/programming workflows
141
+ - A2L (ASAM MCD‑2 MC) support
142
+ - Recorder utilities and converters (see `recorder <recorder.rst>`__)
143
+ - Extensible architecture for custom transports
144
+
145
+ Documentation
146
+ -------------
147
+
148
+ - Getting started tutorial: `tutorial <tutorial.rst>`__
149
+ - Configuration: `configuration <configuration.rst>`__
150
+ - CAN driver setup and troubleshooting: `howto_can_driver <howto_can_driver.rst>`__
151
+ - Recorder: `recorder <recorder.rst>`__
152
+ - Troubleshooting: `troubleshooting <troubleshooting.rst>`__
153
+ - Troubleshooting matrix (common errors, root causes, fixes):
154
+ `troubleshooting_matrix <troubleshooting_matrix.rst>`__
155
+
156
+ To build the Sphinx documentation locally:
157
+
158
+ 1. Install doc requirements:
159
+ ``pip install -r docs/requirements.txt``
160
+ 2. Build:
161
+ ``sphinx-build -b html docs docs/_build/html``
162
+ 3. Open
163
+ ``docs/_build/html/index.html``
164
+
165
+ Compatibility
166
+ -------------
167
+
168
+ - Operating systems: Windows, Linux, macOS
169
+ - Python: 3.10 - 3.14, CPython wheels where available
170
+ - CAN backends: python-can compatible drivers (see `howto_can_driver <howto_can_driver.rst>`__)
171
+
172
+ Contributing
173
+ ------------
174
+
175
+ Contributions are welcome! Please: - Read `CODE_OF_CONDUCT <../CODE_OF_CONDUCT.md>`__ - Open an
176
+ issue or discussion before large changes - Use
177
+ `pre-commit <https://github.com/pre-commit/pre-commit>`__ to run linters
178
+ and tests locally
179
+
180
+ License
181
+ -------
182
+
183
+ GNU Lesser General Public License v3 or later (LGPLv3+). See LICENSE for
184
+ details.
185
+
186
+ References
187
+ ----------
188
+
189
+ - ASAM MCD‑1 XCP standard:
190
+ https://www.asam.net/standards/detail/mcd-1-xcp/
191
+
192
+ About ASAM MCD‑1 XCP
193
+ --------------------
194
+
195
+ XCP (Universal Measurement and Calibration Protocol) is an ASAM standard
196
+ defining a vendor‑neutral protocol to access internal data of electronic
197
+ control units (ECUs) for measurement, calibration (parameter tuning),
198
+ and programming. XCP decouples the protocol from the physical transport,
199
+ so the same command set can be carried over different buses such as CAN,
200
+ FlexRay, Ethernet, USB, or Serial.
201
+
202
+ - Roles: An XCP Master (this library) communicates with an XCP Slave
203
+ (your device/ECU or simulator).
204
+ - Layered concept: XCP defines an application layer and transport
205
+ layers. ``pyXCP`` implements the application layer and multiple transport
206
+ bindings.
207
+ - Use cases:
208
+
209
+ - Measurement: Read variables from the ECU in real‑time, including
210
+ high‑rate DAQ streaming.
211
+ - Calibration: Read/write parameters (calibration data) in RAM/flash.
212
+ - Programming: Download new program/data to flash (where the slave
213
+ supports it).
214
+
215
+ For the authoritative description, see the ASAM page:
216
+ https://www.asam.net/standards/detail/mcd-1-xcp/
217
+
218
+ XCP in a nutshell
219
+ -----------------
220
+
221
+ - Connect/Session: The master establishes a connection, negotiates
222
+ capabilities/features, and optionally unlocks protected functions via
223
+ seed & key.
224
+ - Addressing: Memory is accessed via absolute or segment‑relative
225
+ addresses. Addressing modes are described in the associated A2L file
226
+ (ASAM MCD‑2 MC), which maps symbolic names to addresses, data types,
227
+ and conversion rules.
228
+ - Events: The slave exposes events (e.g., “1 ms task”, “Combustion
229
+ cycle”), which trigger DAQ sampling. The master assigns signals (ODTs)
230
+ to these events for time‑aligned acquisition.
231
+ - DAQ/STIM: DAQ = Data Acquisition (slave → master), STIM = Stimulation
232
+ (master → slave). Both use event‑driven lists for deterministic
233
+ timing.
234
+ - Timestamps: DAQ may carry timestamps from the slave for precise time
235
+ correlation.
236
+ - Security: Access to sensitive commands (e.g., programming,
237
+ calibration) can be protected by a seed & key algorithm negotiated at
238
+ runtime.
239
+ - Checksums: XCP defines checksum services useful for verifying memory
240
+ regions (e.g., after flashing).
241
+
242
+ Relation to A2L (ASAM MCD‑2 MC)
243
+ -------------------------------
244
+
245
+ While XCP defines the protocol, the A2L file describes the measurement
246
+ and calibration objects (characteristics, measurements), data types,
247
+ conversion rules, and memory layout. In practice, you use ``pyXCP`` together
248
+ with an A2L to: - Resolve symbolic names to addresses and data types. -
249
+ Configure DAQ lists from human‑readable signal names. - Interpret raw
250
+ values using the appropriate conversion methods.
251
+
252
+ ``pyXCP`` provides utilities to fetch A2L data when supported by the slave
253
+ and to work with A2L‑described objects. See also
254
+ `pya2ldb <https://github.com/christoph2/pya2l>`__!
255
+
256
+ Transports and addressing
257
+ -------------------------
258
+
259
+ XCP is transport‑agnostic. ``pyXCP`` supports multiple transports and
260
+ addressing schemes: - CAN (XCP on CAN): Robust and ubiquitous in
261
+ vehicles; limited payload and bandwidth; suited for many calibration
262
+ tasks and moderate DAQ rates. - Ethernet (XCP on TCP/UDP): High
263
+ bandwidth with low latency; well suited for rich DAQ and programming
264
+ workflows. - USB: High throughput for lab setups; requires device
265
+ support. - Serial/SxI: Simple point‑to‑point links for embedded targets
266
+ and simulators.
267
+
268
+ The exact capabilities (e.g., max CTO/DTO, checksum types, timestamping)
269
+ are negotiated at connect time and depend on the slave and transport.
270
+
271
+ Supported features (overview)
272
+ -----------------------------
273
+
274
+ The scope of features depends on the connected slave. At the library
275
+ level, ``pyXCP`` provides: - Session management: CONNECT/DISCONNECT,
276
+ GET_STATUS/SLAVE_PROPERTIES, communication mode setup, error handling. -
277
+ Memory access: Upload/short upload, Download/Download Next,
278
+ verifications, optional paged memory where supported. - DAQ/STIM:
279
+ Configuration of DAQ lists/ODTs, event assignment, data streaming,
280
+ timestamp handling when available. - Programming helpers: Building
281
+ blocks for program/erase/write flows (exact sequence per slave’s flash
282
+ algorithm and A2L description). - Security/Seed & Key: Pluggable
283
+ seed‑to‑key resolution including 32↔64‑bit bridge on Windows. -
284
+ Utilities: Identifier scanning, A2L helpers, recorder and converters.
285
+
286
+ Refer to `tutorial <tutorial.rst>`__ and `configuration <configuration.rst>`__ for feature usage,
287
+ and xcp-info for a capability dump of your target.
288
+
289
+ Compliance and versions
290
+ -----------------------
291
+
292
+ ``pyXCP`` aims to be compatible with commonly used parts of ASAM MCD‑1 XCP.
293
+ Specific optional features are enabled when a slave advertises them
294
+ during CONNECT. Because implementations vary across vendors and ECU
295
+ projects, always consult your A2L and use xcp-info to confirm negotiated
296
+ options (e.g., checksum type, timestamp unit, max DTO size, address
297
+ granularity).
298
+
299
+ If you rely on a particular XCP feature/profile not mentioned here,
300
+ please open an issue with details about your slave and A2L so we can
301
+ clarify support and—if feasible—add coverage.
302
+
303
+ Safety, performance, and limitations
304
+ ------------------------------------
305
+
306
+ - Safety‑critical systems: XCP is a development and testing protocol. Do
307
+ not enable measurement/calibration on safety‑critical systems in the
308
+ field unless your system‑level safety case covers it.
309
+ - Performance: Achievable DAQ rates depend on transport bandwidth, ECU
310
+ event rates, DTO sizes, and host processing. Ethernet typically yields
311
+ the highest throughput.
312
+ - Latency/jitter: Event scheduling in the slave and OS scheduling on the
313
+ host can affect determinism. Use timestamps to correlate data
314
+ precisely.
315
+ - Access control: Seed & key protects sensitive functions; your
316
+ organization’s policy should govern algorithm distribution and access.
317
+
318
+ Further resources
319
+ -----------------
320
+
321
+ - ASAM MCD‑1 XCP standard (overview and membership):
322
+ https://www.asam.net/standards/detail/mcd-1-xcp/
323
+ - ASAM MCD‑2 MC (A2L) for object descriptions:
324
+ https://www.asam.net/standards/detail/mcd-2-mc/
325
+ - Introduction to DAQ/STIM concepts (ASAM publications and vendor docs)
326
+ - Related: CCP (legacy predecessor to XCP), ASAM MDF for measurement
327
+ data storage
328
+
329
+ .. |CI| image:: https://github.com/christoph2/pyxcp/workflows/Python%20application/badge.svg
330
+ :target: https://github.com/christoph2/pyxcp/actions
331
+ .. |PyPI| image:: https://img.shields.io/pypi/v/pyxcp.svg
332
+ :target: https://pypi.org/project/pyxcp/
333
+ .. |Python Versions| image:: https://img.shields.io/pypi/pyversions/pyxcp.svg
334
+ :target: https://pypi.org/project/pyxcp/
335
+ .. |License: LGPL v3+| image:: https://img.shields.io/badge/License-LGPL%20v3%2B-blue.svg
336
+ :target: https://www.gnu.org/licenses/lgpl-3.0
337
+ .. |Code style: black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
338
+ :target: https://github.com/psf/black
339
+
@@ -1,19 +1,24 @@
1
+ pyxcp-0.23.7.dist-info/RECORD,,
2
+ pyxcp-0.23.7.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
3
+ pyxcp-0.23.7.dist-info/WHEEL,sha256=LYpYYCEq2c6ymHhOSnJTe4ux3ULYSEUrqCKSUjEORwM,134
4
+ pyxcp-0.23.7.dist-info/entry_points.txt,sha256=LkHsEwubm30s4oiyCy0cKj6k97ALvQ6KjAVdyEcqu7g,358
5
+ pyxcp-0.23.7.dist-info/METADATA,sha256=t_ndqpGCZ0vWyXI2tRS73YMxpWAS1Co6OXGEAXy1IxY,12718
1
6
  pyxcp/dllif.py,sha256=m4e-_dgDLCD6COU5W2LdeYUlib_Xxyxbh977bbS-VAU,3344
2
7
  pyxcp/checksum.py,sha256=aveS0z4vthLXABEFhTqELqFNi7LM6ZzDzq7dD5Xe9oo,11167
3
8
  pyxcp/asamkeydll.sh,sha256=iema12sub6qNE0xAuzwGtx0FmkdaaOKoXalhrtWVaa8,57
4
9
  pyxcp/asamkeydll.c,sha256=l5RHYcEPY_Q07G-W5IjCq0xci8YfUR-3uYt84OOkOJI,2836
5
10
  pyxcp/constants.py,sha256=Yemk_Gi_m78EEU0v-sdGCAodb9dv_vqP969IU3izA2M,1113
6
- pyxcp/cmdline.py,sha256=EoN-_AJm0lz1egPzNcmIFO2Uqo4c0lBXSAB25Uc6N9Q,2441
7
- pyxcp/__init__.py,sha256=IyyaS5_zWWbL0LDLYQGbYeYSk5m5OF7PdDajHj8cq_E,527
11
+ pyxcp/cmdline.py,sha256=OVSO-X6JV1Si2tKZ1ar2gYbiqCTlTaj5jY-z6N2Vk3Q,2453
12
+ pyxcp/__init__.py,sha256=0Lens5crznGTlhKtnOVYewjfcuUNvEEjr3r5kDcYeno,527
8
13
  pyxcp/types.py,sha256=XJxJUh9bK5Urfia8IHVLJ-NFgQACYBd_n73L-AaeZts,25158
9
14
  pyxcp/timing.py,sha256=hzeQZ3P7ij_bfskoVMi10Iv5S4i_6TQYfnB8PXTX6c4,1645
10
- pyxcp/utils.py,sha256=Ax3TNT4OotRdJs_MVz83i7gTinpbOWwPnNVIL9WYTW4,3402
15
+ pyxcp/utils.py,sha256=cHb5RUNim90U1U_a4axRmfa2n_xhFdjqHoRBEODoscs,3404
11
16
  pyxcp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
17
  pyxcp/errormatrix.py,sha256=cYcsJ11Qm39DPuaR4BJ9fMpS3Hkphd_ezIQOKjI-pQE,44586
13
18
  pyxcp/asam/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
19
  pyxcp/asam/types.py,sha256=V4wSCGI1pXn0EsBemDyaHTBgY2wkV_BeLShnDIGGgDE,2310
15
20
  pyxcp/daq_stim/stim.cpp,sha256=sABgEfbQlt5kXbzAsndyhaDFWRWTJw3jJlNfanIVrRs,164
16
- pyxcp/daq_stim/__init__.py,sha256=Lm-FCoXyY6Y51571nAa4OA4LU50NqCYffj_cnryjir4,9299
21
+ pyxcp/daq_stim/__init__.py,sha256=7Lly_Sn2SQljadGyY9pcDqTYNIkw8O_t7GVlCZDL2wQ,12171
17
22
  pyxcp/daq_stim/scheduler.cpp,sha256=2XW9PmxrJR8DfYMVszGwBX-KANVviwPcUNBvnjw5MlM,1443
18
23
  pyxcp/daq_stim/stim.hpp,sha256=1DwAhkY7XJN14aD2BxLJ4O1j4_a6RvpePIbAG1U8iOA,17904
19
24
  pyxcp/daq_stim/stim.cpython-310-darwin.so,sha256=pE7imb11QMYyQv8HTO54EmnJrS5GsocxWJJT5vCPHyw,237784
@@ -22,15 +27,15 @@ pyxcp/daq_stim/stim_wrapper.cpp,sha256=7iL1-4BPavo5bfrph20Fvicn6HxGEZQqYLvdxniJB
22
27
  pyxcp/daq_stim/optimize/__init__.py,sha256=joAKvAvlYQEi7VF2oVftn_ohgRO231wnc3e8fY231L4,2453
23
28
  pyxcp/daq_stim/optimize/binpacking.py,sha256=AZHABtAnzBVJ-MVUGLrxuAp_bAtv3C-gMxrXXXrgi-Y,1216
24
29
  pyxcp/transport/transport_wrapper.cpp,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
- pyxcp/transport/eth.py,sha256=V-jclzloRFz6LczPHmvS_RF1re_CcNQ7xsVBpgv2HNw,8492
30
+ pyxcp/transport/eth.py,sha256=IXq_BB2LP5OguqUzNPZdnMxn0gUOf9gnIdiNGgel204,9771
26
31
  pyxcp/transport/sxi.py,sha256=gbFTOA-O0q0RwZUbRgN3hCdkoutxMt15TgVjVwdvWsY,4625
27
32
  pyxcp/transport/base_transport.hpp,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
33
  pyxcp/transport/__init__.py,sha256=wIeYkGygucYdXEzymJcDvimnwZgqJY8KRv7Mk__aUSU,428
29
34
  pyxcp/transport/usb_transport.py,sha256=27c19S67BMq1Eup6ViX-SiYpEq93bMTwe031RsE4Xm0,8130
30
- pyxcp/transport/can.py,sha256=uFPG_Caf1BwIo2pKheZLs0VfPth1KoEPxuKtI2qt9as,18250
31
- pyxcp/transport/base.py,sha256=_jjoTGEIbzxR5rsBbSmxnlvoUI-Kr4VomWhH58z4RBk,17074
35
+ pyxcp/transport/can.py,sha256=fE0k6GlBt913EVQh3Wpd781cikT5ht7Q8lAiU4En3tc,21283
36
+ pyxcp/transport/base.py,sha256=pq8PwgGb8ex9WC_mDNBFs_qKRZZl8O2pzK1fAjZaIyk,22604
32
37
  pyxcp/config/legacy.py,sha256=Uhu_6bp_W8yGmZ2s3TFzf8-5mGwLdeTss56BMYWpsZY,5100
33
- pyxcp/config/__init__.py,sha256=z9bXNb2Hp-h2ZtASCyGk3JWP3OGoOL5Hmvazl-L_ANE,45258
38
+ pyxcp/config/__init__.py,sha256=rG-HPWJMPbxs6fu4-TpV4Gbctg7Nz9Jmogm6FMPSqlY,48274
34
39
  pyxcp/tests/test_utils.py,sha256=gqv3bhhWfKKdKDkqnELqsOHCfpRRZwlReEy87Ya4Z2w,850
35
40
  pyxcp/tests/test_master.py,sha256=a_Q8Fa49y_3vnrp-VFZ-22cHWjq58RC2daF6EcfbhZc,69434
36
41
  pyxcp/tests/test_daq.py,sha256=mThMsweEwxzIFRQQ88BNz_60OQ-xmC5OamIxHx9VWis,5358
@@ -55,8 +60,8 @@ pyxcp/aml/XCPonUSB.aml,sha256=rPGduH-PE8-tBeELSm3vfkbf62uhlVP6gvJL0OvMclc,4847
55
60
  pyxcp/aml/ifdata_SxI.a2l,sha256=8rAB6HTTAuNlFSrkFpR7fUA702yN4rTTNkw-xspZNV0,303
56
61
  pyxcp/aml/XCPonFlx.aml,sha256=z58FMu6ZF4hVun8WBCuxvDrq6FZ_gj3tZM15G7E8Uvw,4647
57
62
  pyxcp/master/__init__.py,sha256=o3XB9GDwLiqh-KRFC9YTOd0EvxJXDpyrcVxebiwT934,309
58
- pyxcp/master/master.py,sha256=RHw-1OT_dxsAeyChqnimqNRWEDKGP__Mw822D-7lKsY,76388
59
- pyxcp/master/errorhandler.py,sha256=C3T0nvn3L5QCE1AD-7dJp-D16YxfcS2OZOb9SwXySuM,14917
63
+ pyxcp/master/master.py,sha256=oft1aNYqmilFZ00ZI7aO5lPaxXg5-Act6ji23x3bc6U,76980
64
+ pyxcp/master/errorhandler.py,sha256=7EftfxWYqRyXurJEZS8PAyXVHs_e4qV8uWsUOMuE2Ug,19402
60
65
  pyxcp/examples/xcp_read_benchmark.py,sha256=Hl0hrjV3FE-ivswvYOh0MsKiHnk03z7w8lQDYnvfeM8,918
61
66
  pyxcp/examples/conf_eth.toml,sha256=b6bKN-K07gMQHNj7yiyB-HKrkVtZREgPXS4ByQueBs4,190
62
67
  pyxcp/examples/xcphello_recorder.py,sha256=wL92d0dbPkjFzCT08JoRD9Mg2D6QbOpOzFDgSYdcNog,3302
@@ -68,7 +73,7 @@ pyxcp/examples/xcp_user_supplied_driver.py,sha256=Wyep2KhtcFC2GzZuJPj5ikSqWIWYsf
68
73
  pyxcp/examples/xcp_skel.py,sha256=F2g2C79jiYZl0cpRHfzWusfn1ZvodOS_r1Az6aknZL4,1110
69
74
  pyxcp/examples/xcp_unlock.py,sha256=vl2Zv7Z6EuBxI2ZxbGQK6-0tZBVqd72FZllsvIfuJ5w,652
70
75
  pyxcp/examples/xcphello.py,sha256=JK9U_QkFP0AwKlZK9lFB66GAqUDFRoXL3XMYO5EdRQQ,2550
71
- pyxcp/examples/run_daq.py,sha256=JObp9HtjJphwr5sVQ4Jj3Q5GZHGNCK12tYTfR-6qcr4,5461
76
+ pyxcp/examples/run_daq.py,sha256=PMseqJBDnpRofvNQNl619qpJeAaKuzi3HzYuT5zvRN0,5468
72
77
  pyxcp/examples/conf_socket_can.toml,sha256=JB9zHHaya2mDXf0zPY7zEKiBDX2chzBBRxt7h3LxxDk,257
73
78
  pyxcp/examples/conf_sxi.toml,sha256=r81OD0mCLk_h7vrN5MBJk0HFbiWi3bQZtFgFVrW6qcM,118
74
79
  pyxcp/examples/conf_can.toml,sha256=oGkZYgmcpPsJ6YKGELm6DqF-hNvokJHCq99LAqxCyso,351
@@ -87,14 +92,14 @@ pyxcp/recorder/recorder.rst,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
87
92
  pyxcp/recorder/mio.hpp,sha256=emP4qMXTxOe1wRSkB_U0hgOVz4aMUgG5dqcCvNNkAjs,61632
88
93
  pyxcp/recorder/build_gcc.cmd,sha256=A1xt8AS7VZxjJq21VzX8cOT7wl9ap_AIXBWbcIEddCw,237
89
94
  pyxcp/recorder/writer.hpp,sha256=rNjtRTtJes5z-BzKR2K56P_Kvc9MEVQgycu8J0wKf1g,11284
90
- pyxcp/recorder/rekorder.cpython-310-darwin.so,sha256=ibNGz9FIbkRqVm_uypRLTmMYDXk_slTGFX92NGJ_8zo,529952
95
+ pyxcp/recorder/rekorder.cpython-310-darwin.so,sha256=r5_memGnoh681bRzU2tZqk1VRJSxXm1dQLwiktzwXCg,529936
91
96
  pyxcp/recorder/lz4hc.c,sha256=GhoLtpQF6ViHkhQ_TaLw9UCzSB_MO-fdflgjR_xFFfM,86829
92
97
  pyxcp/recorder/lz4.h,sha256=BkRLAtxukE15Z2yO0Pjrq-n6hw5W6jkGFR5f14MzpEU,45604
93
98
  pyxcp/recorder/rekorder.cpp,sha256=LtN3Ud_pigNZ70gJ5-tyFJZN-3PMDVwqbbH694--TxQ,1841
94
- pyxcp/recorder/wrap.cpp,sha256=S3frBevIrPE5m3kt_mXe9TDOwWPJFiVa7Rt9FGMCv2A,8909
99
+ pyxcp/recorder/wrap.cpp,sha256=T4cwpmjhYbr75Q3plQpJTkNLyKE4lL0W7GC-8QSURJ8,8666
95
100
  pyxcp/recorder/build_clang.sh,sha256=TZHpQZbRE6M6vHf_ln5laO9tyREUbMu-HAw0VDGx5yw,179
96
101
  pyxcp/recorder/reader.hpp,sha256=rr9XZ_ciL6eF2_xEqyt9XYNqTIze9ytAsnf8uYukO9U,5201
97
- pyxcp/recorder/__init__.py,sha256=jeTmKvfjIenxHxt7zn6HMjnDpuPQU0d9SdnYK_t3gdE,2850
102
+ pyxcp/recorder/__init__.py,sha256=HA8U6V85vbgZNWyNvJlY8l77YeTO0tHWl3t1v9DvjkQ,2846
98
103
  pyxcp/recorder/test_reko.py,sha256=sIM_BBY9sq1ZUTawoxmDzdtd5qHPT9w6eVYZoY4iFik,980
99
104
  pyxcp/recorder/build_clang.cmd,sha256=vIWwC1zF_WChakjfj8VaUCN6X8HwyqvGgFRdUub1TtE,174
100
105
  pyxcp/recorder/reco.py,sha256=SAO_XMKSBWHhdzxfkmV9ZoPvJjale4BGi8O9p5Sd_iE,8448
@@ -103,7 +108,7 @@ pyxcp/recorder/rekorder.hpp,sha256=sWvRch9bVt6mmgrFHp5mwWhap7HoFG4geeb7UqEIzio,7
103
108
  pyxcp/recorder/lz4hc.h,sha256=U_uN3Q2wIi3_dbEceJ16xHJZGotUiBTcnL6O5ARPi8M,20179
104
109
  pyxcp/recorder/lz4.c,sha256=k5b33lJ7yENd6cdWn7eZjlZUWoS088LYCMAjXAF3RTk,118145
105
110
  pyxcp/recorder/build_gcc.sh,sha256=uvMhL4faEJmhG_8rzSOxEBRRqrACC0kmZgaERN8GkUs,209
106
- pyxcp/recorder/unfolder.hpp,sha256=3gJKT2eMOZuT8o_M2NFLthdUIWd460vdwzlHaf-fQII,47998
111
+ pyxcp/recorder/unfolder.hpp,sha256=jKvjQs8VSVfsYRkLguV97Csde_Xbt8G-tGkuKnbaSqY,48763
107
112
  pyxcp/recorder/converter/__init__.py,sha256=mqzH3jxGpFrtS2dHyfDLCYKeJycav3_-6z8svlI07eU,14452
108
113
  pyxcp/stim/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
109
114
  pyxcp/vector/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -118,8 +123,3 @@ pyxcp/cpp_ext/helper.hpp,sha256=ONAsVupIqqmNDp8bgGWS0TfSYeCFkk3kwwZbbqsh0HQ,7813
118
123
  pyxcp/cpp_ext/bin.hpp,sha256=0CatarJ7jFewlg9EIxsDPxC4wnORHutx-1PLHpf9iqw,2457
119
124
  pyxcp/cpp_ext/daqlist.hpp,sha256=Q1Gejo8i1rP2PzyUh4UHJ2z-kG0WNnkbBj7N8DAdzaM,7071
120
125
  pyxcp/cpp_ext/cpp_ext.cpython-310-darwin.so,sha256=5sPtzwLXzXBbJ2zI2kGk0gF83xnDHvKbt0XasjPfe1c,321520
121
- pyxcp-0.23.4.dist-info/RECORD,,
122
- pyxcp-0.23.4.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
123
- pyxcp-0.23.4.dist-info/WHEEL,sha256=LYpYYCEq2c6ymHhOSnJTe4ux3ULYSEUrqCKSUjEORwM,134
124
- pyxcp-0.23.4.dist-info/entry_points.txt,sha256=LkHsEwubm30s4oiyCy0cKj6k97ALvQ6KjAVdyEcqu7g,358
125
- pyxcp-0.23.4.dist-info/METADATA,sha256=hFSek7Gb_hDy_HhSaLoPqtKp1C8p44CMs9KFdKuge1g,11688
@@ -1,219 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: pyxcp
3
- Version: 0.23.4
4
- Summary: Universal Calibration Protocol for Python
5
- License: LGPLv3
6
- Keywords: automotive,ecu,xcp,asam,autosar
7
- Author: Christoph Schueler
8
- Author-email: cpu.gems@googlemail.com
9
- Requires-Python: >=3.10,<4.0
10
- Classifier: Development Status :: 5 - Production/Stable
11
- Classifier: Intended Audience :: Developers
12
- Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
13
- Classifier: License :: Other/Proprietary License
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.10
16
- Classifier: Programming Language :: Python :: 3.11
17
- Classifier: Programming Language :: Python :: 3.12
18
- Classifier: Programming Language :: Python :: 3.13
19
- Classifier: Programming Language :: Python :: 3.14
20
- Classifier: Topic :: Scientific/Engineering
21
- Classifier: Topic :: Software Development
22
- Requires-Dist: bandit (>=1.7.8,<2.0.0)
23
- Requires-Dist: chardet (>=5.2.0,<6.0.0)
24
- Requires-Dist: construct (>=2.10.68,<3.0.0)
25
- Requires-Dist: line-profiler-pycharm (>=1.1.0,<2.0.0)
26
- Requires-Dist: mako (>=1.2.4,<2.0.0)
27
- Requires-Dist: pyserial (>=3.5,<4.0)
28
- Requires-Dist: python-can (>=4.2.2,<5.0.0)
29
- Requires-Dist: pytz (>=2025.2,<2026.0)
30
- Requires-Dist: pyusb (>=1.2.1,<2.0.0)
31
- Requires-Dist: rich (>=14.0.0,<15.0.0)
32
- Requires-Dist: toml (>=0.10.2,<0.11.0)
33
- Requires-Dist: tomlkit (>=0.13.3,<0.14.0)
34
- Requires-Dist: traitlets (<=5.11.2)
35
- Requires-Dist: uptime (>=3.0.1,<4.0.0)
36
- Project-URL: Homepage, https://github.com/christoph2/pyxcp
37
- Description-Content-Type: text/markdown
38
-
39
- # pyXCP
40
-
41
- Reliable Python tooling for the ASAM MCD‑1 XCP protocol (measurement, calibration, flashing) with multiple transports (CAN, Ethernet, USB, Serial) and handy CLI utilities.
42
-
43
- [![CI](https://github.com/christoph2/pyxcp/workflows/Python%20application/badge.svg)](https://github.com/christoph2/pyxcp/actions)
44
- [![PyPI](https://img.shields.io/pypi/v/pyxcp.svg)](https://pypi.org/project/pyxcp/)
45
- [![Python Versions](https://img.shields.io/pypi/pyversions/pyxcp.svg)](https://pypi.org/project/pyxcp/)
46
- [![License: LGPL v3+](https://img.shields.io/badge/License-LGPL%20v3%2B-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)
47
- [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
48
-
49
- pyXCP is a production-ready Python library for communicating with XCP-enabled devices, most commonly automotive ECUs. Use it to take measurements, adjust parameters (calibration), stream DAQ/STIM, and program devices during development.
50
-
51
- Highlights:
52
- - Transports: Ethernet (TCP/IP), CAN, USB, Serial (SxI)
53
- - Cross‑platform: Windows, Linux, macOS
54
- - Rich CLI tools for common XCP tasks
55
- - Extensible architecture and layered design
56
-
57
- ---
58
-
59
- ## Installation
60
-
61
- The easiest way is from PyPI:
62
-
63
- ```shell
64
- pip install pyxcp
65
- ```
66
-
67
- To install from the main branch:
68
-
69
- ```shell
70
- pip install git+https://github.com/christoph2/pyxcp.git
71
- ```
72
-
73
-
74
- ### Requirements
75
- - Python >= 3.10
76
- - Building from source requires a working C/C++ toolchain (native extensions are used for performance). Wheels are provided for common platforms and Python versions; if a wheel is not available, pip will build from source.
77
- - An XCP slave device (or simulator)
78
-
79
- ## Quick start
80
-
81
- The tutorial walks you through typical tasks end‑to‑end: see docs/tutorial.md.
82
-
83
- Minimal example using the built‑in argument parser and context manager:
84
-
85
- ```python
86
- from pyxcp.cmdline import ArgumentParser
87
-
88
- ap = ArgumentParser(description="pyXCP hello world")
89
-
90
- with ap.run() as x:
91
- x.connect()
92
- identifier = x.identifier(0x01)
93
- print(f"ID: {identifier!r}")
94
- print(x.slaveProperties)
95
- x.disconnect()
96
- ```
97
-
98
- ### Configuration
99
- pyXCP supports a [traitlets](https://github.com/ipython/traitlets)‑based configuration system.
100
- - Recommended Python config example and generator: docs/tutorial.md and docs/configuration.md
101
- - Legacy TOML examples remain available for compatibility.
102
-
103
- ### Command‑line tools
104
- Installed entry points (see pyproject.toml):
105
- - xcp-info — print capabilities and properties
106
- - xcp-id-scanner — scan for slave identifiers
107
- - xcp-fetch-a2l — retrieve A2L from target (if supported)
108
- - xcp-profile — generate/convert config files
109
- - xcp-examples — launch assorted demos/examples
110
- - xmraw-converter — convert recorder .xmraw data
111
- - pyxcp-probe-can-drivers — list available CAN interfaces
112
-
113
- Run any tool with -h for options.
114
-
115
- ## Features
116
- - Multiple transport layers: Ethernet (TCP), CAN, USB, SxI (serial/UART)
117
- - Data Acquisition (DAQ) and Stimulation (STIM)
118
- - Calibration (read/write parameters)
119
- - Flashing/programming workflows
120
- - A2L (ASAM MCD‑2 MC) support
121
- - Recorder utilities and converters (see docs/recorder.md)
122
- - Extensible architecture for custom transports
123
-
124
- ## Documentation
125
- - Getting started tutorial: docs/tutorial.md
126
- - Configuration: docs/configuration.md
127
- - CAN driver setup and troubleshooting: docs/howto_can_driver.md
128
- - Recorder: docs/recorder.md
129
-
130
- To build the Sphinx documentation locally:
131
- 1. Install doc requirements: `pip install -r docs/requirements.txt`
132
- 2. Build: `sphinx-build -b html docs docs/_build/html`
133
- 3. Open `docs/_build/html/index.html`
134
-
135
- ## Compatibility
136
- - Operating systems: Windows, Linux, macOS
137
- - Python: 3.10 - 3.14, CPython wheels where available
138
- - CAN backends: python-can compatible drivers (see docs/howto_can_driver.md)
139
-
140
- ## Contributing
141
- Contributions are welcome! Please:
142
- - Read CODE_OF_CONDUCT.md
143
- - Open an issue or discussion before large changes
144
- - Use [pre-commit](https://github.com/pre-commit/pre-commit) to run linters and tests locally
145
-
146
- ## License
147
- GNU Lesser General Public License v3 or later (LGPLv3+). See LICENSE for details.
148
-
149
- ## References
150
- - ASAM MCD‑1 XCP standard: https://www.asam.net/standards/detail/mcd-1-xcp/
151
-
152
-
153
- ## About ASAM MCD‑1 XCP
154
- XCP (Universal Measurement and Calibration Protocol) is an ASAM standard defining a vendor‑neutral protocol to access internal data of electronic control units (ECUs) for measurement, calibration (parameter tuning), and programming. XCP decouples the protocol from the physical transport, so the same command set can be carried over different buses such as CAN, FlexRay, Ethernet, USB, or Serial.
155
-
156
- - Roles: An XCP Master (this library) communicates with an XCP Slave (your device/ECU or simulator).
157
- - Layered concept: XCP defines an application layer and transport layers. pyXCP implements the application layer and multiple transport bindings.
158
- - Use cases:
159
- - Measurement: Read variables from the ECU in real‑time, including high‑rate DAQ streaming.
160
- - Calibration: Read/write parameters (calibration data) in RAM/flash.
161
- - Programming: Download new program/data to flash (where the slave supports it).
162
-
163
- For the authoritative description, see the ASAM page: https://www.asam.net/standards/detail/mcd-1-xcp/
164
-
165
- ## XCP in a nutshell
166
- - Connect/Session: The master establishes a connection, negotiates capabilities/features, and optionally unlocks protected functions via seed & key.
167
- - Addressing: Memory is accessed via absolute or segment‑relative addresses. Addressing modes are described in the associated A2L file (ASAM MCD‑2 MC), which maps symbolic names to addresses, data types, and conversion rules.
168
- - Events: The slave exposes events (e.g., “1 ms task”, “Combustion cycle”), which trigger DAQ sampling. The master assigns signals (ODTs) to these events for time‑aligned acquisition.
169
- - DAQ/STIM: DAQ = Data Acquisition (slave → master), STIM = Stimulation (master → slave). Both use event‑driven lists for deterministic timing.
170
- - Timestamps: DAQ may carry timestamps from the slave for precise time correlation.
171
- - Security: Access to sensitive commands (e.g., programming, calibration) can be protected by a seed & key algorithm negotiated at runtime.
172
- - Checksums: XCP defines checksum services useful for verifying memory regions (e.g., after flashing).
173
-
174
- ## Relation to A2L (ASAM MCD‑2 MC)
175
- While XCP defines the protocol, the A2L file describes the measurement and calibration objects (characteristics, measurements), data types, conversion rules, and memory layout. In practice, you use pyXCP together with an A2L to:
176
- - Resolve symbolic names to addresses and data types.
177
- - Configure DAQ lists from human‑readable signal names.
178
- - Interpret raw values using the appropriate conversion methods.
179
-
180
- pyXCP provides utilities to fetch A2L data when supported by the slave and to work with A2L‑described objects.
181
- See also [pya2ldb](https://github.com/christoph2/pya2l)!
182
-
183
- ## Transports and addressing
184
- XCP is transport‑agnostic. pyXCP supports multiple transports and addressing schemes:
185
- - CAN (XCP on CAN): Robust and ubiquitous in vehicles; limited payload and bandwidth; suited for many calibration tasks and moderate DAQ rates.
186
- - Ethernet (XCP on TCP/UDP): High bandwidth with low latency; well suited for rich DAQ and programming workflows.
187
- - USB: High throughput for lab setups; requires device support.
188
- - Serial/SxI: Simple point‑to‑point links for embedded targets and simulators.
189
-
190
- The exact capabilities (e.g., max CTO/DTO, checksum types, timestamping) are negotiated at connect time and depend on the slave and transport.
191
-
192
- ## Supported features (overview)
193
- The scope of features depends on the connected slave. At the library level, pyXCP provides:
194
- - Session management: CONNECT/DISCONNECT, GET_STATUS/SLAVE_PROPERTIES, communication mode setup, error handling.
195
- - Memory access: Upload/short upload, Download/Download Next, verifications, optional paged memory where supported.
196
- - DAQ/STIM: Configuration of DAQ lists/ODTs, event assignment, data streaming, timestamp handling when available.
197
- - Programming helpers: Building blocks for program/erase/write flows (exact sequence per slave’s flash algorithm and A2L description).
198
- - Security/Seed & Key: Pluggable seed‑to‑key resolution including 32↔64‑bit bridge on Windows.
199
- - Utilities: Identifier scanning, A2L helpers, recorder and converters.
200
-
201
- Refer to docs/tutorial.md and docs/configuration.md for feature usage, and xcp-info for a capability dump of your target.
202
-
203
- ## Compliance and versions
204
- pyXCP aims to be compatible with commonly used parts of ASAM MCD‑1 XCP. Specific optional features are enabled when a slave advertises them during CONNECT. Because implementations vary across vendors and ECU projects, always consult your A2L and use xcp-info to confirm negotiated options (e.g., checksum type, timestamp unit, max DTO size, address granularity).
205
-
206
- If you rely on a particular XCP feature/profile not mentioned here, please open an issue with details about your slave and A2L so we can clarify support and—if feasible—add coverage.
207
-
208
- ## Safety, performance, and limitations
209
- - Safety‑critical systems: XCP is a development and testing protocol. Do not enable measurement/calibration on safety‑critical systems in the field unless your system‑level safety case covers it.
210
- - Performance: Achievable DAQ rates depend on transport bandwidth, ECU event rates, DTO sizes, and host processing. Ethernet typically yields the highest throughput.
211
- - Latency/jitter: Event scheduling in the slave and OS scheduling on the host can affect determinism. Use timestamps to correlate data precisely.
212
- - Access control: Seed & key protects sensitive functions; your organization’s policy should govern algorithm distribution and access.
213
-
214
- ## Further resources
215
- - ASAM MCD‑1 XCP standard (overview and membership): https://www.asam.net/standards/detail/mcd-1-xcp/
216
- - ASAM MCD‑2 MC (A2L) for object descriptions: https://www.asam.net/standards/detail/mcd-2-mc/
217
- - Introduction to DAQ/STIM concepts (ASAM publications and vendor docs)
218
- - Related: CCP (legacy predecessor to XCP), ASAM MDF for measurement data storage
219
-
File without changes