objutils 0.10.17__tar.gz → 0.10.18__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.
Files changed (280) hide show
  1. objutils-0.10.18/.idea/objutils@1.iml +11 -0
  2. {objutils-0.10.17 → objutils-0.10.18}/PKG-INFO +1 -1
  3. {objutils-0.10.17 → objutils-0.10.18}/docs/tutorial.rst +44 -0
  4. {objutils-0.10.17 → objutils-0.10.18}/objutils/__init__.py +1 -1
  5. {objutils-0.10.17 → objutils-0.10.18}/objutils/image.py +7 -0
  6. {objutils-0.10.17 → objutils-0.10.18}/objutils/section.py +41 -5
  7. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_asam_alternate_modes.py +158 -2
  8. {objutils-0.10.17 → objutils-0.10.18}/objutils/version.py +1 -1
  9. {objutils-0.10.17 → objutils-0.10.18}/pyproject.toml +2 -2
  10. {objutils-0.10.17 → objutils-0.10.18}/.clang-format +0 -0
  11. {objutils-0.10.17 → objutils-0.10.18}/.codacy.yml +0 -0
  12. {objutils-0.10.17 → objutils-0.10.18}/.codeclimate.yml +0 -0
  13. {objutils-0.10.17 → objutils-0.10.18}/.coveralls.yml +0 -0
  14. {objutils-0.10.17 → objutils-0.10.18}/.github/FUNDING.yml +0 -0
  15. {objutils-0.10.17 → objutils-0.10.18}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  16. {objutils-0.10.17 → objutils-0.10.18}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  17. {objutils-0.10.17 → objutils-0.10.18}/.github/ISSUE_TEMPLATE/documentation.yml +0 -0
  18. {objutils-0.10.17 → objutils-0.10.18}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  19. {objutils-0.10.17 → objutils-0.10.18}/.github/ISSUE_TEMPLATE.md +0 -0
  20. {objutils-0.10.17 → objutils-0.10.18}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  21. {objutils-0.10.17 → objutils-0.10.18}/.github/copilot-instructions.md +0 -0
  22. {objutils-0.10.17 → objutils-0.10.18}/.github/workflows/pythonapp.yml +0 -0
  23. {objutils-0.10.17 → objutils-0.10.18}/.gitignore +0 -0
  24. {objutils-0.10.17 → objutils-0.10.18}/.idea/.gitignore +0 -0
  25. {objutils-0.10.17 → objutils-0.10.18}/.idea/copilot.data.migration.ask2agent.xml +0 -0
  26. {objutils-0.10.17 → objutils-0.10.18}/.idea/deployment.xml +0 -0
  27. {objutils-0.10.17 → objutils-0.10.18}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
  28. {objutils-0.10.17 → objutils-0.10.18}/.idea/misc.xml +0 -0
  29. {objutils-0.10.17 → objutils-0.10.18}/.idea/modules.xml +0 -0
  30. {objutils-0.10.17 → objutils-0.10.18}/.idea/pyLspTools.xml +0 -0
  31. {objutils-0.10.17 → objutils-0.10.18}/.idea/pyProjectModel.xml +0 -0
  32. {objutils-0.10.17 → objutils-0.10.18}/.idea/vcs.xml +0 -0
  33. {objutils-0.10.17 → objutils-0.10.18}/.pre-commit-config.yaml +0 -0
  34. {objutils-0.10.17 → objutils-0.10.18}/.pylintrc +0 -0
  35. {objutils-0.10.17 → objutils-0.10.18}/.readthedocs.yml +0 -0
  36. {objutils-0.10.17 → objutils-0.10.18}/.travis.yml +0 -0
  37. {objutils-0.10.17 → objutils-0.10.18}/CMakeLists.txt +0 -0
  38. {objutils-0.10.17 → objutils-0.10.18}/CODE_OF_CONDUCT.md +0 -0
  39. {objutils-0.10.17 → objutils-0.10.18}/CONTRIBUTORS +0 -0
  40. {objutils-0.10.17 → objutils-0.10.18}/LICENSE +0 -0
  41. {objutils-0.10.17 → objutils-0.10.18}/MANIFEST.in +0 -0
  42. {objutils-0.10.17 → objutils-0.10.18}/PULL_REQUEST_TEMPLATE.md +0 -0
  43. {objutils-0.10.17 → objutils-0.10.18}/appveyor.yml +0 -0
  44. {objutils-0.10.17 → objutils-0.10.18}/bandit.yml +0 -0
  45. {objutils-0.10.17 → objutils-0.10.18}/docs/Data_Formats.pdf +0 -0
  46. {objutils-0.10.17 → objutils-0.10.18}/docs/ELF_Format.pdf +0 -0
  47. {objutils-0.10.17 → objutils-0.10.18}/docs/KNOWN_GOOD_DWARF_REFERENCE.md +0 -0
  48. {objutils-0.10.17 → objutils-0.10.18}/docs/README.rst +0 -0
  49. {objutils-0.10.17 → objutils-0.10.18}/docs/apidoc.sh +0 -0
  50. {objutils-0.10.17 → objutils-0.10.18}/docs/conf.py +0 -0
  51. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/.buildinfo +0 -0
  52. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/.buildinfo.bak +0 -0
  53. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/.doctrees/README.doctree +0 -0
  54. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/.doctrees/environment.pickle +0 -0
  55. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/.doctrees/howto.doctree +0 -0
  56. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/.doctrees/index.doctree +0 -0
  57. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/.doctrees/installation.doctree +0 -0
  58. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/.doctrees/modules.doctree +0 -0
  59. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/.doctrees/objutils.doctree +0 -0
  60. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/.doctrees/objutils.elf.doctree +0 -0
  61. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/.doctrees/scripts.doctree +0 -0
  62. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/.doctrees/session.doctree +0 -0
  63. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/.doctrees/tutorial.doctree +0 -0
  64. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/README.html +0 -0
  65. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_images/objutils_basic.png +0 -0
  66. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/index.html +0 -0
  67. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/ash.html +0 -0
  68. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/binfile.html +0 -0
  69. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/checksums.html +0 -0
  70. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/cosmac.html +0 -0
  71. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/elf/defs.html +0 -0
  72. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/elf.html +0 -0
  73. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/emon52.html +0 -0
  74. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/etek.html +0 -0
  75. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/exceptions.html +0 -0
  76. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/fpc.html +0 -0
  77. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/hexdump.html +0 -0
  78. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/hexfile.html +0 -0
  79. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/ihex.html +0 -0
  80. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/image.html +0 -0
  81. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/logger.html +0 -0
  82. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/mostec.html +0 -0
  83. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/pickleif.html +0 -0
  84. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/rca.html +0 -0
  85. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/readers.html +0 -0
  86. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/registry.html +0 -0
  87. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/section.html +0 -0
  88. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/sig.html +0 -0
  89. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/srec.html +0 -0
  90. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/tek.html +0 -0
  91. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/titxt.html +0 -0
  92. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils/utils.html +0 -0
  93. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_modules/objutils.html +0 -0
  94. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_sources/README.rst.txt +0 -0
  95. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_sources/howto.rst.txt +0 -0
  96. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_sources/index.rst.txt +0 -0
  97. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_sources/installation.rst.txt +0 -0
  98. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_sources/modules.rst.txt +0 -0
  99. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_sources/objutils.elf.rst.txt +0 -0
  100. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_sources/objutils.rst.txt +0 -0
  101. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_sources/scripts.rst.txt +0 -0
  102. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_sources/session.rst.txt +0 -0
  103. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_sources/tutorial.rst.txt +0 -0
  104. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/alabaster.css +0 -0
  105. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/basic.css +0 -0
  106. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/check-solid.svg +0 -0
  107. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/clipboard.min.js +0 -0
  108. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/copy-button.svg +0 -0
  109. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/copybutton.css +0 -0
  110. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/copybutton.js +0 -0
  111. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/copybutton_funcs.js +0 -0
  112. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/custom.css +0 -0
  113. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/doctools.js +0 -0
  114. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/documentation_options.js +0 -0
  115. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/file.png +0 -0
  116. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/github-banner.svg +0 -0
  117. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/language_data.js +0 -0
  118. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/minus.png +0 -0
  119. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/plus.png +0 -0
  120. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/pygments.css +0 -0
  121. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/scripts/bootstrap.js +0 -0
  122. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/scripts/bootstrap.js.LICENSE.txt +0 -0
  123. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/scripts/fontawesome.js +0 -0
  124. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/scripts/fontawesome.js.LICENSE.txt +0 -0
  125. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/scripts/pydata-sphinx-theme.js +0 -0
  126. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/searchtools.js +0 -0
  127. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/sphinx_highlight.js +0 -0
  128. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/styles/pydata-sphinx-theme.css +0 -0
  129. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/styles/theme.css +0 -0
  130. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-brands-400.ttf +0 -0
  131. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-brands-400.woff2 +0 -0
  132. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-regular-400.ttf +0 -0
  133. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-regular-400.woff2 +0 -0
  134. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-solid-900.ttf +0 -0
  135. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
  136. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/_static/webpack-macros.html +0 -0
  137. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/genindex.html +0 -0
  138. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/howto.html +0 -0
  139. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/index.html +0 -0
  140. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/installation.html +0 -0
  141. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/modules.html +0 -0
  142. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/objects.inv +0 -0
  143. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/objutils.elf.html +0 -0
  144. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/objutils.html +0 -0
  145. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/py-modindex.html +0 -0
  146. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/scripts.html +0 -0
  147. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/search.html +0 -0
  148. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/searchindex.js +0 -0
  149. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/session.html +0 -0
  150. {objutils-0.10.17 → objutils-0.10.18}/docs/docs/_build/html/tutorial.html +0 -0
  151. {objutils-0.10.17 → objutils-0.10.18}/docs/elf-64-gen.pdf +0 -0
  152. {objutils-0.10.17 → objutils-0.10.18}/docs/example0.srec +0 -0
  153. {objutils-0.10.17 → objutils-0.10.18}/docs/howto.rst +0 -0
  154. {objutils-0.10.17 → objutils-0.10.18}/docs/index.rst +0 -0
  155. {objutils-0.10.17 → objutils-0.10.18}/docs/installation.rst +0 -0
  156. {objutils-0.10.17 → objutils-0.10.18}/docs/make.bat +0 -0
  157. {objutils-0.10.17 → objutils-0.10.18}/docs/modules.rst +0 -0
  158. {objutils-0.10.17 → objutils-0.10.18}/docs/objutils.elf.rst +0 -0
  159. {objutils-0.10.17 → objutils-0.10.18}/docs/objutils.rst +0 -0
  160. {objutils-0.10.17 → objutils-0.10.18}/docs/objutils_banner.png +0 -0
  161. {objutils-0.10.17 → objutils-0.10.18}/docs/objutils_basic.png +0 -0
  162. {objutils-0.10.17 → objutils-0.10.18}/docs/objutils_dark.jpg +0 -0
  163. {objutils-0.10.17 → objutils-0.10.18}/docs/objutils_social.jpg +0 -0
  164. {objutils-0.10.17 → objutils-0.10.18}/docs/requirements.txt +0 -0
  165. {objutils-0.10.17 → objutils-0.10.18}/docs/scripts.rst +0 -0
  166. {objutils-0.10.17 → objutils-0.10.18}/docs/session.rst +0 -0
  167. {objutils-0.10.17 → objutils-0.10.18}/docs/tutorial1.ipynb +0 -0
  168. {objutils-0.10.17 → objutils-0.10.18}/objutils/.coveragerc +0 -0
  169. {objutils-0.10.17 → objutils-0.10.18}/objutils/.vscode/launch.json +0 -0
  170. {objutils-0.10.17 → objutils-0.10.18}/objutils/.vscode/settings.json +0 -0
  171. {objutils-0.10.17 → objutils-0.10.18}/objutils/a2l_test.shf +0 -0
  172. {objutils-0.10.17 → objutils-0.10.18}/objutils/ash.py +0 -0
  173. {objutils-0.10.17 → objutils-0.10.18}/objutils/binfile.py +0 -0
  174. {objutils-0.10.17 → objutils-0.10.18}/objutils/checksums.py +0 -0
  175. {objutils-0.10.17 → objutils-0.10.18}/objutils/cosmac.py +0 -0
  176. {objutils-0.10.17 → objutils-0.10.18}/objutils/dwarf/__init__.py +0 -0
  177. {objutils-0.10.17 → objutils-0.10.18}/objutils/dwarf/attrparser.py +0 -0
  178. {objutils-0.10.17 → objutils-0.10.18}/objutils/dwarf/c_generator.py +0 -0
  179. {objutils-0.10.17 → objutils-0.10.18}/objutils/dwarf/constants.py +0 -0
  180. {objutils-0.10.17 → objutils-0.10.18}/objutils/dwarf/encoding.py +0 -0
  181. {objutils-0.10.17 → objutils-0.10.18}/objutils/dwarf/lineprog.py +0 -0
  182. {objutils-0.10.17 → objutils-0.10.18}/objutils/dwarf/readers.py +0 -0
  183. {objutils-0.10.17 → objutils-0.10.18}/objutils/dwarf/sm.py +0 -0
  184. {objutils-0.10.17 → objutils-0.10.18}/objutils/dwarf/traverser.py +0 -0
  185. {objutils-0.10.17 → objutils-0.10.18}/objutils/elf/__init__.py +0 -0
  186. {objutils-0.10.17 → objutils-0.10.18}/objutils/elf/arm/__init__.py +0 -0
  187. {objutils-0.10.17 → objutils-0.10.18}/objutils/elf/arm/attributes.py +0 -0
  188. {objutils-0.10.17 → objutils-0.10.18}/objutils/elf/defs.py +0 -0
  189. {objutils-0.10.17 → objutils-0.10.18}/objutils/elf/model.py +0 -0
  190. {objutils-0.10.17 → objutils-0.10.18}/objutils/emon52.py +0 -0
  191. {objutils-0.10.17 → objutils-0.10.18}/objutils/etek.py +0 -0
  192. {objutils-0.10.17 → objutils-0.10.18}/objutils/exceptions.py +0 -0
  193. {objutils-0.10.17 → objutils-0.10.18}/objutils/extensions/__init__.py +0 -0
  194. {objutils-0.10.17 → objutils-0.10.18}/objutils/extensions/ctre.hpp +0 -0
  195. {objutils-0.10.17 → objutils-0.10.18}/objutils/extensions/difflib.h +0 -0
  196. {objutils-0.10.17 → objutils-0.10.18}/objutils/extensions/elf_parser.cpp +0 -0
  197. {objutils-0.10.17 → objutils-0.10.18}/objutils/extensions/elf_parser.hpp +0 -0
  198. {objutils-0.10.17 → objutils-0.10.18}/objutils/extensions/exceptions.cpp +0 -0
  199. {objutils-0.10.17 → objutils-0.10.18}/objutils/extensions/exceptions.hpp +0 -0
  200. {objutils-0.10.17 → objutils-0.10.18}/objutils/extensions/hexfile.cpp +0 -0
  201. {objutils-0.10.17 → objutils-0.10.18}/objutils/extensions/wrapper.cpp +0 -0
  202. {objutils-0.10.17 → objutils-0.10.18}/objutils/fpc.py +0 -0
  203. {objutils-0.10.17 → objutils-0.10.18}/objutils/hexdump.py +0 -0
  204. {objutils-0.10.17 → objutils-0.10.18}/objutils/hexfile.py +0 -0
  205. {objutils-0.10.17 → objutils-0.10.18}/objutils/ieee695.py +0 -0
  206. {objutils-0.10.17 → objutils-0.10.18}/objutils/ihex.py +0 -0
  207. {objutils-0.10.17 → objutils-0.10.18}/objutils/logger.py +0 -0
  208. {objutils-0.10.17 → objutils-0.10.18}/objutils/mostec.py +0 -0
  209. {objutils-0.10.17 → objutils-0.10.18}/objutils/objutils.code-workspace +0 -0
  210. {objutils-0.10.17 → objutils-0.10.18}/objutils/oocdtxt.py +0 -0
  211. {objutils-0.10.17 → objutils-0.10.18}/objutils/pecoff/__init__.py +0 -0
  212. {objutils-0.10.17 → objutils-0.10.18}/objutils/pecoff/defs.py +0 -0
  213. {objutils-0.10.17 → objutils-0.10.18}/objutils/pecoff/model.py +0 -0
  214. {objutils-0.10.17 → objutils-0.10.18}/objutils/pecoff/pdb/__init__.py +0 -0
  215. {objutils-0.10.17 → objutils-0.10.18}/objutils/pickleif.py +0 -0
  216. {objutils-0.10.17 → objutils-0.10.18}/objutils/rca.py +0 -0
  217. {objutils-0.10.17 → objutils-0.10.18}/objutils/readers.py +0 -0
  218. {objutils-0.10.17 → objutils-0.10.18}/objutils/registry.py +0 -0
  219. {objutils-0.10.17 → objutils-0.10.18}/objutils/scripts/arduino_build_artifacts.py +0 -0
  220. {objutils-0.10.17 → objutils-0.10.18}/objutils/scripts/oj_cgen.py +0 -0
  221. {objutils-0.10.17 → objutils-0.10.18}/objutils/scripts/oj_coff_extract.py +0 -0
  222. {objutils-0.10.17 → objutils-0.10.18}/objutils/scripts/oj_coff_import.py +0 -0
  223. {objutils-0.10.17 → objutils-0.10.18}/objutils/scripts/oj_coff_info.py +0 -0
  224. {objutils-0.10.17 → objutils-0.10.18}/objutils/scripts/oj_coff_syms.py +0 -0
  225. {objutils-0.10.17 → objutils-0.10.18}/objutils/scripts/oj_dwarf_import.py +0 -0
  226. {objutils-0.10.17 → objutils-0.10.18}/objutils/scripts/oj_dwarf_info.py +0 -0
  227. {objutils-0.10.17 → objutils-0.10.18}/objutils/scripts/oj_elf_arm_attrs.py +0 -0
  228. {objutils-0.10.17 → objutils-0.10.18}/objutils/scripts/oj_elf_extract.py +0 -0
  229. {objutils-0.10.17 → objutils-0.10.18}/objutils/scripts/oj_elf_import.py +0 -0
  230. {objutils-0.10.17 → objutils-0.10.18}/objutils/scripts/oj_elf_info.py +0 -0
  231. {objutils-0.10.17 → objutils-0.10.18}/objutils/scripts/oj_elf_syms.py +0 -0
  232. {objutils-0.10.17 → objutils-0.10.18}/objutils/scripts/oj_hex_info.py +0 -0
  233. {objutils-0.10.17 → objutils-0.10.18}/objutils/scripts/oj_hex_merge.py +0 -0
  234. {objutils-0.10.17 → objutils-0.10.18}/objutils/scripts/oj_hex_split.py +0 -0
  235. {objutils-0.10.17 → objutils-0.10.18}/objutils/shf.py +0 -0
  236. {objutils-0.10.17 → objutils-0.10.18}/objutils/sig.py +0 -0
  237. {objutils-0.10.17 → objutils-0.10.18}/objutils/srec.py +0 -0
  238. {objutils-0.10.17 → objutils-0.10.18}/objutils/symbols.py +0 -0
  239. {objutils-0.10.17 → objutils-0.10.18}/objutils/tek.py +0 -0
  240. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/__init__.py +0 -0
  241. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_arm_attributes.py +0 -0
  242. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_ash.py +0 -0
  243. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_c_generator.py +0 -0
  244. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_checksums.py +0 -0
  245. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_cygpath.py +0 -0
  246. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_diff_bin.py +0 -0
  247. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_elf.py +0 -0
  248. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_emon52.py +0 -0
  249. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_etek.py +0 -0
  250. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_examples_cgen.py +0 -0
  251. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_extended.py +0 -0
  252. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_fpc.py +0 -0
  253. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_hexdump.py +0 -0
  254. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_hexfile.py +0 -0
  255. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_ihex.py +0 -0
  256. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_image.py +0 -0
  257. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_mostec.py +0 -0
  258. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_oocdtxt.py +0 -0
  259. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_pdb_typeinfo_dump.py +0 -0
  260. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_probe_uniqueness.py +0 -0
  261. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_readers.py +0 -0
  262. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_registry.py +0 -0
  263. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_repr.py +0 -0
  264. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_section.py +0 -0
  265. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_section_join.py +0 -0
  266. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_shf.py +0 -0
  267. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_sm.py +0 -0
  268. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_srec.py +0 -0
  269. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_tek.py +0 -0
  270. {objutils-0.10.17 → objutils-0.10.18}/objutils/tests/test_titext.py +0 -0
  271. {objutils-0.10.17 → objutils-0.10.18}/objutils/titxt.py +0 -0
  272. {objutils-0.10.17 → objutils-0.10.18}/objutils/utils/__init__.py +0 -0
  273. {objutils-0.10.17 → objutils-0.10.18}/objutils/utils/arduino.py +0 -0
  274. {objutils-0.10.17 → objutils-0.10.18}/objutils/utils/diff.py +0 -0
  275. {objutils-0.10.17 → objutils-0.10.18}/poetry.lock +0 -0
  276. {objutils-0.10.17 → objutils-0.10.18}/requirements.txt +0 -0
  277. {objutils-0.10.17 → objutils-0.10.18}/setup.cfg +0 -0
  278. {objutils-0.10.17 → objutils-0.10.18}/setup.py +0 -0
  279. {objutils-0.10.17 → objutils-0.10.18}/test_join_sections.py +0 -0
  280. {objutils-0.10.17 → objutils-0.10.18}/test_requirements.txt +0 -0
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module external.system.id="pyproject.toml" type="PYTHON_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <excludeFolder url="file://$MODULE_DIR$/.venv" />
6
+ <excludeFolder url="file://$MODULE_DIR$/objutils/.venv" />
7
+ </content>
8
+ <orderEntry type="jdk" jdkName="Poetry (objutils) (2)" jdkType="Python SDK" />
9
+ <orderEntry type="sourceFolder" forTests="false" />
10
+ </component>
11
+ </module>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: objutils
3
- Version: 0.10.17
3
+ Version: 0.10.18
4
4
  Summary: Objectfile library for Python
