pyxcp 0.22.11__tar.gz → 0.22.12__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.

Files changed (126) hide show
  1. {pyxcp-0.22.11 → pyxcp-0.22.12}/PKG-INFO +1 -1
  2. {pyxcp-0.22.11 → pyxcp-0.22.12}/build_ext.py +12 -2
  3. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyproject.toml +1 -1
  4. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/__init__.py +1 -1
  5. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/config/__init__.py +1 -1
  6. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/reader.hpp +2 -2
  7. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/unfolder.hpp +4 -4
  8. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/transport/base.py +8 -4
  9. {pyxcp-0.22.11 → pyxcp-0.22.12}/CMakeLists.txt +0 -0
  10. {pyxcp-0.22.11 → pyxcp-0.22.12}/LICENSE +0 -0
  11. {pyxcp-0.22.11 → pyxcp-0.22.12}/README.md +0 -0
  12. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/aml/EtasCANMonitoring.a2l +0 -0
  13. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/aml/EtasCANMonitoring.aml +0 -0
  14. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/aml/XCP_Common.aml +0 -0
  15. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/aml/XCPonCAN.aml +0 -0
  16. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/aml/XCPonEth.aml +0 -0
  17. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/aml/XCPonFlx.aml +0 -0
  18. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/aml/XCPonSxI.aml +0 -0
  19. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/aml/XCPonUSB.aml +0 -0
  20. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/aml/ifdata_CAN.a2l +0 -0
  21. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/aml/ifdata_Eth.a2l +0 -0
  22. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/aml/ifdata_Flx.a2l +0 -0
  23. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/aml/ifdata_SxI.a2l +0 -0
  24. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/aml/ifdata_USB.a2l +0 -0
  25. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/asam/__init__.py +0 -0
  26. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/asam/types.py +0 -0
  27. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/asamkeydll.c +0 -0
  28. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/asamkeydll.sh +0 -0
  29. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/checksum.py +0 -0
  30. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/cmdline.py +0 -0
  31. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/config/legacy.py +0 -0
  32. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/constants.py +0 -0
  33. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/cpp_ext/__init__.py +0 -0
  34. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/cpp_ext/bin.hpp +0 -0
  35. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/cpp_ext/blockmem.hpp +0 -0
  36. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/cpp_ext/daqlist.hpp +0 -0
  37. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/cpp_ext/event.hpp +0 -0
  38. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/cpp_ext/extension_wrapper.cpp +0 -0
  39. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/cpp_ext/helper.hpp +0 -0
  40. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/cpp_ext/mcobject.hpp +0 -0
  41. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/cpp_ext/tsqueue.hpp +0 -0
  42. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/daq_stim/__init__.py +0 -0
  43. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/daq_stim/optimize/__init__.py +0 -0
  44. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/daq_stim/optimize/binpacking.py +0 -0
  45. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/daq_stim/scheduler.cpp +0 -0
  46. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/daq_stim/scheduler.hpp +0 -0
  47. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/daq_stim/stim.cpp +0 -0
  48. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/daq_stim/stim.hpp +0 -0
  49. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/daq_stim/stim_wrapper.cpp +0 -0
  50. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/dllif.py +0 -0
  51. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/errormatrix.py +0 -0
  52. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/conf_can.toml +0 -0
  53. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/conf_can_user.toml +0 -0
  54. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/conf_can_vector.json +0 -0
  55. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/conf_can_vector.toml +0 -0
  56. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/conf_eth.toml +0 -0
  57. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/conf_nixnet.json +0 -0
  58. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/conf_socket_can.toml +0 -0
  59. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/conf_sxi.json +0 -0
  60. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/conf_sxi.toml +0 -0
  61. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/ex_arrow.py +0 -0
  62. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/ex_csv.py +0 -0
  63. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/ex_excel.py +0 -0
  64. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/ex_mdf.py +0 -0
  65. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/ex_sqlite.py +0 -0
  66. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/run_daq.py +0 -0
  67. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/xcp_policy.py +0 -0
  68. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/xcp_read_benchmark.py +0 -0
  69. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/xcp_skel.py +0 -0
  70. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/xcp_unlock.py +0 -0
  71. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/xcp_user_supplied_driver.py +0 -0
  72. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/xcphello.py +0 -0
  73. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/examples/xcphello_recorder.py +0 -0
  74. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/master/__init__.py +0 -0
  75. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/master/errorhandler.py +0 -0
  76. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/master/master.py +0 -0
  77. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/py.typed +0 -0
  78. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/__init__.py +0 -0
  79. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/build_clang.cmd +0 -0
  80. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/build_clang.sh +0 -0
  81. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/build_gcc.cmd +0 -0
  82. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/build_gcc.sh +0 -0
  83. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/build_gcc_arm.sh +0 -0
  84. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/converter/__init__.py +0 -0
  85. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/lz4.c +0 -0
  86. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/lz4.h +0 -0
  87. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/lz4hc.c +0 -0
  88. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/lz4hc.h +0 -0
  89. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/mio.hpp +0 -0
  90. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/reco.py +0 -0
  91. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/recorder.rst +0 -0
  92. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/rekorder.cpp +0 -0
  93. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/rekorder.hpp +0 -0
  94. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/setup.py +0 -0
  95. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/test_reko.py +0 -0
  96. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/wrap.cpp +0 -0
  97. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/recorder/writer.hpp +0 -0
  98. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/scripts/__init__.py +0 -0
  99. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/scripts/pyxcp_probe_can_drivers.py +0 -0
  100. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/scripts/xcp_examples.py +0 -0
  101. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/scripts/xcp_fetch_a2l.py +0 -0
  102. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/scripts/xcp_id_scanner.py +0 -0
  103. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/scripts/xcp_info.py +0 -0
  104. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/scripts/xcp_profile.py +0 -0
  105. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/stim/__init__.py +0 -0
  106. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/tests/test_asam_types.py +0 -0
  107. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/tests/test_binpacking.py +0 -0
  108. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/tests/test_can.py +0 -0
  109. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/tests/test_checksum.py +0 -0
  110. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/tests/test_daq.py +0 -0
  111. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/tests/test_frame_padding.py +0 -0
  112. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/tests/test_master.py +0 -0
  113. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/tests/test_transport.py +0 -0
  114. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/tests/test_utils.py +0 -0
  115. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/timing.py +0 -0
  116. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/transport/__init__.py +0 -0
  117. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/transport/base_transport.hpp +0 -0
  118. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/transport/can.py +0 -0
  119. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/transport/eth.py +0 -0
  120. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/transport/sxi.py +0 -0
  121. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/transport/transport_wrapper.cpp +0 -0
  122. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/transport/usb_transport.py +0 -0
  123. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/types.py +0 -0
  124. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/utils.py +0 -0
  125. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/vector/__init__.py +0 -0
  126. {pyxcp-0.22.11 → pyxcp-0.22.12}/pyxcp/vector/map.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyxcp
