pyxcp 0.21.10__tar.gz → 0.22.23__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 (202) hide show
  1. pyxcp-0.22.23/CMakeLists.txt +126 -0
  2. {pyxcp-0.21.10 → pyxcp-0.22.23}/PKG-INFO +28 -11
  3. {pyxcp-0.21.10 → pyxcp-0.22.23}/README.md +4 -3
  4. pyxcp-0.22.23/build_ext.py +157 -0
  5. pyxcp-0.22.23/pyproject.toml +205 -0
  6. pyxcp-0.22.23/pyxcp/__init__.py +20 -0
  7. pyxcp-0.22.23/pyxcp/aml/EtasCANMonitoring.a2l +82 -0
  8. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/aml/XCP_Common.aml +0 -1
  9. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/aml/XCPonUSB.aml +1 -1
  10. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/aml/ifdata_CAN.a2l +0 -1
  11. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/aml/ifdata_Eth.a2l +0 -1
  12. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/aml/ifdata_Flx.a2l +0 -1
  13. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/aml/ifdata_SxI.a2l +0 -1
  14. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/aml/ifdata_USB.a2l +0 -1
  15. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/asam/types.py +4 -4
  16. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/asamkeydll.c +0 -1
  17. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/checksum.py +0 -1
  18. pyxcp-0.22.23/pyxcp/cmdline.py +52 -0
  19. pyxcp-0.22.23/pyxcp/config/__init__.py +1100 -0
  20. pyxcp-0.22.23/pyxcp/config/legacy.py +120 -0
  21. pyxcp-0.22.23/pyxcp/constants.py +47 -0
  22. pyxcp-0.22.23/pyxcp/cpp_ext/bin.hpp +104 -0
  23. pyxcp-0.22.23/pyxcp/cpp_ext/blockmem.hpp +58 -0
  24. pyxcp-0.22.23/pyxcp/cpp_ext/daqlist.hpp +200 -0
  25. pyxcp-0.22.23/pyxcp/cpp_ext/event.hpp +67 -0
  26. pyxcp-0.22.23/pyxcp/cpp_ext/extension_wrapper.cpp +96 -0
  27. pyxcp-0.22.23/pyxcp/cpp_ext/helper.hpp +280 -0
  28. pyxcp-0.22.23/pyxcp/cpp_ext/mcobject.hpp +246 -0
  29. pyxcp-0.22.23/pyxcp/cpp_ext/tsqueue.hpp +46 -0
  30. pyxcp-0.22.23/pyxcp/daq_stim/__init__.py +228 -0
  31. pyxcp-0.22.23/pyxcp/daq_stim/optimize/__init__.py +67 -0
  32. pyxcp-0.22.23/pyxcp/daq_stim/optimize/binpacking.py +41 -0
  33. pyxcp-0.22.23/pyxcp/daq_stim/scheduler.cpp +28 -0
  34. pyxcp-0.22.23/pyxcp/daq_stim/scheduler.hpp +75 -0
  35. pyxcp-0.22.23/pyxcp/daq_stim/stim.cpp +13 -0
  36. pyxcp-0.22.23/pyxcp/daq_stim/stim.hpp +604 -0
  37. pyxcp-0.22.23/pyxcp/daq_stim/stim_wrapper.cpp +48 -0
  38. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/dllif.py +21 -18
  39. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/errormatrix.py +5 -3
  40. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/examples/conf_can.toml +4 -2
  41. pyxcp-0.22.23/pyxcp/examples/conf_can_vector.json +11 -0
  42. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/examples/conf_can_vector.toml +4 -2
  43. pyxcp-0.22.23/pyxcp/examples/conf_eth.toml +9 -0
  44. pyxcp-0.22.23/pyxcp/examples/conf_nixnet.json +20 -0
  45. pyxcp-0.22.23/pyxcp/examples/conf_sxi.json +9 -0
  46. pyxcp-0.22.23/pyxcp/examples/ex_arrow.py +109 -0
  47. pyxcp-0.22.23/pyxcp/examples/ex_csv.py +85 -0
  48. pyxcp-0.22.23/pyxcp/examples/ex_excel.py +95 -0
  49. pyxcp-0.22.23/pyxcp/examples/ex_mdf.py +124 -0
  50. pyxcp-0.22.23/pyxcp/examples/ex_sqlite.py +128 -0
  51. pyxcp-0.22.23/pyxcp/examples/run_daq.py +148 -0
  52. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/examples/xcp_policy.py +6 -7
  53. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/examples/xcp_read_benchmark.py +8 -6
  54. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/examples/xcp_skel.py +0 -2
  55. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/examples/xcp_unlock.py +1 -1
  56. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/examples/xcp_user_supplied_driver.py +1 -2
  57. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/examples/xcphello.py +6 -3
  58. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/examples/xcphello_recorder.py +4 -4
  59. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/master/__init__.py +1 -2
  60. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/master/errorhandler.py +107 -74
  61. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/master/master.py +201 -119
  62. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/recorder/__init__.py +27 -6
  63. pyxcp-0.22.23/pyxcp/recorder/converter/__init__.py +37 -0
  64. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/recorder/lz4.c +129 -51
  65. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/recorder/lz4.h +45 -28
  66. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/recorder/lz4hc.c +560 -156
  67. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/recorder/lz4hc.h +1 -1
  68. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/recorder/mio.hpp +721 -767
  69. pyxcp-0.22.23/pyxcp/recorder/reader.hpp +139 -0
  70. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/recorder/reco.py +5 -8
  71. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/recorder/rekorder.cpp +18 -22
  72. pyxcp-0.22.23/pyxcp/recorder/rekorder.hpp +274 -0
  73. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/recorder/setup.py +11 -10
  74. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/recorder/test_reko.py +2 -3
  75. pyxcp-0.22.23/pyxcp/recorder/unfolder.hpp +1332 -0
  76. pyxcp-0.22.23/pyxcp/recorder/wrap.cpp +189 -0
  77. pyxcp-0.22.23/pyxcp/recorder/writer.hpp +302 -0
  78. pyxcp-0.22.23/pyxcp/scripts/__init__.py +0 -0
  79. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/scripts/pyxcp_probe_can_drivers.py +0 -2
  80. pyxcp-0.22.23/pyxcp/scripts/xcp_examples.py +64 -0
  81. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/scripts/xcp_fetch_a2l.py +15 -10
  82. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/scripts/xcp_id_scanner.py +2 -6
  83. pyxcp-0.22.23/pyxcp/scripts/xcp_info.py +112 -0
  84. pyxcp-0.22.23/pyxcp/scripts/xcp_profile.py +27 -0
  85. pyxcp-0.22.23/pyxcp/stim/__init__.py +0 -0
  86. pyxcp-0.22.23/pyxcp/tests/test_binpacking.py +186 -0
  87. pyxcp-0.22.23/pyxcp/tests/test_can.py +1324 -0
  88. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/tests/test_checksum.py +2 -1
  89. pyxcp-0.22.23/pyxcp/tests/test_daq.py +193 -0
  90. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/tests/test_frame_padding.py +6 -3
  91. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/tests/test_master.py +42 -31
  92. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/tests/test_transport.py +12 -12
  93. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/tests/test_utils.py +2 -5
  94. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/timing.py +0 -2
  95. pyxcp-0.22.23/pyxcp/transport/__init__.py +10 -0
  96. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/transport/base.py +149 -127
  97. pyxcp-0.22.23/pyxcp/transport/base_transport.hpp +0 -0
  98. pyxcp-0.22.23/pyxcp/transport/can.py +443 -0
  99. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/transport/eth.py +80 -82
  100. pyxcp-0.22.23/pyxcp/transport/sxi.py +133 -0
  101. pyxcp-0.22.23/pyxcp/transport/transport_wrapper.cpp +0 -0
  102. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/transport/usb_transport.py +65 -83
  103. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/types.py +69 -20
  104. pyxcp-0.22.23/pyxcp/utils.py +102 -0
  105. pyxcp-0.22.23/pyxcp/vector/__init__.py +0 -0
  106. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/vector/map.py +1 -3
  107. pyxcp-0.21.10/build_ext.py +0 -42
  108. pyxcp-0.21.10/pyproject.toml +0 -138
  109. pyxcp-0.21.10/pyxcp/__init__.py +0 -28
  110. pyxcp-0.21.10/pyxcp/aml/EtasCANMonitoring.a2l +0 -83
  111. pyxcp-0.21.10/pyxcp/cmdline.py +0 -70
  112. pyxcp-0.21.10/pyxcp/config.py +0 -57
  113. pyxcp-0.21.10/pyxcp/constants.py +0 -48
  114. pyxcp-0.21.10/pyxcp/cxx/asynchiofactory.hpp +0 -24
  115. pyxcp-0.21.10/pyxcp/cxx/blocking_client.cpp +0 -44
  116. pyxcp-0.21.10/pyxcp/cxx/blocking_socket.cpp +0 -43
  117. pyxcp-0.21.10/pyxcp/cxx/blocking_socket.hpp +0 -558
  118. pyxcp-0.21.10/pyxcp/cxx/concurrent_queue.hpp +0 -60
  119. pyxcp-0.21.10/pyxcp/cxx/eth.hpp +0 -57
  120. pyxcp-0.21.10/pyxcp/cxx/exceptions.hpp +0 -30
  121. pyxcp-0.21.10/pyxcp/cxx/iasyncioservice.hpp +0 -31
  122. pyxcp-0.21.10/pyxcp/cxx/iresource.hpp +0 -17
  123. pyxcp-0.21.10/pyxcp/cxx/isocket.hpp +0 -22
  124. pyxcp-0.21.10/pyxcp/cxx/linux/epoll.cpp +0 -51
  125. pyxcp-0.21.10/pyxcp/cxx/linux/epoll.hpp +0 -87
  126. pyxcp-0.21.10/pyxcp/cxx/linux/lit_tester.cpp +0 -19
  127. pyxcp-0.21.10/pyxcp/cxx/linux/socket.hpp +0 -234
  128. pyxcp-0.21.10/pyxcp/cxx/linux/timeout.hpp +0 -81
  129. pyxcp-0.21.10/pyxcp/cxx/memoryblock.hpp +0 -42
  130. pyxcp-0.21.10/pyxcp/cxx/pool.hpp +0 -81
  131. pyxcp-0.21.10/pyxcp/cxx/poolmgr.cpp +0 -6
  132. pyxcp-0.21.10/pyxcp/cxx/poolmgr.hpp +0 -31
  133. pyxcp-0.21.10/pyxcp/cxx/test_queue.cpp +0 -69
  134. pyxcp-0.21.10/pyxcp/cxx/timestamp.hpp +0 -84
  135. pyxcp-0.21.10/pyxcp/cxx/utils.cpp +0 -38
  136. pyxcp-0.21.10/pyxcp/cxx/utils.hpp +0 -29
  137. pyxcp-0.21.10/pyxcp/cxx/win/iocp.cpp +0 -242
  138. pyxcp-0.21.10/pyxcp/cxx/win/iocp.hpp +0 -42
  139. pyxcp-0.21.10/pyxcp/cxx/win/perhandledata.hpp +0 -24
  140. pyxcp-0.21.10/pyxcp/cxx/win/periodata.hpp +0 -97
  141. pyxcp-0.21.10/pyxcp/cxx/win/socket.hpp +0 -185
  142. pyxcp-0.21.10/pyxcp/cxx/win/timeout.hpp +0 -83
  143. pyxcp-0.21.10/pyxcp/examples/conf_can.json +0 -20
  144. pyxcp-0.21.10/pyxcp/examples/conf_can_vector.json +0 -11
  145. pyxcp-0.21.10/pyxcp/examples/conf_eth.json +0 -8
  146. pyxcp-0.21.10/pyxcp/examples/conf_eth.toml +0 -6
  147. pyxcp-0.21.10/pyxcp/examples/conf_nixnet.json +0 -20
  148. pyxcp-0.21.10/pyxcp/examples/conf_sxi.json +0 -9
  149. pyxcp-0.21.10/pyxcp/logger.py +0 -67
  150. pyxcp-0.21.10/pyxcp/recorder/rekorder.hpp +0 -661
  151. pyxcp-0.21.10/pyxcp/recorder/wrap.cpp +0 -27
  152. pyxcp-0.21.10/pyxcp/scripts/xcp_info.py +0 -74
  153. pyxcp-0.21.10/pyxcp/tests/test_can.py +0 -230
  154. pyxcp-0.21.10/pyxcp/tests/test_config.py +0 -62
  155. pyxcp-0.21.10/pyxcp/transport/__init__.py +0 -10
  156. pyxcp-0.21.10/pyxcp/transport/can.py +0 -416
  157. pyxcp-0.21.10/pyxcp/transport/candriver/__init__.py +0 -2
  158. pyxcp-0.21.10/pyxcp/transport/candriver/pc_canalystii.py +0 -27
  159. pyxcp-0.21.10/pyxcp/transport/candriver/pc_etas.py +0 -25
  160. pyxcp-0.21.10/pyxcp/transport/candriver/pc_gsusb.py +0 -23
  161. pyxcp-0.21.10/pyxcp/transport/candriver/pc_iscan.py +0 -23
  162. pyxcp-0.21.10/pyxcp/transport/candriver/pc_ixxat.py +0 -27
  163. pyxcp-0.21.10/pyxcp/transport/candriver/pc_kvaser.py +0 -39
  164. pyxcp-0.21.10/pyxcp/transport/candriver/pc_neovi.py +0 -31
  165. pyxcp-0.21.10/pyxcp/transport/candriver/pc_nican.py +0 -23
  166. pyxcp-0.21.10/pyxcp/transport/candriver/pc_nixnet.py +0 -23
  167. pyxcp-0.21.10/pyxcp/transport/candriver/pc_pcan.py +0 -25
  168. pyxcp-0.21.10/pyxcp/transport/candriver/pc_seeed.py +0 -28
  169. pyxcp-0.21.10/pyxcp/transport/candriver/pc_serial.py +0 -27
  170. pyxcp-0.21.10/pyxcp/transport/candriver/pc_slcan.py +0 -29
  171. pyxcp-0.21.10/pyxcp/transport/candriver/pc_socketcan.py +0 -23
  172. pyxcp-0.21.10/pyxcp/transport/candriver/pc_systec.py +0 -29
  173. pyxcp-0.21.10/pyxcp/transport/candriver/pc_usb2can.py +0 -30
  174. pyxcp-0.21.10/pyxcp/transport/candriver/pc_vector.py +0 -34
  175. pyxcp-0.21.10/pyxcp/transport/candriver/python_can.py +0 -101
  176. pyxcp-0.21.10/pyxcp/transport/cxx_ext/CMakeLists.txt +0 -51
  177. pyxcp-0.21.10/pyxcp/transport/cxx_ext/setup.py +0 -49
  178. pyxcp-0.21.10/pyxcp/transport/cxx_ext/tests/test_basic_socket.cpp +0 -39
  179. pyxcp-0.21.10/pyxcp/transport/cxx_ext/tests/test_pool.cpp +0 -39
  180. pyxcp-0.21.10/pyxcp/transport/cxx_ext/tests/test_timestamp.cpp +0 -27
  181. pyxcp-0.21.10/pyxcp/transport/sxi.py +0 -87
  182. pyxcp-0.21.10/pyxcp/utils.py +0 -71
  183. {pyxcp-0.21.10 → pyxcp-0.22.23}/LICENSE +0 -0
  184. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/aml/EtasCANMonitoring.aml +0 -0
  185. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/aml/XCPonCAN.aml +0 -0
  186. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/aml/XCPonEth.aml +0 -0
  187. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/aml/XCPonFlx.aml +0 -0
  188. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/aml/XCPonSxI.aml +0 -0
  189. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/asam/__init__.py +0 -0
  190. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/asamkeydll.sh +0 -0
  191. {pyxcp-0.21.10/pyxcp/scripts → pyxcp-0.22.23/pyxcp/cpp_ext}/__init__.py +0 -0
  192. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/examples/conf_can_user.toml +0 -0
  193. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/examples/conf_socket_can.toml +0 -0
  194. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/examples/conf_sxi.toml +0 -0
  195. pyxcp-0.21.10/pyxcp/recorder/recorder.rst → pyxcp-0.22.23/pyxcp/py.typed +0 -0
  196. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/recorder/build_clang.cmd +0 -0
  197. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/recorder/build_clang.sh +0 -0
  198. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/recorder/build_gcc.cmd +0 -0
  199. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/recorder/build_gcc.sh +0 -0
  200. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/recorder/build_gcc_arm.sh +0 -0
  201. pyxcp-0.21.10/pyxcp/vector/__init__.py → pyxcp-0.22.23/pyxcp/recorder/recorder.rst +0 -0
  202. {pyxcp-0.21.10 → pyxcp-0.22.23}/pyxcp/tests/test_asam_types.py +2 -2
