pyxcp 0.22.1__cp38-cp38-macosx_13_0_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (126) hide show
  1. CMakeLists.txt +117 -0
  2. pyxcp/__init__.py +20 -0
  3. pyxcp/aml/EtasCANMonitoring.a2l +82 -0
  4. pyxcp/aml/EtasCANMonitoring.aml +67 -0
  5. pyxcp/aml/XCP_Common.aml +408 -0
  6. pyxcp/aml/XCPonCAN.aml +78 -0
  7. pyxcp/aml/XCPonEth.aml +33 -0
  8. pyxcp/aml/XCPonFlx.aml +113 -0
  9. pyxcp/aml/XCPonSxI.aml +66 -0
  10. pyxcp/aml/XCPonUSB.aml +106 -0
  11. pyxcp/aml/ifdata_CAN.a2l +20 -0
  12. pyxcp/aml/ifdata_Eth.a2l +11 -0
  13. pyxcp/aml/ifdata_Flx.a2l +94 -0
  14. pyxcp/aml/ifdata_SxI.a2l +13 -0
  15. pyxcp/aml/ifdata_USB.a2l +81 -0
  16. pyxcp/asam/__init__.py +0 -0
  17. pyxcp/asam/types.py +131 -0
  18. pyxcp/asamkeydll.c +116 -0
  19. pyxcp/asamkeydll.sh +2 -0
  20. pyxcp/checksum.py +722 -0
  21. pyxcp/cmdline.py +52 -0
  22. pyxcp/config/__init__.py +1089 -0
  23. pyxcp/config/legacy.py +120 -0
  24. pyxcp/constants.py +47 -0
  25. pyxcp/cpp_ext/__init__.py +8 -0
  26. pyxcp/cpp_ext/bin.hpp +104 -0
  27. pyxcp/cpp_ext/blockmem.hpp +58 -0
  28. pyxcp/cpp_ext/cpp_ext.cpython-312-darwin.so +0 -0
  29. pyxcp/cpp_ext/daqlist.hpp +197 -0
  30. pyxcp/cpp_ext/event.hpp +67 -0
  31. pyxcp/cpp_ext/extension_wrapper.cpp +94 -0
  32. pyxcp/cpp_ext/helper.hpp +264 -0
  33. pyxcp/cpp_ext/mcobject.hpp +241 -0
  34. pyxcp/cpp_ext/tsqueue.hpp +46 -0
  35. pyxcp/daq_stim/__init__.py +226 -0
  36. pyxcp/daq_stim/optimize/__init__.py +67 -0
  37. pyxcp/daq_stim/optimize/binpacking.py +41 -0
  38. pyxcp/daq_stim/scheduler.cpp +28 -0
  39. pyxcp/daq_stim/scheduler.hpp +75 -0
  40. pyxcp/daq_stim/stim.cpp +13 -0
  41. pyxcp/daq_stim/stim.cpython-312-darwin.so +0 -0
  42. pyxcp/daq_stim/stim.hpp +604 -0
  43. pyxcp/daq_stim/stim_wrapper.cpp +48 -0
  44. pyxcp/dllif.py +95 -0
  45. pyxcp/errormatrix.py +878 -0
  46. pyxcp/examples/conf_can.toml +19 -0
  47. pyxcp/examples/conf_can_user.toml +16 -0
  48. pyxcp/examples/conf_can_vector.json +11 -0
  49. pyxcp/examples/conf_can_vector.toml +11 -0
  50. pyxcp/examples/conf_eth.toml +9 -0
  51. pyxcp/examples/conf_nixnet.json +20 -0
  52. pyxcp/examples/conf_socket_can.toml +12 -0
  53. pyxcp/examples/conf_sxi.json +9 -0
  54. pyxcp/examples/conf_sxi.toml +7 -0
  55. pyxcp/examples/ex_arrow.py +109 -0
  56. pyxcp/examples/ex_mdf.py +124 -0
  57. pyxcp/examples/ex_sqlite.py +128 -0
  58. pyxcp/examples/run_daq.py +146 -0
  59. pyxcp/examples/xcp_policy.py +60 -0
  60. pyxcp/examples/xcp_read_benchmark.py +38 -0
  61. pyxcp/examples/xcp_skel.py +49 -0
  62. pyxcp/examples/xcp_unlock.py +38 -0
  63. pyxcp/examples/xcp_user_supplied_driver.py +54 -0
  64. pyxcp/examples/xcphello.py +79 -0
  65. pyxcp/examples/xcphello_recorder.py +107 -0
  66. pyxcp/master/__init__.py +9 -0
  67. pyxcp/master/errorhandler.py +436 -0
  68. pyxcp/master/master.py +2029 -0
  69. pyxcp/py.typed +0 -0
  70. pyxcp/recorder/__init__.py +102 -0
  71. pyxcp/recorder/build_clang.cmd +1 -0
  72. pyxcp/recorder/build_clang.sh +2 -0
  73. pyxcp/recorder/build_gcc.cmd +1 -0
  74. pyxcp/recorder/build_gcc.sh +2 -0
  75. pyxcp/recorder/build_gcc_arm.sh +2 -0
  76. pyxcp/recorder/converter/__init__.py +37 -0
  77. pyxcp/recorder/lz4.c +2829 -0
  78. pyxcp/recorder/lz4.h +879 -0
  79. pyxcp/recorder/lz4hc.c +2041 -0
  80. pyxcp/recorder/lz4hc.h +413 -0
  81. pyxcp/recorder/mio.hpp +1714 -0
  82. pyxcp/recorder/reader.hpp +139 -0
  83. pyxcp/recorder/reco.py +277 -0
  84. pyxcp/recorder/recorder.rst +0 -0
  85. pyxcp/recorder/rekorder.cpp +59 -0
  86. pyxcp/recorder/rekorder.cpython-312-darwin.so +0 -0
  87. pyxcp/recorder/rekorder.hpp +274 -0
  88. pyxcp/recorder/setup.py +41 -0
  89. pyxcp/recorder/test_reko.py +34 -0
  90. pyxcp/recorder/unfolder.hpp +1249 -0
  91. pyxcp/recorder/wrap.cpp +189 -0
  92. pyxcp/recorder/writer.hpp +302 -0
  93. pyxcp/scripts/__init__.py +0 -0
  94. pyxcp/scripts/pyxcp_probe_can_drivers.py +20 -0
  95. pyxcp/scripts/xcp_fetch_a2l.py +40 -0
  96. pyxcp/scripts/xcp_id_scanner.py +19 -0
  97. pyxcp/scripts/xcp_info.py +109 -0
  98. pyxcp/scripts/xcp_profile.py +27 -0
  99. pyxcp/stim/__init__.py +0 -0
  100. pyxcp/tests/test_asam_types.py +24 -0
  101. pyxcp/tests/test_binpacking.py +184 -0
  102. pyxcp/tests/test_can.py +1324 -0
  103. pyxcp/tests/test_checksum.py +95 -0
  104. pyxcp/tests/test_daq.py +188 -0
  105. pyxcp/tests/test_frame_padding.py +153 -0
  106. pyxcp/tests/test_master.py +2006 -0
  107. pyxcp/tests/test_transport.py +64 -0
  108. pyxcp/tests/test_utils.py +30 -0
  109. pyxcp/timing.py +60 -0
  110. pyxcp/transport/__init__.py +10 -0
  111. pyxcp/transport/base.py +436 -0
  112. pyxcp/transport/base_transport.hpp +0 -0
  113. pyxcp/transport/can.py +443 -0
  114. pyxcp/transport/eth.py +219 -0
  115. pyxcp/transport/sxi.py +133 -0
  116. pyxcp/transport/transport_wrapper.cpp +0 -0
  117. pyxcp/transport/usb_transport.py +213 -0
  118. pyxcp/types.py +993 -0
  119. pyxcp/utils.py +102 -0
  120. pyxcp/vector/__init__.py +0 -0
  121. pyxcp/vector/map.py +82 -0
  122. pyxcp-0.22.1.dist-info/LICENSE +165 -0
  123. pyxcp-0.22.1.dist-info/METADATA +107 -0
  124. pyxcp-0.22.1.dist-info/RECORD +126 -0
  125. pyxcp-0.22.1.dist-info/WHEEL +4 -0
  126. pyxcp-0.22.1.dist-info/entry_points.txt +7 -0
