pyxcp 0.21.11__tar.gz → 0.22.2__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 (199) hide show
  1. pyxcp-0.22.2/CMakeLists.txt +123 -0
  2. {pyxcp-0.21.11 → pyxcp-0.22.2}/PKG-INFO +27 -10
  3. {pyxcp-0.21.11 → pyxcp-0.22.2}/README.md +4 -3
  4. pyxcp-0.22.2/build_ext.py +121 -0
  5. pyxcp-0.22.2/pyproject.toml +208 -0
  6. pyxcp-0.22.2/pyxcp/__init__.py +20 -0
  7. pyxcp-0.22.2/pyxcp/aml/EtasCANMonitoring.a2l +82 -0
  8. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/aml/XCP_Common.aml +0 -1
  9. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/aml/XCPonUSB.aml +1 -1
  10. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/aml/ifdata_CAN.a2l +0 -1
  11. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/aml/ifdata_Eth.a2l +0 -1
  12. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/aml/ifdata_Flx.a2l +0 -1
  13. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/aml/ifdata_SxI.a2l +0 -1
  14. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/aml/ifdata_USB.a2l +0 -1
  15. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/asam/types.py +4 -4
  16. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/asamkeydll.c +0 -1
  17. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/checksum.py +0 -1
  18. pyxcp-0.22.2/pyxcp/cmdline.py +52 -0
  19. pyxcp-0.22.2/pyxcp/config/__init__.py +1089 -0
  20. pyxcp-0.22.2/pyxcp/config/legacy.py +120 -0
  21. pyxcp-0.22.2/pyxcp/constants.py +47 -0
  22. pyxcp-0.22.2/pyxcp/cpp_ext/__init__.py +8 -0
  23. pyxcp-0.22.2/pyxcp/cpp_ext/bin.hpp +104 -0
  24. pyxcp-0.22.2/pyxcp/cpp_ext/blockmem.hpp +58 -0
  25. pyxcp-0.22.2/pyxcp/cpp_ext/daqlist.hpp +197 -0
  26. pyxcp-0.22.2/pyxcp/cpp_ext/event.hpp +67 -0
  27. pyxcp-0.22.2/pyxcp/cpp_ext/extension_wrapper.cpp +94 -0
  28. pyxcp-0.22.2/pyxcp/cpp_ext/helper.hpp +264 -0
  29. pyxcp-0.22.2/pyxcp/cpp_ext/mcobject.hpp +241 -0
  30. pyxcp-0.22.2/pyxcp/cpp_ext/tsqueue.hpp +46 -0
  31. pyxcp-0.22.2/pyxcp/daq_stim/__init__.py +226 -0
  32. pyxcp-0.22.2/pyxcp/daq_stim/optimize/__init__.py +67 -0
  33. pyxcp-0.22.2/pyxcp/daq_stim/optimize/binpacking.py +41 -0
  34. pyxcp-0.22.2/pyxcp/daq_stim/scheduler.cpp +28 -0
  35. pyxcp-0.22.2/pyxcp/daq_stim/scheduler.hpp +75 -0
  36. pyxcp-0.22.2/pyxcp/daq_stim/stim.cpp +13 -0
  37. pyxcp-0.22.2/pyxcp/daq_stim/stim.hpp +604 -0
  38. pyxcp-0.22.2/pyxcp/daq_stim/stim_wrapper.cpp +48 -0
  39. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/dllif.py +21 -18
  40. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/errormatrix.py +5 -3
  41. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/examples/conf_can.toml +4 -2
  42. pyxcp-0.22.2/pyxcp/examples/conf_can_vector.json +11 -0
  43. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/examples/conf_can_vector.toml +4 -2
  44. pyxcp-0.22.2/pyxcp/examples/conf_eth.toml +9 -0
  45. pyxcp-0.22.2/pyxcp/examples/conf_nixnet.json +20 -0
  46. pyxcp-0.22.2/pyxcp/examples/conf_sxi.json +9 -0
  47. pyxcp-0.22.2/pyxcp/examples/ex_arrow.py +109 -0
  48. pyxcp-0.22.2/pyxcp/examples/ex_mdf.py +124 -0
  49. pyxcp-0.22.2/pyxcp/examples/ex_sqlite.py +128 -0
  50. pyxcp-0.22.2/pyxcp/examples/run_daq.py +146 -0
  51. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/examples/xcp_policy.py +6 -7
  52. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/examples/xcp_read_benchmark.py +8 -6
  53. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/examples/xcp_skel.py +0 -2
  54. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/examples/xcp_unlock.py +1 -1
  55. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/examples/xcp_user_supplied_driver.py +1 -2
  56. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/examples/xcphello.py +6 -3
  57. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/examples/xcphello_recorder.py +4 -4
  58. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/master/__init__.py +1 -2
  59. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/master/errorhandler.py +107 -74
  60. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/master/master.py +156 -117
  61. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/recorder/__init__.py +27 -6
  62. pyxcp-0.22.2/pyxcp/recorder/converter/__init__.py +37 -0
  63. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/recorder/lz4.c +129 -51
  64. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/recorder/lz4.h +45 -28
  65. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/recorder/lz4hc.c +560 -156
  66. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/recorder/lz4hc.h +1 -1
  67. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/recorder/mio.hpp +721 -767
  68. pyxcp-0.22.2/pyxcp/recorder/reader.hpp +139 -0
  69. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/recorder/reco.py +5 -8
  70. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/recorder/rekorder.cpp +18 -22
  71. pyxcp-0.22.2/pyxcp/recorder/rekorder.hpp +274 -0
  72. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/recorder/setup.py +11 -10
  73. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/recorder/test_reko.py +2 -3
  74. pyxcp-0.22.2/pyxcp/recorder/unfolder.hpp +1249 -0
  75. pyxcp-0.22.2/pyxcp/recorder/wrap.cpp +189 -0
  76. pyxcp-0.22.2/pyxcp/recorder/writer.hpp +302 -0
  77. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/scripts/pyxcp_probe_can_drivers.py +0 -2
  78. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/scripts/xcp_fetch_a2l.py +15 -10
  79. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/scripts/xcp_id_scanner.py +2 -6
  80. pyxcp-0.22.2/pyxcp/scripts/xcp_info.py +109 -0
  81. pyxcp-0.22.2/pyxcp/scripts/xcp_profile.py +27 -0
  82. pyxcp-0.22.2/pyxcp/stim/__init__.py +0 -0
  83. pyxcp-0.22.2/pyxcp/tests/test_binpacking.py +184 -0
  84. pyxcp-0.22.2/pyxcp/tests/test_can.py +1324 -0
  85. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/tests/test_checksum.py +2 -1
  86. pyxcp-0.22.2/pyxcp/tests/test_daq.py +188 -0
  87. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/tests/test_frame_padding.py +3 -3
  88. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/tests/test_master.py +42 -31
  89. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/tests/test_transport.py +12 -12
  90. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/tests/test_utils.py +2 -5
  91. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/timing.py +0 -2
  92. pyxcp-0.22.2/pyxcp/transport/__init__.py +10 -0
  93. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/transport/base.py +142 -124
  94. pyxcp-0.22.2/pyxcp/transport/base_transport.hpp +0 -0
  95. pyxcp-0.22.2/pyxcp/transport/can.py +443 -0
  96. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/transport/eth.py +80 -82
  97. pyxcp-0.22.2/pyxcp/transport/sxi.py +133 -0
  98. pyxcp-0.22.2/pyxcp/transport/transport_wrapper.cpp +0 -0
  99. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/transport/usb_transport.py +65 -83
  100. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/types.py +61 -20
  101. pyxcp-0.22.2/pyxcp/utils.py +102 -0
  102. pyxcp-0.22.2/pyxcp/vector/__init__.py +0 -0
  103. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/vector/map.py +1 -3
  104. pyxcp-0.21.11/build_ext.py +0 -42
  105. pyxcp-0.21.11/pyproject.toml +0 -138
  106. pyxcp-0.21.11/pyxcp/__init__.py +0 -28
  107. pyxcp-0.21.11/pyxcp/aml/EtasCANMonitoring.a2l +0 -83
  108. pyxcp-0.21.11/pyxcp/cmdline.py +0 -75
  109. pyxcp-0.21.11/pyxcp/config.py +0 -57
  110. pyxcp-0.21.11/pyxcp/constants.py +0 -48
  111. pyxcp-0.21.11/pyxcp/cxx/asynchiofactory.hpp +0 -24
  112. pyxcp-0.21.11/pyxcp/cxx/blocking_client.cpp +0 -44
  113. pyxcp-0.21.11/pyxcp/cxx/blocking_socket.cpp +0 -43
  114. pyxcp-0.21.11/pyxcp/cxx/blocking_socket.hpp +0 -558
  115. pyxcp-0.21.11/pyxcp/cxx/concurrent_queue.hpp +0 -60
  116. pyxcp-0.21.11/pyxcp/cxx/eth.hpp +0 -57
  117. pyxcp-0.21.11/pyxcp/cxx/exceptions.hpp +0 -30
  118. pyxcp-0.21.11/pyxcp/cxx/iasyncioservice.hpp +0 -31
  119. pyxcp-0.21.11/pyxcp/cxx/iresource.hpp +0 -17
  120. pyxcp-0.21.11/pyxcp/cxx/isocket.hpp +0 -22
  121. pyxcp-0.21.11/pyxcp/cxx/linux/epoll.cpp +0 -51
  122. pyxcp-0.21.11/pyxcp/cxx/linux/epoll.hpp +0 -87
  123. pyxcp-0.21.11/pyxcp/cxx/linux/lit_tester.cpp +0 -19
  124. pyxcp-0.21.11/pyxcp/cxx/linux/socket.hpp +0 -234
  125. pyxcp-0.21.11/pyxcp/cxx/linux/timeout.hpp +0 -81
  126. pyxcp-0.21.11/pyxcp/cxx/memoryblock.hpp +0 -42
  127. pyxcp-0.21.11/pyxcp/cxx/pool.hpp +0 -81
  128. pyxcp-0.21.11/pyxcp/cxx/poolmgr.cpp +0 -6
  129. pyxcp-0.21.11/pyxcp/cxx/poolmgr.hpp +0 -31
  130. pyxcp-0.21.11/pyxcp/cxx/test_queue.cpp +0 -69
  131. pyxcp-0.21.11/pyxcp/cxx/timestamp.hpp +0 -84
  132. pyxcp-0.21.11/pyxcp/cxx/utils.cpp +0 -38
  133. pyxcp-0.21.11/pyxcp/cxx/utils.hpp +0 -29
  134. pyxcp-0.21.11/pyxcp/cxx/win/iocp.cpp +0 -242
  135. pyxcp-0.21.11/pyxcp/cxx/win/iocp.hpp +0 -42
  136. pyxcp-0.21.11/pyxcp/cxx/win/perhandledata.hpp +0 -24
  137. pyxcp-0.21.11/pyxcp/cxx/win/periodata.hpp +0 -97
  138. pyxcp-0.21.11/pyxcp/cxx/win/socket.hpp +0 -185
  139. pyxcp-0.21.11/pyxcp/cxx/win/timeout.hpp +0 -83
  140. pyxcp-0.21.11/pyxcp/examples/conf_can.json +0 -20
  141. pyxcp-0.21.11/pyxcp/examples/conf_can_vector.json +0 -11
  142. pyxcp-0.21.11/pyxcp/examples/conf_eth.json +0 -8
  143. pyxcp-0.21.11/pyxcp/examples/conf_eth.toml +0 -6
  144. pyxcp-0.21.11/pyxcp/examples/conf_nixnet.json +0 -20
  145. pyxcp-0.21.11/pyxcp/examples/conf_sxi.json +0 -9
  146. pyxcp-0.21.11/pyxcp/logger.py +0 -64
  147. pyxcp-0.21.11/pyxcp/recorder/rekorder.hpp +0 -661
  148. pyxcp-0.21.11/pyxcp/recorder/wrap.cpp +0 -27
  149. pyxcp-0.21.11/pyxcp/scripts/xcp_info.py +0 -89
  150. pyxcp-0.21.11/pyxcp/tests/test_can.py +0 -230
  151. pyxcp-0.21.11/pyxcp/tests/test_config.py +0 -62
  152. pyxcp-0.21.11/pyxcp/transport/__init__.py +0 -10
  153. pyxcp-0.21.11/pyxcp/transport/can.py +0 -416
  154. pyxcp-0.21.11/pyxcp/transport/candriver/__init__.py +0 -2
  155. pyxcp-0.21.11/pyxcp/transport/candriver/pc_canalystii.py +0 -27
  156. pyxcp-0.21.11/pyxcp/transport/candriver/pc_etas.py +0 -25
  157. pyxcp-0.21.11/pyxcp/transport/candriver/pc_gsusb.py +0 -23
  158. pyxcp-0.21.11/pyxcp/transport/candriver/pc_iscan.py +0 -23
  159. pyxcp-0.21.11/pyxcp/transport/candriver/pc_ixxat.py +0 -27
  160. pyxcp-0.21.11/pyxcp/transport/candriver/pc_kvaser.py +0 -39
  161. pyxcp-0.21.11/pyxcp/transport/candriver/pc_neovi.py +0 -31
  162. pyxcp-0.21.11/pyxcp/transport/candriver/pc_nican.py +0 -23
  163. pyxcp-0.21.11/pyxcp/transport/candriver/pc_nixnet.py +0 -23
  164. pyxcp-0.21.11/pyxcp/transport/candriver/pc_pcan.py +0 -25
  165. pyxcp-0.21.11/pyxcp/transport/candriver/pc_seeed.py +0 -28
  166. pyxcp-0.21.11/pyxcp/transport/candriver/pc_serial.py +0 -27
  167. pyxcp-0.21.11/pyxcp/transport/candriver/pc_slcan.py +0 -29
  168. pyxcp-0.21.11/pyxcp/transport/candriver/pc_socketcan.py +0 -23
  169. pyxcp-0.21.11/pyxcp/transport/candriver/pc_systec.py +0 -29
  170. pyxcp-0.21.11/pyxcp/transport/candriver/pc_usb2can.py +0 -30
  171. pyxcp-0.21.11/pyxcp/transport/candriver/pc_vector.py +0 -34
  172. pyxcp-0.21.11/pyxcp/transport/candriver/python_can.py +0 -101
  173. pyxcp-0.21.11/pyxcp/transport/cxx_ext/CMakeLists.txt +0 -51
  174. pyxcp-0.21.11/pyxcp/transport/cxx_ext/setup.py +0 -49
  175. pyxcp-0.21.11/pyxcp/transport/cxx_ext/tests/test_basic_socket.cpp +0 -39
  176. pyxcp-0.21.11/pyxcp/transport/cxx_ext/tests/test_pool.cpp +0 -39
  177. pyxcp-0.21.11/pyxcp/transport/cxx_ext/tests/test_timestamp.cpp +0 -27
  178. pyxcp-0.21.11/pyxcp/transport/sxi.py +0 -87
  179. pyxcp-0.21.11/pyxcp/utils.py +0 -71
  180. {pyxcp-0.21.11 → pyxcp-0.22.2}/LICENSE +0 -0
  181. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/aml/EtasCANMonitoring.aml +0 -0
  182. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/aml/XCPonCAN.aml +0 -0
  183. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/aml/XCPonEth.aml +0 -0
  184. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/aml/XCPonFlx.aml +0 -0
  185. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/aml/XCPonSxI.aml +0 -0
  186. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/asam/__init__.py +0 -0
  187. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/asamkeydll.sh +0 -0
  188. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/examples/conf_can_user.toml +0 -0
  189. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/examples/conf_socket_can.toml +0 -0
  190. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/examples/conf_sxi.toml +0 -0
  191. pyxcp-0.21.11/pyxcp/recorder/recorder.rst → pyxcp-0.22.2/pyxcp/py.typed +0 -0
  192. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/recorder/build_clang.cmd +0 -0
  193. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/recorder/build_clang.sh +0 -0
  194. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/recorder/build_gcc.cmd +0 -0
  195. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/recorder/build_gcc.sh +0 -0
  196. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/recorder/build_gcc_arm.sh +0 -0
  197. pyxcp-0.21.11/pyxcp/scripts/__init__.py → pyxcp-0.22.2/pyxcp/recorder/recorder.rst +0 -0
  198. {pyxcp-0.21.11/pyxcp/vector → pyxcp-0.22.2/pyxcp/scripts}/__init__.py +0 -0
  199. {pyxcp-0.21.11 → pyxcp-0.22.2}/pyxcp/tests/test_asam_types.py +2 -2