@@ -0,0 +1,126 @@
1
+
2
+ cmake_minimum_required(VERSION 3.20...3.30)
3
+ project(pyxcp_extensions LANGUAGES C CXX)
4
+
5
+
6
+ if(POLICY CMP0135)
7
+ cmake_policy(SET CMP0135 NEW)
8
+ endif()
9
+ cmake_policy(SET CMP0094 NEW)
10
+
11
+ find_package(Python3 COMPONENTS Interpreter Development.Module REQUIRED)
12
+ find_package(pybind11 CONFIG)
13
+
14
+ SET(CMAKE_C_STANDARD 17)
15
+ set(CMAKE_CXX_STANDARD 23)
16
+
17
+ message( STATUS "Found pybind11 v${pybind11_VERSION} ${pybind11_VERSION_TYPE}: ${pybind11_INCLUDE_DIRS}")
18
+
19
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/dist")
20
+
21
+
22
+ SET(GCC_N_CLANG_BASE_OPTIONS "-std=c++23 -Wall -Wextra -Wpedantic -Warray-bounds -mtune=native -fexceptions")
23
+
24
+ SET(MSVC_BASE_OPTIONS "/W3 /permissive- /EHsc /bigobj /Zc:__cplusplus /std:c++latest")
25
+
26
+
27
+
28
+ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
29
+ if (MSVC)
30
+ SET(MSVC_BASE_OPTIONS "${MSVC_BASE_OPTIONS} /Od /fsanitize=address /Zi")
31
+ else()
32
+ SET(GCC_N_CLANG_BASE_OPTIONS "${GCC_N_CLANG_BASE_OPTIONS} -Og -g3 -ggdb -fno-omit-frame-pointer -fsanitize=address -fsanitize=undefined -fsanitize=bounds") # -fsanitize=hwaddress
33
+ endif()
34
+ else ()
35
+ if (MSVC)
36
+ SET(MSVC_BASE_OPTIONS "${MSVC_BASE_OPTIONS} /Ox")
37
+ else()
38
+ SET(GCC_N_CLANG_BASE_OPTIONS "${GCC_N_CLANG_BASE_OPTIONS} -O3 -fomit-frame-pointer")
39
+ endif()
40
+ endif ()
41
+
42
+
43
+ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
44
+ set(ENV{MACOSX_DEPLOYMENT_TARGET} "11.0")
45
+ SET(GCC_N_CLANG_EXTRA_OPTIONS "-stdlib=libc++")
46
+ message("Platform is Darwin")
47
+ elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
48
+ message("Platform is WINDOWS")
49
+ SET(MSVC_EXTRA_OPTIONS "")
50
+ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
51
+ SET(GCC_N_CLANG_EXTRA_OPTIONS "-fvisibility=hidden -g0") # -fcoroutines
52
+ message("Platform is LINUX")
53
+ endif()
54
+
55
+
56
+ IF (CMAKE_C_COMPILER_ID STREQUAL "GNU")
57
+
58
+ ELSEIF (CMAKE_C_COMPILER_ID MATCHES "Clang")
59
+
60
+ ELSEIF (CMAKE_C_COMPILER_ID MATCHES "MSVC")
61
+
62
+ ELSE ()
63
+
64
+ ENDIF ()
65
+
66
+ IF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
67
+
68
+ ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
69
+
70
+ ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
71
+
72
+ ELSE ()
73
+
74
+
75
+ ENDIF ()
76
+
77
+ message("Compiling C with: " ${CMAKE_C_COMPILER_ID})
78
+ message("Compiling Cpp with: " ${CMAKE_CXX_COMPILER_ID})
79
+
80
+ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
81
+
82
+ set(EXTENSION_INCS ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/cpp_ext)
83
+
84
+ pybind11_add_module(rekorder pyxcp/recorder/wrap.cpp pyxcp/recorder/lz4.c pyxcp/recorder/lz4hc.c)
85
+ pybind11_add_module(cpp_ext pyxcp/cpp_ext/extension_wrapper.cpp)
86
+ pybind11_add_module(stim pyxcp/daq_stim/stim_wrapper.cpp pyxcp/daq_stim/stim.cpp pyxcp/daq_stim/scheduler.cpp)
87
+
88
+ target_include_directories(rekorder PRIVATE ${EXTENSION_INCS} ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/recorder)
89
+ target_include_directories(cpp_ext PRIVATE ${EXTENSION_INCS})
90
+ target_include_directories(stim PRIVATE ${EXTENSION_INCS} ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/daq_stim)
91
+
92
+ target_compile_options(rekorder PUBLIC "-DEXTENSION_NAME=pyxcp.recorder.rekorder")
93
+ target_compile_options(cpp_ext PUBLIC "-DEXTENSION_NAME=pyxcp.cpp_ext.cpp_ext")
94
+ target_compile_options(stim PUBLIC "-DEXTENSION_NAME=pyxcp.daq_stim.stim")
95
+
96
+ add_executable(asamkeydll ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/asamkeydll.c)
97
+ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
98
+ target_link_libraries(asamkeydll PRIVATE dl)
99
+ endif()
100
+
101
+
102
+ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
103
+ # CMAKE_SYSTEM_NAME STREQUAL "Windows"
104
+ endif()
105
+
106
+ IF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
107
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_N_CLANG_BASE_OPTIONS} ${GCC_N_CLANG_EXTRA_OPTIONS}")
108
+ target_link_options(cpp_ext PUBLIC -flto=auto)
109
+ target_link_options(stim PUBLIC -flto=auto)
110
+ target_link_options(rekorder PUBLIC -flto=auto)
111
+ ELSEIF (CMAKE_C_COMPILER_ID MATCHES "MSVC")
112
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MSVC_BASE_OPTIONS} ${MSVC_EXTRA_OPTIONS}")
113
+ ENDIF()
114
+
115
+ IF (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
116
+ # SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" -fuse-ld=lld)
117
+ ENDIF()
118
+
119
+ # target_include_directories(preprocessor PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/pya2l/extensions>)
120
+ # target_link_libraries(preprocessor pybind11::headers)
121
+ # set_target_properties(preprocessor PROPERTIES INTERPROCEDURAL_OPTIMIZATION ON CXX_VISIBILITY_PRESET ON VISIBILITY_INLINES_HIDDEN ON)
122
+
123
+ install(TARGETS rekorder LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/recorder)
124
+ install(TARGETS cpp_ext LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/cpp_ext)
125
+ install(TARGETS stim LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/daq_stim)
126
+ # install(TARGETS asamkeydll LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/)
@@ -1,29 +1,43 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: pyxcp
3
- Version: 0.21.10
3
+ Version: 0.22.23
4
4
  Summary: Universal Calibration Protocol for Python
5
+ License: LGPLv3
5
6
  Keywords: automotive,ecu,xcp,asam,autosar
6
7
  Author: Christoph Schueler
7
- Author-email: cpu12.gems@googlemail.com
8
- Requires-Python: >=3.7
8
+ Author-email: cpu.gems@googlemail.com
9
+ Requires-Python: >=3.8.1,<4.0.0
9
10
  Classifier: Development Status :: 5 - Production/Stable
10
11
  Classifier: Intended Audience :: Developers
11
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.9
12
16
  Classifier: Programming Language :: Python :: 3.10
13
17
  Classifier: Programming Language :: Python :: 3.11
14
18
  Classifier: Programming Language :: Python :: 3.12
15
- Classifier: Programming Language :: Python :: 3.7
19
+ Classifier: Programming Language :: Python :: 3.13
16
20
  Classifier: Programming Language :: Python :: 3.8
17
- Classifier: Programming Language :: Python :: 3.9
18
21
  Classifier: Topic :: Scientific/Engineering
19
22
  Classifier: Topic :: Software Development
20
- Provides-Extra: doc
21
- Project-URL: homepage, https://github.com/christoph2/pyxcp
23
+ Requires-Dist: bandit (>=1.7.8,<2.0.0)
24
+ Requires-Dist: chardet (>=5.2.0,<6.0.0)
25
+ Requires-Dist: construct (>=2.10.68,<3.0.0)
26
+ Requires-Dist: line-profiler-pycharm (>=1.1.0,<2.0.0)
27
+ Requires-Dist: mako (>=1.2.4,<2.0.0)
28
+ Requires-Dist: pyserial (>=3.5,<4.0)
29
+ Requires-Dist: python-can (>=4.2.2,<5.0.0)
30
+ Requires-Dist: pytz (>=2024.1,<2025.0)
31
+ Requires-Dist: pyusb (>=1.2.1,<2.0.0)
32
+ Requires-Dist: rich (>=13.6.0,<14.0.0)
33
+ Requires-Dist: toml (>=0.10.2,<0.11.0)
34
+ Requires-Dist: tomlkit (>=0.12.5,<0.13.0)
35
+ Requires-Dist: traitlets (<=5.11.2)
36
+ Requires-Dist: uptime (>=3.0.1,<4.0.0)
37
+ Project-URL: Homepage, https://github.com/christoph2/pyxcp
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,157 @@
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
+ if uname.system == "Windows":
46
+ base = get_python_base()
47
+ library = f"python{pynd}.lib"
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
+ library = VARS["LIBRARY"]
59
+ DIR_VARS = ("LIBDIR", "BINLIBDEST", "DESTLIB", "LIBDEST", "MACHDESTLIB", "DESTSHARED", "LIBPL")
60
+ arch = None
61
+ if uname.system == "Linux":
62
+ arch = VARS.get("MULTIARCH", "")
63
+ found = False
64
+ for dir_var in DIR_VARS:
65
+ if found:
66
+ break
67
+ dir_name = VARS.get(dir_var)
68
+ if not dir_name:
69
+ continue
70
+ if uname.system == "Darwin":
71
+ full_path = [Path(dir_name) / library]
72
+ elif uname.system == "Linux":
73
+ full_path = [Path(dir_name) / arch / library, Path(dir_name) / library]
74
+ else:
75
+ print("PF?", uname.system)
76
+ for fp in full_path:
77
+ print(f"Trying '{fp}'")
78
+ if fp.exists():
79
+ print(f"found Python library: '{fp}'")
80
+ libdir = str(fp.parent)
81
+ found = True
82
+ break
83
+ if not found:
84
+ print("Could NOT locate Python library.")
85
+ return dict(exe=sys.executable, include=include, libdir="", library=library)
86
+ return dict(exe=sys.executable, include=include, libdir=libdir, library=library)
87
+
88
+
89
+ def banner(msg: str) -> None:
90
+ print("=" * 80)
91
+ print(str.center(msg, 80))
92
+ print("=" * 80)
93
+
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
+
103
+ def build_extension(debug: bool = False, use_temp_dir: bool = False) -> None:
104
+ print("build_ext::build_extension()")
105
+
106
+ use_temp_dir = use_temp_dir or get_env_bool("BUILD_TEMP")
107
+ debug = debug or get_env_bool("BUILD_DEBUG")
108
+
109
+ cfg = "Debug" if debug else "Release"
110
+ print(f" BUILD-TYPE: {cfg!r}")
111
+
112
+ py_cfg = get_py_config()
113
+
114
+ cmake_args = [
115
+ f"-DPython3_EXECUTABLE={py_cfg['exe']}",
116
+ f"-DPython3_INCLUDE_DIR={py_cfg['include']}",
117
+ f"-DCMAKE_BUILD_TYPE={cfg}", # not used on MSVC, but no harm
118
+ ]
119
+ if py_cfg["libdir"]:
120
+ cmake_args.append(f"-DPython3_LIBRARY={str(Path(py_cfg['libdir']) / Path(py_cfg['library']))}")
121
+
122
+ build_args = ["--config Release", "--verbose"]
123
+ # cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 /path/to/src
124
+
125
+ if sys.platform.startswith("darwin"):
126
+ # Cross-compile support for macOS - respect ARCHFLAGS if set
127
+ archs = re.findall(r"-arch (\S+)", os.environ.get("ARCHFLAGS", ""))
128
+ if archs:
129
+ cmake_args += ["-DCMAKE_OSX_ARCHITECTURES={}".format(";".join(archs))]
130
+
131
+ if use_temp_dir:
132
+ build_temp = Path(TemporaryDirectory(suffix=".build-temp").name) / "extension_it_in"
133
+ else:
134
+ build_temp = Path(".")
135
+ # print("cwd:", os.getcwd(), "build-dir:", build_temp, "top:", str(TOP_DIR))
136
+ if not build_temp.exists():
137
+ build_temp.mkdir(parents=True)
138
+
139
+ banner("Step #1: Configure")
140
+ # cmake_args += ["--debug-output"]
141
+ subprocess.run(["cmake", "-S", str(TOP_DIR), *cmake_args], cwd=build_temp, check=True) # nosec
142
+
143
+ cmake_args += [f"--parallel {mp.cpu_count()}"]
144
+
145
+ banner("Step #2: Build")
146
+ # build_args += ["-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"]
147
+ subprocess.run(["cmake", "--build", str(build_temp), *build_args], cwd=TOP_DIR, check=True) # nosec
148
+
149
+ banner("Step #3: Install")
150
+ # subprocess.run(["cmake", "--install", "."], cwd=build_temp, check=True) # nosec
151
+ subprocess.run(["cmake", "--install", build_temp], cwd=TOP_DIR, check=True) # nosec
152
+
153
+
154
+ if __name__ == "__main__":
155
+ includes = subprocess.getoutput("pybind11-config --cmakedir") # nosec
156
+ os.environ["pybind11_DIR"] = includes
157
+ build_extension(use_temp_dir=False)
@@ -0,0 +1,205 @@
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.23"
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
+ xcp-examples = "pyxcp.scripts.xcp_examples:main"
105
+
106
+ [tool.pytest]
107
+ addopts = "--verbose --tb=short --junitxml=result.xml -o junit_family=xunit2"
108
+ testpaths = "pyxcp/tests"
109
+
110
+ [tool.isort]
111
+ profile = "black"
112
+ force_single_line = false
113
+ lines_after_imports = 2
114
+
115
+ [tool.mypy]
116
+ strict = false
117
+ warn_unreachable = true
118
+ pretty = true
119
+ show_column_numbers = true
120
+ show_error_context = true
121
+
122
+ [tool.flake8]
123
+ ignore = ["D203", "E203", "E266", "E501", "W503", "F403", "F401", "BLK100"]
124
+ exclude = '''
125
+ /(
126
+ \.git
127
+ | __pycache__
128
+ | __pypackages__
129
+ | \.mypy_cache
130
+ | \.tox
131
+ | \.venv
132
+ | \.eggs
133
+ | _build
134
+ | build
135
+ | docs
136
+ | dist
137
+ | experimental
138
+ )/
139
+ '''
140
+ max-complexity = 10
141
+ count = true
142
+ statistics = true
143
+ show-source = true
144
+ max-line-length = 132
145
+ select = ["B","C","E","F","W","T4","B9"]
146
+ # extend-select = "B950"
147
+ extend-ignore = ["E203", "E501", "E701"]
148
+
149
+ [tool.ruff]
150
+ line-length = 132
151
+
152
+ [tool.black]
153
+ line-length=132
154
+ include = '\.pyi?$'
155
+ exclude = '''
156
+ /(
157
+ \.git
158
+ | \.mypy_cache
159
+ | \.tox
160
+ | \.venv
161
+ | _build
162
+ | build
163
+ | docs
164
+ | experimental
165
+ | __pycache__
166
+ | __pypackages__
167
+ | dist
168
+ )/
169
+ '''
170
+
171
+ [tool.cibuildwheel]
172
+ build-verbosity = 3
173
+ #test-command = "pytest {package}/tests"
174
+
175
+ build = "cp3{8,9,10,11,12,13}-*"
176
+ skip = ["*-manylinux_i686", "*-musllinux_x86_64", "*-musllinux_i686", "cp38-manylinux*"]
177
+ build-frontend = "build"
178
+
179
+ [tool.cibuildwheel.macos]
180
+ archs = ["x86_64", "universal2", "arm64"]
181
+
182
+ [tool.cibuildwheel.windows]
183
+ archs = ["AMD64"] # , "ARM64"
184
+
185
+ [tool.cibuildwheel.linux]
186
+ # archs = ["auto", "aarch64"]
187
+ archs = ["x86_64", "aarch64"]
188
+ # before-all = "yum install -y libffi openssl openssl-devel gcc libpython3-dev"
189
+ manylinux-x86_64-image = "manylinux_2_28"
190
+
191
+ [tool.pyright]
192
+ include = ["pyxcp", "build_ext.py"]
193
+ ignore = ["pyxcp/recorder/converter/**", "pyxcp/recorder/simdjson/**","pyxcp/recorder/mio/**", "pyxcp/recorder/lz4/**"]
194
+ #defineConstant = { DEBUG = true }
195
+ #stubPath = "src/stubs"
196
+
197
+ reportMissingImports = true
198
+ reportMissingTypeStubs = false
199
+
200
+ #executionEnvironments = [
201
+ # { root = "src/web", pythonVersion = "3.5", pythonPlatform = "Windows", extraPaths = [ "src/service_libs" ] },
202
+ # { root = "src/sdk", pythonVersion = "3.0", extraPaths = [ "src/backend" ] },
203
+ # { root = "src/tests", extraPaths = ["src/tests/e2e", "src/sdk" ]},
204
+ # { root = "src" }
205
+ #]
@@ -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.23"
@@ -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