objutils 0.10.16__tar.gz → 0.10.17__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.
- {objutils-0.10.16 → objutils-0.10.17}/PKG-INFO +1 -1
- {objutils-0.10.16 → objutils-0.10.17}/docs/howto.rst +76 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/session.rst +68 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/tutorial.rst +100 -8
- {objutils-0.10.16 → objutils-0.10.17}/objutils/__init__.py +1 -1
- {objutils-0.10.16 → objutils-0.10.17}/objutils/image.py +51 -12
- {objutils-0.10.16 → objutils-0.10.17}/objutils/section.py +234 -16
- objutils-0.10.17/objutils/tests/test_asam_alternate_modes.py +711 -0
- objutils-0.10.17/objutils/tests/test_extended.py +56 -0
- objutils-0.10.17/objutils/tests/test_pdb_typeinfo_dump.py +126 -0
- objutils-0.10.17/objutils/tests/test_probe_uniqueness.py +71 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/version.py +1 -1
- {objutils-0.10.16 → objutils-0.10.17}/poetry.lock +124 -129
- {objutils-0.10.16 → objutils-0.10.17}/pyproject.toml +2 -2
- {objutils-0.10.16 → objutils-0.10.17}/.clang-format +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.codacy.yml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.codeclimate.yml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.coveralls.yml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.github/FUNDING.yml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.github/ISSUE_TEMPLATE/documentation.yml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.github/ISSUE_TEMPLATE.md +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.github/copilot-instructions.md +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.github/workflows/pythonapp.yml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.gitignore +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.idea/.gitignore +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.idea/copilot.data.migration.ask2agent.xml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.idea/deployment.xml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.idea/misc.xml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.idea/modules.xml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.idea/pyLspTools.xml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.idea/pyProjectModel.xml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.idea/vcs.xml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.pre-commit-config.yaml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.pylintrc +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.readthedocs.yml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/.travis.yml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/CMakeLists.txt +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/CODE_OF_CONDUCT.md +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/CONTRIBUTORS +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/LICENSE +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/MANIFEST.in +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/PULL_REQUEST_TEMPLATE.md +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/appveyor.yml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/bandit.yml +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/Data_Formats.pdf +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/ELF_Format.pdf +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/KNOWN_GOOD_DWARF_REFERENCE.md +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/README.rst +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/apidoc.sh +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/conf.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/.buildinfo +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/.buildinfo.bak +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/.doctrees/README.doctree +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/.doctrees/environment.pickle +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/.doctrees/howto.doctree +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/.doctrees/index.doctree +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/.doctrees/installation.doctree +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/.doctrees/modules.doctree +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/.doctrees/objutils.doctree +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/.doctrees/objutils.elf.doctree +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/.doctrees/scripts.doctree +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/.doctrees/session.doctree +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/.doctrees/tutorial.doctree +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/README.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_images/objutils_basic.png +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/index.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/ash.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/binfile.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/checksums.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/cosmac.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/elf/defs.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/elf.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/emon52.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/etek.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/exceptions.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/fpc.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/hexdump.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/hexfile.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/ihex.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/image.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/logger.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/mostec.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/pickleif.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/rca.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/readers.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/registry.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/section.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/sig.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/srec.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/tek.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/titxt.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils/utils.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_modules/objutils.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_sources/README.rst.txt +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_sources/howto.rst.txt +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_sources/index.rst.txt +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_sources/installation.rst.txt +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_sources/modules.rst.txt +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_sources/objutils.elf.rst.txt +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_sources/objutils.rst.txt +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_sources/scripts.rst.txt +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_sources/session.rst.txt +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_sources/tutorial.rst.txt +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/alabaster.css +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/basic.css +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/check-solid.svg +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/clipboard.min.js +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/copy-button.svg +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/copybutton.css +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/copybutton.js +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/copybutton_funcs.js +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/custom.css +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/doctools.js +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/documentation_options.js +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/file.png +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/github-banner.svg +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/language_data.js +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/minus.png +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/plus.png +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/pygments.css +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/scripts/bootstrap.js +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/scripts/bootstrap.js.LICENSE.txt +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/scripts/fontawesome.js +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/scripts/fontawesome.js.LICENSE.txt +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/scripts/pydata-sphinx-theme.js +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/searchtools.js +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/sphinx_highlight.js +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/styles/pydata-sphinx-theme.css +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/styles/theme.css +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-brands-400.ttf +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-brands-400.woff2 +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-regular-400.ttf +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-regular-400.woff2 +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-solid-900.ttf +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/vendor/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/_static/webpack-macros.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/genindex.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/howto.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/index.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/installation.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/modules.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/objects.inv +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/objutils.elf.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/objutils.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/py-modindex.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/scripts.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/search.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/searchindex.js +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/session.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/docs/_build/html/tutorial.html +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/elf-64-gen.pdf +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/example0.srec +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/index.rst +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/installation.rst +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/make.bat +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/modules.rst +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/objutils.elf.rst +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/objutils.rst +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/objutils_banner.png +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/objutils_basic.png +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/objutils_dark.jpg +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/objutils_social.jpg +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/requirements.txt +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/scripts.rst +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/docs/tutorial1.ipynb +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/.coveragerc +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/.vscode/launch.json +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/.vscode/settings.json +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/a2l_test.shf +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/ash.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/binfile.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/checksums.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/cosmac.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/dwarf/__init__.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/dwarf/attrparser.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/dwarf/c_generator.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/dwarf/constants.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/dwarf/encoding.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/dwarf/lineprog.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/dwarf/readers.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/dwarf/sm.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/dwarf/traverser.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/elf/__init__.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/elf/arm/__init__.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/elf/arm/attributes.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/elf/defs.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/elf/model.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/emon52.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/etek.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/exceptions.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/extensions/__init__.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/extensions/ctre.hpp +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/extensions/difflib.h +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/extensions/elf_parser.cpp +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/extensions/elf_parser.hpp +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/extensions/exceptions.cpp +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/extensions/exceptions.hpp +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/extensions/hexfile.cpp +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/extensions/wrapper.cpp +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/fpc.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/hexdump.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/hexfile.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/ieee695.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/ihex.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/logger.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/mostec.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/objutils.code-workspace +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/oocdtxt.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/pecoff/__init__.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/pecoff/defs.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/pecoff/model.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/pecoff/pdb/__init__.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/pickleif.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/rca.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/readers.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/registry.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/scripts/arduino_build_artifacts.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/scripts/oj_cgen.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/scripts/oj_coff_extract.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/scripts/oj_coff_import.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/scripts/oj_coff_info.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/scripts/oj_coff_syms.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/scripts/oj_dwarf_import.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/scripts/oj_dwarf_info.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/scripts/oj_elf_arm_attrs.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/scripts/oj_elf_extract.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/scripts/oj_elf_import.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/scripts/oj_elf_info.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/scripts/oj_elf_syms.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/scripts/oj_hex_info.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/scripts/oj_hex_merge.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/scripts/oj_hex_split.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/shf.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/sig.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/srec.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/symbols.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tek.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/__init__.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_arm_attributes.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_ash.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_c_generator.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_checksums.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_cygpath.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_diff_bin.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_elf.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_emon52.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_etek.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_examples_cgen.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_fpc.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_hexdump.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_hexfile.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_ihex.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_image.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_mostec.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_oocdtxt.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_readers.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_registry.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_repr.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_section.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_section_join.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_shf.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_sm.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_srec.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_tek.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/tests/test_titext.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/titxt.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/utils/__init__.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/utils/arduino.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/objutils/utils/diff.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/requirements.txt +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/setup.cfg +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/setup.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/test_join_sections.py +0 -0
- {objutils-0.10.16 → objutils-0.10.17}/test_requirements.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: objutils
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.17
|
|
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>
|
|
@@ -75,6 +75,82 @@ Read/write ASAM values (incl. word-swap byte orders)
|
|
|
75
75
|
img.write_asam_string(0x3010, "MOTOR", "ASCII")
|
|
76
76
|
name = img.read_asam_string(0x3010, "ASCII")
|
|
77
77
|
|
|
78
|
+
Read/write ASAM strings with encoding override
|
|
79
|
+
----------------------------------------------
|
|
80
|
+
|
|
81
|
+
Some ECUs store Latin-1 (or other non-UTF-8) characters in a field that is
|
|
82
|
+
declared ``ASCII`` in the A2L description. Use the ``encoding`` keyword to
|
|
83
|
+
override the codec without changing the ASAM dtype name:
|
|
84
|
+
|
|
85
|
+
.. code-block:: python
|
|
86
|
+
|
|
87
|
+
from objutils import Image, Section
|
|
88
|
+
|
|
89
|
+
img = Image([Section(0x4000, bytes(64))])
|
|
90
|
+
|
|
91
|
+
# The string contains "Ü" (0xDC in Latin-1) – would fail with plain ASCII
|
|
92
|
+
img.write_asam_string(0x4000, "MOTOR_ÜBERDREHZAHL", "ASCII", encoding="latin-1")
|
|
93
|
+
name = img.read_asam_string(0x4000, "ASCII", encoding="latin-1")
|
|
94
|
+
# name == 'MOTOR_ÜBERDREHZAHL'
|
|
95
|
+
|
|
96
|
+
The ``encoding`` parameter is accepted by both ``read_asam_string`` and
|
|
97
|
+
``write_asam_string`` on ``Section`` as well as ``Image``.
|
|
98
|
+
|
|
99
|
+
Read/write ASAM characteristic maps with ALTERNATE_WITH_X
|
|
100
|
+
---------------------------------------------------------
|
|
101
|
+
|
|
102
|
+
``ALTERNATE_WITH_X`` stores each X-column preceded by its X-axis coordinate:
|
|
103
|
+
``[x[0], f(0,0), f(0,1), …, x[1], f(1,0), f(1,1), …]``.
|
|
104
|
+
|
|
105
|
+
.. code-block:: python
|
|
106
|
+
|
|
107
|
+
import numpy as np
|
|
108
|
+
from objutils import Image, Section
|
|
109
|
+
|
|
110
|
+
# ASAM shape (X=3, Y=4) → numpy shape (4, 3)
|
|
111
|
+
matrix = np.array(
|
|
112
|
+
[[11, 21, 31],
|
|
113
|
+
[12, 22, 32],
|
|
114
|
+
[13, 23, 33],
|
|
115
|
+
[14, 24, 34]],
|
|
116
|
+
dtype=np.uint8,
|
|
117
|
+
)
|
|
118
|
+
x_axis = np.array([10, 20, 30], dtype=np.uint8)
|
|
119
|
+
|
|
120
|
+
total = 3 * (1 + 4) # num_x * (axis_byte + num_y * element_byte)
|
|
121
|
+
img = Image([Section(0x8000, bytes(total + 8))])
|
|
122
|
+
|
|
123
|
+
img.write_asam_ndarray(0x8000, matrix, "UBYTE", "MSB_LAST",
|
|
124
|
+
index_mode="ALTERNATE_WITH_X", x_axis=x_axis)
|
|
125
|
+
|
|
126
|
+
result = img.read_asam_ndarray(0x8000, 0, "UBYTE",
|
|
127
|
+
shape=(3, 4), byte_order="MSB_LAST",
|
|
128
|
+
index_mode="ALTERNATE_WITH_X")
|
|
129
|
+
# result.values → matrix
|
|
130
|
+
# result.axis → x_axis
|
|
131
|
+
|
|
132
|
+
Read/write ASAM characteristic maps with ALTERNATE_WITH_Y
|
|
133
|
+
---------------------------------------------------------
|
|
134
|
+
|
|
135
|
+
``ALTERNATE_WITH_Y`` stores each Y-row preceded by its Y-axis coordinate:
|
|
136
|
+
``[y[0], f(0,0), f(1,0), …, y[1], f(0,1), f(1,1), …]``.
|
|
137
|
+
|
|
138
|
+
.. code-block:: python
|
|
139
|
+
|
|
140
|
+
y_axis = np.array([1, 2, 3, 4], dtype=np.uint8)
|
|
141
|
+
|
|
142
|
+
total_y = 4 * (1 + 3) # num_y * (axis_byte + num_x * element_byte)
|
|
143
|
+
img2 = Image([Section(0x9000, bytes(total_y + 8))])
|
|
144
|
+
|
|
145
|
+
img2.write_asam_ndarray(0x9000, matrix, "UBYTE", "MSB_LAST",
|
|
146
|
+
index_mode="ALTERNATE_WITH_Y", y_axis=y_axis)
|
|
147
|
+
|
|
148
|
+
result2 = img2.read_asam_ndarray(0x9000, 0, "UBYTE",
|
|
149
|
+
shape=(3, 4), byte_order="MSB_LAST",
|
|
150
|
+
index_mode="ALTERNATE_WITH_Y")
|
|
151
|
+
# result2.values → matrix
|
|
152
|
+
# result2.axis → y_axis
|
|
153
|
+
|
|
78
154
|
Extract loadable image from ELF
|
|
79
155
|
-------------------------------
|
|
80
156
|
|
|
@@ -163,6 +163,15 @@ ASAM strings
|
|
|
163
163
|
>>> img.read_asam_string(0x3020, "UTF8")
|
|
164
164
|
'Drehzahl'
|
|
165
165
|
|
|
166
|
+
When an ECU stores non-ASCII characters in a nominally ASCII field, override
|
|
167
|
+
the codec with an explicit ``encoding`` keyword argument:
|
|
168
|
+
|
|
169
|
+
.. code-block:: python
|
|
170
|
+
|
|
171
|
+
>>> img.write_asam_string(0x3030, "MOTOR_ÜBERDREHZAHL", "ASCII", encoding="latin-1")
|
|
172
|
+
>>> img.read_asam_string(0x3030, "ASCII", encoding="latin-1")
|
|
173
|
+
'MOTOR_ÜBERDREHZAHL'
|
|
174
|
+
|
|
166
175
|
ASAM numeric arrays
|
|
167
176
|
-------------------
|
|
168
177
|
|
|
@@ -202,6 +211,65 @@ ASAM ndarrays (NumPy)
|
|
|
202
211
|
>>> np.array_equal(matrix_rt, matrix)
|
|
203
212
|
True
|
|
204
213
|
|
|
214
|
+
ASAM ndarrays — ALTERNATE_WITH_X / ALTERNATE_WITH_Y
|
|
215
|
+
----------------------------------------------------
|
|
216
|
+
|
|
217
|
+
For characteristic maps (2-D) the ``ALTERNATE_WITH_X`` and ``ALTERNATE_WITH_Y``
|
|
218
|
+
index modes interleave axis coordinate values with the function values in memory.
|
|
219
|
+
|
|
220
|
+
**ALTERNATE_WITH_X** — each X-column is preceded by its X-axis coordinate:
|
|
221
|
+
|
|
222
|
+
.. code-block:: python
|
|
223
|
+
|
|
224
|
+
>>> import numpy as np
|
|
225
|
+
>>> from objutils import Image, Section
|
|
226
|
+
|
|
227
|
+
>>> # Value matrix numpy shape (Y=2, X=3); ASAM shape (X=3, Y=2)
|
|
228
|
+
>>> vals = np.array([[11, 21, 31], [12, 22, 32]], dtype=np.uint8)
|
|
229
|
+
>>> x_ax = np.array([10, 20, 30], dtype=np.uint8)
|
|
230
|
+
|
|
231
|
+
>>> total = 3 * (1 + 2) # num_x * (axis_byte + num_y)
|
|
232
|
+
>>> img = Image([Section(0xA000, bytes(total + 8))])
|
|
233
|
+
>>> img.write_asam_ndarray(0xA000, vals, "UBYTE", "MSB_LAST",
|
|
234
|
+
... index_mode="ALTERNATE_WITH_X", x_axis=x_ax)
|
|
235
|
+
|
|
236
|
+
>>> # Raw memory: [10, 11, 12, 20, 21, 22, 30, 31, 32]
|
|
237
|
+
>>> list(img.read(0xA000, total))
|
|
238
|
+
[10, 11, 12, 20, 21, 22, 30, 31, 32]
|
|
239
|
+
|
|
240
|
+
>>> result = img.read_asam_ndarray(0xA000, 0, "UBYTE",
|
|
241
|
+
... shape=(3, 2), byte_order="MSB_LAST",
|
|
242
|
+
... index_mode="ALTERNATE_WITH_X")
|
|
243
|
+
>>> np.array_equal(result.values, vals)
|
|
244
|
+
True
|
|
245
|
+
>>> np.array_equal(result.axis, x_ax)
|
|
246
|
+
True
|
|
247
|
+
|
|
248
|
+
**ALTERNATE_WITH_Y** — each Y-row is preceded by its Y-axis coordinate:
|
|
249
|
+
|
|
250
|
+
.. code-block:: python
|
|
251
|
+
|
|
252
|
+
>>> y_ax = np.array([100, 200], dtype=np.uint8)
|
|
253
|
+
|
|
254
|
+
>>> total_y = 2 * (1 + 3) # num_y * (axis_byte + num_x)
|
|
255
|
+
>>> img2 = Image([Section(0xB000, bytes(total_y + 8))])
|
|
256
|
+
>>> img2.write_asam_ndarray(0xB000, vals, "UBYTE", "MSB_LAST",
|
|
257
|
+
... index_mode="ALTERNATE_WITH_Y", y_axis=y_ax)
|
|
258
|
+
|
|
259
|
+
>>> # Raw memory: [100, 11, 21, 31, 200, 12, 22, 32]
|
|
260
|
+
>>> list(img2.read(0xB000, total_y))
|
|
261
|
+
[100, 11, 21, 31, 200, 12, 22, 32]
|
|
262
|
+
|
|
263
|
+
>>> result2 = img2.read_asam_ndarray(0xB000, 0, "UBYTE",
|
|
264
|
+
... shape=(3, 2), byte_order="MSB_LAST",
|
|
265
|
+
... index_mode="ALTERNATE_WITH_Y")
|
|
266
|
+
>>> np.array_equal(result2.values, vals)
|
|
267
|
+
True
|
|
268
|
+
|
|
269
|
+
``read_asam_ndarray`` returns an ``AlternateArrayResult`` named tuple for
|
|
270
|
+
these modes. Access the parts via ``result.values`` / ``result.axis``, or
|
|
271
|
+
unpack: ``values, axis = result``.
|
|
272
|
+
|
|
205
273
|
What next?
|
|
206
274
|
----------
|
|
207
275
|
|
|
@@ -178,13 +178,35 @@ side by side in one small image.
|
|
|
178
178
|
- ``UTF16``
|
|
179
179
|
- ``UTF32``
|
|
180
180
|
|
|
181
|
+
.. rubric:: Encoding override for ASAM strings
|
|
182
|
+
|
|
183
|
+
When an ECU stores text that cannot be decoded with the default ASAM mapping
|
|
184
|
+
(for example Latin-1 characters in a nominally ASCII field), pass an explicit
|
|
185
|
+
``encoding`` keyword argument to override:
|
|
186
|
+
|
|
187
|
+
.. code-block:: python
|
|
188
|
+
|
|
189
|
+
from objutils import Image, Section
|
|
190
|
+
|
|
191
|
+
img = Image([Section(0x4000, bytes(64))])
|
|
192
|
+
|
|
193
|
+
# Write a string that contains a non-ASCII character (Ü = 0xDC in Latin-1)
|
|
194
|
+
img.write_asam_string(0x4000, "MOTOR_ÜBERDREHZAHL", "ASCII", encoding="latin-1")
|
|
195
|
+
|
|
196
|
+
# Read it back with the same override
|
|
197
|
+
text = img.read_asam_string(0x4000, "ASCII", encoding="latin-1")
|
|
198
|
+
# text == 'MOTOR_ÜBERDREHZAHL'
|
|
199
|
+
|
|
200
|
+
Without ``encoding=...`` the codec is derived from *dtype* as usual
|
|
201
|
+
(``ASCII`` → ``"ascii"``, ``UTF8`` → ``"utf-8"``, …).
|
|
202
|
+
|
|
181
203
|
.. rubric:: ASAM Array Cheat Sheet
|
|
182
204
|
|
|
183
205
|
Quick reference for the ASAM array helpers on ``Image`` and ``Section``.
|
|
184
206
|
|
|
185
207
|
.. list-table::
|
|
186
208
|
:header-rows: 1
|
|
187
|
-
:widths: 30 18
|
|
209
|
+
:widths: 30 18 28 20
|
|
188
210
|
|
|
189
211
|
* - Method
|
|
190
212
|
- ``length`` semantics
|
|
@@ -198,10 +220,14 @@ Quick reference for the ASAM array helpers on ``Image`` and ``Section``.
|
|
|
198
220
|
- n/a (from ``len(data)``)
|
|
199
221
|
- ``None``
|
|
200
222
|
- scalar lists/tuples
|
|
201
|
-
* - ``read_asam_ndarray(...)``
|
|
223
|
+
* - ``read_asam_ndarray(...)`` ROW_DIR / COLUMN_DIR
|
|
202
224
|
- element count
|
|
203
225
|
- ``numpy.ndarray``
|
|
204
226
|
- matrix/tensor data
|
|
227
|
+
* - ``read_asam_ndarray(...)`` ALTERNATE_WITH_X/Y
|
|
228
|
+
- ignored (derived from shape)
|
|
229
|
+
- ``AlternateArrayResult(values, axis)``
|
|
230
|
+
- interleaved axis+value maps
|
|
205
231
|
* - ``write_asam_ndarray(...)``
|
|
206
232
|
- n/a (from ``array.nbytes``)
|
|
207
233
|
- ``None``
|
|
@@ -217,13 +243,77 @@ Quick reference for the ASAM array helpers on ``Image`` and ``Section``.
|
|
|
217
243
|
.. note::
|
|
218
244
|
**ASAM index modes**
|
|
219
245
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
246
|
+
+------------------------+---------------------------------------------------+
|
|
247
|
+
| ``index_mode`` | Memory layout |
|
|
248
|
+
+========================+===================================================+
|
|
249
|
+
| ``ROW_DIR`` (default) | C-order row-major; X increments fastest |
|
|
250
|
+
+------------------------+---------------------------------------------------+
|
|
251
|
+
| ``COLUMN_DIR`` | X and Y swapped; not true Fortran for dims > 2 |
|
|
252
|
+
+------------------------+---------------------------------------------------+
|
|
253
|
+
| ``ALTERNATE_WITH_X`` | 2-D maps only: each X-column preceded by its |
|
|
254
|
+
| | X-axis coordinate value in memory |
|
|
255
|
+
+------------------------+---------------------------------------------------+
|
|
256
|
+
| ``ALTERNATE_WITH_Y`` | 2-D maps only: each Y-row preceded by its Y-axis |
|
|
257
|
+
| | coordinate value in memory |
|
|
258
|
+
+------------------------+---------------------------------------------------+
|
|
259
|
+
|
|
260
|
+
For ``ALTERNATE_WITH_X`` / ``ALTERNATE_WITH_Y``:
|
|
261
|
+
|
|
262
|
+
- Pass axis values with ``x_axis=<array>`` or ``y_axis=<array>`` to
|
|
263
|
+
``write_asam_ndarray``.
|
|
264
|
+
- ``read_asam_ndarray`` returns an ``AlternateArrayResult(values, axis)``
|
|
265
|
+
named tuple; unpack with ``values, axis = result`` or access as
|
|
266
|
+
``result.values`` / ``result.axis``.
|
|
267
|
+
- The ``length`` parameter of ``read_asam_ndarray`` is ignored for these
|
|
268
|
+
modes; the byte count is derived from ``shape``.
|
|
269
|
+
|
|
270
|
+
``shape`` always uses **ASAM convention** ``(X, Y, Z, …)`` – reversed
|
|
271
|
+
compared to numpy ``(…, Z, Y, X)``.
|
|
272
|
+
|
|
273
|
+
.. rubric:: ALTERNATE_WITH_X example (map, 5 columns × 4 rows)
|
|
274
|
+
|
|
275
|
+
.. code-block:: python
|
|
276
|
+
|
|
277
|
+
import numpy as np
|
|
278
|
+
from objutils import Image, Section
|
|
279
|
+
|
|
280
|
+
# Value matrix: shape (4, 5) in numpy = ASAM shape (X=5, Y=4)
|
|
281
|
+
matrix = np.array(
|
|
282
|
+
[[11, 21, 31, 41, 51],
|
|
283
|
+
[12, 22, 32, 42, 52],
|
|
284
|
+
[13, 23, 33, 43, 53],
|
|
285
|
+
[14, 24, 34, 44, 54]],
|
|
286
|
+
dtype=np.uint8,
|
|
287
|
+
)
|
|
288
|
+
x_axis = np.array([10, 20, 30, 40, 50], dtype=np.uint8)
|
|
289
|
+
|
|
290
|
+
# Memory: x[0]=10, col0=[11,12,13,14], x[1]=20, col1=[21,22,23,24], …
|
|
291
|
+
img = Image([Section(0x8000, bytes(5 * (1 + 4) + 16))])
|
|
292
|
+
img.write_asam_ndarray(0x8000, matrix, "UBYTE", "MSB_LAST",
|
|
293
|
+
index_mode="ALTERNATE_WITH_X", x_axis=x_axis)
|
|
294
|
+
|
|
295
|
+
result = img.read_asam_ndarray(0x8000, 0, "UBYTE",
|
|
296
|
+
shape=(5, 4), byte_order="MSB_LAST",
|
|
297
|
+
index_mode="ALTERNATE_WITH_X")
|
|
298
|
+
assert np.array_equal(result.values, matrix)
|
|
299
|
+
assert np.array_equal(result.axis, x_axis)
|
|
300
|
+
|
|
301
|
+
.. rubric:: ALTERNATE_WITH_Y example (map, 5 columns × 4 rows)
|
|
302
|
+
|
|
303
|
+
.. code-block:: python
|
|
304
|
+
|
|
305
|
+
y_axis = np.array([1, 2, 3, 4], dtype=np.uint8)
|
|
306
|
+
|
|
307
|
+
# Memory: y[0]=1, row0=[11,21,31,41,51], y[1]=2, row1=[12,22,32,42,52], …
|
|
308
|
+
img2 = Image([Section(0x9000, bytes(4 * (1 + 5) + 16))])
|
|
309
|
+
img2.write_asam_ndarray(0x9000, matrix, "UBYTE", "MSB_LAST",
|
|
310
|
+
index_mode="ALTERNATE_WITH_Y", y_axis=y_axis)
|
|
223
311
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
312
|
+
result2 = img2.read_asam_ndarray(0x9000, 0, "UBYTE",
|
|
313
|
+
shape=(5, 4), byte_order="MSB_LAST",
|
|
314
|
+
index_mode="ALTERNATE_WITH_Y")
|
|
315
|
+
assert np.array_equal(result2.values, matrix)
|
|
316
|
+
assert np.array_equal(result2.axis, y_axis)
|
|
227
317
|
|
|
228
318
|
.. warning::
|
|
229
319
|
**Frequent pitfalls**
|
|
@@ -232,6 +322,8 @@ Quick reference for the ASAM array helpers on ``Image`` and ``Section``.
|
|
|
232
322
|
- Forgetting that byte order is applied per element, not per full buffer.
|
|
233
323
|
- Passing unsupported ASAM dtype names (must be values like ``UWORD``/``ULONG``).
|
|
234
324
|
- Assuming MSW swapping affects 8-bit types (it does not).
|
|
325
|
+
- Using ``ALTERNATE_WITH_X`` / ``ALTERNATE_WITH_Y`` with a 1-D array or
|
|
326
|
+
without a 2-D ``shape`` parameter.
|
|
235
327
|
|
|
236
328
|
.. rubric:: Copy/paste example: ULONG array roundtrip
|
|
237
329
|
|
|
@@ -798,11 +798,29 @@ class Image:
|
|
|
798
798
|
|
|
799
799
|
Args:
|
|
800
800
|
addr: Absolute memory address to write to.
|
|
801
|
-
array: NumPy ndarray (shape in numpy convention).
|
|
802
|
-
dtype: ASAM datatype name.
|
|
803
|
-
byte_order: ASAM byte order string.
|
|
804
|
-
index_mode:
|
|
805
|
-
|
|
801
|
+
array: NumPy ndarray (shape in numpy convention, i.e. rows × columns).
|
|
802
|
+
dtype: ASAM datatype name (e.g. ``"UWORD"``, ``"ULONG"``).
|
|
803
|
+
byte_order: ASAM byte order string (e.g. ``"MSB_FIRST"``, ``"MSB_LAST"``).
|
|
804
|
+
index_mode: Memory layout mode:
|
|
805
|
+
|
|
806
|
+
- ``"ROW_DIR"`` (default) – C-order row-major; X increments fastest.
|
|
807
|
+
- ``"COLUMN_DIR"`` – X and Y swapped; not true Fortran-order for
|
|
808
|
+
dims > 2.
|
|
809
|
+
- ``"ALTERNATE_WITH_X"`` – 2-D maps only; each X-column is preceded
|
|
810
|
+
by its X-axis coordinate value. Pass axis values via
|
|
811
|
+
``x_axis=<array>`` in *kws*.
|
|
812
|
+
- ``"ALTERNATE_WITH_Y"`` – 2-D maps only; each Y-row is preceded by
|
|
813
|
+
its Y-axis coordinate value. Pass axis values via
|
|
814
|
+
``y_axis=<array>`` in *kws*.
|
|
815
|
+
**kws: Keyword arguments passed through to the section method.
|
|
816
|
+
Relevant for ALTERNATE modes:
|
|
817
|
+
|
|
818
|
+
- ``x_axis`` (array-like): X-axis coordinate values for
|
|
819
|
+
``ALTERNATE_WITH_X``.
|
|
820
|
+
- ``y_axis`` (array-like): Y-axis coordinate values for
|
|
821
|
+
``ALTERNATE_WITH_Y``.
|
|
822
|
+
- ``axis_dtype`` (str): ASAM datatype for axis values (defaults
|
|
823
|
+
to the same as *dtype*).
|
|
806
824
|
"""
|
|
807
825
|
self._call_address_function("write_asam_ndarray", addr, array, dtype, byte_order, index_mode=index_mode, **kws)
|
|
808
826
|
|
|
@@ -847,15 +865,36 @@ class Image:
|
|
|
847
865
|
|
|
848
866
|
Args:
|
|
849
867
|
addr: Start address to read from.
|
|
850
|
-
length: Number of **elements** (not bytes).
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
868
|
+
length: Number of **elements** (not bytes). Ignored for
|
|
869
|
+
``ALTERNATE_WITH_X`` and ``ALTERNATE_WITH_Y`` – the byte count
|
|
870
|
+
is derived from *shape* in those modes.
|
|
871
|
+
dtype: ASAM datatype name (e.g. ``"UWORD"``, ``"ULONG"``).
|
|
872
|
+
shape: Dimensions in **ASAM** order ``(X, Y, Z, ...)``, which is
|
|
873
|
+
the reverse of numpy order ``(..., Z, Y, X)``.
|
|
874
|
+
**Required** for ``ALTERNATE_WITH_X`` and ``ALTERNATE_WITH_Y``.
|
|
875
|
+
byte_order: ASAM byte order string (e.g. ``"MSB_FIRST"``, ``"MSB_LAST"``).
|
|
876
|
+
index_mode: Memory layout mode:
|
|
877
|
+
|
|
878
|
+
- ``"ROW_DIR"`` (default) – C-order row-major; X increments fastest.
|
|
879
|
+
- ``"COLUMN_DIR"`` – X and Y swapped; not true Fortran-order for
|
|
880
|
+
dims > 2.
|
|
881
|
+
- ``"ALTERNATE_WITH_X"`` – 2-D maps only; each X-column is preceded
|
|
882
|
+
by its X-axis coordinate value in memory.
|
|
883
|
+
- ``"ALTERNATE_WITH_Y"`` – 2-D maps only; each Y-row is preceded by
|
|
884
|
+
its Y-axis coordinate value in memory.
|
|
885
|
+
**kws: Keyword arguments passed through to the section method.
|
|
886
|
+
Relevant for ALTERNATE modes:
|
|
887
|
+
|
|
888
|
+
- ``axis_dtype`` (str): ASAM datatype for axis values (defaults
|
|
889
|
+
to the same as *dtype*).
|
|
856
890
|
|
|
857
891
|
Returns:
|
|
858
|
-
|
|
892
|
+
- ``numpy.ndarray`` with shape in numpy convention for ``ROW_DIR``
|
|
893
|
+
and ``COLUMN_DIR``.
|
|
894
|
+
- :class:`~objutils.section.AlternateArrayResult` ``(values, axis)``
|
|
895
|
+
named tuple for ``ALTERNATE_WITH_X`` and ``ALTERNATE_WITH_Y``.
|
|
896
|
+
Access via ``result.values`` / ``result.axis`` or unpack:
|
|
897
|
+
``values, axis = result``.
|
|
859
898
|
"""
|
|
860
899
|
return self._call_address_function(
|
|
861
900
|
"read_asam_ndarray", addr, length, dtype, shape=shape, byte_order=byte_order, index_mode=index_mode, **kws
|