3
- Version: 0.22.11
3
+ Version: 0.22.12
4
4
  Summary: Universal Calibration Protocol for Python
5
5
  Home-page: https://github.com/christoph2/pyxcp
6
6
  License: LGPLv3
@@ -92,10 +92,20 @@ def banner(msg: str) -> None:
92
92
  print("=" * 80)
93
93
 
94
94
 
95
+ def get_env_int(name: str, default: int = 0) -> int:
96
+ return int(os.environ.get(name, default))
97
+
98
+
99
+ def get_env_bool(name: str, default: int = 0) -> bool:
100
+ return get_env_int(name, default)
101
+
102
+
95
103
  def build_extension(debug: bool = False, use_temp_dir: bool = False) -> None:
96
104
  print("build_ext::build_extension()")
97
105
 
98
- debug = bool(os.environ.get("DEBUG", 0)) or debug
106
+ use_temp_dir = use_temp_dir or get_env_bool("BUILD_TEMP")
107
+ debug = debug or get_env_bool("BUILD_DEBUG")
108
+
99
109
  cfg = "Debug" if debug else "Release"
100
110
  print(f" BUILD-TYPE: {cfg!r}")
101
111
 
@@ -144,4 +154,4 @@ def build_extension(debug: bool = False, use_temp_dir: bool = False) -> None:
144
154
  if __name__ == "__main__":
145
155
  includes = subprocess.getoutput("pybind11-config --cmakedir") # nosec
146
156
  os.environ["pybind11_DIR"] = includes