5
5
  Keywords: hex files,intel hex,s19,srec,srecords,object files,map files,embedded,microcontroller,ECU,shf,rfc4194
6
6
  Author-Email: Christoph Schueler <cpu12.gems@googlemail.com>
@@ -256,6 +256,13 @@ Quick reference for the ASAM array helpers on ``Image`` and ``Section``.
256
256
  | ``ALTERNATE_WITH_Y`` | 2-D maps only: each Y-row preceded by its Y-axis |
257
257
  | | coordinate value in memory |
258
258
  +------------------------+---------------------------------------------------+
259
+ | ``ALTERNATE_CURVES`` | 1-D curves sharing a common axis, stored as |
260
+ | | Array-of-Structs (AoS). Shape must be |
261
+ | | ``(num_curves, num_axis_points)`` in ASAM |
262
+ | | convention. Equivalent to C-order ROW_DIR of |
263
+ | | a 2-D array; returns |
264
+ | | ``ndarray(num_axis_points, num_curves)``. |
265
+ +------------------------+---------------------------------------------------+
259
266
 
260
267
  For ``ALTERNATE_WITH_X`` / ``ALTERNATE_WITH_Y``:
261
268
 
@@ -324,6 +331,43 @@ Quick reference for the ASAM array helpers on ``Image`` and ``Section``.
324
331
  - Assuming MSW swapping affects 8-bit types (it does not).