@@ -0,0 +1,123 @@
1
+
2
+ cmake_minimum_required(VERSION 3.20...3.30)
3
+ project(pyxcp_extensions LANGUAGES C CXX)
4
+
5
+ cmake_policy(SET CMP0135 NEW)
6
+ cmake_policy(SET CMP0094 NEW)
7
+
8
+ find_package(Python3 COMPONENTS Interpreter Development)
9
+ find_package(pybind11 CONFIG)
10
+
11
+ SET(CMAKE_C_STANDARD 17)
12
+ set(CMAKE_CXX_STANDARD 23)
13
+
14
+ message( STATUS "Found pybind11 v${pybind11_VERSION} ${pybind11_VERSION_TYPE}: ${pybind11_INCLUDE_DIRS}")
15
+
16
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/dist")
17
+
18
+
19
+ SET(GCC_N_CLANG_BASE_OPTIONS "-std=c++23 -Wall -Wextra -Wpedantic -Warray-bounds -mtune=native -fexceptions")
20
+
21
+ SET(MSVC_BASE_OPTIONS "/W3 /permissive- /EHsc /bigobj /Zc:__cplusplus /std:c++latest")
22
+
23
+
24
+
25
+ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
26
+ if (MSVC)
27
+ SET(MSVC_BASE_OPTIONS "${MSVC_BASE_OPTIONS} /Od /fsanitize=address /Zi")
28
+ else()
29
+ SET(MSVC_BASE_OPTIONS "${MSVC_BASE_OPTIONS} -Og -g3 -ggdb --fno-omit-frame-pointer -fsanitize=address -fsanitize=undefined -fsanitize=bounds") # -fsanitize=hwaddress
30
+ endif()
31
+ else ()
32
+ if (MSVC)
33
+ SET(MSVC_BASE_OPTIONS "${MSVC_BASE_OPTIONS} /Ox")
34
+ else()
35
+ SET(MSVC_BASE_OPTIONS "${MSVC_BASE_OPTIONS} -O3 --fomit-frame-pointer")
36
+ endif()
37
+ endif ()
38
+
39
+
40
+ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
41
+ set(ENV{MACOSX_DEPLOYMENT_TARGET} "11.0")
42
+ SET(GCC_N_CLANG_EXTRA_OPTIONS "-stdlib=libc++")
43
+ message("Platform is Darwin")
44
+ elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
45
+ message("Platform is WINDOWS")
46
+ SET(MSVC_EXTRA_OPTIONS "")
47
+ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
48
+ SET(GCC_N_CLANG_EXTRA_OPTIONS "-fvisibility=hidden -g0") # -fcoroutines
49
+ message("Platform is LINUX")
50
+ endif()
51
+
52
+
53
+ IF (CMAKE_C_COMPILER_ID STREQUAL "GNU")
54
+
55
+ ELSEIF (CMAKE_C_COMPILER_ID MATCHES "Clang")
56
+
57
+ ELSEIF (CMAKE_C_COMPILER_ID MATCHES "MSVC")
58
+
59
+ ELSE ()
60
+
61
+ ENDIF ()
62
+
63
+ IF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
64
+
65
+ ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
66
+
67
+ ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
68
+
69
+ ELSE ()
70
+
71
+
72
+ ENDIF ()
73
+
74
+ message("Compiling C with: " ${CMAKE_C_COMPILER_ID})
75
+ message("Compiling Cpp with: " ${CMAKE_CXX_COMPILER_ID})
76
+
77
+ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
78
+
79
+ set(EXTENSION_INCS ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/cpp_ext)
80
+
81
+ pybind11_add_module(rekorder pyxcp/recorder/wrap.cpp pyxcp/recorder/lz4.c pyxcp/recorder/lz4hc.c)
82
+ pybind11_add_module(cpp_ext pyxcp/cpp_ext/extension_wrapper.cpp)
83
+ pybind11_add_module(stim pyxcp/daq_stim/stim_wrapper.cpp pyxcp/daq_stim/stim.cpp pyxcp/daq_stim/scheduler.cpp)
84
+
85
+ target_include_directories(rekorder PRIVATE ${EXTENSION_INCS} ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/recorder)
86
+ target_include_directories(cpp_ext PRIVATE ${EXTENSION_INCS})
87
+ target_include_directories(stim PRIVATE ${EXTENSION_INCS} ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/daq_stim)
88
+
89
+ target_compile_options(rekorder PUBLIC "-DEXTENSION_NAME=pyxcp.recorder.rekorder")
90
+ target_compile_options(cpp_ext PUBLIC "-DEXTENSION_NAME=pyxcp.cpp_ext.cpp_ext")
91
+ target_compile_options(stim PUBLIC "-DEXTENSION_NAME=pyxcp.daq_stim.stim")
92
+
93
+ add_executable(asamkeydll ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/asamkeydll.c)
94
+ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
95
+ target_link_libraries(asamkeydll PRIVATE dl)
96
+ endif()
97
+
98
+
99
+ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
100
+ # CMAKE_SYSTEM_NAME STREQUAL "Windows"
101
+ endif()
102
+
103
+ IF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
104
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_N_CLANG_BASE_OPTIONS} ${GCC_N_CLANG_EXTRA_OPTIONS}")
105
+ target_link_options(cpp_ext PUBLIC -flto=auto)
106
+ target_link_options(stim PUBLIC -flto=auto)
107
+ target_link_options(rekorder PUBLIC -flto=auto)
108
+ ELSEIF (CMAKE_C_COMPILER_ID MATCHES "MSVC")
109
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MSVC_BASE_OPTIONS} ${MSVC_EXTRA_OPTIONS}")
110
+ ENDIF()
111
+
112
+ IF (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
113
+ # SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" -fuse-ld=lld)
114
+ ENDIF()
115
+
116
+ # target_include_directories(preprocessor PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/pya2l/extensions>)
117
+ # target_link_libraries(preprocessor pybind11::headers)
118
+ # set_target_properties(preprocessor PROPERTIES INTERPROCEDURAL_OPTIMIZATION ON CXX_VISIBILITY_PRESET ON VISIBILITY_INLINES_HIDDEN ON)
119
+
120
+ install(TARGETS rekorder LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/recorder)
121
+ install(TARGETS cpp_ext LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/cpp_ext)
122
+ install(TARGETS stim LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/daq_stim)
123
+ # install(TARGETS asamkeydll LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/)
@@ -1,29 +1,43 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyxcp
3
- Version: 0.21.11
3
+ Version: 0.22.2
4
4
  Summary: Universal Calibration Protocol for Python
5
+ Home-page: https://github.com/christoph2/pyxcp
6
+ License: LGPLv3
5
7
  Keywords: automotive,ecu,xcp,asam,autosar
6
8
  Author: Christoph Schueler
7
- Author-email: cpu12.gems@googlemail.com
8
- Requires-Python: >=3.7
9
+ Author-email: cpu.gems@googlemail.com
10
+ Requires-Python: >=3.8.1,<4.0.0
9
11
  Classifier: Development Status :: 5 - Production/Stable
10
12
  Classifier: Intended Audience :: Developers
11
13
  Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
14
+ Classifier: License :: Other/Proprietary License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.9
12
17
  Classifier: Programming Language :: Python :: 3.10
13
18
  Classifier: Programming Language :: Python :: 3.11
14
19
  Classifier: Programming Language :: Python :: 3.12
15
- Classifier: Programming Language :: Python :: 3.7
20
+ Classifier: Programming Language :: Python :: 3.13
16
21
  Classifier: Programming Language :: Python :: 3.8
17
- Classifier: Programming Language :: Python :: 3.9
18
22
  Classifier: Topic :: Scientific/Engineering
19
23
  Classifier: Topic :: Software Development
20
- Provides-Extra: doc
21
- Project-URL: homepage, https://github.com/christoph2/pyxcp
24
+ Requires-Dist: bandit (>=1.7.8,<2.0.0)
25
+ Requires-Dist: chardet (>=5.2.0,<6.0.0)
26
+ Requires-Dist: construct (>=2.10.68,<3.0.0)
27
+ Requires-Dist: line-profiler-pycharm (>=1.1.0,<2.0.0)
28
+ Requires-Dist: mako (>=1.2.4,<2.0.0)
29
+ Requires-Dist: pyserial (>=3.5,<4.0)
30
+ Requires-Dist: python-can (>=4.2.2,<5.0.0)
31
+ Requires-Dist: pytz (>=2024.1,<2025.0)
32
+ Requires-Dist: pyusb (>=1.2.1,<2.0.0)
33
+ Requires-Dist: rich (>=13.6.0,<14.0.0)
34
+ Requires-Dist: toml (>=0.10.2,<0.11.0)
35
+ Requires-Dist: tomlkit (>=0.12.5,<0.13.0)
36
+ Requires-Dist: traitlets (<=5.11.2)
37
+ Requires-Dist: uptime (>=3.0.1,<4.0.0)
22
38
  Description-Content-Type: text/markdown
23
39
 
24
-
25
- pyXCP
26
- =====
40
+ # pyXCP
27
41
 
28
42
  [![Codacy Badge](https://api.codacy.com/project/badge/Grade/85f774708b2542d98d02df55c743d24a)](https://app.codacy.com/app/christoph2/pyxcp?utm_source=github.com&utm_medium=referral&utm_content=christoph2/pyxcp&utm_campaign=Badge_Grade_Settings)
29
43
  [![Maintainability](https://api.codeclimate.com/v1/badges/4c639f3695f2725e392a/maintainability)](https://codeclimate.com/github/christoph2/pyxcp/maintainability)
@@ -47,17 +61,20 @@ XCP also replaces the older CCP (CAN Calibration Protocol).
47
61
  pyXCP is hosted on Github, get the latest release: [https://github.com/christoph2/pyxcp](https://github.com/christoph2/pyxcp)
48
62
 
49
63
  You can install pyxcp from source:
64
+
50
65
  ```
51
66
  pip install -r requirements.txt
52
67
  python setup.py install
53
68
  ```
54
69
 
55
70
  Alternatively, you can install pyxcp from source with pip:
71
+
56
72
  ```
57
73
  pip install git+https://github.com/christoph2/pyxcp.git
58
74
  ```
59
75
 
60
76
  Alternatively, get pyxcp from [PyPI](https://pypi.org/project/pyxcp/):
77
+
61
78
  ```
62
79
  pip install pyxcp
63
80
  ```
@@ -1,6 +1,4 @@
1
-
2
- pyXCP
3
- =====
1
+ # pyXCP
4
2
 
5
3
  [![Codacy Badge](https://api.codacy.com/project/badge/Grade/85f774708b2542d98d02df55c743d24a)](https://app.codacy.com/app/christoph2/pyxcp?utm_source=github.com&utm_medium=referral&utm_content=christoph2/pyxcp&utm_campaign=Badge_Grade_Settings)
6
4
  [![Maintainability](https://api.codeclimate.com/v1/badges/4c639f3695f2725e392a/maintainability)](https://codeclimate.com/github/christoph2/pyxcp/maintainability)
@@ -24,17 +22,20 @@ XCP also replaces the older CCP (CAN Calibration Protocol).
24
22
  pyXCP is hosted on Github, get the latest release: [https://github.com/christoph2/pyxcp](https://github.com/christoph2/pyxcp)
25
23
 
26
24
  You can install pyxcp from source:
25
+
27
26
  ```
28
27
  pip install -r requirements.txt
29
28
  python setup.py install
30
29
  ```
31
30
 
32
31
  Alternatively, you can install pyxcp from source with pip:
32
+
33
33
  ```
34
34
  pip install git+https://github.com/christoph2/pyxcp.git
35
35
  ```
36
36
 
37
37
  Alternatively, get pyxcp from [PyPI](https://pypi.org/project/pyxcp/):
38
+
38
39
  ```
39
40
  pip install pyxcp
40
41
  ```
@@ -0,0 +1,121 @@
1
+ #!/usr/bin/env python
2
+
3
+ import multiprocessing as mp
4
+ import os
5
+ import platform
6
+ import re
7
+ import subprocess # nosec
8
+ import sys
9
+ import sysconfig
10
+ from pathlib import Path
11
+ from tempfile import TemporaryDirectory
12
+
13
+
14
+ TOP_DIR = Path(__file__).parent
15
+
16
+ print("Platform", platform.system())
17
+ uname = platform.uname()
18
+ if uname.system == "Darwin":
19
+ os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.13"
20
+
21
+ VARS = sysconfig.get_config_vars()
22
+
23
+
24
+ def get_python_base() -> str:
25
+ # Applies in this form only to Windows.
26
+ if "base" in VARS and VARS["base"]:
27
+ return VARS["base"]
28
+ if "installed_base" in VARS and VARS["installed_base"]:
29
+ return VARS["installed_base"]
30
+
31
+
32
+ def alternate_libdir(pth: str):
33
+ base = Path(pth).parent
34
+ libdir = Path(base) / "libs"
35
+ if libdir.exists():
36
+ # available_libs = os.listdir(libdir)
37
+ return str(libdir)
38
+ else:
39
+ return ""
40
+
41
+
42
+ def get_py_config() -> dict:
43
+ pynd = VARS["py_version_nodot"] # Should always be present.
44
+ include = sysconfig.get_path("include") # Seems to be cross-platform.
45
+ library = f"python{pynd}.lib"
46
+ if uname.system == "Windows":
47
+ base = get_python_base()
48
+ libdir = Path(base) / "libs"
49
+ if libdir.exists():
50
+ available_libs = os.listdir(libdir)
51
+ if library in available_libs:
52
+ libdir = str(libdir)
53
+ else:
54
+ libdir = ""
55
+ else:
56
+ libdir = alternate_libdir(include)
57
+ else:
58
+ libdir = VARS["LIBDIR"]
59
+ library = VARS["LDLIBRARY"]
60
+
61
+ return dict(exe=sys.executable, include=include, libdir=libdir, library=library)
62
+
63
+
64
+ def banner(msg: str) -> None:
65
+ print("=" * 80)
66
+ print(str.center(msg, 80))
67
+ print("=" * 80)
68
+
69
+
70
+ def build_extension(debug: bool = False, use_temp_dir: bool = False) -> None:
71
+ print("build_ext::build_extension()")
72
+
73
+ debug = bool(os.environ.get("DEBUG", 0)) or debug
74
+ cfg = "Debug" if debug else "Release"
75
+ print(f" BUILD-TYPE: {cfg!r}")
76
+
77
+ py_cfg = get_py_config()
78
+
79
+ cmake_args = [
80
+ f"-DPython3_EXECUTABLE={py_cfg['exe']}",
81
+ f"-DPython3_INCLUDE_DIR={py_cfg['include']}",
82
+ f"-DPython3_LIBRARY={str(Path(py_cfg['libdir']) / Path(py_cfg['library']))}",
83
+ f"-DCMAKE_BUILD_TYPE={cfg}", # not used on MSVC, but no harm
84
+ ]
85
+
86
+ build_args = ["--config Release", "--verbose"]
87
+ # cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 /path/to/src
88
+
89
+ if sys.platform.startswith("darwin"):
90
+ # Cross-compile support for macOS - respect ARCHFLAGS if set
91
+ archs = re.findall(r"-arch (\S+)", os.environ.get("ARCHFLAGS", ""))
92
+ if archs:
93
+ cmake_args += ["-DCMAKE_OSX_ARCHITECTURES={}".format(";".join(archs))]
94
+
95
+ if use_temp_dir:
96
+ build_temp = Path(TemporaryDirectory(suffix=".build-temp").name) / "extension_it_in"
97
+ else:
98
+ build_temp = Path(".")
99
+ # print("cwd:", os.getcwd(), "build-dir:", build_temp, "top:", str(TOP_DIR))
100
+ if not build_temp.exists():
101
+ build_temp.mkdir(parents=True)
102
+
103
+ banner("Step #1: Configure")
104
+ # cmake_args += ["--debug-output"]
105
+ subprocess.run(["cmake", "-S", str(TOP_DIR), *cmake_args], cwd=build_temp, check=True) # nosec
106
+
107
+ cmake_args += [f"--parallel {mp.cpu_count()}"]
108
+
109
+ banner("Step #2: Build")
110
+ # build_args += ["-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"]
111
+ subprocess.run(["cmake", "--build", str(build_temp), *build_args], cwd=TOP_DIR, check=True) # nosec
112
+
113
+ banner("Step #3: Install")
114
+ subprocess.run(["cmake", "--install", "."], cwd=build_temp, check=True) # nosec
115
+ subprocess.run(["cmake", "--install", build_temp], cwd=TOP_DIR, check=True) # nosec
116
+
117
+
118
+ if __name__ == "__main__":
119
+ includes = subprocess.getoutput("pybind11-config --cmakedir") # nosec
120
+ os.environ["pybind11_DIR"] = includes
121
+ build_extension(False)
@@ -0,0 +1,208 @@
1
+
2
+ [build-system]
3
+ requires = ["poetry-core>=1.0.0", "pybind11>=2.12.0", "pybind11[global]>=2.12.0"] # "setuptools>=68.0.0",
4
+ build-backend = "poetry.core.masonry.api"
5
+
6
+
7
+ [tool.poetry.dev-dependencies]
8
+ Pygments = ">=2.10.0"
9
+ bandit = ">=1.7.4"
10
+ black = ">=21.10b0"
11
+ coverage = {extras = ["toml"], version = ">=6.2"}
12
+ darglint = ">=1.8.1"
13
+ flake8 = ">=4.0.1"
14
+ flake8-docstrings = ">=1.6.0"
15
+ flake8-rst-docstrings = ">=0.2.5"
16
+ furo = ">=2021.11.12"
17
+ isort = ">=5.10.1"
18
+ mypy = ">=0.930"
19
+ pep8-naming = ">=0.12.1"
20
+ pre-commit = ">=2.16.0"
21
+ pre-commit-hooks = ">=4.1.0"
22
+ pytest = ">=6.2.5"
23
+ pyupgrade = ">=2.29.1"
24
+ safety = ">=1.10.3"
25
+ sphinx = ">=4.3.2"
26
+ sphinx-autobuild = ">=2021.3.14"
27
+ sphinx-click = ">=3.0.2"
28
+ typeguard = ">=2.13.3"
29
+ xdoctest = {extras = ["colors"], version = ">=0.15.10"}
30
+ myst-parser = {version = ">=0.16.1"}
31
+
32
+ [project]
33
+ name = "pyxcp"
34
+ dynamic = ["license", "readme", "authors", "requires-python", "description", "classifiers", "scripts", "dependencies", "optional-dependencies"]
35
+
36
+ [tool.poetry]
37
+ authors = ["Christoph Schueler <cpu.gems@googlemail.com>"]
38
+ name = "pyxcp"
39
+ version = "0.22.2"
40
+ readme = "README.md"
41
+ description = "Universal Calibration Protocol for Python"
42
+ keywords = ["automotive", "ecu", "xcp", "asam", "autosar"]
43
+ homepage = "https://github.com/christoph2/pyxcp"
44
+ license = "LGPLv3"
45
+ classifiers = [
46
+ "Development Status :: 5 - Production/Stable",
47
+ "Intended Audience :: Developers", "Topic :: Software Development",
48
+ "Topic :: Scientific/Engineering",
49
+ "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
50
+ "Programming Language :: Python :: 3.8",
51
+ "Programming Language :: Python :: 3.9",
52
+ "Programming Language :: Python :: 3.10",
53
+ "Programming Language :: Python :: 3.11",
54
+ "Programming Language :: Python :: 3.12",
55
+ "Programming Language :: Python :: 3.13"
56
+ ]
57
+ build = "build_ext.py"
58
+ include = [
59
+ { path = "pyxcp/cpp_ext/*.so", format = "wheel" },
60
+ { path = "pyxcp/cpp_ext/*.pyd", format = "wheel" },
61
+ { path = "pyxcp/daq_stim/*.so", format = "wheel" },
62
+ { path = "pyxcp/daq_stim/*.pyd", format = "wheel" },
63
+ { path = "pyxcp/recorder/*.so", format = "wheel" },
64
+ { path = "pyxcp/recorder/*.pyd", format = "wheel" },
65
+ { path = "pyxcp/*.exe", format = "wheel" },
66
+ { path = "CMakeLists.txt", format = "sdist" },
67
+
68
+ { path = "pyxcp/cpp_ext/*hpp", format = "sdist" },
69
+ { path = "pyxcp/cpp_ext/*cpp", format = "sdist" },
70
+ { path = "pyxcp/daq_stim/*hpp", format = "sdist" },
71
+ { path = "pyxcp/daq_stim/*cpp", format = "sdist" },
72
+ { path = "pyxcp/recorder/*hpp", format = "sdist" },
73
+ { path = "pyxcp/recorder/*cpp", format = "sdist" },
74
+ ]
75
+
76
+ [tool.poetry.dependencies]
77
+ python = "^3.8.1"
78
+ construct = "^2.10.68"
79
+ mako = "^1.2.4"
80
+ pyserial = "^3.5"
81
+ pyusb = "^1.2.1"
82
+ python-can = "^4.2.2"
83
+ uptime = "^3.0.1"
84
+ rich = "^13.6.0"
85
+ chardet = "^5.2.0"
86
+ traitlets = "<=5.11.2"
87
+ line-profiler-pycharm = "^1.1.0"
88
+
89
+ toml = "^0.10.2"
90
+ bandit = "^1.7.8"
91
+ tomlkit = "^0.12.5"
92
+ pytz = "^2024.1"
93
+ [tool.poetry.group.dev.dependencies]
94
+ ruff = "^0.1.0"
95
+
96
+ pre-commit-hooks = "^4.6.0"
97
+ darglint = "^1.8.1"
98
+ [tool.poetry.scripts]
99
+ pyxcp-probe-can-drivers = "pyxcp.scripts.pyxcp_probe_can_drivers:main"
100
+ xcp-id-scanner = "pyxcp.scripts.xcp_id_scanner:main"
101
+ xcp-fetch-a2l = "pyxcp.scripts.xcp_fetch_a2l:main"
102
+ xcp-info = "pyxcp.scripts.xcp_info:main"
103
+ xcp-profile = "pyxcp.scripts.xcp_profile:main"
104
+
105
+ [tool.pytest]
106
+ addopts = "--verbose --tb=short --junitxml=result.xml -o junit_family=xunit2"
107
+ testpaths = "pyxcp/tests"
108
+
109
+ [tool.isort]
110
+ profile = "black"
111
+ force_single_line = false
112
+ lines_after_imports = 2
113
+
114
+ [tool.mypy]
115
+ strict = false
116
+ warn_unreachable = true
117
+ pretty = true
118
+ show_column_numbers = true
119
+ show_error_context = true
120
+
121
+ [tool.flake8]
122
+ ignore = ["D203", "E203", "E266", "E501", "W503", "F403", "F401", "BLK100"]
123
+ exclude = '''
124
+ /(
125
+ \.git
126
+ | __pycache__
127
+ | __pypackages__
128
+ | \.mypy_cache
129
+ | \.tox
130
+ | \.venv
131
+ | \.eggs
132
+ | _build
133
+ | build
134
+ | docs
135
+ | dist
136
+ | experimental
137
+ )/
138
+ '''
139
+ max-complexity = 10
140
+ count = true
141
+ statistics = true
142
+ show-source = true
143
+ max-line-length = 132
144
+ select = ["B","C","E","F","W","T4","B9"]
145
+ # extend-select = "B950"
146
+ # extend-ignore = ["E203", "E501", "E701"]
147
+
148
+ [tool.ruff]
149
+ line-length = 132
150
+
151
+ [tool.black]
152
+ line-length=132
153
+ include = '\.pyi?$'
154
+ exclude = '''
155
+ /(
156
+ \.git
157
+ | \.mypy_cache
158
+ | \.tox
159
+ | \.venv
160
+ | _build
161
+ | build
162
+ | docs
163
+ | experimental
164
+ | __pycache__
165
+ | __pypackages__
166
+ | dist
167
+ )/
168
+ '''
169
+
170
+ [tool.cibuildwheel]
171
+ build-verbosity = 3
172
+ #test-command = "pytest {package}/tests"
173
+
174
+ build = "cp3{8,9,10,11,12,13}-*"
175
+ skip = ["*-manylinux_i686", "*-musllinux_x86_64", "*-musllinux_i686", "cp38-manylinux*", "cp39-manylinux*"]
176
+ build-frontend = "build"
177
+
178
+ [tool.cibuildwheel.macos]
179
+ archs = ["x86_64", "universal2", "arm64"]
180
+
181
+ [tool.cibuildwheel.windows]
182
+ archs = ["AMD64"] # , "ARM64"
183
+
184
+ [[tool.cibuildwheel.overrides]]
185
+ select = "cp3?-*"
186
+ manylinux-x86_64-image = "manylinux_2_35"
187
+ manylinux-aarch64-image = "manylinux_2_35"
188
+
189
+ [tool.cibuildwheel.linux]
190
+ # archs = ["auto", "aarch64"]
191
+ archs = ["x86_64", "aarch64"]
192
+ before-all = "yum install -y libffi openssl openssl-devel gcc"
193
+
194
+ [tool.pyright]
195
+ include = ["pyxcp", "build_ext.py"]
196
+ ignore = ["pyxcp/recorder/converter/**", "pyxcp/recorder/simdjson/**","pyxcp/recorder/mio/**", "pyxcp/recorder/lz4/**"]
197
+ #defineConstant = { DEBUG = true }
198
+ #stubPath = "src/stubs"
199
+
200
+ reportMissingImports = true
201
+ reportMissingTypeStubs = false
202
+
203
+ #executionEnvironments = [
204
+ # { root = "src/web", pythonVersion = "3.5", pythonPlatform = "Windows", extraPaths = [ "src/service_libs" ] },
205
+ # { root = "src/sdk", pythonVersion = "3.0", extraPaths = [ "src/backend" ] },
206
+ # { root = "src/tests", extraPaths = ["src/tests/e2e", "src/sdk" ]},
207
+ # { root = "src" }
208
+ #]
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env python
2
+ """Universal Calibration Protocol for Python."""
3
+
4
+ from rich import pretty
5
+ from rich.console import Console
6
+ from rich.traceback import install as tb_install
7
+
8
+
9
+ pretty.install()
10
+
11
+ from .master import Master # noqa: F401, E402
12
+ from .transport import Can, Eth, SxI, Usb # noqa: F401, E402
13
+
14
+
15
+ console = Console()
16
+ tb_install(show_locals=True, max_frames=3) # Install custom exception handler.
17
+
18
+ # if you update this manually, do not forget to update
19
+ # .bumpversion.cfg and pyproject.toml.
20
+ __version__ = "0.22.2"
@@ -0,0 +1,82 @@
1
+ ASAP2_VERSION 1 30
2
+ /begin PROJECT
3
+ aProjectName
4
+ "description of project"
5
+
6
+ /begin HEADER
7
+ "project"
8
+ VERSION "1.0"
9
+ PROJECT_NO "1.0"
10
+ /end HEADER
11
+
12
+ /begin MODULE
13
+ aModuleName
14
+ "description of module"
15
+
16
+ /begin MOD_PAR
17
+ ""
18
+ /end MOD_PAR
19
+
20
+ /begin IF_DATA CAN_MONITORING
21
+ /begin TP_BLOB
22
+ 500
23
+ /end TP_BLOB
24
+ /end IF_DATA
25
+
26
+ /begin MEASUREMENT
27
+ aMeasurementName
28
+ "description of measurement"
29
+ ULONG
30
+ aConversionName
31
+ 0
32
+ 0.0
33
+ 0
34
+ 1000
35
+ /begin IF_DATA CAN_MONITORING
36
+ /begin KP_BLOB
37
+ 0x0 32
38
+ /end KP_BLOB
39
+ /end IF_DATA
40
+ FORMAT ""
41
+ BYTE_ORDER MSB_LAST
42
+ BIT_MASK 0xFFFFFFFF
43
+ /end MEASUREMENT
44
+
45
+ /begin COMPU_METHOD
46
+ aConversionName
47
+ "description of conversion"
48
+ RAT_FUNC
49
+ "%f5.2"
50
+ ""
51
+ COEFFS 0 1.0 0.0 0 0 1
52
+ /end COMPU_METHOD
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+ /begin FRAME
62
+ aFrameName
63
+ "description of frame"
64
+ 0
65
+ 0
66
+ /begin IF_DATA CAN_MONITORING
67
+ QP_BLOB 0x0200 0 8
68
+ /end IF_DATA
69
+ FRAME_MEASUREMENT aMeasurementName
70
+ /end FRAME
71
+
72
+ /begin FUNCTION
73
+ aFunctionName
74
+ "description of function"
75
+ /begin OUT_MEASUREMENT
76
+ aMeasurementName
77
+ /end OUT_MEASUREMENT
78
+ /end FUNCTION
79
+
80
+ /end MODULE
81
+
82
+ /end PROJECT
@@ -406,4 +406,3 @@ taggedstruct Common_Parameters {
406
406
  block "PGM" struct Pgm;
407
407
  block "DAQ_EVENT" taggedunion Daq_Event;
408
408
  }; /******************** end of Common Parameters *****************************/
409
-
@@ -103,4 +103,4 @@ struct USB_Parameters {
103
103
  }; /* end of optional */
104
104
  };
105
105
  /************************* end of USB ***********************************/
106
- /end A2ML
106
+ /end A2ML
@@ -18,4 +18,3 @@ begin XCP_ON_CAN
18
18
  FIXED 0x330
19
19
  /end DAQ_LIST_CAN_ID
20
20
  /end XCP_ON_CAN
21
-
@@ -9,4 +9,3 @@
9
9
  0x5555 /* PORT */
10
10
  "127.0.0.1" /* ADDRESS */
11
11
  /end XCP_ON_UDP_IP
12
-
@@ -92,4 +92,3 @@ STIM VARIABLE
92
92
  /end XCP_PACKET
93
93
  /end POOL_BUFFER
94
94
  /end XCP_ON_FLX
95
-