147
- build_extension(False)
157
+ build_extension()
@@ -36,7 +36,7 @@ dynamic = ["license", "readme", "authors", "requires-python", "description", "cl
36
36
  [tool.poetry]
37
37
  authors = ["Christoph Schueler <cpu.gems@googlemail.com>"]
38
38
  name = "pyxcp"
39
- version = "0.22.11"
39
+ version = "0.22.12"
40
40
  readme = "README.md"
41
41
  description = "Universal Calibration Protocol for Python"
42
42
  keywords = ["automotive", "ecu", "xcp", "asam", "autosar"]
@@ -17,4 +17,4 @@ tb_install(show_locals=True, max_frames=3) # Install custom exception handler.
17
17
 
18
18
  # if you update this manually, do not forget to update
19
19
  # .bumpversion.cfg and pyproject.toml.
20
- __version__ = "0.22.11"
20
+ __version__ = "0.22.12"
@@ -932,11 +932,11 @@ class PyXCP(Application):
932
932
  self.subapp.start()
933
933
  exit(2)
934
934
  else:
935
- self._read_configuration(self.config_file)
936
935
  if logging.getLogger().hasHandlers():
937
936
  self.log = logging.getLogger()
938
937
  else:
939
938
  self._setup_logger()
939
+ self._read_configuration(self.config_file)
940
940
 
941
941
  def _setup_logger(self):
942
942
  from pyxcp.types import Command
@@ -33,11 +33,11 @@ class XcpLogFileReader {
33
33
  if (detail::VERSION != m_header.version) {
34
34
  throw std::runtime_error("File version mismatch.");
35
35
  }
36
-
36
+ #if 0
37
37
  if (m_header.num_containers < 1) {
38
38
  throw std::runtime_error("At least one container required.");
39
39
  }
40
-
40
+ #endif
41
41
  m_offset += detail::FILE_HEADER_SIZE;
42
42
 
43
43
  if ((m_header.options & XMRAW_HAS_METADATA) == XMRAW_HAS_METADATA) {
@@ -640,9 +640,11 @@ struct MeasurementParameters {
640
640
 
641
641
  #undef max // Thanks to Windows.
642
642
 
643
- auto get_overflow_value() const {
643
+ auto get_overflow_value() const -> std::uint64_t {
644
644
  std::uint64_t ov_value{};
645
645
  switch (m_ts_size) {
646
+ case 0:
647
+ return 0ULL;
646
648
  case 1:
647
649
  ov_value = std::numeric_limits<std::uint8_t>::max();
648
650
  break;
@@ -659,9 +661,7 @@ struct MeasurementParameters {
659
661
  throw std::runtime_error("Invalid timestamp size");
660
662
  }
661
663
  ov_value++;
662
- std::cout << "TS-V: " << ov_value << " scale: " << m_ts_scale_factor << std::endl;
663
664
  ov_value = static_cast<std::uint64_t>(ov_value * m_ts_scale_factor);
664
- std::cout << "OVRF-Value: " << ov_value << std::endl;
665
665
  return ov_value;
666
666
  }
667
667
 
@@ -1080,7 +1080,7 @@ class DAQPolicyBase {
1080
1080
  virtual void set_parameters(const MeasurementParameters& params) noexcept {
1081
1081
  m_overflow_value = params.get_overflow_value();
1082
1082
  m_overflow_counter = 0ULL;
1083
- std::cout << "Overflow value: " << m_overflow_value << ", Overflow counter: " << m_overflow_counter << std::endl;
1083
+ // std::cout << "Overflow value: " << m_overflow_value << ", Overflow counter: " << m_overflow_counter << std::endl;
1084
1084
  initialize();
1085
1085
  }
1086
1086
 
@@ -82,10 +82,9 @@ class LegacyFrameAcquisitionPolicy(FrameAcquisitionPolicy):
82
82
  }
83
83
 
84
84
  def feed(self, frame_type: types.FrameCategory, counter: int, timestamp: int, payload: bytes) -> None:
85
- # print(f"{frame_type.name:8} {counter:6} {timestamp:7.7f} {hexDump(payload)}")
86
85
  if frame_type not in self.filtered_out:
87
86
  queue = self.QUEUE_MAP.get(frame_type)
88
- if queue:
87
+ if queue is not None:
89
88
  queue.append((counter, timestamp, payload))
90
89
 
91
90
 
@@ -118,7 +117,7 @@ class StdoutPolicy(FrameAcquisitionPolicy):
118
117
 
119
118
  def feed(self, frame_type: types.FrameCategory, counter: int, timestamp: int, payload: bytes) -> None:
120
119
  if frame_type not in self.filtered_out:
121
- print(f"{frame_type.name:8} {counter:6} {timestamp:8u} {hexDump(payload)}")
120
+ print(f"{frame_type.name:8} {counter:6} {timestamp:8d} {hexDump(payload)}")
122
121
 
123
122
 
124
123
  class EmptyFrameError(Exception):
@@ -210,7 +209,12 @@ class BaseTransport(metaclass=abc.ABCMeta):
210
209
 
211
210
  @property
212
211
  def start_datetime(self) -> int:
213
- """"""
212
+ """datetime of program start.
213
+
214
+ Returns
215
+ -------
216
+ int
217
+ """
214
218
  return self._start_datetime
215
219
 
216
220
  def start_listener(self):
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