325
332
  - Using ``ALTERNATE_WITH_X`` / ``ALTERNATE_WITH_Y`` with a 1-D array or
326
333
  without a 2-D ``shape`` parameter.
334
+ - Using ``ALTERNATE_CURVES`` with a 1-D array or a non-2-D ``shape``.
335
+
336
+ .. rubric:: ALTERNATE_CURVES example (3 curves, 5 axis points)
337
+
338
+ Corresponds to the C Array-of-Structs pattern from the ASAM specification::
339
+
340
+ typedef struct { int DT10; int DT20; int DT30; } CURVE_TYPE;
341
+ const CURVE_TYPE DATA[5] = {
342
+ {10, 3, 4}, {12, 2, 6}, {17, 9, 8}, {10, 1, 8}, {18, 3, 8},
343
+ };
344
+
345
+ .. code-block:: python
346
+
347
+ import numpy as np
348
+ from objutils import Image, Section
349
+
350
+ # numpy shape (5 axis_points, 3 curves); ASAM shape (X=3, Y=5)
351
+ curves = np.array(
352
+ [[10, 3, 4],
353
+ [12, 2, 6],
354
+ [17, 9, 8],
355
+ [10, 1, 8],
356
+ [18, 3, 8]],
357
+ dtype=np.int32,
358
+ )
359
+ total = curves.nbytes
360
+ img = Image([Section(0xC000, bytes(total + 8))])
361
+ img.write_asam_ndarray(0xC000, curves, "SLONG", "MSB_LAST",
362
+ index_mode="ALTERNATE_CURVES")
363
+
364
+ result = img.read_asam_ndarray(0xC000, 15, "SLONG",
365
+ shape=(3, 5), byte_order="MSB_LAST",
366
+ index_mode="ALTERNATE_CURVES")
367
+ # result.shape == (5, 3) – each column is one curve
368
+ curve_dt10 = result[:, 0] # [10, 12, 17, 10, 18]
369
+ curve_dt20 = result[:, 1] # [ 3, 2, 9, 1, 3]
370
+ curve_dt30 = result[:, 2] # [ 4, 6, 8, 8, 8]
327
371
 
