pyxcp 0.22.28__tar.gz → 0.22.30__tar.gz
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.
- {pyxcp-0.22.28 → pyxcp-0.22.30}/PKG-INFO +1 -1
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyproject.toml +1 -1
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/__init__.py +1 -1
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/master/master.py +3 -4
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/transport/can.py +1 -3
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/utils.py +25 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/CMakeLists.txt +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/LICENSE +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/README.md +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/build_ext.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/aml/EtasCANMonitoring.a2l +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/aml/EtasCANMonitoring.aml +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/aml/XCP_Common.aml +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/aml/XCPonCAN.aml +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/aml/XCPonEth.aml +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/aml/XCPonFlx.aml +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/aml/XCPonSxI.aml +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/aml/XCPonUSB.aml +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/aml/ifdata_CAN.a2l +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/aml/ifdata_Eth.a2l +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/aml/ifdata_Flx.a2l +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/aml/ifdata_SxI.a2l +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/aml/ifdata_USB.a2l +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/asam/__init__.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/asam/types.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/asamkeydll.c +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/asamkeydll.sh +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/checksum.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/cmdline.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/config/__init__.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/config/legacy.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/constants.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/cpp_ext/__init__.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/cpp_ext/bin.hpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/cpp_ext/blockmem.hpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/cpp_ext/daqlist.hpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/cpp_ext/event.hpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/cpp_ext/extension_wrapper.cpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/cpp_ext/helper.hpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/cpp_ext/mcobject.hpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/cpp_ext/tsqueue.hpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/daq_stim/__init__.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/daq_stim/optimize/__init__.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/daq_stim/optimize/binpacking.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/daq_stim/scheduler.cpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/daq_stim/scheduler.hpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/daq_stim/stim.cpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/daq_stim/stim.hpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/daq_stim/stim_wrapper.cpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/dllif.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/errormatrix.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/examples/conf_can.toml +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/examples/conf_can_user.toml +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/examples/conf_can_vector.json +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/examples/conf_can_vector.toml +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/examples/conf_eth.toml +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/examples/conf_nixnet.json +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/examples/conf_socket_can.toml +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/examples/conf_sxi.json +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/examples/conf_sxi.toml +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/examples/run_daq.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/examples/xcp_policy.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/examples/xcp_read_benchmark.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/examples/xcp_skel.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/examples/xcp_unlock.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/examples/xcp_user_supplied_driver.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/examples/xcphello.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/examples/xcphello_recorder.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/master/__init__.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/master/errorhandler.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/py.typed +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/__init__.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/build_clang.cmd +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/build_clang.sh +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/build_gcc.cmd +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/build_gcc.sh +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/build_gcc_arm.sh +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/converter/__init__.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/lz4.c +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/lz4.h +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/lz4hc.c +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/lz4hc.h +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/mio.hpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/reader.hpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/reco.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/recorder.rst +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/rekorder.cpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/rekorder.hpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/setup.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/test_reko.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/unfolder.hpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/wrap.cpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/recorder/writer.hpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/scripts/__init__.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/scripts/pyxcp_probe_can_drivers.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/scripts/xcp_examples.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/scripts/xcp_fetch_a2l.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/scripts/xcp_id_scanner.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/scripts/xcp_info.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/scripts/xcp_profile.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/scripts/xmraw_converter.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/stim/__init__.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/tests/test_asam_types.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/tests/test_binpacking.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/tests/test_can.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/tests/test_checksum.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/tests/test_daq.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/tests/test_frame_padding.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/tests/test_master.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/tests/test_transport.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/tests/test_utils.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/timing.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/transport/__init__.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/transport/base.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/transport/base_transport.hpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/transport/eth.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/transport/sxi.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/transport/transport_wrapper.cpp +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/transport/usb_transport.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/types.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/vector/__init__.py +0 -0
- {pyxcp-0.22.28 → pyxcp-0.22.30}/pyxcp/vector/map.py +0 -0
|
@@ -37,7 +37,7 @@ dynamic = ["license", "readme", "authors", "requires-python", "description", "cl
|
|
|
37
37
|
[tool.poetry]
|
|
38
38
|
authors = ["Christoph Schueler <cpu.gems@googlemail.com>"]
|
|
39
39
|
name = "pyxcp"
|
|
40
|
-
version = "0.22.
|
|
40
|
+
version = "0.22.30"
|
|
41
41
|
readme = "README.md"
|
|
42
42
|
description = "Universal Calibration Protocol for Python"
|
|
43
43
|
keywords = ["automotive", "ecu", "xcp", "asam", "autosar"]
|
|
@@ -113,6 +113,7 @@ class Master:
|
|
|
113
113
|
|
|
114
114
|
def __enter__(self):
|
|
115
115
|
"""Context manager entry part."""
|
|
116
|
+
self.transport.connect()
|
|
116
117
|
return self
|
|
117
118
|
|
|
118
119
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
@@ -171,8 +172,6 @@ class Master:
|
|
|
171
172
|
more attempts to connect are silently ignored.
|
|
172
173
|
|
|
173
174
|
"""
|
|
174
|
-
self.transport.connect()
|
|
175
|
-
|
|
176
175
|
response = self.transport.request(types.Command.CONNECT, mode & 0xFF)
|
|
177
176
|
|
|
178
177
|
# First get byte-order
|
|
@@ -580,10 +579,10 @@ class Master:
|
|
|
580
579
|
result = []
|
|
581
580
|
for _ in chunks:
|
|
582
581
|
data = self.upload(chunk_size)
|
|
583
|
-
result.extend(data)
|
|
582
|
+
result.extend(data[:chunk_size])
|
|
584
583
|
if remaining:
|
|
585
584
|
data = self.upload(remaining)
|
|
586
|
-
result.extend(data)
|
|
585
|
+
result.extend(data[:remaining])
|
|
587
586
|
return bytes(result)
|
|
588
587
|
|
|
589
588
|
pull = fetch # fetch() may be completely replaced by pull() someday.
|
|
@@ -351,13 +351,11 @@ class Can(BaseTransport):
|
|
|
351
351
|
result[n] = value
|
|
352
352
|
elif value is not None:
|
|
353
353
|
self.logger.warning(f"XCPonCAN - {self.interface_name!r} has no support for parameter {n!r}.")
|
|
354
|
-
|
|
355
354
|
# Parameter names that need to be mapped.
|
|
356
355
|
for base_name, name in can_interface_config_class.CAN_PARAM_MAP.items():
|
|
357
356
|
value = getattr(self.config, base_name)
|
|
358
|
-
if value is not None:
|
|
357
|
+
if name is not None and value is not None:
|
|
359
358
|
result[name] = value
|
|
360
|
-
|
|
361
359
|
# Interface specific parameters.
|
|
362
360
|
cxx = getattr(self.config, self.interface_name)
|
|
363
361
|
for name in can_interface_config_class.class_own_traits().keys():
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
import datetime
|
|
3
|
+
from enum import IntEnum
|
|
3
4
|
import functools
|
|
4
5
|
import operator
|
|
5
6
|
import sys
|
|
@@ -100,3 +101,27 @@ class CurrentDatetime(TimestampInfo):
|
|
|
100
101
|
utc_offset={self.utc_offset},
|
|
101
102
|
dst_offset={self.dst_offset}
|
|
102
103
|
)"""
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def enum_from_str(enum_class: IntEnum, enumerator: str) -> IntEnum:
|
|
107
|
+
"""Create an `IntEnum` instance from an enumerator `str`.
|
|
108
|
+
|
|
109
|
+
Parameters
|
|
110
|
+
----------
|
|
111
|
+
enum_class: IntEnum
|
|
112
|
+
|
|
113
|
+
enumerator: str
|
|
114
|
+
|
|
115
|
+
Example
|
|
116
|
+
-------
|
|
117
|
+
|
|
118
|
+
class Color(enum.IntEnum):
|
|
119
|
+
RED = 0
|
|
120
|
+
GREEN = 1
|
|
121
|
+
BLUE = 2
|
|
122
|
+
|
|
123
|
+
color: Color = enum_from_str(Color, "GREEN")
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
"""
|
|
127
|
+
return enum_class(enum_class.__members__.get(enumerator))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|