CMakeLists.txt ADDED
@@ -0,0 +1,117 @@
1
+
2
+ cmake_minimum_required(VERSION 3.7...3.29)
3
+ project(pyxcp_extensions LANGUAGES C CXX)
4
+
5
+ find_package(Python COMPONENTS Interpreter Development)
6
+ find_package(pybind11 CONFIG)
7
+
8
+ SET(CMAKE_C_STANDARD 17)
9
+ set(CMAKE_CXX_STANDARD 23)
10
+
11
+ message( STATUS "Found pybind11 v${pybind11_VERSION} ${pybind11_VERSION_TYPE}: ${pybind11_INCLUDE_DIRS}")
12
+
13
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/dist")
14
+
15
+
16
+ SET(GCC_N_CLANG_BASE_OPTIONS "-std=c++23 -Wall -Wextra -Wpedantic -Warray-bounds -mtune=native -fexceptions")
17
+
18
+ SET(MSVC_BASE_OPTIONS "/W3 /permissive- /EHsc /bigobj /Zc:__cplusplus /std:c++latest")
19
+
20
+
21
+
22
+ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
23
+ if (MSVC)
24
+ SET(MSVC_BASE_OPTIONS "${MSVC_BASE_OPTIONS} /Od /fsanitize=address /Zi")
25
+ else()
26
+ SET(MSVC_BASE_OPTIONS "${MSVC_BASE_OPTIONS} -Og -g3 -ggdb --fno-omit-frame-pointer -fsanitize=address -fsanitize=undefined -fsanitize=bounds") # -fsanitize=hwaddress
27
+ endif()
28
+ else ()
29
+ if (MSVC)
30
+ SET(MSVC_BASE_OPTIONS "${MSVC_BASE_OPTIONS} /Ox")
31
+ else()
32
+ SET(MSVC_BASE_OPTIONS "${MSVC_BASE_OPTIONS} -O3 --fomit-frame-pointer")
33
+ endif()
34
+ endif ()
35
+
36
+
37
+ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
38
+ set(ENV{MACOSX_DEPLOYMENT_TARGET} "11.0")
39
+ SET(GCC_N_CLANG_EXTRA_OPTIONS "-stdlib=libc++")
40
+ message("Platform is Darwin")
41
+ elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
42
+ message("Platform is WINDOWS")
43
+ SET(MSVC_EXTRA_OPTIONS "")
44
+ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
45
+ SET(GCC_N_CLANG_EXTRA_OPTIONS "-fvisibility=hidden -g0") # -fcoroutines
46
+ message("Platform is LINUX")
47
+ endif()
48
+
49
+
50
+ IF (CMAKE_C_COMPILER_ID STREQUAL "GNU")
51
+
52
+ ELSEIF (CMAKE_C_COMPILER_ID MATCHES "Clang")
53
+
54
+ ELSEIF (CMAKE_C_COMPILER_ID MATCHES "MSVC")
55
+
56
+ ELSE ()
57
+
58
+ ENDIF ()
59
+
60
+ IF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
61
+
62
+ ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
63
+
64
+ ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
65
+
66
+ ELSE ()
67
+
68
+
69
+ ENDIF ()
70
+
71
+ message("Compiling C with: " ${CMAKE_C_COMPILER_ID})
72
+ message("Compiling Cpp with: " ${CMAKE_CXX_COMPILER_ID})
73
+
74
+ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
75
+
76
+ set(EXTENSION_INCS ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/cpp_ext)
77
+
78
+ pybind11_add_module(rekorder pyxcp/recorder/wrap.cpp pyxcp/recorder/lz4.c pyxcp/recorder/lz4hc.c)
79
+ pybind11_add_module(cpp_ext pyxcp/cpp_ext/extension_wrapper.cpp)
80
+ pybind11_add_module(stim pyxcp/daq_stim/stim_wrapper.cpp pyxcp/daq_stim/stim.cpp pyxcp/daq_stim/scheduler.cpp)
81
+
82
+ target_include_directories(rekorder PRIVATE ${EXTENSION_INCS} ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/recorder)
83
+ target_include_directories(cpp_ext PRIVATE ${EXTENSION_INCS})
84
+ target_include_directories(stim PRIVATE ${EXTENSION_INCS} ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/daq_stim)
85
+
86
+ target_compile_options(rekorder PUBLIC "-DEXTENSION_NAME=pyxcp.recorder.rekorder")
87
+ target_compile_options(cpp_ext PUBLIC "-DEXTENSION_NAME=pyxcp.cpp_ext.cpp_ext")
88
+ target_compile_options(stim PUBLIC "-DEXTENSION_NAME=pyxcp.daq_stim.stim")
89
+
90
+ add_executable(asamkeydll ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/asamkeydll.c)
91
+ # set_target_properties(MyTarget PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
92
+
93
+ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
94
+ # CMAKE_SYSTEM_NAME STREQUAL "Windows"
95
+ endif()
96
+
97
+ IF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
98
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_N_CLANG_BASE_OPTIONS} ${GCC_N_CLANG_EXTRA_OPTIONS}")
99
+ target_link_options(cpp_ext PUBLIC -flto=auto)
100
+ target_link_options(stim PUBLIC -flto=auto)
101
+ target_link_options(rekorder PUBLIC -flto=auto)
102
+ ELSEIF (CMAKE_C_COMPILER_ID MATCHES "MSVC")
103
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MSVC_BASE_OPTIONS} ${MSVC_EXTRA_OPTIONS}")
104
+ ENDIF()
105
+
106
+ IF (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
107
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" -fuse-ld=lld)
108
+ ENDIF()
109
+
110
+ # target_include_directories(preprocessor PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/pya2l/extensions>)
111
+ # target_link_libraries(preprocessor pybind11::headers)
112
+ # set_target_properties(preprocessor PROPERTIES INTERPROCEDURAL_OPTIMIZATION ON CXX_VISIBILITY_PRESET ON VISIBILITY_INLINES_HIDDEN ON)
113
+
114
+ install(TARGETS rekorder LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/recorder)
115
+ install(TARGETS cpp_ext LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/cpp_ext)
116
+ install(TARGETS stim LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/daq_stim)
117
+ # install(TARGETS asamkeydll LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/pyxcp/)
pyxcp/__init__.py ADDED
@@ -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.1"
@@ -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
@@ -0,0 +1,67 @@
1
+ /*******************************************************************/
2
+ /* */
3
+ /* ASAP2 Meta Language for CAN-Monitoring V1.1 */
4
+ /* Assumes ASAP2 V1.121 */
5
+ /* */
6
+ /* ETAS GmbH */
7
+ /* */
8
+ /* Datatypes: */
9
+ /* */
10
+ /* A2ML ASAP2 Windows Erlaeuuterung */
11
+ /* ------------------------------------------------------- */
12
+ /* uchar UBYTE BYTE unsigned 8 Bit */
13
+ /* char SBYTE char signed 8 Bit */
14
+ /* uint UWORD WORD unsigned integer 16 Bit */
15
+ /* int SWORD int signed integer 16 Bit */
16
+ /* ulong ULONG DWORD unsigned integer 32 Bit */
17
+ /* long SLONG LONG signed integer 32 Bit */
18
+ /* float FLOAT32_IEEE float 32 Bit */
19
+ /* */
20
+ /*******************************************************************/
21
+
22
+
23
+ taggedunion IF_DATA
24
+ {
25
+ "CAN_MONITORING" taggedstruct
26
+ {
27
+ block �TP_BLOB� struct
28
+ {
29
+ ulong; /* Baudrate in kBaud */
30
+ };
31
+ };
32
+ };
33
+
34
+
35
+
36
+
37
+ taggedunion IF_DATA
38
+ {
39
+ "CAN_MONITORING" taggedstruct
40
+ {
41
+ block "QP_BLOB" struct
42
+ {
43
+ long; /* Message identifier */
44
+ char; /* Identifier length */
45
+ char; /* Message length */
46
+ };
47
+ };
48
+ };
49
+
50
+ taggedunion IF_DATA
51
+ {
52
+ "CAN_MONITORING" taggedstruct {
53
+ block "KP_BLOB" struct {
54
+ char; /* Start bit */
55
+ char; /* Number of bits */
56
+ taggedstruct {
57
+ "MULTIPLEX" struct{
58
+ char; /* Start bit */
59
+ char; /* Number of bits */
60
+ char; /* Type and sign */
61
+ char; /* Byte order */
62
+ long; /* Tag */
63
+ };
64
+ };
65
+ };
66
+ };
67
+ };
@@ -0,0 +1,408 @@
1
+ /************************************************************************************/
2
+ /* */
3
+ /* ASAP2 meta language for XCP protocol layer V1.0 */
4
+ /* */
5
+ /* 2003-03-03 */
6
+ /* */
7
+ /* Vector Informatik, Schuermans */
8
+ /* */
9
+ /* Datatypes: */
10
+ /* */
11
+ /* A2ML ASAP2 Windows description */
12
+ /* ---------------------------------------------------------------------------------*/
13
+ /* uchar UBYTE BYTE unsigned 8 Bit */
14
+ /* char SBYTE char signed 8 Bit */
15
+ /* uint UWORD WORD unsigned integer 16 Bit */
16
+ /* int SWORD int signed integer 16 Bit */
17
+ /* ulong ULONG DWORD unsigned integer 32 Bit */
18
+ /* long SLONG LONG signed integer 32 Bit */
19
+ /* float FLOAT32_IEEE float 32 Bit */
20
+ /* */
21
+ /************************************************************************************/
22
+
23
+ /*********************** start of PROTOCOL_LAYER ****************************/
24
+
25
+ struct Protocol_Layer { /* At MODULE */
26
+ uint; /* XCP protocol layer version */
27
+ /* e.g. "1.0" = 0x0100 */
28
+ uint; /* T1 [ms] */
29
+ uint; /* T2 [ms] */
30
+ uint; /* T3 [ms] */
31
+ uint; /* T4 [ms] */
32
+ uint; /* T5 [ms] */
33
+ uint; /* T6 [ms] */
34
+ uint; /* T7 [ms] */
35
+ uchar; /* MAX_CTO */
36
+ uint; /* MAX_DTO */
37
+ enum { /* BYTE_ORDER */
38
+ "BYTE_ORDER_MSB_LAST" = 0,
39
+ "BYTE_ORDER_MSB_FIRST" = 1
40
+ };
41
+ enum { /* ADDRESS_GRANULARITY */
42
+ "ADDRESS_GRANULARITY_BYTE" = 1,
43
+ "ADDRESS_GRANULARITY_WORD" = 2,
44
+ "ADDRESS_GRANULARITY_DWORD" = 4
45
+ };
46
+
47
+ taggedstruct { /* optional */
48
+ ("OPTIONAL_CMD" enum { /* XCP-Code of optional command */
49
+ /* supported by the slave */
50
+ "GET_COMM_MODE_INFO" = 0xFB,
51
+ "GET_ID" = 0xFA,
52
+ "SET_REQUEST" = 0xF9,
53
+ "GET_SEED" = 0xF8,
54
+ "UNLOCK" = 0xF7,
55
+ "SET_MTA" = 0xF6,
56
+ "UPLOAD" = 0xF5,
57
+ "SHORT_UPLOAD" = 0xF4,
58
+ "BUILD_CHECKSUM" = 0xF3,
59
+ "TRANSPORT_LAYER_CMD" = 0xF2,
60
+ "USER_CMD" = 0xF1,
61
+ "DOWNLOAD" = 0xF0,
62
+ "DOWNLOAD_NEXT" = 0xEF,
63
+ "DOWNLOAD_MAX" = 0xEE,
64
+ "SHORT_DOWNLOAD" = 0xED,
65
+ "MODIFY_BITS" = 0xEC,
66
+ "SET_CAL_PAGE" = 0xEB,
67
+ "GET_CAL_PAGE" = 0xEA,
68
+ "GET_PAG_PROCESSOR_INFO" = 0xE9,
69
+ "GET_SEGMENT_INFO" = 0xE8,
70
+ "GET_PAGE_INFO" = 0xE7,
71
+ "SET_SEGMENT_MODE" = 0xE6,
72
+ "GET_SEGMENT_MODE" = 0xE5,
73
+ "COPY_CAL_PAGE" = 0xE4,
74
+ "CLEAR_DAQ_LIST" = 0xE3,
75
+ "SET_DAQ_PTR" = 0xE2,
76
+ "WRITE_DAQ" = 0xE1,
77
+ "SET_DAQ_LIST_MODE" = 0xE0,
78
+ "GET_DAQ_LIST_MODE" = 0xDF,
79
+ "START_STOP_DAQ_LIST" = 0xDE,
80
+ "START_STOP_SYNCH" = 0xDD,
81
+ "GET_DAQ_CLOCK" = 0xDC,
82
+ "READ_DAQ" = 0xDB,
83
+ "GET_DAQ_PROCESSOR_INFO" = 0xDA,
84
+ "GET_DAQ_RESOLUTION_INFO" = 0xD9,
85
+ "GET_DAQ_LIST_INFO" = 0xD8,
86
+ "GET_DAQ_EVENT_INFO" = 0xD7,
87
+ "FREE_DAQ" = 0xD6,
88
+ "ALLOC_DAQ" = 0xD5,
89
+ "ALLOC_ODT" = 0xD4,
90
+ "ALLOC_ODT_ENTRY" = 0xD3,
91
+ "PROGRAM_START" = 0xD2,
92
+ "PROGRAM_CLEAR" = 0xD1,
93
+ "PROGRAM" = 0xD0,
94
+ "PROGRAM_RESET" = 0xCF,
95
+ "GET_PGM_PROCESSOR_INFO" = 0xCE,
96
+ "GET_SECTOR_INFO" = 0xCD,
97
+ "PROGRAM_PREPARE" = 0xCC,
98
+ "PROGRAM_FORMAT" = 0xCB,
99
+ "PROGRAM_NEXT" = 0xCA,
100
+ "PROGRAM_MAX" = 0xC9,
101
+ "PROGRAM_VERIFY" = 0xC8,
102
+ "WRITE_DAQ_MULTIPLE" = 0xC7
103
+ })*;
104
+ �COMMUNICATION_MODE_SUPPORTED� taggedunion { /* optional modes supported */
105
+ � BLOCK� taggedstruct {
106
+ "SLAVE"; /* Slave Block Mode supported */
107
+ "MASTER" struct { /* Master Block Mode supported */
108
+ uchar; /* MAX_BS */
109
+ uchar; /* MIN_ST */
110
+ };
111
+ };
112
+ "INTERLEAVED" uchar; /* QUEUE_SIZE */
113
+ };
114
+ "SEED_AND_KEY_EXTERNAL_FUNCTION" char[256]; /* Name of the Seed&Key function */
115
+ /* including file extension */
116
+ /* without path */
117
+ };
118
+ };
119
+ /********************* end of PROTOCOL_LAYER *****************************/
120
+
121
+ /***************************** start of DAQ *********************************/
122
+ struct Daq { /* DAQ supported, at MODULE*/
123
+ enum { /* DAQ_CONFIG_TYPE */
124
+ "STATIC" = 0,
125
+ "DYNAMIC" = 1
126
+ };
127
+ uint; /* MAX_DAQ */
128
+ uint; /* MAX_EVENT_CHANNEL */
129
+ uchar; /* MIN_DAQ */
130
+ enum { /* OPTIMISATION_TYPE */
131
+ "OPTIMISATION_TYPE_DEFAULT" = 0,
132
+ "OPTIMISATION_TYPE_ODT_TYPE_16" = 1,
133
+ "OPTIMISATION_TYPE_ODT_TYPE_32" = 2,
134
+ "OPTIMISATION_TYPE_ODT_TYPE_64" = 3,
135
+ "OPTIMISATION_TYPE_ODT_TYPE_ALIGNMENT" = 4,
136
+ "OPTIMISATION_TYPE_MAX_ENTRY_SIZE" = 5
137
+ };
138
+ enum { /* ADDRESS_EXTENSION */
139
+ "ADDRESS_EXTENSION_FREE" = 0,
140
+ "ADDRESS_EXTENSION_ODT" = 1,
141
+ "ADDRESS_EXTENSION_DAQ" = 3
142
+ };
143
+ enum { /* IDENTIFICATION_FIELD */
144
+ "IDENTIFICATION_FIELD_TYPE_ABSOLUTE" = 0,
145
+ "IDENTIFICATION_FIELD_TYPE_RELATIVE_BYTE" = 1,
146
+ "IDENTIFICATION_FIELD_TYPE_RELATIVE_WORD" = 2,
147
+ "IDENTIFICATION_FIELD_TYPE_RELATIVE_WORD_ALIGNED" = 3
148
+ };
149
+ enum { /* GRANULARITY_ODT_ENTRY_SIZE_DAQ */
150
+ "GRANULARITY_ODT_ENTRY_SIZE_DAQ_BYTE" = 1,
151
+ "GRANULARITY_ODT_ENTRY_SIZE_DAQ_WORD" = 2,
152
+ "GRANULARITY_ODT_ENTRY_SIZE_DAQ_DWORD" = 4,
153
+ "GRANULARITY_ODT_ENTRY_SIZE_DAQ_DLONG" = 8
154
+ };
155
+ uchar; /* MAX_ODT_ENTRY_SIZE_DAQ */
156
+ enum { /* OVERLOAD_INDICATION */
157
+ "NO_OVERLOAD_INDICATION" = 0,
158
+ "OVERLOAD_INDICATION_PID" = 1,
159
+ "OVERLOAD_INDICATION_EVENT" = 2
160
+ };
161
+
162
+ taggedstruct { /* optional */
163
+ "DAQ_ALTERNATING_SUPPORTED" uint; /* Display_Event_Channel_Number */
164
+ "PRESCALER_SUPPORTED";
165
+ "RESUME_SUPPORTED";
166
+ "STORE_DAQ_SUPPORTED";
167
+ block "STIM" struct { /* STIM supported */
168
+ enum { /* GRANULARITY_ODT_ENTRY_SIZE_STIM */
169
+ "GRANULARITY_ODT_ENTRY_SIZE_STIM_BYTE" = 1,
170
+ "GRANULARITY_ODT_ENTRY_SIZE_STIM_WORD" = 2,
171
+ "GRANULARITY_ODT_ENTRY_SIZE_STIM_DWORD" = 4,
172
+ "GRANULARITY_ODT_ENTRY_SIZE_STIM_DLONG" = 8
173
+ };
174
+ uchar; /* MAX_ODT_ENTRY_SIZE_STIM */
175
+ taggedstruct { /* bitwise stimulation */
176
+ "BIT_STIM_SUPPORTED";
177
+ �MIN_ST_STIM� uchar; /* separation time between DTOs */
178
+ /* time in units of 100 microseconds */
179
+ };
180
+ };
181
+
182
+ block "TIMESTAMP_SUPPORTED" struct {
183
+ uint; /* TIMESTAMP_TICKS */
184
+ enum { /* TIMESTAMP_SIZE */
185
+ "NO_TIME_STAMP" = 0,
186
+ "SIZE_BYTE" = 1,
187
+ "SIZE_WORD" = 2,
188
+ "SIZE_DWORD" = 4
189
+ };
190
+ enum { /* RESOLUTION OF TIMESTAMP */
191
+ "UNIT_1NS" = 0,
192
+ "UNIT_10NS" = 1,
193
+ "UNIT_100NS" = 2,
194
+ "UNIT_1US" = 3,
195
+ "UNIT_10US" = 4,
196
+ "UNIT_100US" = 5,
197
+ "UNIT_1MS" = 6,
198
+ "UNIT_10MS" = 7,
199
+ "UNIT_100MS" = 8,
200
+ "UNIT_1S" = 9,
201
+ �UNIT_1PS� = 10,
202
+ �UNIT_10PS� = 11,
203
+ �UNIT_100PS� = 12
204
+ };
205
+
206
+ taggedstruct {
207
+ "TIMESTAMP_FIXED";
208
+ };
209
+ };
210
+ "PID_OFF_SUPPORTED";
211
+
212
+ /************************ start of DAQ_LIST *************************/
213
+ (block "DAQ_LIST" struct { /* DAQ_LIST */
214
+ /* multiple possible */
215
+ uint; /* DAQ_LIST_NUMBER */
216
+ taggedstruct { /* optional */
217
+ "DAQ_LIST_TYPE" enum {
218
+ "DAQ" = 1, /* DIRECTION = DAQ only */
219
+ "STIM" = 2, /* DIRECTION = STIM only */
220
+ "DAQ_STIM" = 3 /* both directions possible */
221
+ /* but not simultaneously */
222
+ };
223
+ "MAX_ODT" uchar; /* MAX_ODT */
224
+ "MAX_ODT_ENTRIES" uchar; /* MAX_ODT_ENTRIES */
225
+ "FIRST_PID" uchar; /* FIRST_PID for this DAQ_LIST */
226
+ "EVENT_FIXED" uint; /* this DAQ_LIST always */
227
+ /* in this event */
228
+ block "PREDEFINED" taggedstruct { /* predefined */
229
+ /* not configurable DAQ_LIST */
230
+ (block �ODT� struct {
231
+ uchar; /* ODT number */
232
+ taggedstruct {
233
+ (�ODT_ENTRY� struct {
234
+ uchar; /* ODT_ENTRY number */
235
+ ulong; /* address of element */
236
+ uchar; /* address extension of element */
237
+ uchar; /* size of element [AG] */
238
+ uchar; /* BIT_OFFSET */
239
+ })*;
240
+ }; /* end of ODT_ENTRY */
241
+ })*; /* end of ODT */
242
+ }; /* end of PREDEFINED */
243
+ };
244
+ })*;
245
+ /********************* end of DAQ_LIST ***************************/
246
+
247
+ /************************* start of EVENT ****************************/
248
+ (block "EVENT" struct { /* EVENT */
249
+ /* multiple possible */
250
+ char[101]; /* EVENT_CHANNEL_NAME */
251
+ char[9]; /* EVENT_CHANNEL_SHORT_NAME */
252
+ uint; /* EVENT_CHANNEL_NUMBER */
253
+ enum {
254
+ "DAQ" = 1, /* only DAQ_LISTs */
255
+ /* with DIRECTION = DAQ */
256
+ "STIM" = 2, /* only DAQ_LISTs */
257
+ /* with DIRECTION = STIM */
258
+ "DAQ_STIM" = 3 /* both kind of DAQ_LISTs */
259
+ };
260
+ uchar; /* MAX_DAQ_LIST */
261
+ uchar; /* EVENT_CHANNEL_TIME_CYCLE */
262
+ uchar; /* EVENT_CHANNEL_TIME_UNIT */
263
+ uchar; /* EVENT_CHANNEL_PRIORITY */
264
+ taggedstruct { /* optional */
265
+ �COMPLEMENTARY_BYPASS_EVENT_CHANNEL_NUMBER� uint;
266
+ �CONSISTENCY� enum {
267
+ �DAQ� = 0,
268
+ �EVENT� = 1
269
+ };
270
+ };
271
+ })*;
272
+ /******************** end of EVENT ********************************/
273
+ }; /*end of optional at DAQ */
274
+ };
275
+ /************************* end of DAQ *************************************/
276
+
277
+ /**************************** start of DAQ_EVENT *****************************/
278
+ taggedunion Daq_Event { /* at MEASUREMENT */
279
+ �FIXED_EVENT_LIST� taggedstruct {
280
+ (�EVENT� uint)* ;
281
+ };
282
+ �VARIABLE� taggedstruct {
283
+ block �AVAILABLE_EVENT_LIST� taggedstruct {
284
+ (�EVENT� uint)*;
285
+ };
286
+ block �DEFAULT_EVENT_LIST� taggedstruct {
287
+ (�EVENT� uint)*;
288
+ };
289
+ };
290
+ };
291
+ /************************* end of DAQ_EVENT *******************************/
292
+
293
+ /**************************** start of PAG ***********************************/
294
+ struct Pag { /* PAG supported, at MODULE */
295
+ uchar; /* MAX_SEGMENTS */
296
+ taggedstruct { /* optional */
297
+ "FREEZE_SUPPORTED";
298
+ };
299
+ };
300
+ /************************* end of PAG *************************************/
301
+
302
+ /**************************** start of PGM ***********************************/
303
+ struct Pgm { /* PGM supported, at MODULE */
304
+ enum {
305
+ "PGM_MODE_ABSOLUTE" = 1,
306
+ "PGM_MODE_FUNCTIONAL" = 2,
307
+ "PGM_MODE_ABSOLUTE_AND_FUNCTIONAL" = 3
308
+ };
309
+ uchar; /* MAX_SECTORS */
310
+ uchar; /* MAX_CTO_PGM */
311
+ taggedstruct { /* optional */
312
+ (block "SECTOR" struct { /* SECTOR */
313
+ /* multiple possible */
314
+ char[101]; /* SECTOR_NAME */
315
+ uchar; /* SECTOR_NUMBER */
316
+ ulong; /* Address */
317
+ ulong; /* Length */
318
+ uchar; /* CLEAR_SEQUENCE_NUMBER */
319
+ uchar; /* PROGRAM_SEQUENCE_NUMBER */
320
+ uchar; /* PROGRAM_METHOD */
321
+ })*; /* end of SECTOR */
322
+ �COMMUNICATION_MODE_SUPPORTED� taggedunion { /* optional modes supported */
323
+ � BLOCK� taggedstruct {
324
+ "SLAVE"; /* Slave Block Mode supported */
325
+ "MASTER" struct { /* Master Block Mode supported */
326
+ uchar; /* MAX_BS_PGM */
327
+ uchar; /* MIN_ST_PGM */
328
+ };
329
+ };
330
+ "INTERLEAVED" uchar; /* QUEUE_SIZE_PGM */
331
+ };
332
+ };
333
+ };
334
+ /************************** end of PGM *************************************/
335
+
336
+ /***************************** start of SEGMENT *******************************/
337
+ struct Segment { /* at MEMORY_SEGMENT */
338
+ uchar; /* SEGMENT_NUMBER */
339
+ uchar; /* number of pages */
340
+ uchar; /* ADDRESS_EXTENSION */
341
+ uchar; /* COMPRESSION_METHOD */
342
+ uchar; /* ENCRYPTION_METHOD */
343
+ taggedstruct { /* optional */
344
+ block "CHECKSUM" struct {
345
+ enum { /* checksum type */
346
+ "XCP_ADD_11" = 1,
347
+ "XCP_ADD_12" = 2,
348
+ "XCP_ADD_14" = 3,
349
+ "XCP_ADD_22" = 4,
350
+ "XCP_ADD_24" = 5,
351
+ "XCP_ADD_44" = 6,
352
+ "XCP_CRC_16" = 7,
353
+ "XCP_CRC_16_CITT" = 8,
354
+ "XCP_CRC_32" = 9,
355
+ "XCP_USER_DEFINED" = 255
356
+ };
357
+ taggedstruct {
358
+ "MAX_BLOCK_SIZE" ulong ; /* maximum block size */
359
+ /* for checksum calculation */
360
+ "EXTERNAL_FUNCTION" char[256]; /* Name of the Checksum function */
361
+ /* including file extension */
362
+ /* without path */
363
+ };
364
+ };
365
+ (block "PAGE" struct { /* PAGES for this SEGMENT */
366
+ /* multiple possible */
367
+ uchar; /* PAGE_NUMBER */
368
+ enum { /* ECU_ACCESS_TYPE */
369
+ "ECU_ACCESS_NOT_ALLOWED" = 0,
370
+ "ECU_ACCESS_WITHOUT_XCP_ONLY" =1,
371
+ "ECU_ACCESS_WITH_XCP_ONLY" = 2,
372
+ "ECU_ACCESS_DONT_CARE" = 3
373
+ };
374
+ enum { /* XCP_READ_ACCESS_TYPE */
375
+ "XCP_READ_ACCESS_NOT_ALLOWED" = 0,
376
+ "XCP_READ_ACCESS_WITHOUT_ECU_ONLY" = 1,
377
+ "XCP_READ_ACCESS_WITH_ECU_ONLY" = 2,
378
+ �XCP_READ_ACCESS_DONT_CARE" = 3
379
+ };
380
+ enum { /* XCP_WRITE_ACCESS_TYPE */
381
+ "XCP_WRITE_ACCESS_NOT_ALLOWED" = 0,
382
+ "XCP_WRITE_ACCESS_WITHOUT_ECU_ONLY" = 1,
383
+ "XCP_WRITE_ACCESS_WITH_ECU_ONLY" = 2,
384
+ "XCP_WRITE_ACCESS_DONT_CARE" = 3
385
+ };
386
+ taggedstruct {
387
+ "INIT_SEGMENT" uchar; /* references segment that initialises this page */
388
+ };
389
+ })*; /* end of PAGE */
390
+ (block "ADDRESS_MAPPING" struct { /* multiple possible */
391
+ ulong; /* source address */
392
+ ulong; /* destination address */
393
+ ulong; /* length */
394
+ })*;
395
+ "PGM_VERIFY" ulong; /* verification value for PGM */
396
+ }; /* end of optional */
397
+ };
398
+ /************************** end of SEGMENT *********************************/
399
+
400
+ /*********************** start of Common Parameters ***************************/
401
+ taggedstruct Common_Parameters {
402
+ block "PROTOCOL_LAYER" struct Protocol_Layer;
403
+ block "SEGMENT" struct Segment;
404
+ block "DAQ" struct Daq;
405
+ block "PAG" struct Pag;
406
+ block "PGM" struct Pgm;
407
+ block "DAQ_EVENT" taggedunion Daq_Event;
408
+ }; /******************** end of Common Parameters *****************************/