328
372
  .. rubric:: Copy/paste example: ULONG array roundtrip
329
373
 
@@ -13,7 +13,7 @@ Registers CODECS and implements an interface to them.
13
13
  The first parameter is always the codec name.
14
14
  """
15
15
 
16
- __version__ = "0.10.17"
16
+ __version__ = "0.10.18"
17
17
 
18
18
  __all__ = [
19
19
  "Image",
@@ -812,6 +812,10 @@ class Image:
812
812
  - ``"ALTERNATE_WITH_Y"`` – 2-D maps only; each Y-row is preceded by
813
813
  its Y-axis coordinate value. Pass axis values via
814
814
  ``y_axis=<array>`` in *kws*.
815
+ - ``"ALTERNATE_CURVES"`` – multiple 1-D curves sharing a common axis,
816
+ stored as Array-of-Structs (AoS). Array shape must be
817
+ ``(num_axis_points, num_curves)`` in numpy convention.
818
+ Memory layout is identical to C-order ``ROW_DIR``.
815
819
  **kws: Keyword arguments passed through to the section method.
816
820
  Relevant for ALTERNATE modes:
817
821
 
@@ -882,6 +886,9 @@ class Image:
882
886
  by its X-axis coordinate value in memory.
883
887
  - ``"ALTERNATE_WITH_Y"`` – 2-D maps only; each Y-row is preceded by
884
888
  its Y-axis coordinate value in memory.
889
+ - ``"ALTERNATE_CURVES"`` – multiple 1-D curves sharing a common axis,
890
+ stored as Array-of-Structs (AoS); returns
891
+ ``ndarray(num_axis_points, num_curves)``.
885
892
  **kws: Keyword arguments passed through to the section method.
886
893
  Relevant for ALTERNATE modes:
887
894
 
@@ -427,7 +427,7 @@ def fortran_array_to_buffer(array: np.ndarray) -> bytearray:
427
427
  return result
428
428
 
429
429
 
430
- ASAM_INDEX_MODES = {"ROW_DIR", "COLUMN_DIR", "ALTERNATE_WITH_X", "ALTERNATE_WITH_Y"}
430
+ ASAM_INDEX_MODES = {"ROW_DIR", "COLUMN_DIR", "ALTERNATE_WITH_X", "ALTERNATE_WITH_Y", "ALTERNATE_CURVES"}
431
431
 
432
432
  AlternateArrayResult = namedtuple("AlternateArrayResult", "values axis")
433
433
 
@@ -1273,7 +1273,12 @@ class Section:
1273
1273
  index_mode: ``"ROW_DIR"`` (default) – X increments fastest
1274
1274
  (C-like row-major). ``"COLUMN_DIR"`` – Y increments
1275
1275
  fastest; only X and Y are swapped (not true column-major
1276
- for dims > 2).
1276
+ for dims > 2). ``"ALTERNATE_WITH_X"`` / ``"ALTERNATE_WITH_Y"``
1277
+ – 2-D maps with interleaved axis values (see
1278
+ :meth:`read_asam_ndarray`). ``"ALTERNATE_CURVES"`` – multiple
1279
+ 1-D curves sharing a common axis, stored as Array-of-Structs;
1280
+ array shape must be ``(num_axis_points, num_curves)`` in numpy
1281
+ convention.
1277
1282
  **kws: Passed through to :meth:`write`.
1278
1283
 
1279
1284
  Raises:
@@ -1314,6 +1319,18 @@ class Section:
1314
1319
  # element size; for different element sizes the permutation is applied per data-dtype
1315
1320
  # stride which may be incorrect – a documented limitation for word-swap byte orders.
1316
1321
  permuted = self._permute_asam_buffer(raw_data, internal_dtype, asam_byte_order)
1322
+ elif index_mode == "ALTERNATE_CURVES":
1323
+ # ALTERNATE_CURVES: multiple curves sharing a common axis, stored as
1324
+ # Array-of-Structs (AoS). Array shape must be (num_axis_points, num_curves)
1325
+ # in numpy convention. Each row in memory contains all curve values at one
1326
+ # axis breakpoint. This is identical to C-order (ROW_DIR) for a 2-D array.
1327
+ if typed_array.ndim != 2:
1328
+ raise ValueError(
1329
+ "ALTERNATE_CURVES requires a 2-D array with shape "
1330
+ "(num_axis_points, num_curves) in numpy convention"
1331
+ )
1332
+ raw_data = typed_array.tobytes() # C-order = AoS
1333
+ permuted = self._permute_asam_buffer(raw_data, internal_dtype, asam_byte_order)
1317
1334
  else:
1318
1335
  raw_data = typed_array.tobytes()
1319
1336
  permuted = self._permute_asam_buffer(raw_data, internal_dtype, asam_byte_order)
@@ -1371,9 +1388,11 @@ class Section:
1371
1388
  - ``"ALTERNATE_WITH_X"`` – 2-D maps only; columns of values alternate
1372
1389
  with X-axis coordinate values. Returns
1373
1390
  :class:`AlternateArrayResult` ``(values, x_axis)``.
1374
- - ``"ALTERNATE_WITH_Y"`` – 2-D maps only; rows of values alternate
1375
- with Y-axis coordinate values. Returns
1376
- :class:`AlternateArrayResult` ``(values, y_axis)``.
1391
+ - ``"ALTERNATE_CURVES"`` – 1-D curves with a shared axis, stored
1392
+ as Array-of-Structs (AoS). *shape* must be
1393
+ ``(num_curves, num_axis_points)`` in ASAM convention.
1394
+ Returns ``ndarray`` with shape
1395
+ ``(num_axis_points, num_curves)``; each column is one curve.
1377
1396
  **kws: Optional keyword arguments:
1378
1397
 
1379
1398
  - ``axis_dtype`` (str): ASAM datatype of axis values for
@@ -1400,6 +1419,23 @@ class Section:
1400
1419
  # Convert ASAM shape (X, Y, Z …) → numpy shape (… Z, Y, X).
1401
1420
  numpy_shape = tuple(reversed(shape)) if shape else None
1402
1421
 
1422
+ # --- ALTERNATE_CURVES --------------------------------------------------
1423
+ if index_mode == "ALTERNATE_CURVES":
1424
+ if numpy_shape is None or len(numpy_shape) != 2:
1425
+ raise ValueError(
1426
+ "ALTERNATE_CURVES requires a 2-D shape (num_curves, num_axis_points) "
1427
+ "in ASAM convention"
1428
+ )
1429
+ type_name = internal_dtype.split("_")[0]
1430
+ type_size = TYPE_SIZES[type_name]
1431
+ byte_count = length * type_size
1432
+ raw_data = self.read(addr, byte_count, **kws)
1433
+ permuted = self._permute_asam_buffer(raw_data, internal_dtype, asam_byte_order)
1434
+ # numpy_shape is (num_axis_points, num_curves) after ASAM reversal –
1435
+ # exactly the shape of the C-order (AoS) buffer.
1436
+ flat = np.frombuffer(permuted, dtype=dt)
1437
+ return flat.reshape(numpy_shape)
1438
+
1403
1439
  # --- ALTERNATE_WITH_X --------------------------------------------------
1404
1440
  if index_mode == "ALTERNATE_WITH_X":
1405
1441
  if numpy_shape is None or len(numpy_shape) != 2:
@@ -448,7 +448,7 @@ def test_alternate_invalid_index_mode_write():
448
448
  sec = Section(start_address=0, data=bytearray(32))
449
449
  arr = np.array([[1, 2]], dtype=np.uint8)
450
450
  with pytest.raises(ValueError):
451
- sec.write_asam_ndarray(0, arr, "UBYTE", byte_order="MSB_LAST", index_mode="ALTERNATE_CURVES")
451
+ sec.write_asam_ndarray(0, arr, "UBYTE", byte_order="MSB_LAST", index_mode="INVALID_MODE")
452
452
 
453
453
 
454
454
  @pytest.mark.skipif("NUMPY_SUPPORT == False")
@@ -456,7 +456,7 @@ def test_alternate_invalid_index_mode_read():
456
456
  """Unbekannter index_mode beim Lesen: ValueError erwartet."""
457
457
  sec = Section(start_address=0, data=bytearray(32))
458
458
  with pytest.raises(ValueError):
459
- sec.read_asam_ndarray(0, 4, "UBYTE", shape=(2, 2), byte_order="MSB_LAST", index_mode="ALTERNATE_CURVES")
459
+ sec.read_asam_ndarray(0, 4, "UBYTE", shape=(2, 2), byte_order="MSB_LAST", index_mode="INVALID_MODE")
460
460
 
461
461
 
462
462
  # ---------------------------------------------------------------------------
@@ -709,3 +709,159 @@ def test_column_dir_still_works():
709
709
  sec.write_asam_ndarray(0, arr, "UBYTE", byte_order="MSB_LAST", index_mode="COLUMN_DIR")
710
710
  result = sec.read_asam_ndarray(0, 6, "UBYTE", shape=(3, 2), byte_order="MSB_LAST", index_mode="COLUMN_DIR")
711
711
  assert np.array_equal(result, arr)
712
+
713
+
714
+ # ---------------------------------------------------------------------------
715
+ # ALTERNATE_CURVES
716
+ # ---------------------------------------------------------------------------
717
+ # Spezifikation: Mehrere 1-D Kurven teilen eine gemeinsame Achse und werden als
718
+ # Array-of-Structs (AoS) gespeichert. Jede Speicherzeile enthält alle Kurven-Werte
719
+ # für einen Achsbreakpoint. Dies entspricht exakt C-Order (ROW_DIR) einer 2-D
720
+ # Matrix mit Shape (num_axis_points, num_curves) in numpy-Konvention.
721
+ #
722
+ # C-Äquivalent aus der ASAM-Spezifikation:
723
+ # typedef struct { int DT10; int DT20; int DT30; int DT40; } VXP_TYPE;
724
+ # const VXP_TYPE VX_PLUS_DELAY_TIMES[5] = {
725
+ # { 10, 3, 4, 8 }, { 12, 2, 4, 6 }, { 17, 9, 5, 8 },
726
+ # { 10, 1, 4, 8 }, { 18, 3, 8, 8 },
727
+ # };
728
+ # Speicher: 10, 3, 4, 8, 12, 2, 4, 6, 17, 9, 5, 8, 10, 1, 4, 8, 18, 3, 8, 8
729
+ # ---------------------------------------------------------------------------
730
+
731
+ # Das Beispiel-Array aus der Spezifikation: 5 Achsbreakpoints × 4 Kurven
732
+ VXP_TYPE_DATA = np.array(
733
+ [
734
+ [10, 3, 4, 8], # Breakpoint 0
735
+ [12, 2, 4, 6], # Breakpoint 1
736
+ [17, 9, 5, 8], # Breakpoint 2
737
+ [10, 1, 4, 8], # Breakpoint 3
738
+ [18, 3, 8, 8], # Breakpoint 4
739
+ ],
740
+ dtype=np.int32,
741
+ )
742
+
743
+ VXP_FLAT_LE = [
744
+ 10, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 8, 0, 0, 0,
745
+ 12, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, 0,
746
+ 17, 0, 0, 0, 9, 0, 0, 0, 5, 0, 0, 0, 8, 0, 0, 0,
747
+ 10, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 8, 0, 0, 0,
748
+ 18, 0, 0, 0, 3, 0, 0, 0, 8, 0, 0, 0, 8, 0, 0, 0,
749
+ ] # 5 * 4 * 4 = 80 Bytes (SLONG, LE)
750
+
751
+
752
+ @pytest.mark.skipif("NUMPY_SUPPORT == False")
753
+ def test_alternate_curves_memory_layout_ubyte():
754
+ """ALTERNATE_CURVES: Rohspeicher entspricht AoS-Layout (C-Order).
755
+
756
+ 5 Breakpoints × 4 Kurven, UBYTE.
757
+ Speicher: row0=[10,3,4,8], row1=[12,2,4,6], …
758
+ """
759
+ arr = VXP_TYPE_DATA.astype(np.uint8)
760
+ expected = [
761
+ 10, 3, 4, 8,
762
+ 12, 2, 4, 6,
763
+ 17, 9, 5, 8,
764
+ 10, 1, 4, 8,
765
+ 18, 3, 8, 8,
766
+ ]
767
+ total_bytes = 5 * 4 # num_axis_points * num_curves
768
+ sec = Section(start_address=0x1000, data=bytearray(total_bytes + 8))
769
+ sec.write_asam_ndarray(0x1000, arr, "UBYTE", byte_order="MSB_LAST", index_mode="ALTERNATE_CURVES")
770
+ assert list(sec.read(0x1000, total_bytes)) == expected
771
+
772
+
773
+ @pytest.mark.skipif("NUMPY_SUPPORT == False")
774
+ def test_alternate_curves_roundtrip_ubyte():
775
+ """ALTERNATE_CURVES: Write → Read Roundtrip (UBYTE)."""
776
+ arr = VXP_TYPE_DATA.astype(np.uint8) # numpy shape (5, 4)
777
+
778
+ total_bytes = 5 * 4
779
+ sec = Section(start_address=0x2000, data=bytearray(total_bytes + 16))
780
+ # ASAM shape (X=num_curves=4, Y=num_axis_points=5)
781
+ sec.write_asam_ndarray(0x2000, arr, "UBYTE", byte_order="MSB_LAST", index_mode="ALTERNATE_CURVES")
782
+ result = sec.read_asam_ndarray(0x2000, 20, "UBYTE", shape=(4, 5), byte_order="MSB_LAST", index_mode="ALTERNATE_CURVES")
783
+ assert result.shape == (5, 4) # numpy: (num_axis_points, num_curves)
784
+ assert np.array_equal(result, arr)
785
+
786
+
787
+ @pytest.mark.skipif("NUMPY_SUPPORT == False")
788
+ def test_alternate_curves_roundtrip_slong_le():
789
+ """ALTERNATE_CURVES: Roundtrip mit SLONG (32-Bit LE) – Spec-Beispiel."""
790
+ # ASAM shape: (X=4 Kurven, Y=5 Breakpoints)
791
+ total_bytes = 5 * 4 * 4 # 5 breakpoints × 4 curves × 4 bytes
792
+ sec = Section(start_address=0, data=bytearray(total_bytes + 16))
793
+ sec.write_asam_ndarray(0, VXP_TYPE_DATA, "SLONG", byte_order="MSB_LAST", index_mode="ALTERNATE_CURVES")
794
+ result = sec.read_asam_ndarray(0, 20, "SLONG", shape=(4, 5), byte_order="MSB_LAST", index_mode="ALTERNATE_CURVES")
795
+ assert result.shape == (5, 4)
796
+ assert np.array_equal(result, VXP_TYPE_DATA)
797
+
798
+
799
+ @pytest.mark.skipif("NUMPY_SUPPORT == False")
800
+ def test_alternate_curves_raw_memory_slong_le():
801
+ """ALTERNATE_CURVES: Rohspeicher stimmt mit AoS-Layout überein (SLONG LE)."""
802
+ total_bytes = 5 * 4 * 4
803
+ sec = Section(start_address=0, data=bytearray(total_bytes + 8))
804
+ sec.write_asam_ndarray(0, VXP_TYPE_DATA, "SLONG", byte_order="MSB_LAST", index_mode="ALTERNATE_CURVES")
805
+ assert list(sec.read(0, total_bytes)) == VXP_FLAT_LE
806
+
807
+
808
+ @pytest.mark.skipif("NUMPY_SUPPORT == False")
809
+ def test_alternate_curves_individual_curve_access():
810
+ """ALTERNATE_CURVES: Einzelne Kurven per Spalten-Slice abrufbar."""
811
+ arr = VXP_TYPE_DATA.astype(np.uint8)
812
+ total_bytes = 5 * 4
813
+ sec = Section(start_address=0, data=bytearray(total_bytes + 8))
814
+ sec.write_asam_ndarray(0, arr, "UBYTE", byte_order="MSB_LAST", index_mode="ALTERNATE_CURVES")
815
+ result = sec.read_asam_ndarray(0, 20, "UBYTE", shape=(4, 5), byte_order="MSB_LAST", index_mode="ALTERNATE_CURVES")
816
+
817
+ # Kurve 0 (DT10): [10, 12, 17, 10, 18]
818
+ assert list(result[:, 0]) == [10, 12, 17, 10, 18]
819
+ # Kurve 1 (DT20): [3, 2, 9, 1, 3]
820
+ assert list(result[:, 1]) == [3, 2, 9, 1, 3]
821
+ # Kurve 2 (DT30): [4, 4, 5, 4, 8]
822
+ assert list(result[:, 2]) == [4, 4, 5, 4, 8]
823
+ # Kurve 3 (DT40): [8, 6, 8, 8, 8]
824
+ assert list(result[:, 3]) == [8, 6, 8, 8, 8]
825
+
826
+
827
+ @pytest.mark.skipif("NUMPY_SUPPORT == False")
828
+ def test_alternate_curves_big_endian():
829
+ """ALTERNATE_CURVES mit BE (MSB_FIRST)."""
830
+ arr = np.array([[0x0102, 0x0304], [0x0506, 0x0708]], dtype=np.uint16) # 2 Breakpoints, 2 Kurven
831
+ # BE-Speicher: 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08
832
+ expected = [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08]
833
+ total_bytes = 2 * 2 * 2
834
+ sec = Section(start_address=0, data=bytearray(total_bytes + 8))
835
+ sec.write_asam_ndarray(0, arr, "UWORD", byte_order="MSB_FIRST", index_mode="ALTERNATE_CURVES")
836
+ assert list(sec.read(0, total_bytes)) == expected
837
+ result = sec.read_asam_ndarray(0, 4, "UWORD", shape=(2, 2), byte_order="MSB_FIRST", index_mode="ALTERNATE_CURVES")
838
+ assert np.array_equal(result, arr)
839
+
840
+
841
+ @pytest.mark.skipif("NUMPY_SUPPORT == False")
842
+ def test_alternate_curves_requires_2d():
843
+ """ALTERNATE_CURVES mit 1-D Array: ValueError erwartet."""
844
+ sec = Section(start_address=0, data=bytearray(32))
845
+ arr = np.array([1, 2, 3], dtype=np.uint8)
846
+ with pytest.raises(ValueError, match="2-D"):
847
+ sec.write_asam_ndarray(0, arr, "UBYTE", byte_order="MSB_LAST", index_mode="ALTERNATE_CURVES")
848
+
849
+
850
+ @pytest.mark.skipif("NUMPY_SUPPORT == False")
851
+ def test_alternate_curves_read_requires_2d_shape():
852
+ """ALTERNATE_CURVES beim Lesen ohne 2-D shape: ValueError erwartet."""
853
+ sec = Section(start_address=0, data=bytearray(32))
854
+ with pytest.raises(ValueError, match="2-D"):
855
+ sec.read_asam_ndarray(0, 4, "UBYTE", shape=(4,), byte_order="MSB_LAST", index_mode="ALTERNATE_CURVES")
856
+
857
+
858
+ @pytest.mark.skipif("NUMPY_SUPPORT == False")
859
+ def test_alternate_curves_layout_equals_row_dir():
860
+ """ALTERNATE_CURVES und ROW_DIR erzeugen identisches Speicher-Layout."""
861
+ arr = np.array([[1, 2, 3], [4, 5, 6]], dtype=np.uint8)
862
+ sec_curves = Section(start_address=0, data=bytearray(16))
863
+ sec_row = Section(start_address=0, data=bytearray(16))
864
+ sec_curves.write_asam_ndarray(0, arr, "UBYTE", byte_order="MSB_LAST", index_mode="ALTERNATE_CURVES")
865
+ sec_row.write_asam_ndarray( 0, arr, "UBYTE", byte_order="MSB_LAST", index_mode="ROW_DIR")
866
+ assert sec_curves.read(0, 6) == sec_row.read(0, 6)
867
+
@@ -1,3 +1,3 @@
1
1
  """objutils version module"""
2
2
 
3
- __version__ = "0.10.17"
3
+ __version__ = "0.10.18"
@@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"
4
4
 
5
5
  [project]
6
6
  name = "objutils"
7
- version = "0.10.17"
7
+ version = "0.10.18"
8
8
  description = "Objectfile library for Python"
9
9
  authors = [
10
10
  {name = "Christoph Schueler", email = "cpu12.gems@googlemail.com"}
@@ -126,7 +126,7 @@ skip = ["*_i686", "*-musllinux*"]
126
126
  build-frontend = "build"
127
127
 
128
128
  [tool.bumpver]
129
- current_version = "0.10.17"
129
+ current_version = "0.10.18"
130
130
  version_pattern = "MAJOR.MINOR.PATCH"
131
131
  commit_message = "bump version {old_version} -> {new_version}"
132
132
  commit = true
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes