diff --git a/.clang-format b/.clang-format index 2ff7a5b4d..31db2a719 100644 --- a/.clang-format +++ b/.clang-format @@ -1,55 +1,15 @@ -AccessModifierOffset: -4 -AlignAfterOpenBracket: DontAlign -AlignConsecutiveAssignments: false -AlignConsecutiveDeclarations: false -AlignEscapedNewlinesLeft: true -AlignOperands: false -AlignTrailingComments: false -AllowAllParametersOfDeclarationOnNextLine: false -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: Inline -AllowShortIfStatementsOnASingleLine: false -AllowShortLoopsOnASingleLine: false +BasedOnStyle: Mozilla +AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterReturnType: None -AlwaysBreakBeforeMultilineStrings: false -AlwaysBreakTemplateDeclarations: true -BinPackParameters: false -BreakBeforeBinaryOperators: None -BreakBeforeBraces: Allman -BreakBeforeTernaryOperators: false -BreakConstructorInitializersBeforeComma: false -BreakStringLiterals: false -ColumnLimit: 140 -ConstructorInitializerAllOnOneLineOrOnePerLine: false +ColumnLimit: '120' +SpaceAfterCStyleCast: 'false' +SpaceAfterTemplateKeyword: 'false' +SpaceBeforeAssignmentOperators: 'true' +SpaceBeforeCpp11BracedList: 'true' +TabWidth: 4 +IndentWidth: 4 ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 4 -Cpp11BracedListStyle: false -DerivePointerBinding: false -IndentCaseLabels: true -IndentFunctionDeclarationAfterType: false -IndentWidth: 4 -KeepEmptyLinesAtTheStartOfBlocks: false -Language: Cpp -MaxEmptyLinesToKeep: 2 -NamespaceIndentation: None -PenaltyBreakBeforeFirstCallParameter: 100 -PenaltyBreakFirstLessLess: 0 -PenaltyBreakString: 100 -PenaltyExcessCharacter: 100 -PenaltyReturnTypeOnItsOwnLine: 20 -PointerAlignment: Left -ReflowComments: false -SortIncludes: false -SpaceAfterCStyleCast: false -SpaceBeforeAssignmentOperators: true -SpaceBeforeParens: ControlStatements -SpaceInEmptyParentheses: false -SpacesBeforeTrailingComments: 0 -SpacesInAngles: false -SpacesInCStyleCastParentheses: false -SpacesInParentheses: false -SpacesInSquareBrackets: false -Standard: Cpp03 -TabWidth: 4 -UseTab: Always +UseTab: Never +MaxEmptyLinesToKeep: 1 +SortIncludes: false \ No newline at end of file diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..a106772d0 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,17 @@ +name: Documentation + +on: + push: + tags: + - 'v*' + - '*.*.*' + +jobs: + trigger-docs: + runs-on: ubuntu-latest + steps: + - name: Trigger Read the Docs Build + run: | + curl -X POST \ + -H "Authorization: Token ${{ secrets.RTD_API_TOKEN }}" \ + https://app.readthedocs.org/api/v3/projects/python-ics/versions/master/builds/ diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 000000000..4a585c0f4 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,54 @@ +name: Test + +on: + push: + branches: [ master ] + pull_request: + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ["3.10", "3.11", "3.12", "3.13"] + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: recursive + + # Install system dependencies + - name: Install system dependencies (Ubuntu) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y cmake clang clang-format clang-tools flex bison build-essential + + - name: Install system dependencies (macOS) + if: runner.os == 'macOS' + run: | + brew install cmake clang-format + + - name: Install system dependencies (Windows) + if: runner.os == 'Windows' + run: | + choco install llvm cmake + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install uv + uses: astral-sh/setup-uv@v3 + + - name: Install dependencies + run: | + uv sync --group test + + - name: Run tests + run: | + uv run pytest tests/ --verbose \ No newline at end of file diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml new file mode 100644 index 000000000..341afa198 --- /dev/null +++ b/.github/workflows/wheels.yml @@ -0,0 +1,105 @@ +name: Build + +on: [push, pull_request] + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-24.04, windows-2022, macOS-14] + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 # needed for history/tags + + # Enable emulation for aarch64 + - name: Set up QEMU + if: runner.os == 'Linux' + uses: docker/setup-qemu-action@v3 + with: + platforms: all + + # Used to host cibuildwheel + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Get python_ics version + uses: mtkennerly/dunamai-action@v1 + with: + env-var: PYTHON_ICS_VERSION + args: --format "v{base}-{commit}-{timestamp}" + - name: Print python_ics version + run: echo $PYTHON_ICS_VERSION + + - name: Install cibuildwheel + run: python -m pip install cibuildwheel + + - name: Build wheels + run: python -m cibuildwheel --output-dir wheelhouse + + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: python_ics-${{ matrix.os }}-${{ env.PYTHON_ICS_VERSION }} + path: ./wheelhouse/*.whl + if-no-files-found: error + + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + pattern: python_ics-* + merge-multiple: true + path: ./wheelhouse/ + + deploy_pypi: + name: "Deploy PyPI" + runs-on: ubuntu-latest + needs: build_wheels + if: | + github.ref_name == 'master' || + startsWith(github.event.ref, 'refs/tags/v') + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + cache-dependency-glob: uv.lock + + - name: Set up Python + run: | + uv python install 3.12 + uv venv -p 3.12 + source .venv/bin/activate + uv pip install check-wheel-contents twine + + - uses: actions/download-artifact@v4 + with: + pattern: python_ics-* + merge-multiple: true + path: ./wheelhouse/ + + - name: "Publish to PyPI" + if: | + github.ref_name == 'master' || + startsWith(github.event.ref, 'refs/tags/v') + run: | + source .venv/bin/activate + uv pip install check-wheel-contents twine + # W009/W010 fire on the delvewheel-repaired Windows wheels, whose + # vendored-runtime dir (python_ics.libs/ with msvcp140*.dll) is a + # second toplevel entry with no Python modules. That layout is + # correct for repaired wheels; a [tool.check-wheel-contents] + # toplevel allowlist would instead fail the macOS/Linux wheels, + # which don't have the directory. + check-wheel-contents --ignore W009,W010 ./wheelhouse/*.whl + twine upload -u __token__ -p ${{ secrets.PYPI_TOKEN }} --verbose ./wheelhouse/* \ No newline at end of file diff --git a/.gitignore b/.gitignore index 19d160300..71562d15b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,10 @@ +# python virtual environment +.venv/ + +icsnVC40_processed.h +icsnVC40.h.* +*.whl + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] @@ -20,6 +27,7 @@ lib64/ parts/ sdist/ var/ +gen/ *.egg-info/ .installed.cfg *.egg @@ -99,4 +107,5 @@ msvc/ipch* # in-tree builds /libusb -/libicsneo \ No newline at end of file +/libicsneo +/libpcap \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..1cf2ed09a --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src/ice"] + path = src/ice + url = https://github.com/ic3man5/ice.git diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 000000000..4f9e1b244 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,50 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + apt_packages: + - curl + - flex + - bison + - clang + - clang-format + - build-essential + - cmake + tools: + python: "3.11" + + # You can also specify other tool versions: + # nodejs: "20" + # rust: "1.70" + # golang: "1.20" + +# VCS submodules configuration. +submodules: + include: all + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: doc/source/conf.py + # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs + builder: "html" + # Fail on all warnings to avoid broken references + # fail_on_warning: true + +# Optionally build your docs in additional formats such as PDF and ePub +formats: + - pdf + - epub + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - method: pip + path: . + - requirements: doc/requirements.txt \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..34970dd89 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,28 @@ +notifications: + email: false + +matrix: + include: + - sudo: required + services: + - docker + env: DOCKER_IMAGE=quay.io/pypa/manylinux_2_24_x86_64 + PLAT=manylinux_2_24_x86_64 + - sudo: required + services: + - docker + env: DOCKER_IMAGE=quay.io/pypa/manylinux_2_24_x86_64 + PRE_CMD=linux32 + PLAT=manylinux_2_24_i686 + - sudo: required + services: + - docker + env: DOCKER_IMAGE=quay.io/pypa/manylinux_2_28_x86_64 + PLAT=manylinux_2_28_x86_64 + +install: + - docker pull $DOCKER_IMAGE + +script: + - docker run --rm -e PLAT=$PLAT -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD /io/travis/build-wheels.sh + - ls wheelhouse/ \ No newline at end of file diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 000000000..2e8a29b09 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,25 @@ +{ + "configurations": [ + { + "name": "Win32", + "includePath": [ + "${default}", + "${workspaceFolder}/include", + "${workspaceFolder}/include/ics", + "${workspaceFolder}/src/ice/include" + ], + "defines": [ + "_DEBUG", + "UNICODE", + "_UNICODE", + "EXTERNAL_PROJECT" + ], + "windowsSdkVersion": "10.0.19041.0", + "compilerPath": "cl.exe", + "cStandard": "c17", + "cppStandard": "c++17", + "intelliSenseMode": "windows-msvc-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..b37d86dc5 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,11 @@ +{ + "recommendations": [ + "ms-python.python", + "charliermarsh.ruff", + "mikoz.black-py", + "xaver.clang-format", + "webfreak.debug", + "tamasfe.even-better-toml", + "fill-labs.dependi" + ] +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index ddffc7023..d01294534 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -37,5 +37,37 @@ "console": "integratedTerminal", "args": ["include/ics/icsnVC40.h", ], }, + { + "name": "Python: Debug icsdebug.py", + "type": "debugpy", + "request": "launch", + "program": "src/icsdebug.py", + "console": "integratedTerminal" + }, + { + "name": "Debugger Attach", + "type": "cppvsdbg", + "request": "attach", + "pid": "${command:pickProcess}", + }, + /* + { + "name": "Debugger Attach lldb", + "type": "lldb", + "request": "attach", + "pid": "${command:pickProcess}", + } + */ + { + "name": "Debugger attach gdbserver", + "type": "gdb", + "request": "attach", + "executable": "python icsdebug.py", + "target": "127.0.0.1:1234", + "remote": true, + "cwd": "${workspaceRoot}", + "gdbpath": "gdb", + "autorun": [] + }, ] } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..94d4d895e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,14 @@ +{ + "python.analysis.autoImportCompletions": false, + "python.analysis.indexing": false, + "python.analysis.packageIndexDepths": [ + { + "name": "ics", + "depth": 0 + } + ], + "python.analysis.exclude": [ + "**/gen/**", + "**/.venv/**" + ] +} \ No newline at end of file diff --git a/IntrepidCS.png b/IntrepidCS.png new file mode 100644 index 000000000..cfe078c74 Binary files /dev/null and b/IntrepidCS.png differ diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 000000000..b7a5698f9 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/MANIFEST.in b/MANIFEST.in index d87d74741..53ac05dab 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ recursive-include include *.h -include extract_icsneo40_defines.py -include generate_icsneo40_structs.py \ No newline at end of file +include *.py +graft include +graft src diff --git a/README.md b/README.md index 5ec2de00e..7705f9454 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,128 @@ -# python_ics +![](https://github.com/intrepidcs/python_ics/blob/master/IntrepidCS.png?raw=true) -Python C Code module for interfacing to the icsneo40 dynamic library. Code tries to respect PEP 8 (https://www.python.org/dev/peps/pep-0008/). Function naming convention does not follow the tradition c style icsneo40 naming convention as the python_ics module name acts as the namespace (icsneo portion of the function) and function names are suppose to be lowercase with underscores instead of mixedCase like icsneo API. +![](https://github.com/intrepidcs/python_ics/actions/workflows/wheels.yml/badge.svg) + +# Description + +Python wrapper for interfacing to IntrepidCS Hardware. # Installing - `pip install python_ics` -- Placing icsneo40.dll in the system path as the api uses this DLL extensively. +## Platform specific Installation notes -# How to use +### Windows -#### Documentation +- Windows requires icsneo40.dll to be installed in the PATH. This can be obtained through vspy3 or our hardware installation kit found here: https://cdn.intrepidcs.net/updates/files/RP1210KitInstall.zip -http://python-ics.readthedocs.io/ +### Linux + +- Linux builds use [libicsneo](https://github.com/intrepidcs/libicsneo) and are built against [manylinux](https://github.com/pypa/manylinux) using cibuildwheel. +- libicsneolegacy.so is bundled with the wheel and python_ics will automatically use it. + +### MacOS + +- Mac builds use [libicsneo](https://github.com/intrepidcs/libicsneo) and are built using cibuildwheel +- libicsneolegacy.dylib is bundled with the wheel and python_ics will automatically use it. + +## Versioning -#### C API can be mimiced almost identically by doing the following: +Starting with **1!26.3.9**, python_ics versions track the Vehicle Spy +version they were generated from (Vspy 3.26.3.9 → python_ics 26.3.9). - >>> import ics as icsneo - >>> devices = icsneo.FindNeoDevices() - >>> for device in devices: - ... print(device.Name, device.SerialNumber) - ... - neoVI FIRE 59886 - -#### Recommended Python way by doing the following: +The `1!` prefix is a [PEP 440 epoch](https://peps.python.org/pep-0440/#version-epochs). +Earlier releases used the icsneo40 DLL version (e.g. 923.11), which sorts +*above* 26.x, so the epoch tells pip the scheme changed: - >>> import ics - >>> devices = ics.find_devices() - >>> for device in devices: - ... print(device.Name, device.SerialNumber) - ... - neoVI FIRE 59886 +- `pip install python_ics` and `pip install -U python_ics` correctly + resolve `1!26.3.9` as newer than `923.11`. +- Exact pins must include the epoch: `python_ics==1!26.3.9`. +- Range pins work with or without it: `python_ics>=1!26.3`. + +**Release tagging:** tags are `v1!` (e.g. `v1!26.3.9`). Every +future tag keeps the `1!` prefix — a bare `v26.x` tag would sort below +the historical 923.x releases and pip would ignore it. + +# Basic usage + +```python +import ics + +devices = ics.find_devices() +print(f"Found {len(devices)} devices...") +for device in devices: + # Print, open, load default settings, close + print(device) + device.open() + device.load_default_settings() + device.close() +``` + +# Documentation + +http://python-ics.readthedocs.io/ -It should be noted that `ics.NeoDevice` is used a little bit differently than the C API. `ics.NeoDevice` contains two extra members: -`ics.NeoDevice.AutoHandleClose` and `ics.NeoDevice._Handle` -The handle normally returned from `icsneoOpenNeoDevice()` is stored inside `_Handle` and setting `AutoHandleClose` to `True` (Default) will automatically close the handle when the `ics.NeoDevice` goes out of scope. +# Building from source + +- Building from source requires clang and clang-format to be present on the build machine. +- python_ics has submodules, please be sure to initial all submodules also. + +```powershell +PS > git clone git@github.com:intrepidcs/python_ics.git + +PS > cd python_ics + +PS > git submodule update --init + +PS > clang --version +clang version 11.1.0 +Target: x86_64-pc-windows-msvc +Thread model: posix +InstalledDir: C:\Program Files\LLVM\bin + +PS > clang-format --version +clang-format version 11.1.0 + +PS > python -m pip install . +``` + +# Debugging on Windows with Visual Studio Code + +- Build and install python_ics for debug. When installing python choose the following: + - Customize Installation -> Advanced Options + - Check Download debugging symbols + - Check Download debug binaries +- Build python with debug: + - Install Visual Studio 2019 build tools(NOTE: As of 2/5/24, it looks like MSVC 2022 does not build correctly with setuptools and debug configurations). You should be able to build from source already. + - Create virtual environment and activate it (powershell): + - `python -m venv .venv` + - `.\.venv\Scripts\Activate.ps1` + - Install dependencies: + - `python -m pip install -r requirements.txt` + - Set DEBUG environment variable: + - $env:DEBUG = "1" + - Build the extension: + - `python_d setup.py build --debug install --force` + - OUTDATED: + - Build in debug (`-g` flag): + - `python setup.py build -g` + - Install into our virtual environment: + - `python setup.py install --force` + - Inside visual studio code: + - Open the root python_ics directory + - `code C:\Path\To\python_ics` + - Make sure the python extension is installed (ctrl+shift+x) + - [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) + - [Python Debugger](https://marketplace.visualstudio.com/items?itemName=ms-python.debugpy) + - Select the python interpreter from our virtual environment (bottom right with a python file open in the editor). + - Open and place a breakpoint in `src/icsdebug.py` + - launch "Python: Debug icsdebug.py" + - Note the PID that is outputted to terminal (Can also add `os.getpid()` to watch window) + - Place a breakpoint inside the function you'd like to debug in `methods.cpp` + - launch "Debugger Attach" (`launch.json`) and enter the pid when prompted. + - enjoy! # License - MIT diff --git a/build_all.bat b/build_all.bat index 9a4a9eb15..deb023059 100644 --- a/build_all.bat +++ b/build_all.bat @@ -11,23 +11,28 @@ C:\Python\Python37-32\scripts\pip install wheel twine --upgrade C:\Python\Python38-32\scripts\pip install wheel twine --upgrade C:\Python\Python39-32\scripts\pip install wheel twine --upgrade C:\Python\Python310-32\scripts\pip install wheel twine --upgrade +C:\Python\Python311-32\scripts\pip install wheel twine --upgrade C:\Python\Python36-64\scripts\pip install wheel twine --upgrade C:\Python\Python37-64\scripts\pip install wheel twine --upgrade C:\Python\Python38-64\scripts\pip install wheel twine --upgrade C:\Python\Python39-64\scripts\pip install wheel twine --upgrade C:\Python\Python310-64\scripts\pip install wheel twine --upgrade +C:\Python\Python311-64\scripts\pip install wheel twine --upgrade C:\Python\Python36-32\python setup.py sdist bdist_wheel C:\Python\Python37-32\python setup.py sdist bdist_wheel C:\Python\Python38-32\python setup.py sdist bdist_wheel C:\Python\Python39-32\python setup.py sdist bdist_wheel C:\Python\Python310-32\python setup.py sdist bdist_wheel +C:\Python\Python311-32\python setup.py sdist bdist_wheel C:\Python\Python36-64\python setup.py sdist bdist_wheel C:\Python\Python37-64\python setup.py sdist bdist_wheel C:\Python\Python38-64\python setup.py sdist bdist_wheel C:\Python\Python39-64\python setup.py sdist bdist_wheel C:\Python\Python310-64\python setup.py sdist bdist_wheel +C:\Python\Python311-64\python setup.py sdist bdist_wheel + REM C:\Python\Python37-32\scripts\twine upload dist/* -r pypitest diff --git a/build_libicsneo.py b/build_libicsneo.py index 92edea154..93d7b16a4 100644 --- a/build_libicsneo.py +++ b/build_libicsneo.py @@ -3,77 +3,212 @@ import os import shutil import sys +from pathlib import Path -LIBICSNEO_COMMIT = '1bb33156f7ce15cf6e7b4736dbce845428ca4819' -LIBUSB_COMMIT = '4622bfcf44db373c53502e3fe873bd611e8332f6' +ROOT = Path.cwd() CPUS = str(multiprocessing.cpu_count()) +LIBUSB_VERSION = "1.0.27" +LIBUSB_ROOT = f"{ROOT}/libusb/{LIBUSB_VERSION}" +LIBUSB_SOURCE = f"{LIBUSB_ROOT}/source" +LIBUSB_BUILD = f"{LIBUSB_ROOT}/build" +LIBUSB_INSTALL = f"{LIBUSB_ROOT}/install" + +# libicsneo master 2026-07-08; its vendored icsnVC40.h is byte-identical +# to include/ics/icsnVC40.h (Vspy 3.26.3.9), so Linux/macOS wheels match +# the Windows ABI. Keep the two headers in lockstep on future bumps. +# libicsneo requires icspb (protobuf) as of 2026: its codegen needs the +# Ninja generator (protobuf_generate never creates PROTOC_OUT_DIR; Make +# doesn't pre-create declared output dirs, Ninja does), and it bootstraps +# protobuf from source at configure time — see ICSPB_BOOTSTRAP_DIR below. +LIBICSNEO_VERSION = "0dd8dbf" +LIBICSNEO_ROOT = f"{ROOT}/libicsneo/{LIBICSNEO_VERSION}" +LIBICSNEO_SOURCE = f"{LIBICSNEO_ROOT}/source" +LIBICSNEO_BUILD = f"{LIBICSNEO_ROOT}/build" +LIBICSNEO_INSTALL = f"{LIBICSNEO_ROOT}/install" +print(f"LIBICSNEO PATH: {LIBICSNEO_ROOT}") + +# icspb bootstraps protobuf from source at configure time. Keep the +# bootstrap OUTSIDE the libicsneo build dir so it survives the per-python +# `git clean` in _build_libicsneo_linux and is reused across all +# cibuildwheel builds in a job (it self-partitions by -, +# so sharing one root across archs is safe). Building protobuf once per +# arch instead of once per python matters most under QEMU aarch64. +ICSPB_BOOTSTRAP_DIR = f"{ROOT}/icspb_bootstrap" + +LIBPCAP_VERSION = "1.10.4" +LIBPCAP_ROOT = f"{ROOT}/libpcap/{LIBPCAP_VERSION}" +LIBPCAP_SOURCE = f"{LIBPCAP_ROOT}/source" +LIBPCAP_BUILD = f"{LIBPCAP_ROOT}/build" +LIBPCAP_INSTALL = f"{LIBPCAP_ROOT}/install" def checkout(): - if not os.path.isdir('libicsneo'): - subprocess.check_output( - ['git', 'clone', 'https://github.com/intrepidcs/libicsneo.git']) - subprocess.check_output( - ['git', 'checkout', LIBICSNEO_COMMIT], cwd='libicsneo') - - if not os.path.isdir('libusb'): - subprocess.check_output( - ['git', 'clone', 'https://github.com/libusb/libusb.git']) - subprocess.check_output(['git', 'checkout', LIBUSB_COMMIT], cwd='libusb') - + if not os.path.isdir(LIBICSNEO_SOURCE): + os.makedirs(LIBICSNEO_ROOT, exist_ok=True) + subprocess.check_output(["git", "clone", "https://github.com/intrepidcs/libicsneo.git", LIBICSNEO_SOURCE], cwd=LIBICSNEO_ROOT) + subprocess.check_output(["git", "checkout", LIBICSNEO_VERSION], cwd=LIBICSNEO_SOURCE) + + if not os.path.isdir(LIBUSB_SOURCE): + os.makedirs(LIBUSB_ROOT, exist_ok=True) + subprocess.check_output(["curl", "-LO", f"https://github.com/libusb/libusb/releases/download/v{LIBUSB_VERSION}/libusb-{LIBUSB_VERSION}.tar.bz2"], cwd=LIBUSB_ROOT) + subprocess.check_output(["tar", "-xf", f"libusb-{LIBUSB_VERSION}.tar.bz2"], cwd=LIBUSB_ROOT) + subprocess.check_output(["mv", f"libusb-{LIBUSB_VERSION}", "source"], cwd=LIBUSB_ROOT) + subprocess.check_output(["rm", f"libusb-{LIBUSB_VERSION}.tar.bz2"], cwd=LIBUSB_ROOT) + + if not os.path.isdir(LIBPCAP_SOURCE): + os.makedirs(LIBPCAP_ROOT, exist_ok=True) + subprocess.check_output(["curl", "-LO", f"https://www.tcpdump.org/release/libpcap-{LIBPCAP_VERSION}.tar.gz"], cwd=LIBPCAP_ROOT) + subprocess.check_output(["tar", "-xf", f"libpcap-{LIBPCAP_VERSION}.tar.gz"], cwd=LIBPCAP_ROOT) + subprocess.check_output(["mv", f"libpcap-{LIBPCAP_VERSION}", "source"], cwd=LIBPCAP_ROOT) + subprocess.check_output(["rm", f"libpcap-{LIBPCAP_VERSION}.tar.gz"], cwd=LIBPCAP_ROOT) def _build_libusb(): - subprocess.check_output(['git', 'clean', '-xdf'], cwd='libusb') - - subprocess.check_output(['./bootstrap.sh'], cwd='libusb') - + os.makedirs(LIBUSB_BUILD, exist_ok=True) + env = os.environ.copy() + if sys.platform == "darwin": + env["CFLAGS"] = "-arch x86_64 -arch arm64 -mmacosx-version-min=10.13" + env["CXXFLAGS"] = "-arch x86_64 -arch arm64 -mmacosx-version-min=10.13" + else: + env["CFLAGS"] = "-fPIC" + env["CXXFLAGS"] = "-fPIC" + subprocess.check_output([ + f"{LIBUSB_SOURCE}/configure", + "--disable-shared", + "--enable-static", + f"--prefix={LIBUSB_INSTALL}", + "--disable-udev" + ], cwd=LIBUSB_BUILD, env=env) + + subprocess.check_output(["make", "-j" + CPUS], cwd=LIBUSB_BUILD) + subprocess.check_output(["make", "install"], cwd=LIBUSB_BUILD) + +def _build_libpcap(): + os.makedirs(LIBPCAP_BUILD, exist_ok=True) env = os.environ.copy() - env['CFLAGS'] = '-arch x86_64 -arch arm64 -mmacosx-version-min=10.13' - env['CXXFLAGS'] = '-arch x86_64 -arch arm64 -mmacosx-version-min=10.13' + if sys.platform == "darwin": + env["CFLAGS"] = "-arch x86_64 -arch arm64 -mmacosx-version-min=10.13" + env["CXXFLAGS"] = "-arch x86_64 -arch arm64 -mmacosx-version-min=10.13" + else: + env["CFLAGS"] = "-fPIC" + env["CXXFLAGS"] = "-fPIC" + subprocess.check_output([ + f"{LIBPCAP_SOURCE}/configure", + "--disable-shared", + "--disable-usb", + "--disable-netmap", + "--disable-bluetooth", + "--disable-dbus", + "--disable-rdma", + "--without-dag", + "--without-septel", + "--without-snf", + "--without-turbocap", + "--without-dpdk", + "--without-libnl", + f"--prefix={LIBPCAP_INSTALL}", + ], cwd=LIBPCAP_BUILD, env=env) + + subprocess.check_output(["make", "-j" + CPUS], cwd=LIBPCAP_BUILD) + subprocess.check_output(["make", "install"], cwd=LIBPCAP_BUILD) + +def _cmake_ninja_args(): + # pip's ninja lives inside each isolated build env, and cibuildwheel + # deletes that env between python versions. A reused CMake build dir + # caches the old (now dead) path in CMAKE_MAKE_PROGRAM and fails at + # the next configure, so always override with the current ninja. + ninja = shutil.which("ninja") + args = ["-G", "Ninja"] + if ninja: + args.append(f"-DCMAKE_MAKE_PROGRAM={ninja}") + return args + + +def _build_libicsneo_linux(): + print("Cleaning libicsneo...") + subprocess.check_output(["git", "clean", "-xdf"], cwd="libicsneo") + subprocess.check_output(["mkdir", "-p", "libicsneo/build"]) + + print("cmake libicsneo...") subprocess.check_output( - ['./configure', '--disable-static', '--prefix=/tmp/libusb'], cwd='libusb', env=env) - - subprocess.check_output(['make', '-j' + CPUS], cwd='libusb') - subprocess.check_output(['make', 'install'], cwd='libusb') - - -def _build_icsneo(): - subprocess.check_output(['git', 'clean', '-xdf'], cwd='libicsneo') - subprocess.check_output(['mkdir', '-p', 'libicsneo/build']) - - subprocess.check_output(['cmake', '..', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64', - '-DLIBICSNEO_BUILD_ICSNEOLEGACY=ON', '-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13', - '-DLIBUSB_LIBRARIES=/tmp/libusb/lib/libusb-1.0.0.dylib', - '-DLIBUSB_INCLUDE_DIR=/tmp/libusb/include/libusb-1.0'], cwd='libicsneo/build') + [ + "cmake", + # Ninja is required: icspb's protobuf_generate never creates its + # output dir, and only Ninja pre-creates declared output dirs. + *_cmake_ninja_args(), + "-DCMAKE_BUILD_TYPE=Release", + "-DLIBICSNEO_BUILD_ICSNEOLEGACY=ON", + f"-DCMAKE_PREFIX_PATH={LIBUSB_INSTALL};{LIBPCAP_INSTALL}", + f"-DICSPB_BOOTSTRAP_DIR={ICSPB_BOOTSTRAP_DIR}", + "-S", LIBICSNEO_SOURCE, + "-B", LIBICSNEO_BUILD, + "-Wno-dev", + ] + ) + print("cmake build libicsneo...") + subprocess.check_output( + ["cmake", "--build", LIBICSNEO_BUILD, "--target", "icsneolegacy", "--parallel", CPUS] + ) - subprocess.check_output(['cmake', '--build', '.', '--target', - 'icsneolegacy', '--parallel', CPUS], cwd='libicsneo/build') - subprocess.check_output(['install_name_tool', '-change', '/tmp/libusb/lib/libusb-1.0.0.dylib', - '@loader_path/libusb-1.0.0.dylib', 'libicsneolegacy.dylib'], cwd='libicsneo/build') +def _build_libicsneo_macos(): + env = os.environ.copy() + # Set as env vars (not only -D flags) so icspb's nested protobuf + # bootstrap — a separate cmake invocation via execute_process, which + # inherits the environment but not our -D cache entries — also builds + # universal2 static libs instead of arm64-only ones. + env["CMAKE_OSX_ARCHITECTURES"] = "arm64;x86_64" + env["CMAKE_OSX_DEPLOYMENT_TARGET"] = "10.13" + subprocess.check_output( + [ + "cmake", + # Ninja is required: icspb's protobuf_generate never creates its + # output dir, and only Ninja pre-creates declared output dirs. + *_cmake_ninja_args(), + "-DCMAKE_BUILD_TYPE=Release", + "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64", + "-DLIBICSNEO_BUILD_ICSNEOLEGACY=ON", + "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13", + f"-DCMAKE_PREFIX_PATH={LIBUSB_INSTALL};{LIBPCAP_INSTALL}", + f"-DICSPB_BOOTSTRAP_DIR={ICSPB_BOOTSTRAP_DIR}", + "-S", LIBICSNEO_SOURCE, + "-B", LIBICSNEO_BUILD + ], + env=env, + ) + subprocess.check_output( + ["cmake", "--build", LIBICSNEO_BUILD, "--target", "icsneolegacy", "--parallel", CPUS] + ) def build(): + print("Building libusb...") _build_libusb() - _build_icsneo() - + print("Building libpcap...") + _build_libpcap() + if sys.platform == "darwin": + _build_libicsneo_macos() + elif sys.platform == "linux": + _build_libicsneo_linux() def copy(): - shutil.copyfile('/tmp/libusb/lib/libusb-1.0.0.dylib', - 'ics/libusb-1.0.0.dylib') - shutil.copyfile('libicsneo/build/libicsneolegacy.dylib', - 'ics/libicsneolegacy.dylib') + if sys.platform == "darwin": + shutil.copyfile(f"{LIBICSNEO_BUILD}/libicsneolegacy.dylib", "gen/ics/libicsneolegacy.dylib") + elif sys.platform == "linux": + shutil.copyfile(f"{LIBICSNEO_BUILD}/libicsneolegacy.so", "gen/ics/libicsneolegacy.so") def clean(): - shutil.rmtree('libicsneo') - shutil.rmtree('libusb') - shutil.rmtree('/tmp/libusb') - + shutil.rmtree("libicsneo") + shutil.rmtree("libusb") + shutil.rmtree("libpcap") -if __name__ == '__main__': - if '--clean' in sys.argv: +if __name__ == "__main__": + if "--clean" in sys.argv: clean() exit(0) + + print("Checking out libicsneo...") checkout() + print("Building libicsneo...") build() + print("Copy libicsneo...") copy() diff --git a/build_mac.sh b/build_mac.sh index 469b977e5..06d0ba033 100644 --- a/build_mac.sh +++ b/build_mac.sh @@ -1,13 +1,13 @@ #!/bin/sh python_directory="/Library/Frameworks/Python.framework/Versions" -python_versions=("3.7" "3.8" "3.9" "3.10") +python_versions=("3.7" "3.8" "3.9" "3.10" "3.11") -# libusb dependencies -brew install automake libtool cmake clang-format +# dependencies +brew install cmake clang-format ret_value=$? if [ $ret_value -ne 0 ]; then - echo "Failed to install automake/libtoolgit..." + echo "Failed to install clang/clang-format..." exit $ret_value fi diff --git a/cicsSpyStatusBits_processed.h b/cicsSpyStatusBits_processed.h new file mode 100644 index 000000000..b2f3b37c9 --- /dev/null +++ b/cicsSpyStatusBits_processed.h @@ -0,0 +1,243 @@ +// -------------------------------------------------------------------------- +// COPYRIGHT INTREPID CONTROL SYSTEMS, INC. (c) 1994-20xx +// Confidential and proprietary. This document and its contents are the +// property of Intrepid Control Systems, Inc. It is not to be copied, +// distributed, or otherwise disclosed or used without the prior written +// consent of Intrepid Control Systems Inc. +// All rights reserved. +// -------------------------------------------------------------------------- + +// SPY Status Bit Definitions +// Generated automatically - DO NOT MODIFY +// Modify cicsSpyStatusBits_config.yml and run cicsSpyStatusBits_gen.py +// Generated on: 2025-07-14 14:31:40 + +#ifndef CICSSPYSTATUSBITS_H_ +#define CICSSPYSTATUSBITS_H_ 1 + +// WARNING: The following bit conflicts were detected: +// spystatus value 0x10000000: // VSI value 'SPY_STATUS_VSI_IFR_CRC_BIT' conflicts with common value 'SPY_STATUS_PDU' +// spystatus value 0x10000000: // A2B value 'SPY_STATUS_A2B_CONTROL' conflicts with common value 'SPY_STATUS_PDU' +// spystatus value 0x08: // A2B value 'SPY_STATUS_A2B_SCF_VALID_WAITING' conflicts with common value 'SPY_STATUS_REMOTE_FRAME' +// spystatus value 0x40000000: // A2B value 'SPY_STATUS_A2B_UPSTREAM' conflicts with common value 'SPY_STATUS_HIGH_SPEED' +// spystatus value 0x10000000: // FLEXRAY value 'SPY_STATUS_FLEXRAY_PDU' conflicts with common value 'SPY_STATUS_PDU' +// spystatus value 0x40000000: // FLEXRAY value 'SPY_STATUS_FLEXRAY_PDU_UPDATE_BIT_SET' conflicts with common value 'SPY_STATUS_HIGH_SPEED' +// spystatus value 0x08: // FLEXRAY value 'SPY_STATUS_FLEXRAY_PDU_NO_UPDATE_BIT' conflicts with common value 'SPY_STATUS_REMOTE_FRAME' + +// Glyph definitions +// '|' - byte divider +// '.' - nibble divider +// '-' - unused bit +// 'o' - common bit +// 'x' - protocol specific bit +// '!' - conflict bit + +// SPYSTATUS bit definitions +// SPYSTATUS - Common bits +// |oo-o.oooo|oooo.oooo|oooo.oo-o|oo-o.oooo| +#define SPY_STATUS_GLOBAL_ERR 0x01 // Global error flag +#define SPY_STATUS_TX_MSG 0x02 // Transmitted message +#define SPY_STATUS_XTD_FRAME 0x04 // Extended frame +#define SPY_STATUS_REMOTE_FRAME 0x08 // Remote frame +#define SPY_STATUS_CRC_ERROR 0x10 // CRC error +#define SPY_STATUS_INCOMPLETE_FRAME 0x40 // Incomplete frame +#define SPY_STATUS_LOST_ARBITRATION 0x80 // Lost arbitration +#define SPY_STATUS_UNDEFINED_ERROR 0x0100 // Undefined error +#define SPY_STATUS_BUS_RECOVERED 0x0400 // Bus recovered +#define SPY_STATUS_BUS_SHORTED_PLUS 0x0800 // Bus shorted to plus +#define SPY_STATUS_BUS_SHORTED_GND 0x1000 // Bus shorted to ground +#define SPY_STATUS_CHECKSUM_ERROR 0x2000 // Checksum error +#define SPY_STATUS_BAD_MESSAGE_BIT_TIME_ERROR 0x4000 // Bad message bit time error +#define SPY_STATUS_TX_NOMATCH 0x8000 // TX no match +#define SPY_STATUS_COMM_IN_OVERFLOW 0x010000 // Communication input overflow +#define SPY_STATUS_EXPECTED_LEN_MISMATCH 0x020000 // Expected length mismatch +#define SPY_STATUS_MSG_NO_MATCH 0x040000 // Message no match +#define SPY_STATUS_BREAK 0x080000 // Break detected +#define SPY_STATUS_AVSI_REC_OVERFLOW 0x100000 // AVSI record overflow +#define SPY_STATUS_TEST_TRIGGER 0x200000 // Test trigger +#define SPY_STATUS_AUDIO_COMMENT 0x400000 // Audio comment +#define SPY_STATUS_GPS_DATA 0x800000 // GPS data +#define SPY_STATUS_ANALOG_DIGITAL_INPUT 0x01000000 // Analog digital input +#define SPY_STATUS_TEXT_COMMENT 0x02000000 // Text comment +#define SPY_STATUS_NETWORK_MESSAGE_TYPE 0x04000000 // Network message type +#define SPY_STATUS_VSI_TX_UNDERRUN 0x08000000 // VSI TX underrun +#define SPY_STATUS_PDU 0x10000000 // PDU message +#define SPY_STATUS_HIGH_SPEED 0x40000000 // High speed +#define SPY_STATUS_EXTENDED 0x80000000 // Extended - if this bit is set than decode StatusBitField3 in AckBytes + +// SPYSTATUS - A2B protocol bits +// |o!x!.oooo|oooo.oooo|oooo.oo-o|oo-o.!ooo| +#define SPY_STATUS_A2B_SCF_VALID_WAITING 0x08 // A2B SCF valid waiting +#define SPY_STATUS_A2B_CONTROL 0x10000000 // A2B control message +#define SPY_STATUS_A2B_MONITOR 0x20000000 // A2B monitor message +#define SPY_STATUS_A2B_UPSTREAM 0x40000000 // A2B upstream message + +// SPYSTATUS - CAN protocol bits +// |ooxo.oooo|oooo.oooo|oooo.ooxo|ooxo.oooo| +#define SPY_STATUS_CAN_ERROR_PASSIVE 0x20 // CAN error passive state +#define SPY_STATUS_CAN_BUS_OFF 0x0200 // CAN bus off state +#define SPY_STATUS_CANFD 0x20000000 // CAN FD frame + +// SPYSTATUS - ETHERNET protocol bits +// |oo-o.oooo|oooo.oooo|oooo.oo-o|ooxo.oooo| +#define SPY_STATUS_HEADERCRC_ERROR 0x20 // Header CRC error + +// SPYSTATUS - FLEXRAY protocol bits +// |o!-!.oooo|oooo.oooo|oooo.oo-o|oo-o.!ooo| +#define SPY_STATUS_FLEXRAY_PDU_NO_UPDATE_BIT 0x08 // FlexRay PDU no update bit +#define SPY_STATUS_FLEXRAY_PDU 0x10000000 // FlexRay PDU (alias for SPY_STATUS_PDU) +#define SPY_STATUS_FLEXRAY_PDU_UPDATE_BIT_SET 0x40000000 // FlexRay PDU update bit set + +// SPYSTATUS - LIN protocol bits +// |ooxo.oooo|oooo.oooo|oooo.oo-o|oo-o.oooo| +#define SPY_STATUS_LIN_MASTER 0x20000000 // LIN master message + +// SPYSTATUS - VSI protocol bits +// |oox!.oooo|oooo.oooo|oooo.oo-o|oo-o.oooo| +#define SPY_STATUS_VSI_IFR_CRC_BIT 0x10000000 // VSI IFR CRC bit +#define SPY_STATUS_INIT_MESSAGE 0x20000000 // Initialization message + +// SPYSTATUS2 bit definitions +// SPYSTATUS2 - Common bits +// |----.----|---o.--oo|----.----|----.oooo| +#define SPY_STATUS2_HAS_VALUE 0x01 +#define SPY_STATUS2_VALUE_IS_BOOLEAN 0x02 +#define SPY_STATUS2_HIGH_VOLTAGE 0x04 +#define SPY_STATUS2_LONG_MESSAGE 0x08 +#define SPY_STATUS2_GLOBAL_CHANGE 0x010000 +#define SPY_STATUS2_ERROR_FRAME 0x020000 +#define SPY_STATUS2_END_OF_LONG_MESSAGE 0x100000 + +// SPYSTATUS2 - CAN protocol bits +// |----.----|-xxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_CAN_ISO15765_LOGICAL_FRAME 0x200000 +#define SPY_STATUS2_CAN_HAVE_LINK_DATA 0x400000 + +// SPYSTATUS2 - ETHERNET protocol bits +// |xxxx.xxxx|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_ETHERNET_CRC_ERROR 0x200000 +#define SPY_STATUS2_ETHERNET_FRAME_TOO_SHORT 0x400000 +#define SPY_STATUS2_ETHERNET_FCS_AVAILABLE 0x800000 // This frame contains FCS (4 bytes) obtained from ICS Ethernet hardware (ex. RAD-STAR) +#define SPY_STATUS2_ETHERNET_NO_PADDING 0x01000000 +#define SPY_STATUS2_ETHERNET_PREEMPTION_ENABLED 0x02000000 +#define SPY_STATUS2_ETHERNET_UPDATE_CHECKSUMS 0x04000000 +#define SPY_STATUS2_ETHERNET_MANUALFCS_ENABLED 0x08000000 +#define SPY_STATUS2_ETHERNET_FCS_VERIFIED 0x10000000 +#define SPY_STATUS2_ETHERNET_T1S_SYMBOL 0x20000000 +#define SPY_STATUS2_ETHERNET_T1S_BURST 0x40000000 +#define SPY_STATUS2_ETHERNET_T1S_ETHERNET 0x80000000 + +// SPYSTATUS2 - FLEXRAY protocol bits +// |----.-xxx|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_FLEXRAY_TX_AB 0x200000 +#define SPY_STATUS2_FLEXRAY_TX_AB_NO_A 0x400000 +#define SPY_STATUS2_FLEXRAY_TX_AB_NO_B 0x800000 +#define SPY_STATUS2_FLEXRAY_TX_AB_NO_MATCH 0x01000000 +#define SPY_STATUS2_FLEXRAY_NO_CRC 0x02000000 +#define SPY_STATUS2_FLEXRAY_NO_HEADERCRC 0x04000000 // + +// SPYSTATUS2 - I2C protocol bits +// |----.----|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_I2C_ERR_TIMEOUT 0x200000 +#define SPY_STATUS2_I2C_ERR_NACK 0x400000 +#define SPY_STATUS2_I2C_DIR_READ 0x800000 + +// SPYSTATUS2 - ISO protocol bits +// |-xxx.x---|---o.--oo|----.----|----.oooo| +#define SPY_STATUS2_ISO_FRAME_ERROR 0x08000000 // ISO frame error +#define SPY_STATUS2_ISO_OVERFLOW_ERROR 0x10000000 // ISO overflow error +#define SPY_STATUS2_ISO_PARITY_ERROR 0x20000000 // ISO parity error +#define SPY_STATUS2_ISO_RX_TIMEOUT_ERROR 0x40000000 // ISO specific timeout error + +// SPYSTATUS2 - LIN protocol bits +// |xxxx.xxxx|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_LIN_ERR_RX_BREAK_NOT_0 0x200000 // LIN RX break not 0 error +#define SPY_STATUS2_LIN_ERR_RX_BREAK_TOO_SHORT 0x400000 // LIN RX break too short error +#define SPY_STATUS2_LIN_ERR_RX_SYNC_NOT_55 0x800000 // LIN RX sync not 0x55 error +#define SPY_STATUS2_LIN_ERR_RX_DATA_GREATER_8 0x01000000 // LIN RX data greater than 8 bytes error +#define SPY_STATUS2_LIN_ERR_TX_RX_MISMATCH 0x02000000 // LIN TX/RX mismatch error +#define SPY_STATUS2_LIN_ERR_MSG_ID_PARITY 0x04000000 // LIN message ID parity error +#define SPY_STATUS2_LIN_SYNC_FRAME_ERROR 0x08000000 // LIN sync frame error +#define SPY_STATUS2_LIN_ID_FRAME_ERROR 0x10000000 // LIN ID frame error +#define SPY_STATUS2_LIN_SLAVE_BYTE_ERROR 0x20000000 // LIN slave byte error +#define SPY_STATUS2_LIN_RX_TIMEOUT_ERROR 0x40000000 // RX timeout error +#define SPY_STATUS2_LIN_NO_SLAVE_DATA 0x80000000 // LIN no slave data + +// SPYSTATUS2 - MDIO protocol bits +// |-xxx.xxxx|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_MDIO_ERR_TIMEOUT 0x200000 +#define SPY_STATUS2_MDIO_JOB_CANCELLED 0x400000 +#define SPY_STATUS2_MDIO_INVALID_BUS 0x800000 +#define SPY_STATUS2_MDIO_INVALID_PHYADDR 0x01000000 +#define SPY_STATUS2_MDIO_INVALID_REGADDR 0x02000000 +#define SPY_STATUS2_MDIO_UNSUPPORTED_CLAUSE 0x04000000 +#define SPY_STATUS2_MDIO_UNSUPPORTED_OPCODE 0x08000000 +#define SPY_STATUS2_MDIO_OVERFLOW 0x10000000 +#define SPY_STATUS2_MDIO_CLAUSE45 0x20000000 +#define SPY_STATUS2_MDIO_READ 0x40000000 + +// SPYSTATUS2 - MOST protocol bits +// |xxxx.xxxx|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_MOST_PACKET_DATA 0x200000 +#define SPY_STATUS2_MOST_STATUS 0x400000 // reflects changes in light/lock/MPR/SBC/etc... +#define SPY_STATUS2_MOST_LOW_LEVEL 0x800000 // MOST low level message, allocs, deallocs, remote requests...*/ +#define SPY_STATUS2_MOST_CONTROL_DATA 0x01000000 +#define SPY_STATUS2_MOST_MHP_USER_DATA 0x02000000 // MOST HIGH User Data Frame +#define SPY_STATUS2_MOST_MHP_CONTROL_DATA 0x04000000 // MOST HIGH Control Data +#define SPY_STATUS2_MOST_I2S_DUMP 0x08000000 +#define SPY_STATUS2_MOST_TOO_SHORT 0x10000000 +#define SPY_STATUS2_MOST_MOST50 0x20000000 // absence of MOST50 and MOST150 implies it's MOST25 +#define SPY_STATUS2_MOST_MOST150 0x40000000 +#define SPY_STATUS2_MOST_CHANGED_PAR 0x80000000 // first byte in ack reflects what changed. + +// SPYSTATUS2 - WBMS protocol bits +// |----.----|--xo.--oo|----.----|----.oooo| +#define SPY_STATUS2_WBMS_API_IS_CALLBACK 0x200000 + +// SPYSTATUS3 bit definitions +// SPYSTATUS3 - CAN protocol bits +// |----.----|-xxx.xxxx|-xxx.xxxx|----.-xxx| +#define SPY_STATUS3_CAN_ERR_PASSIVE 0x01 // CAN error passive state: typically when error counter is > 127 +#define SPY_STATUS3_CAN_BUS_OFF 0x02 // CAN bus off state +#define SPY_STATUS3_CAN_ERR_WARNING 0x04 // CAN error warning: typically when error counter is > 96 +#define SPY_STATUS3_CAN_DATAERR_STUFF_ERROR 0x0100 // CAN stuff error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_FORM_ERROR 0x0200 // CAN form error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_ACK_ERROR 0x0400 // CAN ack error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_BIT1_ERROR 0x0800 // CAN bit1 error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_BIT0_ERROR 0x1000 // CAN bit0 error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_CRC_ERROR 0x2000 // CAN CRC error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_NOCHANGE 0x4000 // CAN data error occurred before and no change yet +#define SPY_STATUS3_CAN_GENERR_STUFF_ERROR 0x010000 // CAN stuff error at the general frame level +#define SPY_STATUS3_CAN_GENERR_FORM_ERROR 0x020000 // CAN form error at the general frame level +#define SPY_STATUS3_CAN_GENERR_ACK_ERROR 0x040000 // CAN ack error at the general frame level +#define SPY_STATUS3_CAN_GENERR_BIT1_ERROR 0x080000 // CAN bit1 error at the general frame level +#define SPY_STATUS3_CAN_GENERR_BIT0_ERROR 0x100000 // CAN bit0 error at the general frame level +#define SPY_STATUS3_CAN_GENERR_CRC_ERROR 0x200000 // CAN CRC error at the general frame level +#define SPY_STATUS3_CAN_GENERR_NOCHANGE 0x400000 // CAN frame Error occurred before and no change yet + +// SPYSTATUS3 - CANFD protocol bits +// |----.----|----.----|----.----|---x.xxxx| +#define SPY_STATUS3_CANFD_ESI 0x01 // CAN FD Error State Indicator (ESI) reflects the error state of the transmitting node +#define SPY_STATUS3_CANFD_IDE 0x02 // CAN FD Identifier Extension (IDE) indicates if standard or extended IDs are in use +#define SPY_STATUS3_CANFD_RTR 0x04 +#define SPY_STATUS3_CANFD_FDF 0x08 // CAN FD Format (FDF) flag -- distinguishes classic CAN from CANFD +#define SPY_STATUS3_CANFD_BRS 0x10 // CANFD Baud Rate Select (BRS) flag, indicates if the data portion transmits at a higher bitrate + +// SPYSTATUS3 - ETHERNET protocol bits +// |----.----|----.----|----.----|----.--xx| +#define SPY_STATUS3_ETHERNET_TX_COLLISION 0x01 +#define SPY_STATUS3_ETHERNET_T1S_WAKE 0x02 + +// SPYSTATUS3 - LIN protocol bits +// |----.----|----.----|----.----|----.-xxx| +#define SPY_STATUS3_LIN_JUST_BREAK_SYNC 0x01 +#define SPY_STATUS3_LIN_SLAVE_DATA_TOO_SHORT 0x02 +#define SPY_STATUS3_LIN_ONLY_UPDATE_SLAVE_TABLE_ONCE 0x04 + +// SPYSTATUS4 bit definitions +// SPYSTATUS4 - ETHERNET protocol bits +// |----.----|----.----|----.----|----.--xx| +#define SPY_STATUS4_ETH_CRC_ERROR 0x01 // Ethernet CRC error +#define SPY_STATUS4_ETH_FRAME_TOO_LONG 0x02 // Ethernet frame too long + +#endif // CICSSPYSTATUSBITS_H_ diff --git a/doc/requirements.txt b/doc/requirements.txt index f9d963c08..a10b57ea8 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1 +1,5 @@ -cython>=0.20 \ No newline at end of file +cython>=0.20 +m2r2 +docutils>=0.18.1,<0.21 +furo +dunamai \ No newline at end of file diff --git a/doc/source/conf.py b/doc/source/conf.py index 67ed448f5..ab7560ff6 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -19,56 +19,79 @@ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) -sys.path.insert(0, os.path.abspath('.')) +# sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath(".")) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' +# needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.autosummary', - 'sphinx.ext.autodoc', + "sphinx.ext.autosummary", + "sphinx.ext.autodoc", + "m2r2", ] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ["_templates"] # The suffix of source filenames. -source_suffix = '.rst' +source_suffix = [".rst", ".md"] # The encoding of source files. -#source_encoding = 'utf-8-sig' +# source_encoding = 'utf-8-sig' # The master toctree document. -master_doc = 'index' +master_doc = "index" # General information about the project. -project = 'ics' -copyright = '2022, Intrepid Control Systems, Inc.' +project = "ics" +copyright = "Intrepid Control Systems, Inc." # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # -# The short X.Y version. -version = '909.8' -# The full version, including alpha/beta/rc tags. -release = version +# Get version dynamically from the same source as pyproject.toml +try: + # First, try the installed package (e.g. ReadTheDocs, pip install .) + import ics + version = ics.__version__ + release = ics.__full_version__ +except (ImportError, AttributeError): + try: + # Fallback for local dev: import from generated source tree + gen_path = os.path.abspath("../../gen") + sys.path.insert(0, gen_path) + try: + import ics + version = ics.__version__ + release = ics.__full_version__ + finally: + sys.path.remove(gen_path) + except (ImportError, AttributeError): + try: + # Last resort: dunamai from git tags + import dunamai + version = dunamai.Version.from_git().serialize(metadata=False) + release = dunamai.Version.from_git().serialize(format="v{base}-{commit}-{timestamp}") + except Exception: + version = "unknown" + release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -#language = None +# language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: -#today = '' +# today = '' # Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' +# today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -76,27 +99,27 @@ # The reST default role (used for this markup: `text`) to use for all # documents. -#default_role = None +# default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True +# add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). -#add_module_names = True +# add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. -#show_authors = False +# show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = "sphinx" # A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] +# modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False +# keep_warnings = False # -- Options for HTML output ---------------------------------------------- @@ -104,140 +127,135 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. #html_theme = 'sphinx_rtd_theme' -html_theme = 'classic' +#html_theme = "classic" +html_theme = "furo" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -html_theme_options = {'body_max_width': '80%'} +#html_theme_options = {"body_max_width": "80%"} # Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] +# html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +# html_title = None # A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None +# html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. -#html_logo = None +# html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. -#html_favicon = None +# html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -#html_static_path = ['_static'] +# html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. -#html_extra_path = [] +# html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' +# html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. -#html_use_smartypants = True +# html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -#html_sidebars = {} +# html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. -#html_additional_pages = {} +# html_additional_pages = {} # If false, no module index is generated. -#html_domain_indices = True +# html_domain_indices = True # If false, no index is generated. -#html_use_index = True +# html_use_index = True # If true, the index is split into individual pages for each letter. -#html_split_index = False +# html_split_index = False # If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True +# html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True +# html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True +# html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. -#html_use_opensearch = '' +# html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None +# html_file_suffix = None # Output file base name for HTML help builder. -htmlhelp_basename = 'icsdoc' +htmlhelp_basename = "icsdoc" # -- Options for LaTeX output --------------------------------------------- latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', + # The paper size ('letterpaper' or 'a4paper'). + #'papersize': 'letterpaper', + # The font size ('10pt', '11pt' or '12pt'). + #'pointsize': '10pt', + # Additional stuff for the LaTeX preamble. + #'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - ('index', 'ics.tex', 'python\\_ics Documentation', - 'David Rebbe', 'manual'), + ("index", "ics.tex", "python\\_ics Documentation", "David Rebbe", "manual"), ] # The name of an image file (relative to this directory) to place at the top of # the title page. -#latex_logo = None +# latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. -#latex_use_parts = False +# latex_use_parts = False # If true, show page references after internal links. -#latex_show_pagerefs = False +# latex_show_pagerefs = False # If true, show URL addresses after external links. -#latex_show_urls = False +# latex_show_urls = False # Documents to append as an appendix to all manuals. -#latex_appendices = [] +# latex_appendices = [] # If false, no module index is generated. -#latex_domain_indices = True +# latex_domain_indices = True # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [ - ('index', 'ics', 'ics Documentation', - ['David Rebbe'], 1) -] +man_pages = [("index", "ics", "ics Documentation", ["David Rebbe"], 1)] # If true, show URL addresses after external links. -#man_show_urls = False +# man_show_urls = False # -- Options for Texinfo output ------------------------------------------- @@ -246,21 +264,19 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'ics', 'ics Documentation', - 'David Rebbe', 'ics', 'One line description of project.', - 'Miscellaneous'), + ("index", "ics", "ics Documentation", "David Rebbe", "ics", "One line description of project.", "Miscellaneous"), ] # Documents to append as an appendix to all manuals. -#texinfo_appendices = [] +# texinfo_appendices = [] # If false, no module index is generated. -#texinfo_domain_indices = True +# texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' +# texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. -#texinfo_no_detailmenu = False +# texinfo_no_detailmenu = False -autodoc_member_order = 'groupwise' +autodoc_member_order = "groupwise" diff --git a/doc/source/examples.rst b/doc/source/examples.rst index 41289592e..fc37068af 100644 --- a/doc/source/examples.rst +++ b/doc/source/examples.rst @@ -1,18 +1,18 @@ -============================================================ +############################################################################## Examples -============================================================ +############################################################################## Examples can be found at https://github.com/intrepidcs/python_ics/tree/master/examples For extra information on data structures and underlying functionality, please visit neoVI DLL Documentation under https://intrepidcs.com/support/support-resources/ Opening a device -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +============================================================================== The ``open_device_example.py`` example shows how to successfully open and close an Intrepid device. Transmitting and Receiving a CAN message -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +============================================================================== The following examples show how to interact with CAN messages on an Intrepid device. @@ -22,7 +22,7 @@ The following examples show how to interact with CAN messages on an Intrepid dev ISO 15765-2 Example -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +============================================================================== The ``iso15765_example.py`` example shows how to setup basic ISO 15765-2 receive filters and transmitting an ISO 15765-2 message. @@ -34,6 +34,6 @@ Similarly transmitting an ISO 15765-2 frame can be accomplished by passing a cus Missing an example? -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +============================================================================== Need an example on something that isn't covered here? Please submit an issue on github or feel free to send over a Pull Request of your own. \ No newline at end of file diff --git a/doc/source/generate_documentation.py b/doc/source/generate_documentation.py index 70f24338c..62dc20e51 100644 --- a/doc/source/generate_documentation.py +++ b/doc/source/generate_documentation.py @@ -1,76 +1,90 @@ import inspect import ics + def generate_structures(): - #data = '.. autosummary::\n' + # data = '.. autosummary::\n' """ \t.. automodule:: ics.structures.{name}.{name}\n\t\t:members:\n\t\t:undoc-members:\n\n" """ - data = '' + data = "" for name, value in inspect.getmembers(ics.structures, inspect.ismodule): - #data += f"\t.. automodule:: ics.structures.{name}\n\t\t:members:\n\t\t:show-inheritance:\n\t\t:undoc-members:\n\n" + # data += f"\t.. automodule:: ics.structures.{name}\n\t\t:members:\n\t\t:show-inheritance:\n\t\t:undoc-members:\n\n" data += f"\t.. autoclass:: ics.structures.{name}.{name}\n\t\t:members:\n\t\t:undoc-members:\n\n" return data + def generate_functions(): - data = '' + data = "" functions = inspect.getmembers(ics, inspect.isroutine) new_style_functions = [] icsneo_style_functions = [] inbetween_style_functions = [] for function_name, function_type in functions: - if function_name.startswith('icsneo'): + if function_name.startswith("icsneo"): icsneo_style_functions.append(function_name) - elif '_' in function_name: + elif "_" in function_name: new_style_functions.append(function_name) else: inbetween_style_functions.append(function_name) - data += '.. autosummary::\n' + data += ".. autosummary::\n" for name in new_style_functions + inbetween_style_functions + icsneo_style_functions: if name: data += f"\tics.{name}\n" return data + def generate_variables(): - data = '' + data = "" for variable in [item for item in dir(ics) if not item.startswith("__") and item.isupper()]: data += f"\t.. py:data:: {str(variable)}\n\t\t:annotation: = {str(getattr(ics, variable))}\n\n" return data + def generate_documentation(): return inspect.cleandoc( - """.. include:: header.rst + f""".. include:: header.rst .. include:: examples.rst - ============================================================ + ############################################################################## + PyNeoDeviceEx + ############################################################################## + .. autoclass:: ics.PyNeoDeviceEx + :members: + :show-inheritance: + :undoc-members: + + ############################################################################## Module Documentation - ============================================================ + ############################################################################## .. automodule:: ics.ics :members: :show-inheritance: :undoc-members: - ============================================================ + ############################################################################## Module Functions - ============================================================ + ############################################################################## - %s + {generate_functions()} - ============================================================ + ############################################################################## Module Structures - ============================================================ + ############################################################################## - %s + {generate_structures()} - ============================================================ + ############################################################################## Module Variables - ============================================================ + ############################################################################## - %s + {generate_variables()} + + """ + ) - """ % (generate_functions(), generate_structures(), generate_variables())) -with open('index.rst', 'w+') as f: +with open("index.rst", "w+") as f: f.write(generate_documentation()) -print("Done.") \ No newline at end of file +print("Done.") diff --git a/doc/source/header.rst b/doc/source/header.rst index f6b296aba..90bc99c18 100644 --- a/doc/source/header.rst +++ b/doc/source/header.rst @@ -1,72 +1,14 @@ -============================================================ -python_ics -============================================================ +############################################################################## +README +############################################################################## +.. mdinclude:: ../../README.md -Intrepid Control Systems, Inc. open source Python module for interfacing to Intrepid hardware. Basic knowledge of using and installing Python modules is assumed. Please see https://docs.python.org/3/installing/index.html for documentation on how to install Python modules. - -This module is essentially just a wrapper around icsneo40.dll. For more documentation please visit neoVI DLL Documentation under https://intrepidcs.com/support/support-resources/ - -============================================================ -Whats New? -============================================================ - -v903+ is a new release that implements features that break existing API in some areas. - - -ISO 15765-2 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -old naming conventions have been updated to reflex closer to the actual codebase. - -.. code-block:: python - - # Old: - tx_msg = ics.CmISO157652TxMessage() - rx_msg = ics.CmISO157652RxMessage() - - # New: - tx_msg = ics.st_cm_iso157652_tx_message.st_cm_iso157652_tx_message() - rx_msg = ics.st_cm_iso157652_rx_message.st_cm_iso157652_rx_message() - -``ics.st_cm_iso157652_tx_message.st_cm_iso157652_tx_message()`` data structure is now a ctypes.c_ubytes array instead of a python list. - -.. code-block:: python - - # Old: - msg.data = [x for x in range(number_of_bytes)] - - # New: - my_data = [x for x in range(number_of_bytes)] - msg.data = (ctypes.c_ubyte*len(msg.data))(*my_data) - - >>> msg.data - - -Settings -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -v903 and up have converted over to a new auto generation of ``icsnVC40.h``. This enables faster support for newer Intrepid devices and less error prone. With this switch we have moved to using ``ics.s_device_settings``. - -.. code-block:: python - - # Old behavior: - device = ics.open_device() - settings = ics.get_device_settings(device) - # settings is a Vcan3Settings type - settings.can1.Baudrate = 1 - ics.set_device_settings(device, settings) - - # New behavior - device = ics.open_device() - settings = ics.get_device_settings(device) - # settings is a s_device_settings type - settings.vcan3.can1.Baudrate = 1 - ics.set_device_settings(device, settings) +############################################################################## PyInstaller -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +############################################################################## -Due to the added complexity underneath when building PyInstaller ``hidden_imports.py`` should be used now in your spec script: +Due to the added complexity underneath when building, PyInstaller ``hidden_imports.py`` should be used now in your spec script: .. code-block:: python @@ -110,108 +52,99 @@ Due to the added complexity underneath when building PyInstaller ``hidden_import upx_exclude=[], name='test') -============================================================ -Versioning Information -============================================================ +############################################################################## +Breaking Changes v915 +############################################################################## -Minor differences can occur between different icsnVC40.h versions. These differences are usually just structures and constant differences. Below is a list of how the python_ics version correlates to the icsnVC40.h version: +The icsneo40 library has migrated to the NeoDeviceEx structure and python_ics has finally been updated to reflect these changes. A new class `ics.PyNeoDeviceEx` now inherits `ics.structures.neo_device_ex.neo_device_ex` and allows a more pythonic way of coding. -v903 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Starting with 903, python_ics module will now match official upstream version releases. +Previous: -``pip install 'python_ics>=5.0,<904.0' --force-reinstall`` - - **Note:** Refer to platform specific installation if not on Windows - -Older Versions: -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- v802 - ``pip install 'python_ics>=2.0,<3.0' --force-reinstall`` - - **Note:** Refer to platform specific installation if not on Windows - -- v803 - ``pip install 'python_ics>=3.0,<4.0' --force-reinstall`` - - **Note:** Refer to platform specific installation if not on Windows - -- v900 - ``pip install 'python_ics>=4.0,<5.0' --force-reinstall`` - - **Note:** Refer to platform specific installation if not on Windows - - -============================================================ -Installation on Windows -============================================================ - -PyPi provides binary packages for Windows. You can simply install the python_ics module by running the following command: +.. code-block:: python -``pip install python_ics`` + import ics + # Open the first device + device = ics.open_device() + # Load default settings + ics.load_default_settings(device) + # Close the device + ics.close_device(device) + # When device goes out of scope, its automatically cleaned up here by garbage collection if not closed - **Note:** pip.exe is usually located under the Scripts directory under the Python - installation directory. +New: - -Building from source -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +.. code-block:: python -Building from source on windows is not usually need so it won't really be covered here in detail. As a starting point you'll need to match the compiler version used to build the official Python binaries (MSVC). If the build environment is setup correctly, you should be able to run ``python setup.py build`` like usual. + import ics + # Open the first device + device = ics.open_device() + # Load default settings + device.load_default_settings() + # Close the device + device.close() + # When device goes out of scope, its automatically cleaned up here by garbage collection if not closed -Intrepid icsneo40 Library -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -python_ics module looks for ``icsneo40.dll`` in the normal windows DLL search paths. The module will throw an exception if its not found. +`ics.PyNeoDeviceEx` includes accessors to provide backwards compatibility with the old NeoDevice class so all existing code should still be functional. +############################################################################## +Breaking Changes v903 +############################################################################## -============================================================ -Installation on Linux -============================================================ -python_ics does not provide binaries for linux distributions so we will have to compile from source. This can be easily achieved by utilzing Python's PIP. First we need to make sure we have some base packages installed. +ISO 15765-2 +============================================================================== -libicsneo is a newer library and has wider support for Intrepid Products under linux (https://github.com/intrepidcs/libicsneo). -libicsneo has a legacy library (``libicsneolegacy.so``) that can be loaded by utilizing ``ics.override_library_name("libicsneolegacy.so")``. +old naming conventions have been updated to reflex closer to the actual codebase. +.. code-block:: python -Fedora Dependencies (FC28) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + # Old: + tx_msg = ics.CmISO157652TxMessage() + rx_msg = ics.CmISO157652RxMessage() -``sudo dnf install redhat-rpm-config gcc g++ python3-devel clang clang-tools-extra`` + # New: + tx_msg = ics.st_cm_iso157652_tx_message.st_cm_iso157652_tx_message() + rx_msg = ics.st_cm_iso157652_rx_message.st_cm_iso157652_rx_message() -Debian/Ubuntu Dependencies -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +``ics.st_cm_iso157652_tx_message.st_cm_iso157652_tx_message()`` data structure is now a ctypes.c_ubytes array instead of a python list. -``sudo apt install build-essential python-dev clang-format`` +.. code-block:: python -Others (Required dependencies) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- GCC -- G++ -- Python Development packages (We Need to link to Python.h) -- Clang (llvm) -- clang-format + # Old: + msg.data = [x for x in range(number_of_bytes)] + # New: + my_data = [x for x in range(number_of_bytes)] + msg.data = (ctypes.c_ubyte*len(msg.data))(*my_data) -Installation -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + >>> msg.data + -After dependencies are installed we can run the following pip command: +Settings +============================================================================== -``pip install python_ics`` +v903 and up have converted over to a new auto generation of ``icsnVC40.h``. This enables faster support for newer Intrepid devices and less error prone. With this switch we have moved to using ``ics.s_device_settings``. - **Note:** A lot of distributions have Python 2 and 3 installed side by side. As of this writing without a version suffix the commands still default to version 2 of the Python binaries. In order to utilize the Python 3 binaries you must append a 3 after the binary names (python3 and pip3 instead of just python and pip). +.. code-block:: python -Intrepid libicsneoapi.so Library -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Please see https://github.com/intrepidcs/icsneoapi for more details. + # Old behavior: + device = ics.open_device() + settings = ics.get_device_settings(device) + # settings is a Vcan3Settings type + settings.can1.Baudrate = 1 + ics.set_device_settings(device, settings) + # New behavior + device = ics.open_device() + settings = ics.get_device_settings(device) + # settings is a s_device_settings type + settings.vcan3.can1.Baudrate = 1 + ics.set_device_settings(device, settings) -============================================================ +############################################################################## Getting Started -============================================================ +############################################################################## Please see https://github.com/intrepidcs/python_ics/tree/master/examples for simple examples on how to use this module. Most function documentation has a simple example on how its intended to be used. Every function was designed to be as close as possible to it's C counterpart unless it was deemed to make the function more pythonic in nature. For those experienced with the C API ``ics.open_device`` (``icsneoOpenNeoDevice()``) behavior has been changed the most (no parameters makes it auto utilize ``ics.find_devices`` (``icsneoFindNeoDevices()``) and open the first device). Also since python is a object oriented language the module utilizes this and auto cleans up device handles when going out of scope so there is usually no need to call ``ics.close_device()``. - diff --git a/doc/source/index.rst b/doc/source/index.rst index b18b477cc..846bfdd66 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1,17 +1,25 @@ .. include:: header.rst .. include:: examples.rst -============================================================ +############################################################################## +PyNeoDeviceEx +############################################################################## +.. autoclass:: ics.PyNeoDeviceEx + :members: + :show-inheritance: + :undoc-members: + +############################################################################## Module Documentation -============================================================ +############################################################################## .. automodule:: ics.ics :members: :show-inheritance: :undoc-members: -============================================================ +############################################################################## Module Functions -============================================================ +############################################################################## .. autosummary:: ics.ISO15765_DisableNetworks @@ -41,11 +49,19 @@ Module Functions ics.enable_network_com ics.find_devices ics.firmware_update_required + ics.flash_accessory_firmware ics.force_firmware_update + ics.generic_api_get_status + ics.generic_api_read_data + ics.generic_api_send_command + ics.get_accessory_firmware_version ics.get_active_vnet_channel + ics.get_all_chip_versions ics.get_backup_power_enabled ics.get_backup_power_ready ics.get_bus_voltage + ics.get_component_versions + ics.get_device_name ics.get_device_settings ics.get_device_status ics.get_disk_details @@ -53,15 +69,20 @@ Module Functions ics.get_dll_firmware_info ics.get_dll_version ics.get_error_messages + ics.get_firmware_variant + ics.get_gptp_status ics.get_hw_firmware_info + ics.get_imei ics.get_last_api_error ics.get_library_path ics.get_messages + ics.get_pcb_serial_number ics.get_performance_parameters ics.get_rtc ics.get_script_status ics.get_serial_number ics.get_timestamp_for_msg + ics.is_device_feature_supported ics.iso15765_disable_networks ics.iso15765_enable_networks ics.iso15765_receive_message @@ -72,6 +93,7 @@ Module Functions ics.read_jupiter_firmware ics.read_sdcard ics.request_enter_sleep_mode + ics.request_set_neovi_miscio ics.set_active_vnet_channel ics.set_backup_power_enabled ics.set_bit_rate @@ -79,10 +101,20 @@ Module Functions ics.set_context ics.set_device_settings ics.set_fd_bit_rate + ics.set_led_property ics.set_reflash_callback ics.set_rtc + ics.set_safe_boot_mode + ics.start_dhcp_server + ics.stop_dhcp_server ics.transmit_messages + ics.uart_get_baudrate + ics.uart_read + ics.uart_set_baudrate + ics.uart_write ics.validate_hobject + ics.wbms_manager_reset + ics.wbms_manager_write_lock ics.write_jupiter_firmware ics.write_sdcard ics.ClosePort @@ -91,23 +123,36 @@ Module Functions ics.EnableNetworkCom ics.FindNeoDevices ics.FirmwareUpdateRequired + ics.FlashAccessoryFirmware ics.ForceFirmwareUpdate + ics.GenericAPIGetStatus + ics.GenericAPIReadData + ics.GenericAPISendCommand + ics.GetAccessoryFwVersion ics.GetActiveVNETChannel + ics.GetAllChipVersions ics.GetBackupPowerEnabled ics.GetBackupPowerReady ics.GetBusVoltage + ics.GetComponentVersions ics.GetDLLFirmwareInfo ics.GetDLLVersion + ics.GetDeviceName ics.GetDeviceSettings ics.GetDeviceStatus ics.GetErrorMessages + ics.GetFirmwareVariant + ics.GetGPTPStatus ics.GetHWFirmwareInfo + ics.GetIMEI ics.GetLastAPIError ics.GetMessages + ics.GetPCBSerialNumber ics.GetPerformanceParameters ics.GetRTC ics.GetSerialNumber ics.GetTimeStampForMsg + ics.IsDeviceFeatureSupported ics.LoadDefaultSettings ics.OpenNeoDevice ics.ReadJupiterFirmware @@ -117,6 +162,7 @@ Module Functions ics.RequestDiskFormatCancel ics.RequestDiskFormatProgress ics.RequestEnterSleepMode + ics.RequestSetNeoVIMiscIO ics.ScriptClear ics.ScriptGetFBlockStatus ics.ScriptGetScriptStatus @@ -139,32 +185,54 @@ Module Functions ics.SetContext ics.SetDeviceSettings ics.SetFDBitRate + ics.SetLedProperty ics.SetRTC ics.SetReflashDisplayCallback + ics.SetSafeBootMode + ics.StartDHCPServer + ics.StopDHCPServer ics.TxMessages + ics.UartGetBaudrate + ics.UartRead + ics.UartSetBaudrate + ics.UartWrite ics.ValidateHObject ics.WriteJupiterFirmware ics.WriteSDCard ics.base36enc + ics.wBMSManagerReset + ics.wBMSManagerWriteLock ics.icsneoClosePort ics.icsneoEnableBusVoltageMonitor ics.icsneoEnableDOIPLine ics.icsneoEnableNetworkCom ics.icsneoFindNeoDevices ics.icsneoFirmwareUpdateRequired + ics.icsneoFlashAccessoryFirmware ics.icsneoForceFirmwareUpdate + ics.icsneoGenericAPIGetStatus + ics.icsneoGenericAPIReadData + ics.icsneoGenericAPISendCommand + ics.icsneoGetAccessoryFwVersion ics.icsneoGetActiveVNETChannel + ics.icsneoGetAllChipVersions ics.icsneoGetBackupPowerEnabled ics.icsneoGetBackupPowerReady ics.icsneoGetBusVoltage + ics.icsneoGetComponentVersions ics.icsneoGetDLLFirmwareInfo ics.icsneoGetDLLVersion + ics.icsneoGetDeviceName ics.icsneoGetDeviceSettings ics.icsneoGetDeviceStatus ics.icsneoGetErrorMessages + ics.icsneoGetFirmwareVariant + ics.icsneoGetGPTPStatus ics.icsneoGetHWFirmwareInfo + ics.icsneoGetIMEI ics.icsneoGetLastAPIError ics.icsneoGetMessages + ics.icsneoGetPCBSerialNumber ics.icsneoGetPerformanceParameters ics.icsneoGetRTC ics.icsneoGetSerialNumber @@ -173,6 +241,7 @@ Module Functions ics.icsneoISO15765_EnableNetworks ics.icsneoISO15765_ReceiveMessage ics.icsneoISO15765_TransmitMessage + ics.icsneoIsDeviceFeatureSupported ics.icsneoLoadDefaultSettings ics.icsneoOpenNeoDevice ics.icsneoReadJupiterFirmware @@ -182,6 +251,7 @@ Module Functions ics.icsneoRequestDiskFormatCancel ics.icsneoRequestDiskFormatProgress ics.icsneoRequestEnterSleepMode + ics.icsneoRequestSetNeoVIMiscIO ics.icsneoScriptClear ics.icsneoScriptGetFBlockStatus ics.icsneoScriptGetScriptStatus @@ -204,17 +274,27 @@ Module Functions ics.icsneoSetContext ics.icsneoSetDeviceSettings ics.icsneoSetFDBitRate + ics.icsneoSetLedProperty ics.icsneoSetRTC ics.icsneoSetReflashDisplayCallbacks + ics.icsneoSetSafeBootMode + ics.icsneoStartDHCPServer + ics.icsneoStopDHCPServer ics.icsneoTxMessages + ics.icsneoUartGetBaudrate + ics.icsneoUartRead + ics.icsneoUartSetBaudrate + ics.icsneoUartWrite ics.icsneoValidateHObject ics.icsneoWriteJupiterFirmware ics.icsneoWriteSDCard + ics.icsneowBMSManagerReset + ics.icsneowBMSManagerWriteLock -============================================================ +############################################################################## Module Structures -============================================================ +############################################################################## .. autoclass:: ics.structures.a2_b_monitor_settings.a2_b_monitor_settings :members: @@ -228,6 +308,10 @@ Module Structures :members: :undoc-members: + .. autoclass:: ics.structures.accessory_error_type.accessory_error_type + :members: + :undoc-members: + .. autoclass:: ics.structures.can_settings.can_settings :members: :undoc-members: @@ -244,10 +328,30 @@ Module Structures :members: :undoc-members: + .. autoclass:: ics.structures.cmp_global_data.cmp_global_data + :members: + :undoc-members: + + .. autoclass:: ics.structures.cmp_network_data.cmp_network_data + :members: + :undoc-members: + + .. autoclass:: ics.structures.current_ds_.current_ds_ + :members: + :undoc-members: + + .. autoclass:: ics.structures.device_feature.device_feature + :members: + :undoc-members: + .. autoclass:: ics.structures.disk_settings.disk_settings :members: :undoc-members: + .. autoclass:: ics.structures.e_dev_name_type.e_dev_name_type + :members: + :undoc-members: + .. autoclass:: ics.structures.e_device_settings_type.e_device_settings_type :members: :undoc-members: @@ -260,10 +364,18 @@ Module Structures :members: :undoc-members: + .. autoclass:: ics.structures.e_generic_api_options.e_generic_api_options + :members: + :undoc-members: + .. autoclass:: ics.structures.e_gptp_port.e_gptp_port :members: :undoc-members: + .. autoclass:: ics.structures.e_gptp_profile.e_gptp_profile + :members: + :undoc-members: + .. autoclass:: ics.structures.e_gptp_role.e_gptp_role :members: :undoc-members: @@ -272,10 +384,34 @@ Module Structures :members: :undoc-members: + .. autoclass:: ics.structures.e_uart_port_t.e_uart_port_t + :members: + :undoc-members: + + .. autoclass:: ics.structures.epsilon10_gphyfw.epsilon10_gphyfw + :members: + :undoc-members: + + .. autoclass:: ics.structures.epsilon_10_g_phy_select.epsilon_10_g_phy_select + :members: + :undoc-members: + .. autoclass:: ics.structures.ethernet10_g_settings.ethernet10_g_settings :members: :undoc-members: + .. autoclass:: ics.structures.ethernet10_t1_l_settings.ethernet10_t1_l_settings + :members: + :undoc-members: + + .. autoclass:: ics.structures.ethernet10_t1_s_settings.ethernet10_t1_s_settings + :members: + :undoc-members: + + .. autoclass:: ics.structures.ethernet10_t1_s_settings_ext.ethernet10_t1_s_settings_ext + :members: + :undoc-members: + .. autoclass:: ics.structures.ethernet_network_status_t.ethernet_network_status_t :members: :undoc-members: @@ -288,6 +424,18 @@ Module Structures :members: :undoc-members: + .. autoclass:: ics.structures.ew_bms_instance_t.ew_bms_instance_t + :members: + :undoc-members: + + .. autoclass:: ics.structures.ew_bms_manager_lock_state_t.ew_bms_manager_lock_state_t + :members: + :undoc-members: + + .. autoclass:: ics.structures.ew_bms_manager_port_t.ew_bms_manager_port_t + :members: + :undoc-members: + .. autoclass:: ics.structures.extended_response_code.extended_response_code :members: :undoc-members: @@ -300,31 +448,47 @@ Module Structures :members: :undoc-members: + .. autoclass:: ics.structures.flash_accessory_firmware_params.flash_accessory_firmware_params + :members: + :undoc-members: + + .. autoclass:: ics.structures.flash_accessory_index.flash_accessory_index + :members: + :undoc-members: + .. autoclass:: ics.structures.flex_vnet_mode.flex_vnet_mode :members: :undoc-members: - .. autoclass:: ics.structures.get_component_versions.get_component_versions + .. autoclass:: ics.structures.generic_api_data.generic_api_data :members: :undoc-members: - .. autoclass:: ics.structures.get_component_versions_response.get_component_versions_response + .. autoclass:: ics.structures.generic_api_data_old.generic_api_data_old :members: :undoc-members: - .. autoclass:: ics.structures.get_supported_features_response.get_supported_features_response + .. autoclass:: ics.structures.generic_api_selector.generic_api_selector :members: :undoc-members: - .. autoclass:: ics.structures.global_settings.global_settings + .. autoclass:: ics.structures.generic_api_status.generic_api_status :members: :undoc-members: - .. autoclass:: ics.structures.gptp_status.gptp_status + .. autoclass:: ics.structures.generic_binary_status.generic_binary_status :members: :undoc-members: - .. autoclass:: ics.structures.hw_eth_settings.hw_eth_settings + .. autoclass:: ics.structures.gigastar2_fw_variants.gigastar2_fw_variants + :members: + :undoc-members: + + .. autoclass:: ics.structures.global_settings.global_settings + :members: + :undoc-members: + + .. autoclass:: ics.structures.gptp_status.gptp_status :members: :undoc-members: @@ -348,10 +512,6 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.ics_obd2_pro_device_status.ics_obd2_pro_device_status - :members: - :undoc-members: - .. autoclass:: ics.structures.ics_rad_bms_device_status.ics_rad_bms_device_status :members: :undoc-members: @@ -364,23 +524,23 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.ics_rad_moon_duo_device_status.ics_rad_moon_duo_device_status + .. autoclass:: ics.structures.ics_spy_message_flex_ray.ics_spy_message_flex_ray :members: :undoc-members: - .. autoclass:: ics.structures.ics_rad_pluto_device_status.ics_rad_pluto_device_status + .. autoclass:: ics.structures.ics_spy_message_long.ics_spy_message_long :members: :undoc-members: - .. autoclass:: ics.structures.ics_spy_message_flex_ray.ics_spy_message_flex_ray + .. autoclass:: ics.structures.ics_spy_message_mdio.ics_spy_message_mdio :members: :undoc-members: - .. autoclass:: ics.structures.ics_spy_message_long.ics_spy_message_long + .. autoclass:: ics.structures.ics_spy_message_vsb.ics_spy_message_vsb :members: :undoc-members: - .. autoclass:: ics.structures.ics_spy_message_vsb.ics_spy_message_vsb + .. autoclass:: ics.structures.ics_spy_messagew_bms.ics_spy_messagew_bms :members: :undoc-members: @@ -416,243 +576,247 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.ndis_adapter_information.ndis_adapter_information + .. autoclass:: ics.structures.mac_addr_entry.mac_addr_entry :members: :undoc-members: - .. autoclass:: ics.structures.op_eth_general_settings.op_eth_general_settings + .. autoclass:: ics.structures.mac_sec_flags_t.mac_sec_flags_t :members: :undoc-members: - .. autoclass:: ics.structures.op_eth_link_mode.op_eth_link_mode + .. autoclass:: ics.structures.mac_sec_global_flags_t.mac_sec_global_flags_t :members: :undoc-members: - .. autoclass:: ics.structures.op_eth_settings.op_eth_settings + .. autoclass:: ics.structures.mac_sec_map_t.mac_sec_map_t :members: :undoc-members: - .. autoclass:: ics.structures.port_identity.port_identity + .. autoclass:: ics.structures.mac_sec_rule_t.mac_sec_rule_t :members: :undoc-members: - .. autoclass:: ics.structures.priority_vector.priority_vector + .. autoclass:: ics.structures.mac_sec_sa_t.mac_sec_sa_t :members: :undoc-members: - .. autoclass:: ics.structures.rad_moon_duo_converter_settings.rad_moon_duo_converter_settings + .. autoclass:: ics.structures.mac_sec_sc_t.mac_sec_sc_t :members: :undoc-members: - .. autoclass:: ics.structures.rad_reporting_settings.rad_reporting_settings + .. autoclass:: ics.structures.mac_sec_sec_y_t.mac_sec_sec_y_t :members: :undoc-members: - .. autoclass:: ics.structures.s_cm_probe_settings.s_cm_probe_settings + .. autoclass:: ics.structures.macsec_cipher_suite.macsec_cipher_suite :members: :undoc-members: - .. autoclass:: ics.structures.s_cyan_settings.s_cyan_settings + .. autoclass:: ics.structures.macsec_config.macsec_config :members: :undoc-members: - .. autoclass:: ics.structures.s_device_settings.s_device_settings + .. autoclass:: ics.structures.macsec_mpls_outer_t.macsec_mpls_outer_t :members: :undoc-members: - .. autoclass:: ics.structures.s_disk_details.s_disk_details + .. autoclass:: ics.structures.macsec_packet_type.macsec_packet_type :members: :undoc-members: - .. autoclass:: ics.structures.s_disk_format_progress.s_disk_format_progress + .. autoclass:: ics.structures.macsec_settings.macsec_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_disk_status.s_disk_status + .. autoclass:: ics.structures.macsec_strip_sectag_icv.macsec_strip_sectag_icv :members: :undoc-members: - .. autoclass:: ics.structures.s_disk_structure.s_disk_structure + .. autoclass:: ics.structures.macsec_validateframe.macsec_validateframe :members: :undoc-members: - .. autoclass:: ics.structures.s_ether_badge_settings.s_ether_badge_settings + .. autoclass:: ics.structures.macsec_vlantag_t.macsec_vlantag_t :members: :undoc-members: - .. autoclass:: ics.structures.s_ext_sub_cmd_comm.s_ext_sub_cmd_comm + .. autoclass:: ics.structures.multi_mac_addr_info.multi_mac_addr_info :members: :undoc-members: - .. autoclass:: ics.structures.s_ext_sub_cmd_hdr.s_ext_sub_cmd_hdr + .. autoclass:: ics.structures.neo_device.neo_device :members: :undoc-members: - .. autoclass:: ics.structures.s_extended_data_flash_header.s_extended_data_flash_header + .. autoclass:: ics.structures.neo_device_ex.neo_device_ex :members: :undoc-members: - .. autoclass:: ics.structures.s_fire3_settings.s_fire3_settings + .. autoclass:: ics.structures.op_eth_general_settings.op_eth_general_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_fire_settings.s_fire_settings + .. autoclass:: ics.structures.op_eth_link_mode.op_eth_link_mode :members: :undoc-members: - .. autoclass:: ics.structures.s_fire_vnet_settings.s_fire_vnet_settings + .. autoclass:: ics.structures.op_eth_settings.op_eth_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_flex_vnetz_settings.s_flex_vnetz_settings + .. autoclass:: ics.structures.parent_ds_.parent_ds_ :members: :undoc-members: - .. autoclass:: ics.structures.s_jupiter_ptp_params_s.s_jupiter_ptp_params_s + .. autoclass:: ics.structures.phy_id.phy_id :members: :undoc-members: - .. autoclass:: ics.structures.s_neo_ecu12_settings.s_neo_ecu12_settings + .. autoclass:: ics.structures.port_identity.port_identity :members: :undoc-members: - .. autoclass:: ics.structures.s_neo_most_gateway_settings.s_neo_most_gateway_settings + .. autoclass:: ics.structures.priority_vector.priority_vector :members: :undoc-members: - .. autoclass:: ics.structures.s_pendant_settings.s_pendant_settings + .. autoclass:: ics.structures.rad_reporting_settings.rad_reporting_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_phy_reg_pkt.s_phy_reg_pkt + .. autoclass:: ics.structures.s_cyan_settings.s_cyan_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_phy_reg_pkt_clause22_mess.s_phy_reg_pkt_clause22_mess + .. autoclass:: ics.structures.s_device_settings.s_device_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_phy_reg_pkt_clause45_mess.s_phy_reg_pkt_clause45_mess + .. autoclass:: ics.structures.s_disk_details.s_disk_details :members: :undoc-members: - .. autoclass:: ics.structures.s_phy_reg_pkt_hdr.s_phy_reg_pkt_hdr + .. autoclass:: ics.structures.s_disk_format_progress.s_disk_format_progress :members: :undoc-members: - .. autoclass:: ics.structures.s_phy_reg_pkt_rw.s_phy_reg_pkt_rw + .. autoclass:: ics.structures.s_disk_status.s_disk_status :members: :undoc-members: - .. autoclass:: ics.structures.s_phy_reg_pkt_status.s_phy_reg_pkt_status + .. autoclass:: ics.structures.s_disk_structure.s_disk_structure :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_avb_params_s.s_pluto_avb_params_s + .. autoclass:: ics.structures.s_extended_data_flash_header.s_extended_data_flash_header :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_clock_sync_params_s.s_pluto_clock_sync_params_s + .. autoclass:: ics.structures.s_fire3_flexray_settings.s_fire3_flexray_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_custom_params_s.s_pluto_custom_params_s + .. autoclass:: ics.structures.s_fire3_settings.s_fire3_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_general_params_s.s_pluto_general_params_s + .. autoclass:: ics.structures.s_fire3_t1s_lin_settings.s_fire3_t1s_lin_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_l2_address_lookup_entry_s.s_pluto_l2_address_lookup_entry_s + .. autoclass:: ics.structures.s_fire_vnet_settings.s_fire_vnet_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_l2_address_lookup_params_s.s_pluto_l2_address_lookup_params_s + .. autoclass:: ics.structures.s_flex_vnetz_settings.s_flex_vnetz_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_l2_forwarding_entry_s.s_pluto_l2_forwarding_entry_s + .. autoclass:: ics.structures.s_jupiter_ptp_params_s.s_jupiter_ptp_params_s + :members: + :undoc-members: + + .. autoclass:: ics.structures.s_neo_ecu12_settings.s_neo_ecu12_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_l2_forwarding_params_s.s_pluto_l2_forwarding_params_s + .. autoclass:: ics.structures.s_neo_most_gateway_settings.s_neo_most_gateway_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_l2_policing_s.s_pluto_l2_policing_s + .. autoclass:: ics.structures.s_neo_vi_connect_settings.s_neo_vi_connect_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_mac_config_s.s_pluto_mac_config_s + .. autoclass:: ics.structures.s_phy_reg_pkt.s_phy_reg_pkt :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_ptp_params_s.s_pluto_ptp_params_s + .. autoclass:: ics.structures.s_phy_reg_pkt_clause22_mess.s_phy_reg_pkt_clause22_mess :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_retagging_entry_s.s_pluto_retagging_entry_s + .. autoclass:: ics.structures.s_phy_reg_pkt_clause45_mess.s_phy_reg_pkt_clause45_mess :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_switch_settings_s.s_pluto_switch_settings_s + .. autoclass:: ics.structures.s_phy_reg_pkt_hdr.s_phy_reg_pkt_hdr :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_vl_forwarding_entry_s.s_pluto_vl_forwarding_entry_s + .. autoclass:: ics.structures.s_phy_reg_pkt_rw.s_phy_reg_pkt_rw :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_vl_forwarding_params_s.s_pluto_vl_forwarding_params_s + .. autoclass:: ics.structures.s_phy_reg_pkt_status.s_phy_reg_pkt_status :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_vl_lookup_entry_s.s_pluto_vl_lookup_entry_s + .. autoclass:: ics.structures.s_red2_settings.s_red2_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_vl_policing_entry_s.s_pluto_vl_policing_entry_s + .. autoclass:: ics.structures.s_spi_port_setting.s_spi_port_setting :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_vlan_lookup_s.s_pluto_vlan_lookup_s + .. autoclass:: ics.structures.s_spi_port_settings.s_spi_port_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_rad_moon_duo_settings.s_rad_moon_duo_settings + .. autoclass:: ics.structures.s_text_api_settings.s_text_api_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_red_settings.s_red_settings + .. autoclass:: ics.structures.s_vivid_can_settings.s_vivid_can_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_text_api_settings.s_text_api_settings + .. autoclass:: ics.structures.s_wil_bridge_config.s_wil_bridge_config :members: :undoc-members: - .. autoclass:: ics.structures.s_vivid_can_settings.s_vivid_can_settings + .. autoclass:: ics.structures.s_wil_connection_settings.s_wil_connection_settings :members: :undoc-members: - .. autoclass:: ics.structures.scan_hub_settings.scan_hub_settings + .. autoclass:: ics.structures.s_wil_fault_servicing_settings.s_wil_fault_servicing_settings :members: :undoc-members: - .. autoclass:: ics.structures.scan_sleep_id.scan_sleep_id + .. autoclass:: ics.structures.s_wil_network_data_capture_settings.s_wil_network_data_capture_settings :members: :undoc-members: - .. autoclass:: ics.structures.secu_avb_settings.secu_avb_settings + .. autoclass:: ics.structures.scaled_ns_.scaled_ns_ :members: :undoc-members: - .. autoclass:: ics.structures.secu_settings.secu_settings + .. autoclass:: ics.structures.scan_hub_settings.scan_hub_settings :members: :undoc-members: - .. autoclass:: ics.structures.seevb_settings.seevb_settings + .. autoclass:: ics.structures.scan_sleep_id.scan_sleep_id :members: :undoc-members: @@ -668,7 +832,7 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.sievb_settings.sievb_settings + .. autoclass:: ics.structures.sfp_id.sfp_id :members: :undoc-members: @@ -676,27 +840,27 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.sobd2_pro_settings.sobd2_pro_settings + .. autoclass:: ics.structures.spy_filter_long.spy_filter_long :members: :undoc-members: - .. autoclass:: ics.structures.sobd2_sim_settings.sobd2_sim_settings + .. autoclass:: ics.structures.srad_comet3_settings.srad_comet3_settings :members: :undoc-members: - .. autoclass:: ics.structures.software_update_command.software_update_command + .. autoclass:: ics.structures.srad_comet_settings.srad_comet_settings :members: :undoc-members: - .. autoclass:: ics.structures.spy_filter_long.spy_filter_long + .. autoclass:: ics.structures.srad_epsilon_settings.srad_epsilon_settings :members: :undoc-members: - .. autoclass:: ics.structures.srad_epsilon_settings.srad_epsilon_settings + .. autoclass:: ics.structures.srad_epsilon_switch_settings.srad_epsilon_switch_settings :members: :undoc-members: - .. autoclass:: ics.structures.srad_epsilon_switch_settings.srad_epsilon_switch_settings + .. autoclass:: ics.structures.srad_galaxy2_settings.srad_galaxy2_settings :members: :undoc-members: @@ -704,7 +868,11 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.srad_gigalog_settings.srad_gigalog_settings + .. autoclass:: ics.structures.srad_gemini_settings.srad_gemini_settings + :members: + :undoc-members: + + .. autoclass:: ics.structures.srad_gigastar2_settings.srad_gigastar2_settings :members: :undoc-members: @@ -732,15 +900,15 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.srad_pluto_settings.srad_pluto_settings + .. autoclass:: ics.structures.srad_moon3_settings.srad_moon3_settings :members: :undoc-members: - .. autoclass:: ics.structures.srad_star2_settings.srad_star2_settings + .. autoclass:: ics.structures.srad_moon_t1_s_settings.srad_moon_t1_s_settings :members: :undoc-members: - .. autoclass:: ics.structures.srad_super_moon_settings.srad_super_moon_settings + .. autoclass:: ics.structures.srad_star2_settings.srad_star2_settings :members: :undoc-members: @@ -776,10 +944,6 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.svcan3_settings.svcan3_settings - :members: - :undoc-members: - .. autoclass:: ics.structures.svcan412_settings.svcan412_settings :members: :undoc-members: @@ -792,18 +956,10 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.svcanrf_settings.svcanrf_settings - :members: - :undoc-members: - .. autoclass:: ics.structures.swcan_settings.swcan_settings :members: :undoc-members: - .. autoclass:: ics.structures.swil_bridge_config.swil_bridge_config - :members: - :undoc-members: - .. autoclass:: ics.structures.system_identity.system_identity :members: :undoc-members: @@ -828,19 +984,39 @@ Module Structures :members: :undoc-members: + .. autoclass:: ics.structures.uart_port_config.uart_port_config + :members: + :undoc-members: + + .. autoclass:: ics.structures.uart_port_data.uart_port_data + :members: + :undoc-members: + + .. autoclass:: ics.structures.uart_port_port_bytes.uart_port_port_bytes + :members: + :undoc-members: + .. autoclass:: ics.structures.uart_settings.uart_settings :members: :undoc-members: - .. autoclass:: ics.structures.version_report.version_report + .. autoclass:: ics.structures.w_bms_manager_reset.w_bms_manager_reset :members: :undoc-members: + .. autoclass:: ics.structures.w_bms_manager_set_lock.w_bms_manager_set_lock + :members: + :undoc-members: + .. autoclass:: ics.structures.wbms_gateway_settings.wbms_gateway_settings + :members: + :undoc-members: -============================================================ + + +############################################################################## Module Variables -============================================================ +############################################################################## .. py:data:: A2B_SETTINGS_FLAG_16BIT :annotation: = 1 @@ -918,7 +1094,7 @@ Module Variables :annotation: = 6 .. py:data:: BUILD_DATETIME - :annotation: = Jul 22 2022 13:14:03 + :annotation: = Jul 7 2026 12:54:38 .. py:data:: CANFD_BRS_ENABLED :annotation: = 2 @@ -959,6 +1135,42 @@ Module Variables .. py:data:: CAN_SETTINGS_SIZE :annotation: = 12 + .. py:data:: CICSSPYSTATUSBITS_H_ + :annotation: = 1 + + .. py:data:: CMP_STREAMS_A2B + :annotation: = 3 + + .. py:data:: CMP_STREAMS_COMET + :annotation: = 10 + + .. py:data:: CMP_STREAMS_COMET3 + :annotation: = 10 + + .. py:data:: CMP_STREAMS_FIRE3 + :annotation: = 10 + + .. py:data:: CMP_STREAMS_FIRE3FR + :annotation: = 10 + + .. py:data:: CMP_STREAMS_FIRE3T1SLIN + :annotation: = 10 + + .. py:data:: CMP_STREAMS_GALAXY2 + :annotation: = 10 + + .. py:data:: CMP_STREAMS_GIGASTAR + :annotation: = 10 + + .. py:data:: CMP_STREAMS_GIGASTAR2 + :annotation: = 10 + + .. py:data:: CMP_STREAMS_RED2 + :annotation: = 10 + + .. py:data:: DEVICECOUNT_FOR_EXPLORER + :annotation: = 32 + .. py:data:: DISABLE :annotation: = 1 @@ -974,27 +1186,171 @@ Module Variables .. py:data:: DISK_STRUCTURE_FLAG_FULL_FORMAT :annotation: = 1 + .. py:data:: DRIVER_MASK + :annotation: = 192 + + .. py:data:: DRIVER_USB1 + :annotation: = 64 + + .. py:data:: DRIVER_USB2 + :annotation: = 128 + + .. py:data:: DRIVER_USB3 + :annotation: = 192 + + .. py:data:: EPSILON_10G_PHY1 + :annotation: = 1 + + .. py:data:: EPSILON_10G_PHY2 + :annotation: = 2 + + .. py:data:: EPSILON_88Q6113_SWITCH_A + :annotation: = 1 + + .. py:data:: EPSILON_88Q6113_SWITCH_AB + :annotation: = 3 + + .. py:data:: EPSILON_88Q6113_SWITCH_B + :annotation: = 2 + .. py:data:: ETHERNET10G_SETTINGS_SIZE :annotation: = 24 + .. py:data:: ETHERNET10T1L_SETTINGS_SIZE + :annotation: = 8 + + .. py:data:: ETHERNET10T1S_SETTINGS_EXT_SIZE + :annotation: = 16 + + .. py:data:: ETHERNET10T1S_SETTINGS_FLAG_BUS_DECODING_ALL + :annotation: = 8 + + .. py:data:: ETHERNET10T1S_SETTINGS_FLAG_BUS_DECODING_BEACONS + :annotation: = 4 + + .. py:data:: ETHERNET10T1S_SETTINGS_FLAG_DISABLE_ALL_DECODING + :annotation: = 64 + + .. py:data:: ETHERNET10T1S_SETTINGS_FLAG_ENABLE_CSMA_FALLBACK + :annotation: = 32 + + .. py:data:: ETHERNET10T1S_SETTINGS_FLAG_ENABLE_PLCA + :annotation: = 1 + + .. py:data:: ETHERNET10T1S_SETTINGS_FLAG_ENABLE_PLCA_COL_DET + :annotation: = 16 + + .. py:data:: ETHERNET10T1S_SETTINGS_FLAG_TERMINATION + :annotation: = 2 + + .. py:data:: ETHERNET10T1S_SETTINGS_SIZE + :annotation: = 12 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_AUTO_NEG :annotation: = 2 .. py:data:: ETHERNET_SETTINGS10G_FLAG_COMM_IN_USE - :annotation: = -2147483648 + :annotation: = 2147483648 + + .. py:data:: ETHERNET_SETTINGS10G_FLAG_COMPL_MODE + :annotation: = 1024 + + .. py:data:: ETHERNET_SETTINGS10G_FLAG_CONFIG_NOT_ALLOWED + :annotation: = 32 + + .. py:data:: ETHERNET_SETTINGS10G_FLAG_CUT_THRU_TAP_ENABLE + :annotation: = 16384 .. py:data:: ETHERNET_SETTINGS10G_FLAG_DEVICE_HOSTING_ENABLE :annotation: = 16 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_DISABLE_TAP_TO_HOST + :annotation: = 65536 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_FULL_DUPLEX :annotation: = 1 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_ICS_SFP + :annotation: = 64 + + .. py:data:: ETHERNET_SETTINGS10G_FLAG_IP_CONFIG_NOT_ALLOWED + :annotation: = 8192 + + .. py:data:: ETHERNET_SETTINGS10G_FLAG_LINK_MODE + :annotation: = 128 + + .. py:data:: ETHERNET_SETTINGS10G_FLAG_LINK_MODE_AUTO + :annotation: = 512 + + .. py:data:: ETHERNET_SETTINGS10G_FLAG_MACSEC_ENABLE + :annotation: = 131072 + + .. py:data:: ETHERNET_SETTINGS10G_FLAG_PHY_MODE + :annotation: = 256 + + .. py:data:: ETHERNET_SETTINGS10G_FLAG_PKT_CHECK + :annotation: = 2048 + + .. py:data:: ETHERNET_SETTINGS10G_FLAG_PKT_GEN + :annotation: = 4096 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_RTSP_ENABLE :annotation: = 8 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_SHOW_TAP_TX_RECEIPT + :annotation: = 262144 + + .. py:data:: ETHERNET_SETTINGS10G_FLAG_SNF_TAP_ENABLE + :annotation: = 32768 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_TCPIP_ENABLE :annotation: = 4 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_TCP_COMM_STATIC_PORT_ENABLE + :annotation: = 524288 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_CUT_THRU_TAP_ENABLE + :annotation: = 256 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_DISABLE_TAP_TO_HOST + :annotation: = 1024 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_IP_CONFIG_NOT_ALLOWED + :annotation: = 8 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_LINK_MODE + :annotation: = 1 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_LINK_MODE_AUTO + :annotation: = 4 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_PHY_MODE + :annotation: = 2 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_SFP_ID_MASK + :annotation: = 240 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_SFP_ID_SHIFT + :annotation: = 4 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_SHOW_TAP_TX_RECEIPT + :annotation: = 2048 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_SNF_TAP_ENABLE + :annotation: = 512 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_TAP_DEST_MASK + :annotation: = 3 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_TAP_DEST_SHIFT + :annotation: = 13 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_TC10_FWD_TAP_ENABLE + :annotation: = 32768 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_TCP_COMM_STATIC_PORT_ENABLE + :annotation: = 4096 + .. py:data:: ETHERNET_SETTINGS2_FLAG_AUTO_NEG :annotation: = 2 @@ -1010,6 +1366,9 @@ Module Variables .. py:data:: ETHERNET_SETTINGS2_FLAG_FULL_DUPLEX :annotation: = 1 + .. py:data:: ETHERNET_SETTINGS2_FLAG_ICS_SFP + :annotation: = 64 + .. py:data:: ETHERNET_SETTINGS2_FLAG_RTSP_ENABLE :annotation: = 8 @@ -1043,15 +1402,90 @@ Module Variables .. py:data:: FAST_MODE :annotation: = 3 - .. py:data:: GET_SUPPORTED_FEATURES_COMMAND_VERSION + .. py:data:: FIRE2_REPORT_EMISC1_ANALOG + :annotation: = 32 + + .. py:data:: FIRE2_REPORT_EMISC1_DIGITAL + :annotation: = 2 + + .. py:data:: FIRE2_REPORT_EMISC2_ANALOG + :annotation: = 64 + + .. py:data:: FIRE2_REPORT_EMISC2_DIGITAL + :annotation: = 4 + + .. py:data:: FIRE2_REPORT_GPS + :annotation: = 1024 + + .. py:data:: FIRE2_REPORT_MISC5_DIGITAL + :annotation: = 8 + + .. py:data:: FIRE2_REPORT_MISC6_DIGITAL + :annotation: = 16 + + .. py:data:: FIRE2_REPORT_PERIODIC + :annotation: = 1 + + .. py:data:: FIRE2_REPORT_PWM_IN + :annotation: = 512 + + .. py:data:: FIRE2_REPORT_TEMP_ANALOG + :annotation: = 256 + + .. py:data:: FIRE2_REPORT_VBATT_ANALOG + :annotation: = 128 + + .. py:data:: FIRE3_REPORT_ORIENTATION + :annotation: = 2048 + + .. py:data:: FLASH_ACCESSORY_EPSILON_10G_PHY1 + :annotation: = 0 + + .. py:data:: FLASH_ACCESSORY_EPSILON_10G_PHY2 + :annotation: = 1 + + .. py:data:: FLASH_ACCESSORY_EPSILON_10G_PHY_FW_0_3_7_0 + :annotation: = 0 + + .. py:data:: FLASH_ACCESSORY_EPSILON_SWITCH_A + :annotation: = 2 + + .. py:data:: FLASH_ACCESSORY_EPSILON_SWITCH_B + :annotation: = 3 + + .. py:data:: GENERIC_API_DATA_BUFFER_SIZE + :annotation: = 513 + + .. py:data:: GENERIC_BINARY_STATUS_ERROR_ANY_MASK + :annotation: = 7 + + .. py:data:: GENERIC_BINARY_STATUS_ERROR_BINARY_EMPTY + :annotation: = 4 + + .. py:data:: GENERIC_BINARY_STATUS_ERROR_OVERSIZE + :annotation: = 2 + + .. py:data:: GENERIC_BINARY_STATUS_ERROR_UNKNOWN_BINARY + :annotation: = 1 + + .. py:data:: GIGASTAR2_FW_VARIANT_6T1S_1CAN_16LIN + :annotation: = 0 + + .. py:data:: GIGASTAR2_FW_VARIANT_8T1S_4CAN_6LIN :annotation: = 1 + .. py:data:: GIGASTAR2_FW_VARIANT_COUNT + :annotation: = 2 + .. py:data:: GLOBAL_SETTINGS_SIZE - :annotation: = 942 + :annotation: = 2406 .. py:data:: GS_VERSION :annotation: = 5 + .. py:data:: HADRWARE_TIMESTAMP_ID_FIXED + :annotation: = 128 + .. py:data:: HARDWARE_TIMESTAMP_ID_AVT_716 :annotation: = 2 @@ -1082,9 +1516,6 @@ Module Variables .. py:data:: HARDWARE_TIMESTAMP_ID_VSI :annotation: = 1 - .. py:data:: HW_ETH_SETTINGS_SIZE - :annotation: = 20 - .. py:data:: ISO15765_2_NETWORK_HSCAN :annotation: = 1 @@ -1124,52 +1555,130 @@ Module Variables .. py:data:: J1708_SETTINGS_SIZE :annotation: = 2 - .. py:data:: JUPITER_PTP_ROLE_DISABLED - :annotation: = 0 + .. py:data:: LINUX_BOOT_ALLOWED + :annotation: = 1 - .. py:data:: JUPITER_PTP_ROLE_MASTER + .. py:data:: LINUX_CONFIG_PORT_ETH_01 :annotation: = 1 - .. py:data:: JUPITER_PTP_ROLE_SLAVE + .. py:data:: LINUX_CONFIG_PORT_ETH_02 :annotation: = 2 - .. py:data:: LINK_SPEED_100MBPS_FULL_DUPLEX + .. py:data:: LINUX_CONFIG_PORT_NONE + :annotation: = 0 + + .. py:data:: LIN_SETTINGS_SIZE + :annotation: = 10 + + .. py:data:: LISTEN_ALL + :annotation: = 7 + + .. py:data:: LISTEN_ONLY :annotation: = 3 - .. py:data:: LINK_SPEED_100MBPS_HALF_DUPLEX + .. py:data:: LOGGER_SETTINGS_SIZE :annotation: = 4 - .. py:data:: LINK_SPEED_10MBPS_FULL_DUPLEX - :annotation: = 5 + .. py:data:: LOOPBACK + :annotation: = 2 - .. py:data:: LINK_SPEED_10MBPS_HALF_DUPLEX + .. py:data:: MACADDR_LEN :annotation: = 6 - .. py:data:: LINK_SPEED_1GBPS_FULL_DUPLEX + .. py:data:: MACSEC_CIPHER_GCM_AES_128 + :annotation: = 0 + + .. py:data:: MACSEC_CIPHER_GCM_AES_128_XPN + :annotation: = 2 + + .. py:data:: MACSEC_CIPHER_GCM_AES_256 + :annotation: = 1 + + .. py:data:: MACSEC_CIPHER_GCM_AES_256_XPN + :annotation: = 3 + + .. py:data:: MACSEC_NUM_FLAGS_PER_CONFIG :annotation: = 1 - .. py:data:: LINK_SPEED_1GBPS_HALF_DUPLEX + .. py:data:: MACSEC_NUM_MAPS_PER_CONFIG + :annotation: = 2 + + .. py:data:: MACSEC_NUM_RULES_PER_CONFIG + :annotation: = 2 + + .. py:data:: MACSEC_NUM_SA_PER_CONFIG + :annotation: = 4 + + .. py:data:: MACSEC_NUM_SC_PER_CONFIG + :annotation: = 2 + + .. py:data:: MACSEC_NUM_SECY_PER_CONFIG :annotation: = 2 - .. py:data:: LINK_SPEED_AUTO_NEGOTIATION + .. py:data:: MACSEC_PACKET_DUAL_VLAN + :annotation: = 2 + + .. py:data:: MACSEC_PACKET_DUAL_VLAN_FOLLOW_BY_MPLS + :annotation: = 5 + + .. py:data:: MACSEC_PACKET_MPLS + :annotation: = 3 + + .. py:data:: MACSEC_PACKET_NO_VLAN_OR_MPLS :annotation: = 0 - .. py:data:: LINK_SPEED_COUNT - :annotation: = 7 + .. py:data:: MACSEC_PACKET_SINGLE_VLAN + :annotation: = 1 - .. py:data:: LIN_SETTINGS_SIZE - :annotation: = 10 + .. py:data:: MACSEC_PACKET_SINGLE_VLAN_FOLLOW_BY_MPLS + :annotation: = 4 - .. py:data:: LISTEN_ALL - :annotation: = 7 + .. py:data:: MACSEC_PACKET_UNSUPPORTED_TYPE + :annotation: = 6 - .. py:data:: LISTEN_ONLY + .. py:data:: MACSEC_SECTAG_ICV_BOTH_STRIP + :annotation: = 0 + + .. py:data:: MACSEC_SECTAG_ICV_NO_STRIP :annotation: = 3 - .. py:data:: LOGGER_SETTINGS_SIZE + .. py:data:: MACSEC_SECTAG_ICV_RESERVED + :annotation: = 1 + + .. py:data:: MACSEC_SECTAG_ICV_STRIP_ICV_ONLY + :annotation: = 2 + + .. py:data:: MACSEC_SETTINGS_FLAGS_SIZE :annotation: = 4 - .. py:data:: LOOPBACK + .. py:data:: MACSEC_SETTINGS_MAP_SIZE + :annotation: = 20 + + .. py:data:: MACSEC_SETTINGS_RULE_SIZE + :annotation: = 88 + + .. py:data:: MACSEC_SETTINGS_SA_SIZE + :annotation: = 80 + + .. py:data:: MACSEC_SETTINGS_SC_SIZE + :annotation: = 24 + + .. py:data:: MACSEC_SETTINGS_SECY_SIZE + :annotation: = 24 + + .. py:data:: MACSEC_SETTINGS_SIZE + :annotation: = 2040 + + .. py:data:: MACSEC_VF_CHECK + :annotation: = 1 + + .. py:data:: MACSEC_VF_DISABLED + :annotation: = 0 + + .. py:data:: MACSEC_VF_NA + :annotation: = 3 + + .. py:data:: MACSEC_VF_STRICT :annotation: = 2 .. py:data:: MAIN_VNET @@ -1184,14 +1693,14 @@ Module Variables .. py:data:: MAX_PHY_SETTINGS_STRUCT :annotation: = 128 - .. py:data:: MAX_REPORTED_VERSIONS - :annotation: = 16 + .. py:data:: MAX_SERIAL + :annotation: = 2176782335 - .. py:data:: MAX_VL_FORWARDING_ENTRIES - :annotation: = 1024 + .. py:data:: MIN_BASE36_SERIAL + :annotation: = 16796160 - .. py:data:: MAX_VL_POLICING_ENTRIES - :annotation: = 1024 + .. py:data:: MULTI_MACADDR_CNT + :annotation: = 32 .. py:data:: NEODEVICE_ANY_ION :annotation: = 262144 @@ -1199,13 +1708,13 @@ Module Variables .. py:data:: NEODEVICE_ANY_PLASMA :annotation: = 4096 - .. py:data:: NEODEVICE_BLUE + .. py:data:: NEODEVICE_BLUE_DEPRECATED :annotation: = 1 - .. py:data:: NEODEVICE_CMPROBE + .. py:data:: NEODEVICE_CMPROBE_DEPRECATED :annotation: = 8388608 - .. py:data:: NEODEVICE_CT_OBD + .. py:data:: NEODEVICE_CT_OBD_DEPRECATED :annotation: = 32768 .. py:data:: NEODEVICE_DONT_REUSE0 @@ -1220,52 +1729,67 @@ Module Variables .. py:data:: NEODEVICE_DONT_REUSE3 :annotation: = 1048576 - .. py:data:: NEODEVICE_DW_VCAN - :annotation: = 4 + .. py:data:: NEODEVICE_DONT_REUSE4 + :annotation: = 33554432 - .. py:data:: NEODEVICE_ECU - :annotation: = 128 + .. py:data:: NEODEVICE_DW_VCAN_DEPRECATED + :annotation: = 4 - .. py:data:: NEODEVICE_ECU22 + .. py:data:: NEODEVICE_ECU22_DEPRECATED :annotation: = 27 - .. py:data:: NEODEVICE_ECUCHIP_UART + .. py:data:: NEODEVICE_ECUCHIP_UART_DEPRECATED :annotation: = 2048 - .. py:data:: NEODEVICE_ECU_AVB + .. py:data:: NEODEVICE_ECU_AVB_DEPRECATED :annotation: = 2 - .. py:data:: NEODEVICE_EEVB + .. py:data:: NEODEVICE_ECU_DEPRECATED + :annotation: = 128 + + .. py:data:: NEODEVICE_EEVB_DEPRECATED :annotation: = 16777216 - .. py:data:: NEODEVICE_ETHER_BADGE + .. py:data:: NEODEVICE_ETHER_BADGE_DEPRECATED :annotation: = 22 - .. py:data:: NEODEVICE_FIRE - :annotation: = 8 - .. py:data:: NEODEVICE_FIRE2 :annotation: = 67108864 - .. py:data:: NEODEVICE_FIRE2_REDLINE + .. py:data:: NEODEVICE_FIRE2_REDLINE_DEPRECATED :annotation: = 21 .. py:data:: NEODEVICE_FIRE3 :annotation: = 15 - .. py:data:: NEODEVICE_FLEX + .. py:data:: NEODEVICE_FIRE3_FLEXRAY + :annotation: = 37 + + .. py:data:: NEODEVICE_FIRE3_T1S_LIN + :annotation: = 42 + + .. py:data:: NEODEVICE_FIRE3_T1S_SENT + :annotation: = 43 + + .. py:data:: NEODEVICE_FIRE_DEPRECATED + :annotation: = 8 + + .. py:data:: NEODEVICE_FLEX_DEPRECATED :annotation: = 134217728 .. py:data:: NEODEVICE_GIGASTAR :annotation: = 19 - .. py:data:: NEODEVICE_IEVB + .. py:data:: NEODEVICE_GIGASTAR2 + :annotation: = 41 + + .. py:data:: NEODEVICE_IEVB_DEPRECATED :annotation: = 256 .. py:data:: NEODEVICE_ION :annotation: = 262144 - .. py:data:: NEODEVICE_NEOANALOG + .. py:data:: NEODEVICE_NEOANALOG_DEPRECATED :annotation: = 16384 .. py:data:: NEODEVICE_NEOECU12 @@ -1274,33 +1798,36 @@ Module Variables .. py:data:: NEODEVICE_NEOECUCHIP :annotation: = 256 - .. py:data:: NEODEVICE_NEW_DEVICE_58 - :annotation: = 31 - - .. py:data:: NEODEVICE_NEW_DEVICE_59 - :annotation: = 33 + .. py:data:: NEODEVICE_NEOVI_CONNECT + :annotation: = 38 - .. py:data:: NEODEVICE_OBD2_DEV + .. py:data:: NEODEVICE_OBD2_DEV_DEPRECATED :annotation: = 26 .. py:data:: NEODEVICE_OBD2_LC :annotation: = 13 - .. py:data:: NEODEVICE_OBD2_PRO + .. py:data:: NEODEVICE_OBD2_PRO_DEPRECATED :annotation: = 1024 - .. py:data:: NEODEVICE_OBD2_SIM - :annotation: = -2147483648 + .. py:data:: NEODEVICE_OBD2_SIM_DEPRECATED + :annotation: = 2147483648 - .. py:data:: NEODEVICE_OBD2_SIM_DOIP + .. py:data:: NEODEVICE_OBD2_SIM_DOIP_DEPRECATED :annotation: = 25 - .. py:data:: NEODEVICE_PENDANT + .. py:data:: NEODEVICE_PENDANT_DEPRECATED :annotation: = 512 .. py:data:: NEODEVICE_PLASMA :annotation: = 4096 + .. py:data:: NEODEVICE_RADCOMET + :annotation: = 36 + + .. py:data:: NEODEVICE_RADCOMET3 + :annotation: = 39 + .. py:data:: NEODEVICE_RADEPSILON :annotation: = 24 @@ -1313,7 +1840,10 @@ Module Variables .. py:data:: NEODEVICE_RADGALAXY :annotation: = 268435456 - .. py:data:: NEODEVICE_RADGIGALOG + .. py:data:: NEODEVICE_RADGEMINI + :annotation: = 44 + + .. py:data:: NEODEVICE_RADGIGALOG_DEPRECATED :annotation: = 6 .. py:data:: NEODEVICE_RADIO_CANHUB @@ -1325,19 +1855,25 @@ Module Variables .. py:data:: NEODEVICE_RADMOON2 :annotation: = 5 - .. py:data:: NEODEVICE_RADPLUTO + .. py:data:: NEODEVICE_RADMOON3 + :annotation: = 35 + + .. py:data:: NEODEVICE_RADMOONT1S + :annotation: = 40 + + .. py:data:: NEODEVICE_RADPLUTO_DEPRECATED :annotation: = 9 .. py:data:: NEODEVICE_RADPROXIMA :annotation: = 30 - .. py:data:: NEODEVICE_RADSTAR - :annotation: = 524288 - .. py:data:: NEODEVICE_RADSTAR2 :annotation: = 536870912 - .. py:data:: NEODEVICE_RADSUPERMOON + .. py:data:: NEODEVICE_RADSTAR_DEPRECATED + :annotation: = 524288 + + .. py:data:: NEODEVICE_RADSUPERMOON_DEPRECATED :annotation: = 3 .. py:data:: NEODEVICE_RAD_A2B @@ -1346,19 +1882,22 @@ Module Variables .. py:data:: NEODEVICE_RAD_BMS :annotation: = 34 - .. py:data:: NEODEVICE_RAD_MOON_DUO - :annotation: = 14 + .. py:data:: NEODEVICE_RAD_GALAXY_2 + :annotation: = 33 - .. py:data:: NEODEVICE_RED - :annotation: = 64 + .. py:data:: NEODEVICE_RAD_MOON_DUO_DEPRECATED + :annotation: = 14 .. py:data:: NEODEVICE_RED2 :annotation: = 20 + .. py:data:: NEODEVICE_RED_DEPRECATED + :annotation: = 64 + .. py:data:: NEODEVICE_UNKNOWN :annotation: = 0 - .. py:data:: NEODEVICE_VCAN3 + .. py:data:: NEODEVICE_VCAN3_DEPRECATED :annotation: = 16 .. py:data:: NEODEVICE_VCAN41 @@ -1376,9 +1915,6 @@ Module Variables .. py:data:: NEODEVICE_VCAN4_IND :annotation: = 18 - .. py:data:: NEODEVICE_VCANRF - :annotation: = 33554432 - .. py:data:: NEODEVICE_VIVIDCAN :annotation: = 1073741824 @@ -1395,7 +1931,7 @@ Module Variables :annotation: = 0.065536 .. py:data:: NEOVI_3G_MAX_SETTINGS_SIZE - :annotation: = 942 + :annotation: = 2406 .. py:data:: NEOVI_COMMTYPE_FIRE_USB :annotation: = 5 @@ -1472,26 +2008,74 @@ Module Variables .. py:data:: NETID_3G_FB_STATUS :annotation: = 55 - .. py:data:: NETID_3G_LOGGING_OVERFLOW - :annotation: = 59 + .. py:data:: NETID_3G_LOGGING_OVERFLOW + :annotation: = 59 + + .. py:data:: NETID_3G_READ_DATALINK_CM_RX_MSG + :annotation: = 58 + + .. py:data:: NETID_3G_READ_DATALINK_CM_TX_MSG + :annotation: = 57 + + .. py:data:: NETID_3G_READ_SETTINGS_EX + :annotation: = 60 + + .. py:data:: NETID_3G_RESET_STATUS + :annotation: = 54 + + .. py:data:: NETID_A2B_01 + :annotation: = 522 + + .. py:data:: NETID_A2B_02 + :annotation: = 523 + + .. py:data:: NETID_AE_01 + :annotation: = 17 + + .. py:data:: NETID_AE_02 + :annotation: = 18 + + .. py:data:: NETID_AE_03 + :annotation: = 19 + + .. py:data:: NETID_AE_04 + :annotation: = 45 + + .. py:data:: NETID_AE_05 + :annotation: = 46 + + .. py:data:: NETID_AE_06 + :annotation: = 73 + + .. py:data:: NETID_AE_07 + :annotation: = 75 + + .. py:data:: NETID_AE_08 + :annotation: = 76 + + .. py:data:: NETID_AE_09 + :annotation: = 77 + + .. py:data:: NETID_AE_10 + :annotation: = 78 - .. py:data:: NETID_3G_READ_DATALINK_CM_RX_MSG - :annotation: = 58 + .. py:data:: NETID_AE_11 + :annotation: = 79 - .. py:data:: NETID_3G_READ_DATALINK_CM_TX_MSG - :annotation: = 57 + .. py:data:: NETID_AE_12 + :annotation: = 87 - .. py:data:: NETID_3G_READ_SETTINGS_EX - :annotation: = 60 + .. py:data:: NETID_AE_13 + :annotation: = 553 - .. py:data:: NETID_3G_RESET_STATUS - :annotation: = 54 + .. py:data:: NETID_AE_14 + :annotation: = 554 - .. py:data:: NETID_A2B_01 - :annotation: = 522 + .. py:data:: NETID_AE_15 + :annotation: = 555 - .. py:data:: NETID_A2B_02 - :annotation: = 523 + .. py:data:: NETID_AE_16 + :annotation: = 556 .. py:data:: NETID_AUTOSAR :annotation: = 515 @@ -1514,6 +2098,54 @@ Module Variables .. py:data:: NETID_DEVICE_STATUS :annotation: = 513 + .. py:data:: NETID_DWCAN_01 + :annotation: = 1 + + .. py:data:: NETID_DWCAN_02 + :annotation: = 42 + + .. py:data:: NETID_DWCAN_03 + :annotation: = 44 + + .. py:data:: NETID_DWCAN_04 + :annotation: = 61 + + .. py:data:: NETID_DWCAN_05 + :annotation: = 62 + + .. py:data:: NETID_DWCAN_06 + :annotation: = 96 + + .. py:data:: NETID_DWCAN_07 + :annotation: = 97 + + .. py:data:: NETID_DWCAN_08 + :annotation: = 2 + + .. py:data:: NETID_DWCAN_09 + :annotation: = 534 + + .. py:data:: NETID_DWCAN_10 + :annotation: = 535 + + .. py:data:: NETID_DWCAN_11 + :annotation: = 536 + + .. py:data:: NETID_DWCAN_12 + :annotation: = 537 + + .. py:data:: NETID_DWCAN_13 + :annotation: = 538 + + .. py:data:: NETID_DWCAN_14 + :annotation: = 539 + + .. py:data:: NETID_DWCAN_15 + :annotation: = 540 + + .. py:data:: NETID_DWCAN_16 + :annotation: = 541 + .. py:data:: NETID_ETHERNET :annotation: = 93 @@ -1640,6 +2272,36 @@ Module Variables .. py:data:: NETID_LIN6 :annotation: = 98 + .. py:data:: NETID_LIN_07 + :annotation: = 542 + + .. py:data:: NETID_LIN_08 + :annotation: = 543 + + .. py:data:: NETID_LIN_09 + :annotation: = 563 + + .. py:data:: NETID_LIN_10 + :annotation: = 564 + + .. py:data:: NETID_LIN_11 + :annotation: = 565 + + .. py:data:: NETID_LIN_12 + :annotation: = 566 + + .. py:data:: NETID_LIN_13 + :annotation: = 567 + + .. py:data:: NETID_LIN_14 + :annotation: = 568 + + .. py:data:: NETID_LIN_15 + :annotation: = 569 + + .. py:data:: NETID_LIN_16 + :annotation: = 570 + .. py:data:: NETID_LSFTCAN :annotation: = 4 @@ -1652,6 +2314,30 @@ Module Variables .. py:data:: NETID_MAX :annotation: = 100 + .. py:data:: NETID_MDIO_01 + :annotation: = 545 + + .. py:data:: NETID_MDIO_02 + :annotation: = 546 + + .. py:data:: NETID_MDIO_03 + :annotation: = 547 + + .. py:data:: NETID_MDIO_04 + :annotation: = 548 + + .. py:data:: NETID_MDIO_05 + :annotation: = 549 + + .. py:data:: NETID_MDIO_06 + :annotation: = 550 + + .. py:data:: NETID_MDIO_07 + :annotation: = 551 + + .. py:data:: NETID_MDIO_08 + :annotation: = 552 + .. py:data:: NETID_MOST :annotation: = 51 @@ -1679,6 +2365,18 @@ Module Variables .. py:data:: NETID_OP_ETHERNET12 :annotation: = 87 + .. py:data:: NETID_OP_ETHERNET13 + :annotation: = 553 + + .. py:data:: NETID_OP_ETHERNET14 + :annotation: = 554 + + .. py:data:: NETID_OP_ETHERNET15 + :annotation: = 555 + + .. py:data:: NETID_OP_ETHERNET16 + :annotation: = 556 + .. py:data:: NETID_OP_ETHERNET2 :annotation: = 18 @@ -1721,6 +2419,27 @@ Module Variables .. py:data:: NETID_SPI1 :annotation: = 72 + .. py:data:: NETID_SPI2 + :annotation: = 544 + + .. py:data:: NETID_SPI3 + :annotation: = 557 + + .. py:data:: NETID_SPI4 + :annotation: = 558 + + .. py:data:: NETID_SPI5 + :annotation: = 559 + + .. py:data:: NETID_SPI6 + :annotation: = 560 + + .. py:data:: NETID_SPI7 + :annotation: = 561 + + .. py:data:: NETID_SPI8 + :annotation: = 562 + .. py:data:: NETID_SWCAN :annotation: = 3 @@ -1748,6 +2467,24 @@ Module Variables .. py:data:: NETID_UDP :annotation: = 514 + .. py:data:: NETID_WBMS + :annotation: = 532 + + .. py:data:: NETID_WBMS2 + :annotation: = 533 + + .. py:data:: NETWORK_TIMESYNC_AUTO + :annotation: = 1 + + .. py:data:: NETWORK_TIMESYNC_GPS_ONLY + :annotation: = 3 + + .. py:data:: NETWORK_TIMESYNC_NTP_ONLY + :annotation: = 2 + + .. py:data:: NETWORK_TIMESYNC_OFF + :annotation: = 0 + .. py:data:: NORMAL :annotation: = 0 @@ -1757,6 +2494,12 @@ Module Variables .. py:data:: NO_CANFD :annotation: = 0 + .. py:data:: NUM_DEVICE_FEATURE_BITFIELDS + :annotation: = 1 + + .. py:data:: NUM_VALID_DEVICE_FEATURES + :annotation: = 20 + .. py:data:: OPETH_FUNC_MEDIACONVERTER :annotation: = 1 @@ -1811,9 +2554,6 @@ Module Variables .. py:data:: PHYREG_READ :annotation: = 0 - .. py:data:: PHYREG_RESERVED0 - :annotation: = 4 - .. py:data:: PHYREG_RESERVED1 :annotation: = 5 @@ -1826,12 +2566,18 @@ Module Variables .. py:data:: PHYREG_SUCCESS :annotation: = 0 + .. py:data:: PHYREG_UNSUPPORTED_MDIO_CLAUSE + :annotation: = 4 + .. py:data:: PHYREG_WRITE :annotation: = 1 .. py:data:: PHY_REG_PKT_VERSION :annotation: = 1 + .. py:data:: PHY_UNKNOWN + :annotation: = 255 + .. py:data:: PLASMA_SLAVE1_OFFSET :annotation: = 100 @@ -1850,39 +2596,15 @@ Module Variables .. py:data:: PLASMA_SLAVE_NUM :annotation: = 51 - .. py:data:: PLUTO_MAX_FORWARDING_ENTRIES - :annotation: = 13 - - .. py:data:: PLUTO_MAX_L2_ADDRESS_LOOKUP - :annotation: = 1024 - - .. py:data:: PLUTO_MAX_L2_POLICING - :annotation: = 45 - - .. py:data:: PLUTO_MAX_MAC_CONFIG_ENTRIES - :annotation: = 5 - - .. py:data:: PLUTO_MAX_RETAGGING_ENTRIES - :annotation: = 32 - - .. py:data:: PLUTO_MAX_VLAN_LOOKUP - :annotation: = 4096 - - .. py:data:: PLUTO_NUM_PORTS - :annotation: = 5 - - .. py:data:: PLUTO_NUM_PRIORITY - :annotation: = 8 - .. py:data:: RADEPSILON_MAX_PHY :annotation: = 18 + .. py:data:: RADEPSILON_NUM_PORTS + :annotation: = 18 + .. py:data:: RADJUPITER_NUM_PORTS :annotation: = 8 - .. py:data:: RADMOONDUO_CONVERTER_SETTINGS_SIZE - :annotation: = 16 - .. py:data:: RAD_GPTP_AND_TAP_SETTINGS_SIZE :annotation: = 40 @@ -1916,6 +2638,9 @@ Module Variables .. py:data:: RAD_REPORTING_SETTINGS_FLAG_MISC2_PWMIN :annotation: = 128 + .. py:data:: RAD_REPORTING_SETTINGS_FLAG_REPORT_ORIENTATION_ENABLE + :annotation: = 2048 + .. py:data:: RAD_REPORTING_SETTINGS_FLAG_SERDES_ENABLE :annotation: = 512 @@ -1991,9 +2716,6 @@ Module Variables .. py:data:: SCRIPT_LOCATION_SDCARD :annotation: = 1 - .. py:data:: SCRIPT_LOCATION_VCAN3_MEM - :annotation: = 4 - .. py:data:: SCRIPT_STATUS_RUNNING :annotation: = 1 @@ -2342,6 +3064,36 @@ Module Variables .. py:data:: SERDESPOC_SETTINGS_SIZE :annotation: = 10 + .. py:data:: SFP_ID_FINISAR_FCLF8522P2BTL + :annotation: = 1 + + .. py:data:: SFP_ID_FS_GB_GE_T + :annotation: = 2 + + .. py:data:: SFP_ID_ICS_AD1101 + :annotation: = 8 + + .. py:data:: SFP_ID_ICS_EN11100 + :annotation: = 7 + + .. py:data:: SFP_ID_ICS_MC8670 + :annotation: = 6 + + .. py:data:: SFP_ID_ICS_MV2112A2 + :annotation: = 3 + + .. py:data:: SFP_ID_ICS_MV2221MB1 + :annotation: = 4 + + .. py:data:: SFP_ID_ICS_MV3244 + :annotation: = 5 + + .. py:data:: SFP_ID_MAX + :annotation: = 9 + + .. py:data:: SFP_ID_UNKNOWN + :annotation: = 0 + .. py:data:: SLAVE_VNET_A :annotation: = 2 @@ -2354,6 +3106,27 @@ Module Variables .. py:data:: SLOW_MODE :annotation: = 1 + .. py:data:: SPI_MODE_MASTER + :annotation: = 0 + + .. py:data:: SPI_MODE_PMS_EMULATION + :annotation: = 2 + + .. py:data:: SPI_MODE_SLAVE + :annotation: = 1 + + .. py:data:: SPI_PORT_EXTERNAL + :annotation: = 1 + + .. py:data:: SPI_PORT_ONBOARD + :annotation: = 0 + + .. py:data:: SPI_TYPE_RAW + :annotation: = 1 + + .. py:data:: SPI_TYPE_WIL + :annotation: = 0 + .. py:data:: SPY_PROTOCOL_A2B :annotation: = 35 @@ -2438,6 +3211,9 @@ Module Variables .. py:data:: SPY_PROTOCOL_LIN :annotation: = 12 + .. py:data:: SPY_PROTOCOL_MDIO + :annotation: = 37 + .. py:data:: SPY_PROTOCOL_MOST :annotation: = 17 @@ -2459,6 +3235,9 @@ Module Variables .. py:data:: SPY_PROTOCOL_UNIO :annotation: = 24 + .. py:data:: SPY_PROTOCOL_WBMS + :annotation: = 36 + .. py:data:: SPY_STATUS2_CAN_HAVE_LINK_DATA :annotation: = 4194304 @@ -2474,6 +3253,9 @@ Module Variables .. py:data:: SPY_STATUS2_ETHERNET_CRC_ERROR :annotation: = 2097152 + .. py:data:: SPY_STATUS2_ETHERNET_FCS_AVAILABLE + :annotation: = 8388608 + .. py:data:: SPY_STATUS2_ETHERNET_FCS_VERIFIED :annotation: = 268435456 @@ -2489,6 +3271,15 @@ Module Variables .. py:data:: SPY_STATUS2_ETHERNET_PREEMPTION_ENABLED :annotation: = 33554432 + .. py:data:: SPY_STATUS2_ETHERNET_T1S_BURST + :annotation: = 1073741824 + + .. py:data:: SPY_STATUS2_ETHERNET_T1S_ETHERNET + :annotation: = 2147483648 + + .. py:data:: SPY_STATUS2_ETHERNET_T1S_SYMBOL + :annotation: = 536870912 + .. py:data:: SPY_STATUS2_ETHERNET_UPDATE_CHECKSUMS :annotation: = 67108864 @@ -2537,6 +3328,9 @@ Module Variables .. py:data:: SPY_STATUS2_ISO_PARITY_ERROR :annotation: = 536870912 + .. py:data:: SPY_STATUS2_ISO_RX_TIMEOUT_ERROR + :annotation: = 1073741824 + .. py:data:: SPY_STATUS2_LIN_ERR_MSG_ID_PARITY :annotation: = 67108864 @@ -2559,7 +3353,10 @@ Module Variables :annotation: = 268435456 .. py:data:: SPY_STATUS2_LIN_NO_SLAVE_DATA - :annotation: = -2147483648 + :annotation: = 2147483648 + + .. py:data:: SPY_STATUS2_LIN_RX_TIMEOUT_ERROR + :annotation: = 1073741824 .. py:data:: SPY_STATUS2_LIN_SLAVE_BYTE_ERROR :annotation: = 536870912 @@ -2570,8 +3367,38 @@ Module Variables .. py:data:: SPY_STATUS2_LONG_MESSAGE :annotation: = 8 + .. py:data:: SPY_STATUS2_MDIO_CLAUSE45 + :annotation: = 536870912 + + .. py:data:: SPY_STATUS2_MDIO_ERR_TIMEOUT + :annotation: = 2097152 + + .. py:data:: SPY_STATUS2_MDIO_INVALID_BUS + :annotation: = 8388608 + + .. py:data:: SPY_STATUS2_MDIO_INVALID_PHYADDR + :annotation: = 16777216 + + .. py:data:: SPY_STATUS2_MDIO_INVALID_REGADDR + :annotation: = 33554432 + + .. py:data:: SPY_STATUS2_MDIO_JOB_CANCELLED + :annotation: = 4194304 + + .. py:data:: SPY_STATUS2_MDIO_OVERFLOW + :annotation: = 268435456 + + .. py:data:: SPY_STATUS2_MDIO_READ + :annotation: = 1073741824 + + .. py:data:: SPY_STATUS2_MDIO_UNSUPPORTED_CLAUSE + :annotation: = 67108864 + + .. py:data:: SPY_STATUS2_MDIO_UNSUPPORTED_OPCODE + :annotation: = 134217728 + .. py:data:: SPY_STATUS2_MOST_CHANGED_PAR - :annotation: = -2147483648 + :annotation: = 2147483648 .. py:data:: SPY_STATUS2_MOST_CONTROL_DATA :annotation: = 16777216 @@ -2609,6 +3436,9 @@ Module Variables .. py:data:: SPY_STATUS2_VALUE_IS_BOOLEAN :annotation: = 2 + .. py:data:: SPY_STATUS2_WBMS_API_IS_CALLBACK + :annotation: = 2097152 + .. py:data:: SPY_STATUS3_CANFD_BRS :annotation: = 16 @@ -2624,6 +3454,63 @@ Module Variables .. py:data:: SPY_STATUS3_CANFD_RTR :annotation: = 4 + .. py:data:: SPY_STATUS3_CAN_BUS_OFF + :annotation: = 2 + + .. py:data:: SPY_STATUS3_CAN_DATAERR_ACK_ERROR + :annotation: = 1024 + + .. py:data:: SPY_STATUS3_CAN_DATAERR_BIT0_ERROR + :annotation: = 4096 + + .. py:data:: SPY_STATUS3_CAN_DATAERR_BIT1_ERROR + :annotation: = 2048 + + .. py:data:: SPY_STATUS3_CAN_DATAERR_CRC_ERROR + :annotation: = 8192 + + .. py:data:: SPY_STATUS3_CAN_DATAERR_FORM_ERROR + :annotation: = 512 + + .. py:data:: SPY_STATUS3_CAN_DATAERR_NOCHANGE + :annotation: = 16384 + + .. py:data:: SPY_STATUS3_CAN_DATAERR_STUFF_ERROR + :annotation: = 256 + + .. py:data:: SPY_STATUS3_CAN_ERR_PASSIVE + :annotation: = 1 + + .. py:data:: SPY_STATUS3_CAN_ERR_WARNING + :annotation: = 4 + + .. py:data:: SPY_STATUS3_CAN_GENERR_ACK_ERROR + :annotation: = 262144 + + .. py:data:: SPY_STATUS3_CAN_GENERR_BIT0_ERROR + :annotation: = 1048576 + + .. py:data:: SPY_STATUS3_CAN_GENERR_BIT1_ERROR + :annotation: = 524288 + + .. py:data:: SPY_STATUS3_CAN_GENERR_CRC_ERROR + :annotation: = 2097152 + + .. py:data:: SPY_STATUS3_CAN_GENERR_FORM_ERROR + :annotation: = 131072 + + .. py:data:: SPY_STATUS3_CAN_GENERR_NOCHANGE + :annotation: = 4194304 + + .. py:data:: SPY_STATUS3_CAN_GENERR_STUFF_ERROR + :annotation: = 65536 + + .. py:data:: SPY_STATUS3_ETHERNET_T1S_WAKE + :annotation: = 2 + + .. py:data:: SPY_STATUS3_ETHERNET_TX_COLLISION + :annotation: = 1 + .. py:data:: SPY_STATUS3_LIN_JUST_BREAK_SYNC :annotation: = 1 @@ -2633,8 +3520,14 @@ Module Variables .. py:data:: SPY_STATUS3_LIN_SLAVE_DATA_TOO_SHORT :annotation: = 2 + .. py:data:: SPY_STATUS4_ETH_CRC_ERROR + :annotation: = 1 + + .. py:data:: SPY_STATUS4_ETH_FRAME_TOO_LONG + :annotation: = 2 + .. py:data:: SPY_STATUS_A2B_CONTROL - :annotation: = 524288 + :annotation: = 268435456 .. py:data:: SPY_STATUS_A2B_MONITOR :annotation: = 536870912 @@ -2691,7 +3584,7 @@ Module Variables :annotation: = 131072 .. py:data:: SPY_STATUS_EXTENDED - :annotation: = -2147483648 + :annotation: = 2147483648 .. py:data:: SPY_STATUS_FLEXRAY_PDU :annotation: = 268435456 @@ -2777,9 +3670,15 @@ Module Variables .. py:data:: SWCAN_SETTINGS_SIZE :annotation: = 14 + .. py:data:: TCP_SUPPORTED + :annotation: = 32 + .. py:data:: TIMESYNC_ICSHARDWARE_SETTINGS_SIZE :annotation: = 4 + .. py:data:: UART_DATA_BUFFER_SIZE + :annotation: = 256 + .. py:data:: UART_SETTINGS_SIZE :annotation: = 16 @@ -2792,5 +3691,23 @@ Module Variables .. py:data:: VNETBITS_FEATURE_DISABLE_USB_CHECK :annotation: = 2 + .. py:data:: WBMS_GATEWAY_NETWORK_DWCAN_01 + :annotation: = 1 + + .. py:data:: WBMS_GATEWAY_NETWORK_DWCAN_02 + :annotation: = 2 + + .. py:data:: WBMS_GATEWAY_NETWORK_NONE + :annotation: = 0 + + .. py:data:: WBMS_GATEWAY_NETWORK_UDP_MULTICAST + :annotation: = 3 + + .. py:data:: WIFI_ANTENNA_EXTERNAL + :annotation: = 1 + + .. py:data:: WIFI_ANTENNA_INTERNAL + :annotation: = 0 + .. py:data:: WIFI_CONNECTION :annotation: = 8 \ No newline at end of file diff --git a/docs/superpowers/plans/2026-07-07-header-3.26.3.9-epoch-versioning.md b/docs/superpowers/plans/2026-07-07-header-3.26.3.9-epoch-versioning.md new file mode 100644 index 000000000..f918c5269 --- /dev/null +++ b/docs/superpowers/plans/2026-07-07-header-3.26.3.9-epoch-versioning.md @@ -0,0 +1,426 @@ +# icsnVC40.h 3.26.3.9 Update + Epoch Versioning Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Update python_ics to the Vehicle Spy 3.26.3.9 headers and adopt PEP 440 epoch versioning (`1!26.3.9`) so pip orders new releases above the old 923.x scheme. + +**Architecture:** Headers are copied verbatim from `C:\dev\vspy3\Core\Hardware\`; all Python-visible constants and ctypes structs regenerate automatically during the build (setup.py runs `generate_icsneo40_structs.generate_all_files()` on import and `extract_icsneo40_defines.extract()` in build_py). Versions come from git tags via dunamai, which already parses epoch tags — the versioning change is a tagging convention plus documentation, zero code. + +**Tech Stack:** CPython 3.14.5 venv at `.venv`, uv, setuptools, clang/clang-format (required on PATH), pytest, MSVC. + +## Global Constraints + +- Branch: `feature/header-3.26.3.9` (already exists, based on master at d6e0abf which includes the PR #233 generator fixes). +- Build command: `uv pip install -e . --reinstall` from `C:\dev\python_ics`. If it fails with `could not delete 'gen\ics\ics.cp314-win_amd64.pyd': Access is denied`, delete that file first and retry (known transient lock). +- Test command: `.venv/Scripts/python -m pytest tests/ -v` — all tests must pass before every commit. +- Version scheme: PEP 440 epoch `1!26.3.9`; release tags are `v1!`. Never tag a bare `v26.x` — it sorts below 923.11. +- Tracked generated files that WILL change and MUST be committed with the header update: `src/setup_module_auto_defines.cpp`, `cicsSpyStatusBits_processed.h`. Untracked build artifacts that will also change (do NOT commit): `icsnVC40_processed.h`, `icsnVC40.h.json`, `icsnVC40.h.enums.json`, everything under `gen/`. +- Known-stale upstream macro (still wrong in 3.26.3.9, verified): `RAD_GPTP_AND_TAP_SETTINGS_SIZE` is 40 but the real struct is 56 bytes. It stays allowlisted in the size test; flag to the header owners separately. +- Scope exclusion: no new 3.26 DLL API bindings; header, regen, versioning, docs only. + +--- + +### Task 1: Struct-size regression test (baseline against current headers) + +**Files:** +- Test: `tests/test_struct_sizes.py` (create) + +**Interfaces:** +- Consumes: `ics` module `*_SIZE` constants (89 of them, e.g. `ics.SFire3Settings_SIZE == 1722`) and `ics.structures.*` generated ctypes classes. +- Produces: `tests/test_struct_sizes.py::test_generated_struct_sizes_match_header_macros` — Task 2 relies on this test staying green after regeneration. + +- [ ] **Step 1: Write the test** + +```python +"""Validate generated ctypes struct sizes against the header's *_SIZE macros. + +Every `#define _SIZE (N)` in icsnVC40.h is exported as a module +constant; the matching generated ctypes struct must have the same +ctypes.sizeof. Catches header/generator layout drift on header updates. +""" +import ctypes +import importlib +import inspect +import pkgutil + +import pytest +import ics +import ics.structures + +# Upstream header bugs: macro value disagrees with the actual struct. +# Keep entries here only with a comment explaining the discrepancy. +KNOWN_STALE_MACROS = { + # Upstream never updated the macro after the struct grew to 56 bytes + # (still 40 in vspy 3.26.3.9). Reported to header owners. + "RAD_GPTP_AND_TAP_SETTINGS_SIZE", +} + +# Macros whose name doesn't map to a generated struct class (nested/typedef +# variants). Count is asserted so silent growth gets investigated. +EXPECTED_UNMATCHED = 11 + + +def _struct_registry(): + registry = {} + for info in pkgutil.iter_modules(ics.structures.__path__): + mod = importlib.import_module(f"ics.structures.{info.name}") + for name, obj in inspect.getmembers(mod, inspect.isclass): + if ( + issubclass(obj, (ctypes.Structure, ctypes.Union)) + and obj.__module__ == mod.__name__ + ): + registry["".join(c for c in name.lower() if c.isalnum())] = obj + return registry + + +def test_generated_struct_sizes_match_header_macros(): + registry = _struct_registry() + mismatches = [] + unmatched = [] + matched = 0 + for macro in (n for n in dir(ics) if n.endswith("_SIZE")): + key = "".join(c for c in macro[:-5].lower() if c.isalnum()) + cls = registry.get(key) + if cls is None: + unmatched.append(macro) + continue + expected = getattr(ics, macro) + actual = ctypes.sizeof(cls) + if actual == expected: + matched += 1 + elif macro not in KNOWN_STALE_MACROS: + mismatches.append(f"{macro}: header says {expected}, ctypes says {actual}") + assert not mismatches, "\n".join(mismatches) + assert matched >= 77, f"only {matched} macros matched a struct; mapping regressed" + assert len(unmatched) <= EXPECTED_UNMATCHED, f"unmatched grew: {sorted(unmatched)}" +``` + +- [ ] **Step 2: Run the test, verify it passes against the current build** + +Run: `.venv/Scripts/python -m pytest tests/test_struct_sizes.py -v` +Expected: PASS (77+ matched, only the allowlisted macro mismatching, ≤11 unmatched). +If it fails, the current build is stale — rebuild (`uv pip install -e . --reinstall`) and rerun before proceeding. + +- [ ] **Step 3: Commit** + +```bash +git add tests/test_struct_sizes.py +git commit -m "Add struct-size regression test against header _SIZE macros + +Co-Authored-By: Claude Fable 5 " +``` + +--- + +### Task 2: Import 3.26.3.9 headers, fix renames, regenerate + +**Files:** +- Modify: `include/ics/icsnVC40.h` (replace, from `C:\dev\vspy3\Core\Hardware\icsnVC40.h`) +- Modify: `include/ics/cicsSpyStatusBits.h` (replace, from `C:\dev\vspy3\Core\Hardware\cicsSpyStatusBits.h`) +- Delete: `include/ics/icsnVC40.h.patch` +- Modify: `src/methods.cpp:675-741` (9 renamed `case NEODEVICE_*:` labels) +- Modify (regenerated by build, commit results): `src/setup_module_auto_defines.cpp`, `cicsSpyStatusBits_processed.h` +- Test: `tests/test_header_3_26.py` (create) + +**Interfaces:** +- Consumes: `tests/test_struct_sizes.py::test_generated_struct_sizes_match_header_macros` from Task 1. +- Produces: an `ics` module built from the 3.26.3.9 header — Tasks 3 and 4 build and verify against it. New constants of note: `NEODEVICE_BLUE_DEPRECATED` (0x1), `SRADGalaxy2Settings_SIZE == 1204`; removed names: `NEODEVICE_BLUE`, `NEODEVICE_FIRE`, `SRedSettings`/`SFireSettings` structs. + +- [ ] **Step 1: Write the failing header-version test** + +```python +"""Pins that the module is generated from the vspy 3.26.3.9 header.""" +import pytest +import ics + + +def test_deprecated_device_constants_renamed(): + # 3.26.3.9 renamed the legacy device defines; old names must be gone. + assert ics.NEODEVICE_BLUE_DEPRECATED == 0x00000001 + assert ics.NEODEVICE_FIRE_DEPRECATED == 0x00000008 + assert ics.NEODEVICE_VCAN3_DEPRECATED == 0x00000010 + assert not hasattr(ics, "NEODEVICE_BLUE") + assert not hasattr(ics, "NEODEVICE_FIRE") + assert not hasattr(ics, "NEODEVICE_VCAN3") + + +def test_grown_settings_structs(): + # Struct growth pinned from the 3.26.3.9 header's _SIZE macros. + assert ics.SRADGalaxy2Settings_SIZE == 1204 + assert ics.SRADComet3Settings_SIZE == 918 + assert ics.SRADGigastar2Settings_SIZE == 2400 + + +def test_legacy_settings_structs_removed(): + import ics.structures + with pytest.raises(ImportError): + from ics.structures import s_red_settings # noqa: F401 + + +if __name__ == "__main__": + pytest.main(args=[__file__, "--verbose", "-s"]) +``` + +Note: if the legacy struct module is named differently (check `gen/ics/structures/` for `s_red_settings.py` before the header swap), adjust the import in `test_legacy_settings_structs_removed` to the actual module name that exists pre-update. + +- [ ] **Step 2: Run it, verify it fails on the current build** + +Run: `.venv/Scripts/python -m pytest tests/test_header_3_26.py -v` +Expected: FAIL — `AttributeError: module 'ics' has no attribute 'NEODEVICE_BLUE_DEPRECATED'`. + +- [ ] **Step 3: Copy the new headers and drop the patch** + +```bash +cp C:/dev/vspy3/Core/Hardware/icsnVC40.h include/ics/icsnVC40.h +cp C:/dev/vspy3/Core/Hardware/cicsSpyStatusBits.h include/ics/cicsSpyStatusBits.h +git rm include/ics/icsnVC40.h.patch +``` + +Then sanity-review: `git diff --stat include/ics/` and skim `git diff include/ics/icsnVC40.h` for anything beyond the expected changes (deprecated renames, removed legacy settings structs, new RADComet3/RADGigastar2/CMP structures, `pack(4)` now around only the `icsDeviceStatus` union, grown structs). + +- [ ] **Step 4: Rename the 9 deprecated case labels in src/methods.cpp** + +In the legacy device-name fallback switch (only reached when `icsneoGetDeviceName` is unavailable in the DLL), apply exactly these renames — line numbers from the current file: + +| Line | Old | New | +|---|---|---| +| 675 | `case NEODEVICE_BLUE:` | `case NEODEVICE_BLUE_DEPRECATED:` | +| 677 | `case NEODEVICE_DW_VCAN:` | `case NEODEVICE_DW_VCAN_DEPRECATED:` | +| 683 | `case NEODEVICE_FIRE:` | `case NEODEVICE_FIRE_DEPRECATED:` | +| 693 | `case NEODEVICE_VCAN3:` | `case NEODEVICE_VCAN3_DEPRECATED:` | +| 731 | `case NEODEVICE_RED:` | `case NEODEVICE_RED_DEPRECATED:` | +| 733 | `case NEODEVICE_ECU:` | `case NEODEVICE_ECU_DEPRECATED:` | +| 735 | `case NEODEVICE_PENDANT:` | `case NEODEVICE_PENDANT_DEPRECATED:` | +| 739 | `case NEODEVICE_NEOANALOG:` | `case NEODEVICE_NEOANALOG_DEPRECATED:` | +| 741 | `case NEODEVICE_CT_OBD:` | `case NEODEVICE_CT_OBD_DEPRECATED:` | + +(`NEODEVICE_RED2` at line 703 is NOT renamed — only the nine above.) The returned display strings stay unchanged. + +- [ ] **Step 5: Rebuild (this regenerates all constants and structs)** + +Run: `uv pip install -e . --reinstall` +Expected: success. If the compiler flags any other renamed/removed identifier in `src/*.cpp`, fix it the same way (use the new header's name) and rerun. If the clang preprocess step in `extract_icsneo40_defines.extract()` errors on a new header construct, stop and investigate — do not hand-edit generated files. + +- [ ] **Step 6: Run the new test and the full suite** + +Run: `.venv/Scripts/python -m pytest tests/ -v` +Expected: ALL pass, including `test_header_3_26.py` (now green) and `test_struct_sizes.py` (any new mismatch beyond the allowlisted macro means a generator/layout bug — investigate before proceeding, do not extend the allowlist without a root cause). + +- [ ] **Step 7: Commit** + +```bash +git add include/ics/icsnVC40.h include/ics/cicsSpyStatusBits.h src/methods.cpp \ + src/setup_module_auto_defines.cpp cicsSpyStatusBits_processed.h \ + tests/test_header_3_26.py +git rm --cached include/ics/icsnVC40.h.patch 2>/dev/null || true +git commit -m "Update headers to Vehicle Spy 3.26.3.9 + +- icsnVC40.h / cicsSpyStatusBits.h copied verbatim from vspy3 Core/Hardware +- drop local icsnVC40.h.patch: upstream now carries its own pack(4) + around icsDeviceStatus, matching what the 3.26.3.9 DLL was built against +- legacy device constants renamed *_DEPRECATED upstream; legacy settings + structs removed (breaking; signaled by the 1!26.3.9 epoch release) +- regenerate module defines and processed headers + +Co-Authored-By: Claude Fable 5 " +``` + +--- + +### Task 3: Epoch versioning — README, release doc, dry run + +**Files:** +- Modify: `README.md` (add a Versioning section after the install instructions) +- No code changes (dunamai already parses `v1!26.3.9` → `1!26.3.9`; verified). + +**Interfaces:** +- Consumes: the built module from Task 2. +- Produces: documented tagging convention; a locally verified wheel proving pip resolves `1!26.3.9` over `923.11`. + +- [ ] **Step 1: Add the Versioning section to README.md** + +```markdown +## Versioning + +Starting with **1!26.3.9**, python_ics versions track the Vehicle Spy +version they were generated from (Vspy 3.26.3.9 → python_ics 26.3.9). + +The `1!` prefix is a [PEP 440 epoch](https://peps.python.org/pep-0440/#version-epochs). +Earlier releases used the icsneo40 DLL version (e.g. 923.11), which sorts +*above* 26.x, so the epoch tells pip the scheme changed: + +- `pip install python_ics` and `pip install -U python_ics` correctly + resolve `1!26.3.9` as newer than `923.11`. +- Exact pins must include the epoch: `python_ics==1!26.3.9`. +- Range pins work with or without it: `python_ics>=1!26.3` . + +**Release tagging:** tags are `v1!` (e.g. `v1!26.3.9`). Every +future tag keeps the `1!` prefix — a bare `v26.x` tag would sort below +the historical 923.x releases and pip would ignore it. +``` + +- [ ] **Step 2: Dry-run the epoch version end to end with a local tag** + +```bash +git tag -a "v1!26.3.9" -m "dry run" # local only, deleted below +.venv/Scripts/python -c "import dunamai; print(dunamai.Version.from_git().serialize(metadata=False))" +``` + +Expected output: `1!26.3.9`. + +```bash +uv build +ls dist/ +``` + +Expected: an sdist and wheel whose METADATA says `Version: 1!26.3.9` (verify: `unzip -p dist/*.whl */METADATA | grep ^Version`). The `!` may be encoded in the filename — the METADATA field is what matters. + +- [ ] **Step 3: Prove pip resolves the epoch version above 923.11** + +```bash +mkdir -p /tmp/links && cp dist/*.whl /tmp/links/ +.venv/Scripts/python -m pip download python_ics==923.11 --no-deps -d /tmp/links +.venv/Scripts/python -m pip install --dry-run --no-index --find-links /tmp/links -U python_ics +``` + +Expected: the dry-run resolves `python_ics 1!26.3.9` (not 923.11). + +- [ ] **Step 4: Clean up the dry-run tag and artifacts** + +```bash +git tag -d "v1!26.3.9" +rm -rf dist/ /tmp/links +``` + +The real `v1!26.3.9` tag is applied to the merge commit at release time, and the release workflow publishes from that tag. + +- [ ] **Step 5: Run full suite, commit** + +Run: `.venv/Scripts/python -m pytest tests/ -v` — all pass. + +```bash +git add README.md +git commit -m "Document 1!26.3.9 epoch versioning and tagging convention + +Co-Authored-By: Claude Fable 5 " +``` + +--- + +### Task 4: FIRE3 hardware verification + +**Files:** +- Create (scratchpad, not committed): `/verify_326_fire3.py` + +**Interfaces:** +- Consumes: the built module from Task 2; the FIRE3 on the bench (serial ON0569). +- Produces: verification results for the PR description (Task 5). No repo changes. + +- [ ] **Step 1: Write and run the verification script** + +```python +"""3.26.3.9 header hardware verification against the bench FIRE3.""" +import time + +import ics + +print("DLL/API info:") +try: + print(" dll version:", ics.get_dll_version()) +except Exception as ex: + print(" get_dll_version unavailable:", ex) + +devs = ics.find_devices([ics.NEODEVICE_FIRE3]) +assert devs, "No FIRE3 found" +dev = devs[0] +print("device:", dev, "serial:", dev.serial_number) + +ics.open_device(dev) +try: + print("get_serial_number:", ics.get_serial_number(dev)) + + # get_device_status failed with the old (patched) header; the matched + # 3.26.3.9 layout may fix it. Either outcome is recorded, not asserted. + try: + status = ics.get_device_status(dev) + print("get_device_status: OK,", type(status).__name__) + except Exception as ex: + print("get_device_status still failing:", ex) + + settings = ics.get_device_settings(dev) + f3 = settings.Settings.fire3 + orig_ne, orig_ne2 = f3.network_enables, f3.network_enables_2 + f3.network_enables = 0xFFFFFFFFFFFFFFFF + f3.network_enables_2 = 0xFFFFFFFFFFFFFFFF + ics.set_device_settings(dev, settings, 0) # RAM only, restored below + try: + netid = ics.NETID_ETHERNET2 + time.sleep(3) + ics.get_messages(dev) # flush + + msg = ics.SpyMessage() + msg.NetworkID = netid & 0xFF + msg.NetworkID2 = (netid >> 8) & 0xFF + msg.Protocol = ics.SPY_PROTOCOL_ETHERNET + payload = [0xFF] * 6 + [0x00, 0xFC, 0x70, 0x11, 0x22, 0x33, 0x08, 0x06] + list(range(50)) + msg.ExtraDataPtr = tuple(payload) + ics.transmit_messages(dev, msg) + time.sleep(1.0) + + msgs, errors = ics.get_messages(dev) + tx_ok = any( + (m.NetworkID | (m.NetworkID2 << 8)) == netid + and m.StatusBitField & ics.SPY_STATUS_TX_MSG + and tuple(m.ExtraDataPtr or ()) == tuple(payload) + for m in msgs + ) + print(f"{len(msgs)} messages, {errors} errors; ethernet tx roundtrip ok: {tx_ok}") + assert tx_ok, "no byte-exact TX report on NETID_ETHERNET2" + finally: + f3.network_enables, f3.network_enables_2 = orig_ne, orig_ne2 + ics.set_device_settings(dev, settings, 0) + print("settings restored (RAM only)") +finally: + ics.close_device(dev) +print("PASS") +``` + +Run: `.venv/Scripts/python /verify_326_fire3.py` +Expected: `PASS`, with the Ethernet tx roundtrip byte-exact. Record the `get_device_status` outcome either way. If `ics.get_dll_version` reports a driver older than 3.26.3.9, note that `get_device_status` verification is inconclusive rather than blocking. + +- [ ] **Step 2: Record results** + +Save the script output — it goes verbatim into the PR description in Task 5. No commit. + +--- + +### Task 5: Push and open the PR + +**Files:** none (git operations only). + +**Interfaces:** +- Consumes: all prior commits on `feature/header-3.26.3.9`; hardware results from Task 4. + +- [ ] **Step 1: Final full-suite run** + +Run: `.venv/Scripts/python -m pytest tests/ -v` +Expected: all tests pass. + +- [ ] **Step 2: Push and create the PR** + +```bash +git push -u origin feature/header-3.26.3.9 +gh pr create --title "Update headers to Vehicle Spy 3.26.3.9; adopt 1!26.3.9 epoch versioning" --body "" +``` + +PR body must include: summary of the header changes (deprecated renames, removed legacy structs, new/grown structs, patch drop rationale), the versioning migration explanation (epoch, tagging convention, pip resolution proof from Task 3 step 3), the Task 4 hardware verification output, and the breaking-change callout. End the body with: + +``` +🤖 Generated with [Claude Code](https://claude.com/claude-code) +``` + +- [ ] **Step 3: Post-merge release checklist (for the maintainer, in PR body)** + +- Merge the PR. +- Tag the merge commit: `git tag -a "v1!26.3.9" -m "Vehicle Spy 3.26.3.9" && git push origin "v1!26.3.9"`. +- Publish; verify PyPI shows `1!26.3.9` as latest. diff --git a/docs/superpowers/specs/2026-07-07-header-update-epoch-versioning-design.md b/docs/superpowers/specs/2026-07-07-header-update-epoch-versioning-design.md new file mode 100644 index 000000000..3240ddd4f --- /dev/null +++ b/docs/superpowers/specs/2026-07-07-header-update-epoch-versioning-design.md @@ -0,0 +1,92 @@ +# Design: icsnVC40.h 3.26.3.9 update + PEP 440 epoch versioning + +Date: 2026-07-07 +Status: approved + +## Problem + +1. python_ics headers are at the v923-era icsnVC40.h; Vehicle Spy 3.26.3.9 + (`C:\dev\vspy3\Core\Hardware\`) ships a newer header with renamed + deprecated devices, removed legacy settings structs, and new/grown + structures. +2. The project's versioning scheme changed from `923.11` (icsneo40 DLL + era) to `26.3.9` (Vspy-aligned). PEP 440 orders `923.11 > 26.3.9`, so a + plain `26.3.9` upload would never be selected by pip: fresh installs + would keep resolving 923.11 and existing users would never see + upgrades. Nothing 26.x has been published to PyPI (verified 2026-07-07; + latest is 923.11), so the fix can land before anything breaks. + +## Decisions (made with maintainer) + +- **Version scheme:** PEP 440 epoch — release as `1!26.3.9`. +- **Legacy names:** mirror the new header as-is; no Python-side compat + aliases for `NEODEVICE_BLUE`/`_FIRE`/`_VCAN3`/... (now `*_DEPRECATED`) + or the deleted `SRedSettings`/`SFireSettings`/... structs. The epoch + bump is the breaking-change signal; legacy-device users stay on 923.11. +- **Local header patch:** drop `include/ics/icsnVC40.h.patch`. Upstream + 3.26.3.9 carries its own `pack(4)` (around the `icsDeviceStatus` union + only). Matching the exact header the 3.26.3.9 icsneo40.dll was built + against is the ABI-safe choice. + +## 1. Versioning migration + +Versions come from git tags via dunamai (`ics_utility.get_pkg_version`). +dunamai's default tag pattern already parses epochs (verified: +`v1!26.3.9` → `1!26.3.9`), so no version-machinery code changes. + +- Tag releases `v1!`: first one is `v1!26.3.9`. +- Dry-run before tagging: build sdist+wheel locally, confirm wheel + filename and METADATA carry `1!26.3.9`, and confirm pip resolves the + local wheel as an upgrade over an installed 923.11. +- README: short section explaining the epoch — why `1!` exists, that + `pip install -U python_ics` moves 923.11 users to `1!26.3.9`, and that + exact pins must be `==1!26.3.9`. +- Release-process note: all future tags keep the `1!` prefix + (`v1!26.4.0`, ...). A bare `v26.4.0` tag would silently sort below + 923.11 again. +- No PyPI yanking required. + +## 2. Header import + +- Copy `C:\dev\vspy3\Core\Hardware\icsnVC40.h` and `cicsSpyStatusBits.h` + verbatim into `include/ics/`. +- Delete `include/ics/icsnVC40.h.patch`. +- Sanity-diff old vs new header; expected changes: deprecated renames, + legacy settings structs removed, RADComet3 / RADGigastar2 / CMP + structures added, grown structs (SRADGalaxy2Settings 960→1204, + SRADComet3Settings 918, SRADGigastar2Settings 2400). +- Verify `descIdType` is still `int16_t` (generator carries a hand-coded + override in generate_icsneo40_structs.py). + +## 3. Regeneration and build + +- Work off `master` (PR #233 is merged as d6e0abf) — its generator fixes + (unsigned 32-bit enum handling, descIdType) are prerequisites for a + clean regen. +- Rerun extract_icsneo40_defines.py / generate_icsneo40_structs.py + pipeline; regenerate setup_module_auto_defines.cpp and ctypes structs. +- Rebuild the extension; fix any C++ references to renamed NEODEVICE_* + constants surfaced by the compiler. +- Validate generated ctypes struct sizes against the header's `*_SIZE` + macros (same method as the June 2026 audit), with attention to the + grown/new structs. +- Out of scope: binding any new 3.26 DLL APIs. Header, regen, and + versioning only. + +## 4. Testing and hardware verification + +- Full pytest suite passes (26 tests; test_defines constants still exist + under the new header). +- FIRE3 bench: find/open, Ethernet tx/rx roundtrip (procedure from the + PR #233 verification), and get_device_status() — currently failing, + may be fixed by the matched header layout. Check the installed + icsneo40.dll version first; if older than 3.26.3.9, note the + limitation instead of blocking. + +## Risks + +- Extractor's clang preprocess step may trip on new header constructs — + caught at regen time. +- Bench DLL older than 3.26.3.9 leaves get_device_status unverified. +- Removed legacy names break old scripts by design; communicated via the + epoch bump and README note. diff --git a/examples/canfd_transmit_example.py b/examples/canfd_transmit_example.py index 2de778c08..3e211e980 100644 --- a/examples/canfd_transmit_example.py +++ b/examples/canfd_transmit_example.py @@ -1,4 +1,4 @@ -import ics +import ics if __name__ == "__main__": # Create a CAN Message like normal but set the StatusBitFields @@ -8,8 +8,8 @@ msg.Protocol = ics.SPY_PROTOCOL_CANFD msg.StatusBitField = ics.SPY_STATUS_CANFD msg.StatusBitField3 = ics.SPY_STATUS3_CANFD_BRS - msg.ExtraDataPtr = tuple([x for x in range(64)]) + msg.ExtraDataPtr = tuple([x for x in range(64)]) # Open Device and transmit the message device = ics.open_device() - ics.transmit_messages(device, msg) \ No newline at end of file + ics.transmit_messages(device, msg) diff --git a/examples/iso15765_example.py b/examples/iso15765_example.py index 631436d19..d1c12ed22 100644 --- a/examples/iso15765_example.py +++ b/examples/iso15765_example.py @@ -4,49 +4,51 @@ enable_print_message = False enable_use_server = True + # Helper Functions ########################################################## -def dev_name(device): - if int("AA0000", 36) < device.SerialNumber < int("ZZZZZZ", 36): - return device.Name + " " + ics.base36enc(device.SerialNumber) - else: - return device.Name + " " + str(device.SerialNumber) def print_message(msg): if not enable_print_message: if isinstance(msg, ics.SpyMessage): - print('\tArbID: {}\tData: {}'.format(hex(msg.ArbIDOrHeader), [hex(x) for x in msg.Data])) + print("\tArbID: {}\tData: {}".format(hex(msg.ArbIDOrHeader), [hex(x) for x in msg.Data])) return - print('\t' + str(type(msg))) + print("\t" + str(type(msg))) for attribute in dir(msg): if attribute.startswith("_"): continue length = len(attribute) - if attribute == 'data': - print("\t\t{}:{}{}".format(attribute, " "*(30-length), msg.data[:msg.num_bytes])) + if attribute == "data": + print("\t\t{}:{}{}".format(attribute, " " * (30 - length), msg.data[: msg.num_bytes])) else: value = getattr(msg, attribute) try: value = hex(value) except: pass - print("\t\t{}:{}{}".format(attribute, " "*(30-length), value)) + print("\t\t{}:{}{}".format(attribute, " " * (30 - length), value)) print() + def open_device(index=0): device = None if enable_use_server: # ics.open_device() won't open a device if we have handles open already # so we need to find them and specify which ones to connect to. devices = ics.find_devices() - print("Opening Device {} (Open Client handles: {})...".format(dev_name(devices[index]), devices[index].NumberOfClients)) + print( + "Opening Device {} (Open Client handles: {})...".format( + devices[index], devices[index].NumberOfClients + ) + ) ics.open_device(devices[index]) device = devices[index] else: print("Opening Device...") device = ics.open_device() - print("Opened Device %s." % dev_name(device)) + print(f"Opened Device {device}.") return device + # Iso15765 Fuctions ######################################################### def transmit_iso15765_msg(device, netid=ics.NETID_HSCAN, is_canfd=False): number_of_bytes = 64 @@ -59,8 +61,8 @@ def transmit_iso15765_msg(device, netid=ics.NETID_HSCAN, is_canfd=False): msg.fc_id = 0x7E8 msg.fc_id_mask = 0xFFF msg.flowControlExtendedAddress = 0xFE - msg.fs_timeout = 0x10 # ms - msg.fs_wait = 0x3000 # ms + msg.fs_timeout = 0x10 # ms + msg.fs_wait = 0x3000 # ms msg.blockSize = 0 msg.stMin = 0 # paddingEnable @@ -73,15 +75,16 @@ def transmit_iso15765_msg(device, netid=ics.NETID_HSCAN, is_canfd=False): msg.tx_dl = 1 # Data my_data = [x for x in range(number_of_bytes)] - msg.data = (ctypes.c_ubyte*len(msg.data))(*my_data) + msg.data = (ctypes.c_ubyte * len(msg.data))(*my_data) # Transmit the message - print("Transmitting iso15765 message on {}...".format(dev_name(device))) + print("Transmitting iso15765 message on {}...".format(device)) ics.iso15765_transmit_message(device, netid, msg, 3000) # Wait for the messages to be transmitted, this can be calculated a lot better but works here. - time.sleep((((number_of_bytes/8)*msg.fs_timeout)/1000.0)+0.5) - #print_message(msg) - print("Transmitted iso15765 message on {}.".format(dev_name(device))) + time.sleep((((number_of_bytes / 8) * msg.fs_timeout) / 1000.0) + 0.5) + # print_message(msg) + print("Transmitted iso15765 message on {}.".format(device)) + def setup_rx_iso15765_msg(device, netid=ics.NETID_HSCAN, is_canfd=False): msg = ics.st_cm_iso157652_rx_message.st_cm_iso157652_rx_message() @@ -106,27 +109,29 @@ def setup_rx_iso15765_msg(device, netid=ics.NETID_HSCAN, is_canfd=False): print("Setting up iso15765 message on {}...".format(dev_name(device))) ics.iso15765_receive_message(device, netid, msg) print("Setup iso15765 message on {}.".format(dev_name(device))) - + def get_iso15765_msgs(device): msgs, error_count = ics.get_messages(device) print("Received {} messages with {} errors.".format(len(msgs), error_count)) for i, m in enumerate(msgs): - print('Message #{}\t'.format(i+1), end='') + print("Message #{}\t".format(i + 1), end="") print_message(m) - + + if __name__ == "__main__": import time + netid = ics.NETID_HSCAN - + tx_device = open_device(0) rx_device = open_device(1) - + ics.iso15765_enable_networks(tx_device, netid) ics.iso15765_enable_networks(rx_device, netid) setup_rx_iso15765_msg(rx_device) transmit_iso15765_msg(tx_device) get_iso15765_msgs(rx_device) - + ics.iso15765_disable_networks(tx_device) ics.iso15765_disable_networks(rx_device) diff --git a/examples/lin22.ldf b/examples/lin22.ldf new file mode 100644 index 000000000..befbda55d --- /dev/null +++ b/examples/lin22.ldf @@ -0,0 +1,140 @@ +/*******************************************************/ +/* This is the example LDF from LIN 2.2A specification */ +/*******************************************************/ + +// Source: https://lin-cia.org/fileadmin/microsites/lin-cia.org/resources/documents/LIN_2.2A.pdf + +LIN_description_file; +LIN_protocol_version = "2.2"; +LIN_language_version = "2.2"; +LIN_speed = 19.2 kbps; +Channel_name = "DB"; + +Nodes { + Master: CEM, 5 ms, 0.1 ms; + Slaves: LSM, RSM; +} + +Signals { + InternalLightsRequest: 2, 0, CEM, LSM, RSM; + RightIntLightsSwitch: 8, 0, RSM, CEM; + LeftIntLightsSwitch: 8, 0, LSM, CEM; + LSMerror: 1, 0, LSM, CEM; + RSMerror: 1, 0, RSM, CEM; + IntTest: 2, 0, LSM, CEM; +} + +Frames { + CEM_Frm1: 0x01, CEM, 1 { + InternalLightsRequest, 0; + } + LSM_Frm1: 0x02, LSM, 2 { + LeftIntLightsSwitch, 8; + } + LSM_Frm2: 0x03, LSM, 1 { + LSMerror, 0; + IntTest, 1; + } + RSM_Frm1: 0x04, RSM, 2 { + RightIntLightsSwitch, 8; + } + RSM_Frm2: 0x05, RSM, 1 { + RSMerror, 0; + } +} + +Event_triggered_frames { + Node_Status_Event : Collision_resolver, 0x06, RSM_Frm1, LSM_Frm1; +} + +Node_attributes { + RSM { + LIN_protocol = "2.0"; + configured_NAD = 0x20; + product_id = 0x4E4E, 0x4553, 1; + response_error = RSMerror; + P2_min = 150 ms; + ST_min = 50 ms; + configurable_frames { + Node_Status_Event=0x000; CEM_Frm1 = 0x0001; RSM_Frm1 = 0x0002; + RSM_Frm2 = 0x0003; + } + } + LSM { + LIN_protocol = "2.2"; + configured_NAD = 0x21; + initial_NAD = 0x01; + product_id = 0x4A4F, 0x4841; + response_error = LSMerror; + fault_state_signals = IntTest; + P2_min = 150 ms; + ST_min = 50 ms; + configurable_frames { + Node_Status_Event; + CEM_Frm1; + LSM_Frm1; + LSM_Frm2; + } + } +} + +Schedule_tables { + Configuration_Schedule { + AssignNAD {LSM} delay 15 ms; + AssignFrameIdRange {LSM, 0} delay 15 ms; + AssignFrameId {RSM, CEM_Frm1} delay 15 ms; + AssignFrameId {RSM, RSM_Frm1} delay 15 ms; + AssignFrameId {RSM, RSM_Frm2} delay 15 ms; + } + Normal_Schedule { + CEM_Frm1 delay 15 ms; + LSM_Frm2 delay 15 ms; + RSM_Frm2 delay 15 ms; + Node_Status_Event delay 10 ms; + } + MRF_schedule { + MasterReq delay 10 ms; + } + SRF_schedule { + SlaveResp delay 10 ms; + } + Collision_resolver { // Keep timing of other frames if collision + CEM_Frm1 delay 15 ms; + LSM_Frm2 delay 15 ms; + RSM_Frm2 delay 15 ms; + RSM_Frm1 delay 10 ms; // Poll the RSM node + CEM_Frm1 delay 15 ms; + LSM_Frm2 delay 15 ms; + RSM_Frm2 delay 15 ms; + LSM_Frm1 delay 10 ms; // Poll the LSM node + } +} + +Signal_encoding_types { + Dig2Bit { + logical_value, 0, "off"; + logical_value, 1, "on"; + logical_value, 2, "error"; + logical_value, 3, "void"; + } + ErrorEncoding { + logical_value, 0, "OK"; + logical_value, 1, "error"; + } + FaultStateEncoding { + logical_value, 0, "No test result"; + logical_value, 1, "failed"; + logical_value, 2, "passed"; + logical_value, 3, "not used"; + } + LightEncoding { + logical_value, 0, "Off"; + physical_value, 1, 254, 1, 100, "lux"; + logical_value, 255, "error"; + } +} +Signal_representation { + Dig2Bit: InternalLightsRequest; + ErrorEncoding: RSMerror, LSMerror; + LightEncoding: RightIntLightsSwitch, LeftIntLightsSwitch; +} \ No newline at end of file diff --git a/examples/lin_settings_example.py b/examples/lin_settings_example.py new file mode 100644 index 000000000..1e0df8154 --- /dev/null +++ b/examples/lin_settings_example.py @@ -0,0 +1,88 @@ +import ics +from ics.structures.s_device_settings import s_device_settings +from ics.structures.e_device_settings_type import e_device_settings_type + + +def get_device_specific_settings(s: s_device_settings) -> object: + """ + Returns the device specific setting structure for our device in question + """ + setting_map = {} + # We need to map the Union type to the DeviceSettingType + setting_map[e_device_settings_type.DeviceCANHUBSettingsType] = "canhub" + setting_map[e_device_settings_type.DeviceCMProbeSettingsType] = "cmprobe" + setting_map[e_device_settings_type.DeviceECU_AVBSettingsType] = "neoecu_avb" + setting_map[e_device_settings_type.DeviceEEVBSettingsType] = "eevb" + setting_map[e_device_settings_type.DeviceFire2SettingsType] = "cyan" + setting_map[e_device_settings_type.DeviceFireSettingsType] = "fire" + setting_map[e_device_settings_type.DeviceFireVnetSettingsType] = "firevnet" + setting_map[e_device_settings_type.DeviceFlexVnetzSettingsType] = "flexvnetz" + setting_map[e_device_settings_type.DeviceIEVBSettingsType] = "ievb" + setting_map[e_device_settings_type.DeviceNeoECU12SettingsType] = "neoecu12" + setting_map[e_device_settings_type.DeviceOBD2ProSettingsType] = "obd2pro" + setting_map[e_device_settings_type.DeviceRADGalaxySettingsType] = "radgalaxy" + setting_map[e_device_settings_type.DeviceRADGigalogSettingsType] = "radgigalog" + setting_map[e_device_settings_type.DeviceRADGigastarSettingsType] = "radgigastar" + setting_map[e_device_settings_type.DeviceRADMoon2SettingsType] = "radmoon2" + setting_map[e_device_settings_type.DeviceRADPlutoSettingsType] = "pluto" + setting_map[e_device_settings_type.DeviceRADStar2SettingsType] = "radstar2" + setting_map[e_device_settings_type.DeviceRADSuperMoonSettingsType] = "radsupermoon" + setting_map[e_device_settings_type.DeviceRADMoon2SettingsType] = "radmoon2" + setting_map[e_device_settings_type.DeviceRedSettingsType] = "red" + setting_map[e_device_settings_type.DeviceVCAN3SettingsType] = "vcan3" + setting_map[e_device_settings_type.DeviceVCAN412SettingsType] = "vcan412" + setting_map[e_device_settings_type.DeviceVCAN4IndSettingsType] = "vcan4_ind" + setting_map[e_device_settings_type.DeviceVCAN4SettingsType] = "vcan4" + setting_map[e_device_settings_type.DeviceVCANRFSettingsType] = "vcanrf" + setting_map[e_device_settings_type.DeviceVividCANSettingsType] = "vividcan" + setting_map[e_device_settings_type.DeviceRADJupiterSettingsType] = "jupiter" + setting_map[e_device_settings_type.DeviceFire3SettingsType] = "fire3" + setting_map[e_device_settings_type.DeviceFire3FlexraySettingsType] = "fire3Flexray" + setting_map[e_device_settings_type.DeviceRed2SettingsType] = "red2" + setting_map[e_device_settings_type.DeviceRADA2BSettingsType] = "rad_a2b" + setting_map[e_device_settings_type.DeviceOBD2LCSettingsType] = "obd2lc" + + if s.DeviceSettingType not in setting_map: + raise KeyError(f"Error: {s.DeviceSettingType} is not a known type in setting_map") + return getattr(s.Settings, setting_map[s.DeviceSettingType]) + + +def print_settings(device_specific_settings): + if hasattr(device_specific_settings, "lin1"): + print(f"LIN 1 Baudrate: {settings.Settings.fire3.lin1.Baudrate}") + print(f"LIN 1 Master resistor: {device_specific_settings.lin1.MasterResistor}") + else: + print("This device doesn't have a lin1 structure!") + + +if __name__ == "__main__": + try: + # Open the first device + device = ics.open_device() + print(f"Opened Device {device} (Open Client handles: {device.NumberOfClients})...") + except ics.RuntimeError as ex: + print(f"Failed to open first device: {ex}") + exit(1) + + print("Loading default settings...") + ics.load_default_settings(device) + + print("Reading settings...") + settings = ics.get_device_settings(device) + device_specific_settings = get_device_specific_settings(settings) + print_settings(device_specific_settings) + + print("Writing settings...") + device_specific_settings = get_device_specific_settings(settings) + if hasattr(device_specific_settings, "lin1"): + device_specific_settings.lin1.Baudrate = 19200 + device_specific_settings.lin1.MasterResistor = 0 + else: + print("This device doesn't have a lin1 structure to change!") + ics.set_device_settings(device, settings) + print_settings(device_specific_settings) + + print("Reading settings...") + settings = ics.get_device_settings(device) + device_specific_settings = get_device_specific_settings(settings) + print_settings(device_specific_settings) diff --git a/examples/open_device_example.py b/examples/open_device_example.py index 95728c3c2..5dc9eb38d 100644 --- a/examples/open_device_example.py +++ b/examples/open_device_example.py @@ -4,29 +4,27 @@ # with neoVI Server enabled so we can successfully open devices enable_use_server = True -def dev_name(device): - # Return a friendly name of the device (ie. neoVI FIRE2 CY1234) - if int("AA0000", 36) <= device.SerialNumber <= int("ZZZZZZ", 36): - return device.Name + " " + ics.base36enc(device.SerialNumber) - else: - return device.Name + " " + str(device.SerialNumber) - + def open_device(index=0): device = None if enable_use_server: # ics.open_device() won't open a device if we have handles open already # so we need to find them and specify which ones to connect to. devices = ics.find_devices() - print("Opening Device {} (Open Client handles: {})...".format(dev_name(devices[index]), devices[index].NumberOfClients)) + print( + "Opening Device {} (Open Client handles: {})...".format( + devices[index], devices[index].NumberOfClients + ) + ) ics.open_device(devices[index]) device = devices[index] else: print("Opening Device...") device = ics.open_device() - print("Opened Device %s." % dev_name(device)) + print("Opened Device %s." % device) return device - - + + if __name__ == "__main__": # Lets figure out how many are connected to the PC and display it connected_count = len(ics.find_devices()) @@ -37,4 +35,4 @@ def open_device(index=0): # the device will automatically close here # because the device object is going out of # scope. - print("Finished.") \ No newline at end of file + print("Finished.") diff --git a/examples/transmit_can_example.py b/examples/transmit_can_example.py index 4ce1ad460..93ae715e1 100644 --- a/examples/transmit_can_example.py +++ b/examples/transmit_can_example.py @@ -4,55 +4,56 @@ # with neoVI Server enabled so we can successfully open devices enable_use_server = True -def dev_name(device): - # Return a friendly name of the device (ie. neoVI FIRE2 CY1234) - if int("AA0000", 36) <= device.SerialNumber <= int("ZZZZZZ", 36): - return device.Name + " " + ics.base36enc(device.SerialNumber) - else: - return device.Name + " " + str(device.SerialNumber) - + def open_device(index=0): device = None if enable_use_server: # ics.open_device() won't open a device if we have handles open already # so we need to find them and specify which ones to connect to. devices = ics.find_devices() - print("Opening Device {} (Open Client handles: {})...".format(dev_name(devices[index]), devices[index].NumberOfClients)) + print( + "Opening Device {} (Open Client handles: {})...".format( + devices[index], devices[index].NumberOfClients + ) + ) ics.open_device(devices[index]) device = devices[index] else: print("Opening Device...") device = ics.open_device() - print("Opened Device %s." % dev_name(device)) + print("Opened Device %s." % device) return device - + + def transmit_can(device): msg = ics.SpyMessage() - msg.ArbIDOrHeader = 0x01 # CAN Arbitration ID - msg.Data = (1,2,3,4,5,6,7,8) # Data Bytes go here - msg.NetworkID = ics.NETID_HSCAN # First channel of CAN on the device - + msg.ArbIDOrHeader = 0x01 # CAN Arbitration ID + msg.Data = (1, 2, 3, 4, 5, 6, 7, 8) # Data Bytes go here + msg.NetworkID = ics.NETID_HSCAN # First channel of CAN on the device + # msg parameter here can also be a tuple of messages ics.transmit_messages(device, msg) + def receive_can(device): msgs, error_count = ics.get_messages(device) print("Received {} messages with {} errors.".format(len(msgs), error_count)) for i, m in enumerate(msgs): - print('Message #{}\t'.format(i+1), end='') - print('\tArbID: {}\tData: {}'.format(hex(m.ArbIDOrHeader), [hex(x) for x in m.Data])) - - + print("Message #{}\t".format(i + 1), end="") + print("\tArbID: {}\tData: {}".format(hex(m.ArbIDOrHeader), [hex(x) for x in m.Data])) + + if __name__ == "__main__": import time + # Lets figure out how many are connected to the PC and display it connected_count = len(ics.find_devices()) print("Found {} connected device(s)...".format(connected_count)) - + tx_dev = open_device(0) rx_dev = open_device(1) - + transmit_can(tx_dev) receive_can(rx_dev) - + print("Finished.") diff --git a/examples/transmit_can_xtd_example.py b/examples/transmit_can_xtd_example.py index ea3b217cc..4d2e5acbf 100644 --- a/examples/transmit_can_xtd_example.py +++ b/examples/transmit_can_xtd_example.py @@ -4,20 +4,26 @@ # with neoVI Server enabled so we can successfully open devices enable_use_server = True + def dev_name(device): # Return a friendly name of the device (ie. neoVI FIRE2 CY1234) - if int("AA0000", 36) <= device.SerialNumber <= int("ZZZZZZ", 36): + if int("0A0000", 36) <= device.SerialNumber <= int("ZZZZZZ", 36): return device.Name + " " + ics.base36enc(device.SerialNumber) else: return device.Name + " " + str(device.SerialNumber) - + + def open_device(index=0): device = None if enable_use_server: # ics.open_device() won't open a device if we have handles open already # so we need to find them and specify which ones to connect to. devices = ics.find_devices() - print("Opening Device {} (Open Client handles: {})...".format(dev_name(devices[index]), devices[index].NumberOfClients)) + print( + "Opening Device {} (Open Client handles: {})...".format( + dev_name(devices[index]), devices[index].NumberOfClients + ) + ) ics.open_device(devices[index]) device = devices[index] else: @@ -25,38 +31,41 @@ def open_device(index=0): device = ics.open_device() print("Opened Device %s." % dev_name(device)) return device - + + def transmit_can(device): msg = ics.SpyMessage() - msg.ArbIDOrHeader = 0xFFFFFF # CAN Arbitration ID - msg.Data = (1,2,3,4,5,6,7,8) # Data Bytes go here - msg.NetworkID = ics.NETID_HSCAN # First channel of CAN on the device + msg.ArbIDOrHeader = 0xFFFFFF # CAN Arbitration ID + msg.Data = (1, 2, 3, 4, 5, 6, 7, 8) # Data Bytes go here + msg.NetworkID = ics.NETID_HSCAN # First channel of CAN on the device msg.NumberBytesHeader = 4 msg.StatusBitField = ics.SPY_STATUS_XTD_FRAME - + # msg parameter here can also be a tuple of messages ics.transmit_messages(device, msg) + def receive_can(device): msgs, error_count = ics.get_messages(device) print("Received {} messages with {} errors.".format(len(msgs), error_count)) for i, m in enumerate(msgs): if m.NetworkID != ics.NETID_HSCAN: continue - print('Message #{}\t'.format(i+1), end='') - print('\tArbID: {}\tData: {}'.format(hex(m.ArbIDOrHeader), [hex(x) for x in m.Data])) - - + print("Message #{}\t".format(i + 1), end="") + print("\tArbID: {}\tData: {}".format(hex(m.ArbIDOrHeader), [hex(x) for x in m.Data])) + + if __name__ == "__main__": import time + # Lets figure out how many are connected to the PC and display it connected_count = len(ics.find_devices()) print("Found {} connected device(s)...".format(connected_count)) - + tx_dev = open_device(0) rx_dev = open_device(1) - + transmit_can(tx_dev) receive_can(rx_dev) - + print("Finished.") diff --git a/examples/transmit_canfd_example.py b/examples/transmit_canfd_example.py index 3c1b56fb0..da7fdc8d1 100644 --- a/examples/transmit_canfd_example.py +++ b/examples/transmit_canfd_example.py @@ -1,5 +1,6 @@ import ics import time + # Tells our custom open_device() function to do special behavior # with neoVI Server enabled so we can successfully open devices enable_use_server = True @@ -7,6 +8,7 @@ DATA_BYTES = tuple([x for x in range(64)]) + def are_errors_present(msg): """Helper function to detect if a message error occurred.""" error_flags = 0 @@ -35,28 +37,23 @@ def are_errors_present(msg): return False -def dev_name(device): - # Return a friendly name of the device (ie. neoVI FIRE2 CY1234) - if int("A00000", 36) <= device.SerialNumber <= int("ZZZZZZ", 36): - return device.Name + " " + ics.base36enc(device.SerialNumber) - else: - return device.Name + " " + str(device.SerialNumber) - - def open_device(index=0): device = None if enable_use_server: # ics.open_device() won't open a device if we have handles open already # so we need to find them and specify which ones to connect to. devices = ics.find_devices() - print("Opening Device {} (Open Client handles: {})...".format( - dev_name(devices[index]), devices[index].NumberOfClients)) + print( + "Opening Device {} (Open Client handles: {})...".format( + devices[index], devices[index].NumberOfClients + ) + ) ics.open_device(devices[index]) device = devices[index] else: print("Opening Device...") device = ics.open_device() - print("Opened Device %s." % dev_name(device)) + print("Opened Device %s." % device) return device @@ -73,38 +70,43 @@ def transmit_can(device): _, _ = ics.get_messages(device) # msg parameter here can also be a tuple of messages ics.transmit_messages(device, msg) - # Give the bus and buffers time to do their magic. + # Give the bus and buffers time to do their magic. # In a real application we should poll until we find our actual message. time.sleep(0.5) # get all the messages on this device and print out the transmitted messages - print("="*80) - print(f"Transmitted Messages on {dev_name(device)}") - print("="*80) + print("=" * 80) + print(f"Transmitted Messages on {device}") + print("=" * 80) msgs, error_count = ics.get_messages(device) for i, m in enumerate(msgs): # Only process transmitted messages if m.StatusBitField & ics.SPY_STATUS_TX_MSG == ics.SPY_STATUS_TX_MSG: - print('Message #{}\t'.format(i+1), end='') + print("Message #{}\t".format(i + 1), end="") data = m.Data if not m.ExtraDataPtr else m.ExtraDataPtr netid = m.NetworkID | (m.NetworkID2 << 8) - print('NetID: {}\tArbID: {}\tData: {}\tErrors Present: {}'.format(hex(netid), hex(m.ArbIDOrHeader), [hex(x) for x in data], are_errors_present(m))) + print( + "NetID: {}\tArbID: {}\tData: {}\tErrors Present: {}".format( + hex(netid), hex(m.ArbIDOrHeader), [hex(x) for x in data], are_errors_present(m) + ) + ) + def receive_can(device): msgs, error_count = ics.get_messages(device) - print("="*80) - print(f"Received Messages on {dev_name(device)}") - print("="*80) + print("=" * 80) + print(f"Received Messages on {device}") + print("=" * 80) print("Received {} messages with {} errors.".format(len(msgs), error_count)) for i, m in enumerate(msgs): # Ignore transmitted messages if m.StatusBitField & ics.SPY_STATUS_TX_MSG == ics.SPY_STATUS_TX_MSG: continue - #if m.Protocol != ics.SPY_PROTOCOL_CANFD: + # if m.Protocol != ics.SPY_PROTOCOL_CANFD: # continue - print('Message #{}\t'.format(i+1), end='') + print("Message #{}\t".format(i + 1), end="") data = m.Data if not m.ExtraDataPtr else m.ExtraDataPtr netid = m.NetworkID | (m.NetworkID2 << 8) - print('NetID: {}\tArbID: {}\tData: {}'.format(hex(netid), hex(m.ArbIDOrHeader), [hex(x) for x in data])) + print("NetID: {}\tArbID: {}\tData: {}".format(hex(netid), hex(m.ArbIDOrHeader), [hex(x) for x in data])) if __name__ == "__main__": diff --git a/examples/transmit_ethernet_example.py b/examples/transmit_ethernet_example.py index f60eaa22f..b0c7bb79d 100644 --- a/examples/transmit_ethernet_example.py +++ b/examples/transmit_ethernet_example.py @@ -1,5 +1,6 @@ import ics import time + # Tells our custom open_device() function to do special behavior # with neoVI Server enabled so we can successfully open devices enable_use_server = True @@ -7,6 +8,7 @@ DATA_BYTES = tuple([x for x in range(64)]) + def are_errors_present(msg): """Helper function to detect if a message error occurred.""" error_flags = 0 @@ -35,28 +37,23 @@ def are_errors_present(msg): return False -def dev_name(device): - # Return a friendly name of the device (ie. neoVI FIRE2 CY1234) - if int("A00000", 36) <= device.SerialNumber <= int("ZZZZZZ", 36): - return device.Name + " " + ics.base36enc(device.SerialNumber) - else: - return device.Name + " " + str(device.SerialNumber) - - def open_device(index=0): device = None if enable_use_server: # ics.open_device() won't open a device if we have handles open already # so we need to find them and specify which ones to connect to. devices = ics.find_devices() - print("Opening Device {} (Open Client handles: {})...".format( - dev_name(devices[index]), devices[index].NumberOfClients)) + print( + "Opening Device {} (Open Client handles: {})...".format( + devices[index], devices[index].NumberOfClients + ) + ) ics.open_device(devices[index]) device = devices[index] else: print("Opening Device...") device = ics.open_device() - print("Opened Device %s." % dev_name(device)) + print("Opened Device %s." % device) return device @@ -71,8 +68,24 @@ def transmit_ethernet(device): # use ARP packet # Gigalog requires this for Ethernet 10G to be detected in Vspy (0x08, 0x06) # Last two bytes are the network id - data = [0x00, 0xFC, 0x70, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0x08, 0x06, netid & 0xFF, (netid >> 8) & 0xFF] + data = [ + 0x00, + 0xFC, + 0x70, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0xFF, + 0x08, + 0x06, + netid & 0xFF, + (netid >> 8) & 0xFF, + ] # Append 62 random bytes on the end. data += [x for x in range(62)] msg.ExtraDataPtr = tuple(data) @@ -82,36 +95,41 @@ def transmit_ethernet(device): _, _ = ics.get_messages(device) # msg parameter here can also be a tuple of messages ics.transmit_messages(device, msg) - # Give the bus and buffers time to do their magic. + # Give the bus and buffers time to do their magic. # In a real application we should poll until we find our actual message. time.sleep(0.5) # get all the messages on this device and print out the transmitted messages - print("="*80) - print(f"Transmitted Messages on {dev_name(device)}") - print("="*80) + print("=" * 80) + print(f"Transmitted Messages on {device}") + print("=" * 80) msgs, error_count = ics.get_messages(device) for i, m in enumerate(msgs): # Only process transmitted messages if m.StatusBitField & ics.SPY_STATUS_TX_MSG == ics.SPY_STATUS_TX_MSG: - print('Message #{}\t'.format(i+1), end='') + print("Message #{}\t".format(i + 1), end="") data = m.Data if not m.ExtraDataPtr else m.ExtraDataPtr netid = m.NetworkID | (m.NetworkID2 << 8) - print('NetID: {}\tArbID: {}\tData: {}\tErrors Present: {}'.format(hex(netid), hex(m.ArbIDOrHeader), [hex(x) for x in data], are_errors_present(m))) + print( + "NetID: {}\tArbID: {}\tData: {}\tErrors Present: {}".format( + hex(netid), hex(m.ArbIDOrHeader), [hex(x) for x in data], are_errors_present(m) + ) + ) + def receive_ethernet(device): msgs, error_count = ics.get_messages(device) - print("="*80) - print(f"Received Messages on {dev_name(device)}") - print("="*80) + print("=" * 80) + print(f"Received Messages on {device}") + print("=" * 80) print("Received {} messages with {} errors.".format(len(msgs), error_count)) for i, m in enumerate(msgs): # Ignore transmitted messages if m.StatusBitField & ics.SPY_STATUS_TX_MSG == ics.SPY_STATUS_TX_MSG: continue - print('Message #{}\t'.format(i+1), end='') + print("Message #{}\t".format(i + 1), end="") data = m.Data if not m.ExtraDataPtr else m.ExtraDataPtr netid = m.NetworkID | (m.NetworkID2 << 8) - print('NetID: {}\tArbID: {}\tData: {}'.format(hex(netid), hex(m.ArbIDOrHeader), [hex(x) for x in data])) + print("NetID: {}\tArbID: {}\tData: {}".format(hex(netid), hex(m.ArbIDOrHeader), [hex(x) for x in data])) if __name__ == "__main__": diff --git a/examples/transmit_lin_example.py b/examples/transmit_lin_example.py new file mode 100755 index 000000000..441cba8d0 --- /dev/null +++ b/examples/transmit_lin_example.py @@ -0,0 +1,92 @@ +import ics +import random +import time + +# Tells our custom open_device() function to do special behavior +# with neoVI Server enabled so we can successfully open devices +enable_use_server = True + +def open_device(index=0): + device = None + if enable_use_server: + # ics.open_device() won't open a device if we have handles open already + # so we need to find them and specify which ones to connect to. + devices = ics.find_devices() + print( + "Opening Device {} (Open Client handles: {})...".format( + devices[index], devices[index].NumberOfClients + ) + ) + ics.open_device(devices[index]) + device = devices[index] + else: + print("Opening Device...") + device = ics.open_device() + print("Opened Device %s." % device) + return device + + +def calc_checksum(msg): + checksum = 0 + for byte in msg.Header[1:] + msg.Data: + checksum += byte + if checksum > 255: + checksum -= 255 + msg.Data += tuple([~checksum & 0xFF]) + + +def transmit_lin(msg): + calc_checksum(msg) + msg.NumberBytesHeader = len(msg.Header) + msg.NumberBytesData = len(msg.Data) + try: + ics.transmit_messages(device, msg) + except ics.RuntimeError as ex: + print(ex) + raise ex + + +def prepare_message(device): + msg = ics.SpyMessageJ1850() + msg.StatusBitField = ics.SPY_STATUS_INIT_MESSAGE + msg.Protocol = ics.SPY_PROTOCOL_LIN + msg.NetworkID = ics.NETID_LIN + msg.Header = (0x11, 0x11, 0x22) + msg.Data = (0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x88) + transmit_lin(msg) + + +def receive_lin(device): + msgs, error_count = ics.get_messages(device) + print("Received {} messages with {} errors.".format(len(msgs), error_count)) + netids = {ics.NETID_LIN: "LIN 1", ics.NETID_LIN2: "LIN 2"} + for i, m in enumerate(msgs): + print("\nMessage #{}: ".format(i + 1), end="") + netid = netids.get(m.NetworkID) + if netid is not None: + print("{}".format(netid), end="") + if m.StatusBitField & ics.SPY_STATUS_INIT_MESSAGE: + print(" | Init", end="") + data_list = [] + for x in m.Header[1:]: + data_list.append(x) + for y in m.Data: + data_list.append(y) + print("\nID: {} | ".format(hex(m.Header[0])), end="") + if len(data_list): + checksum = data_list.pop() + print("Data: {} | ".format([hex(x) for x in data_list]), end="") + print("Checksum: {}".format(hex(checksum))) + + +if __name__ == "__main__": + import time + + # Lets figure out how many are connected to the PC and display it + connected_count = len(ics.find_devices()) + print("Found {} connected device(s)...".format(connected_count)) + device = open_device(0) + prepare_message(device) + time.sleep(1) + receive_lin(device) + print("Finished.") diff --git a/examples/transmit_lin_ldf_example.py b/examples/transmit_lin_ldf_example.py new file mode 100755 index 000000000..1879b7a33 --- /dev/null +++ b/examples/transmit_lin_ldf_example.py @@ -0,0 +1,156 @@ +import ics +import random +import time +import os +import ldfparser + + +def parse_ldf(): + path = os.path.join(os.path.dirname(__file__), "lin22.ldf") + return ldfparser.parse_ldf(path) + + +def open_device(index=0): + device = None + # ics.open_device() won't open a device if we have handles open already + # so we need to find them and specify which ones to connect to. + devices = ics.find_devices() + print( + "Opening Device {} (Open Client handles: {})...".format( + devices[index], devices[index].NumberOfClients + ) + ) + ics.open_device(devices[index]) + device = devices[index] + print("Opened Device %s." % device) + return device + + +def receive_lin(device): + msgs, error_count = ics.get_messages(device) + print("Received {} messages with {} errors.".format(len(msgs), error_count)) + netids = {ics.NETID_LIN: "LIN 1"} # , ics.NETID_LIN2: "LIN 2" } + for i, m in enumerate(msgs): + netid = netids.get(m.NetworkID) + if netid is not None: + # print('\nMessage #{}: '.format(i+1), end='') + print("{}".format(netid), end="") + if m.StatusBitField & ics.SPY_STATUS_INIT_MESSAGE: + print(" | Init") + data_list = [] + for x in m.Header[1:]: + data_list.append(x) + for y in m.Data: + data_list.append(y) + try: + frame_name = ldf.get_frame(m.Header[0] & 0x3F).name + if frame_name is not None: + print("{} | ".format(frame_name), end="") + except: + pass + print("ID: {} | ".format(hex(m.Header[0])), end="") + if len(data_list): + checksum = data_list.pop() + print("Data: {} | ".format([hex(x) for x in data_list]), end="") + print("Checksum: {}".format(hex(checksum))) + print() + return True + + +def send_frame(self, baudrate: int, frame_id: int, data: bytearray, netid: int, is_commander: bool): + # set baudrate with device settings? + msg = ics.SpyMessageJ1850() + if is_commander: + msg.StatusBitField = ics.SPY_STATUS_INIT_MESSAGE + msg.Protocol = ics.SPY_PROTOCOL_LIN + msg.NetworkID = netid + header_bytes = [frame_id] + frame_bytes = [] + if len(data): + hdr_len = min(len(data), 2) + data_len = min((len(data) - hdr_len), 6) + checksum = 0 + if hdr_len > 0: + header_bytes += list(data[0:hdr_len]) + if data_len > 0: + frame_bytes += list(data[hdr_len:]) + for byte in header_bytes + frame_bytes: + checksum += byte + if checksum > 255: + checksum -= 255 + if len(header_bytes) == 2: + header_bytes.append(~checksum & 0xFF) + else: + frame_bytes.append(~checksum & 0xFF) + msg.Header = tuple(header_bytes) + msg.Data = tuple(frame_bytes) + msg.NumberBytesHeader = len(msg.Header) + msg.NumberBytesData = len(msg.Data) + try: + ics.transmit_messages(self.device, msg) + except ics.RuntimeError as ex: + print(ex) + return False + return True + + +class LINCommander: + def __init__(self, device): + self.device = device + self.frames = {} + + def send_commander_frame(self, baudrate: int, frame_id: int, data: bytearray): + send_frame(self, baudrate, frame_id, data, ics.NETID_LIN, True) + + +class LINResponder: + def __init__(self, device): + self.device = device + self.frames = {} + + def send_responder_frame(self, baudrate: int, frame_id: int, data: bytearray): + send_frame(self, baudrate, frame_id, data, ics.NETID_LIN2, False) + + +if __name__ == "__main__": + import time + + ldf = parse_ldf() + # Lets figure out how many are connected to the PC and display it + connected_count = len(ics.find_devices()) + print("Found {} connected device(s)...".format(connected_count)) + device = open_device(0) + responder_nodes = ldf.get_slaves() + commander_nodes = ldf.get_master() + lin_cmdr = LINCommander(device) + lin_resp = LINResponder(device) + for resp in responder_nodes: + for each in resp.publishes_frames: + lin_resp.frames.update({each.name: each}) + + for cmdr in commander_nodes.publishes_frames: + lin_cmdr.frames.update({cmdr.name: cmdr}) + + collision_schedule = ldf.get_schedule_table("Collision_resolver") + for entry in collision_schedule.schedule: + if entry.frame is not None: + if entry.frame.name in lin_cmdr.frames: + cmdr_data = entry.frame.encode({}) + lin_cmdr.send_commander_frame(ldf.baudrate, entry.frame.frame_id, cmdr_data) + elif entry.frame.name in lin_resp.frames: + resp_data = entry.frame.encode({}) + lin_resp.send_responder_frame(ldf.baudrate, entry.frame.frame_id, resp_data) + time.sleep(150 / 1000) + lin_cmdr.send_commander_frame(ldf.baudrate, entry.frame.frame_id, bytearray()) + time.sleep(150 / 1000) + + # request_frame = ldf.get_unconditional_frame('CEM_Frm1') + # request_data = request_frame.encode({"InternalLightsRequest": 'on'}, ldf.converters) + # lin_cmdr.send_commander_frame(ldf.baudrate, request_frame.frame_id, request_data) + + # responseFrame = ldf.get_unconditional_frame('RSM_Frm1') + # responseData = responseFrame.encode({"RightIntLightsSwitch": 'off'}, ldf.converters) + # lin_resp.send_responder_frame(ldf.baudrate, responseFrame.frame_id, responseData) + receive_lin(device) + time.sleep(1) + print("Finished.") diff --git a/extract_icsneo40_defines.py b/extract_icsneo40_defines.py index 5e29070c8..e15a2a18d 100644 --- a/extract_icsneo40_defines.py +++ b/extract_icsneo40_defines.py @@ -1,5 +1,6 @@ #!/usr/bin/env python from __future__ import print_function +from os import path import os.path import re from subprocess import run, PIPE @@ -12,10 +13,11 @@ def format_file(filename, preprocessor=False): import os + processed_fname = os.path.basename(filename) name, ext = os.path.splitext(processed_fname) - processed_fname = f'{name}_processed{ext}' - #processed_fname = "icsnVC40_processed.h" + processed_fname = f"{name}_processed{ext}" + # processed_fname = "icsnVC40_processed.h" # Run it through the preprocessor # clang -E -P .\include\ics\icsnVC40.h -o output.h if preprocessor: @@ -27,8 +29,11 @@ def format_file(filename, preprocessor=False): shutil.copy(str(original_path), str(new_path)) # Format the file - result = run(["clang-format", "-i", "--style", - "{BasedOnStyle: Mozilla, ColumnLimit: '200'}", processed_fname], stdout=PIPE, stderr=PIPE) + result = run( + ["clang-format", "-i", "--style", "{BasedOnStyle: Mozilla, ColumnLimit: '200'}", processed_fname], + stdout=PIPE, + stderr=PIPE, + ) result.check_returncode() return processed_fname @@ -36,7 +41,7 @@ def format_file(filename, preprocessor=False): def extract(): use_internal = False - if os.path.isfile('include/ics/icsnVC40Internal.h'): + if os.path.isfile("include/ics/icsnVC40Internal.h"): use_internal = True print("Using Internal Header!") @@ -48,103 +53,158 @@ def extract(): """ # write the header file first - with open('include/setup_module_auto_defines.h', 'w') as f: + with open("include/setup_module_auto_defines.h", "w") as f: print("#ifndef __SETUP_MODULE_AUTO_DEFINES_H__", file=f) print("#define __SETUP_MODULE_AUTO_DEFINES_H__", file=f) if use_internal: print("\n#ifndef _USE_INTERNAL_HEADER_\n#define _USE_INTERNAL_HEADER_\n#endif\n", file=f) - print('#include ', file=f) + print("#include ", file=f) print("\nint setup_module_auto_defines(PyObject * module);\n", file=f) print("#endif // __SETUP_MODULE_AUTO_DEFINES_H__", file=f) - ignores = ('(', '#endif', '#define', 'icscm_', 'GCC_MODIFIER', 'VS_MODIFIER', - '{', 'ICSNVC40_H', 'ICSNVC40INTERNAL__H_', 'SYellowSettings_SIZE', 'IS_64BIT_SYSTEM') + ignores = ( + "(", + "#endif", + "#define", + "icscm_", + "GCC_MODIFIER", + "VS_MODIFIER", + "{", + "ICSNVC40_H", + "ICSNVC40INTERNAL__H_", + "SYellowSettings_SIZE", + "IS_64BIT_SYSTEM", + ) use_enums = True - with open('src/setup_module_auto_defines.cpp', 'w') as f: + with open("src/setup_module_auto_defines.cpp", "w") as f: print(boiler_plate, file=f) # Include the header files needed for the defines - print("#include \"setup_module_auto_defines.h\"\n#include \n#include \"ics/icsnVC40.h\"", file=f) + + print( + '#include "setup_module_auto_defines.h"\n#include \n#pragma warning(push, 0)\n#include "ics/icsnVC40.h"\n#pragma warning(pop)', + file=f, + ) if use_internal: - print("#include \"ics/icsnVC40Internal.h\"", file=f) + print('#pragma warning(push, 0)\n#include "ics/icsnVC40Internal.h"\n#pragma warning(pop)', file=f) print("\nint setup_module_auto_defines(PyObject * module)\n{", file=f) print("\tint result = 0;\n", file=f) fnames = [] - fnames.append(format_file('include/ics/icsnVC40.h')) + fnames.append(format_file("include/ics/icsnVC40.h")) + # Append cicsSpyStatusBits header included in v921 + if pathlib.Path("include/ics/cicsSpyStatusBits.h").exists(): + fnames.append(format_file("include/ics/cicsSpyStatusBits.h")) if use_internal: - fnames.append(format_file('include/ics/icsnVC40Internal.h')) + fnames.append(format_file("include/ics/icsnVC40Internal.h")) # Let's get to work here! for header_file in fnames: # if not os.path.isfile(header_file) and 'Internal' in header_file: # # Ignore this file # continue - with open(header_file, 'r') as fname: - if 'icsnVC40Internal' in header_file: - print("\n#ifdef _USE_INTERNAL_HEADER_ /* ALL THESE DEFINES ARE SPECIFIED IN THE INTERNAL HEADER */\n", file=f) + with open(header_file, "r") as fname: + if "icsnVC40Internal" in header_file: + print( + "\n#ifdef _USE_INTERNAL_HEADER_ /* ALL THESE DEFINES ARE SPECIFIED IN THE INTERNAL HEADER */\n", + file=f, + ) inside_enum = False inside_comment = False line_number = 0 for line in fname: line_number += 1 - if line.lstrip().startswith('//'): + if line.lstrip().startswith("//"): continue - if inside_enum and '}' in line: + if inside_enum and "}" in line: inside_enum = False if use_enums: - print('\t// end of enum - ', line, file=f) + print("\t// end of enum - ", line, file=f) continue - elif inside_comment and '*/' in line: + elif inside_comment and "*/" in line: inside_comment = False continue - elif inside_enum and not '{' in line: + elif inside_enum and not "{" in line: sline = line.split() if not sline: continue if any(x in sline[0] for x in ignores): continue if use_enums: - if ',' in sline[0]: + if "," in sline[0]: # This removes anything after the comma as we don't need it - sline[0] = sline[0].split(',')[0] + sline[0] = sline[0].split(",")[0] # This removes anything after the equal sign as we don't need it - sline[0] = sline[0].split('=')[0] - print('\tresult += PyModule_AddIntMacro(module, %s);' % sline[0].replace(',', ''), file=f) + sline[0] = sline[0].split("=")[0] + value = sline[0].replace(",", "") + # Hex enumerators with the high bit set (e.g. 0xFFFFFFFF) get an + # implementation-defined underlying type: MSVC wraps them negative + # while GCC/Clang keep them unsigned. Normalize through unsigned + # int so every platform exposes the positive value. + unsigned32 = False + code_part = line.split("//")[0] + if "=" in code_part: + rhs = code_part.split("=", 1)[1].strip().rstrip(",").strip().strip("()") + if re.match(r"^0[xX][0-9a-fA-F]+$", rhs) and 0x7FFFFFFF < int(rhs, 16) <= 0xFFFFFFFF: + unsigned32 = True + if unsigned32: + print(f"\tresult += PyModule_AddObjectRef(module, \"{value}\", PyLong_FromUnsignedLongLong(static_cast({value})));", file=f) + else: + print(f"\tresult += PyModule_AddObjectRef(module, \"{value}\", PyLong_FromLongLong({value}));", file=f) continue - if '#define' in line: - sline = line.split('//')[0].split() + if "#define" in line: + sline = line.split("//")[0].split() # DEBUG: print('\t\t' + str(line_number) + '\t' + str(sline)) if any(x in sline[1] for x in ignores): continue - if len(sline) >= 3 and re.match("^\d+?\.\d+?$", sline[2]) is not None: + if len(sline) >= 3 and re.match(r"^\d+?\.\d+?$", sline[2]) is not None: # Value is a float print( - '\tresult += PyModule_AddObject(module, "{0}", PyFloat_FromDouble({0}));'.format(sline[1]), file=f) + '\tresult += PyModule_AddObjectRef(module, "{0}", PyFloat_FromDouble({0}));'.format( + sline[1] + ), + file=f, + ) + elif len(sline) >= 3 and re.match(r"^\d+$", sline[2]) is not None: + # We should be an integer at this point + try: + if int(sline[2]) < 0: + # Integer Value is negative + print(f"\tresult += PyModule_AddObjectRef(module, \"{sline[1]}\", PyLong_FromLongLong({sline[1]}));", file=f) + else: + # Integer Value is positive + print(f"\tresult += PyModule_AddObjectRef(module, \"{sline[1]}\", PyLong_FromUnsignedLongLong({sline[1]}));", file=f) + except ValueError: + # Not an integer, probably another define + # This comes here: #define SPY_STATUS2_RX_TIMEOUT_ERROR SPY_STATUS2_ISO_RX_TIMEOUT_ERROR + print(f"ERROR: {sline[1]} {sline[2]}") + print(f"\tresult += PyModule_AddObjectRef(module, \"{sline[1]}\", PyLong_FromLongLong({sline[1]}));", file=f) + elif len(sline) == 2: # There is no value, this is used for preprocessor only # and really shouldn't care about it in python. Going to set it as 0 "just in case" print( - '\tresult += PyModule_AddObject(module, "{}", PyLong_FromLong(0));'.format(sline[1]), - file=f) + '\tresult += PyModule_AddObjectRef(module, "{}", PyLong_FromLong(0));'.format(sline[1]), + file=f, + ) else: - print('\tresult += PyModule_AddIntMacro(module, %s);' % sline[1], file=f) - - elif '/*' in line: + print(f"\tresult += PyModule_AddObjectRef(module, \"{sline[1]}\", PyLong_FromLongLong({sline[1]}));", file=f) + + elif "/*" in line: inside_comment = True continue - elif 'enum' in line.split('//')[0]: + elif "enum" in line.split("//")[0]: inside_enum = True if use_enums: - print('\t// enum', file=f) - if '{' in line and '};' in line: + print("\t// enum", file=f) + if "{" in line and "};" in line: # Special Case here - sline = "".join(line[line.find("{")+1:line.find("}")].split()).split(',') + sline = "".join(line[line.find("{") + 1 : line.find("}")].split()).split(",") # Remove =X assignments if present. - sline = [x.split('=')[0] for x in sline] + sline = [x.split("=")[0] for x in sline] for e in sline: - print('\tresult += PyModule_AddIntMacro(module, %s);' % e, file=f) + print(f"\tresult += PyModule_AddObjectRef(module, \"{e}\", PyLong_FromLongLong({e}));", file=f) inside_enum = False continue - if 'icsnVC40Internal' in header_file: + if "icsnVC40Internal" in header_file: print("\n#endif // _USE_INTERNAL_HEADER_\n", file=f) print("\n\treturn result == 0 ? 1 : 0;\n}", file=f) diff --git a/generate_icsneo40_structs.py b/generate_icsneo40_structs.py index 20004a9df..4a466deaf 100644 --- a/generate_icsneo40_structs.py +++ b/generate_icsneo40_structs.py @@ -2,15 +2,19 @@ import re import os.path from collections import OrderedDict -import sys -from subprocess import run, PIPE +from subprocess import STDOUT, CalledProcessError, run, PIPE from enum import Enum, auto import random -import ctypes +from pathlib import Path +import sys +import ctypes #used with eval... +from ics_utility import GEN_ICS_DIR debug_print = False __unique_numbers = [] + + def get_unique_number(): "Returns a unique integer" global __unique_numbers @@ -28,6 +32,7 @@ class DataType(Enum): Struct = auto() Enum = auto() + class CVariable(object): name = "" data_type = None @@ -43,20 +48,21 @@ def __init__(self, name, data_type, array_length, bitfield_size, enum_value=None self.bitfield_size = bitfield_size self.enum_value = enum_value self.is_enum = bool(self.enum_value) - + def __repr__(self): - return f'<{self.__class__.__name__} {self.name} {self.data_type} @ {hex(id(self))}>' + return f"<{self.__class__.__name__} {self.name} {self.data_type} @ {hex(id(self))}>" def to_ordered_dict(self): od = OrderedDict() - od['name'] = self.name - od['data_type'] = self.data_type - od['array_length'] = self.array_length - od['bitfield_size'] = self.bitfield_size - od['is_enum'] = self.is_enum - od['enum_value'] = self.enum_value + od["name"] = self.name + od["data_type"] = self.data_type + od["array_length"] = self.array_length + od["bitfield_size"] = self.bitfield_size + od["is_enum"] = self.is_enum + od["enum_value"] = self.enum_value return od + class CEnum(CVariable): def __init__(self, name, value): super().__init__(name, "int", 0, 0, value) @@ -77,44 +83,44 @@ def __repr__(self): if self.names: name = self.names[-1] else: - name = 'Anon' - + name = "Anon" + if self.data_type == DataType.Struct: - t_name = 'Struct' + t_name = "Struct" elif self.data_type == DataType.Union: - t_name = 'Union' + t_name = "Union" elif self.data_type == DataType.Enum: - t_name = 'Enum' + t_name = "Enum" else: - t_name = 'Unknown' + t_name = "Unknown" + + return f"<{self.__class__.__name__} {name} {t_name} {len(self.members)} members @ {hex(id(self))}>" - return f'<{self.__class__.__name__} {name} {t_name} {len(self.members)} members @ {hex(id(self))}>' - def to_ordered_dict(self): od = OrderedDict() if self.data_type == DataType.Struct: - t_name = 'Struct' + t_name = "Struct" elif self.data_type == DataType.Union: - t_name = 'Union' + t_name = "Union" elif self.data_type == DataType.Enum: - t_name = 'Enum' + t_name = "Enum" else: - t_name = 'Unknown' + t_name = "Unknown" - od['names'] = self.names - od['data_type'] = t_name - od['packing'] = self.packing - od['is_anonymous'] = self.is_anonymous - od['members'] = [] + od["names"] = self.names + od["data_type"] = t_name + od["packing"] = self.packing + od["is_anonymous"] = self.is_anonymous + od["members"] = [] for member in self.members: - od['members'].append(member.to_ordered_dict()) + od["members"].append(member.to_ordered_dict()) return od def assign_preferred_name(self, is_embedded=False): """This assigns a name to the object if we are nameless and anonymous, safe to call multiple times.""" self.preferred_name = get_preferred_struct_name(self.names) # Any object that starts with _ won't be imported with import * statement so lets push it to the end - if self.preferred_name and self.preferred_name.startswith('_'): + if self.preferred_name and self.preferred_name.startswith("_"): modified_name = reverse_leading_underscores(self.preferred_name) self.names.append(modified_name) self.preferred_name = get_preferred_struct_name(self.names) @@ -124,22 +130,23 @@ def assign_preferred_name(self, is_embedded=False): self.preferred_name = convert_to_snake_case(self.preferred_name) -_start_of_obj_blacklist = ( - re.compile(r'''struct [aA-zZ\\_]+ [aA-zZ\\_]+;'''), # struct some_random_struct_name value; -) +_start_of_obj_blacklist = (re.compile(r"""struct [aA-zZ\\_]+ [aA-zZ\\_]+;"""),) # struct some_random_struct_name value; + def is_line_start_of_object(line): "Returns True if we are a c object (enum, struct, union)" for regex in _start_of_obj_blacklist: if bool(regex.search(line)): return False - return bool(re.search('\btypedef struct$|struct$|struct \S*$|enum|union', line)) + return bool(re.search(r"\btypedef struct$|struct$|struct \S*$|enum$|enum |union$|union ", line)) + # This contains all the objects that don't pass convert_to_ctype_object NON_CTYPE_OBJ_NAMES = [] # This contains a list of every object we collected ALL_C_OBJECTS = [] + def get_object_from_name(name): global ALL_C_OBJECTS for obj in ALL_C_OBJECTS: @@ -147,6 +154,7 @@ def get_object_from_name(name): return obj return None + def parse_object(f, pos=-1, pack_size=None, is_embedded=False): """ takes a file object and returns a class with the object data. @@ -154,7 +162,6 @@ def parse_object(f, pos=-1, pack_size=None, is_embedded=False): """ start_pos = f.tell() opening_bracket_count = 0 - opening_bracket_count = 0 try: # Read the first line and make sure we have a C Object line = f.readline() @@ -168,16 +175,16 @@ def parse_object(f, pos=-1, pack_size=None, is_embedded=False): new_obj = CObject() new_obj.packing = pack_size # Grab the object name - name = re.sub('typedef|struct|enum|union|\{|\s*', '', line) + name = re.sub(r"typedef|struct|enum|union|\{|\s*", "", line) # Only append the name if its not anonymous if name: new_obj.names.append(name) # Determine the type of object - if 'struct' in line: + if "struct" in line: new_obj.data_type = DataType.Struct - elif 'union' in line: + elif "union" in line: new_obj.data_type = DataType.Union - elif 'enum' in line: + elif "enum" in line: new_obj.data_type = DataType.Enum else: new_obj.data_type = DataType.Unknown @@ -197,14 +204,15 @@ def parse_object(f, pos=-1, pack_size=None, is_embedded=False): embedded_object = parse_object(f, -1, pack_size, True) new_obj.members.append(embedded_object) continue - opening_bracket_count += line.count('{') - opening_bracket_count -= line.count('}') + opening_bracket_count += line.count("{") + opening_bracket_count -= line.count("}") + assert opening_bracket_count >= 0 # Determine if we are at the end of the struct - if opening_bracket_count == 0 and re.match('}.*;', line): - extra_names = ''.join(line.split()).strip('};').split(',') + if opening_bracket_count == 0 and re.match(r"}.*;", line): + extra_names = "".join(line.split()).strip("};").split(",") try: # Remove dangling empty string - extra_names.remove('') + extra_names.remove("") except ValueError: pass if extra_names: @@ -213,7 +221,7 @@ def parse_object(f, pos=-1, pack_size=None, is_embedded=False): finished = True break # Nothing to do with this line anymore - if re.match('.*{.*', line): + if re.match(r".*{.*", line): continue # Parse the member if new_obj.data_type == DataType.Enum: @@ -239,11 +247,12 @@ def parse_object(f, pos=-1, pack_size=None, is_embedded=False): f.seek(pos) raise RuntimeError("parse_object(): Failure. This is a bug and we shouldn't be here!") + def reverse_leading_underscores(value: str): """Take a string starting with underscores and moves them to the end. Returns a string""" - if value.startswith('_'): - underscore_count = len(value) - len(value.lstrip('_')) - return value.lstrip('_') + '_'*underscore_count + if value.startswith("_"): + underscore_count = len(value) - len(value.lstrip("_")) + return value.lstrip("_") + "_" * underscore_count # We didn't have underscores in the value return value @@ -262,67 +271,66 @@ def parse_struct_member(buffered_line): # uint8_t data[4 * 1024]; /* The data */ # remove all unneeded whitespace - #print("DEBUG BEFORE:", buffered_line) + # print("DEBUG BEFORE:", buffered_line) # if len(buffered_line.split('\n')): # new_buffered_line = '' # for line in buffered_line.split('\n'): # new_buffered_line += re.sub('{|union|}|;', '', line) + '\n' # buffered_line = new_buffered_line - buffered_line = re.sub("\s*\[", "[", ' '.join(buffered_line.split())) - #print("DEBUG AFTER:", buffered_line) + buffered_line = re.sub(r"\s*\[", "[", " ".join(buffered_line.split())) + # print("DEBUG AFTER:", buffered_line) # Figure out if we are an array type and get the array length - array_subsection = re.search('\[.*\]', buffered_line) + array_subsection = re.search(r"\[.*\]", buffered_line) is_array = array_subsection is not None if is_array: - array_length = int(eval(array_subsection.group(0).strip('[]'))) + array_length = int(eval(array_subsection.group(0).strip("[]"))) else: array_length = 0 # Remove the array portion - buffered_line = re.sub('\[.*\]', '', buffered_line) + buffered_line = re.sub(r"\[.*\]", "", buffered_line) # split up the remaining words = buffered_line.split() if not len(words): - return None, '', 0, 0 # data_type, array_length, bitwise_length - if ':' in words: + return None, "", 0, 0 # data_type, array_length, bitwise_length + if ":" in words: # we are a bitfield ;( try: - bitwise_length = int( - re.search('\d*', words[words.index(":")+1]).group(0)) + bitwise_length = int(re.search(r"\d*", words[words.index(":") + 1]).group(0)) except Exception as ex: if debug_print: print("EXCEPTION:", ex) bitwise_length = 0 # see if we get a valid ctype object before : to check for things like "unsigned : 31;" - pre_colon_text = ' '.join(words[:words.index(":")]) + pre_colon_text = " ".join(words[: words.index(":")]) check_data_type = convert_to_ctype_object(pre_colon_text) if check_data_type: - data_name = '' + data_name = "" data_type = pre_colon_text else: - data_name_index = words.index(":")-1 + data_name_index = words.index(":") - 1 data_name = words[data_name_index] - data_type = ' '.join(words[0:data_name_index]) + data_type = " ".join(words[0:data_name_index]) else: bitwise_length = 0 data_name = words[-1] - data_type = ' '.join(words[0:len(words)-1]) - if data_name.startswith('*'): - data_type += ' *' - data_name = data_name.lstrip('*') + data_type = " ".join(words[0 : len(words) - 1]) + if data_name.startswith("*"): + data_type += " *" + data_name = data_name.lstrip("*") # DEBUG: ['uint8_t', 'MACAddress[6];'] # print("DEBUG:", words, buffered_line) # remove stuff that shouldn't be in the name - data_name = re.sub('{|{|}|\s*', '', data_name) - data_type = re.sub('union|{|{|}|^struct', '', data_type) + data_name = re.sub(r"{|{|}|\s*", "", data_name) + data_type = re.sub(r"union|{|{|}|^struct", "", data_type) data_type = data_type.strip() if not data_type: - data_name = '' + data_name = "" # Any object that starts with _ won't be imported with import * statement so lets push it to the end - if data_type.startswith('_') and not convert_to_ctype_object(data_type): + if data_type.startswith("_") and not convert_to_ctype_object(data_type): data_type = reverse_leading_underscores(data_type) - return re.sub('\[.*\]|;', '', data_name), data_type, array_length, bitwise_length + return re.sub(r"\[.*\]|;", "", data_name), data_type, array_length, bitwise_length def parse_enum_member(buffered_line): @@ -330,34 +338,34 @@ def parse_enum_member(buffered_line): # VARIABLE_NAME = 0, # remove all unneeded whitespace - buffered_line = re.sub("\s*\[", "[", ' '.join(buffered_line.split())) + buffered_line = re.sub(r"\s*\[", "[", " ".join(buffered_line.split())) - if '=' in buffered_line: - name = buffered_line.split('=')[0] - value = buffered_line.split('=')[1] - value = re.sub('{|{|}|,|\s*', '', value) + if "=" in buffered_line: + name = buffered_line.split("=")[0] + value = buffered_line.split("=")[1] + value = re.sub(r"{|{|}|,|\s*", "", value) try: value = int(value) except ValueError as ex: - if '0X' in value.upper(): + if "0X" in value.upper(): value = int(value, 16) - elif '0B' in value.upper(): + elif "0B" in value.upper(): value = int(value, 2) else: - name = re.sub(',', '', buffered_line) + name = re.sub(r",", "", buffered_line) value = None return name, value def get_struct_name_from_header(line): # line.split('struct ')[-1] - struct_name = re.sub('typedef|struct|enum|union|\{|\s*', '', line) + struct_name = re.sub(r"typedef|struct|enum|union|\{|\s*", "", line) if not struct_name: # == 'typedef struct': anonymous_struct = True - struct_name = 'anonymous' - elif '{' == struct_name: + struct_name = "anonymous" + elif "{" == struct_name: anonymous_struct = True - struct_name = 'anonymous' + struct_name = "anonymous" else: anonymous_struct = False return struct_name, anonymous_struct @@ -369,34 +377,39 @@ def get_struct_names(data): # key = the "key" in the data # values = list of other names for name in data.keys(): - if name in ('names', 'pack'): + if name in ("names", "pack"): continue - if 'names' in data[name]: - names[name] = data[name]['names'] + if "names" in data[name]: + names[name] = data[name]["names"] else: - names[name] = [name, ] + names[name] = [ + name, + ] return names + def get_preferred_struct_name(_names): # Remove the reference names = _names[:] - r = re.compile("^[sS].*") - r_underscore = re.compile("^(?![_]).*") - r_end_t = re.compile("^.*(_[tT])$") + r = re.compile(r"^[sS].*") + r_underscore = re.compile(r"^(?![_]).*") + r_end_t = re.compile(r"^.*(_[tT])$") + # Find any that don't start with _ for _t matching below + struct_name_no_underscore = list(filter(r_underscore.match, names)) # Remove all instances of _t at end unless that is all we have - setting_structures_with_t = list(filter(r_end_t.match, names)) - if len(setting_structures_with_t): - if len(setting_structures_with_t) != len(names): - for name in setting_structures_with_t: + struct_name_with_t = list(filter(r_end_t.match, struct_name_no_underscore)) + if len(struct_name_with_t): + if len(struct_name_with_t) != len(struct_name_no_underscore): + for name in struct_name_with_t: names.remove(name) # Find any that start with 'S' and prefer that - setting_structures = list(filter(r.match, names)) - if setting_structures: - return setting_structures[0] + struct_name_with_s = list(filter(r.match, names)) + if struct_name_with_s: + return struct_name_with_s[0] # Find any that don't start with _ and prefer that - setting_structures = list(filter(r_underscore.match, names)) - if setting_structures: - return setting_structures[0] + struct_name_no_underscore = list(filter(r_underscore.match, names)) + if struct_name_no_underscore: + return struct_name_no_underscore[0] try: return names[0] except IndexError as _: @@ -406,9 +419,10 @@ def get_preferred_struct_name(_names): def convert_to_snake_case(name): # return name - s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) - s2 = re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower() - return re.sub(r'(_)\1{1,}', '_', s2) + s1 = re.sub(r"(.)([A-Z][a-z]+)", r"\1_\2", name) + s2 = re.sub(r"([a-z0-9])([A-Z])", r"\1_\2", s1).lower() + return re.sub(r"(_)\1{1,}", "_", s2) + def convert_to_ctype_object(data_type): ctype_types = { @@ -420,62 +434,95 @@ def convert_to_ctype_object(data_type): "c_short": ("short",), "c_ushort": ("unsigned short",), "c_int": ("int",), - "c_uint": ("unsigned", "unsigned int",), + "c_uint": ( + "unsigned", + "unsigned int", + ), "c_long": ("long",), "c_ulong": ("unsigned long",), - "c_longlong": ("__int64", "long long",), - "c_ulonglong": ("unsigned __int64", "unsigned long long",), + "c_longlong": ( + "__int64", + "long long", + ), + "c_ulonglong": ( + "unsigned __int64", + "unsigned long long", + ), "c_size_t": ("size_t",), - "c_ssize_t": ("ssize_t", "Py_ssize_t",), + "c_ssize_t": ( + "ssize_t", + "Py_ssize_t", + ), "c_float": ("float",), "c_double": ("double",), - "c_void_p": ("void*", "void *",), + "c_void_p": ( + "void*", + "void *", + ), } # Add all the intX_t types for d in [8, 16, 32, 64]: - ctype_types[f'c_int{d}'] = (f'int{d}_t',) - ctype_types[f'c_uint{d}'] = (f'uint{d}_t',) - + ctype_types[f"c_int{d}"] = (f"int{d}_t",) + ctype_types[f"c_uint{d}"] = (f"uint{d}_t",) + # This is dirty but we don't parse typedefs... - ctype_types["c_uint16"] = ctype_types["c_uint16"] + ("descIdType",) + # descIdType is int16_t in icsnVC40.h (EXTERNAL_PROJECT build) + ctype_types["c_int16"] = ctype_types["c_int16"] + ("descIdType",) ctype_types["c_uint64"] = ctype_types["c_uint64"] + ("_clock_identity",) - is_pointer = '*' in data_type and not 'void' in data_type + is_pointer = "*" in data_type and not "void" in data_type for ctype_type, c_types in ctype_types.items(): for c_type in c_types: if is_pointer: - data_type = data_type.replace('*', '') + data_type = data_type.replace("*", "") if c_type == data_type: try: t = f"ctypes.{ctype_type}" eval(t) if is_pointer: - t = f'ctypes.POINTER({t})' + t = f"ctypes.POINTER({t})" return t except AttributeError as ex: - return None + return None return None + def format_file(filename): import os + processed_fname = os.path.basename(filename) name, ext = os.path.splitext(processed_fname) - processed_fname = f'{name}_processed{ext}' - #processed_fname = "icsnVC40_processed.h" + processed_fname = f"{name}_processed{ext}" + # processed_fname = "icsnVC40_processed.h" # Run it through the preprocessor # clang -E -P .\include\ics\icsnVC40.h -o output.h - result = run(["clang", "-E", "-P", filename, "-o", processed_fname], stdout=PIPE, stderr=PIPE) - result.check_returncode() + result = run( + ["clang", "-DEXTERNAL_PROJECT", "-E", "-P", filename, "-o", processed_fname], stdout=PIPE, stderr=STDOUT + ) + try: + result.check_returncode() + except CalledProcessError as ex: + print(f"ERROR: {' '.join(result.args)} failed with error code {ex.returncode}") + print(ex.stdout.decode("UTF-8")) + # print(ex.stderr) # Format the file - result = run(["clang-format", "-i", "--style", - "{BasedOnStyle: Mozilla, ColumnLimit: '200'}", processed_fname], stdout=PIPE, stderr=PIPE) - result.check_returncode() + result = run( + ["clang-format", "-i", "--style", "{BasedOnStyle: Mozilla, ColumnLimit: '200'}", processed_fname], + stdout=PIPE, + stderr=STDOUT, + ) + try: + result.check_returncode() + except CalledProcessError as ex: + print(f"ERROR: {' '.join(result.args)} failed with error code {ex.returncode}") + print(ex.stdout.decode("UTF-8")) return processed_fname + def parse_header_file(filename): - with open(filename, 'r') as f: + with open(filename, "r") as f: pack_size = 0 line_count = 0 last_pos = f.tell() @@ -489,20 +536,20 @@ def parse_header_file(filename): line = line.strip() line_count += 1 # Remove all unneeded whitespace - line = ' '.join(line.split()) + line = " ".join(line.split()) # Remove preprocessor statements if line.startswith("#"): # get the pack size - if re.match('#pragma.*pack.*.*pop.*', line): + if re.match(r"#pragma.*pack.*.*pop.*", line): if pack_size_stack: pack_size = pack_size_stack.pop() else: pack_size = 0 - elif re.match('#pragma.*pack.*.*push.*', line) or re.match('#pragma.*pack\(\d\)', line): - pushing = 'push' in line + elif re.match(r"#pragma.*pack.*.*push.*", line) or re.match(r"#pragma.*pack\(\d\)", line): + pushing = "push" in line try: last = pack_size - pack_size = int(re.search('\d{1,}', line).group(0)) + pack_size = int(re.search(r"\d{1,}", line).group(0)) if pushing: pack_size_stack.append(last) except AttributeError: @@ -511,14 +558,34 @@ def parse_header_file(filename): pack_size_stack.append(pack_size) if debug_print: print("PACK SIZE:", pack_size) - elif re.match('#define.*', line) and len(line.split(' ')) == 3 and not '\\' in line and not 'sizeof' in line: + elif ( + re.match(r"#define.*", line) + and len(line.split(" ")) == 3 + and not "\\" in line + and not "sizeof" in line + ): # preprocessor define that can be used as a number in array sizes... # we are going to hack the variable into the module's globals so we can eval() it later - words = line.split(' ') + words = line.split(" ") if debug_print: - print("ADDING {} to globals with value of {}".format( - words[1], words[2])) - globals()[words[1]] = eval(words[2]) + print("ADDING {} to globals with value of {}".format(words[1], words[2])) + try: + globals()[words[1]] = eval(words[2]) + except SyntaxError as ex: + # This happens when we have an integer literal + # https://en.cppreference.com/w/cpp/language/integer_literal + # TODO: 0x1p5 + literals = ("u", "U", "l", "L", "z", "Z", "f", "F") + modified_word = words[2] + while modified_word.endswith(literals): + for literal in literals: + modified_word = modified_word.rstrip(literal) + globals()[words[1]] = eval(modified_word) + except NameError as ex: + # Python interpreter can't parse this word value so lets convert it to a string and be done... + # Line: #57: "#define __INTMAX_C_SUFFIX__ LL" + globals()[words[1]] = eval(f'"{modified_word}"') + continue # Process the object if is_line_start_of_object(line): @@ -531,15 +598,20 @@ def parse_header_file(filename): enum_objects.append(obj) else: c_objects.append(obj) + except Exception as ex: + print(f'Line: #{line_count}: "{line}"') + raise ex finally: last_pos = f.tell() line = f.readline() return c_objects, enum_objects -def generate(filename='include/ics/icsnVC40.h'): + +def generate(filename="include/ics/icsnVC40.h"): import shutil import json import os + basename = os.path.basename(filename) filename = format_file(filename) c_objects, enum_objects = parse_header_file(filename) @@ -551,25 +623,58 @@ def generate(filename='include/ics/icsnVC40.h'): for enum_object in enum_objects: enum_objects_converted.append(enum_object.to_ordered_dict()) j = json.dumps(c_objects_converted, indent=4, sort_keys=False) - with open(f'{basename}.json', 'w+') as f: + with open(f"{basename}.json", "w+") as f: f.write(j) j = json.dumps(enum_objects_converted, indent=4, sort_keys=False) - with open(f'{basename}.enums.json', 'w+') as f: + with open(f"{basename}.enums.json", "w+") as f: f.write(j) # generate the python files - output_dir = './ics/structures' + output_dir = GEN_ICS_DIR / "structures" print(f"Removing {output_dir}...") try: shutil.rmtree(output_dir) except FileNotFoundError: pass ignore_names = [ - '__fsid_t', '__darwin_pthread_handler_rec', '_mbstate_t', 'mbstate_t_', - '_opaque_pthread_attr_t', '_opaque_pthread_cond_t', '_opaque_pthread_condattr_t', - '_opaque_pthread_mutex_t', '_opaque_pthread_mutexattr_t', '_opaque_pthread_once_t', - '_opaque_pthread_rwlock_t', '_opaque_pthread_rwlockattr_t', '_opaque_pthread_t', - 'NeoDevice', 'neo_device', 'NeoDeviceEx', 'neo_device_ex', - 'icsSpyMessage', 'icsSpyMessageJ1850', 'ics_spy_message', 'ics_spy_message_j1850'] + "fsid_t__", + "__fsid_t", + "__darwin_pthread_handler_rec", + "_mbstate_t", + "mbstate_t_", + "mbstatet_", + "Mbstatet_", + "_Mbstatet", + "_LONGDOUBLE", + "LONGDOUBLE_", + "_opaque_pthread_attr_t", + "_opaque_pthread_cond_t", + "_opaque_pthread_condattr_t", + "_opaque_pthread_mutex_t", + "_opaque_pthread_mutexattr_t", + "_opaque_pthread_once_t", + "_opaque_pthread_rwlock_t", + "_opaque_pthread_rwlockattr_t", + "_opaque_pthread_t", + "crt_locale_pointers_", + "crt_locale_data_public_", + "__crt_locale_data_public", + "ldiv_t", + "lldiv_t", + "ldouble_", + "ldbl12_", + "div_t", + "crt_float_", + "crt_double_", + "ndis_adapter_information", + #"NeoDevice", + #"neo_device", + #"NeoDeviceEx", + #"neo_device_ex", + "icsSpyMessage", + "icsSpyMessageJ1850", + "ics_spy_message", + "ics_spy_message_j1850", + ] file_names = [] prefered_names = [] all_objects = c_objects + enum_objects @@ -591,10 +696,10 @@ def generate(filename='include/ics/icsnVC40.h'): if debug_print: print(file_name, file_path) file_names.append(file_name) - + # Verify we don't have any unknown data types here global NON_CTYPE_OBJ_NAMES - global ALL_C_OBJECTS + global ALL_C_OBJECTS errors = False for obj_name in NON_CTYPE_OBJ_NAMES: obj = get_object_from_name(obj_name) @@ -607,91 +712,95 @@ def generate(filename='include/ics/icsnVC40.h'): print(f"Generated all python {len(all_objects)-ignored_enum_count} files.") # Generate __init__.py and add all the modules to __all__ - with open(os.path.join(output_dir, '__init__.py'), 'w+') as f: + with open(os.path.join(output_dir, "__init__.py"), "w+") as f: f.write("__all__ = [\n") for file_name in file_names: - fname = re.sub('(\.py)', '', file_name) - r = re.compile('(' + fname + ')') + fname = re.sub(r"(\.py)", "", file_name) + r = re.compile(r"(" + fname + ")") if list(filter(r.match, ignore_names)): - #print("IGNORING:", fname) + # print("IGNORING:", fname) continue f.write(' "') f.write(fname) f.write('",\n') f.write("]\n") # write a hidden_import python file for pyinstaller - with open('./ics/hiddenimports.py', 'w+') as f: - f.write('hidden_imports = [\n') + hidden_imports_path = GEN_ICS_DIR / "hiddenimports.py" + with open(hidden_imports_path, "w+") as f: + f.write("hidden_imports = [\n") for file_name in file_names: - fname = re.sub('(\.py)', '', file_name) - r = re.compile('(' + fname + ')') + fname = re.sub(r"(\.py)", "", file_name) + r = re.compile(r"(" + fname + ")") if list(filter(r.match, ignore_names)): - #print("IGNORING:", fname) + # print("IGNORING:", fname) continue f.write(f' "ics.structures.{fname}",\n') - f.write(']\n\n') + f.write("]\n\n") # Verify We can at least import all of the modules - quick check to make sure parser worked. - # TODO: This is broke - """ - sys.path.insert(0, output_dir) + ics_module_path = GEN_ICS_DIR.parent.resolve() + # Add the module to the eval sys.path. + eval("""sys.path.insert(0, f"{ics_module_path}")""") for file_name in file_names: + if file_name.startswith("__"): + continue import_line = "from ics.structures import {}".format( - re.sub('(\.py)', '', file_name)) + re.sub(r'(\.py)', '', file_name)) try: - print("Importing / Verifying {}...".format(file_name)) + print(f"Importing / Verifying {output_dir / file_name}...{' '*20}", end="\r") exec(import_line) except Exception as ex: - print("ERROR: ", ex, 'IMPORT LINE:', import_line) - """ - print("Done.") + print(f"""\nERROR: {ex} IMPORT LINE: '{import_line}'""") + raise ex + print("\nDone.") + def _write_c_object(f, c_object): # Write the header if c_object.data_type == DataType.Struct: - f.write(f'class {c_object.preferred_name}(ctypes.Structure):\n') + f.write(f"class {c_object.preferred_name}(ctypes.Structure):\n") elif c_object.data_type == DataType.Union: - f.write(f'class {c_object.preferred_name}(ctypes.Union):\n') + f.write(f"class {c_object.preferred_name}(ctypes.Union):\n") elif c_object.data_type == DataType.Enum: - f.write(f'class {c_object.preferred_name}(enum.IntEnum):\n') + f.write(f"class {c_object.preferred_name}(enum.IntEnum):\n") f.write(' """A ctypes-compatible IntEnum superclass."""\n') - f.write(' @classmethod\n') - f.write(' def from_param(cls, obj):\n') - f.write(' return int(obj)\n') - f.write('\n') + f.write(" @classmethod\n") + f.write(" def from_param(cls, obj):\n") + f.write(" return int(obj)\n") + f.write("\n") else: raise ValueError("CObject is not of a known data type!") - + # Write the rest of the header for structs/unions if c_object.data_type in (DataType.Struct, DataType.Union): # Setup the packing if c_object.packing: - f.write(f' _pack_ = {c_object.packing}\n') + f.write(f" _pack_ = {c_object.packing}\n") # Grab all the anonymous names anonymous_names = [] for member in c_object.members: if isinstance(member, CObject) and member.is_anonymous: anonymous_names.append(member.preferred_name) if anonymous_names: - f.write(f' _anonymous_ = {str(tuple(anonymous_names))}\n') - f.write(f' _fields_ = [\n') - + f.write(f" _anonymous_ = {str(tuple(anonymous_names))}\n") + f.write(f" _fields_ = [\n") + # Write the members for member in c_object.members: if c_object.data_type == DataType.Enum: enum_value = member.enum_value if enum_value == None: if c_object.enum_last_value != None: - enum_value = 'enum.auto()' + enum_value = "enum.auto()" c_object.enum_last_value += 1 else: # https://docs.python.org/3/library/enum.html#enum.auto # By default, the initial value starts at 1. c_object.enum_last_value = 0 - enum_value = '0' + enum_value = "0" elif c_object.enum_last_value == None: c_object.enum_last_value = 0 - f.write(f' {member.name} = {enum_value}\n') + f.write(f" {member.name} = {enum_value}\n") else: # Struct/Union def _write_member(f, member, is_struct_or_union=False): @@ -700,7 +809,7 @@ def _write_member(f, member, is_struct_or_union=False): data_type = convert_to_ctype_object(member.data_type) # If we aren't a valid ctypes data type we are probably a struct if not data_type: - #print(f"Warning: Couldn't find a valid ctype type for '{member.data_type}' in '{member.name}'") + # print(f"Warning: Couldn't find a valid ctype type for '{member.data_type}' in '{member.name}'") global NON_CTYPE_OBJ_NAMES NON_CTYPE_OBJ_NAMES.append(member.data_type) data_type = member.data_type @@ -709,7 +818,14 @@ def _write_member(f, member, is_struct_or_union=False): # C enum types can be char, unsigned, signed but seem to default to # 4 byte integer on most systems (even 64-bit) # This is a potential hole but nothing we can do here - data_type = 'ctypes.c_int32' + data_type = "ctypes.c_int32" + # Use the unsigned variant when any enumerator needs the + # full 32 bits (e.g. DeviceSettingsNone = 0xFFFFFFFF) so + # the value round-trips through the field. + for enum_member in obj.members: + if isinstance(enum_member.enum_value, int) and enum_member.enum_value > 0x7FFFFFFF: + data_type = "ctypes.c_uint32" + break else: data_type = member.data_type if member.bitfield_size: @@ -725,24 +841,25 @@ def _write_member(f, member, is_struct_or_union=False): _name = member.preferred_name _created_member = CVariable(_name, _name, 0, 0) _write_member(f, _created_member, True) - + # Finalize the _fields_ attribute and extra names if c_object.data_type in (DataType.Struct, DataType.Union): - f.write(f' ]\n') + f.write(f" ]\n") # Extra names here - f.write('\n\n') + f.write("\n\n") for name in c_object.names: # Ignore the actual object name if name == c_object.preferred_name: continue - f.write('{} = {}\n'.format(re.sub('^\*', '', name), c_object.preferred_name)) - f.write('\n') + f.write("{} = {}\n".format(re.sub(r"^\*", "", name), c_object.preferred_name)) + f.write("\n") + def generate_pyfile(c_object, path): - #name = get_preferred_struct_name(c_object.names) - #c_object.preferred_name = convert_to_snake_case(name) + # name = get_preferred_struct_name(c_object.names) + # c_object.preferred_name = convert_to_snake_case(name) # Make the fname and the path - fname = f'{c_object.preferred_name}.py' + fname = f"{c_object.preferred_name}.py" fname_with_path = os.path.normpath(os.path.join(path, fname)) # create the needed directories if not os.path.exists(os.path.split(fname_with_path)[0]): @@ -750,17 +867,18 @@ def generate_pyfile(c_object, path): os.makedirs(os.path.split(fname_with_path)[0]) except OSError as ex: import errno + if ex.errno != errno.EEXIST: # Race condition handler, if someone else makes a directory after we check if exists raise - with open(fname_with_path, 'w+') as f: + with open(fname_with_path, "w+") as f: # Write the boiler plate code - f.write( - '# This file was auto generated; Do not modify, if you value your sanity!\n') - f.write('import ctypes\n') - f.write('import enum\n') - f.write('\n') + f.write("# This file was auto generated; Do not modify, if you value your sanity!\n") + f.write("import ctypes\n") + f.write("import enum\n") + f.write("\n") # Generate all the imports + def get_c_object_imports(c_object): import_names = [] for member in c_object.members: @@ -780,30 +898,40 @@ def get_c_object_imports(c_object): # anonymous/nameless objects put an empty string in the list, lets remove it here import_names = [name for name in import_names if name] return sorted(set(import_names)) - + import_names = get_c_object_imports(c_object) - for import_name in (import_names): + for import_name in import_names: f.write(f"from ics.structures.{import_name} import *\n") - f.write('\n\n') + f.write("\n\n") def _generate_inner_objects(f, c_object): for member in c_object.members: if isinstance(member, CObject): _generate_inner_objects(f, member) - _write_c_object(f, member) + _write_c_object(f, member) + # generate all the inner objects _generate_inner_objects(f, c_object) # Finally write our main object _write_c_object(f, c_object) return fname, fname_with_path -if __name__ == '__main__': +def generate_all_files(): import sys import os - try: - filename = sys.argv[1] - filename = os.path.normpath(filename) - print(f"Parsing '{filename}'...") - except IndexError as _: - filename = 'include/ics/icsnVC40.h' - generate(filename) \ No newline at end of file + import pathlib + + print(f"Creating directory '{GEN_ICS_DIR}'...") + GEN_ICS_DIR.mkdir(parents=True, exist_ok=True) + filenames = ("icsnVC40.h", "icsnVC40Internal.h") + for filename in filenames: + path = pathlib.Path("include/ics/") + path = path.joinpath(filename) + if path.exists(): + if "Internal" in str(filename): + print("WARNING: Generating internal header!") + print(f"Parsing {str(path)}...") + generate(str(path)) + +if __name__ == "__main__": + generate_all_files() diff --git a/ics/__init__.py b/ics/__init__.py deleted file mode 100644 index d7797467f..000000000 --- a/ics/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ - -from ics.structures import * - -try: - from ics import * - from ics.ics import * - from ics.structures import * - from ics.hiddenimports import hidden_imports -except Exception as ex: - print(ex) - from ics.ics import * - from ics.ics.ics import * - from ics.ics.structures import * - from ics.ics.hiddenimports import hidden_imports \ No newline at end of file diff --git a/ics/hiddenimports.py b/ics/hiddenimports.py deleted file mode 100644 index 599211c4e..000000000 --- a/ics/hiddenimports.py +++ /dev/null @@ -1,158 +0,0 @@ -hidden_imports = [ - "ics.structures.s_extended_data_flash_header", - "ics.structures.tag_options_open_neo_ex", - "ics.structures.tag_options_find_neo_ex", - "ics.structures.tagicsneo_vi_command", - "ics.structures.st_api_firmware_info", - "ics.structures.can_settings", - "ics.structures.canfd_settings", - "ics.structures.swcan_settings", - "ics.structures.lin_settings", - "ics.structures.iso9141_keyword2000_init_step", - "ics.structures.iso9141_keyword2000_settings", - "ics.structures.uart_settings", - "ics.structures.j1708_settings", - "ics.structures.s_red_settings", - "ics.structures.s_text_api_settings", - "ics.structures.st_chip_versions", - "ics.structures.s_neo_most_gateway_settings", - "ics.structures.op_eth_general_settings", - "ics.structures.srad_gptp_settings_s", - "ics.structures.srad_gptp_and_tap_settings_s", - "ics.structures.hw_eth_settings", - "ics.structures.op_eth_settings", - "ics.structures.ethernet_settings", - "ics.structures.ethernet_settings2", - "ics.structures.ethernet10_g_settings", - "ics.structures.logger_settings", - "ics.structures.disk_settings", - "ics.structures.canterm_settings", - "ics.structures.timesync_icshardware_settings", - "ics.structures.s_disk_status", - "ics.structures.s_disk_structure", - "ics.structures.s_disk_details", - "ics.structures.s_disk_format_progress", - "ics.structures.start_dhcp_server_command", - "ics.structures.stop_dhcp_server_command", - "ics.structures.extended_response_generic", - "ics.structures.get_supported_features_response", - "ics.structures.version_report", - "ics.structures.get_component_versions", - "ics.structures.get_component_versions_response", - "ics.structures.software_update_command", - "ics.structures.s_ext_sub_cmd_hdr", - "ics.structures.timestamp_", - "ics.structures.port_identity", - "ics.structures.clock_quality_", - "ics.structures.system_identity", - "ics.structures.priority_vector", - "ics.structures.gptp_status", - "ics.structures.s_ext_sub_cmd_comm", - "ics.structures.serdescam_settings", - "ics.structures.serdespoc_settings", - "ics.structures.serdesgen_settings", - "ics.structures.rad_moon_duo_converter_settings", - "ics.structures.rad_reporting_settings", - "ics.structures.s_fire_settings", - "ics.structures.s_fire_vnet_settings", - "ics.structures.s_cyan_settings", - "ics.structures.svcan3_settings", - "ics.structures.svcan4_settings", - "ics.structures.svcanrf_settings", - "ics.structures.secu_settings", - "ics.structures.s_pendant_settings", - "ics.structures.sievb_settings", - "ics.structures.seevb_settings", - "ics.structures.srad_galaxy_settings", - "ics.structures.srad_star2_settings", - "ics.structures.srad_super_moon_settings", - "ics.structures.a2_b_monitor_settings", - "ics.structures.srada2_b_settings", - "ics.structures.srad_moon2_settings", - "ics.structures.srad_gigalog_settings", - "ics.structures.srad_gigastar_settings", - "ics.structures.s_vivid_can_settings", - "ics.structures.sobd2_sim_settings", - "ics.structures.s_cm_probe_settings", - "ics.structures.sobd2_pro_settings", - "ics.structures.svcan412_settings", - "ics.structures.secu_avb_settings", - "ics.structures.s_pluto_l2_address_lookup_entry_s", - "ics.structures.s_pluto_l2_address_lookup_params_s", - "ics.structures.s_pluto_l2_forwarding_params_s", - "ics.structures.s_pluto_l2_forwarding_entry_s", - "ics.structures.s_pluto_l2_policing_s", - "ics.structures.s_pluto_vlan_lookup_s", - "ics.structures.s_pluto_mac_config_s", - "ics.structures.s_pluto_retagging_entry_s", - "ics.structures.s_pluto_general_params_s", - "ics.structures.s_pluto_vl_lookup_entry_s", - "ics.structures.s_pluto_vl_policing_entry_s", - "ics.structures.s_pluto_vl_forwarding_params_s", - "ics.structures.s_pluto_vl_forwarding_entry_s", - "ics.structures.s_pluto_avb_params_s", - "ics.structures.s_pluto_clock_sync_params_s", - "ics.structures.s_pluto_ptp_params_s", - "ics.structures.s_pluto_custom_params_s", - "ics.structures.s_pluto_switch_settings_s", - "ics.structures.srad_pluto_settings", - "ics.structures.scan_sleep_id", - "ics.structures.scan_hub_settings", - "ics.structures.s_flex_vnetz_settings", - "ics.structures.s_neo_ecu12_settings", - "ics.structures.svcan4_ind_settings", - "ics.structures.sobd2_lc_settings", - "ics.structures.s_jupiter_ptp_params_s", - "ics.structures.srad_jupiter_switch_settings", - "ics.structures.srad_jupiter_settings", - "ics.structures.fire3_linux_settings", - "ics.structures.s_fire3_settings", - "ics.structures.s_rad_moon_duo_settings", - "ics.structures.s_ether_badge_settings", - "ics.structures.srad_epsilon_switch_settings", - "ics.structures.srad_epsilon_settings", - "ics.structures.swil_bridge_config", - "ics.structures.sradbms_settings", - "ics.structures.global_settings", - "ics.structures.s_device_settings", - "ics.structures.st_cm_iso157652_tx_message", - "ics.structures.iso15765_2015_tx_message", - "ics.structures.st_cm_iso157652_rx_message", - "ics.structures.spy_filter_long", - "ics.structures.ics_spy_message_flex_ray", - "ics.structures.ics_spy_message_long", - "ics.structures.ics_spy_message_vsb", - "ics.structures.ethernet_network_status_t", - "ics.structures.ics_fire2_device_status", - "ics.structures.ics_fire2_vnet_device_status", - "ics.structures.ics_vcan4_device_status", - "ics.structures.ics_flex_vnetz_device_status", - "ics.structures.ics_fire3_device_status", - "ics.structures.ics_rad_moon_duo_device_status", - "ics.structures.ics_rad_jupiter_device_status", - "ics.structures.ics_obd2_pro_device_status", - "ics.structures.ics_rad_pluto_device_status", - "ics.structures.ics_vcan4_industrial_device_status", - "ics.structures.ics_rad_epsilon_device_status", - "ics.structures.ics_rad_bms_device_status", - "ics.structures.ics_device_status", - "ics.structures.ndis_adapter_information", - "ics.structures.s_phy_reg_pkt_hdr", - "ics.structures.s_phy_reg_pkt_clause22_mess", - "ics.structures.s_phy_reg_pkt_clause45_mess", - "ics.structures.s_phy_reg_pkt", - "ics.structures.op_eth_link_mode", - "ics.structures.e_disk_format", - "ics.structures.e_disk_layout", - "ics.structures.extended_response_code", - "ics.structures.e_gptp_port", - "ics.structures.e_gptp_role", - "ics.structures.a2_btdm_mode", - "ics.structures.a2_b_node_type", - "ics.structures.flex_vnet_mode", - "ics.structures.e_device_settings_type", - "ics.structures.e_plasma_ion_vnet_channel_t", - "ics.structures.s_phy_reg_pkt_status", - "ics.structures.s_phy_reg_pkt_rw", -] - diff --git a/ics/structures/__init__.py b/ics/structures/__init__.py deleted file mode 100644 index d89406e5c..000000000 --- a/ics/structures/__init__.py +++ /dev/null @@ -1,157 +0,0 @@ -__all__ = [ - "s_extended_data_flash_header", - "tag_options_open_neo_ex", - "tag_options_find_neo_ex", - "tagicsneo_vi_command", - "st_api_firmware_info", - "can_settings", - "canfd_settings", - "swcan_settings", - "lin_settings", - "iso9141_keyword2000_init_step", - "iso9141_keyword2000_settings", - "uart_settings", - "j1708_settings", - "s_red_settings", - "s_text_api_settings", - "st_chip_versions", - "s_neo_most_gateway_settings", - "op_eth_general_settings", - "srad_gptp_settings_s", - "srad_gptp_and_tap_settings_s", - "hw_eth_settings", - "op_eth_settings", - "ethernet_settings", - "ethernet_settings2", - "ethernet10_g_settings", - "logger_settings", - "disk_settings", - "canterm_settings", - "timesync_icshardware_settings", - "s_disk_status", - "s_disk_structure", - "s_disk_details", - "s_disk_format_progress", - "start_dhcp_server_command", - "stop_dhcp_server_command", - "extended_response_generic", - "get_supported_features_response", - "version_report", - "get_component_versions", - "get_component_versions_response", - "software_update_command", - "s_ext_sub_cmd_hdr", - "timestamp_", - "port_identity", - "clock_quality_", - "system_identity", - "priority_vector", - "gptp_status", - "s_ext_sub_cmd_comm", - "serdescam_settings", - "serdespoc_settings", - "serdesgen_settings", - "rad_moon_duo_converter_settings", - "rad_reporting_settings", - "s_fire_settings", - "s_fire_vnet_settings", - "s_cyan_settings", - "svcan3_settings", - "svcan4_settings", - "svcanrf_settings", - "secu_settings", - "s_pendant_settings", - "sievb_settings", - "seevb_settings", - "srad_galaxy_settings", - "srad_star2_settings", - "srad_super_moon_settings", - "a2_b_monitor_settings", - "srada2_b_settings", - "srad_moon2_settings", - "srad_gigalog_settings", - "srad_gigastar_settings", - "s_vivid_can_settings", - "sobd2_sim_settings", - "s_cm_probe_settings", - "sobd2_pro_settings", - "svcan412_settings", - "secu_avb_settings", - "s_pluto_l2_address_lookup_entry_s", - "s_pluto_l2_address_lookup_params_s", - "s_pluto_l2_forwarding_params_s", - "s_pluto_l2_forwarding_entry_s", - "s_pluto_l2_policing_s", - "s_pluto_vlan_lookup_s", - "s_pluto_mac_config_s", - "s_pluto_retagging_entry_s", - "s_pluto_general_params_s", - "s_pluto_vl_lookup_entry_s", - "s_pluto_vl_policing_entry_s", - "s_pluto_vl_forwarding_params_s", - "s_pluto_vl_forwarding_entry_s", - "s_pluto_avb_params_s", - "s_pluto_clock_sync_params_s", - "s_pluto_ptp_params_s", - "s_pluto_custom_params_s", - "s_pluto_switch_settings_s", - "srad_pluto_settings", - "scan_sleep_id", - "scan_hub_settings", - "s_flex_vnetz_settings", - "s_neo_ecu12_settings", - "svcan4_ind_settings", - "sobd2_lc_settings", - "s_jupiter_ptp_params_s", - "srad_jupiter_switch_settings", - "srad_jupiter_settings", - "fire3_linux_settings", - "s_fire3_settings", - "s_rad_moon_duo_settings", - "s_ether_badge_settings", - "srad_epsilon_switch_settings", - "srad_epsilon_settings", - "swil_bridge_config", - "sradbms_settings", - "global_settings", - "s_device_settings", - "st_cm_iso157652_tx_message", - "iso15765_2015_tx_message", - "st_cm_iso157652_rx_message", - "spy_filter_long", - "ics_spy_message_flex_ray", - "ics_spy_message_long", - "ics_spy_message_vsb", - "ethernet_network_status_t", - "ics_fire2_device_status", - "ics_fire2_vnet_device_status", - "ics_vcan4_device_status", - "ics_flex_vnetz_device_status", - "ics_fire3_device_status", - "ics_rad_moon_duo_device_status", - "ics_rad_jupiter_device_status", - "ics_obd2_pro_device_status", - "ics_rad_pluto_device_status", - "ics_vcan4_industrial_device_status", - "ics_rad_epsilon_device_status", - "ics_rad_bms_device_status", - "ics_device_status", - "ndis_adapter_information", - "s_phy_reg_pkt_hdr", - "s_phy_reg_pkt_clause22_mess", - "s_phy_reg_pkt_clause45_mess", - "s_phy_reg_pkt", - "op_eth_link_mode", - "e_disk_format", - "e_disk_layout", - "extended_response_code", - "e_gptp_port", - "e_gptp_role", - "a2_btdm_mode", - "a2_b_node_type", - "flex_vnet_mode", - "e_device_settings_type", - "e_plasma_ion_vnet_channel_t", - "s_phy_reg_pkt_status", - "s_phy_reg_pkt_rw", -] diff --git a/ics/structures/a2_b_monitor_settings.py b/ics/structures/a2_b_monitor_settings.py deleted file mode 100644 index cbe87739a..000000000 --- a/ics/structures/a2_b_monitor_settings.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class a2_b_monitor_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('tdmMode', ctypes.c_uint8), - ('upstreamChannelOffset', ctypes.c_uint8), - ('downstreamChannelOffset', ctypes.c_uint8), - ('nodeType', ctypes.c_uint8), - ('flags', ctypes.c_uint8), - ('reserved', ctypes.c_uint8 * 15), - ] - - -A2BMonitorSettings = a2_b_monitor_settings - diff --git a/ics/structures/a2_b_node_type.py b/ics/structures/a2_b_node_type.py deleted file mode 100644 index 1719206cc..000000000 --- a/ics/structures/a2_b_node_type.py +++ /dev/null @@ -1,19 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class a2_b_node_type(enum.IntEnum): - """A ctypes-compatible IntEnum superclass.""" - @classmethod - def from_param(cls, obj): - return int(obj) - - a2bNodeTypeMonitor = 0 - a2bNodeTypeMaster = enum.auto() - a2bNodeTypeSlave = enum.auto() - - -A2BNodeType = a2_b_node_type - diff --git a/ics/structures/a2_btdm_mode.py b/ics/structures/a2_btdm_mode.py deleted file mode 100644 index abb8b0c14..000000000 --- a/ics/structures/a2_btdm_mode.py +++ /dev/null @@ -1,24 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class a2_btdm_mode(enum.IntEnum): - """A ctypes-compatible IntEnum superclass.""" - @classmethod - def from_param(cls, obj): - return int(obj) - - tdmModeTDM2 = 0 - tdmModeTDM4 = enum.auto() - tdmModeTDM8 = enum.auto() - tdmModeTDM12 = enum.auto() - tdmModeTDM16 = enum.auto() - tdmModeTDM20 = enum.auto() - tdmModeTDM24 = enum.auto() - tdmModeTDM32 = enum.auto() - - -A2BTDMMode = a2_btdm_mode - diff --git a/ics/structures/can_settings.py b/ics/structures/can_settings.py deleted file mode 100644 index d5af3f4ea..000000000 --- a/ics/structures/can_settings.py +++ /dev/null @@ -1,25 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class can_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('Mode', ctypes.c_uint8), - ('SetBaudrate', ctypes.c_uint8), - ('Baudrate', ctypes.c_uint8), - ('transceiver_mode', ctypes.c_uint8), - ('TqSeg1', ctypes.c_uint8), - ('TqSeg2', ctypes.c_uint8), - ('TqProp', ctypes.c_uint8), - ('TqSync', ctypes.c_uint8), - ('BRP', ctypes.c_uint16), - ('auto_baud', ctypes.c_uint8), - ('innerFrameDelay25us', ctypes.c_uint8), - ] - - -CAN_SETTINGS = can_settings - diff --git a/ics/structures/canfd_settings.py b/ics/structures/canfd_settings.py deleted file mode 100644 index c963f5178..000000000 --- a/ics/structures/canfd_settings.py +++ /dev/null @@ -1,24 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class canfd_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('FDMode', ctypes.c_uint8), - ('FDBaudrate', ctypes.c_uint8), - ('FDTqSeg1', ctypes.c_uint8), - ('FDTqSeg2', ctypes.c_uint8), - ('FDTqProp', ctypes.c_uint8), - ('FDTqSync', ctypes.c_uint8), - ('FDBRP', ctypes.c_uint16), - ('FDTDC', ctypes.c_uint8), - ('reserved', ctypes.c_uint8), - ] - - -_CANFD_SETTINGS = canfd_settings -CANFD_SETTINGS = canfd_settings - diff --git a/ics/structures/canterm_settings.py b/ics/structures/canterm_settings.py deleted file mode 100644 index ad9f8f648..000000000 --- a/ics/structures/canterm_settings.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class canterm_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('term_enabled', ctypes.c_uint8), - ('term_network', ctypes.c_uint8), - ('reserved', ctypes.c_uint16 * 2), - ] - - -CANTERM_SETTINGS = canterm_settings - diff --git a/ics/structures/clock_quality_.py b/ics/structures/clock_quality_.py deleted file mode 100644 index a44a70613..000000000 --- a/ics/structures/clock_quality_.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class clock_quality_(ctypes.Structure): - _pack_ = 1 - _fields_ = [ - ('clock_class', ctypes.c_uint8), - ('clock_accuracy', ctypes.c_uint8), - ('offset_scaled_log_variance', ctypes.c_uint16), - ] - - -_clock_quality = clock_quality_ - diff --git a/ics/structures/disk_settings.py b/ics/structures/disk_settings.py deleted file mode 100644 index 789382607..000000000 --- a/ics/structures/disk_settings.py +++ /dev/null @@ -1,19 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class disk_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('disk_layout', ctypes.c_uint8), - ('disk_format', ctypes.c_uint8), - ('disk_enables', ctypes.c_uint32), - ('rsvd', ctypes.c_uint8 * 8), - ] - - -DISK_SETTINGS_t = disk_settings -DISK_SETTINGS = disk_settings - diff --git a/ics/structures/e_device_settings_type.py b/ics/structures/e_device_settings_type.py deleted file mode 100644 index cc8385a98..000000000 --- a/ics/structures/e_device_settings_type.py +++ /dev/null @@ -1,54 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class e_device_settings_type(enum.IntEnum): - """A ctypes-compatible IntEnum superclass.""" - @classmethod - def from_param(cls, obj): - return int(obj) - - DeviceFireSettingsType = 0 - DeviceFireVnetSettingsType = enum.auto() - DeviceFire2SettingsType = enum.auto() - DeviceVCAN3SettingsType = enum.auto() - DeviceRADGalaxySettingsType = enum.auto() - DeviceRADStar2SettingsType = enum.auto() - DeviceVCAN4SettingsType = enum.auto() - DeviceVCAN412SettingsType = enum.auto() - DeviceVividCANSettingsType = enum.auto() - DeviceECU_AVBSettingsType = enum.auto() - DeviceRADSuperMoonSettingsType = enum.auto() - DeviceRADMoon2SettingsType = enum.auto() - DeviceRADPlutoSettingsType = enum.auto() - DeviceRADGigalogSettingsType = enum.auto() - DeviceVCANRFSettingsType = enum.auto() - DeviceEEVBSettingsType = enum.auto() - DeviceVCAN4IndSettingsType = enum.auto() - DeviceNeoECU12SettingsType = enum.auto() - DeviceFlexVnetzSettingsType = enum.auto() - DeviceCANHUBSettingsType = enum.auto() - DeviceIEVBSettingsType = enum.auto() - DeviceOBD2SimSettingsType = enum.auto() - DeviceCMProbeSettingsType = enum.auto() - DeviceOBD2ProSettingsType = enum.auto() - DeviceRedSettingsType = enum.auto() - DeviceRADPlutoSwitchSettingsType = enum.auto() - DeviceRADGigastarSettingsType = enum.auto() - DeviceRADJupiterSettingsType = enum.auto() - DeviceFire3SettingsType = enum.auto() - DeviceRadMoonDuoSettingsType = enum.auto() - DeviceEtherBadgeSettingsType = enum.auto() - DeviceRADA2BSettingsType = enum.auto() - DeviceRADEpsilonSettingsType = enum.auto() - DeviceOBD2LCSettingsType = enum.auto() - DeviceRADBMSSettingsType = enum.auto() - DeviceSettingsTypeMax = enum.auto() - DeviceSettingsNone = 4294967295 - - -_EDeviceSettingsType = e_device_settings_type -EDeviceSettingsType = e_device_settings_type - diff --git a/ics/structures/e_disk_format.py b/ics/structures/e_disk_format.py deleted file mode 100644 index 5057a6306..000000000 --- a/ics/structures/e_disk_format.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class e_disk_format(enum.IntEnum): - """A ctypes-compatible IntEnum superclass.""" - @classmethod - def from_param(cls, obj): - return int(obj) - - DiskFormatUnknown = 0 - DiskFormatFAT32 = enum.auto() - DiskFormatexFAT = enum.auto() - - -_EDiskFormat = e_disk_format -EDiskFormat = e_disk_format - diff --git a/ics/structures/e_disk_layout.py b/ics/structures/e_disk_layout.py deleted file mode 100644 index 601c94c21..000000000 --- a/ics/structures/e_disk_layout.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class e_disk_layout(enum.IntEnum): - """A ctypes-compatible IntEnum superclass.""" - @classmethod - def from_param(cls, obj): - return int(obj) - - DiskLayoutSpanned = 0 - DiskLayoutRAID0 = enum.auto() - DiskLayoutRAID1 = enum.auto() - DiskLayoutRAID5 = enum.auto() - DiskLayoutIndividual = enum.auto() - - -_EDiskLayout = e_disk_layout -EDiskLayout = e_disk_layout - diff --git a/ics/structures/e_gptp_port.py b/ics/structures/e_gptp_port.py deleted file mode 100644 index 8d257daea..000000000 --- a/ics/structures/e_gptp_port.py +++ /dev/null @@ -1,31 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class e_gptp_port(enum.IntEnum): - """A ctypes-compatible IntEnum superclass.""" - @classmethod - def from_param(cls, obj): - return int(obj) - - ePortDisabled = 0 - ePortOpEth1 = 1 - ePortOpEth2 = 2 - ePortOpEth3 = 3 - ePortOpEth4 = 4 - ePortOpEth5 = 5 - ePortOpEth6 = 6 - ePortOpEth7 = 7 - ePortOpEth8 = 8 - ePortOpEth9 = 9 - ePortOpEth10 = 10 - ePortOpEth11 = 11 - ePortOpEth12 = 12 - ePortStdEth1 = 13 - ePortStdEth2 = 14 - - -eGPTPPort = e_gptp_port - diff --git a/ics/structures/e_gptp_role.py b/ics/structures/e_gptp_role.py deleted file mode 100644 index 25891c5d2..000000000 --- a/ics/structures/e_gptp_role.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class e_gptp_role(enum.IntEnum): - """A ctypes-compatible IntEnum superclass.""" - @classmethod - def from_param(cls, obj): - return int(obj) - - eRoleDisabled = 0 - eRolePassive = 1 - eRoleMaster = 2 - eRoleSlave = 3 - - -eGPTPRole = e_gptp_role - diff --git a/ics/structures/e_plasma_ion_vnet_channel_t.py b/ics/structures/e_plasma_ion_vnet_channel_t.py deleted file mode 100644 index 14e0e7b3d..000000000 --- a/ics/structures/e_plasma_ion_vnet_channel_t.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class e_plasma_ion_vnet_channel_t(enum.IntEnum): - """A ctypes-compatible IntEnum superclass.""" - @classmethod - def from_param(cls, obj): - return int(obj) - - PlasmaIonVnetChannelMain = 0 - PlasmaIonVnetChannelA = enum.auto() - PlasmaIonVnetChannelB = enum.auto() - eSoftCore = enum.auto() - eFpgaStatusResp = enum.auto() - - -_EPlasmaIonVnetChannel_t = e_plasma_ion_vnet_channel_t -EPlasmaIonVnetChannel_t = e_plasma_ion_vnet_channel_t - diff --git a/ics/structures/ethernet10_g_settings.py b/ics/structures/ethernet10_g_settings.py deleted file mode 100644 index afff83cc8..000000000 --- a/ics/structures/ethernet10_g_settings.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class ethernet10_g_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('flags', ctypes.c_uint32), - ('ip_addr', ctypes.c_uint32), - ('netmask', ctypes.c_uint32), - ('gateway', ctypes.c_uint32), - ('link_speed', ctypes.c_uint8), - ('rsvd2', ctypes.c_uint8 * 7), - ] - - -ETHERNET10G_SETTINGS_t = ethernet10_g_settings -ETHERNET10G_SETTINGS = ethernet10_g_settings - diff --git a/ics/structures/ethernet_network_status_t.py b/ics/structures/ethernet_network_status_t.py deleted file mode 100644 index 4611fa66e..000000000 --- a/ics/structures/ethernet_network_status_t.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class ethernet_network_status_t(ctypes.Structure): - _pack_ = 1 - _fields_ = [ - ('networkId', ctypes.c_uint16), - ('linkStatus', ctypes.c_uint8), - ('linkFullDuplex', ctypes.c_uint8), - ('linkSpeed', ctypes.c_uint8), - ('linkMode', ctypes.c_uint8), - ] - - -_ethernetNetworkStatus_t = ethernet_network_status_t -ethernetNetworkStatus_t = ethernet_network_status_t - diff --git a/ics/structures/ethernet_settings.py b/ics/structures/ethernet_settings.py deleted file mode 100644 index 15159d3d8..000000000 --- a/ics/structures/ethernet_settings.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class ethernet_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('duplex', ctypes.c_uint8), - ('link_speed', ctypes.c_uint8), - ('auto_neg', ctypes.c_uint8), - ('led_mode', ctypes.c_uint8), - ('rsvd', ctypes.c_uint8 * 4), - ] - - -ETHERNET_SETTINGS_t = ethernet_settings -ETHERNET_SETTINGS = ethernet_settings - diff --git a/ics/structures/ethernet_settings2.py b/ics/structures/ethernet_settings2.py deleted file mode 100644 index fade7c2e0..000000000 --- a/ics/structures/ethernet_settings2.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class ethernet_settings2(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('flags', ctypes.c_uint8), - ('link_speed', ctypes.c_uint8), - ('ip_addr', ctypes.c_uint32), - ('netmask', ctypes.c_uint32), - ('gateway', ctypes.c_uint32), - ('rsvd', ctypes.c_uint8 * 2), - ] - - -ETHERNET_SETTINGS2_t = ethernet_settings2 -ETHERNET_SETTINGS2 = ethernet_settings2 - diff --git a/ics/structures/extended_response_code.py b/ics/structures/extended_response_code.py deleted file mode 100644 index 23b22ab56..000000000 --- a/ics/structures/extended_response_code.py +++ /dev/null @@ -1,23 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class extended_response_code(enum.IntEnum): - """A ctypes-compatible IntEnum superclass.""" - @classmethod - def from_param(cls, obj): - return int(obj) - - EXTENDED_RESPONSE_OK = 0 - EXTENDED_RESPONSE_INVALID_COMMAND = -1 - EXTENDED_RESPONSE_INVALID_STATE = -2 - EXTENDED_RESPONSE_OPERATION_FAILED = -3 - EXTENDED_RESPONSE_OPERATION_PENDING = -4 - EXTENDED_RESPONSE_INVALID_PARAMETER = -5 - - -_ExtendedResponseCode = extended_response_code -ExtendedResponseCode = extended_response_code - diff --git a/ics/structures/extended_response_generic.py b/ics/structures/extended_response_generic.py deleted file mode 100644 index 0f990553e..000000000 --- a/ics/structures/extended_response_generic.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class extended_response_generic(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('commandType', ctypes.c_uint16), - ('returnCode', ctypes.c_int32), - ] - - -_ExtendedResponseGeneric = extended_response_generic -ExtendedResponseGeneric = extended_response_generic - diff --git a/ics/structures/fire3_linux_settings.py b/ics/structures/fire3_linux_settings.py deleted file mode 100644 index 724a86b97..000000000 --- a/ics/structures/fire3_linux_settings.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class fire3_linux_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('allowBoot', ctypes.c_uint8), - ('useExternalWifiAntenna', ctypes.c_uint8), - ('reserved', ctypes.c_uint8 * 6), - ] - - -Fire3LinuxSettings = fire3_linux_settings - diff --git a/ics/structures/flex_vnet_mode.py b/ics/structures/flex_vnet_mode.py deleted file mode 100644 index 0f9f4bf5b..000000000 --- a/ics/structures/flex_vnet_mode.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class flex_vnet_mode(enum.IntEnum): - """A ctypes-compatible IntEnum superclass.""" - @classmethod - def from_param(cls, obj): - return int(obj) - - flexVnetModeDisabled = 0 - flexVnetModeOneSingle = enum.auto() - flexVnetModeOneDual = enum.auto() - flexVnetModeTwoSingle = enum.auto() - flexVnetModeColdStart = enum.auto() - - -_flexVnetMode = flex_vnet_mode -flexVnetMode = flex_vnet_mode - diff --git a/ics/structures/get_component_versions.py b/ics/structures/get_component_versions.py deleted file mode 100644 index 8bce84cfd..000000000 --- a/ics/structures/get_component_versions.py +++ /dev/null @@ -1,16 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class get_component_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('reserved', ctypes.c_uint32 * 2), - ] - - -_GetComponentVersions = get_component_versions -GetComponentVersions = get_component_versions - diff --git a/ics/structures/get_component_versions_response.py b/ics/structures/get_component_versions_response.py deleted file mode 100644 index 89ca2cd9c..000000000 --- a/ics/structures/get_component_versions_response.py +++ /dev/null @@ -1,18 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.version_report import * - - -class get_component_versions_response(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('numVersions', ctypes.c_uint16), - ('versions', VersionReport * 16), - ] - - -_ExtendedGetVersionsResponse = get_component_versions_response -GetComponentVersionsResponse = get_component_versions_response - diff --git a/ics/structures/get_supported_features_response.py b/ics/structures/get_supported_features_response.py deleted file mode 100644 index 8b9712715..000000000 --- a/ics/structures/get_supported_features_response.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class get_supported_features_response(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('cmdVersion', ctypes.c_uint16), - ('numValidBits', ctypes.c_uint16), - ('featureBitfields', ctypes.c_uint32), - ] - - -GetSupportedFeaturesResponse = get_supported_features_response - diff --git a/ics/structures/global_settings.py b/ics/structures/global_settings.py deleted file mode 100644 index 297ecb955..000000000 --- a/ics/structures/global_settings.py +++ /dev/null @@ -1,100 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.s_cm_probe_settings import * -from ics.structures.s_cyan_settings import * -from ics.structures.s_ether_badge_settings import * -from ics.structures.s_fire3_settings import * -from ics.structures.s_fire_settings import * -from ics.structures.s_fire_vnet_settings import * -from ics.structures.s_flex_vnetz_settings import * -from ics.structures.s_neo_ecu12_settings import * -from ics.structures.s_pendant_settings import * -from ics.structures.s_rad_moon_duo_settings import * -from ics.structures.s_red_settings import * -from ics.structures.s_vivid_can_settings import * -from ics.structures.scan_hub_settings import * -from ics.structures.secu_avb_settings import * -from ics.structures.secu_settings import * -from ics.structures.seevb_settings import * -from ics.structures.sievb_settings import * -from ics.structures.sobd2_lc_settings import * -from ics.structures.sobd2_pro_settings import * -from ics.structures.sobd2_sim_settings import * -from ics.structures.srad_epsilon_settings import * -from ics.structures.srad_galaxy_settings import * -from ics.structures.srad_gigalog_settings import * -from ics.structures.srad_gigastar_settings import * -from ics.structures.srad_jupiter_settings import * -from ics.structures.srad_moon2_settings import * -from ics.structures.srad_pluto_settings import * -from ics.structures.srad_star2_settings import * -from ics.structures.srad_super_moon_settings import * -from ics.structures.srada2_b_settings import * -from ics.structures.sradbms_settings import * -from ics.structures.svcan3_settings import * -from ics.structures.svcan412_settings import * -from ics.structures.svcan4_ind_settings import * -from ics.structures.svcan4_settings import * -from ics.structures.svcanrf_settings import * - - -class Nameless46561(ctypes.Union): - _pack_ = 2 - _fields_ = [ - ('red', SRedSettings), - ('fire', SFireSettings), - ('firevnet', SFireVnetSettings), - ('cyan', SCyanSettings), - ('vcan3', SVCAN3Settings), - ('vcan4', SVCAN4Settings), - ('ecu', SECUSettings), - ('ievb', SIEVBSettings), - ('pendant', SPendantSettings), - ('radgalaxy', SRADGalaxySettings), - ('radstar2', SRADStar2Settings), - ('neoobd2_sim', SOBD2SimSettings), - ('cmprobe', SCmProbeSettings), - ('obd2pro', SOBD2ProSettings), - ('vcan412', SVCAN412Settings), - ('vcan4_12', SVCAN412Settings), - ('neoecu_avb', SECU_AVBSettings), - ('radsupermoon', SRADSuperMoonSettings), - ('radmoon2', SRADMoon2Settings), - ('pluto', SRADPlutoSettings), - ('radgigalog', SRADGigalogSettings), - ('canhub', SCANHubSettings), - ('neoecu12', SNeoECU12Settings), - ('vcanrf', SVCANRFSettings), - ('eevb', SEEVBSettings), - ('flexvnetz', SFlexVnetzSettings), - ('vividcan', SVividCANSettings), - ('vcan4_ind', SVCAN4IndSettings), - ('radgigastar', SRADGigastarSettings), - ('jupiter', SRADJupiterSettings), - ('fire3', SFire3Settings), - ('radmoonduo', SRadMoonDuoSettings), - ('etherBadge', SEtherBadgeSettings), - ('rad_a2b', SRADA2BSettings), - ('epsilon', SRADEpsilonSettings), - ('obd2lc', SOBD2LCSettings), - ('rad_bms', SRADBMSSettings), - ] - - - -class global_settings(ctypes.Structure): - _pack_ = 2 - _anonymous_ = ('Nameless46561',) - _fields_ = [ - ('version', ctypes.c_uint16), - ('len', ctypes.c_uint16), - ('chksum', ctypes.c_uint16), - ('Nameless46561', Nameless46561), - ] - - -_GLOBAL_SETTINGS = global_settings -GLOBAL_SETTINGS = global_settings - diff --git a/ics/structures/gptp_status.py b/ics/structures/gptp_status.py deleted file mode 100644 index d0c89b6a9..000000000 --- a/ics/structures/gptp_status.py +++ /dev/null @@ -1,27 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.priority_vector import * -from ics.structures.timestamp_ import * - - -class gptp_status(ctypes.Structure): - _pack_ = 1 - _fields_ = [ - ('current_time', timestamp_), - ('gm_priority', priority_vector), - ('ms_offset_ns', ctypes.c_int64), - ('is_sync', ctypes.c_uint8), - ('link_status', ctypes.c_uint8), - ('link_delay_ns', ctypes.c_int64), - ('selected_role', ctypes.c_uint8), - ('as_capable', ctypes.c_uint8), - ('is_syntonized', ctypes.c_uint8), - ('reserved', ctypes.c_uint8 * 8), - ] - - -_GPTPStatus = gptp_status -GPTPStatus = gptp_status - diff --git a/ics/structures/hw_eth_settings.py b/ics/structures/hw_eth_settings.py deleted file mode 100644 index f9aec6cfc..000000000 --- a/ics/structures/hw_eth_settings.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.op_eth_general_settings import * - - -class hw_eth_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('General_Settings', OP_ETH_GENERAL_SETTINGS), - ] - - -HW_ETH_SETTINGS_t = hw_eth_settings -HW_ETH_SETTINGS = hw_eth_settings - diff --git a/ics/structures/ics_device_status.py b/ics/structures/ics_device_status.py deleted file mode 100644 index 4aef03f76..000000000 --- a/ics/structures/ics_device_status.py +++ /dev/null @@ -1,33 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.ics_fire2_device_status import * -from ics.structures.ics_fire3_device_status import * -from ics.structures.ics_flex_vnetz_device_status import * -from ics.structures.ics_obd2_pro_device_status import * -from ics.structures.ics_rad_bms_device_status import * -from ics.structures.ics_rad_jupiter_device_status import * -from ics.structures.ics_rad_moon_duo_device_status import * -from ics.structures.ics_rad_pluto_device_status import * -from ics.structures.ics_vcan4_device_status import * -from ics.structures.ics_vcan4_industrial_device_status import * - - -class ics_device_status(ctypes.Union): - _fields_ = [ - ('fire2Status', icsFire2DeviceStatus), - ('vcan4Status', icsVcan4DeviceStatus), - ('flexVnetzStatus', icsFlexVnetzDeviceStatus), - ('fire3Status', icsFire3DeviceStatus), - ('radMoonDuoStatus', icsRadMoonDuoDeviceStatus), - ('jupiterStatus', icsRadJupiterDeviceStatus), - ('obd2proStatus', icsOBD2ProDeviceStatus), - ('plutoStatus', icsRadPlutoDeviceStatus), - ('vcan4indStatus', icsVcan4IndustrialDeviceStatus), - ('radBMSStatus', icsRadBMSDeviceStatus), - ] - - -icsDeviceStatus = ics_device_status - diff --git a/ics/structures/ics_fire2_device_status.py b/ics/structures/ics_fire2_device_status.py deleted file mode 100644 index 7ef1edf2e..000000000 --- a/ics/structures/ics_fire2_device_status.py +++ /dev/null @@ -1,19 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.ethernet_network_status_t import * - - -class ics_fire2_device_status(ctypes.Structure): - _fields_ = [ - ('backupPowerGood', ctypes.c_uint8), - ('backupPowerEnabled', ctypes.c_uint8), - ('usbHostPowerEnabled', ctypes.c_uint8), - ('ethernetActivationLineEnabled', ctypes.c_uint8), - ('ethernetStatus', ethernetNetworkStatus_t), - ] - - -icsFire2DeviceStatus = ics_fire2_device_status - diff --git a/ics/structures/ics_fire2_vnet_device_status.py b/ics/structures/ics_fire2_vnet_device_status.py deleted file mode 100644 index e88297588..000000000 --- a/ics/structures/ics_fire2_vnet_device_status.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.ethernet_network_status_t import * - - -class ics_fire2_vnet_device_status(ctypes.Structure): - _fields_ = [ - ('ethernetActivationLineEnabled', ctypes.c_uint8), - ('ethernetStatus', ethernetNetworkStatus_t), - ('unused', ctypes.c_uint8), - ] - - -icsFire2VnetDeviceStatus = ics_fire2_vnet_device_status - diff --git a/ics/structures/ics_fire3_device_status.py b/ics/structures/ics_fire3_device_status.py deleted file mode 100644 index 4a81fc4a7..000000000 --- a/ics/structures/ics_fire3_device_status.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.ethernet_network_status_t import * - - -class ics_fire3_device_status(ctypes.Structure): - _fields_ = [ - ('ethernetActivationLineEnabled', ctypes.c_uint8), - ('ethernetStatus', ethernetNetworkStatus_t), - ('unused', ctypes.c_uint8), - ] - - -icsFire3DeviceStatus = ics_fire3_device_status - diff --git a/ics/structures/ics_flex_vnetz_device_status.py b/ics/structures/ics_flex_vnetz_device_status.py deleted file mode 100644 index cd2380bb2..000000000 --- a/ics/structures/ics_flex_vnetz_device_status.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.ethernet_network_status_t import * - - -class ics_flex_vnetz_device_status(ctypes.Structure): - _fields_ = [ - ('ethernetActivationLineEnabled', ctypes.c_uint8), - ('ethernetStatus', ethernetNetworkStatus_t), - ('unused', ctypes.c_uint8), - ] - - -icsFlexVnetzDeviceStatus = ics_flex_vnetz_device_status - diff --git a/ics/structures/ics_obd2_pro_device_status.py b/ics/structures/ics_obd2_pro_device_status.py deleted file mode 100644 index e9fa285f0..000000000 --- a/ics/structures/ics_obd2_pro_device_status.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.ethernet_network_status_t import * - - -class ics_obd2_pro_device_status(ctypes.Structure): - _fields_ = [ - ('ethernetStatus', ethernetNetworkStatus_t), - ] - - -icsOBD2ProDeviceStatus = ics_obd2_pro_device_status - diff --git a/ics/structures/ics_rad_bms_device_status.py b/ics/structures/ics_rad_bms_device_status.py deleted file mode 100644 index c22277fe1..000000000 --- a/ics/structures/ics_rad_bms_device_status.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.ethernet_network_status_t import * - - -class ics_rad_bms_device_status(ctypes.Structure): - _fields_ = [ - ('ethernetStatus', ethernetNetworkStatus_t), - ] - - -icsRadBMSDeviceStatus = ics_rad_bms_device_status - diff --git a/ics/structures/ics_rad_epsilon_device_status.py b/ics/structures/ics_rad_epsilon_device_status.py deleted file mode 100644 index d350061c1..000000000 --- a/ics/structures/ics_rad_epsilon_device_status.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.ethernet_network_status_t import * - - -class ics_rad_epsilon_device_status(ctypes.Structure): - _fields_ = [ - ('ethernetStatus', ethernetNetworkStatus_t), - ] - - -icsRadEpsilonDeviceStatus = ics_rad_epsilon_device_status - diff --git a/ics/structures/ics_rad_jupiter_device_status.py b/ics/structures/ics_rad_jupiter_device_status.py deleted file mode 100644 index 4e46ab84c..000000000 --- a/ics/structures/ics_rad_jupiter_device_status.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.ethernet_network_status_t import * - - -class ics_rad_jupiter_device_status(ctypes.Structure): - _fields_ = [ - ('ethernetStatus', ethernetNetworkStatus_t * 7), - ] - - -icsRadJupiterDeviceStatus = ics_rad_jupiter_device_status - diff --git a/ics/structures/ics_rad_moon_duo_device_status.py b/ics/structures/ics_rad_moon_duo_device_status.py deleted file mode 100644 index 54312ec56..000000000 --- a/ics/structures/ics_rad_moon_duo_device_status.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.ethernet_network_status_t import * - - -class ics_rad_moon_duo_device_status(ctypes.Structure): - _fields_ = [ - ('ethernetStatus', ethernetNetworkStatus_t * 4), - ] - - -icsRadMoonDuoDeviceStatus = ics_rad_moon_duo_device_status - diff --git a/ics/structures/ics_rad_pluto_device_status.py b/ics/structures/ics_rad_pluto_device_status.py deleted file mode 100644 index 47d0afdb9..000000000 --- a/ics/structures/ics_rad_pluto_device_status.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.ethernet_network_status_t import * - - -class ics_rad_pluto_device_status(ctypes.Structure): - _fields_ = [ - ('ethernetStatus', ethernetNetworkStatus_t * 4), - ] - - -icsRadPlutoDeviceStatus = ics_rad_pluto_device_status - diff --git a/ics/structures/ics_spy_message_flex_ray.py b/ics/structures/ics_spy_message_flex_ray.py deleted file mode 100644 index 021389b14..000000000 --- a/ics/structures/ics_spy_message_flex_ray.py +++ /dev/null @@ -1,96 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class Nameless18844(ctypes.Structure): - _fields_ = [ - ('id', ctypes.c_uint32, 12), - ('res1', ctypes.c_uint32, 4), - ('cycle', ctypes.c_uint32, 6), - ('chA', ctypes.c_uint32, 1), - ('chB', ctypes.c_uint32, 1), - ('startup', ctypes.c_uint32, 1), - ('sync', ctypes.c_uint32, 1), - ('null_frame', ctypes.c_uint32, 1), - ('payload_preamble', ctypes.c_uint32, 1), - ('frame_reserved', ctypes.c_uint32, 1), - ('dynamic', ctypes.c_uint32, 1), - ] - - - -class Nameless61974(ctypes.Union): - _anonymous_ = ('Nameless18844',) - _fields_ = [ - ('ArbIDOrHeader', ctypes.c_uint32), - ('Nameless18844', Nameless18844), - ] - - - -class Nameless49459(ctypes.Structure): - _fields_ = [ - ('StatusBitField3', ctypes.c_uint32), - ('StatusBitField4', ctypes.c_uint32), - ] - - - -class Nameless21903(ctypes.Structure): - _fields_ = [ - ('hcrc_msbs', ctypes.c_uint32, 3), - ('res2', ctypes.c_uint32, 5), - ('hcrc_lsbs', ctypes.c_uint32, 8), - ('frame_len_12_5ns', ctypes.c_uint32, 16), - ('fcrc0', ctypes.c_uint32, 8), - ('fcrc1', ctypes.c_uint32, 8), - ('fcrc2', ctypes.c_uint32, 8), - ('tss_len_12_5ns', ctypes.c_uint32, 8), - ] - - - -class Nameless7100(ctypes.Union): - _anonymous_ = ('Nameless49459', 'Nameless21903') - _fields_ = [ - ('Nameless49459', Nameless49459), - ('AckBytes', ctypes.c_uint8 * 8), - ('Nameless21903', Nameless21903), - ] - - - -class ics_spy_message_flex_ray(ctypes.Structure): - _anonymous_ = ('Nameless61974', 'Nameless7100') - _fields_ = [ - ('StatusBitField', ctypes.c_uint32), - ('StatusBitField2', ctypes.c_uint32), - ('TimeHardware', ctypes.c_uint32), - ('TimeHardware2', ctypes.c_uint32), - ('TimeSystem', ctypes.c_uint32), - ('TimeSystem2', ctypes.c_uint32), - ('TimeStampHardwareID', ctypes.c_uint8), - ('TimeStampSystemID', ctypes.c_uint8), - ('NetworkID', ctypes.c_uint8), - ('NodeID', ctypes.c_uint8), - ('Protocol', ctypes.c_uint8), - ('MessagePieceID', ctypes.c_uint8), - ('ExtraDataPtrEnabled', ctypes.c_uint8), - ('NumberBytesHeader', ctypes.c_uint8), - ('NumberBytesData', ctypes.c_uint8), - ('NetworkID2', ctypes.c_uint8), - ('DescriptionID', ctypes.c_uint16), - ('Nameless61974', Nameless61974), - ('Data', ctypes.c_uint8 * 8), - ('Nameless7100', Nameless7100), - ('ExtraDataPtr', ctypes.c_void_p), - ('MiscData', ctypes.c_uint8), - ('Reserved', ctypes.c_uint8 * 3), - ] - - -_icsSpyMessageFlexRay = ics_spy_message_flex_ray -icsSpyMessageFlexRay = ics_spy_message_flex_ray - diff --git a/ics/structures/ics_spy_message_long.py b/ics/structures/ics_spy_message_long.py deleted file mode 100644 index e5935aa85..000000000 --- a/ics/structures/ics_spy_message_long.py +++ /dev/null @@ -1,56 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class Nameless9992(ctypes.Structure): - _fields_ = [ - ('StatusBitField3', ctypes.c_uint32), - ('StatusBitField4', ctypes.c_uint32), - ] - - - -class Nameless65087(ctypes.Union): - _anonymous_ = ('Nameless9992',) - _fields_ = [ - ('Nameless9992', Nameless9992), - ('AckBytes', ctypes.c_uint8 * 8), - ] - - - -class ics_spy_message_long(ctypes.Structure): - _anonymous_ = ('Nameless65087',) - _fields_ = [ - ('StatusBitField', ctypes.c_uint32), - ('StatusBitField2', ctypes.c_uint32), - ('TimeHardware', ctypes.c_uint32), - ('TimeHardware2', ctypes.c_uint32), - ('TimeSystem', ctypes.c_uint32), - ('TimeSystem2', ctypes.c_uint32), - ('TimeStampHardwareID', ctypes.c_uint8), - ('TimeStampSystemID', ctypes.c_uint8), - ('NetworkID', ctypes.c_uint8), - ('NodeID', ctypes.c_uint8), - ('Protocol', ctypes.c_uint8), - ('MessagePieceID', ctypes.c_uint8), - ('ExtraDataPtrEnabled', ctypes.c_uint8), - ('NumberBytesHeader', ctypes.c_uint8), - ('NumberBytesData', ctypes.c_uint8), - ('NetworkID2', ctypes.c_uint8), - ('DescriptionID', ctypes.c_uint16), - ('ArbIDOrHeader', ctypes.c_uint32), - ('DataMsb', ctypes.c_uint32), - ('DataLsb', ctypes.c_uint32), - ('Nameless65087', Nameless65087), - ('ExtraDataPtr', ctypes.c_void_p), - ('MiscData', ctypes.c_uint8), - ('Reserved', ctypes.c_uint8 * 3), - ] - - -_icsSpyMessageLong = ics_spy_message_long -icsSpyMessageLong = ics_spy_message_long - diff --git a/ics/structures/ics_spy_message_vsb.py b/ics/structures/ics_spy_message_vsb.py deleted file mode 100644 index d7fe4b0bc..000000000 --- a/ics/structures/ics_spy_message_vsb.py +++ /dev/null @@ -1,55 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class Nameless28192(ctypes.Structure): - _fields_ = [ - ('StatusBitField3', ctypes.c_uint32), - ('StatusBitField4', ctypes.c_uint32), - ] - - - -class Nameless18906(ctypes.Union): - _anonymous_ = ('Nameless28192',) - _fields_ = [ - ('Nameless28192', Nameless28192), - ('AckBytes', ctypes.c_uint8 * 8), - ] - - - -class ics_spy_message_vsb(ctypes.Structure): - _anonymous_ = ('Nameless18906',) - _fields_ = [ - ('StatusBitField', ctypes.c_uint32), - ('StatusBitField2', ctypes.c_uint32), - ('TimeHardware', ctypes.c_uint32), - ('TimeHardware2', ctypes.c_uint32), - ('TimeSystem', ctypes.c_uint32), - ('TimeSystem2', ctypes.c_uint32), - ('TimeStampHardwareID', ctypes.c_uint8), - ('TimeStampSystemID', ctypes.c_uint8), - ('NetworkID', ctypes.c_uint8), - ('NodeID', ctypes.c_uint8), - ('Protocol', ctypes.c_uint8), - ('MessagePieceID', ctypes.c_uint8), - ('ExtraDataPtrEnabled', ctypes.c_uint8), - ('NumberBytesHeader', ctypes.c_uint8), - ('NumberBytesData', ctypes.c_uint8), - ('NetworkID2', ctypes.c_uint8), - ('DescriptionID', ctypes.c_int16), - ('ArbIDOrHeader', ctypes.c_uint32), - ('Data', ctypes.c_uint8 * 8), - ('Nameless18906', Nameless18906), - ('ExtraDataPtr', ctypes.c_uint32), - ('MiscData', ctypes.c_uint8), - ('Reserved', ctypes.c_uint8 * 3), - ] - - -_icsSpyMessageVSB = ics_spy_message_vsb -icsSpyMessageVSB = ics_spy_message_vsb - diff --git a/ics/structures/ics_vcan4_device_status.py b/ics/structures/ics_vcan4_device_status.py deleted file mode 100644 index b7695c2eb..000000000 --- a/ics/structures/ics_vcan4_device_status.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.ethernet_network_status_t import * - - -class ics_vcan4_device_status(ctypes.Structure): - _fields_ = [ - ('ethernetActivationLineEnabled', ctypes.c_uint8), - ('ethernetStatus', ethernetNetworkStatus_t), - ('unused', ctypes.c_uint8), - ] - - -icsVcan4DeviceStatus = ics_vcan4_device_status - diff --git a/ics/structures/ics_vcan4_industrial_device_status.py b/ics/structures/ics_vcan4_industrial_device_status.py deleted file mode 100644 index 2388c1807..000000000 --- a/ics/structures/ics_vcan4_industrial_device_status.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.ethernet_network_status_t import * - - -class ics_vcan4_industrial_device_status(ctypes.Structure): - _fields_ = [ - ('ethernetStatus', ethernetNetworkStatus_t), - ] - - -icsVcan4IndustrialDeviceStatus = ics_vcan4_industrial_device_status - diff --git a/ics/structures/iso15765_2015_tx_message.py b/ics/structures/iso15765_2015_tx_message.py deleted file mode 100644 index 008706e2f..000000000 --- a/ics/structures/iso15765_2015_tx_message.py +++ /dev/null @@ -1,58 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class Nameless26218(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('id_29_bit_enable', ctypes.c_uint16, 1), - ('fc_id_29_bit_enable', ctypes.c_uint16, 1), - ('ext_address_enable', ctypes.c_uint16, 1), - ('fc_ext_address_enable', ctypes.c_uint16, 1), - ('overrideSTmin', ctypes.c_uint16, 1), - ('overrideBlockSize', ctypes.c_uint16, 1), - ('paddingEnable', ctypes.c_uint16, 1), - ('iscanFD', ctypes.c_uint16, 1), - ('isBRSEnabled', ctypes.c_uint16, 1), - ('', ctypes.c_uint16, 7), - ] - - - -class Nameless59426(ctypes.Union): - _pack_ = 2 - _anonymous_ = ('Nameless26218',) - _fields_ = [ - ('Nameless26218', Nameless26218), - ('flags', ctypes.c_uint16), - ] - - - -class iso15765_2015_tx_message(ctypes.Structure): - _pack_ = 2 - _anonymous_ = ('Nameless59426',) - _fields_ = [ - ('vs_netid', ctypes.c_uint16), - ('padding', ctypes.c_uint8), - ('tx_index', ctypes.c_uint8), - ('id', ctypes.c_uint32), - ('fc_id', ctypes.c_uint32), - ('fc_id_mask', ctypes.c_uint32), - ('stMin', ctypes.c_uint8), - ('blockSize', ctypes.c_uint8), - ('flowControlExtendedAddress', ctypes.c_uint8), - ('extendedAddress', ctypes.c_uint8), - ('fs_timeout', ctypes.c_uint16), - ('fs_wait', ctypes.c_uint16), - ('data', ctypes.POINTER(ctypes.c_uint8)), - ('num_bytes', ctypes.c_uint32), - ('tx_dl', ctypes.c_uint8), - ('Nameless59426', Nameless59426), - ] - - -ISO15765_2015_TxMessage = iso15765_2015_tx_message - diff --git a/ics/structures/iso9141_keyword2000_init_step.py b/ics/structures/iso9141_keyword2000_init_step.py deleted file mode 100644 index d1e7ebc03..000000000 --- a/ics/structures/iso9141_keyword2000_init_step.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class iso9141_keyword2000_init_step(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('time_500us', ctypes.c_uint16), - ('k', ctypes.c_uint16), - ('l', ctypes.c_uint16), - ] - - -ISO9141_KEYWORD2000__INIT_STEP = iso9141_keyword2000_init_step - diff --git a/ics/structures/iso9141_keyword2000_settings.py b/ics/structures/iso9141_keyword2000_settings.py deleted file mode 100644 index 4d6699626..000000000 --- a/ics/structures/iso9141_keyword2000_settings.py +++ /dev/null @@ -1,24 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.iso9141_keyword2000_init_step import * - - -class iso9141_keyword2000_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('Baudrate', ctypes.c_uint32), - ('spbrg', ctypes.c_uint16), - ('brgh', ctypes.c_uint16), - ('init_steps', ISO9141_KEYWORD2000__INIT_STEP * 16), - ('init_step_count', ctypes.c_uint8), - ('p2_500us', ctypes.c_uint16), - ('p3_500us', ctypes.c_uint16), - ('p4_500us', ctypes.c_uint16), - ('chksum_enabled', ctypes.c_uint16), - ] - - -ISO9141_KEYWORD2000_SETTINGS = iso9141_keyword2000_settings - diff --git a/ics/structures/j1708_settings.py b/ics/structures/j1708_settings.py deleted file mode 100644 index 6d40c72d8..000000000 --- a/ics/structures/j1708_settings.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class j1708_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('enable_convert_mode', ctypes.c_uint16), - ] - - -J1708_SETTINGS = j1708_settings - diff --git a/ics/structures/lin_settings.py b/ics/structures/lin_settings.py deleted file mode 100644 index 2af464868..000000000 --- a/ics/structures/lin_settings.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class lin_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('Baudrate', ctypes.c_uint32), - ('spbrg', ctypes.c_uint16), - ('brgh', ctypes.c_uint8), - ('numBitsDelay', ctypes.c_uint8), - ('MasterResistor', ctypes.c_uint8), - ('Mode', ctypes.c_uint8), - ] - - -_LIN_SETTINGS = lin_settings -LIN_SETTINGS = lin_settings - diff --git a/ics/structures/logger_settings.py b/ics/structures/logger_settings.py deleted file mode 100644 index 98da674d7..000000000 --- a/ics/structures/logger_settings.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class logger_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('extraction_timeout', ctypes.c_uint8), - ('rsvd', ctypes.c_uint8 * 3), - ] - - -LOGGER_SETTINGS_t = logger_settings -LOGGER_SETTINGS = logger_settings - diff --git a/ics/structures/ndis_adapter_information.py b/ics/structures/ndis_adapter_information.py deleted file mode 100644 index 377f62af1..000000000 --- a/ics/structures/ndis_adapter_information.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class ndis_adapter_information(ctypes.Structure): - _fields_ = [ - ('szName', ctypes.c_char * 128), - ('szDeviceName', ctypes.c_char * 64), - ('Status', ctypes.c_ulong), - ('bMAC_Address', ctypes.c_ubyte * 6), - ('bIPV6_Address', ctypes.c_ubyte * 16), - ('bIPV4_Address', ctypes.c_ubyte * 4), - ('EthernetPinConfig', ctypes.c_ulong), - ] - - -NDIS_ADAPTER_INFORMATION = ndis_adapter_information - diff --git a/ics/structures/op_eth_general_settings.py b/ics/structures/op_eth_general_settings.py deleted file mode 100644 index 1308ad841..000000000 --- a/ics/structures/op_eth_general_settings.py +++ /dev/null @@ -1,46 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('bTapEnSwitch', ctypes.c_uint32, 1), - ('bTapEnPtp', ctypes.c_uint32, 1), - ('bEnReportLinkQuality', ctypes.c_uint32, 1), - ('bEnTapTxReceipts', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 28), - ] - - - -class Nameless19471(ctypes.Union): - _pack_ = 2 - _fields_ = [ - ('flags', flags), - ('uFlags', ctypes.c_uint32), - ] - - - -class op_eth_general_settings(ctypes.Structure): - _pack_ = 2 - _anonymous_ = ('Nameless19471',) - _fields_ = [ - ('ucInterfaceType', ctypes.c_uint8), - ('reserved0', ctypes.c_uint8 * 3), - ('tapPair0', ctypes.c_uint16), - ('tapPair1', ctypes.c_uint16), - ('tapPair2', ctypes.c_uint16), - ('tapPair3', ctypes.c_uint16), - ('tapPair4', ctypes.c_uint16), - ('tapPair5', ctypes.c_uint16), - ('Nameless19471', Nameless19471), - ] - - -OP_ETH_GENERAL_SETTINGS_t = op_eth_general_settings -OP_ETH_GENERAL_SETTINGS = op_eth_general_settings - diff --git a/ics/structures/op_eth_link_mode.py b/ics/structures/op_eth_link_mode.py deleted file mode 100644 index 8a2651029..000000000 --- a/ics/structures/op_eth_link_mode.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class op_eth_link_mode(enum.IntEnum): - """A ctypes-compatible IntEnum superclass.""" - @classmethod - def from_param(cls, obj): - return int(obj) - - OPETH_LINK_AUTO = 0 - OPETH_LINK_MASTER = enum.auto() - OPETH_LINK_SLAVE = enum.auto() - - -_opEthLinkMode = op_eth_link_mode -opEthLinkMode = op_eth_link_mode - diff --git a/ics/structures/op_eth_settings.py b/ics/structures/op_eth_settings.py deleted file mode 100644 index 34fee4d71..000000000 --- a/ics/structures/op_eth_settings.py +++ /dev/null @@ -1,43 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class Nameless23998(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mac_addr1', ctypes.c_ubyte * 6), - ('mac_addr2', ctypes.c_ubyte * 6), - ('mac_spoofing_en', ctypes.c_ushort, 1), - ('mac_spoofing_isDstOrSrc', ctypes.c_ushort, 1), - ('link_spd', ctypes.c_ushort, 2), - ('q2112_phy_mode', ctypes.c_ushort, 1), - ('reserved', ctypes.c_ushort, 11), - ] - - - -class Nameless14996(ctypes.Union): - _pack_ = 2 - _anonymous_ = ('Nameless23998',) - _fields_ = [ - ('Nameless23998', Nameless23998), - ('reserved0', ctypes.c_ubyte * 14), - ] - - - -class op_eth_settings(ctypes.Structure): - _pack_ = 2 - _anonymous_ = ('Nameless14996',) - _fields_ = [ - ('ucConfigMode', ctypes.c_uint8), - ('preemption_en', ctypes.c_ubyte), - ('Nameless14996', Nameless14996), - ] - - -OP_ETH_SETTINGS_t = op_eth_settings -OP_ETH_SETTINGS = op_eth_settings - diff --git a/ics/structures/port_identity.py b/ics/structures/port_identity.py deleted file mode 100644 index 04cc498ca..000000000 --- a/ics/structures/port_identity.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class port_identity(ctypes.Structure): - _pack_ = 1 - _fields_ = [ - ('clock_identity', ctypes.c_uint64), - ('port_number', ctypes.c_uint16), - ] - - - diff --git a/ics/structures/priority_vector.py b/ics/structures/priority_vector.py deleted file mode 100644 index 170b244b3..000000000 --- a/ics/structures/priority_vector.py +++ /dev/null @@ -1,19 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.port_identity import * -from ics.structures.system_identity import * - - -class priority_vector(ctypes.Structure): - _pack_ = 1 - _fields_ = [ - ('sysid', system_identity), - ('steps_removed', ctypes.c_uint16), - ('portid', port_identity), - ('port_number', ctypes.c_uint16), - ] - - - diff --git a/ics/structures/rad_moon_duo_converter_settings.py b/ics/structures/rad_moon_duo_converter_settings.py deleted file mode 100644 index f7f67ffad..000000000 --- a/ics/structures/rad_moon_duo_converter_settings.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class rad_moon_duo_converter_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('linkMode0', ctypes.c_uint8), - ('linkMode1', ctypes.c_uint8), - ('converter1Mode', ctypes.c_uint8), - ('ipAddress', ctypes.c_uint32), - ('ipMask', ctypes.c_uint32), - ('ipGateway', ctypes.c_uint32), - ] - - -_RadMoonDuoConverterSettings = rad_moon_duo_converter_settings -RadMoonDuoConverterSettings = rad_moon_duo_converter_settings - diff --git a/ics/structures/rad_reporting_settings.py b/ics/structures/rad_reporting_settings.py deleted file mode 100644 index cfef7f8cf..000000000 --- a/ics/structures/rad_reporting_settings.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class rad_reporting_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('flags', ctypes.c_uint32), - ('temp_interval_ms', ctypes.c_uint16), - ('gps_interval_ms', ctypes.c_uint16), - ('serdes_interval_ms', ctypes.c_uint16), - ('io_interval_ms', ctypes.c_uint16), - ('fan_speed_interval_ms', ctypes.c_uint16), - ('rsvd', ctypes.c_uint8 * 2), - ] - - -RAD_REPORTING_SETTINGS_t = rad_reporting_settings -RAD_REPORTING_SETTINGS = rad_reporting_settings - diff --git a/ics/structures/s_cm_probe_settings.py b/ics/structures/s_cm_probe_settings.py deleted file mode 100644 index 11b134263..000000000 --- a/ics/structures/s_cm_probe_settings.py +++ /dev/null @@ -1,18 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_cm_probe_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('network_enables', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ] - - -_CmProbeSettings = s_cm_probe_settings -CmProbeSettings = s_cm_probe_settings -SCmProbeSettings = s_cm_probe_settings - diff --git a/ics/structures/s_cyan_settings.py b/ics/structures/s_cyan_settings.py deleted file mode 100644 index dad58be82..000000000 --- a/ics/structures/s_cyan_settings.py +++ /dev/null @@ -1,108 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.disk_settings import * -from ics.structures.ethernet_settings import * -from ics.structures.ethernet_settings2 import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.swcan_settings import * -from ics.structures.timesync_icshardware_settings import * - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('disableUsbCheckOnBoot', ctypes.c_uint32, 1), - ('enableLatencyTest', ctypes.c_uint32, 1), - ('busMessagesToAndroid', ctypes.c_uint32, 1), - ('enablePcEthernetComm', ctypes.c_uint32, 1), - ('enableDefaultLogger', ctypes.c_uint32, 1), - ('enableDefaultUpload', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 26), - ] - - - -class s_cyan_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('can3', CAN_SETTINGS), - ('canfd3', CANFD_SETTINGS), - ('can4', CAN_SETTINGS), - ('canfd4', CANFD_SETTINGS), - ('can5', CAN_SETTINGS), - ('canfd5', CANFD_SETTINGS), - ('can6', CAN_SETTINGS), - ('canfd6', CANFD_SETTINGS), - ('can7', CAN_SETTINGS), - ('canfd7', CANFD_SETTINGS), - ('can8', CAN_SETTINGS), - ('canfd8', CANFD_SETTINGS), - ('swcan1', SWCAN_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('swcan2', SWCAN_SETTINGS), - ('network_enables_2', ctypes.c_uint16), - ('lsftcan1', CAN_SETTINGS), - ('lsftcan2', CAN_SETTINGS), - ('lin1', LIN_SETTINGS), - ('misc_io_initial_ddr', ctypes.c_uint16), - ('lin2', LIN_SETTINGS), - ('misc_io_initial_latch', ctypes.c_uint16), - ('lin3', LIN_SETTINGS), - ('misc_io_report_period', ctypes.c_uint16), - ('lin4', LIN_SETTINGS), - ('misc_io_on_report_events', ctypes.c_uint16), - ('lin5', LIN_SETTINGS), - ('misc_io_analog_enable', ctypes.c_uint16), - ('ain_sample_period', ctypes.c_uint16), - ('ain_threshold', ctypes.c_uint16), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_uint16), - ('iso_9141_kwp_enable_reserved', ctypes.c_uint16), - ('iso9141_kwp_settings_1', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_1', ctypes.c_uint16), - ('iso9141_kwp_settings_2', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_2', ctypes.c_uint16), - ('iso9141_kwp_settings_3', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_3', ctypes.c_uint16), - ('iso9141_kwp_settings_4', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_4', ctypes.c_uint16), - ('iso_msg_termination_1', ctypes.c_uint16), - ('iso_msg_termination_2', ctypes.c_uint16), - ('iso_msg_termination_3', ctypes.c_uint16), - ('iso_msg_termination_4', ctypes.c_uint16), - ('idle_wakeup_network_enables_1', ctypes.c_uint16), - ('idle_wakeup_network_enables_2', ctypes.c_uint16), - ('network_enables_3', ctypes.c_uint16), - ('idle_wakeup_network_enables_3', ctypes.c_uint16), - ('can_switch_mode', ctypes.c_uint16), - ('text_api', STextAPISettings), - ('termination_enables', ctypes.c_uint64), - ('lin6', LIN_SETTINGS), - ('ethernet', ETHERNET_SETTINGS), - ('slaveVnetA', ctypes.c_uint16), - ('slaveVnetB', ctypes.c_uint16), - ('flags', flags), - ('digitalIoThresholdTicks', ctypes.c_uint16), - ('digitalIoThresholdEnable', ctypes.c_uint16), - ('timeSync', TIMESYNC_ICSHARDWARE_SETTINGS), - ('disk', DISK_SETTINGS), - ('ethernet2', ETHERNET_SETTINGS2), - ] - - -_SCyanSettings = s_cyan_settings -SCyanSettings = s_cyan_settings - diff --git a/ics/structures/s_device_settings.py b/ics/structures/s_device_settings.py deleted file mode 100644 index df81e7548..000000000 --- a/ics/structures/s_device_settings.py +++ /dev/null @@ -1,100 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.e_device_settings_type import * -from ics.structures.s_cm_probe_settings import * -from ics.structures.s_cyan_settings import * -from ics.structures.s_ether_badge_settings import * -from ics.structures.s_fire3_settings import * -from ics.structures.s_fire_settings import * -from ics.structures.s_fire_vnet_settings import * -from ics.structures.s_flex_vnetz_settings import * -from ics.structures.s_neo_ecu12_settings import * -from ics.structures.s_pendant_settings import * -from ics.structures.s_pluto_switch_settings_s import * -from ics.structures.s_rad_moon_duo_settings import * -from ics.structures.s_red_settings import * -from ics.structures.s_vivid_can_settings import * -from ics.structures.scan_hub_settings import * -from ics.structures.secu_avb_settings import * -from ics.structures.secu_settings import * -from ics.structures.seevb_settings import * -from ics.structures.sievb_settings import * -from ics.structures.sobd2_lc_settings import * -from ics.structures.sobd2_pro_settings import * -from ics.structures.sobd2_sim_settings import * -from ics.structures.srad_epsilon_settings import * -from ics.structures.srad_galaxy_settings import * -from ics.structures.srad_gigalog_settings import * -from ics.structures.srad_gigastar_settings import * -from ics.structures.srad_jupiter_settings import * -from ics.structures.srad_moon2_settings import * -from ics.structures.srad_pluto_settings import * -from ics.structures.srad_star2_settings import * -from ics.structures.srad_super_moon_settings import * -from ics.structures.srada2_b_settings import * -from ics.structures.sradbms_settings import * -from ics.structures.svcan3_settings import * -from ics.structures.svcan412_settings import * -from ics.structures.svcan4_ind_settings import * -from ics.structures.svcan4_settings import * -from ics.structures.svcanrf_settings import * - - -class Settings(ctypes.Union): - _pack_ = 2 - _fields_ = [ - ('red', SRedSettings), - ('fire', SFireSettings), - ('firevnet', SFireVnetSettings), - ('cyan', SCyanSettings), - ('vcan3', SVCAN3Settings), - ('vcan4', SVCAN4Settings), - ('ecu', SECUSettings), - ('ievb', SIEVBSettings), - ('pendant', SPendantSettings), - ('radgalaxy', SRADGalaxySettings), - ('radstar2', SRADStar2Settings), - ('neoobd2_sim', SOBD2SimSettings), - ('cmprobe', SCmProbeSettings), - ('obd2pro', SOBD2ProSettings), - ('vcan412', SVCAN412Settings), - ('vcan4_12', SVCAN412Settings), - ('neoecu_avb', SECU_AVBSettings), - ('radsupermoon', SRADSuperMoonSettings), - ('radmoon2', SRADMoon2Settings), - ('pluto', SRADPlutoSettings), - ('plutoswitch', SPlutoSwitchSettings), - ('radgigalog', SRADGigalogSettings), - ('canhub', SCANHubSettings), - ('neoecu12', SNeoECU12Settings), - ('vcanrf', SVCANRFSettings), - ('eevb', SEEVBSettings), - ('flexvnetz', SFlexVnetzSettings), - ('vividcan', SVividCANSettings), - ('vcan4_ind', SVCAN4IndSettings), - ('obd2lc', SOBD2LCSettings), - ('radgigastar', SRADGigastarSettings), - ('jupiter', SRADJupiterSettings), - ('fire3', SFire3Settings), - ('radmoon_duo', SRadMoonDuoSettings), - ('etherBadge', SEtherBadgeSettings), - ('rad_a2b', SRADA2BSettings), - ('epsilon', SRADEpsilonSettings), - ('rad_bms', SRADBMSSettings), - ] - - - -class s_device_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('DeviceSettingType', ctypes.c_int32), - ('Settings', Settings), - ] - - -_SDeviceSettings = s_device_settings -SDeviceSettings = s_device_settings - diff --git a/ics/structures/s_disk_details.py b/ics/structures/s_disk_details.py deleted file mode 100644 index bd539c4b2..000000000 --- a/ics/structures/s_disk_details.py +++ /dev/null @@ -1,19 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.s_disk_status import * -from ics.structures.s_disk_structure import * - - -class s_disk_details(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('structure', SDiskStructure), - ('status', SDiskStatus * 12), - ] - - -_SDiskDetails = s_disk_details -SDiskDetails = s_disk_details - diff --git a/ics/structures/s_disk_format_progress.py b/ics/structures/s_disk_format_progress.py deleted file mode 100644 index 6c4fd6389..000000000 --- a/ics/structures/s_disk_format_progress.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_disk_format_progress(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('state', ctypes.c_uint16), - ('sectorsRemaining', ctypes.c_uint8 * 8), - ] - - -_SDiskFormatProgress = s_disk_format_progress -SDiskFormatProgress = s_disk_format_progress - diff --git a/ics/structures/s_disk_status.py b/ics/structures/s_disk_status.py deleted file mode 100644 index 69f7b0bac..000000000 --- a/ics/structures/s_disk_status.py +++ /dev/null @@ -1,18 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_disk_status(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('status', ctypes.c_uint16), - ('sectors', ctypes.c_uint8 * 8), - ('bytesPerSector', ctypes.c_uint8 * 4), - ] - - -_SDiskStatus = s_disk_status -SDiskStatus = s_disk_status - diff --git a/ics/structures/s_disk_structure.py b/ics/structures/s_disk_structure.py deleted file mode 100644 index 130a77fb7..000000000 --- a/ics/structures/s_disk_structure.py +++ /dev/null @@ -1,18 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.disk_settings import * - - -class s_disk_structure(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('settings', DISK_SETTINGS), - ('options', ctypes.c_uint16), - ] - - -_SDiskStructure = s_disk_structure -SDiskStructure = s_disk_structure - diff --git a/ics/structures/s_ether_badge_settings.py b/ics/structures/s_ether_badge_settings.py deleted file mode 100644 index 7b37b831a..000000000 --- a/ics/structures/s_ether_badge_settings.py +++ /dev/null @@ -1,63 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.ethernet_settings import * -from ics.structures.ethernet_settings2 import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.s_text_api_settings import * - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('disableUsbCheckOnBoot', ctypes.c_uint32, 1), - ('enableLatencyTest', ctypes.c_uint32, 1), - ('enablePcEthernetComm', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 29), - ] - - - -class s_ether_badge_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('lin1', LIN_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('network_enables_3', ctypes.c_uint16), - ('termination_enables', ctypes.c_uint64), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_int16), - ('iso9141_kwp_enable_reserved', ctypes.c_uint16), - ('iso_tester_pullup_enable', ctypes.c_uint16), - ('iso_parity', ctypes.c_uint16), - ('iso_msg_termination', ctypes.c_uint16), - ('iso9141_kwp_settings', ISO9141_KEYWORD2000_SETTINGS), - ('ethernet', ETHERNET_SETTINGS), - ('misc_io_initial_ddr', ctypes.c_uint16), - ('misc_io_initial_latch', ctypes.c_uint16), - ('misc_io_report_period', ctypes.c_uint16), - ('misc_io_on_report_events', ctypes.c_uint16), - ('misc_io_analog_enable', ctypes.c_uint16), - ('ain_sample_period', ctypes.c_uint16), - ('ain_threshold', ctypes.c_uint16), - ('text_api', STextAPISettings), - ('flags', flags), - ('ethernet2', ETHERNET_SETTINGS2), - ] - - -_SEtherBadgeSettings = s_ether_badge_settings -SEtherBadgeSettings = s_ether_badge_settings - diff --git a/ics/structures/s_ext_sub_cmd_comm.py b/ics/structures/s_ext_sub_cmd_comm.py deleted file mode 100644 index 3378900bd..000000000 --- a/ics/structures/s_ext_sub_cmd_comm.py +++ /dev/null @@ -1,47 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.extended_response_generic import * -from ics.structures.get_component_versions import * -from ics.structures.get_component_versions_response import * -from ics.structures.get_supported_features_response import * -from ics.structures.gptp_status import * -from ics.structures.s_disk_details import * -from ics.structures.s_disk_format_progress import * -from ics.structures.s_disk_structure import * -from ics.structures.s_ext_sub_cmd_hdr import * -from ics.structures.software_update_command import * -from ics.structures.start_dhcp_server_command import * -from ics.structures.stop_dhcp_server_command import * - - -class extension(ctypes.Union): - _pack_ = 2 - _fields_ = [ - ('structure', SDiskStructure), - ('details', SDiskDetails), - ('progress', SDiskFormatProgress), - ('startDHCPServer', StartDHCPServerCommand), - ('stopDHCPServer', StopDHCPServerCommand), - ('getSupportedFeatures', GetSupportedFeaturesResponse), - ('genericResponse', ExtendedResponseGeneric), - ('gptpStatus', GPTPStatus), - ('getComponentVersions', GetComponentVersions), - ('softwareUpdate', SoftwareUpdateCommand), - ('getComponentVersionsResponse', GetComponentVersionsResponse), - ] - - - -class s_ext_sub_cmd_comm(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('header', SExtSubCmdHdr), - ('extension', extension), - ] - - -_SExtSubCmdComm = s_ext_sub_cmd_comm -SExtSubCmdComm = s_ext_sub_cmd_comm - diff --git a/ics/structures/s_ext_sub_cmd_hdr.py b/ics/structures/s_ext_sub_cmd_hdr.py deleted file mode 100644 index 627225a92..000000000 --- a/ics/structures/s_ext_sub_cmd_hdr.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_ext_sub_cmd_hdr(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('command', ctypes.c_uint16), - ('length', ctypes.c_uint16), - ] - - -_SExtSubCmdHdr = s_ext_sub_cmd_hdr -SExtSubCmdHdr = s_ext_sub_cmd_hdr - diff --git a/ics/structures/s_extended_data_flash_header.py b/ics/structures/s_extended_data_flash_header.py deleted file mode 100644 index ea2e56eae..000000000 --- a/ics/structures/s_extended_data_flash_header.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_extended_data_flash_header(ctypes.Structure): - _fields_ = [ - ('version', ctypes.c_uint16), - ('chksum', ctypes.c_uint16), - ('len', ctypes.c_uint32), - ] - - -SExtendedDataFlashHeader = s_extended_data_flash_header -ExtendedDataFlashHeader_t = s_extended_data_flash_header - diff --git a/ics/structures/s_fire3_settings.py b/ics/structures/s_fire3_settings.py deleted file mode 100644 index f7ec33f77..000000000 --- a/ics/structures/s_fire3_settings.py +++ /dev/null @@ -1,110 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.disk_settings import * -from ics.structures.ethernet_settings import * -from ics.structures.ethernet_settings2 import * -from ics.structures.fire3_linux_settings import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.timesync_icshardware_settings import * - - -class Nameless63050(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('network_enables_3', ctypes.c_uint16), - ('network_enables_4', ctypes.c_uint16), - ] - - - -class network_enables(ctypes.Union): - _pack_ = 2 - _anonymous_ = ('Nameless63050',) - _fields_ = [ - ('word', ctypes.c_uint64), - ('Nameless63050', Nameless63050), - ] - - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('disableUsbCheckOnBoot', ctypes.c_uint32, 1), - ('enableLatencyTest', ctypes.c_uint32, 1), - ('busMessagesToAndroid', ctypes.c_uint32, 1), - ('enablePcEthernetComm', ctypes.c_uint32, 1), - ('enableDefaultLogger', ctypes.c_uint32, 1), - ('enableDefaultUpload', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 26), - ] - - - -class s_fire3_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('misc_io_on_report_events', ctypes.c_uint16), - ('pwr_man_enable', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_int16), - ('slaveVnetA', ctypes.c_uint16), - ('reserved', ctypes.c_uint32), - ('termination_enables', ctypes.c_uint64), - ('network_enables', network_enables), - ('pwr_man_timeout', ctypes.c_uint32), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('can3', CAN_SETTINGS), - ('canfd3', CANFD_SETTINGS), - ('can4', CAN_SETTINGS), - ('canfd4', CANFD_SETTINGS), - ('can5', CAN_SETTINGS), - ('canfd5', CANFD_SETTINGS), - ('can6', CAN_SETTINGS), - ('canfd6', CANFD_SETTINGS), - ('can7', CAN_SETTINGS), - ('canfd7', CANFD_SETTINGS), - ('can8', CAN_SETTINGS), - ('canfd8', CANFD_SETTINGS), - ('lin1', LIN_SETTINGS), - ('lin2', LIN_SETTINGS), - ('iso9141_kwp_settings_1', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_1', ctypes.c_uint16), - ('iso_msg_termination_1', ctypes.c_uint16), - ('iso9141_kwp_settings_2', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_2', ctypes.c_uint16), - ('iso_msg_termination_2', ctypes.c_uint16), - ('ethernet_1', ETHERNET_SETTINGS), - ('timeSync', TIMESYNC_ICSHARDWARE_SETTINGS), - ('text_api', STextAPISettings), - ('flags', flags), - ('disk', DISK_SETTINGS), - ('misc_io_report_period', ctypes.c_uint16), - ('ain_threshold', ctypes.c_uint16), - ('misc_io_analog_enable', ctypes.c_uint16), - ('digitalIoThresholdTicks', ctypes.c_uint16), - ('digitalIoThresholdEnable', ctypes.c_uint16), - ('misc_io_initial_ddr', ctypes.c_uint16), - ('misc_io_initial_latch', ctypes.c_uint16), - ('ethernet2_1', ETHERNET_SETTINGS2), - ('ethernet_2', ETHERNET_SETTINGS), - ('ethernet2_2', ETHERNET_SETTINGS2), - ('os_settings', Fire3LinuxSettings), - ] - - -_SFire3Settings = s_fire3_settings -SFire3Settings = s_fire3_settings - diff --git a/ics/structures/s_fire_settings.py b/ics/structures/s_fire_settings.py deleted file mode 100644 index 64f517c05..000000000 --- a/ics/structures/s_fire_settings.py +++ /dev/null @@ -1,72 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.s_neo_most_gateway_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.swcan_settings import * -from ics.structures.uart_settings import * - - -class s_fire_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('can1', CAN_SETTINGS), - ('can2', CAN_SETTINGS), - ('can3', CAN_SETTINGS), - ('can4', CAN_SETTINGS), - ('swcan', SWCAN_SETTINGS), - ('lsftcan', CAN_SETTINGS), - ('lin1', LIN_SETTINGS), - ('lin2', LIN_SETTINGS), - ('lin3', LIN_SETTINGS), - ('lin4', LIN_SETTINGS), - ('cgi_enable_reserved', ctypes.c_uint16), - ('cgi_baud', ctypes.c_uint16), - ('cgi_tx_ifs_bit_times', ctypes.c_uint16), - ('cgi_rx_ifs_bit_times', ctypes.c_uint16), - ('cgi_chksum_enable', ctypes.c_uint16), - ('network_enables', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('pwm_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('misc_io_initial_ddr', ctypes.c_uint16), - ('misc_io_initial_latch', ctypes.c_uint16), - ('misc_io_analog_enable', ctypes.c_uint16), - ('misc_io_report_period', ctypes.c_uint16), - ('misc_io_on_report_events', ctypes.c_uint16), - ('ain_sample_period', ctypes.c_uint16), - ('ain_threshold', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_uint16), - ('iso9141_kwp_enable_reserved', ctypes.c_uint16), - ('iso9141_kwp_settings', ISO9141_KEYWORD2000_SETTINGS), - ('perf_en', ctypes.c_uint16), - ('iso_parity', ctypes.c_uint16), - ('iso_msg_termination', ctypes.c_uint16), - ('iso_tester_pullup_enable', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('iso9141_kwp_settings_2', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_2', ctypes.c_uint16), - ('iso_msg_termination_2', ctypes.c_uint16), - ('iso9141_kwp_settings_3', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_3', ctypes.c_uint16), - ('iso_msg_termination_3', ctypes.c_uint16), - ('iso9141_kwp_settings_4', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_4', ctypes.c_uint16), - ('iso_msg_termination_4', ctypes.c_uint16), - ('fast_init_network_enables_1', ctypes.c_uint16), - ('fast_init_network_enables_2', ctypes.c_uint16), - ('uart', UART_SETTINGS), - ('uart2', UART_SETTINGS), - ('text_api', STextAPISettings), - ('neoMostGateway', SNeoMostGatewaySettings), - ('vnetBits', ctypes.c_uint16), - ] - - -_SFireSettings = s_fire_settings -SFireSettings = s_fire_settings - diff --git a/ics/structures/s_fire_vnet_settings.py b/ics/structures/s_fire_vnet_settings.py deleted file mode 100644 index 18bc589aa..000000000 --- a/ics/structures/s_fire_vnet_settings.py +++ /dev/null @@ -1,76 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.s_neo_most_gateway_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.swcan_settings import * -from ics.structures.uart_settings import * - - -class s_fire_vnet_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('can1', CAN_SETTINGS), - ('can2', CAN_SETTINGS), - ('can3', CAN_SETTINGS), - ('can4', CAN_SETTINGS), - ('swcan', SWCAN_SETTINGS), - ('lsftcan', CAN_SETTINGS), - ('lin1', LIN_SETTINGS), - ('lin2', LIN_SETTINGS), - ('lin3', LIN_SETTINGS), - ('lin4', LIN_SETTINGS), - ('cgi_enable_reserved', ctypes.c_uint16), - ('cgi_baud', ctypes.c_uint16), - ('cgi_tx_ifs_bit_times', ctypes.c_uint16), - ('cgi_rx_ifs_bit_times', ctypes.c_uint16), - ('cgi_chksum_enable', ctypes.c_uint16), - ('network_enables', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('pwm_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('misc_io_initial_ddr', ctypes.c_uint16), - ('misc_io_initial_latch', ctypes.c_uint16), - ('misc_io_analog_enable', ctypes.c_uint16), - ('misc_io_report_period', ctypes.c_uint16), - ('misc_io_on_report_events', ctypes.c_uint16), - ('ain_sample_period', ctypes.c_uint16), - ('ain_threshold', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_uint16), - ('iso9141_kwp_enable_reserved', ctypes.c_uint16), - ('iso9141_kwp_settings', ISO9141_KEYWORD2000_SETTINGS), - ('perf_en', ctypes.c_uint16), - ('iso_parity', ctypes.c_uint16), - ('iso_msg_termination', ctypes.c_uint16), - ('iso_tester_pullup_enable', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('iso9141_kwp_settings_2', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_2', ctypes.c_uint16), - ('iso_msg_termination_2', ctypes.c_uint16), - ('iso9141_kwp_settings_3', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_3', ctypes.c_uint16), - ('iso_msg_termination_3', ctypes.c_uint16), - ('iso9141_kwp_settings_4', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_4', ctypes.c_uint16), - ('iso_msg_termination_4', ctypes.c_uint16), - ('fast_init_network_enables_1', ctypes.c_uint16), - ('fast_init_network_enables_2', ctypes.c_uint16), - ('uart', UART_SETTINGS), - ('uart2', UART_SETTINGS), - ('text_api', STextAPISettings), - ('neoMostGateway', SNeoMostGatewaySettings), - ('vnetBits', ctypes.c_uint16), - ('can5', CAN_SETTINGS), - ('can6', CAN_SETTINGS), - ('lin5', LIN_SETTINGS), - ('swcan2', SWCAN_SETTINGS), - ] - - -_SFireVnetSettings = s_fire_vnet_settings -SFireVnetSettings = s_fire_vnet_settings - diff --git a/ics/structures/s_flex_vnetz_settings.py b/ics/structures/s_flex_vnetz_settings.py deleted file mode 100644 index b3ca5a23a..000000000 --- a/ics/structures/s_flex_vnetz_settings.py +++ /dev/null @@ -1,88 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.disk_settings import * -from ics.structures.ethernet_settings import * -from ics.structures.ethernet_settings2 import * -from ics.structures.s_text_api_settings import * -from ics.structures.timesync_icshardware_settings import * - - -class Nameless35335(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('network_enables_3', ctypes.c_uint16), - ] - - - -class network_enables(ctypes.Union): - _pack_ = 2 - _anonymous_ = ('Nameless35335',) - _fields_ = [ - ('word', ctypes.c_uint64), - ('Nameless35335', Nameless35335), - ] - - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('disableUsbCheckOnBoot', ctypes.c_uint32, 1), - ('enableLatencyTest', ctypes.c_uint32, 1), - ('busMessagesToAndroid', ctypes.c_uint32, 1), - ('enablePcEthernetComm', ctypes.c_uint32, 1), - ('enableDefaultLogger', ctypes.c_uint32, 1), - ('enableDefaultUpload', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 26), - ] - - - -class s_flex_vnetz_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('misc_io_on_report_events', ctypes.c_uint16), - ('pwr_man_enable', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_int16), - ('flex_mode', ctypes.c_uint16), - ('flex_termination', ctypes.c_uint16), - ('slaveVnetA', ctypes.c_uint16), - ('termination_enables', ctypes.c_uint64), - ('network_enables', network_enables), - ('pwr_man_timeout', ctypes.c_uint32), - ('slaveVnetB', ctypes.c_uint16), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('can3', CAN_SETTINGS), - ('canfd3', CANFD_SETTINGS), - ('can4', CAN_SETTINGS), - ('canfd4', CANFD_SETTINGS), - ('can5', CAN_SETTINGS), - ('canfd5', CANFD_SETTINGS), - ('can6', CAN_SETTINGS), - ('canfd6', CANFD_SETTINGS), - ('can7', CAN_SETTINGS), - ('canfd7', CANFD_SETTINGS), - ('ethernet', ETHERNET_SETTINGS), - ('timeSync', TIMESYNC_ICSHARDWARE_SETTINGS), - ('text_api', STextAPISettings), - ('flags', flags), - ('disk', DISK_SETTINGS), - ('ethernet2', ETHERNET_SETTINGS2), - ] - - -_SFlexVnetzSettings = s_flex_vnetz_settings -SFlexVnetzSettings = s_flex_vnetz_settings - diff --git a/ics/structures/s_jupiter_ptp_params_s.py b/ics/structures/s_jupiter_ptp_params_s.py deleted file mode 100644 index 08527d0d4..000000000 --- a/ics/structures/s_jupiter_ptp_params_s.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_jupiter_ptp_params_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('neighborPropDelay', ctypes.c_uint32), - ('initLogPDelayReqInterval', ctypes.c_int8), - ('initLogSyncInterval', ctypes.c_int8), - ('operationLogPDelayReqInterval', ctypes.c_int8), - ('operationLogSyncInterval', ctypes.c_int8), - ('gPTPportRole', ctypes.c_uint8 * 8), - ] - - -SJupiterPtpParams_s = s_jupiter_ptp_params_s -JupiterPtpParams_t = s_jupiter_ptp_params_s - diff --git a/ics/structures/s_neo_ecu12_settings.py b/ics/structures/s_neo_ecu12_settings.py deleted file mode 100644 index d6aa88663..000000000 --- a/ics/structures/s_neo_ecu12_settings.py +++ /dev/null @@ -1,63 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.swcan_settings import * - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('disableUsbCheckOnBoot', ctypes.c_uint32, 1), - ('enableLatencyTest', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 30), - ] - - - -class s_neo_ecu12_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('ecu_id', ctypes.c_uint32), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('swcan1', SWCAN_SETTINGS), - ('swcan2', SWCAN_SETTINGS), - ('lsftcan1', CAN_SETTINGS), - ('lsftcan2', CAN_SETTINGS), - ('lin1', LIN_SETTINGS), - ('network_enables', ctypes.c_uint64), - ('network_enabled_on_boot', ctypes.c_uint16), - ('termination_enables', ctypes.c_uint64), - ('can_switch_mode', ctypes.c_uint16), - ('iso_9141_kwp_enable_reserved', ctypes.c_uint16), - ('iso9141_kwp_settings', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity', ctypes.c_uint16), - ('iso_msg_termination', ctypes.c_uint16), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('perf_en', ctypes.c_uint16), - ('misc_io_initial_ddr', ctypes.c_uint16), - ('misc_io_initial_latch', ctypes.c_uint16), - ('misc_io_analog_enable', ctypes.c_uint16), - ('misc_io_report_period', ctypes.c_uint16), - ('misc_io_on_report_events', ctypes.c_uint16), - ('ain_sample_period', ctypes.c_uint16), - ('ain_threshold', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_int16), - ('text_api', STextAPISettings), - ('flags', flags), - ('reserved_field', ctypes.c_uint32 * 2), - ] - - -_NeoECU12Settings = s_neo_ecu12_settings -SNeoECU12Settings = s_neo_ecu12_settings - diff --git a/ics/structures/s_neo_most_gateway_settings.py b/ics/structures/s_neo_most_gateway_settings.py deleted file mode 100644 index 22892504f..000000000 --- a/ics/structures/s_neo_most_gateway_settings.py +++ /dev/null @@ -1,18 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_neo_most_gateway_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('netId', ctypes.c_uint16), - ('zero0', ctypes.c_uint8), - ('Config', ctypes.c_uint8), - ] - - -_SNeoMostGatewaySettings = s_neo_most_gateway_settings -SNeoMostGatewaySettings = s_neo_most_gateway_settings - diff --git a/ics/structures/s_pendant_settings.py b/ics/structures/s_pendant_settings.py deleted file mode 100644 index be37f8f1c..000000000 --- a/ics/structures/s_pendant_settings.py +++ /dev/null @@ -1,53 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.swcan_settings import * -from ics.structures.uart_settings import * - - -class s_pendant_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('ecu_id', ctypes.c_uint32), - ('selected_network', ctypes.c_uint16), - ('can1', CAN_SETTINGS), - ('can2', CAN_SETTINGS), - ('lin1', LIN_SETTINGS), - ('lin2', LIN_SETTINGS), - ('iso15765_separation_time_offset', ctypes.c_uint16), - ('iso9141_kwp_settings', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity', ctypes.c_uint16), - ('iso_msg_termination', ctypes.c_uint16), - ('iso9141_kwp_settings_2', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_2', ctypes.c_uint16), - ('iso_msg_termination_2', ctypes.c_uint16), - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('misc_io_initial_ddr', ctypes.c_uint16), - ('misc_io_initial_latch', ctypes.c_uint16), - ('misc_io_analog_enable', ctypes.c_uint16), - ('misc_io_report_period', ctypes.c_uint16), - ('misc_io_on_report_events', ctypes.c_uint16), - ('ain_sample_period', ctypes.c_uint16), - ('ain_threshold', ctypes.c_uint16), - ('swcan', SWCAN_SETTINGS), - ('swcan2', SWCAN_SETTINGS), - ('lsftcan', CAN_SETTINGS), - ('lsftcan2', CAN_SETTINGS), - ('uart', UART_SETTINGS), - ('uart2', UART_SETTINGS), - ('text_api', STextAPISettings), - ] - - -_SPendantSettings = s_pendant_settings -SPendantSettings = s_pendant_settings - diff --git a/ics/structures/s_phy_reg_pkt.py b/ics/structures/s_phy_reg_pkt.py deleted file mode 100644 index f0ec91975..000000000 --- a/ics/structures/s_phy_reg_pkt.py +++ /dev/null @@ -1,49 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.s_phy_reg_pkt_clause22_mess import * -from ics.structures.s_phy_reg_pkt_clause45_mess import * - - -class Nameless3555(ctypes.Structure): - _fields_ = [ - ('Enabled', ctypes.c_uint16, 1), - ('WriteEnable', ctypes.c_uint16, 1), - ('Clause45Enable', ctypes.c_uint16, 1), - ('status', ctypes.c_uint16, 2), - ('reserved', ctypes.c_uint16, 3), - ('BusIndex', ctypes.c_uint16, 4), - ('version', ctypes.c_uint16, 4), - ] - - - -class Nameless45381(ctypes.Union): - _anonymous_ = ('Nameless3555',) - _fields_ = [ - ('Nameless3555', Nameless3555), - ('flags', ctypes.c_uint16), - ] - - - -class Nameless14534(ctypes.Union): - _fields_ = [ - ('clause22', PhyRegPktClause22Mess_t), - ('clause45', PhyRegPktClause45Mess_t), - ] - - - -class s_phy_reg_pkt(ctypes.Structure): - _anonymous_ = ('Nameless45381', 'Nameless14534') - _fields_ = [ - ('Nameless45381', Nameless45381), - ('Nameless14534', Nameless14534), - ] - - -SPhyRegPkt = s_phy_reg_pkt -PhyRegPkt_t = s_phy_reg_pkt - diff --git a/ics/structures/s_phy_reg_pkt_clause22_mess.py b/ics/structures/s_phy_reg_pkt_clause22_mess.py deleted file mode 100644 index 73e89478b..000000000 --- a/ics/structures/s_phy_reg_pkt_clause22_mess.py +++ /dev/null @@ -1,18 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_phy_reg_pkt_clause22_mess(ctypes.Structure): - _fields_ = [ - ('phyAddr', ctypes.c_uint8), - ('page', ctypes.c_uint8), - ('regAddr', ctypes.c_uint16), - ('regVal', ctypes.c_uint16), - ] - - -SPhyRegPktClause22Mess = s_phy_reg_pkt_clause22_mess -PhyRegPktClause22Mess_t = s_phy_reg_pkt_clause22_mess - diff --git a/ics/structures/s_phy_reg_pkt_clause45_mess.py b/ics/structures/s_phy_reg_pkt_clause45_mess.py deleted file mode 100644 index 427a14306..000000000 --- a/ics/structures/s_phy_reg_pkt_clause45_mess.py +++ /dev/null @@ -1,18 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_phy_reg_pkt_clause45_mess(ctypes.Structure): - _fields_ = [ - ('port', ctypes.c_uint8), - ('device', ctypes.c_uint8), - ('regAddr', ctypes.c_uint16), - ('regVal', ctypes.c_uint16), - ] - - -SPhyRegPktClause45Mess = s_phy_reg_pkt_clause45_mess -PhyRegPktClause45Mess_t = s_phy_reg_pkt_clause45_mess - diff --git a/ics/structures/s_phy_reg_pkt_hdr.py b/ics/structures/s_phy_reg_pkt_hdr.py deleted file mode 100644 index 5a51b03e0..000000000 --- a/ics/structures/s_phy_reg_pkt_hdr.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_phy_reg_pkt_hdr(ctypes.Structure): - _fields_ = [ - ('numEntries', ctypes.c_uint16), - ('version', ctypes.c_uint8), - ('entryBytes', ctypes.c_uint8), - ] - - -SPhyRegPktHdr = s_phy_reg_pkt_hdr -PhyRegPktHdr_t = s_phy_reg_pkt_hdr - diff --git a/ics/structures/s_phy_reg_pkt_rw.py b/ics/structures/s_phy_reg_pkt_rw.py deleted file mode 100644 index 2ce81bf03..000000000 --- a/ics/structures/s_phy_reg_pkt_rw.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_phy_reg_pkt_rw(enum.IntEnum): - """A ctypes-compatible IntEnum superclass.""" - @classmethod - def from_param(cls, obj): - return int(obj) - - PHYREG_READ = 0 - PHYREG_WRITE = enum.auto() - PHYREG_BOTH = enum.auto() - - -SPhyRegPktRw = s_phy_reg_pkt_rw -PhyRegPktRw_t = s_phy_reg_pkt_rw - diff --git a/ics/structures/s_phy_reg_pkt_status.py b/ics/structures/s_phy_reg_pkt_status.py deleted file mode 100644 index ec4e70e81..000000000 --- a/ics/structures/s_phy_reg_pkt_status.py +++ /dev/null @@ -1,25 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_phy_reg_pkt_status(enum.IntEnum): - """A ctypes-compatible IntEnum superclass.""" - @classmethod - def from_param(cls, obj): - return int(obj) - - PHYREG_SUCCESS = 0 - PHYREG_FAILURE = enum.auto() - PHYREG_INVALID_MDIO_BUS_INDEX = enum.auto() - PHYREG_INVALID_PHY_ADDR = enum.auto() - PHYREG_RESERVED0 = enum.auto() - PHYREG_RESERVED1 = enum.auto() - PHYREG_RESERVED2 = enum.auto() - PHYREG_RESERVED3 = enum.auto() - - -SPhyRegPktStatus = s_phy_reg_pkt_status -PhyRegPktStatus_t = s_phy_reg_pkt_status - diff --git a/ics/structures/s_pluto_avb_params_s.py b/ics/structures/s_pluto_avb_params_s.py deleted file mode 100644 index 80b222e72..000000000 --- a/ics/structures/s_pluto_avb_params_s.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_pluto_avb_params_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('destmeta', ctypes.c_uint64), - ('srcmeta', ctypes.c_uint64), - ] - - -SPluto_AVBParams_s = s_pluto_avb_params_s -SPluto_AVBParams = s_pluto_avb_params_s - diff --git a/ics/structures/s_pluto_clock_sync_params_s.py b/ics/structures/s_pluto_clock_sync_params_s.py deleted file mode 100644 index 85d9ea0bb..000000000 --- a/ics/structures/s_pluto_clock_sync_params_s.py +++ /dev/null @@ -1,60 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_pluto_clock_sync_params_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('etssrcpcf', ctypes.c_uint64), - ('wfintmout', ctypes.c_uint32), - ('maxtranspclk', ctypes.c_uint32), - ('listentmout', ctypes.c_uint32), - ('intcydur', ctypes.c_uint32), - ('caentmout', ctypes.c_uint32), - ('pcfsze', ctypes.c_uint16), - ('obvwinsz', ctypes.c_uint16), - ('vlidout', ctypes.c_uint16), - ('vlidimnmin', ctypes.c_uint16), - ('vlidinmax', ctypes.c_uint16), - ('accdevwin', ctypes.c_uint16), - ('srcport', ctypes.c_uint8 * 8), - ('waitthsync', ctypes.c_uint8), - ('unsytotsyth', ctypes.c_uint8), - ('unsytosyth', ctypes.c_uint8), - ('tsytosyth', ctypes.c_uint8), - ('tsyth', ctypes.c_uint8), - ('tsytousyth', ctypes.c_uint8), - ('syth', ctypes.c_uint8), - ('sytousyth', ctypes.c_uint8), - ('sypriority', ctypes.c_uint8), - ('sydomain', ctypes.c_uint8), - ('stth', ctypes.c_uint8), - ('sttointth', ctypes.c_uint8), - ('pcfpriority', ctypes.c_uint8), - ('numunstbcy', ctypes.c_uint8), - ('numstbcy', ctypes.c_uint8), - ('maxintegcy', ctypes.c_uint8), - ('inttotentth', ctypes.c_uint8), - ('inttosyncth', ctypes.c_uint8), - ('vlidselect', ctypes.c_uint8), - ('tentsyrelen', ctypes.c_uint8), - ('asytensyen', ctypes.c_uint8), - ('sytostben', ctypes.c_uint8), - ('syrelen', ctypes.c_uint8), - ('sysyen', ctypes.c_uint8), - ('syasyen', ctypes.c_uint8), - ('ipcframesy', ctypes.c_uint8), - ('stabasyen', ctypes.c_uint8), - ('swmaster', ctypes.c_uint8), - ('fullcbg', ctypes.c_uint8), - ('pad1', ctypes.c_uint8), - ('pad2', ctypes.c_uint8), - ('pad3', ctypes.c_uint8), - ] - - -SPluto_ClockSyncParams_s = s_pluto_clock_sync_params_s -SPluto_ClockSyncParams = s_pluto_clock_sync_params_s - diff --git a/ics/structures/s_pluto_custom_params_s.py b/ics/structures/s_pluto_custom_params_s.py deleted file mode 100644 index 393184609..000000000 --- a/ics/structures/s_pluto_custom_params_s.py +++ /dev/null @@ -1,23 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.s_pluto_ptp_params_s import * - - -class s_pluto_custom_params_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mode', ctypes.c_uint8 * 5), - ('speed', ctypes.c_uint8 * 5), - ('enablePhy', ctypes.c_uint8 * 5), - ('ae1Select', ctypes.c_uint8), - ('usbSelect', ctypes.c_uint8), - ('pad', ctypes.c_uint8), - ('ptpParams', PlutoPtpParams_t), - ] - - -SPluto_CustomParams_s = s_pluto_custom_params_s -SPluto_CustomParams = s_pluto_custom_params_s - diff --git a/ics/structures/s_pluto_general_params_s.py b/ics/structures/s_pluto_general_params_s.py deleted file mode 100644 index 424d9aadf..000000000 --- a/ics/structures/s_pluto_general_params_s.py +++ /dev/null @@ -1,35 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_pluto_general_params_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mac_fltres1', ctypes.c_uint64), - ('mac_fltres0', ctypes.c_uint64), - ('mac_flt1', ctypes.c_uint64), - ('mac_flt0', ctypes.c_uint64), - ('vlmarker', ctypes.c_uint32), - ('vlmask', ctypes.c_uint32), - ('tpid', ctypes.c_uint16), - ('tpid2', ctypes.c_uint16), - ('vllupformat', ctypes.c_uint8), - ('mirr_ptacu', ctypes.c_uint8), - ('switchid', ctypes.c_uint8), - ('hostprio', ctypes.c_uint8), - ('incl_srcpt1', ctypes.c_uint8), - ('incl_srcpt0', ctypes.c_uint8), - ('send_meta1', ctypes.c_uint8), - ('send_meta0', ctypes.c_uint8), - ('casc_port', ctypes.c_uint8), - ('host_port', ctypes.c_uint8), - ('mirr_port', ctypes.c_uint8), - ('ignore2stf', ctypes.c_uint8), - ] - - -SPluto_GeneralParams_s = s_pluto_general_params_s -SPluto_GeneralParams = s_pluto_general_params_s - diff --git a/ics/structures/s_pluto_l2_address_lookup_entry_s.py b/ics/structures/s_pluto_l2_address_lookup_entry_s.py deleted file mode 100644 index ec60831a6..000000000 --- a/ics/structures/s_pluto_l2_address_lookup_entry_s.py +++ /dev/null @@ -1,24 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_pluto_l2_address_lookup_entry_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('index', ctypes.c_uint16), - ('vlanID', ctypes.c_uint16), - ('macaddr', ctypes.c_uint8 * 6), - ('destports', ctypes.c_uint8), - ('enfport', ctypes.c_uint8), - ('learnedEntry', ctypes.c_uint8), - ('pad1', ctypes.c_uint8), - ('pad2', ctypes.c_uint8), - ('pad3', ctypes.c_uint8), - ] - - -SPluto_L2AddressLookupEntry_s = s_pluto_l2_address_lookup_entry_s -SPluto_L2AddressLookupEntry = s_pluto_l2_address_lookup_entry_s - diff --git a/ics/structures/s_pluto_l2_address_lookup_params_s.py b/ics/structures/s_pluto_l2_address_lookup_params_s.py deleted file mode 100644 index ae46b696c..000000000 --- a/ics/structures/s_pluto_l2_address_lookup_params_s.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_pluto_l2_address_lookup_params_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('maxage', ctypes.c_uint16), - ('dyn_tbsz', ctypes.c_uint8), - ('poly', ctypes.c_uint8), - ('shared_learn', ctypes.c_uint8), - ('no_enf_hostprt', ctypes.c_uint8), - ('no_mgmt_learn', ctypes.c_uint8), - ('pad', ctypes.c_uint8), - ] - - -SPluto_L2AddressLookupParams_s = s_pluto_l2_address_lookup_params_s -SPluto_L2AddressLookupParams = s_pluto_l2_address_lookup_params_s - diff --git a/ics/structures/s_pluto_l2_forwarding_entry_s.py b/ics/structures/s_pluto_l2_forwarding_entry_s.py deleted file mode 100644 index 0faf5390b..000000000 --- a/ics/structures/s_pluto_l2_forwarding_entry_s.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_pluto_l2_forwarding_entry_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('vlan_pmap', ctypes.c_uint8 * 8), - ('bc_domain', ctypes.c_uint8), - ('reach_port', ctypes.c_uint8), - ('fl_domain', ctypes.c_uint8), - ('pad', ctypes.c_uint8), - ] - - -SPluto_L2ForwardingEntry_s = s_pluto_l2_forwarding_entry_s -SPluto_L2ForwardingEntry = s_pluto_l2_forwarding_entry_s - diff --git a/ics/structures/s_pluto_l2_forwarding_params_s.py b/ics/structures/s_pluto_l2_forwarding_params_s.py deleted file mode 100644 index cc0b55126..000000000 --- a/ics/structures/s_pluto_l2_forwarding_params_s.py +++ /dev/null @@ -1,18 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_pluto_l2_forwarding_params_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('part_spc', ctypes.c_uint16 * 8), - ('max_dynp', ctypes.c_uint8), - ('pad', ctypes.c_uint8), - ] - - -SPluto_L2ForwardingParams_s = s_pluto_l2_forwarding_params_s -SPluto_L2ForwardingParams = s_pluto_l2_forwarding_params_s - diff --git a/ics/structures/s_pluto_l2_policing_s.py b/ics/structures/s_pluto_l2_policing_s.py deleted file mode 100644 index 2eed4eaa2..000000000 --- a/ics/structures/s_pluto_l2_policing_s.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_pluto_l2_policing_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('smax', ctypes.c_uint16), - ('rate', ctypes.c_uint16), - ('maxlen', ctypes.c_uint16), - ('sharindx', ctypes.c_uint8), - ('partition', ctypes.c_uint8), - ] - - -SPluto_L2Policing_s = s_pluto_l2_policing_s -SPluto_L2Policing = s_pluto_l2_policing_s - diff --git a/ics/structures/s_pluto_mac_config_s.py b/ics/structures/s_pluto_mac_config_s.py deleted file mode 100644 index 48c514d78..000000000 --- a/ics/structures/s_pluto_mac_config_s.py +++ /dev/null @@ -1,35 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_pluto_mac_config_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('top', ctypes.c_uint16 * 8), - ('base', ctypes.c_uint16 * 8), - ('tp_delin', ctypes.c_uint16), - ('tp_delout', ctypes.c_uint16), - ('vlanid', ctypes.c_uint16), - ('enabled', ctypes.c_uint8 * 8), - ('ifg', ctypes.c_uint8), - ('speed', ctypes.c_uint8), - ('maxage', ctypes.c_uint8), - ('vlanprio', ctypes.c_uint8), - ('ing_mirr', ctypes.c_uint8), - ('egr_mirr', ctypes.c_uint8), - ('drpnona664', ctypes.c_uint8), - ('drpdtag', ctypes.c_uint8), - ('drpuntag', ctypes.c_uint8), - ('retag', ctypes.c_uint8), - ('dyn_learn', ctypes.c_uint8), - ('egress', ctypes.c_uint8), - ('ingress', ctypes.c_uint8), - ('pad', ctypes.c_uint8), - ] - - -SPluto_MacConfig_s = s_pluto_mac_config_s -SPluto_MacConfig = s_pluto_mac_config_s - diff --git a/ics/structures/s_pluto_ptp_params_s.py b/ics/structures/s_pluto_ptp_params_s.py deleted file mode 100644 index 4baec607e..000000000 --- a/ics/structures/s_pluto_ptp_params_s.py +++ /dev/null @@ -1,28 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_pluto_ptp_params_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('neighborPropDelayThresh', ctypes.c_uint32), - ('sys_phc_sync_interval', ctypes.c_uint32), - ('logPDelayReqInterval', ctypes.c_int8), - ('logSyncInterval', ctypes.c_int8), - ('logAnnounceInterval', ctypes.c_int8), - ('profile', ctypes.c_uint8), - ('priority1', ctypes.c_uint8), - ('clockclass', ctypes.c_uint8), - ('clockaccuracy', ctypes.c_uint8), - ('priority2', ctypes.c_uint8), - ('offset_scaled_log_variance', ctypes.c_uint16), - ('gPTPportRole', ctypes.c_uint8 * 4), - ('portEnable', ctypes.c_uint8 * 4), - ] - - -SPlutoPtpParams_s = s_pluto_ptp_params_s -PlutoPtpParams_t = s_pluto_ptp_params_s - diff --git a/ics/structures/s_pluto_retagging_entry_s.py b/ics/structures/s_pluto_retagging_entry_s.py deleted file mode 100644 index 996e66884..000000000 --- a/ics/structures/s_pluto_retagging_entry_s.py +++ /dev/null @@ -1,23 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_pluto_retagging_entry_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('vlan_egr', ctypes.c_uint16), - ('vlan_ing', ctypes.c_uint16), - ('egr_port', ctypes.c_uint8), - ('ing_port', ctypes.c_uint8), - ('do_not_learn', ctypes.c_uint8), - ('use_dest_ports', ctypes.c_uint8), - ('destports', ctypes.c_uint8), - ('pad', ctypes.c_uint8), - ] - - -SPluto_RetaggingEntry_s = s_pluto_retagging_entry_s -SPluto_RetaggingEntry = s_pluto_retagging_entry_s - diff --git a/ics/structures/s_pluto_switch_settings_s.py b/ics/structures/s_pluto_switch_settings_s.py deleted file mode 100644 index cc078dd94..000000000 --- a/ics/structures/s_pluto_switch_settings_s.py +++ /dev/null @@ -1,35 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.s_extended_data_flash_header import * -from ics.structures.s_pluto_general_params_s import * -from ics.structures.s_pluto_l2_address_lookup_entry_s import * -from ics.structures.s_pluto_l2_address_lookup_params_s import * -from ics.structures.s_pluto_l2_forwarding_entry_s import * -from ics.structures.s_pluto_l2_forwarding_params_s import * -from ics.structures.s_pluto_l2_policing_s import * -from ics.structures.s_pluto_mac_config_s import * -from ics.structures.s_pluto_retagging_entry_s import * -from ics.structures.s_pluto_vlan_lookup_s import * - - -class s_pluto_switch_settings_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('flashHeader', ExtendedDataFlashHeader_t), - ('l2_addressLookupParams', SPluto_L2AddressLookupParams), - ('l2_addressLookupEntries', SPluto_L2AddressLookupEntry * 1024), - ('l2_policing', SPluto_L2Policing * 45), - ('l2_forwardingParams', SPluto_L2ForwardingParams), - ('l2_ForwardingEntries', SPluto_L2ForwardingEntry * 13), - ('vlan_LookupEntries', SPluto_VlanLookup * 4096), - ('macConfig', SPluto_MacConfig * 5), - ('generalParams', SPluto_GeneralParams), - ('retagging', SPluto_RetaggingEntry * 32), - ] - - -SPlutoSwitchSettings_s = s_pluto_switch_settings_s -SPlutoSwitchSettings = s_pluto_switch_settings_s - diff --git a/ics/structures/s_pluto_vl_forwarding_entry_s.py b/ics/structures/s_pluto_vl_forwarding_entry_s.py deleted file mode 100644 index 02daa16f8..000000000 --- a/ics/structures/s_pluto_vl_forwarding_entry_s.py +++ /dev/null @@ -1,19 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_pluto_vl_forwarding_entry_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('type', ctypes.c_uint8), - ('priority', ctypes.c_uint8), - ('partition', ctypes.c_uint8), - ('destports', ctypes.c_uint8), - ] - - -SPluto_VlForwardingEntry_s = s_pluto_vl_forwarding_entry_s -SPluto_VlForwardingEntry = s_pluto_vl_forwarding_entry_s - diff --git a/ics/structures/s_pluto_vl_forwarding_params_s.py b/ics/structures/s_pluto_vl_forwarding_params_s.py deleted file mode 100644 index a15e20a85..000000000 --- a/ics/structures/s_pluto_vl_forwarding_params_s.py +++ /dev/null @@ -1,18 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_pluto_vl_forwarding_params_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('partspc', ctypes.c_uint16 * 8), - ('debugen', ctypes.c_uint8), - ('pad', ctypes.c_uint8), - ] - - -SPluto_VlForwardingParams_s = s_pluto_vl_forwarding_params_s -SPluto_VlForwardingParams = s_pluto_vl_forwarding_params_s - diff --git a/ics/structures/s_pluto_vl_lookup_entry_s.py b/ics/structures/s_pluto_vl_lookup_entry_s.py deleted file mode 100644 index f2ad7c7c9..000000000 --- a/ics/structures/s_pluto_vl_lookup_entry_s.py +++ /dev/null @@ -1,50 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class vllupformat0(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('macaddr', ctypes.c_uint64), - ('vlanid', ctypes.c_uint16), - ('destports', ctypes.c_uint8), - ('iscritical', ctypes.c_uint8), - ('port', ctypes.c_uint8), - ('vlanprior', ctypes.c_uint8), - ] - - - -class vllupformat1(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('vlid', ctypes.c_uint16), - ('egrmirr', ctypes.c_uint8), - ('ingrmirr', ctypes.c_uint8), - ('port', ctypes.c_uint8), - ] - - - -class Nameless6024(ctypes.Union): - _pack_ = 2 - _fields_ = [ - ('vllupformat0', vllupformat0), - ('vllupformat1', vllupformat1), - ] - - - -class s_pluto_vl_lookup_entry_s(ctypes.Structure): - _pack_ = 2 - _anonymous_ = ('Nameless6024',) - _fields_ = [ - ('Nameless6024', Nameless6024), - ] - - -SPluto_VlLookupEntry_s = s_pluto_vl_lookup_entry_s -SPluto_VlLookupEntry = s_pluto_vl_lookup_entry_s - diff --git a/ics/structures/s_pluto_vl_policing_entry_s.py b/ics/structures/s_pluto_vl_policing_entry_s.py deleted file mode 100644 index 65189f8c5..000000000 --- a/ics/structures/s_pluto_vl_policing_entry_s.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_pluto_vl_policing_entry_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('type', ctypes.c_uint64), - ('maxlen', ctypes.c_uint64), - ('sharindx', ctypes.c_uint64), - ('bag', ctypes.c_uint64), - ('jitter', ctypes.c_uint64), - ] - - -SPluto_VlPolicingEntry_s = s_pluto_vl_policing_entry_s -SPluto_VlPolicingEntry = s_pluto_vl_policing_entry_s - diff --git a/ics/structures/s_pluto_vlan_lookup_s.py b/ics/structures/s_pluto_vlan_lookup_s.py deleted file mode 100644 index e2c1b3d03..000000000 --- a/ics/structures/s_pluto_vlan_lookup_s.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class s_pluto_vlan_lookup_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('vlanid', ctypes.c_uint16), - ('ving_mirr', ctypes.c_uint8), - ('vegr_mirr', ctypes.c_uint8), - ('vmemb_port', ctypes.c_uint8), - ('vlan_bc', ctypes.c_uint8), - ('tag_port', ctypes.c_uint8), - ('pad', ctypes.c_uint8), - ] - - -SPluto_VlanLookup_s = s_pluto_vlan_lookup_s -SPluto_VlanLookup = s_pluto_vlan_lookup_s - diff --git a/ics/structures/s_rad_moon_duo_settings.py b/ics/structures/s_rad_moon_duo_settings.py deleted file mode 100644 index fa38a8e70..000000000 --- a/ics/structures/s_rad_moon_duo_settings.py +++ /dev/null @@ -1,33 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.rad_moon_duo_converter_settings import * - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('disableUsbCheckOnBoot', ctypes.c_uint32, 1), - ('enableLatencyTest', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 30), - ] - - - -class s_rad_moon_duo_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('converter', RadMoonDuoConverterSettings), - ('network_enables', ctypes.c_uint64), - ('flags', flags), - ] - - -RadMoonDuoSettings = s_rad_moon_duo_settings -SRadMoonDuoSettings = s_rad_moon_duo_settings - diff --git a/ics/structures/s_red_settings.py b/ics/structures/s_red_settings.py deleted file mode 100644 index f25d0e764..000000000 --- a/ics/structures/s_red_settings.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.lin_settings import * - - -class s_red_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('can1', CAN_SETTINGS), - ('can2', CAN_SETTINGS), - ('lin1', LIN_SETTINGS), - ('lin2', LIN_SETTINGS), - ] - - -_SRedSettings = s_red_settings -SRedSettings = s_red_settings - diff --git a/ics/structures/s_text_api_settings.py b/ics/structures/s_text_api_settings.py deleted file mode 100644 index 9da27ae8d..000000000 --- a/ics/structures/s_text_api_settings.py +++ /dev/null @@ -1,105 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class Nameless4038(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('bExtended', ctypes.c_uint, 1), - ('', ctypes.c_uint, 31), - ] - - - -class can1_options(ctypes.Union): - _pack_ = 2 - _anonymous_ = ('Nameless4038',) - _fields_ = [ - ('Nameless4038', Nameless4038), - ('DWord', ctypes.c_uint32), - ] - - - -class Nameless2076(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('bExtended', ctypes.c_uint, 1), - ('', ctypes.c_uint, 31), - ] - - - -class can2_options(ctypes.Union): - _pack_ = 2 - _anonymous_ = ('Nameless2076',) - _fields_ = [ - ('Nameless2076', Nameless2076), - ('DWord', ctypes.c_uint32), - ] - - - -class Nameless45362(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('bExtended', ctypes.c_uint, 1), - ('', ctypes.c_uint, 31), - ] - - - -class can3_options(ctypes.Union): - _pack_ = 2 - _anonymous_ = ('Nameless45362',) - _fields_ = [ - ('Nameless45362', Nameless45362), - ('DWord', ctypes.c_uint32), - ] - - - -class Nameless63471(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('bExtended', ctypes.c_uint, 1), - ('', ctypes.c_uint, 31), - ] - - - -class can4_options(ctypes.Union): - _pack_ = 2 - _anonymous_ = ('Nameless63471',) - _fields_ = [ - ('Nameless63471', Nameless63471), - ('DWord', ctypes.c_uint32), - ] - - - -class s_text_api_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('can1_tx_id', ctypes.c_uint32), - ('can1_rx_id', ctypes.c_uint32), - ('can1_options', can1_options), - ('can2_tx_id', ctypes.c_uint32), - ('can2_rx_id', ctypes.c_uint32), - ('can2_options', can2_options), - ('network_enables', ctypes.c_uint32), - ('can3_tx_id', ctypes.c_uint32), - ('can3_rx_id', ctypes.c_uint32), - ('can3_options', can3_options), - ('can4_tx_id', ctypes.c_uint32), - ('can4_rx_id', ctypes.c_uint32), - ('can4_options', can4_options), - ('reserved', ctypes.c_uint32 * 5), - ] - - -_STextAPISettings = s_text_api_settings -STextAPISettings = s_text_api_settings - diff --git a/ics/structures/s_vivid_can_settings.py b/ics/structures/s_vivid_can_settings.py deleted file mode 100644 index e845298c9..000000000 --- a/ics/structures/s_vivid_can_settings.py +++ /dev/null @@ -1,40 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.swcan_settings import * - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('disableUsbCheckOnBoot', ctypes.c_uint32, 1), - ('enableLatencyTest', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 30), - ] - - - -class s_vivid_can_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('ecu_id', ctypes.c_uint32), - ('can1', CAN_SETTINGS), - ('swcan1', SWCAN_SETTINGS), - ('lsftcan1', CAN_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_uint16), - ('perf_en', ctypes.c_uint16), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('can_switch_mode', ctypes.c_uint16), - ('termination_enables', ctypes.c_uint16), - ('flags', flags), - ] - - -_SVividCANSettings = s_vivid_can_settings -SVividCANSettings = s_vivid_can_settings - diff --git a/ics/structures/scan_hub_settings.py b/ics/structures/scan_hub_settings.py deleted file mode 100644 index 81945bb46..000000000 --- a/ics/structures/scan_hub_settings.py +++ /dev/null @@ -1,28 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.scan_sleep_id import * - - -class scan_hub_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('network_enables', ctypes.c_uint64), - ('termination_enables', ctypes.c_uint64), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_int16), - ('ecu_id', ctypes.c_uint32), - ('sleep_id', SCANSleepID), - ] - - -CANHubSettings = scan_hub_settings -SCANHubSettings = scan_hub_settings - diff --git a/ics/structures/scan_sleep_id.py b/ics/structures/scan_sleep_id.py deleted file mode 100644 index af2aa800a..000000000 --- a/ics/structures/scan_sleep_id.py +++ /dev/null @@ -1,26 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class id(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('can_sleep_command_id', ctypes.c_uint, 29), - ('can_sleep_command_isExtended', ctypes.c_uint, 1), - ('reserved', ctypes.c_uint, 2), - ] - - - -class scan_sleep_id(ctypes.Union): - _pack_ = 2 - _fields_ = [ - ('word', ctypes.c_uint32), - ('id', id), - ] - - -SCANSleepID = scan_sleep_id - diff --git a/ics/structures/secu_avb_settings.py b/ics/structures/secu_avb_settings.py deleted file mode 100644 index b8a965e92..000000000 --- a/ics/structures/secu_avb_settings.py +++ /dev/null @@ -1,42 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.s_text_api_settings import * - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('disableUsbCheckOnBoot', ctypes.c_uint32, 1), - ('enableLatencyTest', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 30), - ] - - - -class secu_avb_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('network_enables', ctypes.c_uint64), - ('termination_enables', ctypes.c_uint64), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_int16), - ('text_api', STextAPISettings), - ('flags', flags), - ] - - -_neoECU_AVBSettings = secu_avb_settings -ECU_AVBSettings = secu_avb_settings -SECU_AVBSettings = secu_avb_settings - diff --git a/ics/structures/secu_settings.py b/ics/structures/secu_settings.py deleted file mode 100644 index 291136347..000000000 --- a/ics/structures/secu_settings.py +++ /dev/null @@ -1,53 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.swcan_settings import * -from ics.structures.uart_settings import * - - -class secu_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('ecu_id', ctypes.c_uint32), - ('selected_network', ctypes.c_uint16), - ('can1', CAN_SETTINGS), - ('can2', CAN_SETTINGS), - ('lin1', LIN_SETTINGS), - ('lin2', LIN_SETTINGS), - ('iso15765_separation_time_offset', ctypes.c_uint16), - ('iso9141_kwp_settings', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity', ctypes.c_uint16), - ('iso_msg_termination', ctypes.c_uint16), - ('iso9141_kwp_settings_2', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_2', ctypes.c_uint16), - ('iso_msg_termination_2', ctypes.c_uint16), - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('misc_io_initial_ddr', ctypes.c_uint16), - ('misc_io_initial_latch', ctypes.c_uint16), - ('misc_io_analog_enable', ctypes.c_uint16), - ('misc_io_report_period', ctypes.c_uint16), - ('misc_io_on_report_events', ctypes.c_uint16), - ('ain_sample_period', ctypes.c_uint16), - ('ain_threshold', ctypes.c_uint16), - ('swcan', SWCAN_SETTINGS), - ('swcan2', SWCAN_SETTINGS), - ('lsftcan', CAN_SETTINGS), - ('lsftcan2', CAN_SETTINGS), - ('uart', UART_SETTINGS), - ('uart2', UART_SETTINGS), - ('text_api', STextAPISettings), - ] - - -_SECUSettings = secu_settings -SECUSettings = secu_settings - diff --git a/ics/structures/seevb_settings.py b/ics/structures/seevb_settings.py deleted file mode 100644 index 14c38e89e..000000000 --- a/ics/structures/seevb_settings.py +++ /dev/null @@ -1,25 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * - - -class seevb_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('ecu_id', ctypes.c_uint32), - ('can1', CAN_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_uint16), - ('perf_en', ctypes.c_uint16), - ('ain_sample_period', ctypes.c_uint16), - ('ain_threshold', ctypes.c_uint16), - ('rsvd', ctypes.c_uint32), - ] - - -_SEEVBSettings = seevb_settings -SEEVBSettings = seevb_settings - diff --git a/ics/structures/serdescam_settings.py b/ics/structures/serdescam_settings.py deleted file mode 100644 index 5026c5eb6..000000000 --- a/ics/structures/serdescam_settings.py +++ /dev/null @@ -1,24 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class serdescam_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('flags', ctypes.c_uint32), - ('mode', ctypes.c_uint8), - ('rsvd1', ctypes.c_uint8), - ('bitPos', ctypes.c_uint8), - ('videoFormat', ctypes.c_uint8), - ('resWidth', ctypes.c_uint16), - ('resHeight', ctypes.c_uint16), - ('frameSkip', ctypes.c_uint8), - ('rsvd2', ctypes.c_uint8 * 19), - ] - - -SERDESCAM_SETTINGS_t = serdescam_settings -SERDESCAM_SETTINGS = serdescam_settings - diff --git a/ics/structures/serdesgen_settings.py b/ics/structures/serdesgen_settings.py deleted file mode 100644 index dc8e982a4..000000000 --- a/ics/structures/serdesgen_settings.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class serdesgen_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('flags', ctypes.c_uint16), - ('rsvd1', ctypes.c_uint8), - ('mod_id', ctypes.c_uint8), - ('tx_speed', ctypes.c_uint16), - ('rx_speed', ctypes.c_uint16), - ('rsvd2', ctypes.c_uint8 * 24), - ] - - -SERDESGEN_SETTINGS_t = serdesgen_settings -SERDESGEN_SETTINGS = serdesgen_settings - diff --git a/ics/structures/serdespoc_settings.py b/ics/structures/serdespoc_settings.py deleted file mode 100644 index a48683a67..000000000 --- a/ics/structures/serdespoc_settings.py +++ /dev/null @@ -1,19 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class serdespoc_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mode', ctypes.c_uint8), - ('rsvd', ctypes.c_uint8 * 6), - ('voltage', ctypes.c_uint8), - ('chksum', ctypes.c_uint16), - ] - - -SERDESPOC_SETTINGS_t = serdespoc_settings -SERDESPOC_SETTINGS = serdespoc_settings - diff --git a/ics/structures/sievb_settings.py b/ics/structures/sievb_settings.py deleted file mode 100644 index d3cf316a7..000000000 --- a/ics/structures/sievb_settings.py +++ /dev/null @@ -1,54 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.uart_settings import * - - -class sievb_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('ecu_id', ctypes.c_uint32), - ('selected_network', ctypes.c_uint16), - ('can1', CAN_SETTINGS), - ('lin1', LIN_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('misc_io_initial_ddr', ctypes.c_uint16), - ('misc_io_initial_latch', ctypes.c_uint16), - ('misc_io_analog_enable', ctypes.c_uint16), - ('misc_io_report_period', ctypes.c_uint16), - ('misc_io_on_report_events', ctypes.c_uint16), - ('ain_sample_period', ctypes.c_uint16), - ('ain_threshold', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_uint16), - ('can2', CAN_SETTINGS), - ('lin2', LIN_SETTINGS), - ('uart', UART_SETTINGS), - ('uart2', UART_SETTINGS), - ('text_api', STextAPISettings), - ('reserved_1', ctypes.c_uint32), - ('reserved_2', ctypes.c_uint32), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('idle_wakeup_network_enables_1', ctypes.c_uint16), - ('idle_wakeup_network_enables_2', ctypes.c_uint16), - ('misc_io_analog_enable_2', ctypes.c_uint16), - ('iso9141_kwp_settings', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity', ctypes.c_uint16), - ('iso_msg_termination', ctypes.c_uint16), - ('iso_tester_pullup_enable', ctypes.c_uint16), - ('iso9141_kwp_settings_2', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_2', ctypes.c_uint16), - ('iso_msg_termination_2', ctypes.c_uint16), - ] - - -_SIEVBSettings = sievb_settings -SIEVBSettings = sievb_settings - diff --git a/ics/structures/sobd2_lc_settings.py b/ics/structures/sobd2_lc_settings.py deleted file mode 100644 index 1eb7583f5..000000000 --- a/ics/structures/sobd2_lc_settings.py +++ /dev/null @@ -1,85 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.disk_settings import * -from ics.structures.ethernet_settings import * -from ics.structures.ethernet_settings2 import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.swcan_settings import * - - -class Nameless39639(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('network_enables_3', ctypes.c_uint16), - ] - - - -class network_enables(ctypes.Union): - _pack_ = 2 - _anonymous_ = ('Nameless39639',) - _fields_ = [ - ('word', ctypes.c_uint64), - ('Nameless39639', Nameless39639), - ] - - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('disableUsbCheckOnBoot', ctypes.c_uint32, 1), - ('enableLatencyTest', ctypes.c_uint32, 1), - ('busMessagesToAndroid', ctypes.c_uint32, 1), - ('enablePcEthernetComm', ctypes.c_uint32, 1), - ('enableDefaultLogger', ctypes.c_uint32, 1), - ('enableDefaultUpload', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 26), - ] - - - -class sobd2_lc_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('can3', CAN_SETTINGS), - ('canfd3', CANFD_SETTINGS), - ('can4', CAN_SETTINGS), - ('canfd4', CANFD_SETTINGS), - ('swcan1', SWCAN_SETTINGS), - ('lin1', LIN_SETTINGS), - ('iso9141_kwp_settings_1', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_1', ctypes.c_uint16), - ('iso_msg_termination_1', ctypes.c_uint16), - ('network_enables', network_enables), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_int16), - ('text_api', STextAPISettings), - ('flags', flags), - ('can_switch_mode', ctypes.c_uint16), - ('misc_io_on_report_events', ctypes.c_uint16), - ('disk', DISK_SETTINGS), - ('ethernet', ETHERNET_SETTINGS), - ('ethernet2', ETHERNET_SETTINGS2), - ] - - -_SOBD2LCSettings = sobd2_lc_settings -OBD2LCSettings = sobd2_lc_settings -SOBD2LCSettings = sobd2_lc_settings - diff --git a/ics/structures/sobd2_pro_settings.py b/ics/structures/sobd2_pro_settings.py deleted file mode 100644 index d237f4989..000000000 --- a/ics/structures/sobd2_pro_settings.py +++ /dev/null @@ -1,63 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.ethernet_settings import * -from ics.structures.ethernet_settings2 import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.swcan_settings import * - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('disableUsbCheckOnBoot', ctypes.c_uint32, 1), - ('enableLatencyTest', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 30), - ] - - - -class sobd2_pro_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('can3', CAN_SETTINGS), - ('canfd3', CANFD_SETTINGS), - ('can4', CAN_SETTINGS), - ('canfd4', CANFD_SETTINGS), - ('swcan1', SWCAN_SETTINGS), - ('lin1', LIN_SETTINGS), - ('lin2', LIN_SETTINGS), - ('ethernet', ETHERNET_SETTINGS), - ('iso9141_kwp_settings_1', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_1', ctypes.c_uint16), - ('iso_msg_termination_1', ctypes.c_uint16), - ('iso9141_kwp_settings_2', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_2', ctypes.c_uint16), - ('iso_msg_termination_2', ctypes.c_uint16), - ('network_enables', ctypes.c_uint64), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_int16), - ('text_api', STextAPISettings), - ('flags', flags), - ('can_switch_mode', ctypes.c_uint16), - ('misc_io_analog_enable', ctypes.c_uint16), - ('ethernet2', ETHERNET_SETTINGS2), - ] - - -_OBD2ProSettings = sobd2_pro_settings -OBD2ProSettings = sobd2_pro_settings -SOBD2ProSettings = sobd2_pro_settings - diff --git a/ics/structures/sobd2_sim_settings.py b/ics/structures/sobd2_sim_settings.py deleted file mode 100644 index 88467b29b..000000000 --- a/ics/structures/sobd2_sim_settings.py +++ /dev/null @@ -1,45 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.s_text_api_settings import * - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('', ctypes.c_uint32, 1), - ('enableLatencyTest', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 30), - ] - - - -class sobd2_sim_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('can1', CAN_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('network_enables', ctypes.c_uint64), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_int16), - ('perf_en', ctypes.c_uint16), - ('misc_io_initial_ddr', ctypes.c_uint16), - ('misc_io_initial_latch', ctypes.c_uint16), - ('misc_io_report_period', ctypes.c_uint16), - ('misc_io_on_report_events', ctypes.c_uint16), - ('misc_io_analog_enable', ctypes.c_uint16), - ('ain_sample_period', ctypes.c_uint16), - ('ain_threshold', ctypes.c_uint16), - ('flags', flags), - ('text_api', STextAPISettings), - ] - - -_SOBD2SimSettings = sobd2_sim_settings -SOBD2SimSettings = sobd2_sim_settings - diff --git a/ics/structures/software_update_command.py b/ics/structures/software_update_command.py deleted file mode 100644 index f0e4de9db..000000000 --- a/ics/structures/software_update_command.py +++ /dev/null @@ -1,19 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class software_update_command(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('componentIdentifier', ctypes.c_uint32), - ('commandType', ctypes.c_uint8), - ('offset', ctypes.c_uint32), - ('commandSizeOrProgress', ctypes.c_uint32), - ('commandData', ctypes.c_uint8), - ] - - -SoftwareUpdateCommand = software_update_command - diff --git a/ics/structures/spy_filter_long.py b/ics/structures/spy_filter_long.py deleted file mode 100644 index 3f49ae559..000000000 --- a/ics/structures/spy_filter_long.py +++ /dev/null @@ -1,33 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class spy_filter_long(ctypes.Structure): - _fields_ = [ - ('StatusValue', ctypes.c_uint32), - ('StatusMask', ctypes.c_uint32), - ('Status2Value', ctypes.c_uint32), - ('Status2Mask', ctypes.c_uint32), - ('Header', ctypes.c_uint32), - ('HeaderMask', ctypes.c_uint32), - ('MiscData', ctypes.c_uint32), - ('MiscDataMask', ctypes.c_uint32), - ('ByteDataMSB', ctypes.c_uint32), - ('ByteDataLSB', ctypes.c_uint32), - ('ByteDataMaskMSB', ctypes.c_uint32), - ('ByteDataMaskLSB', ctypes.c_uint32), - ('HeaderLength', ctypes.c_uint32), - ('ByteDataLength', ctypes.c_uint32), - ('NetworkID', ctypes.c_uint32), - ('FrameMaster', ctypes.c_uint16), - ('bUseArbIdRangeFilter', ctypes.c_uint8), - ('bStuff2', ctypes.c_uint8), - ('ExpectedLength', ctypes.c_uint32), - ('NodeID', ctypes.c_uint32), - ] - - -spyFilterLong = spy_filter_long - diff --git a/ics/structures/srad_epsilon_settings.py b/ics/structures/srad_epsilon_settings.py deleted file mode 100644 index 3a6a3696b..000000000 --- a/ics/structures/srad_epsilon_settings.py +++ /dev/null @@ -1,59 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.ethernet_settings import * -from ics.structures.ethernet_settings2 import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.srad_epsilon_switch_settings import * - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('disableUsbCheckOnBoot', ctypes.c_uint32, 1), - ('enableLatencyTest', ctypes.c_uint32, 1), - ('enablePcEthernetComm', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 29), - ] - - - -class srad_epsilon_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('lin1', LIN_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('network_enables_3', ctypes.c_uint16), - ('termination_enables', ctypes.c_uint64), - ('misc_io_analog_enable', ctypes.c_uint16), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_int16), - ('iso9141_kwp_enable_reserved', ctypes.c_uint16), - ('iso_tester_pullup_enable', ctypes.c_uint16), - ('iso_parity', ctypes.c_uint16), - ('iso_msg_termination', ctypes.c_uint16), - ('iso9141_kwp_settings', ISO9141_KEYWORD2000_SETTINGS), - ('ethernet', ETHERNET_SETTINGS), - ('text_api', STextAPISettings), - ('flags', flags), - ('switchSettings', SRADEpsilonSwitchSettings), - ('ethernet2', ETHERNET_SETTINGS2), - ] - - -_SRADEpsilonSettings = srad_epsilon_settings -SRADEpsilonSettings = srad_epsilon_settings - diff --git a/ics/structures/srad_epsilon_switch_settings.py b/ics/structures/srad_epsilon_switch_settings.py deleted file mode 100644 index ea5e8c3ec..000000000 --- a/ics/structures/srad_epsilon_switch_settings.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class srad_epsilon_switch_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('phyMode', ctypes.c_uint8 * 18), - ('enablePhy', ctypes.c_uint8 * 18), - ('speed', ctypes.c_uint8 * 18), - ('legacy', ctypes.c_uint8 * 18), - ('spoofedMac', ctypes.c_uint8 * 6), - ('spoofMacFlag', ctypes.c_uint8), - ('pad', ctypes.c_uint8), - ] - - -_SRADEpsilonSwitchSettings = srad_epsilon_switch_settings -SRADEpsilonSwitchSettings = srad_epsilon_switch_settings - diff --git a/ics/structures/srad_galaxy_settings.py b/ics/structures/srad_galaxy_settings.py deleted file mode 100644 index 67956b2d0..000000000 --- a/ics/structures/srad_galaxy_settings.py +++ /dev/null @@ -1,94 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.disk_settings import * -from ics.structures.ethernet_settings2 import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.logger_settings import * -from ics.structures.op_eth_general_settings import * -from ics.structures.op_eth_settings import * -from ics.structures.rad_reporting_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.srad_gptp_settings_s import * -from ics.structures.swcan_settings import * -from ics.structures.timesync_icshardware_settings import * - - -class srad_galaxy_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('opEthGen', OP_ETH_GENERAL_SETTINGS), - ('opEth1', OP_ETH_SETTINGS), - ('opEth2', OP_ETH_SETTINGS), - ('opEth3', OP_ETH_SETTINGS), - ('opEth4', OP_ETH_SETTINGS), - ('opEth5', OP_ETH_SETTINGS), - ('opEth6', OP_ETH_SETTINGS), - ('opEth7', OP_ETH_SETTINGS), - ('opEth8', OP_ETH_SETTINGS), - ('opEth9', OP_ETH_SETTINGS), - ('opEth10', OP_ETH_SETTINGS), - ('opEth11', OP_ETH_SETTINGS), - ('opEth12', OP_ETH_SETTINGS), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('can3', CAN_SETTINGS), - ('canfd3', CANFD_SETTINGS), - ('can4', CAN_SETTINGS), - ('canfd4', CANFD_SETTINGS), - ('can5', CAN_SETTINGS), - ('canfd5', CANFD_SETTINGS), - ('can6', CAN_SETTINGS), - ('canfd6', CANFD_SETTINGS), - ('can7', CAN_SETTINGS), - ('canfd7', CANFD_SETTINGS), - ('can8', CAN_SETTINGS), - ('canfd8', CANFD_SETTINGS), - ('swcan1', SWCAN_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('swcan2', SWCAN_SETTINGS), - ('network_enables_2', ctypes.c_uint16), - ('lin1', LIN_SETTINGS), - ('misc_io_initial_ddr', ctypes.c_uint16), - ('misc_io_initial_latch', ctypes.c_uint16), - ('misc_io_report_period', ctypes.c_uint16), - ('misc_io_on_report_events', ctypes.c_uint16), - ('misc_io_analog_enable', ctypes.c_uint16), - ('ain_sample_period', ctypes.c_uint16), - ('ain_threshold', ctypes.c_uint16), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_uint16), - ('iso_9141_kwp_enable_reserved', ctypes.c_uint16), - ('iso9141_kwp_settings_1', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_1', ctypes.c_uint16), - ('iso_msg_termination_1', ctypes.c_uint16), - ('idle_wakeup_network_enables_1', ctypes.c_uint16), - ('idle_wakeup_network_enables_2', ctypes.c_uint16), - ('network_enables_3', ctypes.c_uint16), - ('idle_wakeup_network_enables_3', ctypes.c_uint16), - ('can_switch_mode', ctypes.c_uint16), - ('text_api', STextAPISettings), - ('timeSyncSettings', TIMESYNC_ICSHARDWARE_SETTINGS), - ('hwComLatencyTestEn', ctypes.c_uint16), - ('reporting', RAD_REPORTING_SETTINGS), - ('disk', DISK_SETTINGS), - ('logger', LOGGER_SETTINGS), - ('ethernet1', ETHERNET_SETTINGS2), - ('ethernet2', ETHERNET_SETTINGS2), - ('network_enables_4', ctypes.c_uint16), - ('gPTP', RAD_GPTP_SETTINGS), - ] - - -_SRADGalaxySettings = srad_galaxy_settings -SRADGalaxySettings = srad_galaxy_settings - diff --git a/ics/structures/srad_gigalog_settings.py b/ics/structures/srad_gigalog_settings.py deleted file mode 100644 index 314d98808..000000000 --- a/ics/structures/srad_gigalog_settings.py +++ /dev/null @@ -1,91 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.disk_settings import * -from ics.structures.ethernet10_g_settings import * -from ics.structures.ethernet_settings2 import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.logger_settings import * -from ics.structures.rad_reporting_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.serdescam_settings import * -from ics.structures.serdesgen_settings import * -from ics.structures.serdespoc_settings import * -from ics.structures.timesync_icshardware_settings import * - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('hwComLatencyTestEn', ctypes.c_uint16, 1), - ('disableUsbCheckOnBoot', ctypes.c_uint16, 1), - ('reserved', ctypes.c_uint16, 14), - ] - - - -class srad_gigalog_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('ecu_id', ctypes.c_uint32), - ('perf_en', ctypes.c_uint16), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('can3', CAN_SETTINGS), - ('canfd3', CANFD_SETTINGS), - ('can4', CAN_SETTINGS), - ('canfd4', CANFD_SETTINGS), - ('can5', CAN_SETTINGS), - ('canfd5', CANFD_SETTINGS), - ('can6', CAN_SETTINGS), - ('canfd6', CANFD_SETTINGS), - ('can7', CAN_SETTINGS), - ('canfd7', CANFD_SETTINGS), - ('can8', CAN_SETTINGS), - ('canfd8', CANFD_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_uint16), - ('iso_9141_kwp_enable_reserved', ctypes.c_uint16), - ('iso9141_kwp_settings_1', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_1', ctypes.c_uint16), - ('iso_msg_termination_1', ctypes.c_uint16), - ('idle_wakeup_network_enables_1', ctypes.c_uint16), - ('idle_wakeup_network_enables_2', ctypes.c_uint16), - ('network_enables_3', ctypes.c_uint16), - ('idle_wakeup_network_enables_3', ctypes.c_uint16), - ('text_api', STextAPISettings), - ('termination_enables', ctypes.c_uint64), - ('rsvd1', ctypes.c_uint8 * 8), - ('rsvd2', ctypes.c_uint8 * 8), - ('disk', DISK_SETTINGS), - ('timeSyncSettings', TIMESYNC_ICSHARDWARE_SETTINGS), - ('flags', flags), - ('ethernet', ETHERNET_SETTINGS2), - ('serdescam1', SERDESCAM_SETTINGS), - ('ethernet10g', ETHERNET10G_SETTINGS), - ('lin1', LIN_SETTINGS), - ('serdespoc', SERDESPOC_SETTINGS), - ('logger', LOGGER_SETTINGS), - ('serdescam2', SERDESCAM_SETTINGS), - ('serdescam3', SERDESCAM_SETTINGS), - ('serdescam4', SERDESCAM_SETTINGS), - ('ethernet2', ETHERNET_SETTINGS2), - ('network_enables_4', ctypes.c_uint16), - ('reporting', RAD_REPORTING_SETTINGS), - ('serdesgen', SERDESGEN_SETTINGS), - ] - - -_SRADGigalogSettings = srad_gigalog_settings -SRADGigalogSettings = srad_gigalog_settings - diff --git a/ics/structures/srad_gigastar_settings.py b/ics/structures/srad_gigastar_settings.py deleted file mode 100644 index 3daba3575..000000000 --- a/ics/structures/srad_gigastar_settings.py +++ /dev/null @@ -1,90 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.disk_settings import * -from ics.structures.ethernet_settings2 import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.logger_settings import * -from ics.structures.op_eth_general_settings import * -from ics.structures.op_eth_settings import * -from ics.structures.rad_reporting_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.serdescam_settings import * -from ics.structures.serdesgen_settings import * -from ics.structures.serdespoc_settings import * -from ics.structures.srad_gptp_settings_s import * -from ics.structures.timesync_icshardware_settings import * - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('hwComLatencyTestEn', ctypes.c_uint16, 1), - ('disableUsbCheckOnBoot', ctypes.c_uint16, 1), - ('reserved', ctypes.c_uint16, 14), - ] - - - -class srad_gigastar_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('ecu_id', ctypes.c_uint32), - ('perf_en', ctypes.c_uint16), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('can3', CAN_SETTINGS), - ('canfd3', CANFD_SETTINGS), - ('can4', CAN_SETTINGS), - ('canfd4', CANFD_SETTINGS), - ('can5', CAN_SETTINGS), - ('canfd5', CANFD_SETTINGS), - ('can6', CAN_SETTINGS), - ('canfd6', CANFD_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_uint16), - ('iso_9141_kwp_enable_reserved', ctypes.c_uint16), - ('iso9141_kwp_settings_1', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_1', ctypes.c_uint16), - ('iso_msg_termination_1', ctypes.c_uint16), - ('idle_wakeup_network_enables_1', ctypes.c_uint16), - ('idle_wakeup_network_enables_2', ctypes.c_uint16), - ('network_enables_3', ctypes.c_uint16), - ('idle_wakeup_network_enables_3', ctypes.c_uint16), - ('text_api', STextAPISettings), - ('termination_enables', ctypes.c_uint64), - ('disk', DISK_SETTINGS), - ('timeSyncSettings', TIMESYNC_ICSHARDWARE_SETTINGS), - ('flags', flags), - ('ethernet1', ETHERNET_SETTINGS2), - ('ethernet2', ETHERNET_SETTINGS2), - ('lin1', LIN_SETTINGS), - ('opEthGen', OP_ETH_GENERAL_SETTINGS), - ('opEth1', OP_ETH_SETTINGS), - ('opEth2', OP_ETH_SETTINGS), - ('serdescam1', SERDESCAM_SETTINGS), - ('serdespoc', SERDESPOC_SETTINGS), - ('logger', LOGGER_SETTINGS), - ('serdescam2', SERDESCAM_SETTINGS), - ('serdescam3', SERDESCAM_SETTINGS), - ('serdescam4', SERDESCAM_SETTINGS), - ('reporting', RAD_REPORTING_SETTINGS), - ('network_enables_4', ctypes.c_uint16), - ('serdesgen', SERDESGEN_SETTINGS), - ('gPTP', RAD_GPTP_SETTINGS), - ] - - -_SRADGigastarSettings = srad_gigastar_settings -SRADGigastarSettings = srad_gigastar_settings - diff --git a/ics/structures/srad_gptp_and_tap_settings_s.py b/ics/structures/srad_gptp_and_tap_settings_s.py deleted file mode 100644 index 6f4ba5bf7..000000000 --- a/ics/structures/srad_gptp_and_tap_settings_s.py +++ /dev/null @@ -1,19 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.op_eth_general_settings import * -from ics.structures.srad_gptp_settings_s import * - - -class srad_gptp_and_tap_settings_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('gPTP', RAD_GPTP_SETTINGS), - ('tap', OP_ETH_GENERAL_SETTINGS), - ] - - -SRAD_GPTP_AND_TAP_SETTINGS_s = srad_gptp_and_tap_settings_s -RAD_GPTP_AND_TAP_SETTINGS = srad_gptp_and_tap_settings_s - diff --git a/ics/structures/srad_gptp_settings_s.py b/ics/structures/srad_gptp_settings_s.py deleted file mode 100644 index 39b53c7bd..000000000 --- a/ics/structures/srad_gptp_settings_s.py +++ /dev/null @@ -1,30 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class srad_gptp_settings_s(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('neighborPropDelayThresh', ctypes.c_uint32), - ('sys_phc_sync_interval', ctypes.c_uint32), - ('logPDelayReqInterval', ctypes.c_int8), - ('logSyncInterval', ctypes.c_int8), - ('logAnnounceInterval', ctypes.c_int8), - ('profile', ctypes.c_uint8), - ('priority1', ctypes.c_uint8), - ('clockclass', ctypes.c_uint8), - ('clockaccuracy', ctypes.c_uint8), - ('priority2', ctypes.c_uint8), - ('offset_scaled_log_variance', ctypes.c_uint16), - ('gPTPportRole', ctypes.c_uint8), - ('gptpEnabledPort', ctypes.c_uint8), - ('enableClockSyntonization', ctypes.c_uint8), - ('rsvd', ctypes.c_uint8 * 15), - ] - - -SRAD_GPTP_SETTINGS_s = srad_gptp_settings_s -RAD_GPTP_SETTINGS = srad_gptp_settings_s - diff --git a/ics/structures/srad_jupiter_settings.py b/ics/structures/srad_jupiter_settings.py deleted file mode 100644 index d81a59988..000000000 --- a/ics/structures/srad_jupiter_settings.py +++ /dev/null @@ -1,59 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.ethernet_settings import * -from ics.structures.ethernet_settings2 import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.srad_jupiter_switch_settings import * - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('disableUsbCheckOnBoot', ctypes.c_uint32, 1), - ('enableLatencyTest', ctypes.c_uint32, 1), - ('enablePcEthernetComm', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 29), - ] - - - -class srad_jupiter_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('lin1', LIN_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('network_enables_3', ctypes.c_uint16), - ('termination_enables', ctypes.c_uint64), - ('misc_io_analog_enable', ctypes.c_uint16), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_int16), - ('iso9141_kwp_enable_reserved', ctypes.c_uint16), - ('iso_tester_pullup_enable', ctypes.c_uint16), - ('iso_parity', ctypes.c_uint16), - ('iso_msg_termination', ctypes.c_uint16), - ('iso9141_kwp_settings', ISO9141_KEYWORD2000_SETTINGS), - ('ethernet', ETHERNET_SETTINGS), - ('text_api', STextAPISettings), - ('flags', flags), - ('switchSettings', SRADJupiterSwitchSettings), - ('ethernet2', ETHERNET_SETTINGS2), - ] - - -_SRADJupiterSettings = srad_jupiter_settings -SRADJupiterSettings = srad_jupiter_settings - diff --git a/ics/structures/srad_jupiter_switch_settings.py b/ics/structures/srad_jupiter_switch_settings.py deleted file mode 100644 index 65c24c16a..000000000 --- a/ics/structures/srad_jupiter_switch_settings.py +++ /dev/null @@ -1,26 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.s_jupiter_ptp_params_s import * - - -class srad_jupiter_switch_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('phyMode', ctypes.c_uint8 * 8), - ('enablePhy', ctypes.c_uint8 * 8), - ('port7Select', ctypes.c_uint8), - ('port8Select', ctypes.c_uint8), - ('port8Speed', ctypes.c_uint8), - ('port8Legacy', ctypes.c_uint8), - ('spoofMacFlag', ctypes.c_uint8), - ('spoofedMac', ctypes.c_uint8 * 6), - ('pad', ctypes.c_uint8), - ('ptpParams', JupiterPtpParams_t), - ] - - -_SRADJupiterSwitchSettings = srad_jupiter_switch_settings -SRADJupiterSwitchSettings = srad_jupiter_switch_settings - diff --git a/ics/structures/srad_moon2_settings.py b/ics/structures/srad_moon2_settings.py deleted file mode 100644 index a017cea2d..000000000 --- a/ics/structures/srad_moon2_settings.py +++ /dev/null @@ -1,32 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.op_eth_general_settings import * -from ics.structures.op_eth_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.srad_gptp_settings_s import * -from ics.structures.timesync_icshardware_settings import * - - -class srad_moon2_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('opEthGen', OP_ETH_GENERAL_SETTINGS), - ('opEth1', OP_ETH_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('network_enables_3', ctypes.c_uint16), - ('text_api', STextAPISettings), - ('pc_com_mode', ctypes.c_uint16), - ('timeSyncSettings', TIMESYNC_ICSHARDWARE_SETTINGS), - ('hwComLatencyTestEn', ctypes.c_uint16), - ('gPTP', RAD_GPTP_SETTINGS), - ] - - -_SRADMoon2Settings = srad_moon2_settings -SRADMoon2Settings = srad_moon2_settings - diff --git a/ics/structures/srad_pluto_settings.py b/ics/structures/srad_pluto_settings.py deleted file mode 100644 index 6cbb70735..000000000 --- a/ics/structures/srad_pluto_settings.py +++ /dev/null @@ -1,59 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.ethernet_settings import * -from ics.structures.ethernet_settings2 import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.s_pluto_custom_params_s import * -from ics.structures.s_text_api_settings import * - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('disableUsbCheckOnBoot', ctypes.c_uint32, 1), - ('enableLatencyTest', ctypes.c_uint32, 1), - ('enablePcEthernetComm', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 29), - ] - - - -class srad_pluto_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('lin1', LIN_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('network_enables_3', ctypes.c_uint16), - ('termination_enables', ctypes.c_uint64), - ('misc_io_analog_enable', ctypes.c_uint16), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_int16), - ('iso9141_kwp_enable_reserved', ctypes.c_uint16), - ('iso_tester_pullup_enable', ctypes.c_uint16), - ('iso_parity', ctypes.c_uint16), - ('iso_msg_termination', ctypes.c_uint16), - ('iso9141_kwp_settings', ISO9141_KEYWORD2000_SETTINGS), - ('ethernet', ETHERNET_SETTINGS), - ('text_api', STextAPISettings), - ('flags', flags), - ('custom', SPluto_CustomParams), - ('ethernet2', ETHERNET_SETTINGS2), - ] - - -_RADPlutoSettings = srad_pluto_settings -SRADPlutoSettings = srad_pluto_settings - diff --git a/ics/structures/srad_star2_settings.py b/ics/structures/srad_star2_settings.py deleted file mode 100644 index acf6864b3..000000000 --- a/ics/structures/srad_star2_settings.py +++ /dev/null @@ -1,64 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.ethernet_settings2 import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.op_eth_general_settings import * -from ics.structures.op_eth_settings import * -from ics.structures.rad_reporting_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.srad_gptp_settings_s import * -from ics.structures.timesync_icshardware_settings import * - - -class srad_star2_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('opEthGen', OP_ETH_GENERAL_SETTINGS), - ('opEth1', OP_ETH_SETTINGS), - ('opEth2', OP_ETH_SETTINGS), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('lin1', LIN_SETTINGS), - ('misc_io_initial_ddr', ctypes.c_uint16), - ('misc_io_initial_latch', ctypes.c_uint16), - ('misc_io_report_period', ctypes.c_uint16), - ('misc_io_on_report_events', ctypes.c_uint16), - ('misc_io_analog_enable', ctypes.c_uint16), - ('ain_sample_period', ctypes.c_uint16), - ('ain_threshold', ctypes.c_uint16), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_uint16), - ('iso_9141_kwp_enable_reserved', ctypes.c_uint16), - ('iso9141_kwp_settings_1', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_1', ctypes.c_uint16), - ('iso_msg_termination_1', ctypes.c_uint16), - ('idle_wakeup_network_enables_1', ctypes.c_uint16), - ('idle_wakeup_network_enables_2', ctypes.c_uint16), - ('network_enables_3', ctypes.c_uint16), - ('idle_wakeup_network_enables_3', ctypes.c_uint16), - ('can_switch_mode', ctypes.c_uint16), - ('text_api', STextAPISettings), - ('pc_com_mode', ctypes.c_uint16), - ('timeSyncSettings', TIMESYNC_ICSHARDWARE_SETTINGS), - ('hwComLatencyTestEn', ctypes.c_uint16), - ('reporting', RAD_REPORTING_SETTINGS), - ('ethernet', ETHERNET_SETTINGS2), - ('gPTP', RAD_GPTP_SETTINGS), - ] - - -_SRADStar2Settings = srad_star2_settings -SRADStar2Settings = srad_star2_settings - diff --git a/ics/structures/srad_super_moon_settings.py b/ics/structures/srad_super_moon_settings.py deleted file mode 100644 index 71b60819e..000000000 --- a/ics/structures/srad_super_moon_settings.py +++ /dev/null @@ -1,34 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.ethernet_settings2 import * -from ics.structures.op_eth_general_settings import * -from ics.structures.op_eth_settings import * -from ics.structures.s_text_api_settings import * -from ics.structures.srad_gptp_settings_s import * -from ics.structures.timesync_icshardware_settings import * - - -class srad_super_moon_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('opEthGen', OP_ETH_GENERAL_SETTINGS), - ('opEth1', OP_ETH_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('network_enables_3', ctypes.c_uint16), - ('text_api', STextAPISettings), - ('pc_com_mode', ctypes.c_uint16), - ('timeSyncSettings', TIMESYNC_ICSHARDWARE_SETTINGS), - ('hwComLatencyTestEn', ctypes.c_uint16), - ('Eth2', ETHERNET_SETTINGS2), - ('gPTP', RAD_GPTP_SETTINGS), - ] - - -_SRADSuperMoonSettings = srad_super_moon_settings -SRADSuperMoonSettings = srad_super_moon_settings - diff --git a/ics/structures/srada2_b_settings.py b/ics/structures/srada2_b_settings.py deleted file mode 100644 index 13b2cf4db..000000000 --- a/ics/structures/srada2_b_settings.py +++ /dev/null @@ -1,55 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.a2_b_monitor_settings import * -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.disk_settings import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.logger_settings import * -from ics.structures.rad_reporting_settings import * -from ics.structures.timesync_icshardware_settings import * - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('hwComLatencyTestEn', ctypes.c_uint16, 1), - ('', ctypes.c_uint16, 15), - ] - - - -class srada2_b_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('flags', flags), - ('network_enabled_on_boot', ctypes.c_uint16), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('lin1', LIN_SETTINGS), - ('iso9141_kwp_settings_1', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_1', ctypes.c_uint16), - ('iso_msg_termination_1', ctypes.c_uint16), - ('network_enables', ctypes.c_uint64), - ('termination_enables', ctypes.c_uint64), - ('timeSyncSettings', TIMESYNC_ICSHARDWARE_SETTINGS), - ('reporting', RAD_REPORTING_SETTINGS), - ('disk', DISK_SETTINGS), - ('logger', LOGGER_SETTINGS), - ('iso15765_separation_time_offset', ctypes.c_int16), - ('a2b_monitor', A2BMonitorSettings), - ('a2b_node', A2BMonitorSettings), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ] - - -_SRADA2BSettings = srada2_b_settings -SRADA2BSettings = srada2_b_settings - diff --git a/ics/structures/sradbms_settings.py b/ics/structures/sradbms_settings.py deleted file mode 100644 index bff52e34a..000000000 --- a/ics/structures/sradbms_settings.py +++ /dev/null @@ -1,48 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.ethernet_settings import * -from ics.structures.ethernet_settings2 import * -from ics.structures.swil_bridge_config import * - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('disableUsbCheckOnBoot', ctypes.c_uint32, 1), - ('enableLatencyTest', ctypes.c_uint32, 1), - ('enablePcEthernetComm', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 29), - ] - - - -class sradbms_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('termination_enables', ctypes.c_uint64), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('network_enables_3', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_int16), - ('flags', flags), - ('ethernet', ETHERNET_SETTINGS), - ('ethernet2', ETHERNET_SETTINGS2), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('wil_config', SWILBridgeConfig), - ] - - -_SRADBMSSettings = sradbms_settings -SRADBMSSettings = sradbms_settings - diff --git a/ics/structures/st_api_firmware_info.py b/ics/structures/st_api_firmware_info.py deleted file mode 100644 index d479d4cea..000000000 --- a/ics/structures/st_api_firmware_info.py +++ /dev/null @@ -1,36 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class st_api_firmware_info(ctypes.Structure): - _pack_ = 1 - _fields_ = [ - ('iType', ctypes.c_int32), - ('iMainFirmDateDay', ctypes.c_int32), - ('iMainFirmDateMonth', ctypes.c_int32), - ('iMainFirmDateYear', ctypes.c_int32), - ('iMainFirmDateHour', ctypes.c_int32), - ('iMainFirmDateMin', ctypes.c_int32), - ('iMainFirmDateSecond', ctypes.c_int32), - ('iMainFirmChkSum', ctypes.c_int32), - ('iAppMajor', ctypes.c_uint8), - ('iAppMinor', ctypes.c_uint8), - ('iManufactureDay', ctypes.c_uint8), - ('iManufactureMonth', ctypes.c_uint8), - ('iManufactureYear', ctypes.c_uint16), - ('iBoardRevMajor', ctypes.c_uint8), - ('iBoardRevMinor', ctypes.c_uint8), - ('iBootLoaderVersionMajor', ctypes.c_uint8), - ('iBootLoaderVersionMinor', ctypes.c_uint8), - ('iMainVnetHWrevMajor', ctypes.c_uint8), - ('iMainVnetHWrevMinor', ctypes.c_uint8), - ('iMainVnetSRAMSize', ctypes.c_uint8), - ('iPhySiliconRev', ctypes.c_uint8), - ] - - -_stAPIFirmwareInfo = st_api_firmware_info -stAPIFirmwareInfo = st_api_firmware_info - diff --git a/ics/structures/st_chip_versions.py b/ics/structures/st_chip_versions.py deleted file mode 100644 index f32565cf9..000000000 --- a/ics/structures/st_chip_versions.py +++ /dev/null @@ -1,321 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class fire_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mpic_maj', ctypes.c_uint8), - ('mpic_min', ctypes.c_uint8), - ('upic_maj', ctypes.c_uint8), - ('upic_min', ctypes.c_uint8), - ('lpic_maj', ctypes.c_uint8), - ('lpic_min', ctypes.c_uint8), - ('jpic_maj', ctypes.c_uint8), - ('jpic_min', ctypes.c_uint8), - ] - - - -class plasma_fire_vnet(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mpic_maj', ctypes.c_uint8), - ('mpic_min', ctypes.c_uint8), - ('core_maj', ctypes.c_uint8), - ('core_min', ctypes.c_uint8), - ('lpic_maj', ctypes.c_uint8), - ('lpic_min', ctypes.c_uint8), - ('hid_maj', ctypes.c_uint8), - ('hid_min', ctypes.c_uint8), - ] - - - -class vcan3_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mpic_maj', ctypes.c_uint8), - ('mpic_min', ctypes.c_uint8), - ] - - - -class vcanrf_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mpic_maj', ctypes.c_uint8), - ('mpic_min', ctypes.c_uint8), - ] - - - -class radgalaxy_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('zynq_core_major', ctypes.c_uint8), - ('zynq_core_minor', ctypes.c_uint8), - ] - - - -class radstar2_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('zynq_core_major', ctypes.c_uint8), - ('zynq_core_minor', ctypes.c_uint8), - ] - - - -class vividcan_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mpic_maj', ctypes.c_uint8), - ('mpic_min', ctypes.c_uint8), - ('ext_flash_maj', ctypes.c_uint8), - ('ext_flash_min', ctypes.c_uint8), - ('nrf52_maj', ctypes.c_uint8), - ('nrf52_min', ctypes.c_uint8), - ] - - - -class cmprobe_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('zynq_core_major', ctypes.c_uint8), - ('zynq_core_minor', ctypes.c_uint8), - ] - - - -class obd2pro_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mchip_major', ctypes.c_uint8), - ('mchip_minor', ctypes.c_uint8), - ('schip_major', ctypes.c_uint8), - ('schip_minor', ctypes.c_uint8), - ('core_major', ctypes.c_uint8), - ('core_minor', ctypes.c_uint8), - ] - - - -class vcan41_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mchip_major', ctypes.c_uint8), - ('mchip_minor', ctypes.c_uint8), - ] - - - -class vcan42_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mchip_major', ctypes.c_uint8), - ('mchip_minor', ctypes.c_uint8), - ] - - - -class neoecu_avb_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mchip_major', ctypes.c_uint8), - ('mchip_minor', ctypes.c_uint8), - ] - - - -class radsupermoon_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('zynq_core_major', ctypes.c_uint8), - ('zynq_core_minor', ctypes.c_uint8), - ] - - - -class radmoon2_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('zynq_core_major', ctypes.c_uint8), - ('zynq_core_minor', ctypes.c_uint8), - ] - - - -class radmoon2_z7010_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('zynq_core_major', ctypes.c_uint8), - ('zynq_core_minor', ctypes.c_uint8), - ] - - - -class pluto_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mchip_major', ctypes.c_uint8), - ('mchip_minor', ctypes.c_uint8), - ] - - - -class radgigalog_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('zynq_core_major', ctypes.c_uint8), - ('zynq_core_minor', ctypes.c_uint8), - ] - - - -class radgigalog3_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('zynq_core_major', ctypes.c_uint8), - ('zynq_core_minor', ctypes.c_uint8), - ] - - - -class radgigastar_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('zynq_core_major', ctypes.c_uint8), - ('zynq_core_minor', ctypes.c_uint8), - ] - - - -class radgigastar_usbz_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('zynq_core_major', ctypes.c_uint8), - ('zynq_core_minor', ctypes.c_uint8), - ] - - - -class obd2lc_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mchip_major', ctypes.c_uint8), - ('mchip_minor', ctypes.c_uint8), - ('schip_major', ctypes.c_uint8), - ('schip_minor', ctypes.c_uint8), - ] - - - -class jupiter_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mchip_major', ctypes.c_uint8), - ('mchip_minor', ctypes.c_uint8), - ] - - - -class fire3_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('zchip_major', ctypes.c_uint8), - ('zchip_minor', ctypes.c_uint8), - ('schip_major', ctypes.c_uint8), - ('schip_minor', ctypes.c_uint8), - ] - - - -class rad_moon_duo_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mchip_major', ctypes.c_uint8), - ('mchip_minor', ctypes.c_uint8), - ] - - - -class obd2dev_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mchip_major', ctypes.c_uint8), - ('mchip_minor', ctypes.c_uint8), - ('schip_major', ctypes.c_uint8), - ('schip_minor', ctypes.c_uint8), - ] - - - -class ether_badge_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mchip_major', ctypes.c_uint8), - ('mchip_minor', ctypes.c_uint8), - ] - - - -class rad_a2b_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('zynq_core_major', ctypes.c_uint8), - ('zynq_core_minor', ctypes.c_uint8), - ] - - - -class epsilon_versions(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('mchip_major', ctypes.c_uint8), - ('mchip_minor', ctypes.c_uint8), - ] - - - -class st_chip_versions(ctypes.Union): - _pack_ = 2 - _fields_ = [ - ('fire_versions', fire_versions), - ('plasma_fire_vnet', plasma_fire_vnet), - ('vcan3_versions', vcan3_versions), - ('vcanrf_versions', vcanrf_versions), - ('radgalaxy_versions', radgalaxy_versions), - ('radstar2_versions', radstar2_versions), - ('vividcan_versions', vividcan_versions), - ('cmprobe_versions', cmprobe_versions), - ('obd2pro_versions', obd2pro_versions), - ('vcan41_versions', vcan41_versions), - ('vcan42_versions', vcan42_versions), - ('neoecu_avb_versions', neoecu_avb_versions), - ('radsupermoon_versions', radsupermoon_versions), - ('radmoon2_versions', radmoon2_versions), - ('radmoon2_z7010_versions', radmoon2_z7010_versions), - ('pluto_versions', pluto_versions), - ('radgigalog_versions', radgigalog_versions), - ('radgigalog3_versions', radgigalog3_versions), - ('radgigastar_versions', radgigastar_versions), - ('radgigastar_usbz_versions', radgigastar_usbz_versions), - ('obd2lc_versions', obd2lc_versions), - ('jupiter_versions', jupiter_versions), - ('fire3_versions', fire3_versions), - ('rad_moon_duo_versions', rad_moon_duo_versions), - ('obd2dev_versions', obd2dev_versions), - ('ether_badge_versions', ether_badge_versions), - ('rad_a2b_versions', rad_a2b_versions), - ('epsilon_versions', epsilon_versions), - ] - - -_stChipVersions = st_chip_versions -stChipVersions = st_chip_versions - diff --git a/ics/structures/st_cm_iso157652_rx_message.py b/ics/structures/st_cm_iso157652_rx_message.py deleted file mode 100644 index 0fc447af6..000000000 --- a/ics/structures/st_cm_iso157652_rx_message.py +++ /dev/null @@ -1,53 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class Nameless2529(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('id_29_bit_enable', ctypes.c_uint, 1), - ('fc_id_29_bit_enable', ctypes.c_uint, 1), - ('ext_address_enable', ctypes.c_uint, 1), - ('fc_ext_address_enable', ctypes.c_uint, 1), - ('enableFlowControlTransmission', ctypes.c_uint, 1), - ('paddingEnable', ctypes.c_uint, 1), - ('iscanFD', ctypes.c_uint, 1), - ('isBRSEnabled', ctypes.c_uint, 1), - ] - - - -class Nameless9252(ctypes.Union): - _pack_ = 2 - _anonymous_ = ('Nameless2529',) - _fields_ = [ - ('Nameless2529', Nameless2529), - ('flags', ctypes.c_uint32), - ] - - - -class st_cm_iso157652_rx_message(ctypes.Structure): - _pack_ = 2 - _anonymous_ = ('Nameless9252',) - _fields_ = [ - ('vs_netid', ctypes.c_uint16), - ('padding', ctypes.c_uint8), - ('id', ctypes.c_uint32), - ('id_mask', ctypes.c_uint32), - ('fc_id', ctypes.c_uint32), - ('flowControlExtendedAddress', ctypes.c_uint8), - ('extendedAddress', ctypes.c_uint8), - ('blockSize', ctypes.c_uint8), - ('stMin', ctypes.c_uint8), - ('cf_timeout', ctypes.c_uint16), - ('Nameless9252', Nameless9252), - ('reserved', ctypes.c_uint8 * 16), - ] - - -_stCM_ISO157652_RxMessage = st_cm_iso157652_rx_message -stCM_ISO157652_RxMessage = st_cm_iso157652_rx_message - diff --git a/ics/structures/st_cm_iso157652_tx_message.py b/ics/structures/st_cm_iso157652_tx_message.py deleted file mode 100644 index 510a857cd..000000000 --- a/ics/structures/st_cm_iso157652_tx_message.py +++ /dev/null @@ -1,59 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class Nameless34924(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('id_29_bit_enable', ctypes.c_uint, 1), - ('fc_id_29_bit_enable', ctypes.c_uint, 1), - ('ext_address_enable', ctypes.c_uint, 1), - ('fc_ext_address_enable', ctypes.c_uint, 1), - ('overrideSTmin', ctypes.c_uint, 1), - ('overrideBlockSize', ctypes.c_uint, 1), - ('paddingEnable', ctypes.c_uint, 1), - ('iscanFD', ctypes.c_uint, 1), - ('isBRSEnabled', ctypes.c_uint, 1), - ('', ctypes.c_uint, 15), - ('tx_dl', ctypes.c_uint, 8), - ] - - - -class Nameless32656(ctypes.Union): - _pack_ = 2 - _anonymous_ = ('Nameless34924',) - _fields_ = [ - ('Nameless34924', Nameless34924), - ('flags', ctypes.c_uint32), - ] - - - -class st_cm_iso157652_tx_message(ctypes.Structure): - _pack_ = 2 - _anonymous_ = ('Nameless32656',) - _fields_ = [ - ('vs_netid', ctypes.c_uint16), - ('padding', ctypes.c_uint8), - ('tx_index', ctypes.c_uint8), - ('id', ctypes.c_uint32), - ('fc_id', ctypes.c_uint32), - ('fc_id_mask', ctypes.c_uint32), - ('stMin', ctypes.c_uint8), - ('blockSize', ctypes.c_uint8), - ('flowControlExtendedAddress', ctypes.c_uint8), - ('extendedAddress', ctypes.c_uint8), - ('fs_timeout', ctypes.c_uint16), - ('fs_wait', ctypes.c_uint16), - ('data', ctypes.c_uint8 * 4096), - ('num_bytes', ctypes.c_uint32), - ('Nameless32656', Nameless32656), - ] - - -_stCM_ISO157652_TxMessage = st_cm_iso157652_tx_message -stCM_ISO157652_TxMessage = st_cm_iso157652_tx_message - diff --git a/ics/structures/start_dhcp_server_command.py b/ics/structures/start_dhcp_server_command.py deleted file mode 100644 index 8dd6e6f41..000000000 --- a/ics/structures/start_dhcp_server_command.py +++ /dev/null @@ -1,23 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class start_dhcp_server_command(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('networkId', ctypes.c_uint16), - ('serverIpAddress', ctypes.c_uint32), - ('subnetMask', ctypes.c_uint32), - ('gatewayAddress', ctypes.c_uint32), - ('startAddress', ctypes.c_uint32), - ('endAddress', ctypes.c_uint32), - ('leaseTime', ctypes.c_uint32), - ('overwrite', ctypes.c_uint32), - ] - - -_StartDHCPServerCommand = start_dhcp_server_command -StartDHCPServerCommand = start_dhcp_server_command - diff --git a/ics/structures/stop_dhcp_server_command.py b/ics/structures/stop_dhcp_server_command.py deleted file mode 100644 index fd26146f9..000000000 --- a/ics/structures/stop_dhcp_server_command.py +++ /dev/null @@ -1,16 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class stop_dhcp_server_command(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('networkId', ctypes.c_uint16), - ] - - -_StopDHCPServerCommand = stop_dhcp_server_command -StopDHCPServerCommand = stop_dhcp_server_command - diff --git a/ics/structures/svcan3_settings.py b/ics/structures/svcan3_settings.py deleted file mode 100644 index b1de39f4c..000000000 --- a/ics/structures/svcan3_settings.py +++ /dev/null @@ -1,26 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * - - -class svcan3_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('can1', CAN_SETTINGS), - ('can2', CAN_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_uint16), - ('perf_en', ctypes.c_uint16), - ('misc_io_initial_ddr', ctypes.c_uint16), - ('misc_io_initial_latch', ctypes.c_uint16), - ('misc_io_report_period', ctypes.c_uint16), - ('misc_io_on_report_events', ctypes.c_uint16), - ] - - -_SVCAN3Settings = svcan3_settings -SVCAN3Settings = svcan3_settings - diff --git a/ics/structures/svcan412_settings.py b/ics/structures/svcan412_settings.py deleted file mode 100644 index c19678689..000000000 --- a/ics/structures/svcan412_settings.py +++ /dev/null @@ -1,42 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.s_text_api_settings import * - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('disableUsbCheckOnBoot', ctypes.c_uint32, 1), - ('enableLatencyTest', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 30), - ] - - - -class svcan412_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('network_enables', ctypes.c_uint64), - ('termination_enables', ctypes.c_uint64), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_int16), - ('text_api', STextAPISettings), - ('flags', flags), - ] - - -_VCAN412Settings = svcan412_settings -VCAN412Settings = svcan412_settings -SVCAN412Settings = svcan412_settings - diff --git a/ics/structures/svcan4_ind_settings.py b/ics/structures/svcan4_ind_settings.py deleted file mode 100644 index 2c8923cff..000000000 --- a/ics/structures/svcan4_ind_settings.py +++ /dev/null @@ -1,72 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.ethernet_settings import * -from ics.structures.ethernet_settings2 import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * - - -class Nameless8267(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('network_enables_3', ctypes.c_uint16), - ] - - - -class network_enables(ctypes.Union): - _pack_ = 2 - _anonymous_ = ('Nameless8267',) - _fields_ = [ - ('word', ctypes.c_uint64), - ('Nameless8267', Nameless8267), - ] - - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('disableUsbCheckOnBoot', ctypes.c_uint32, 1), - ('enableLatencyTest', ctypes.c_uint32, 1), - ('busMessagesToAndroid', ctypes.c_uint32, 1), - ('enablePcEthernetComm', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 28), - ] - - - -class svcan4_ind_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('ethernet', ETHERNET_SETTINGS), - ('lin1', LIN_SETTINGS), - ('iso9141_kwp_settings', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity', ctypes.c_uint16), - ('iso_msg_termination', ctypes.c_uint16), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('perf_en', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_int16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('network_enables', network_enables), - ('termination_enables', ctypes.c_uint64), - ('flags', flags), - ('ethernet2', ETHERNET_SETTINGS2), - ] - - -_VCAN4IndSettings = svcan4_ind_settings -VCAN4IndSettings = svcan4_ind_settings -SVCAN4IndSettings = svcan4_ind_settings - diff --git a/ics/structures/svcan4_settings.py b/ics/structures/svcan4_settings.py deleted file mode 100644 index 0eea9930f..000000000 --- a/ics/structures/svcan4_settings.py +++ /dev/null @@ -1,58 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.canfd_settings import * -from ics.structures.ethernet_settings import * -from ics.structures.ethernet_settings2 import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * -from ics.structures.s_text_api_settings import * - - -class flags(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('enableLatencyTest', ctypes.c_uint32, 1), - ('enablePcEthernetComm', ctypes.c_uint32, 1), - ('reserved', ctypes.c_uint32, 30), - ] - - - -class svcan4_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('perf_en', ctypes.c_uint16), - ('can1', CAN_SETTINGS), - ('canfd1', CANFD_SETTINGS), - ('can2', CAN_SETTINGS), - ('canfd2', CANFD_SETTINGS), - ('can3', CAN_SETTINGS), - ('canfd3', CANFD_SETTINGS), - ('can4', CAN_SETTINGS), - ('canfd4', CANFD_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('lin1', LIN_SETTINGS), - ('network_enabled_on_boot', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_int16), - ('iso_9141_kwp_enable_reserved', ctypes.c_uint16), - ('iso9141_kwp_settings_1', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_1', ctypes.c_uint16), - ('iso_msg_termination_1', ctypes.c_uint16), - ('network_enables_3', ctypes.c_uint16), - ('text_api', STextAPISettings), - ('termination_enables', ctypes.c_uint64), - ('ethernet', ETHERNET_SETTINGS), - ('flags', flags), - ('pwr_man_enable', ctypes.c_uint16), - ('pwr_man_timeout', ctypes.c_uint16), - ('ethernet2', ETHERNET_SETTINGS2), - ] - - -_SVCAN4Settings = svcan4_settings -SVCAN4Settings = svcan4_settings - diff --git a/ics/structures/svcanrf_settings.py b/ics/structures/svcanrf_settings.py deleted file mode 100644 index 3b52de81c..000000000 --- a/ics/structures/svcanrf_settings.py +++ /dev/null @@ -1,48 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.can_settings import * -from ics.structures.iso9141_keyword2000_settings import * -from ics.structures.lin_settings import * - - -class svcanrf_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('can1', CAN_SETTINGS), - ('can2', CAN_SETTINGS), - ('can3', CAN_SETTINGS), - ('can4', CAN_SETTINGS), - ('lin1', LIN_SETTINGS), - ('lin2', LIN_SETTINGS), - ('network_enables', ctypes.c_uint16), - ('network_enabled_on_boot', ctypes.c_uint16), - ('pwr_man_timeout', ctypes.c_uint32), - ('pwr_man_enable', ctypes.c_uint16), - ('misc_io_initial_ddr', ctypes.c_uint16), - ('misc_io_initial_latch', ctypes.c_uint16), - ('misc_io_analog_enable', ctypes.c_uint16), - ('misc_io_report_period', ctypes.c_uint16), - ('misc_io_on_report_events', ctypes.c_uint16), - ('iso15765_separation_time_offset', ctypes.c_uint16), - ('iso9141_kwp_enable_reserved', ctypes.c_uint16), - ('iso9141_kwp_settings', ISO9141_KEYWORD2000_SETTINGS), - ('perf_en', ctypes.c_uint16), - ('iso_parity', ctypes.c_uint16), - ('iso_msg_termination', ctypes.c_uint16), - ('iso_tester_pullup_enable', ctypes.c_uint16), - ('network_enables_2', ctypes.c_uint16), - ('iso9141_kwp_settings_2', ISO9141_KEYWORD2000_SETTINGS), - ('iso_parity_2', ctypes.c_uint16), - ('iso_msg_termination_2', ctypes.c_uint16), - ('idle_wakeup_network_enables_1', ctypes.c_uint16), - ('idle_wakeup_network_enables_2', ctypes.c_uint16), - ('disableFwLEDs', ctypes.c_uint16, 1), - ('reservedZero', ctypes.c_uint16, 15), - ] - - -_SVCANRFSettings = svcanrf_settings -SVCANRFSettings = svcanrf_settings - diff --git a/ics/structures/swcan_settings.py b/ics/structures/swcan_settings.py deleted file mode 100644 index 9dcd83d16..000000000 --- a/ics/structures/swcan_settings.py +++ /dev/null @@ -1,26 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class swcan_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('Mode', ctypes.c_uint8), - ('SetBaudrate', ctypes.c_uint8), - ('Baudrate', ctypes.c_uint8), - ('transceiver_mode', ctypes.c_uint8), - ('TqSeg1', ctypes.c_uint8), - ('TqSeg2', ctypes.c_uint8), - ('TqProp', ctypes.c_uint8), - ('TqSync', ctypes.c_uint8), - ('BRP', ctypes.c_uint16), - ('high_speed_auto_switch', ctypes.c_uint16), - ('auto_baud', ctypes.c_uint8), - ('RESERVED', ctypes.c_uint8), - ] - - -SWCAN_SETTINGS = swcan_settings - diff --git a/ics/structures/swil_bridge_config.py b/ics/structures/swil_bridge_config.py deleted file mode 100644 index f8118b570..000000000 --- a/ics/structures/swil_bridge_config.py +++ /dev/null @@ -1,27 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class config(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('can_id', ctypes.c_uint, 29), - ('can_id_isExtended', ctypes.c_uint, 1), - ('tcp_port', ctypes.c_uint16), - ('reserved', ctypes.c_uint, 18), - ] - - - -class swil_bridge_config(ctypes.Union): - _pack_ = 2 - _fields_ = [ - ('dword', ctypes.c_uint64), - ('config', config), - ] - - -SWILBridgeConfig = swil_bridge_config - diff --git a/ics/structures/system_identity.py b/ics/structures/system_identity.py deleted file mode 100644 index 29ba48bd3..000000000 --- a/ics/structures/system_identity.py +++ /dev/null @@ -1,18 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - -from ics.structures.clock_quality_ import * - - -class system_identity(ctypes.Structure): - _pack_ = 1 - _fields_ = [ - ('priority_1', ctypes.c_uint8), - ('clock_quality', clock_quality_), - ('priority_2', ctypes.c_uint8), - ('clock_identity', ctypes.c_uint64), - ] - - - diff --git a/ics/structures/tag_options_find_neo_ex.py b/ics/structures/tag_options_find_neo_ex.py deleted file mode 100644 index 1a7cc6fd3..000000000 --- a/ics/structures/tag_options_find_neo_ex.py +++ /dev/null @@ -1,24 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class CANOptions(ctypes.Structure): - _fields_ = [ - ('iNetworkID', ctypes.c_int32), - ] - - - -class tag_options_find_neo_ex(ctypes.Union): - _fields_ = [ - ('CANOptions', CANOptions), - ('Reserved', ctypes.c_uint32 * 16), - ] - - -tagOptionsFindNeoEx = tag_options_find_neo_ex -OptionsFindNeoEx = tag_options_find_neo_ex -POptionsFindNeoEx = tag_options_find_neo_ex - diff --git a/ics/structures/tag_options_open_neo_ex.py b/ics/structures/tag_options_open_neo_ex.py deleted file mode 100644 index b4be4783d..000000000 --- a/ics/structures/tag_options_open_neo_ex.py +++ /dev/null @@ -1,24 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class CANOptions(ctypes.Structure): - _fields_ = [ - ('iNetworkID', ctypes.c_int32), - ] - - - -class tag_options_open_neo_ex(ctypes.Union): - _fields_ = [ - ('CANOptions', CANOptions), - ('Reserved', ctypes.c_uint32 * 16), - ] - - -tagOptionsOpenNeoEx = tag_options_open_neo_ex -OptionsOpenNeoEx = tag_options_open_neo_ex -POptionsOpenNeoEx = tag_options_open_neo_ex - diff --git a/ics/structures/tagicsneo_vi_command.py b/ics/structures/tagicsneo_vi_command.py deleted file mode 100644 index 05d9d5da8..000000000 --- a/ics/structures/tagicsneo_vi_command.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class tagicsneo_vi_command(ctypes.Structure): - _fields_ = [ - ('CommandType', ctypes.c_uint8), - ('CommandByteLength', ctypes.c_uint8), - ('Data', ctypes.c_uint8 * 14), - ] - - -tagicsneoVICommand = tagicsneo_vi_command -icsneoVICommand = tagicsneo_vi_command - diff --git a/ics/structures/timestamp_.py b/ics/structures/timestamp_.py deleted file mode 100644 index 743ff537a..000000000 --- a/ics/structures/timestamp_.py +++ /dev/null @@ -1,17 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class timestamp_(ctypes.Structure): - _pack_ = 1 - _fields_ = [ - ('seconds_msb', ctypes.c_uint16), - ('seconds_lsb', ctypes.c_uint32), - ('nanoseconds', ctypes.c_uint32), - ] - - -_timestamp = timestamp_ - diff --git a/ics/structures/timesync_icshardware_settings.py b/ics/structures/timesync_icshardware_settings.py deleted file mode 100644 index 5a1cb1bf7..000000000 --- a/ics/structures/timesync_icshardware_settings.py +++ /dev/null @@ -1,18 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class timesync_icshardware_settings(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('MasterEnable', ctypes.c_uint8), - ('SlaveEnable', ctypes.c_uint8), - ('MasterNetwork', ctypes.c_uint8), - ('SlaveNetwork', ctypes.c_uint8), - ] - - -TIMESYNC_ICSHARDWARE_SETTINGS = timesync_icshardware_settings - diff --git a/ics/structures/uart_settings.py b/ics/structures/uart_settings.py deleted file mode 100644 index de156330a..000000000 --- a/ics/structures/uart_settings.py +++ /dev/null @@ -1,46 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class Nameless31039(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('invert_tx', ctypes.c_uint, 1), - ('invert_rx', ctypes.c_uint, 1), - ('half_duplex', ctypes.c_uint, 1), - ('reserved_bits', ctypes.c_uint, 13), - ('reserved_bits2', ctypes.c_uint, 16), - ] - - - -class Nameless2284(ctypes.Union): - _pack_ = 2 - _anonymous_ = ('Nameless31039',) - _fields_ = [ - ('bOptions', ctypes.c_uint32), - ('Nameless31039', Nameless31039), - ] - - - -class uart_settings(ctypes.Structure): - _pack_ = 2 - _anonymous_ = ('Nameless2284',) - _fields_ = [ - ('Baudrate', ctypes.c_uint16), - ('spbrg', ctypes.c_uint16), - ('brgh', ctypes.c_uint16), - ('parity', ctypes.c_uint16), - ('stop_bits', ctypes.c_uint16), - ('flow_control', ctypes.c_uint8), - ('reserved_1', ctypes.c_uint8), - ('Nameless2284', Nameless2284), - ] - - -_UART_SETTINGS = uart_settings -UART_SETTINGS = uart_settings - diff --git a/ics/structures/version_report.py b/ics/structures/version_report.py deleted file mode 100644 index 217854550..000000000 --- a/ics/structures/version_report.py +++ /dev/null @@ -1,22 +0,0 @@ -# This file was auto generated; Do not modify, if you value your sanity! -import ctypes -import enum - - - -class version_report(ctypes.Structure): - _pack_ = 2 - _fields_ = [ - ('valid', ctypes.c_uint8), - ('expansionSlot', ctypes.c_uint8), - ('componentInfo', ctypes.c_uint8), - ('reserved', ctypes.c_uint8), - ('identifier', ctypes.c_uint32), - ('dotVersion', ctypes.c_uint32), - ('commitHash', ctypes.c_uint32), - ] - - -_VersionReport = version_report -VersionReport = version_report - diff --git a/ics_utility.py b/ics_utility.py new file mode 100644 index 000000000..4ab3e65ae --- /dev/null +++ b/ics_utility.py @@ -0,0 +1,115 @@ +import os +import dunamai +import pathlib +import re + +GEN_DIR = pathlib.Path("./gen") +GEN_ICS_DIR = GEN_DIR / "ics" + + +def _get_version_from_metadata() -> str: + """ + Try to read version from existing package metadata (PKG-INFO). + Used as fallback when building from sdist in isolated environment. + """ + # Check for PKG-INFO in the egg-info directory + egg_info_dirs = list(pathlib.Path(".").glob("*.egg-info")) + if egg_info_dirs: + pkg_info = egg_info_dirs[0] / "PKG-INFO" + if pkg_info.exists(): + try: + content = pkg_info.read_text() + match = re.search(r"^Version:\s+(.+)$", content, re.MULTILINE) + if match: + return match.group(1) + except Exception: + pass + return None + +def get_pkg_version() -> str: + """ + Get the package version. + + Returns: + str: The package version. + """ + # version = dunamai.Version.from_git() + # # Set the dev version if the environment variable is set. + # if os.getenv("PYTHON_ICS_DEV_BUILD") is not None: + # pkg_version = version.serialize(format="v{base}.dev{distance}", style=dunamai.Style.Pep440) + # else: + # pkg_version = version.serialize(format="{base}", style=dunamai.Style.Pep440) + try: + return dunamai.Version.from_git().serialize(metadata=False) + except RuntimeError: + # Fallback when git is not available (e.g., in isolated build environments) + # Try to read version from existing package metadata + metadata_version = _get_version_from_metadata() + if metadata_version: + return metadata_version + # Final fallback + return "0.0.0.dev0" + # return pkg_version + +def create_version_py(path: pathlib.Path = pathlib.Path("gen/ics/__version.py")) -> None: + """ + Create a version.py file with the package version and full version. + + Args: + path (pathlib.Path, optional): The path to the version.py file. Defaults to pathlib.Path("gen/ics/__version.py"). + + Returns: + None + """ + pkg_version = get_pkg_version() + try: + full_version = dunamai.Version.from_git().serialize(format="v{base}-{commit}-{timestamp}") + except RuntimeError: + # Fallback when git is not available + full_version = f"v{pkg_version}" + print(f"Creating '{path}' with version {pkg_version} and full version {full_version}...") + path.parent.mkdir(parents=True, exist_ok=True) + # Write the version file to disk + with open(path, "w+") as f: + f.write(f"""__version__ = "{pkg_version}"\n""") + f.write(f"""__full_version__ = "{full_version}"\n""") + +def create_ics_init(): + fdata = \ +"""# Warning: This file is auto generated. Don't modify if you value your sanity! +try: + import ics.__version + __version__ = ics.__version.__version__ + __full_version__ = ics.__version.__full_version__ +except Exception as ex: + print(ex) + + +from ics.structures import * +from ics.structures.neo_device import NeoDevice, neo_device +from ics.hiddenimports import hidden_imports +try: + from ics.py_neo_device_ex import PyNeoDeviceEx +except ModuleNotFoundError as ex: + print(f"Warning: {ex}") + +try: + # Release environment + #print("Release") + from ics.ics import * +except Exception as ex: + # Build environment + #print("Debug", ex) + from ics import * +""" + init_path = GEN_ICS_DIR / "__init__.py" + print(f"Creating '{init_path}'...") + init_path.parent.mkdir(parents=True, exist_ok=True) + with open(init_path, "w+") as f: + f.write(fdata) + + +if __name__ == "__main__": + create_ics_init() + create_version_py() + print("Version info generated!") \ No newline at end of file diff --git a/icsnVC40.h.enums.json b/icsnVC40.h.enums.json deleted file mode 100644 index 97a7f7fec..000000000 --- a/icsnVC40.h.enums.json +++ /dev/null @@ -1,3813 +0,0 @@ -[ - { - "names": [], - "data_type": "Enum", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "AUTO", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "USE_TQ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "BPS20", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS33", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS50", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS62", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS83", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS100", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS125", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS250", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS500", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS800", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS1000", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS666", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS2000", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS4000", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "CAN_BPS5000", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "CAN_BPS6667", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "CAN_BPS8000", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "CAN_BPS10000", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "NORMAL ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "DISABLE ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 1 - }, - { - "name": "LOOPBACK ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 2 - }, - { - "name": "LISTEN_ONLY ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 3 - }, - { - "name": "LISTEN_ALL ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 7 - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "NO_CANFD", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "CANFD_ENABLED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "CANFD_BRS_ENABLED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "CANFD_ENABLED_ISO", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "CANFD_BRS_ENABLED_ISO", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "SWCAN_AUTOSWITCH_DISABLED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SWCAN_AUTOSWITCH_NO_RESISTOR", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SWCAN_AUTOSWITCH_WITH_RESISTOR", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SWCAN_AUTOSWITCH_DISABLED_RESISTOR_ENABLED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "BPS5000", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS10400", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS33333", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS50000", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS62500", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS71429", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS83333", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS100000", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BPS117647", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "RESISTOR_ON", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "RESISTOR_OFF", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "SLEEP_MODE", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SLOW_MODE", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NORMAL_MODE", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "FAST_MODE", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "OPETH_FUNC_TAP ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "OPETH_FUNC_MEDIACONVERTER", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "OPETH_FUNC_TAP_LOW_LATENCY", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "OPETH_FUNC_RAW_MEDIA_CONVERTER", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "OPETH_FUNC_RAW_MEDIA_CONVERTER2", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "OPETH_FUNC_RAW_MEDIA_CONVERTER2_LOW_LATENCY", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_opEthLinkMode", - "opEthLinkMode" - ], - "data_type": "Enum", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "OPETH_LINK_AUTO ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "OPETH_LINK_MASTER", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "OPETH_LINK_SLAVE", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "OPETH_MAC_SPOOF_DST_ADDR ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "OPETH_MAC_SPOOF_SRC_ADDR ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 1 - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "LINK_SPEED_AUTO_NEGOTIATION ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "LINK_SPEED_1GBPS_FULL_DUPLEX", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "LINK_SPEED_1GBPS_HALF_DUPLEX", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "LINK_SPEED_100MBPS_FULL_DUPLEX", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "LINK_SPEED_100MBPS_HALF_DUPLEX", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "LINK_SPEED_10MBPS_FULL_DUPLEX", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "LINK_SPEED_10MBPS_HALF_DUPLEX", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "LINK_SPEED_COUNT", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_EDiskFormat", - "EDiskFormat" - ], - "data_type": "Enum", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "DiskFormatUnknown ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "DiskFormatFAT32", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DiskFormatexFAT", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_EDiskLayout", - "EDiskLayout" - ], - "data_type": "Enum", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "DiskLayoutSpanned ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "DiskLayoutRAID0", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DiskLayoutRAID1", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DiskLayoutRAID5", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DiskLayoutIndividual", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_ExtendedResponseCode", - "ExtendedResponseCode" - ], - "data_type": "Enum", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "EXTENDED_RESPONSE_OK ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "EXTENDED_RESPONSE_INVALID_COMMAND ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": -1 - }, - { - "name": "EXTENDED_RESPONSE_INVALID_STATE ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": -2 - }, - { - "name": "EXTENDED_RESPONSE_OPERATION_FAILED ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": -3 - }, - { - "name": "EXTENDED_RESPONSE_OPERATION_PENDING ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": -4 - }, - { - "name": "EXTENDED_RESPONSE_INVALID_PARAMETER ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": -5 - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "swUpdateWrite", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swUpdateErase", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swUpdateGetProgress", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swUpdateValidateAll", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swUpdateGetBufferSize", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swUpdateCheckVersion", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "SERDESCAM_MODE_TAP_REPEATER ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "SERDESCAM_MODE_SPLITTER", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_MODE_LOG_ONLY", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_MODE_CUSTOM", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_MODE_COUNT", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "SERDESCAM_PIXEL_BIT_POS_0 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "SERDESCAM_PIXEL_BIT_POS_1", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_PIXEL_BIT_POS_2", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_PIXEL_BIT_POS_3", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "SERDESCAM_VIDEO_FORMAT_NONE ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": -1 - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_UYVY_422_8 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_YUYV_422_8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_YVYU_422_8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_VYUY_422_8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_RAW_8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_RAW_10", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_RAW_12", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_RAW_16", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_RAW_20", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_RAW_24", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_RAW_30", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_RAW_32", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_RAW_36", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_RGB888", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_UYVY_422_10LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_YUYV_422_10LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_YVYU_422_10LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_VYUY_422_10LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_10LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_12LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16LE", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16BE", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_JPEG", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_UYVY_422_12LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_YUYV_422_12LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_YVYU_422_12LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_VYUY_422_12LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_YUV422_10LE_PLANAR", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_YUV422_16LE_PLANAR", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_RGB565", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_RGB666", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_RAW_11x2", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_RAW_12x2", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_RAW_14", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_10LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_10LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_10LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_10LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_12LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_12LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_12LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_12LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_RGB565", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_RGB666", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_RGB888", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_10LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_12LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_10", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_11x2", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_12", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_12x2", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_14", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_16", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_20", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_24", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_30", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_32", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_36", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_10LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_12LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16LE", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16BE", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_10LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_12LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_10LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_12LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16LE", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16BE", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_10LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_12LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_10LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_12LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16LE", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16BE", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_10LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_12LE_PACKED", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SERDESCAM_VIDEO_FORMAT_COUNT", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "SERDESGEN_MOD_ID_NONE ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "SERDESGEN_MOD_ID_FPD3_2x2 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 1 - }, - { - "name": "SERDESGEN_MOD_ID_GMSL2_2x2 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 2 - }, - { - "name": "SERDESGEN_MOD_ID_GMSL1_4x4 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 3 - }, - { - "name": "SERDESGEN_MOD_ID_FPD3_TO_GMSL2_2x2 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 4 - }, - { - "name": "SERDESGEN_MOD_ID_UNKNOWN ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": -1 - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "REPORT_ON_PERIODIC", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "REPORT_ON_MISC1", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "REPORT_ON_MISC2", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "REPORT_ON_MISC3", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "REPORT_ON_MISC4", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "REPORT_ON_MISC5", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "REPORT_ON_MISC6", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "REPORT_ON_LED1", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "REPORT_ON_LED2", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "REPORT_ON_KLINE", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "REPORT_ON_MISC3_AIN", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "REPORT_ON_MISC4_AIN", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "REPORT_ON_MISC5_AIN", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "REPORT_ON_MISC6_AIN", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "REPORT_ON_PWM_IN1", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "REPORT_ON_GPS", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "eGPTPPort" - ], - "data_type": "Enum", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "ePortDisabled ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "ePortOpEth1 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 1 - }, - { - "name": "ePortOpEth2 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 2 - }, - { - "name": "ePortOpEth3 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 3 - }, - { - "name": "ePortOpEth4 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 4 - }, - { - "name": "ePortOpEth5 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 5 - }, - { - "name": "ePortOpEth6 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 6 - }, - { - "name": "ePortOpEth7 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 7 - }, - { - "name": "ePortOpEth8 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 8 - }, - { - "name": "ePortOpEth9 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 9 - }, - { - "name": "ePortOpEth10 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 10 - }, - { - "name": "ePortOpEth11 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 11 - }, - { - "name": "ePortOpEth12 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 12 - }, - { - "name": "ePortStdEth1 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 13 - }, - { - "name": "ePortStdEth2 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 14 - } - ] - }, - { - "names": [ - "eGPTPRole" - ], - "data_type": "Enum", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "eRoleDisabled ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "eRolePassive ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 1 - }, - { - "name": "eRoleMaster ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 2 - }, - { - "name": "eRoleSlave ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 3 - } - ] - }, - { - "names": [ - "A2BTDMMode" - ], - "data_type": "Enum", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "tdmModeTDM2 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "tdmModeTDM4", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tdmModeTDM8", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tdmModeTDM12", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tdmModeTDM16", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tdmModeTDM20", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tdmModeTDM24", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tdmModeTDM32", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "A2BNodeType" - ], - "data_type": "Enum", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "a2bNodeTypeMonitor ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "a2bNodeTypeMaster", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "a2bNodeTypeSlave", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_flexVnetMode", - "flexVnetMode" - ], - "data_type": "Enum", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "flexVnetModeDisabled", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "flexVnetModeOneSingle", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "flexVnetModeOneDual", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "flexVnetModeTwoSingle", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "flexVnetModeColdStart", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_EDeviceSettingsType", - "EDeviceSettingsType" - ], - "data_type": "Enum", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "DeviceFireSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceFireVnetSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceFire2SettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceVCAN3SettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceRADGalaxySettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceRADStar2SettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceVCAN4SettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceVCAN412SettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceVividCANSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceECU_AVBSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceRADSuperMoonSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceRADMoon2SettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceRADPlutoSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceRADGigalogSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceVCANRFSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceEEVBSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceVCAN4IndSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceNeoECU12SettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceFlexVnetzSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceCANHUBSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceIEVBSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceOBD2SimSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceCMProbeSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceOBD2ProSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceRedSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceRADPlutoSwitchSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceRADGigastarSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceRADJupiterSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceFire3SettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceRadMoonDuoSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceEtherBadgeSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceRADA2BSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceRADEpsilonSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceOBD2LCSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceRADBMSSettingsType", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceSettingsTypeMax", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DeviceSettingsNone ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": 4294967295 - } - ] - }, - { - "names": [ - "_EPlasmaIonVnetChannel_t", - "EPlasmaIonVnetChannel_t" - ], - "data_type": "Enum", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "PlasmaIonVnetChannelMain", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "PlasmaIonVnetChannelA", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "PlasmaIonVnetChannelB", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "eSoftCore", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "eFpgaStatusResp", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPhyRegPktStatus", - "PhyRegPktStatus_t" - ], - "data_type": "Enum", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "PHYREG_SUCCESS ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "PHYREG_FAILURE", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "PHYREG_INVALID_MDIO_BUS_INDEX", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "PHYREG_INVALID_PHY_ADDR", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "PHYREG_RESERVED0", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "PHYREG_RESERVED1", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "PHYREG_RESERVED2", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "PHYREG_RESERVED3", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPhyRegPktRw", - "PhyRegPktRw_t" - ], - "data_type": "Enum", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "PHYREG_READ ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": 0 - }, - { - "name": "PHYREG_WRITE", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "PHYREG_BOTH", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4600 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(CAN_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4601 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(CANFD_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4602 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SWCAN_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4603 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(LIN_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4604 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(ISO9141_KEYWORD2000__INIT_STEP)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4605 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(ISO9141_KEYWORD2000_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4606 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(UART_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4607 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(J1708_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4608 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SRedSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4609 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(STextAPISettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4610 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(stChipVersions)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4611 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SNeoMostGatewaySettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4612 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(OP_ETH_GENERAL_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4613 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(OP_ETH_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4614 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(ETHERNET_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4615 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(ETHERNET_SETTINGS2)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4616 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(ETHERNET10G_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4617 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(LOGGER_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4618 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(DISK_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4619 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SERDESCAM_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4620 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SERDESPOC_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4621 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SERDESGEN_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4622 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(RAD_REPORTING_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4623 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(CANTERM_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4624 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SFireSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4625 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SFireVnetSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4626 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SCyanSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4627 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SVCAN3Settings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4628 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SVCAN4Settings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4629 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SVCANRFSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4630 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SECUSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4631 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SPendantSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4632 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SIEVBSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4633 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SEEVBSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4634 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SRADGalaxySettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4635 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SRADStar2Settings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4636 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SOBD2SimSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4637 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(CmProbeSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4638 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(GLOBAL_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4639 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(stCM_ISO157652_TxMessage)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4640 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(stCM_ISO157652_RxMessage)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4641 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(spyFilterLong)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4642 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(icsSpyMessage)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4643 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(icsSpyMessageLong)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4644 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(icsSpyMessageJ1850)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4645 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(icsSpyMessageVSB)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4646 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(OBD2ProSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4647 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(ISO15765_2015_TxMessage)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4648 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(TIMESYNC_ICSHARDWARE_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4649 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SRADSuperMoonSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4650 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SRADMoon2Settings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4651 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SRADGigalogSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4652 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SRADGigastarSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4653 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SExtSubCmdHdr)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4654 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SDiskStructure)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4655 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SDiskFormatProgress)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4656 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SDiskStatus)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4657 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SExtSubCmdComm)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4658 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SRADPlutoSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4659 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(CANHubSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4660 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SNeoECU12Settings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4661 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SPlutoSwitchSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4662 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(VCAN4IndSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4663 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SRADJupiterSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4664 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(RadMoonDuoSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4665 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SFire3Settings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4666 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SEtherBadgeSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4667 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SRADA2BSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4668 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(A2BMonitorSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4669 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SRADEpsilonSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4670 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(RAD_GPTP_SETTINGS)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_4671 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SRADBMSSettings)" - } - ] - } -] \ No newline at end of file diff --git a/icsnVC40.h.json b/icsnVC40.h.json deleted file mode 100644 index ad9ef3128..000000000 --- a/icsnVC40.h.json +++ /dev/null @@ -1,19099 +0,0 @@ -[ - { - "names": [ - "SExtendedDataFlashHeader", - "ExtendedDataFlashHeader_t" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "version", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "chksum", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "len", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "NeoDevice" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "DeviceType", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Handle", - "data_type": "int32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NumberOfClients", - "data_type": "int32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SerialNumber", - "data_type": "int32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "MaxAllowedClients", - "data_type": "int32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_NeoDeviceEx", - "NeoDeviceEx" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "neoDevice", - "data_type": "NeoDevice", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "FirmwareMajor", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "FirmwareMinor", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Status", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Options", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pAvailWIFINetwork", - "data_type": "void*", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pWIFIInterfaceInfo", - "data_type": "void*", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "isEthernetDevice", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "MACAddress", - "data_type": "uint8_t", - "array_length": 6, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "hardwareRev", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "revReserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Reserved", - "data_type": "uint32_t", - "array_length": 6, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "tagOptionsOpenNeoEx", - "OptionsOpenNeoEx", - "*POptionsOpenNeoEx" - ], - "data_type": "Union", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "names": [ - "CANOptions" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "iNetworkID", - "data_type": "int32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "Reserved", - "data_type": "uint32_t", - "array_length": 16, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "tagOptionsFindNeoEx", - "OptionsFindNeoEx", - "*POptionsFindNeoEx" - ], - "data_type": "Union", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "names": [ - "CANOptions" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "iNetworkID", - "data_type": "int32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "Reserved", - "data_type": "uint32_t", - "array_length": 16, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "tagicsneoVICommand", - "icsneoVICommand" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "CommandType", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "CommandByteLength", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Data", - "data_type": "uint8_t", - "array_length": 14, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_stAPIFirmwareInfo", - "stAPIFirmwareInfo" - ], - "data_type": "Struct", - "packing": 1, - "is_anonymous": false, - "members": [ - { - "name": "iType", - "data_type": "int32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iMainFirmDateDay", - "data_type": "int32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iMainFirmDateMonth", - "data_type": "int32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iMainFirmDateYear", - "data_type": "int32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iMainFirmDateHour", - "data_type": "int32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iMainFirmDateMin", - "data_type": "int32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iMainFirmDateSecond", - "data_type": "int32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iMainFirmChkSum", - "data_type": "int32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iAppMajor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iAppMinor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iManufactureDay", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iManufactureMonth", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iManufactureYear", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iBoardRevMajor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iBoardRevMinor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iBootLoaderVersionMajor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iBootLoaderVersionMinor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iMainVnetHWrevMajor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iMainVnetHWrevMinor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iMainVnetSRAMSize", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iPhySiliconRev", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "CAN_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "Mode", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SetBaudrate", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Baudrate", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "transceiver_mode", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TqSeg1", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TqSeg2", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TqProp", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TqSync", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BRP", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "auto_baud", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "innerFrameDelay25us", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_CANFD_SETTINGS", - "CANFD_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "FDMode", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "FDBaudrate", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "FDTqSeg1", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "FDTqSeg2", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "FDTqProp", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "FDTqSync", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "FDBRP", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "FDTDC", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SWCAN_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "Mode", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SetBaudrate", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Baudrate", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "transceiver_mode", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TqSeg1", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TqSeg2", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TqProp", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TqSync", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "BRP", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "high_speed_auto_switch", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "auto_baud", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "RESERVED", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_LIN_SETTINGS", - "LIN_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "Baudrate", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "spbrg", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "brgh", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "numBitsDelay", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "MasterResistor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Mode", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "ISO9141_KEYWORD2000__INIT_STEP" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "time_500us", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "k", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "l", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "ISO9141_KEYWORD2000_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "Baudrate", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "spbrg", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "brgh", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "init_steps", - "data_type": "ISO9141_KEYWORD2000__INIT_STEP", - "array_length": 16, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "init_step_count", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "p2_500us", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "p3_500us", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "p4_500us", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "chksum_enabled", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_UART_SETTINGS", - "UART_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "Baudrate", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "spbrg", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "brgh", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "parity", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "stop_bits", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "flow_control", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved_1", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Union", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "bOptions", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Struct", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "invert_tx", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "invert_rx", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "half_duplex", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved_bits", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 13, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved_bits2", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 16, - "is_enum": false, - "enum_value": null - } - ] - } - ] - } - ] - }, - { - "names": [ - "J1708_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "enable_convert_mode", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SRedSettings", - "SRedSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin2", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_STextAPISettings", - "STextAPISettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "can1_tx_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1_rx_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "can1_options" - ], - "data_type": "Union", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "names": [], - "data_type": "Struct", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "bExtended", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 31, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "DWord", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "can2_tx_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2_rx_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "can2_options" - ], - "data_type": "Union", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "names": [], - "data_type": "Struct", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "bExtended", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 31, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "DWord", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "network_enables", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can3_tx_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can3_rx_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "can3_options" - ], - "data_type": "Union", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "names": [], - "data_type": "Struct", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "bExtended", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 31, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "DWord", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "can4_tx_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can4_rx_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "can4_options" - ], - "data_type": "Union", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "names": [], - "data_type": "Struct", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "bExtended", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 31, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "DWord", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 5, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_stChipVersions", - "stChipVersions" - ], - "data_type": "Union", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "names": [ - "fire_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mpic_maj", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mpic_min", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "upic_maj", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "upic_min", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lpic_maj", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lpic_min", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "jpic_maj", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "jpic_min", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "plasma_fire_vnet" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mpic_maj", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mpic_min", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "core_maj", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "core_min", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lpic_maj", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lpic_min", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "hid_maj", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "hid_min", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "vcan3_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mpic_maj", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mpic_min", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "vcanrf_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mpic_maj", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mpic_min", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "radgalaxy_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "zynq_core_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "zynq_core_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "radstar2_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "zynq_core_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "zynq_core_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "vividcan_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mpic_maj", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mpic_min", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ext_flash_maj", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ext_flash_min", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "nrf52_maj", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "nrf52_min", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "cmprobe_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "zynq_core_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "zynq_core_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "obd2pro_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mchip_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mchip_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "schip_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "schip_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "core_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "core_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "vcan41_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mchip_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mchip_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "vcan42_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mchip_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mchip_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "neoecu_avb_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mchip_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mchip_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "radsupermoon_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "zynq_core_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "zynq_core_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "radmoon2_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "zynq_core_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "zynq_core_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "radmoon2_z7010_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "zynq_core_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "zynq_core_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "pluto_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mchip_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mchip_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "radgigalog_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "zynq_core_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "zynq_core_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "radgigalog3_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "zynq_core_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "zynq_core_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "radgigastar_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "zynq_core_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "zynq_core_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "radgigastar_usbz_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "zynq_core_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "zynq_core_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "obd2lc_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mchip_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mchip_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "schip_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "schip_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "jupiter_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mchip_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mchip_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "fire3_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "zchip_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "zchip_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "schip_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "schip_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "rad_moon_duo_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mchip_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mchip_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "obd2dev_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mchip_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mchip_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "schip_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "schip_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "ether_badge_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mchip_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mchip_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "rad_a2b_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "zynq_core_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "zynq_core_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "epsilon_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mchip_major", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mchip_minor", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "names": [ - "_SNeoMostGatewaySettings", - "SNeoMostGatewaySettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "netId", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "zero0", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Config", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "OP_ETH_GENERAL_SETTINGS_t", - "OP_ETH_GENERAL_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "ucInterfaceType", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved0", - "data_type": "uint8_t", - "array_length": 3, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tapPair0", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tapPair1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tapPair2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tapPair3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tapPair4", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tapPair5", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Union", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "bTapEnSwitch", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "bTapEnPtp", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "bEnReportLinkQuality", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "bEnTapTxReceipts", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 28, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "uFlags", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "names": [ - "SRAD_GPTP_SETTINGS_s", - "RAD_GPTP_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "neighborPropDelayThresh", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "sys_phc_sync_interval", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "logPDelayReqInterval", - "data_type": "int8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "logSyncInterval", - "data_type": "int8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "logAnnounceInterval", - "data_type": "int8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "profile", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "priority1", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "clockclass", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "clockaccuracy", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "priority2", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "offset_scaled_log_variance", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "gPTPportRole", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "gptpEnabledPort", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableClockSyntonization", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rsvd", - "data_type": "uint8_t", - "array_length": 15, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SRAD_GPTP_AND_TAP_SETTINGS_s", - "RAD_GPTP_AND_TAP_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "gPTP", - "data_type": "RAD_GPTP_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tap", - "data_type": "OP_ETH_GENERAL_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "HW_ETH_SETTINGS_t", - "HW_ETH_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "General_Settings", - "data_type": "OP_ETH_GENERAL_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "OP_ETH_SETTINGS_t", - "OP_ETH_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "ucConfigMode", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "preemption_en", - "data_type": "unsigned char", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Union", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "names": [], - "data_type": "Struct", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "mac_addr1", - "data_type": "unsigned char", - "array_length": 6, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mac_addr2", - "data_type": "unsigned char", - "array_length": 6, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mac_spoofing_en", - "data_type": "unsigned short", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "mac_spoofing_isDstOrSrc", - "data_type": "unsigned short", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "link_spd", - "data_type": "unsigned short", - "array_length": 0, - "bitfield_size": 2, - "is_enum": false, - "enum_value": null - }, - { - "name": "q2112_phy_mode", - "data_type": "unsigned short", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "unsigned short", - "array_length": 0, - "bitfield_size": 11, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "reserved0", - "data_type": "unsigned char", - "array_length": 14, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "names": [ - "ETHERNET_SETTINGS_t", - "ETHERNET_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "duplex", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "link_speed", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "auto_neg", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "led_mode", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rsvd", - "data_type": "uint8_t", - "array_length": 4, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "ETHERNET_SETTINGS2_t", - "ETHERNET_SETTINGS2" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "flags", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "link_speed", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ip_addr", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "netmask", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "gateway", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rsvd", - "data_type": "uint8_t", - "array_length": 2, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "ETHERNET10G_SETTINGS_t", - "ETHERNET10G_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "flags", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ip_addr", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "netmask", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "gateway", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "link_speed", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rsvd2", - "data_type": "uint8_t", - "array_length": 7, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "LOGGER_SETTINGS_t", - "LOGGER_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "extraction_timeout", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rsvd", - "data_type": "uint8_t", - "array_length": 3, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "DISK_SETTINGS_t", - "DISK_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "disk_layout", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "disk_format", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "disk_enables", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rsvd", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "CANTERM_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "term_enabled", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "term_network", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint16_t", - "array_length": 2, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "TIMESYNC_ICSHARDWARE_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "MasterEnable", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SlaveEnable", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "MasterNetwork", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "SlaveNetwork", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SDiskStatus", - "SDiskStatus" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "status", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "sectors", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "bytesPerSector", - "data_type": "uint8_t", - "array_length": 4, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SDiskStructure", - "SDiskStructure" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "settings", - "data_type": "DISK_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "options", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SDiskDetails", - "SDiskDetails" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "structure", - "data_type": "SDiskStructure", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "status", - "data_type": "SDiskStatus", - "array_length": 12, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SDiskFormatProgress", - "SDiskFormatProgress" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "state", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "sectorsRemaining", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_StartDHCPServerCommand", - "StartDHCPServerCommand" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "networkId", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "serverIpAddress", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "subnetMask", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "gatewayAddress", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "startAddress", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "endAddress", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "leaseTime", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "overwrite", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_StopDHCPServerCommand", - "StopDHCPServerCommand" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "networkId", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_ExtendedResponseGeneric", - "ExtendedResponseGeneric" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "commandType", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "returnCode", - "data_type": "int32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "GetSupportedFeaturesResponse" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "cmdVersion", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "numValidBits", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "featureBitfields", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_VersionReport", - "VersionReport" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "valid", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "expansionSlot", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "componentInfo", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "identifier", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "dotVersion", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "commitHash", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_GetComponentVersions", - "GetComponentVersions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 2, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_ExtendedGetVersionsResponse", - "GetComponentVersionsResponse" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "numVersions", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "versions", - "data_type": "VersionReport", - "array_length": 16, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SoftwareUpdateCommand" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "componentIdentifier", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "commandType", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "offset", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "commandSizeOrProgress", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "commandData", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SExtSubCmdHdr", - "SExtSubCmdHdr" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "command", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "length", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_timestamp", - "timestamp_" - ], - "data_type": "Struct", - "packing": 1, - "is_anonymous": false, - "members": [ - { - "name": "seconds_msb", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "seconds_lsb", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "nanoseconds", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "port_identity" - ], - "data_type": "Struct", - "packing": 1, - "is_anonymous": false, - "members": [ - { - "name": "clock_identity", - "data_type": "_clock_identity", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "port_number", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_clock_quality", - "clock_quality_" - ], - "data_type": "Struct", - "packing": 1, - "is_anonymous": false, - "members": [ - { - "name": "clock_class", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "clock_accuracy", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "offset_scaled_log_variance", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "system_identity" - ], - "data_type": "Struct", - "packing": 1, - "is_anonymous": false, - "members": [ - { - "name": "priority_1", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "clock_quality", - "data_type": "clock_quality_", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "priority_2", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "clock_identity", - "data_type": "_clock_identity", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "priority_vector" - ], - "data_type": "Struct", - "packing": 1, - "is_anonymous": false, - "members": [ - { - "name": "sysid", - "data_type": "system_identity", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "steps_removed", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "portid", - "data_type": "port_identity", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "port_number", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_GPTPStatus", - "GPTPStatus" - ], - "data_type": "Struct", - "packing": 1, - "is_anonymous": false, - "members": [ - { - "name": "current_time", - "data_type": "timestamp_", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "gm_priority", - "data_type": "priority_vector", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ms_offset_ns", - "data_type": "int64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "is_sync", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "link_status", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "link_delay_ns", - "data_type": "int64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "selected_role", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "as_capable", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "is_syntonized", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SExtSubCmdComm", - "SExtSubCmdComm" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "header", - "data_type": "SExtSubCmdHdr", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "extension" - ], - "data_type": "Union", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "structure", - "data_type": "SDiskStructure", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "details", - "data_type": "SDiskDetails", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "progress", - "data_type": "SDiskFormatProgress", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "startDHCPServer", - "data_type": "StartDHCPServerCommand", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "stopDHCPServer", - "data_type": "StopDHCPServerCommand", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "getSupportedFeatures", - "data_type": "GetSupportedFeaturesResponse", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "genericResponse", - "data_type": "ExtendedResponseGeneric", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "gptpStatus", - "data_type": "GPTPStatus", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "getComponentVersions", - "data_type": "GetComponentVersions", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "softwareUpdate", - "data_type": "SoftwareUpdateCommand", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "getComponentVersionsResponse", - "data_type": "GetComponentVersionsResponse", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "names": [ - "SERDESCAM_SETTINGS_t", - "SERDESCAM_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "flags", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mode", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rsvd1", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "bitPos", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "videoFormat", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "resWidth", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "resHeight", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "frameSkip", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rsvd2", - "data_type": "uint8_t", - "array_length": 19, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SERDESPOC_SETTINGS_t", - "SERDESPOC_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mode", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rsvd", - "data_type": "uint8_t", - "array_length": 6, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "voltage", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "chksum", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SERDESGEN_SETTINGS_t", - "SERDESGEN_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "flags", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rsvd1", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mod_id", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tx_speed", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rx_speed", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rsvd2", - "data_type": "uint8_t", - "array_length": 24, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_RadMoonDuoConverterSettings", - "RadMoonDuoConverterSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "linkMode0", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "linkMode1", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "converter1Mode", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ipAddress", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ipMask", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ipGateway", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "RAD_REPORTING_SETTINGS_t", - "RAD_REPORTING_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "flags", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "temp_interval_ms", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "gps_interval_ms", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "serdes_interval_ms", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "io_interval_ms", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fan_speed_interval_ms", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rsvd", - "data_type": "uint8_t", - "array_length": 2, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SFireSettings", - "SFireSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can3", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can4", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lsftcan", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin2", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin3", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin4", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "cgi_enable_reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "cgi_baud", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "cgi_tx_ifs_bit_times", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "cgi_rx_ifs_bit_times", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "cgi_chksum_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwm_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_ddr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_latch", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_report_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_on_report_events", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_sample_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_threshold", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_enable_reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_tester_pullup_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_2", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_3", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_4", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_4", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_4", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fast_init_network_enables_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fast_init_network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "uart", - "data_type": "UART_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "uart2", - "data_type": "UART_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "neoMostGateway", - "data_type": "SNeoMostGatewaySettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vnetBits", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SFireVnetSettings", - "SFireVnetSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can3", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can4", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lsftcan", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin2", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin3", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin4", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "cgi_enable_reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "cgi_baud", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "cgi_tx_ifs_bit_times", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "cgi_rx_ifs_bit_times", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "cgi_chksum_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwm_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_ddr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_latch", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_report_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_on_report_events", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_sample_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_threshold", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_enable_reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_tester_pullup_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_2", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_3", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_4", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_4", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_4", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fast_init_network_enables_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fast_init_network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "uart", - "data_type": "UART_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "uart2", - "data_type": "UART_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "neoMostGateway", - "data_type": "SNeoMostGatewaySettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vnetBits", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can5", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can6", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin5", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan2", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SCyanSettings", - "SCyanSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can3", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd3", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can4", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd4", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can5", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd5", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can6", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd6", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can7", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd7", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can8", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd8", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan1", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan2", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lsftcan1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lsftcan2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_ddr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin2", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_latch", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin3", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_report_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin4", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_on_report_events", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin5", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_sample_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_threshold", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_9141_kwp_enable_reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_1", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_2", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_3", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_4", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_4", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_4", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can_switch_mode", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "termination_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin6", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet", - "data_type": "ETHERNET_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "slaveVnetA", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "slaveVnetB", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "busMessagesToAndroid", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enablePcEthernetComm", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableDefaultLogger", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableDefaultUpload", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 26, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "digitalIoThresholdTicks", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "digitalIoThresholdEnable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "timeSync", - "data_type": "TIMESYNC_ICSHARDWARE_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "disk", - "data_type": "DISK_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet2", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SVCAN3Settings", - "SVCAN3Settings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_ddr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_latch", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_report_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_on_report_events", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SVCAN4Settings", - "SVCAN4Settings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can3", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd3", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can4", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd4", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_9141_kwp_enable_reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_1", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "termination_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet", - "data_type": "ETHERNET_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enablePcEthernetComm", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 30, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet2", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SVCANRFSettings", - "SVCANRFSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can3", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can4", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin2", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_ddr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_latch", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_report_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_on_report_events", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_enable_reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_tester_pullup_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_2", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "disableFwLEDs", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reservedZero", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 15, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SECUSettings", - "SECUSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "ecu_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "selected_network", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin2", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_2", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_ddr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_latch", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_report_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_on_report_events", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_sample_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_threshold", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan2", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lsftcan", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lsftcan2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "uart", - "data_type": "UART_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "uart2", - "data_type": "UART_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SPendantSettings", - "SPendantSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "ecu_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "selected_network", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin2", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_2", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_ddr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_latch", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_report_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_on_report_events", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_sample_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_threshold", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan2", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lsftcan", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lsftcan2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "uart", - "data_type": "UART_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "uart2", - "data_type": "UART_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SIEVBSettings", - "SIEVBSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "ecu_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "selected_network", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_ddr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_latch", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_report_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_on_report_events", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_sample_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_threshold", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin2", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "uart", - "data_type": "UART_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "uart2", - "data_type": "UART_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved_1", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved_2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_tester_pullup_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_2", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SEEVBSettings", - "SEEVBSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "ecu_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_sample_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_threshold", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rsvd", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SRADGalaxySettings", - "SRADGalaxySettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEthGen", - "data_type": "OP_ETH_GENERAL_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth1", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth2", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth3", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth4", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth5", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth6", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth7", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth8", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth9", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth10", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth11", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth12", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can3", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd3", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can4", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd4", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can5", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd5", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can6", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd6", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can7", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd7", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can8", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd8", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan1", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan2", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_ddr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_latch", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_report_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_on_report_events", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_sample_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_threshold", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_9141_kwp_enable_reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_1", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can_switch_mode", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "timeSyncSettings", - "data_type": "TIMESYNC_ICSHARDWARE_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "hwComLatencyTestEn", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reporting", - "data_type": "RAD_REPORTING_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "disk", - "data_type": "DISK_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "logger", - "data_type": "LOGGER_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet1", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet2", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_4", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "gPTP", - "data_type": "RAD_GPTP_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SRADStar2Settings", - "SRADStar2Settings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEthGen", - "data_type": "OP_ETH_GENERAL_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth1", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth2", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_ddr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_latch", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_report_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_on_report_events", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_sample_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_threshold", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_9141_kwp_enable_reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_1", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can_switch_mode", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pc_com_mode", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "timeSyncSettings", - "data_type": "TIMESYNC_ICSHARDWARE_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "hwComLatencyTestEn", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reporting", - "data_type": "RAD_REPORTING_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "gPTP", - "data_type": "RAD_GPTP_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SRADSuperMoonSettings", - "SRADSuperMoonSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEthGen", - "data_type": "OP_ETH_GENERAL_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth1", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pc_com_mode", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "timeSyncSettings", - "data_type": "TIMESYNC_ICSHARDWARE_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "hwComLatencyTestEn", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Eth2", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "gPTP", - "data_type": "RAD_GPTP_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "A2BMonitorSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "tdmMode", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "upstreamChannelOffset", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "downstreamChannelOffset", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "nodeType", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "flags", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint8_t", - "array_length": 15, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SRADA2BSettings", - "SRADA2BSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "hwComLatencyTestEn", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 15, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_1", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "termination_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "timeSyncSettings", - "data_type": "TIMESYNC_ICSHARDWARE_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reporting", - "data_type": "RAD_REPORTING_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "disk", - "data_type": "DISK_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "logger", - "data_type": "LOGGER_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "a2b_monitor", - "data_type": "A2BMonitorSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "a2b_node", - "data_type": "A2BMonitorSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SRADMoon2Settings", - "SRADMoon2Settings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEthGen", - "data_type": "OP_ETH_GENERAL_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth1", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pc_com_mode", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "timeSyncSettings", - "data_type": "TIMESYNC_ICSHARDWARE_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "hwComLatencyTestEn", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "gPTP", - "data_type": "RAD_GPTP_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SRADGigalogSettings", - "SRADGigalogSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "ecu_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can3", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd3", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can4", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd4", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can5", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd5", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can6", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd6", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can7", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd7", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can8", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd8", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_9141_kwp_enable_reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_1", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "termination_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rsvd1", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rsvd2", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "disk", - "data_type": "DISK_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "timeSyncSettings", - "data_type": "TIMESYNC_ICSHARDWARE_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "hwComLatencyTestEn", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 14, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "ethernet", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "serdescam1", - "data_type": "SERDESCAM_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet10g", - "data_type": "ETHERNET10G_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "serdespoc", - "data_type": "SERDESPOC_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "logger", - "data_type": "LOGGER_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "serdescam2", - "data_type": "SERDESCAM_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "serdescam3", - "data_type": "SERDESCAM_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "serdescam4", - "data_type": "SERDESCAM_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet2", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_4", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reporting", - "data_type": "RAD_REPORTING_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "serdesgen", - "data_type": "SERDESGEN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SRADGigastarSettings", - "SRADGigastarSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "ecu_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can3", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd3", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can4", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd4", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can5", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd5", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can6", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd6", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_9141_kwp_enable_reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_1", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "idle_wakeup_network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "termination_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "disk", - "data_type": "DISK_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "timeSyncSettings", - "data_type": "TIMESYNC_ICSHARDWARE_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "hwComLatencyTestEn", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 14, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "ethernet1", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet2", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEthGen", - "data_type": "OP_ETH_GENERAL_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth1", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "opEth2", - "data_type": "OP_ETH_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "serdescam1", - "data_type": "SERDESCAM_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "serdespoc", - "data_type": "SERDESPOC_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "logger", - "data_type": "LOGGER_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "serdescam2", - "data_type": "SERDESCAM_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "serdescam3", - "data_type": "SERDESCAM_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "serdescam4", - "data_type": "SERDESCAM_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reporting", - "data_type": "RAD_REPORTING_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_4", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "serdesgen", - "data_type": "SERDESGEN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "gPTP", - "data_type": "RAD_GPTP_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SVividCANSettings", - "SVividCANSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "ecu_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan1", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lsftcan1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can_switch_mode", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "termination_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 30, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "names": [ - "_SOBD2SimSettings", - "SOBD2SimSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_ddr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_latch", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_report_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_on_report_events", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_sample_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_threshold", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 30, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_CmProbeSettings", - "CmProbeSettings", - "SCmProbeSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_OBD2ProSettings", - "OBD2ProSettings", - "SOBD2ProSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can3", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd3", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can4", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd4", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan1", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin2", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet", - "data_type": "ETHERNET_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_1", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_2", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 30, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "can_switch_mode", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet2", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_VCAN412Settings", - "VCAN412Settings", - "SVCAN412Settings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "termination_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 30, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "names": [ - "_neoECU_AVBSettings", - "ECU_AVBSettings", - "SECU_AVBSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "termination_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 30, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "names": [ - "SPluto_L2AddressLookupEntry_s", - "SPluto_L2AddressLookupEntry" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "index", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vlanID", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "macaddr", - "data_type": "uint8_t", - "array_length": 6, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "destports", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "enfport", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "learnedEntry", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pad1", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pad2", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pad3", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPluto_L2AddressLookupParams_s", - "SPluto_L2AddressLookupParams" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "maxage", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "dyn_tbsz", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "poly", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "shared_learn", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "no_enf_hostprt", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "no_mgmt_learn", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pad", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPluto_L2ForwardingParams_s", - "SPluto_L2ForwardingParams" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "part_spc", - "data_type": "uint16_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "max_dynp", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pad", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPluto_L2ForwardingEntry_s", - "SPluto_L2ForwardingEntry" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "vlan_pmap", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "bc_domain", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reach_port", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fl_domain", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pad", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPluto_L2Policing_s", - "SPluto_L2Policing" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "smax", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rate", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "maxlen", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "sharindx", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "partition", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPluto_VlanLookup_s", - "SPluto_VlanLookup" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "vlanid", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ving_mirr", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vegr_mirr", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vmemb_port", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vlan_bc", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tag_port", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pad", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPluto_MacConfig_s", - "SPluto_MacConfig" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "top", - "data_type": "uint16_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "base", - "data_type": "uint16_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tp_delin", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tp_delout", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vlanid", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "enabled", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ifg", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "speed", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "maxage", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vlanprio", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ing_mirr", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "egr_mirr", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "drpnona664", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "drpdtag", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "drpuntag", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "retag", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "dyn_learn", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "egress", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ingress", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pad", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPluto_RetaggingEntry_s", - "SPluto_RetaggingEntry" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "vlan_egr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vlan_ing", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "egr_port", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ing_port", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "do_not_learn", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "use_dest_ports", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "destports", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pad", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPluto_GeneralParams_s", - "SPluto_GeneralParams" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mac_fltres1", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mac_fltres0", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mac_flt1", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mac_flt0", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vlmarker", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vlmask", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tpid", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tpid2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vllupformat", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mirr_ptacu", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "switchid", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "hostprio", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "incl_srcpt1", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "incl_srcpt0", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "send_meta1", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "send_meta0", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "casc_port", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "host_port", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mirr_port", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ignore2stf", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPluto_VlLookupEntry_s", - "SPluto_VlLookupEntry" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "names": [], - "data_type": "Union", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "names": [ - "vllupformat0" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "macaddr", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vlanid", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "destports", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iscritical", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "port", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vlanprior", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "vllupformat1" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "vlid", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "egrmirr", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ingrmirr", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "port", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - } - ] - } - ] - }, - { - "names": [ - "SPluto_VlPolicingEntry_s", - "SPluto_VlPolicingEntry" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "type", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "maxlen", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "sharindx", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "bag", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "jitter", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPluto_VlForwardingParams_s", - "SPluto_VlForwardingParams" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "partspc", - "data_type": "uint16_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "debugen", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pad", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPluto_VlForwardingEntry_s", - "SPluto_VlForwardingEntry" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "type", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "priority", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "partition", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "destports", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPluto_AVBParams_s", - "SPluto_AVBParams" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "destmeta", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "srcmeta", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPluto_ClockSyncParams_s", - "SPluto_ClockSyncParams" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "etssrcpcf", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "wfintmout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "maxtranspclk", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "listentmout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "intcydur", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "caentmout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pcfsze", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "obvwinsz", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vlidout", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vlidimnmin", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vlidinmax", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "accdevwin", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "srcport", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "waitthsync", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "unsytotsyth", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "unsytosyth", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tsytosyth", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tsyth", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tsytousyth", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "syth", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "sytousyth", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "sypriority", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "sydomain", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "stth", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "sttointth", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pcfpriority", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "numunstbcy", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "numstbcy", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "maxintegcy", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "inttotentth", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "inttosyncth", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vlidselect", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tentsyrelen", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "asytensyen", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "sytostben", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "syrelen", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "sysyen", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "syasyen", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ipcframesy", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "stabasyen", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swmaster", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fullcbg", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pad1", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pad2", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pad3", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPlutoPtpParams_s", - "PlutoPtpParams_t" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "neighborPropDelayThresh", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "sys_phc_sync_interval", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "logPDelayReqInterval", - "data_type": "int8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "logSyncInterval", - "data_type": "int8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "logAnnounceInterval", - "data_type": "int8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "profile", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "priority1", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "clockclass", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "clockaccuracy", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "priority2", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "offset_scaled_log_variance", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "gPTPportRole", - "data_type": "uint8_t", - "array_length": 4, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "portEnable", - "data_type": "uint8_t", - "array_length": 4, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPluto_CustomParams_s", - "SPluto_CustomParams" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mode", - "data_type": "uint8_t", - "array_length": 5, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "speed", - "data_type": "uint8_t", - "array_length": 5, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "enablePhy", - "data_type": "uint8_t", - "array_length": 5, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ae1Select", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "usbSelect", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pad", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ptpParams", - "data_type": "PlutoPtpParams_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPlutoSwitchSettings_s", - "SPlutoSwitchSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "flashHeader", - "data_type": "ExtendedDataFlashHeader_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "l2_addressLookupParams", - "data_type": "SPluto_L2AddressLookupParams", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "l2_addressLookupEntries", - "data_type": "SPluto_L2AddressLookupEntry", - "array_length": 1024, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "l2_policing", - "data_type": "SPluto_L2Policing", - "array_length": 45, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "l2_forwardingParams", - "data_type": "SPluto_L2ForwardingParams", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "l2_ForwardingEntries", - "data_type": "SPluto_L2ForwardingEntry", - "array_length": 13, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vlan_LookupEntries", - "data_type": "SPluto_VlanLookup", - "array_length": 4096, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "macConfig", - "data_type": "SPluto_MacConfig", - "array_length": 5, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "generalParams", - "data_type": "SPluto_GeneralParams", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "retagging", - "data_type": "SPluto_RetaggingEntry", - "array_length": 32, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_RADPlutoSettings", - "SRADPlutoSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "termination_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_enable_reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_tester_pullup_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet", - "data_type": "ETHERNET_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enablePcEthernetComm", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 29, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "custom", - "data_type": "SPluto_CustomParams", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet2", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SCANSleepID" - ], - "data_type": "Union", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "word", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "id" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "can_sleep_command_id", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 29, - "is_enum": false, - "enum_value": null - }, - { - "name": "can_sleep_command_isExtended", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 2, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "names": [ - "CANHubSettings", - "SCANHubSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "termination_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ecu_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "sleep_id", - "data_type": "SCANSleepID", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SFlexVnetzSettings", - "SFlexVnetzSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_on_report_events", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "flex_mode", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "flex_termination", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "slaveVnetA", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "termination_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "network_enables" - ], - "data_type": "Union", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "word", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Struct", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "slaveVnetB", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can3", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd3", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can4", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd4", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can5", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd5", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can6", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd6", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can7", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd7", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet", - "data_type": "ETHERNET_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "timeSync", - "data_type": "TIMESYNC_ICSHARDWARE_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "busMessagesToAndroid", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enablePcEthernetComm", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableDefaultLogger", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableDefaultUpload", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 26, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "disk", - "data_type": "DISK_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet2", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_NeoECU12Settings", - "SNeoECU12Settings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "ecu_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan1", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan2", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lsftcan1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lsftcan2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "termination_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can_switch_mode", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_9141_kwp_enable_reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_ddr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_latch", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_report_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_on_report_events", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_sample_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_threshold", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 30, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "reserved_field", - "data_type": "uint32_t", - "array_length": 2, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_VCAN4IndSettings", - "VCAN4IndSettings", - "SVCAN4IndSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet", - "data_type": "ETHERNET_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "network_enables" - ], - "data_type": "Union", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "word", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Struct", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "name": "termination_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "busMessagesToAndroid", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enablePcEthernetComm", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 28, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "ethernet2", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SOBD2LCSettings", - "OBD2LCSettings", - "SOBD2LCSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can3", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd3", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can4", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd4", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan1", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_1", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "network_enables" - ], - "data_type": "Union", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "word", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Struct", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "busMessagesToAndroid", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enablePcEthernetComm", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableDefaultLogger", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableDefaultUpload", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 26, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "can_switch_mode", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_on_report_events", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "disk", - "data_type": "DISK_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet", - "data_type": "ETHERNET_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet2", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SJupiterPtpParams_s", - "JupiterPtpParams_t" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "neighborPropDelay", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "initLogPDelayReqInterval", - "data_type": "int8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "initLogSyncInterval", - "data_type": "int8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "operationLogPDelayReqInterval", - "data_type": "int8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "operationLogSyncInterval", - "data_type": "int8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "gPTPportRole", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SRADJupiterSwitchSettings", - "SRADJupiterSwitchSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "phyMode", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "enablePhy", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "port7Select", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "port8Select", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "port8Speed", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "port8Legacy", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "spoofMacFlag", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "spoofedMac", - "data_type": "uint8_t", - "array_length": 6, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pad", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ptpParams", - "data_type": "JupiterPtpParams_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SRADJupiterSettings", - "SRADJupiterSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "termination_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_enable_reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_tester_pullup_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet", - "data_type": "ETHERNET_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enablePcEthernetComm", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 29, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "switchSettings", - "data_type": "SRADJupiterSwitchSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet2", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "Fire3LinuxSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "allowBoot", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "useExternalWifiAntenna", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint8_t", - "array_length": 6, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SFire3Settings", - "SFire3Settings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_on_report_events", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "slaveVnetA", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "termination_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "network_enables" - ], - "data_type": "Union", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "word", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Struct", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_4", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can3", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd3", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can4", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd4", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can5", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd5", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can6", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd6", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can7", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd7", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can8", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd8", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin2", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_1", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_1", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_2", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet_1", - "data_type": "ETHERNET_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "timeSync", - "data_type": "TIMESYNC_ICSHARDWARE_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "busMessagesToAndroid", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enablePcEthernetComm", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableDefaultLogger", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableDefaultUpload", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 26, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "disk", - "data_type": "DISK_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_report_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_threshold", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "digitalIoThresholdTicks", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "digitalIoThresholdEnable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_ddr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_latch", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet2_1", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet_2", - "data_type": "ETHERNET_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet2_2", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "os_settings", - "data_type": "Fire3LinuxSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "RadMoonDuoSettings", - "SRadMoonDuoSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "converter", - "data_type": "RadMoonDuoConverterSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 30, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "names": [ - "_SEtherBadgeSettings", - "SEtherBadgeSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "termination_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_enable_reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_tester_pullup_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet", - "data_type": "ETHERNET_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_ddr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_latch", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_report_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_on_report_events", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_sample_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_threshold", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enablePcEthernetComm", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 29, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "ethernet2", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SRADEpsilonSwitchSettings", - "SRADEpsilonSwitchSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "phyMode", - "data_type": "uint8_t", - "array_length": 18, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "enablePhy", - "data_type": "uint8_t", - "array_length": 18, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "speed", - "data_type": "uint8_t", - "array_length": 18, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "legacy", - "data_type": "uint8_t", - "array_length": 18, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "spoofedMac", - "data_type": "uint8_t", - "array_length": 6, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "spoofMacFlag", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pad", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SRADEpsilonSettings", - "SRADEpsilonSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "termination_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_enable_reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_tester_pullup_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet", - "data_type": "ETHERNET_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "text_api", - "data_type": "STextAPISettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enablePcEthernetComm", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 29, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "switchSettings", - "data_type": "SRADEpsilonSwitchSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet2", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SWILBridgeConfig" - ], - "data_type": "Union", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "dword", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "config" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "can_id", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 29, - "is_enum": false, - "enum_value": null - }, - { - "name": "can_id_isExtended", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "tcp_port", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 18, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "names": [ - "_SRADBMSSettings", - "SRADBMSSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "perf_en", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "termination_enables", - "data_type": "uint64_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd1", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canfd2", - "data_type": "CANFD_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_3", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "flags" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "disableUsbCheckOnBoot", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableLatencyTest", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enablePcEthernetComm", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 29, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "ethernet", - "data_type": "ETHERNET_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernet2", - "data_type": "ETHERNET_SETTINGS2", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "wil_config", - "data_type": "SWILBridgeConfig", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_GLOBAL_SETTINGS", - "GLOBAL_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "version", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "len", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "chksum", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Union", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "red", - "data_type": "SRedSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fire", - "data_type": "SFireSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "firevnet", - "data_type": "SFireVnetSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "cyan", - "data_type": "SCyanSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcan3", - "data_type": "SVCAN3Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcan4", - "data_type": "SVCAN4Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ecu", - "data_type": "SECUSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ievb", - "data_type": "SIEVBSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pendant", - "data_type": "SPendantSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radgalaxy", - "data_type": "SRADGalaxySettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radstar2", - "data_type": "SRADStar2Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "neoobd2_sim", - "data_type": "SOBD2SimSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "cmprobe", - "data_type": "SCmProbeSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "obd2pro", - "data_type": "SOBD2ProSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcan412", - "data_type": "SVCAN412Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcan4_12", - "data_type": "SVCAN412Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "neoecu_avb", - "data_type": "SECU_AVBSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radsupermoon", - "data_type": "SRADSuperMoonSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radmoon2", - "data_type": "SRADMoon2Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pluto", - "data_type": "SRADPlutoSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radgigalog", - "data_type": "SRADGigalogSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canhub", - "data_type": "SCANHubSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "neoecu12", - "data_type": "SNeoECU12Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcanrf", - "data_type": "SVCANRFSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "eevb", - "data_type": "SEEVBSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "flexvnetz", - "data_type": "SFlexVnetzSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vividcan", - "data_type": "SVividCANSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcan4_ind", - "data_type": "SVCAN4IndSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radgigastar", - "data_type": "SRADGigastarSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "jupiter", - "data_type": "SRADJupiterSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fire3", - "data_type": "SFire3Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radmoonduo", - "data_type": "SRadMoonDuoSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "etherBadge", - "data_type": "SEtherBadgeSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rad_a2b", - "data_type": "SRADA2BSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "epsilon", - "data_type": "SRADEpsilonSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "obd2lc", - "data_type": "SOBD2LCSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rad_bms", - "data_type": "SRADBMSSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "names": [ - "_SDeviceSettings", - "SDeviceSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "DeviceSettingType", - "data_type": "EDeviceSettingsType", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [ - "Settings" - ], - "data_type": "Union", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "red", - "data_type": "SRedSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fire", - "data_type": "SFireSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "firevnet", - "data_type": "SFireVnetSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "cyan", - "data_type": "SCyanSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcan3", - "data_type": "SVCAN3Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcan4", - "data_type": "SVCAN4Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ecu", - "data_type": "SECUSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ievb", - "data_type": "SIEVBSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pendant", - "data_type": "SPendantSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radgalaxy", - "data_type": "SRADGalaxySettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radstar2", - "data_type": "SRADStar2Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "neoobd2_sim", - "data_type": "SOBD2SimSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "cmprobe", - "data_type": "SCmProbeSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "obd2pro", - "data_type": "SOBD2ProSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcan412", - "data_type": "SVCAN412Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcan4_12", - "data_type": "SVCAN412Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "neoecu_avb", - "data_type": "SECU_AVBSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radsupermoon", - "data_type": "SRADSuperMoonSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radmoon2", - "data_type": "SRADMoon2Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pluto", - "data_type": "SRADPlutoSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "plutoswitch", - "data_type": "SPlutoSwitchSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radgigalog", - "data_type": "SRADGigalogSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "canhub", - "data_type": "SCANHubSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "neoecu12", - "data_type": "SNeoECU12Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcanrf", - "data_type": "SVCANRFSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "eevb", - "data_type": "SEEVBSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "flexvnetz", - "data_type": "SFlexVnetzSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vividcan", - "data_type": "SVividCANSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcan4_ind", - "data_type": "SVCAN4IndSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "obd2lc", - "data_type": "SOBD2LCSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radgigastar", - "data_type": "SRADGigastarSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "jupiter", - "data_type": "SRADJupiterSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fire3", - "data_type": "SFire3Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radmoon_duo", - "data_type": "SRadMoonDuoSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "etherBadge", - "data_type": "SEtherBadgeSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rad_a2b", - "data_type": "SRADA2BSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "epsilon", - "data_type": "SRADEpsilonSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rad_bms", - "data_type": "SRADBMSSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "names": [ - "_stCM_ISO157652_TxMessage", - "stCM_ISO157652_TxMessage" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "vs_netid", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "padding", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tx_index", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fc_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fc_id_mask", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "stMin", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "blockSize", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "flowControlExtendedAddress", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "extendedAddress", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fs_timeout", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fs_wait", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "data", - "data_type": "uint8_t", - "array_length": 4096, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "num_bytes", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Union", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "names": [], - "data_type": "Struct", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "id_29_bit_enable", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "fc_id_29_bit_enable", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "ext_address_enable", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "fc_ext_address_enable", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "overrideSTmin", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "overrideBlockSize", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "paddingEnable", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "iscanFD", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "isBRSEnabled", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 15, - "is_enum": false, - "enum_value": null - }, - { - "name": "tx_dl", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 8, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "flags", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "names": [ - "ISO15765_2015_TxMessage" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "vs_netid", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "padding", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tx_index", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fc_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fc_id_mask", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "stMin", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "blockSize", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "flowControlExtendedAddress", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "extendedAddress", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fs_timeout", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fs_wait", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "data", - "data_type": "uint8_t*", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "num_bytes", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "tx_dl", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Union", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "names": [], - "data_type": "Struct", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "id_29_bit_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "fc_id_29_bit_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "ext_address_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "fc_ext_address_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "overrideSTmin", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "overrideBlockSize", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "paddingEnable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "iscanFD", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "isBRSEnabled", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 7, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "flags", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "names": [ - "_stCM_ISO157652_RxMessage", - "stCM_ISO157652_RxMessage" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "vs_netid", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "padding", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "id_mask", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fc_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "flowControlExtendedAddress", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "extendedAddress", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "blockSize", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "stMin", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "cf_timeout", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Union", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "names": [], - "data_type": "Struct", - "packing": 2, - "is_anonymous": true, - "members": [ - { - "name": "id_29_bit_enable", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "fc_id_29_bit_enable", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "ext_address_enable", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "fc_ext_address_enable", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "enableFlowControlTransmission", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "paddingEnable", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "iscanFD", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "isBRSEnabled", - "data_type": "unsigned", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "flags", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "reserved", - "data_type": "uint8_t", - "array_length": 16, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "spyFilterLong" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "StatusValue", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "StatusMask", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Status2Value", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Status2Mask", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Header", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "HeaderMask", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "MiscData", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "MiscDataMask", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ByteDataMSB", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ByteDataLSB", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ByteDataMaskMSB", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ByteDataMaskLSB", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "HeaderLength", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ByteDataLength", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NetworkID", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "FrameMaster", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "bUseArbIdRangeFilter", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "bStuff2", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ExpectedLength", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NodeID", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_icsSpyMessage", - "icsSpyMessage" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "StatusBitField", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "StatusBitField2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeHardware", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeHardware2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeSystem", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeSystem2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeStampHardwareID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeStampSystemID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NetworkID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NodeID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Protocol", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "MessagePieceID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ExtraDataPtrEnabled", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NumberBytesHeader", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NumberBytesData", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NetworkID2", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DescriptionID", - "data_type": "descIdType", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ArbIDOrHeader", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Data", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Union", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "names": [], - "data_type": "Struct", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "StatusBitField3", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "StatusBitField4", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "AckBytes", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "ExtraDataPtr", - "data_type": "void*", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "MiscData", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Reserved", - "data_type": "uint8_t", - "array_length": 3, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_icsSpyMessageFlexRay", - "icsSpyMessageFlexRay" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "StatusBitField", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "StatusBitField2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeHardware", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeHardware2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeSystem", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeSystem2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeStampHardwareID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeStampSystemID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NetworkID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NodeID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Protocol", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "MessagePieceID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ExtraDataPtrEnabled", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NumberBytesHeader", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NumberBytesData", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NetworkID2", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DescriptionID", - "data_type": "descIdType", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Union", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "ArbIDOrHeader", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Struct", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 12, - "is_enum": false, - "enum_value": null - }, - { - "name": "res1", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 4, - "is_enum": false, - "enum_value": null - }, - { - "name": "cycle", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 6, - "is_enum": false, - "enum_value": null - }, - { - "name": "chA", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "chB", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "startup", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "sync", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "null_frame", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "payload_preamble", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "frame_reserved", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "dynamic", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "name": "Data", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Union", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "names": [], - "data_type": "Struct", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "StatusBitField3", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "StatusBitField4", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "AckBytes", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Struct", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "hcrc_msbs", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 3, - "is_enum": false, - "enum_value": null - }, - { - "name": "res2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 5, - "is_enum": false, - "enum_value": null - }, - { - "name": "hcrc_lsbs", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 8, - "is_enum": false, - "enum_value": null - }, - { - "name": "frame_len_12_5ns", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 16, - "is_enum": false, - "enum_value": null - }, - { - "name": "fcrc0", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 8, - "is_enum": false, - "enum_value": null - }, - { - "name": "fcrc1", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 8, - "is_enum": false, - "enum_value": null - }, - { - "name": "fcrc2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 8, - "is_enum": false, - "enum_value": null - }, - { - "name": "tss_len_12_5ns", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 8, - "is_enum": false, - "enum_value": null - } - ] - } - ] - }, - { - "name": "ExtraDataPtr", - "data_type": "void*", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "MiscData", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Reserved", - "data_type": "uint8_t", - "array_length": 3, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_icsSpyMessageLong", - "icsSpyMessageLong" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "StatusBitField", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "StatusBitField2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeHardware", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeHardware2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeSystem", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeSystem2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeStampHardwareID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeStampSystemID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NetworkID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NodeID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Protocol", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "MessagePieceID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ExtraDataPtrEnabled", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NumberBytesHeader", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NumberBytesData", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NetworkID2", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DescriptionID", - "data_type": "descIdType", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ArbIDOrHeader", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DataMsb", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DataLsb", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Union", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "names": [], - "data_type": "Struct", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "StatusBitField3", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "StatusBitField4", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "AckBytes", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "ExtraDataPtr", - "data_type": "void*", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "MiscData", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Reserved", - "data_type": "uint8_t", - "array_length": 3, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_icsSpyMessageJ1850", - "icsSpyMessageJ1850" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "StatusBitField", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "StatusBitField2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeHardware", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeHardware2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeSystem", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeSystem2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeStampHardwareID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeStampSystemID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NetworkID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NodeID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Protocol", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "MessagePieceID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ExtraDataPtrEnabled", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NumberBytesHeader", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NumberBytesData", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NetworkID2", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DescriptionID", - "data_type": "descIdType", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Header", - "data_type": "uint8_t", - "array_length": 4, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Data", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Union", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "names": [], - "data_type": "Struct", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "StatusBitField3", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "StatusBitField4", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "AckBytes", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "ExtraDataPtr", - "data_type": "void*", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "MiscData", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Reserved", - "data_type": "uint8_t", - "array_length": 3, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_icsSpyMessageVSB", - "icsSpyMessageVSB" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "StatusBitField", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "StatusBitField2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeHardware", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeHardware2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeSystem", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeSystem2", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeStampHardwareID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "TimeStampSystemID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NetworkID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NodeID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Protocol", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "MessagePieceID", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ExtraDataPtrEnabled", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NumberBytesHeader", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NumberBytesData", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "NetworkID2", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "DescriptionID", - "data_type": "int16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ArbIDOrHeader", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Data", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "names": [], - "data_type": "Union", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "names": [], - "data_type": "Struct", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "StatusBitField3", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "StatusBitField4", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "AckBytes", - "data_type": "uint8_t", - "array_length": 8, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "ExtraDataPtr", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "MiscData", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Reserved", - "data_type": "uint8_t", - "array_length": 3, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_ethernetNetworkStatus_t", - "ethernetNetworkStatus_t" - ], - "data_type": "Struct", - "packing": 1, - "is_anonymous": false, - "members": [ - { - "name": "networkId", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "linkStatus", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "linkFullDuplex", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "linkSpeed", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "linkMode", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "icsFire2DeviceStatus" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "backupPowerGood", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "backupPowerEnabled", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "usbHostPowerEnabled", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernetActivationLineEnabled", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernetStatus", - "data_type": "ethernetNetworkStatus_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "icsFire2VnetDeviceStatus" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "ethernetActivationLineEnabled", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernetStatus", - "data_type": "ethernetNetworkStatus_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "unused", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "icsVcan4DeviceStatus" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "ethernetActivationLineEnabled", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernetStatus", - "data_type": "ethernetNetworkStatus_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "unused", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "icsFlexVnetzDeviceStatus" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "ethernetActivationLineEnabled", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernetStatus", - "data_type": "ethernetNetworkStatus_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "unused", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "icsFire3DeviceStatus" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "ethernetActivationLineEnabled", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ethernetStatus", - "data_type": "ethernetNetworkStatus_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "unused", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "icsRadMoonDuoDeviceStatus" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "ethernetStatus", - "data_type": "ethernetNetworkStatus_t", - "array_length": 4, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "icsRadJupiterDeviceStatus" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "ethernetStatus", - "data_type": "ethernetNetworkStatus_t", - "array_length": 7, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "icsOBD2ProDeviceStatus" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "ethernetStatus", - "data_type": "ethernetNetworkStatus_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "icsRadPlutoDeviceStatus" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "ethernetStatus", - "data_type": "ethernetNetworkStatus_t", - "array_length": 4, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "icsVcan4IndustrialDeviceStatus" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "ethernetStatus", - "data_type": "ethernetNetworkStatus_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "icsRadEpsilonDeviceStatus" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "ethernetStatus", - "data_type": "ethernetNetworkStatus_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "icsRadBMSDeviceStatus" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "ethernetStatus", - "data_type": "ethernetNetworkStatus_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "icsDeviceStatus" - ], - "data_type": "Union", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "fire2Status", - "data_type": "icsFire2DeviceStatus", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcan4Status", - "data_type": "icsVcan4DeviceStatus", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "flexVnetzStatus", - "data_type": "icsFlexVnetzDeviceStatus", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fire3Status", - "data_type": "icsFire3DeviceStatus", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radMoonDuoStatus", - "data_type": "icsRadMoonDuoDeviceStatus", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "jupiterStatus", - "data_type": "icsRadJupiterDeviceStatus", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "obd2proStatus", - "data_type": "icsOBD2ProDeviceStatus", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "plutoStatus", - "data_type": "icsRadPlutoDeviceStatus", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcan4indStatus", - "data_type": "icsVcan4IndustrialDeviceStatus", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radBMSStatus", - "data_type": "icsRadBMSDeviceStatus", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "NDIS_ADAPTER_INFORMATION" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "szName", - "data_type": "char", - "array_length": 128, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "szDeviceName", - "data_type": "char", - "array_length": 64, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "Status", - "data_type": "unsigned long", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "bMAC_Address", - "data_type": "unsigned char", - "array_length": 6, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "bIPV6_Address", - "data_type": "unsigned char", - "array_length": 16, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "bIPV4_Address", - "data_type": "unsigned char", - "array_length": 4, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "EthernetPinConfig", - "data_type": "unsigned long", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPhyRegPktHdr", - "PhyRegPktHdr_t" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "numEntries", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "version", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "entryBytes", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPhyRegPktClause22Mess", - "PhyRegPktClause22Mess_t" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "phyAddr", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "page", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "regAddr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "regVal", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPhyRegPktClause45Mess", - "PhyRegPktClause45Mess_t" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "name": "port", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "device", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "regAddr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "regVal", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "SPhyRegPkt", - "PhyRegPkt_t" - ], - "data_type": "Struct", - "packing": 0, - "is_anonymous": false, - "members": [ - { - "names": [], - "data_type": "Union", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "names": [], - "data_type": "Struct", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "Enabled", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "WriteEnable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "Clause45Enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "status", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 2, - "is_enum": false, - "enum_value": null - }, - { - "name": "reserved", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 3, - "is_enum": false, - "enum_value": null - }, - { - "name": "BusIndex", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 4, - "is_enum": false, - "enum_value": null - }, - { - "name": "version", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 4, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "name": "flags", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [], - "data_type": "Union", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "clause22", - "data_type": "PhyRegPktClause22Mess_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "clause45", - "data_type": "PhyRegPktClause45Mess_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - } - ] - } -] \ No newline at end of file diff --git a/icsnVC40_processed.h b/icsnVC40_processed.h deleted file mode 100644 index 775f1d568..000000000 --- a/icsnVC40_processed.h +++ /dev/null @@ -1,4192 +0,0 @@ -#pragma pack(push, 8) -#pragma warning(push) -#pragma warning(disable : 4514 4820) -typedef unsigned __int64 uintptr_t; -typedef char* va_list; -void __cdecl __va_start(va_list*, ...); -#pragma warning(pop) -#pragma pack(pop) - -#pragma warning(push) -#pragma warning(disable : 4514 4820) -#pragma pack(push, 8) -typedef unsigned __int64 size_t; -typedef __int64 ptrdiff_t; -typedef __int64 intptr_t; -typedef _Bool __vcrt_bool; -typedef unsigned short wchar_t; -void __cdecl __security_init_cookie(void); -void __cdecl __security_check_cookie(uintptr_t _StackCookie); -__declspec(noreturn) void __cdecl __report_gsfailure(uintptr_t _StackCookie); - -extern uintptr_t __security_cookie; - -#pragma pack(pop) - -#pragma warning(pop) - -#pragma warning(push) -#pragma warning(disable : 4514 4820) - -typedef signed char int8_t; -typedef short int16_t; -typedef int int32_t; -typedef long long int64_t; -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -typedef unsigned long long uint64_t; - -typedef signed char int_least8_t; -typedef short int_least16_t; -typedef int int_least32_t; -typedef long long int_least64_t; -typedef unsigned char uint_least8_t; -typedef unsigned short uint_least16_t; -typedef unsigned int uint_least32_t; -typedef unsigned long long uint_least64_t; - -typedef signed char int_fast8_t; -typedef int int_fast16_t; -typedef int int_fast32_t; -typedef long long int_fast64_t; -typedef unsigned char uint_fast8_t; -typedef unsigned int uint_fast16_t; -typedef unsigned int uint_fast32_t; -typedef unsigned long long uint_fast64_t; - -typedef long long intmax_t; -typedef unsigned long long uintmax_t; -#pragma warning(pop) -typedef struct SExtendedDataFlashHeader -{ - uint16_t version; - uint16_t chksum; - uint32_t len; -} ExtendedDataFlashHeader_t; - -typedef struct -{ - uint32_t DeviceType; - int32_t Handle; - int32_t NumberOfClients; - int32_t SerialNumber; - int32_t MaxAllowedClients; - -} NeoDevice; - -typedef struct _NeoDeviceEx -{ - NeoDevice neoDevice; - - uint32_t FirmwareMajor; - uint32_t FirmwareMinor; - - uint32_t Status; - - uint32_t Options; - - void* pAvailWIFINetwork; - void* pWIFIInterfaceInfo; - - int isEthernetDevice; - - uint8_t MACAddress[6]; - uint16_t hardwareRev; - uint16_t revReserved; - uint32_t Reserved[6]; - -} NeoDeviceEx; - -typedef union tagOptionsOpenNeoEx -{ - struct - { - int32_t iNetworkID; - } CANOptions; - - uint32_t Reserved[16]; -} OptionsOpenNeoEx, *POptionsOpenNeoEx; - -typedef union tagOptionsFindNeoEx -{ - struct - { - int32_t iNetworkID; - } CANOptions; - uint32_t Reserved[16]; - -} OptionsFindNeoEx, *POptionsFindNeoEx; - -typedef struct tagicsneoVICommand -{ - uint8_t CommandType; - uint8_t CommandByteLength; - uint8_t Data[14]; -} icsneoVICommand; - -#pragma pack(push, 1) - -typedef struct _stAPIFirmwareInfo -{ - int32_t iType; - - int32_t iMainFirmDateDay; - int32_t iMainFirmDateMonth; - int32_t iMainFirmDateYear; - int32_t iMainFirmDateHour; - int32_t iMainFirmDateMin; - int32_t iMainFirmDateSecond; - int32_t iMainFirmChkSum; - - uint8_t iAppMajor; - uint8_t iAppMinor; - - uint8_t iManufactureDay; - uint8_t iManufactureMonth; - uint16_t iManufactureYear; - - uint8_t iBoardRevMajor; - uint8_t iBoardRevMinor; - - uint8_t iBootLoaderVersionMajor; - uint8_t iBootLoaderVersionMinor; - uint8_t iMainVnetHWrevMajor; - uint8_t iMainVnetHWrevMinor; - uint8_t iMainVnetSRAMSize; - - uint8_t iPhySiliconRev; -} stAPIFirmwareInfo; - -#pragma pack(pop) - -#pragma pack(push, 2) - -enum -{ - AUTO, - USE_TQ -}; - -enum -{ - BPS20, - BPS33, - BPS50, - BPS62, - BPS83, - BPS100, - BPS125, - BPS250, - BPS500, - BPS800, - BPS1000, - BPS666, - BPS2000, - BPS4000, - CAN_BPS5000, - CAN_BPS6667, - CAN_BPS8000, - CAN_BPS10000, -}; - -enum -{ - NORMAL = 0, - DISABLE = 1, - LOOPBACK = 2, - LISTEN_ONLY = 3, - LISTEN_ALL = 7 -}; - -typedef struct -{ - uint8_t Mode; - uint8_t SetBaudrate; - uint8_t Baudrate; - uint8_t transceiver_mode; - uint8_t TqSeg1; - uint8_t TqSeg2; - uint8_t TqProp; - uint8_t TqSync; - uint16_t BRP; - uint8_t auto_baud; - uint8_t innerFrameDelay25us; -} CAN_SETTINGS; - -enum -{ - NO_CANFD, - CANFD_ENABLED, - CANFD_BRS_ENABLED, - CANFD_ENABLED_ISO, - CANFD_BRS_ENABLED_ISO -}; - -typedef struct _CANFD_SETTINGS -{ - uint8_t FDMode; - uint8_t FDBaudrate; - uint8_t FDTqSeg1; - uint8_t FDTqSeg2; - uint8_t FDTqProp; - uint8_t FDTqSync; - uint16_t FDBRP; - uint8_t FDTDC; - uint8_t reserved; -} CANFD_SETTINGS; - -enum -{ - SWCAN_AUTOSWITCH_DISABLED, - SWCAN_AUTOSWITCH_NO_RESISTOR, - SWCAN_AUTOSWITCH_WITH_RESISTOR, - SWCAN_AUTOSWITCH_DISABLED_RESISTOR_ENABLED -}; - -typedef struct -{ - uint8_t Mode; - uint8_t SetBaudrate; - uint8_t Baudrate; - uint8_t transceiver_mode; - uint8_t TqSeg1; - uint8_t TqSeg2; - uint8_t TqProp; - uint8_t TqSync; - uint16_t BRP; - uint16_t high_speed_auto_switch; - uint8_t auto_baud; - uint8_t RESERVED; -} SWCAN_SETTINGS; - -enum -{ - BPS5000, - BPS10400, - BPS33333, - BPS50000, - BPS62500, - BPS71429, - BPS83333, - BPS100000, - BPS117647 -}; - -enum -{ - RESISTOR_ON, - RESISTOR_OFF -}; - -enum -{ - SLEEP_MODE, - SLOW_MODE, - NORMAL_MODE, - FAST_MODE -}; - -typedef struct _LIN_SETTINGS -{ - uint32_t Baudrate; - uint16_t spbrg; - uint8_t brgh; - uint8_t numBitsDelay; - uint8_t MasterResistor; - uint8_t Mode; -} LIN_SETTINGS; - -typedef struct -{ - uint16_t time_500us; - uint16_t k; - uint16_t l; -} ISO9141_KEYWORD2000__INIT_STEP; - -typedef struct -{ - uint32_t Baudrate; - uint16_t spbrg; - uint16_t brgh; - ISO9141_KEYWORD2000__INIT_STEP init_steps[16]; - uint8_t init_step_count; - uint16_t p2_500us; - uint16_t p3_500us; - uint16_t p4_500us; - uint16_t chksum_enabled; -} ISO9141_KEYWORD2000_SETTINGS; - -typedef struct _UART_SETTINGS -{ - uint16_t Baudrate; - uint16_t spbrg; - uint16_t brgh; - uint16_t parity; - uint16_t stop_bits; - uint8_t flow_control; - uint8_t reserved_1; - union - { - uint32_t bOptions; - struct - { - unsigned invert_tx : 1; - unsigned invert_rx : 1; - unsigned half_duplex : 1; - unsigned reserved_bits : 13; - unsigned reserved_bits2 : 16; - }; - }; -} UART_SETTINGS; - -typedef struct -{ - uint16_t enable_convert_mode; -} J1708_SETTINGS; - -typedef struct _SRedSettings -{ - CAN_SETTINGS can1; - CAN_SETTINGS can2; - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; -} SRedSettings; - -typedef struct _STextAPISettings -{ - uint32_t can1_tx_id; - uint32_t can1_rx_id; - union - { - struct - { - unsigned bExtended : 1; - unsigned : 31; - }; - uint32_t DWord; - } can1_options; - uint32_t can2_tx_id; - uint32_t can2_rx_id; - union - { - struct - { - unsigned bExtended : 1; - unsigned : 31; - }; - uint32_t DWord; - } can2_options; - - uint32_t network_enables; - - uint32_t can3_tx_id; - uint32_t can3_rx_id; - union - { - struct - { - unsigned bExtended : 1; - unsigned : 31; - }; - uint32_t DWord; - } can3_options; - - uint32_t can4_tx_id; - uint32_t can4_rx_id; - union - { - struct - { - unsigned bExtended : 1; - unsigned : 31; - }; - uint32_t DWord; - } can4_options; - - uint32_t reserved[5]; - -} STextAPISettings; - -typedef union _stChipVersions -{ - struct - { - uint8_t mpic_maj; - uint8_t mpic_min; - uint8_t upic_maj; - uint8_t upic_min; - uint8_t lpic_maj; - uint8_t lpic_min; - uint8_t jpic_maj; - uint8_t jpic_min; - } fire_versions; - - struct - { - uint8_t mpic_maj; - uint8_t mpic_min; - uint8_t core_maj; - uint8_t core_min; - uint8_t lpic_maj; - uint8_t lpic_min; - uint8_t hid_maj; - uint8_t hid_min; - } plasma_fire_vnet; - - struct - { - uint8_t mpic_maj; - uint8_t mpic_min; - } vcan3_versions; - - struct - { - uint8_t mpic_maj; - uint8_t mpic_min; - } vcanrf_versions; - - struct - { - uint8_t zynq_core_major; - uint8_t zynq_core_minor; - } radgalaxy_versions; - - struct - { - uint8_t zynq_core_major; - uint8_t zynq_core_minor; - } radstar2_versions; - - struct - { - uint8_t mpic_maj; - uint8_t mpic_min; - uint8_t ext_flash_maj; - uint8_t ext_flash_min; - uint8_t nrf52_maj; - uint8_t nrf52_min; - } vividcan_versions; - - struct - { - uint8_t zynq_core_major; - uint8_t zynq_core_minor; - } cmprobe_versions; - - struct - { - uint8_t mchip_major; - uint8_t mchip_minor; - uint8_t schip_major; - uint8_t schip_minor; - uint8_t core_major; - uint8_t core_minor; - } obd2pro_versions; - - struct - { - uint8_t mchip_major; - uint8_t mchip_minor; - } vcan41_versions; - - struct - { - uint8_t mchip_major; - uint8_t mchip_minor; - } vcan42_versions; - struct - { - uint8_t mchip_major; - uint8_t mchip_minor; - } neoecu_avb_versions; - struct - { - uint8_t zynq_core_major; - uint8_t zynq_core_minor; - } radsupermoon_versions; - struct - { - uint8_t zynq_core_major; - uint8_t zynq_core_minor; - } radmoon2_versions; - struct - { - uint8_t zynq_core_major; - uint8_t zynq_core_minor; - } radmoon2_z7010_versions; - struct - { - uint8_t mchip_major; - uint8_t mchip_minor; - } pluto_versions; - struct - { - uint8_t zynq_core_major; - uint8_t zynq_core_minor; - } radgigalog_versions; - - struct - { - uint8_t zynq_core_major; - uint8_t zynq_core_minor; - } radgigalog3_versions; - - struct - { - uint8_t zynq_core_major; - uint8_t zynq_core_minor; - } radgigastar_versions; - - struct - { - uint8_t zynq_core_major; - uint8_t zynq_core_minor; - } radgigastar_usbz_versions; - - struct - { - uint8_t mchip_major; - uint8_t mchip_minor; - uint8_t schip_major; - uint8_t schip_minor; - } obd2lc_versions; - struct - { - uint8_t mchip_major; - uint8_t mchip_minor; - } jupiter_versions; - - struct - { - uint8_t zchip_major; - uint8_t zchip_minor; - uint8_t schip_major; - uint8_t schip_minor; - } fire3_versions; - - struct - { - uint8_t mchip_major; - uint8_t mchip_minor; - } rad_moon_duo_versions; - - struct - { - uint8_t mchip_major; - uint8_t mchip_minor; - uint8_t schip_major; - uint8_t schip_minor; - } obd2dev_versions; - - struct - { - uint8_t mchip_major; - uint8_t mchip_minor; - } ether_badge_versions; - - struct - { - uint8_t zynq_core_major; - uint8_t zynq_core_minor; - } rad_a2b_versions; - - struct - { - uint8_t mchip_major; - uint8_t mchip_minor; - } epsilon_versions; - -} stChipVersions; - -typedef struct _SNeoMostGatewaySettings -{ - uint16_t netId; - uint8_t zero0; - uint8_t Config; -} SNeoMostGatewaySettings; - -enum -{ - OPETH_FUNC_TAP = 0, - OPETH_FUNC_MEDIACONVERTER, - OPETH_FUNC_TAP_LOW_LATENCY, - OPETH_FUNC_RAW_MEDIA_CONVERTER, - OPETH_FUNC_RAW_MEDIA_CONVERTER2, - OPETH_FUNC_RAW_MEDIA_CONVERTER2_LOW_LATENCY, -}; - -typedef struct OP_ETH_GENERAL_SETTINGS_t -{ - uint8_t ucInterfaceType; - uint8_t reserved0[3]; - uint16_t tapPair0; - uint16_t tapPair1; - uint16_t tapPair2; - uint16_t tapPair3; - uint16_t tapPair4; - uint16_t tapPair5; - union - { - struct - { - uint32_t bTapEnSwitch : 1; - uint32_t bTapEnPtp : 1; - uint32_t bEnReportLinkQuality : 1; - uint32_t bEnTapTxReceipts : 1; - uint32_t reserved : 28; - } flags; - uint32_t uFlags; - }; -} OP_ETH_GENERAL_SETTINGS; - -typedef struct SRAD_GPTP_SETTINGS_s -{ - uint32_t neighborPropDelayThresh; - uint32_t sys_phc_sync_interval; - int8_t logPDelayReqInterval; - int8_t logSyncInterval; - int8_t logAnnounceInterval; - uint8_t profile; - uint8_t priority1; - uint8_t clockclass; - uint8_t clockaccuracy; - uint8_t priority2; - uint16_t offset_scaled_log_variance; - uint8_t gPTPportRole; - uint8_t gptpEnabledPort; - uint8_t enableClockSyntonization; - uint8_t rsvd[15]; -} RAD_GPTP_SETTINGS; - -typedef struct SRAD_GPTP_AND_TAP_SETTINGS_s -{ - RAD_GPTP_SETTINGS gPTP; - OP_ETH_GENERAL_SETTINGS tap; -} RAD_GPTP_AND_TAP_SETTINGS; - -typedef struct HW_ETH_SETTINGS_t -{ - OP_ETH_GENERAL_SETTINGS General_Settings; -} HW_ETH_SETTINGS; - -typedef enum _opEthLinkMode -{ - OPETH_LINK_AUTO = 0, - OPETH_LINK_MASTER, - OPETH_LINK_SLAVE -} opEthLinkMode; - -enum -{ - OPETH_MAC_SPOOF_DST_ADDR = 0, - OPETH_MAC_SPOOF_SRC_ADDR = 1, -}; - -typedef struct OP_ETH_SETTINGS_t -{ - uint8_t ucConfigMode; - unsigned char preemption_en; - union - { - struct - { - - unsigned char mac_addr1[6]; - unsigned char mac_addr2[6]; - unsigned short mac_spoofing_en : 1; - unsigned short mac_spoofing_isDstOrSrc : 1; - unsigned short link_spd : 2; - unsigned short q2112_phy_mode : 1; - unsigned short reserved : 11; - }; - unsigned char reserved0[14]; - }; -} OP_ETH_SETTINGS; - -typedef struct ETHERNET_SETTINGS_t -{ - uint8_t duplex; - uint8_t link_speed; - uint8_t auto_neg; - uint8_t led_mode; - uint8_t rsvd[4]; -} ETHERNET_SETTINGS; -typedef struct ETHERNET_SETTINGS2_t -{ - - uint8_t flags; - uint8_t link_speed; - uint32_t ip_addr; - uint32_t netmask; - uint32_t gateway; - uint8_t rsvd[2]; -} ETHERNET_SETTINGS2; - -enum -{ - LINK_SPEED_AUTO_NEGOTIATION = 0, - LINK_SPEED_1GBPS_FULL_DUPLEX, - LINK_SPEED_1GBPS_HALF_DUPLEX, - LINK_SPEED_100MBPS_FULL_DUPLEX, - LINK_SPEED_100MBPS_HALF_DUPLEX, - LINK_SPEED_10MBPS_FULL_DUPLEX, - LINK_SPEED_10MBPS_HALF_DUPLEX, - - LINK_SPEED_COUNT, -}; -typedef struct ETHERNET10G_SETTINGS_t -{ - - uint32_t flags; - uint32_t ip_addr; - uint32_t netmask; - uint32_t gateway; - uint8_t link_speed; - uint8_t rsvd2[7]; -} ETHERNET10G_SETTINGS; - -typedef struct LOGGER_SETTINGS_t -{ - - uint8_t extraction_timeout; - uint8_t rsvd[3]; -} LOGGER_SETTINGS; - -typedef struct DISK_SETTINGS_t -{ - uint8_t disk_layout; - uint8_t disk_format; - uint32_t disk_enables; - uint8_t rsvd[8]; -} DISK_SETTINGS; - -typedef struct -{ - uint8_t term_enabled; - uint8_t term_network; - uint16_t reserved[2]; -} CANTERM_SETTINGS; - -typedef struct -{ - uint8_t MasterEnable; - uint8_t SlaveEnable; - uint8_t MasterNetwork; - uint8_t SlaveNetwork; -} TIMESYNC_ICSHARDWARE_SETTINGS; - -typedef enum _EDiskFormat -{ - DiskFormatUnknown = 0, - DiskFormatFAT32, - DiskFormatexFAT, -} EDiskFormat; - -typedef enum _EDiskLayout -{ - DiskLayoutSpanned = 0, - DiskLayoutRAID0, - DiskLayoutRAID1, - DiskLayoutRAID5, - DiskLayoutIndividual, -} EDiskLayout; - -typedef struct _SDiskStatus -{ - uint16_t status; - uint8_t sectors[8]; - uint8_t bytesPerSector[4]; -} SDiskStatus; - -typedef struct _SDiskStructure -{ - DISK_SETTINGS settings; - uint16_t options; -} SDiskStructure; - -typedef struct _SDiskDetails -{ - SDiskStructure structure; - SDiskStatus status[12]; -} SDiskDetails; - -typedef struct _SDiskFormatProgress -{ - uint16_t state; - uint8_t sectorsRemaining[8]; -} SDiskFormatProgress; - -typedef struct _StartDHCPServerCommand -{ - uint16_t networkId; - uint32_t serverIpAddress; - uint32_t subnetMask; - uint32_t gatewayAddress; - uint32_t startAddress; - uint32_t endAddress; - uint32_t leaseTime; - uint32_t overwrite; -} StartDHCPServerCommand; - -typedef struct _StopDHCPServerCommand -{ - uint16_t networkId; -} StopDHCPServerCommand; - -typedef enum _ExtendedResponseCode -{ - EXTENDED_RESPONSE_OK = 0, - - EXTENDED_RESPONSE_INVALID_COMMAND = -1, - - EXTENDED_RESPONSE_INVALID_STATE = -2, - - EXTENDED_RESPONSE_OPERATION_FAILED = -3, - - EXTENDED_RESPONSE_OPERATION_PENDING = -4, - - EXTENDED_RESPONSE_INVALID_PARAMETER = -5, -} ExtendedResponseCode; - -typedef struct _ExtendedResponseGeneric -{ - uint16_t commandType; - int32_t returnCode; -} ExtendedResponseGeneric; - -typedef struct -{ - uint16_t cmdVersion; - uint16_t numValidBits; - uint32_t featureBitfields[0]; -} GetSupportedFeaturesResponse; - -typedef struct _VersionReport -{ - uint8_t valid; - uint8_t expansionSlot; - uint8_t componentInfo; - uint8_t reserved; - uint32_t identifier; - uint32_t dotVersion; - uint32_t commitHash; -} VersionReport; - -typedef struct _GetComponentVersions -{ - uint32_t reserved[2]; -} GetComponentVersions; - -typedef struct _ExtendedGetVersionsResponse -{ - uint16_t numVersions; - VersionReport versions[(16)]; -} GetComponentVersionsResponse; - -enum -{ - swUpdateWrite, - swUpdateErase, - swUpdateGetProgress, - swUpdateValidateAll, - swUpdateGetBufferSize, - swUpdateCheckVersion, -}; - -typedef struct -{ - uint32_t componentIdentifier; - uint8_t commandType; - uint32_t offset; - uint32_t commandSizeOrProgress; - uint8_t commandData[0]; -} SoftwareUpdateCommand; - -typedef struct _SExtSubCmdHdr -{ - uint16_t command; - uint16_t length; -} SExtSubCmdHdr; - -#pragma pack(push, 1) - -struct _timestamp -{ - uint16_t seconds_msb; - uint32_t seconds_lsb; - uint32_t nanoseconds; -}; - -typedef uint64_t _clock_identity; - -struct port_identity -{ - _clock_identity clock_identity; - uint16_t port_number; -}; -struct _clock_quality -{ - uint8_t clock_class; - uint8_t clock_accuracy; - uint16_t offset_scaled_log_variance; -}; -struct system_identity -{ - uint8_t priority_1; - struct _clock_quality clock_quality; - uint8_t priority_2; - _clock_identity clock_identity; -}; -struct priority_vector -{ - struct system_identity sysid; - uint16_t steps_removed; - struct port_identity portid; - uint16_t port_number; -}; - -typedef struct _GPTPStatus -{ - struct _timestamp current_time; - struct priority_vector gm_priority; - int64_t ms_offset_ns; - uint8_t is_sync; - - uint8_t link_status; - int64_t link_delay_ns; - uint8_t selected_role; - uint8_t as_capable; - - uint8_t is_syntonized; - uint8_t reserved[8]; -} GPTPStatus; - -#pragma pack(pop) - -typedef struct _SExtSubCmdComm -{ - SExtSubCmdHdr header; - union - { - SDiskStructure structure; - SDiskDetails details; - SDiskFormatProgress progress; - StartDHCPServerCommand startDHCPServer; - StopDHCPServerCommand stopDHCPServer; - GetSupportedFeaturesResponse getSupportedFeatures; - ExtendedResponseGeneric genericResponse; - GPTPStatus gptpStatus; - GetComponentVersions getComponentVersions; - SoftwareUpdateCommand softwareUpdate; - GetComponentVersionsResponse getComponentVersionsResponse; - - } extension; -} SExtSubCmdComm; -enum -{ - SERDESCAM_MODE_TAP_REPEATER = 0, - SERDESCAM_MODE_SPLITTER, - SERDESCAM_MODE_LOG_ONLY, - SERDESCAM_MODE_CUSTOM, - - SERDESCAM_MODE_COUNT, -}; - -enum -{ - SERDESCAM_PIXEL_BIT_POS_0 = 0, - SERDESCAM_PIXEL_BIT_POS_1, - SERDESCAM_PIXEL_BIT_POS_2, - SERDESCAM_PIXEL_BIT_POS_3, -}; - -enum -{ - SERDESCAM_VIDEO_FORMAT_NONE = -1, - SERDESCAM_VIDEO_FORMAT_UYVY_422_8 = 0, - SERDESCAM_VIDEO_FORMAT_YUYV_422_8, - SERDESCAM_VIDEO_FORMAT_YVYU_422_8, - SERDESCAM_VIDEO_FORMAT_VYUY_422_8, - SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_8, - SERDESCAM_VIDEO_FORMAT_RAW_8, - SERDESCAM_VIDEO_FORMAT_RAW_10, - SERDESCAM_VIDEO_FORMAT_RAW_12, - SERDESCAM_VIDEO_FORMAT_RAW_16, - SERDESCAM_VIDEO_FORMAT_RAW_20, - SERDESCAM_VIDEO_FORMAT_RAW_24, - SERDESCAM_VIDEO_FORMAT_RAW_30, - SERDESCAM_VIDEO_FORMAT_RAW_32, - SERDESCAM_VIDEO_FORMAT_RAW_36, - SERDESCAM_VIDEO_FORMAT_RGB888, - SERDESCAM_VIDEO_FORMAT_UYVY_422_10LE_PACKED, - SERDESCAM_VIDEO_FORMAT_YUYV_422_10LE_PACKED, - SERDESCAM_VIDEO_FORMAT_YVYU_422_10LE_PACKED, - SERDESCAM_VIDEO_FORMAT_VYUY_422_10LE_PACKED, - SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_10LE_PACKED, - SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_12LE_PACKED, - SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16LE, - SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16BE, - SERDESCAM_VIDEO_FORMAT_JPEG, - SERDESCAM_VIDEO_FORMAT_UYVY_422_12LE_PACKED, - SERDESCAM_VIDEO_FORMAT_YUYV_422_12LE_PACKED, - SERDESCAM_VIDEO_FORMAT_YVYU_422_12LE_PACKED, - SERDESCAM_VIDEO_FORMAT_VYUY_422_12LE_PACKED, - SERDESCAM_VIDEO_FORMAT_YUV422_10LE_PLANAR, - SERDESCAM_VIDEO_FORMAT_YUV422_16LE_PLANAR, - SERDESCAM_VIDEO_FORMAT_RGB565, - SERDESCAM_VIDEO_FORMAT_RGB666, - SERDESCAM_VIDEO_FORMAT_RAW_11x2, - SERDESCAM_VIDEO_FORMAT_RAW_12x2, - SERDESCAM_VIDEO_FORMAT_RAW_14, - - SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_8, - SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_8, - SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_8, - SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_8, - SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_10LE_PACKED, - SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_10LE_PACKED, - SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_10LE_PACKED, - SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_10LE_PACKED, - SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_12LE_PACKED, - SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_12LE_PACKED, - SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_12LE_PACKED, - SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_12LE_PACKED, - SERDESCAM_VIDEO_FORMAT_CSI2_RGB565, - SERDESCAM_VIDEO_FORMAT_CSI2_RGB666, - SERDESCAM_VIDEO_FORMAT_CSI2_RGB888, - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_8, - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_10LE_PACKED, - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_12LE_PACKED, - SERDESCAM_VIDEO_FORMAT_CSI2_RAW_8, - SERDESCAM_VIDEO_FORMAT_CSI2_RAW_10, - SERDESCAM_VIDEO_FORMAT_CSI2_RAW_11x2, - SERDESCAM_VIDEO_FORMAT_CSI2_RAW_12, - SERDESCAM_VIDEO_FORMAT_CSI2_RAW_12x2, - SERDESCAM_VIDEO_FORMAT_CSI2_RAW_14, - SERDESCAM_VIDEO_FORMAT_CSI2_RAW_16, - SERDESCAM_VIDEO_FORMAT_CSI2_RAW_20, - SERDESCAM_VIDEO_FORMAT_CSI2_RAW_24, - SERDESCAM_VIDEO_FORMAT_CSI2_RAW_30, - SERDESCAM_VIDEO_FORMAT_CSI2_RAW_32, - SERDESCAM_VIDEO_FORMAT_CSI2_RAW_36, - - SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_8, - SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_10LE_PACKED, - SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_12LE_PACKED, - SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16LE, - SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16BE, - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_8, - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_10LE_PACKED, - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_12LE_PACKED, - - SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_8, - SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_10LE_PACKED, - SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_12LE_PACKED, - SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16LE, - SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16BE, - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_8, - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_10LE_PACKED, - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_12LE_PACKED, - - SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_8, - SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_10LE_PACKED, - SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_12LE_PACKED, - SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16LE, - SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16BE, - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_8, - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_10LE_PACKED, - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_12LE_PACKED, - - SERDESCAM_VIDEO_FORMAT_COUNT, -}; - -typedef struct SERDESCAM_SETTINGS_t -{ - uint32_t flags; - uint8_t mode; - uint8_t rsvd1; - uint8_t bitPos; - uint8_t videoFormat; - uint16_t resWidth; - uint16_t resHeight; - uint8_t frameSkip; - uint8_t rsvd2[19]; -} SERDESCAM_SETTINGS; - -typedef struct SERDESPOC_SETTINGS_t -{ - uint8_t mode; - uint8_t rsvd[6]; - uint8_t voltage; - uint16_t chksum; -} SERDESPOC_SETTINGS; - -enum -{ - SERDESGEN_MOD_ID_NONE = 0, - SERDESGEN_MOD_ID_FPD3_2x2 = 1, - SERDESGEN_MOD_ID_GMSL2_2x2 = 2, - SERDESGEN_MOD_ID_GMSL1_4x4 = 3, - SERDESGEN_MOD_ID_FPD3_TO_GMSL2_2x2 = 4, - - SERDESGEN_MOD_ID_UNKNOWN = -1, -}; - -typedef struct SERDESGEN_SETTINGS_t -{ - - uint16_t flags; - uint8_t rsvd1; - uint8_t mod_id; - uint16_t tx_speed; - uint16_t rx_speed; - - uint8_t rsvd2[24]; -} SERDESGEN_SETTINGS; - -typedef struct _RadMoonDuoConverterSettings -{ - - uint8_t linkMode0; - uint8_t linkMode1; - - uint8_t converter1Mode; - - uint32_t ipAddress; - uint32_t ipMask; - uint32_t ipGateway; -} RadMoonDuoConverterSettings; -typedef struct RAD_REPORTING_SETTINGS_t -{ - uint32_t flags; - uint16_t temp_interval_ms; - uint16_t gps_interval_ms; - uint16_t serdes_interval_ms; - uint16_t io_interval_ms; - uint16_t fan_speed_interval_ms; - uint8_t rsvd[2]; -} RAD_REPORTING_SETTINGS; - -enum -{ - REPORT_ON_PERIODIC, - REPORT_ON_MISC1, - REPORT_ON_MISC2, - REPORT_ON_MISC3, - REPORT_ON_MISC4, - REPORT_ON_MISC5, - REPORT_ON_MISC6, - REPORT_ON_LED1, - REPORT_ON_LED2, - REPORT_ON_KLINE, - REPORT_ON_MISC3_AIN, - REPORT_ON_MISC4_AIN, - REPORT_ON_MISC5_AIN, - REPORT_ON_MISC6_AIN, - REPORT_ON_PWM_IN1, - REPORT_ON_GPS, -}; - -typedef struct _SFireSettings -{ - CAN_SETTINGS can1; - CAN_SETTINGS can2; - CAN_SETTINGS can3; - CAN_SETTINGS can4; - - SWCAN_SETTINGS swcan; - CAN_SETTINGS lsftcan; - - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; - LIN_SETTINGS lin3; - LIN_SETTINGS lin4; - - uint16_t cgi_enable_reserved; - uint16_t cgi_baud; - uint16_t cgi_tx_ifs_bit_times; - uint16_t cgi_rx_ifs_bit_times; - uint16_t cgi_chksum_enable; - - uint16_t network_enables; - uint16_t network_enabled_on_boot; - - uint32_t pwm_man_timeout; - uint16_t pwr_man_enable; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - - uint16_t misc_io_analog_enable; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t ain_sample_period; - uint16_t ain_threshold; - - uint16_t iso15765_separation_time_offset; - - uint16_t iso9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - - uint16_t perf_en; - - uint16_t iso_parity; - uint16_t iso_msg_termination; - uint16_t iso_tester_pullup_enable; - - uint16_t network_enables_2; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_3; - uint16_t iso_parity_3; - uint16_t iso_msg_termination_3; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_4; - uint16_t iso_parity_4; - uint16_t iso_msg_termination_4; - - uint16_t fast_init_network_enables_1; - uint16_t fast_init_network_enables_2; - - UART_SETTINGS uart; - UART_SETTINGS uart2; - - STextAPISettings text_api; - - SNeoMostGatewaySettings neoMostGateway; - uint16_t vnetBits; -} SFireSettings; - -typedef struct _SFireVnetSettings -{ - CAN_SETTINGS can1; - CAN_SETTINGS can2; - CAN_SETTINGS can3; - CAN_SETTINGS can4; - - SWCAN_SETTINGS swcan; - CAN_SETTINGS lsftcan; - - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; - LIN_SETTINGS lin3; - LIN_SETTINGS lin4; - - uint16_t cgi_enable_reserved; - uint16_t cgi_baud; - uint16_t cgi_tx_ifs_bit_times; - uint16_t cgi_rx_ifs_bit_times; - uint16_t cgi_chksum_enable; - - uint16_t network_enables; - uint16_t network_enabled_on_boot; - - uint32_t pwm_man_timeout; - uint16_t pwr_man_enable; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_analog_enable; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t ain_sample_period; - uint16_t ain_threshold; - - uint16_t iso15765_separation_time_offset; - - uint16_t iso9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - - uint16_t perf_en; - - uint16_t iso_parity; - uint16_t iso_msg_termination; - uint16_t iso_tester_pullup_enable; - - uint16_t network_enables_2; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_3; - uint16_t iso_parity_3; - uint16_t iso_msg_termination_3; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_4; - uint16_t iso_parity_4; - uint16_t iso_msg_termination_4; - - uint16_t fast_init_network_enables_1; - uint16_t fast_init_network_enables_2; - - UART_SETTINGS uart; - UART_SETTINGS uart2; - - STextAPISettings text_api; - - SNeoMostGatewaySettings neoMostGateway; - uint16_t vnetBits; - - CAN_SETTINGS can5; - CAN_SETTINGS can6; - LIN_SETTINGS lin5; - SWCAN_SETTINGS swcan2; -} SFireVnetSettings; - -typedef struct _SCyanSettings -{ - uint16_t perf_en; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - CAN_SETTINGS can3; - CANFD_SETTINGS canfd3; - CAN_SETTINGS can4; - CANFD_SETTINGS canfd4; - CAN_SETTINGS can5; - CANFD_SETTINGS canfd5; - CAN_SETTINGS can6; - CANFD_SETTINGS canfd6; - CAN_SETTINGS can7; - CANFD_SETTINGS canfd7; - CAN_SETTINGS can8; - CANFD_SETTINGS canfd8; - - SWCAN_SETTINGS swcan1; - uint16_t network_enables; - SWCAN_SETTINGS swcan2; - uint16_t network_enables_2; - - CAN_SETTINGS lsftcan1; - CAN_SETTINGS lsftcan2; - - LIN_SETTINGS lin1; - uint16_t misc_io_initial_ddr; - LIN_SETTINGS lin2; - uint16_t misc_io_initial_latch; - LIN_SETTINGS lin3; - uint16_t misc_io_report_period; - LIN_SETTINGS lin4; - uint16_t misc_io_on_report_events; - LIN_SETTINGS lin5; - uint16_t misc_io_analog_enable; - uint16_t ain_sample_period; - uint16_t ain_threshold; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t network_enabled_on_boot; - - uint16_t iso15765_separation_time_offset; - - uint16_t iso_9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; - uint16_t iso_parity_1; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_3; - uint16_t iso_parity_3; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_4; - uint16_t iso_parity_4; - - uint16_t iso_msg_termination_1; - uint16_t iso_msg_termination_2; - uint16_t iso_msg_termination_3; - uint16_t iso_msg_termination_4; - - uint16_t idle_wakeup_network_enables_1; - uint16_t idle_wakeup_network_enables_2; - - uint16_t network_enables_3; - uint16_t idle_wakeup_network_enables_3; - - uint16_t can_switch_mode; - STextAPISettings text_api; - uint64_t termination_enables; - LIN_SETTINGS lin6; - ETHERNET_SETTINGS ethernet; - uint16_t slaveVnetA; - uint16_t slaveVnetB; - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t busMessagesToAndroid : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t enableDefaultLogger : 1; - uint32_t enableDefaultUpload : 1; - uint32_t reserved : 26; - } flags; - uint16_t digitalIoThresholdTicks; - uint16_t digitalIoThresholdEnable; - TIMESYNC_ICSHARDWARE_SETTINGS timeSync; - DISK_SETTINGS disk; - ETHERNET_SETTINGS2 ethernet2; -} SCyanSettings; - -typedef SCyanSettings SFire2Settings; - -typedef struct _SVCAN3Settings -{ - CAN_SETTINGS can1; - CAN_SETTINGS can2; - - uint16_t network_enables; - uint16_t network_enabled_on_boot; - - uint16_t iso15765_separation_time_offset; - - uint16_t perf_en; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; -} SVCAN3Settings; - -typedef struct _SVCAN4Settings -{ - uint16_t perf_en; - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - CAN_SETTINGS can3; - CANFD_SETTINGS canfd3; - CAN_SETTINGS can4; - CANFD_SETTINGS canfd4; - uint16_t network_enables; - uint16_t network_enables_2; - LIN_SETTINGS lin1; - uint16_t network_enabled_on_boot; - int16_t iso15765_separation_time_offset; - uint16_t iso_9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; - uint16_t iso_parity_1; - uint16_t iso_msg_termination_1; - uint16_t network_enables_3; - STextAPISettings text_api; - uint64_t termination_enables; - ETHERNET_SETTINGS ethernet; - struct - { - uint32_t enableLatencyTest : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t reserved : 30; - } flags; - uint16_t pwr_man_enable; - uint16_t pwr_man_timeout; - ETHERNET_SETTINGS2 ethernet2; -} SVCAN4Settings; - -typedef struct _SVCANRFSettings -{ - CAN_SETTINGS can1; - CAN_SETTINGS can2; - CAN_SETTINGS can3; - CAN_SETTINGS can4; - - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; - - uint16_t network_enables; - uint16_t network_enabled_on_boot; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_analog_enable; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - - uint16_t iso15765_separation_time_offset; - - uint16_t iso9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - - uint16_t perf_en; - - uint16_t iso_parity; - uint16_t iso_msg_termination; - uint16_t iso_tester_pullup_enable; - uint16_t network_enables_2; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; - - uint16_t idle_wakeup_network_enables_1; - uint16_t idle_wakeup_network_enables_2; - - uint16_t disableFwLEDs : 1; - uint16_t reservedZero : 15; -} SVCANRFSettings; - -typedef struct _SECUSettings -{ - - uint32_t ecu_id; - - uint16_t selected_network; - - CAN_SETTINGS can1; - CAN_SETTINGS can2; - - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; - - uint16_t iso15765_separation_time_offset; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - uint16_t iso_parity; - uint16_t iso_msg_termination; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; - - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enabled_on_boot; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_analog_enable; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t ain_sample_period; - uint16_t ain_threshold; - - SWCAN_SETTINGS swcan; - SWCAN_SETTINGS swcan2; - CAN_SETTINGS lsftcan; - CAN_SETTINGS lsftcan2; - - UART_SETTINGS uart; - UART_SETTINGS uart2; - - STextAPISettings text_api; -} SECUSettings; - -typedef struct _SPendantSettings -{ - - uint32_t ecu_id; - - uint16_t selected_network; - - CAN_SETTINGS can1; - CAN_SETTINGS can2; - - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; - - uint16_t iso15765_separation_time_offset; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - uint16_t iso_parity; - uint16_t iso_msg_termination; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; - - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enabled_on_boot; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_analog_enable; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t ain_sample_period; - uint16_t ain_threshold; - - SWCAN_SETTINGS swcan; - SWCAN_SETTINGS swcan2; - CAN_SETTINGS lsftcan; - CAN_SETTINGS lsftcan2; - - UART_SETTINGS uart; - UART_SETTINGS uart2; - - STextAPISettings text_api; -} SPendantSettings; - -typedef struct _SIEVBSettings -{ - - uint32_t ecu_id; - - uint16_t selected_network; - - CAN_SETTINGS can1; - LIN_SETTINGS lin1; - - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enabled_on_boot; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_analog_enable; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t ain_sample_period; - uint16_t ain_threshold; - - uint16_t iso15765_separation_time_offset; - - CAN_SETTINGS can2; - LIN_SETTINGS lin2; - - UART_SETTINGS uart; - UART_SETTINGS uart2; - - STextAPISettings text_api; - - uint32_t reserved_1; - uint32_t reserved_2; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t idle_wakeup_network_enables_1; - uint16_t idle_wakeup_network_enables_2; - - uint16_t misc_io_analog_enable_2; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - uint16_t iso_parity; - uint16_t iso_msg_termination; - uint16_t iso_tester_pullup_enable; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; - -} SIEVBSettings; - -typedef struct _SEEVBSettings -{ - uint32_t ecu_id; - - CAN_SETTINGS can1; - - uint16_t network_enables; - uint16_t network_enabled_on_boot; - - uint16_t iso15765_separation_time_offset; - - uint16_t perf_en; - - uint16_t ain_sample_period; - uint16_t ain_threshold; - - uint32_t rsvd; -} SEEVBSettings; - -enum eGPTPPort -{ - ePortDisabled = 0, - ePortOpEth1 = 1, - ePortOpEth2 = 2, - ePortOpEth3 = 3, - ePortOpEth4 = 4, - ePortOpEth5 = 5, - ePortOpEth6 = 6, - ePortOpEth7 = 7, - ePortOpEth8 = 8, - ePortOpEth9 = 9, - ePortOpEth10 = 10, - ePortOpEth11 = 11, - ePortOpEth12 = 12, - ePortStdEth1 = 13, - ePortStdEth2 = 14, -}; - -enum eGPTPRole -{ - eRoleDisabled = 0, - eRolePassive = 1, - eRoleMaster = 2, - eRoleSlave = 3, -}; - -typedef struct _SRADGalaxySettings -{ - uint16_t perf_en; - - OP_ETH_GENERAL_SETTINGS opEthGen; - OP_ETH_SETTINGS opEth1; - OP_ETH_SETTINGS opEth2; - OP_ETH_SETTINGS opEth3; - OP_ETH_SETTINGS opEth4; - OP_ETH_SETTINGS opEth5; - OP_ETH_SETTINGS opEth6; - OP_ETH_SETTINGS opEth7; - OP_ETH_SETTINGS opEth8; - OP_ETH_SETTINGS opEth9; - OP_ETH_SETTINGS opEth10; - OP_ETH_SETTINGS opEth11; - OP_ETH_SETTINGS opEth12; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - CAN_SETTINGS can3; - CANFD_SETTINGS canfd3; - CAN_SETTINGS can4; - CANFD_SETTINGS canfd4; - CAN_SETTINGS can5; - CANFD_SETTINGS canfd5; - CAN_SETTINGS can6; - CANFD_SETTINGS canfd6; - CAN_SETTINGS can7; - CANFD_SETTINGS canfd7; - CAN_SETTINGS can8; - CANFD_SETTINGS canfd8; - - SWCAN_SETTINGS swcan1; - uint16_t network_enables; - SWCAN_SETTINGS swcan2; - uint16_t network_enables_2; - - LIN_SETTINGS lin1; - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t misc_io_analog_enable; - uint16_t ain_sample_period; - uint16_t ain_threshold; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t network_enabled_on_boot; - - uint16_t iso15765_separation_time_offset; - - uint16_t iso_9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; - uint16_t iso_parity_1; - - uint16_t iso_msg_termination_1; - - uint16_t idle_wakeup_network_enables_1; - uint16_t idle_wakeup_network_enables_2; - - uint16_t network_enables_3; - uint16_t idle_wakeup_network_enables_3; - - uint16_t can_switch_mode; - STextAPISettings text_api; - TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; - uint16_t hwComLatencyTestEn; - RAD_REPORTING_SETTINGS reporting; - DISK_SETTINGS disk; - LOGGER_SETTINGS logger; - - ETHERNET_SETTINGS2 ethernet1; - ETHERNET_SETTINGS2 ethernet2; - uint16_t network_enables_4; - - RAD_GPTP_SETTINGS gPTP; -} SRADGalaxySettings; - -typedef struct _SRADStar2Settings -{ - uint16_t perf_en; - - OP_ETH_GENERAL_SETTINGS opEthGen; - OP_ETH_SETTINGS opEth1; - OP_ETH_SETTINGS opEth2; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - - uint16_t network_enables; - uint16_t network_enables_2; - - LIN_SETTINGS lin1; - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t misc_io_analog_enable; - uint16_t ain_sample_period; - uint16_t ain_threshold; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t network_enabled_on_boot; - - uint16_t iso15765_separation_time_offset; - - uint16_t iso_9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; - uint16_t iso_parity_1; - - uint16_t iso_msg_termination_1; - - uint16_t idle_wakeup_network_enables_1; - uint16_t idle_wakeup_network_enables_2; - - uint16_t network_enables_3; - uint16_t idle_wakeup_network_enables_3; - - uint16_t can_switch_mode; - STextAPISettings text_api; - uint16_t pc_com_mode; - TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; - uint16_t hwComLatencyTestEn; - RAD_REPORTING_SETTINGS reporting; - ETHERNET_SETTINGS2 ethernet; - - RAD_GPTP_SETTINGS gPTP; -} SRADStar2Settings; - -typedef struct _SRADSuperMoonSettings -{ - uint16_t perf_en; - - OP_ETH_GENERAL_SETTINGS opEthGen; - OP_ETH_SETTINGS opEth1; - - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enabled_on_boot; - uint16_t network_enables_3; - - STextAPISettings text_api; - - uint16_t pc_com_mode; - TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; - uint16_t hwComLatencyTestEn; - - ETHERNET_SETTINGS2 Eth2; - - RAD_GPTP_SETTINGS gPTP; -} SRADSuperMoonSettings; - -typedef enum -{ - tdmModeTDM2 = 0, - tdmModeTDM4, - tdmModeTDM8, - tdmModeTDM12, - tdmModeTDM16, - tdmModeTDM20, - tdmModeTDM24, - tdmModeTDM32, -} A2BTDMMode; - -typedef enum -{ - a2bNodeTypeMonitor = 0, - a2bNodeTypeMaster, - a2bNodeTypeSlave, -} A2BNodeType; - -typedef struct -{ - uint8_t tdmMode; - uint8_t upstreamChannelOffset; - uint8_t downstreamChannelOffset; - uint8_t nodeType; - - uint8_t flags; - uint8_t reserved[15]; -} A2BMonitorSettings; - -typedef struct _SRADA2BSettings -{ - - uint16_t perf_en; - struct - { - uint16_t hwComLatencyTestEn : 1; - uint16_t : 15; - } flags; - uint16_t network_enabled_on_boot; - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - LIN_SETTINGS lin1; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; - uint16_t iso_parity_1; - uint16_t iso_msg_termination_1; - uint64_t network_enables; - uint64_t termination_enables; - TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; - RAD_REPORTING_SETTINGS reporting; - DISK_SETTINGS disk; - LOGGER_SETTINGS logger; - int16_t iso15765_separation_time_offset; - A2BMonitorSettings a2b_monitor; - A2BMonitorSettings a2b_node; - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; -} SRADA2BSettings; - -typedef struct _SRADMoon2Settings -{ - uint16_t perf_en; - - OP_ETH_GENERAL_SETTINGS opEthGen; - OP_ETH_SETTINGS opEth1; - - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enabled_on_boot; - uint16_t network_enables_3; - - STextAPISettings text_api; - - uint16_t pc_com_mode; - TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; - uint16_t hwComLatencyTestEn; - - RAD_GPTP_SETTINGS gPTP; -} SRADMoon2Settings; - -typedef struct _SRADGigalogSettings -{ - uint32_t ecu_id; - - uint16_t perf_en; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - CAN_SETTINGS can3; - CANFD_SETTINGS canfd3; - CAN_SETTINGS can4; - CANFD_SETTINGS canfd4; - CAN_SETTINGS can5; - CANFD_SETTINGS canfd5; - CAN_SETTINGS can6; - CANFD_SETTINGS canfd6; - CAN_SETTINGS can7; - CANFD_SETTINGS canfd7; - CAN_SETTINGS can8; - CANFD_SETTINGS canfd8; - - uint16_t network_enables; - uint16_t network_enables_2; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t network_enabled_on_boot; - - uint16_t iso15765_separation_time_offset; - - uint16_t iso_9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; - uint16_t iso_parity_1; - - uint16_t iso_msg_termination_1; - - uint16_t idle_wakeup_network_enables_1; - uint16_t idle_wakeup_network_enables_2; - - uint16_t network_enables_3; - uint16_t idle_wakeup_network_enables_3; - - STextAPISettings text_api; - uint64_t termination_enables; - uint8_t rsvd1[8]; - uint8_t rsvd2[8]; - - DISK_SETTINGS disk; - - TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; - struct - { - uint16_t hwComLatencyTestEn : 1; - uint16_t disableUsbCheckOnBoot : 1; - uint16_t reserved : 14; - } flags; - ETHERNET_SETTINGS2 ethernet; - - SERDESCAM_SETTINGS serdescam1; - ETHERNET10G_SETTINGS ethernet10g; - - LIN_SETTINGS lin1; - - SERDESPOC_SETTINGS serdespoc; - LOGGER_SETTINGS logger; - SERDESCAM_SETTINGS serdescam2; - SERDESCAM_SETTINGS serdescam3; - SERDESCAM_SETTINGS serdescam4; - - ETHERNET_SETTINGS2 ethernet2; - uint16_t network_enables_4; - RAD_REPORTING_SETTINGS reporting; - SERDESGEN_SETTINGS serdesgen; - -} SRADGigalogSettings; - -typedef struct _SRADGigastarSettings -{ - uint32_t ecu_id; - - uint16_t perf_en; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - CAN_SETTINGS can3; - CANFD_SETTINGS canfd3; - CAN_SETTINGS can4; - CANFD_SETTINGS canfd4; - CAN_SETTINGS can5; - CANFD_SETTINGS canfd5; - CAN_SETTINGS can6; - CANFD_SETTINGS canfd6; - - uint16_t network_enables; - uint16_t network_enables_2; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t network_enabled_on_boot; - - uint16_t iso15765_separation_time_offset; - - uint16_t iso_9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; - uint16_t iso_parity_1; - - uint16_t iso_msg_termination_1; - - uint16_t idle_wakeup_network_enables_1; - uint16_t idle_wakeup_network_enables_2; - - uint16_t network_enables_3; - uint16_t idle_wakeup_network_enables_3; - - STextAPISettings text_api; - uint64_t termination_enables; - - DISK_SETTINGS disk; - - TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; - struct - { - uint16_t hwComLatencyTestEn : 1; - uint16_t disableUsbCheckOnBoot : 1; - uint16_t reserved : 14; - } flags; - ETHERNET_SETTINGS2 ethernet1; - ETHERNET_SETTINGS2 ethernet2; - - LIN_SETTINGS lin1; - - OP_ETH_GENERAL_SETTINGS opEthGen; - OP_ETH_SETTINGS opEth1; - OP_ETH_SETTINGS opEth2; - - SERDESCAM_SETTINGS serdescam1; - SERDESPOC_SETTINGS serdespoc; - LOGGER_SETTINGS logger; - SERDESCAM_SETTINGS serdescam2; - SERDESCAM_SETTINGS serdescam3; - SERDESCAM_SETTINGS serdescam4; - RAD_REPORTING_SETTINGS reporting; - uint16_t network_enables_4; - SERDESGEN_SETTINGS serdesgen; - - RAD_GPTP_SETTINGS gPTP; -} SRADGigastarSettings; - -typedef struct _SVividCANSettings -{ - uint32_t ecu_id; - - CAN_SETTINGS can1; - SWCAN_SETTINGS swcan1; - CAN_SETTINGS lsftcan1; - - uint16_t network_enables; - uint16_t network_enabled_on_boot; - - uint16_t iso15765_separation_time_offset; - - uint16_t perf_en; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t can_switch_mode; - uint16_t termination_enables; - - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t reserved : 30; - } flags; -} SVividCANSettings; - -typedef struct _SOBD2SimSettings -{ - CAN_SETTINGS can1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd1; - CANFD_SETTINGS canfd2; - - uint64_t network_enables; - uint16_t network_enabled_on_boot; - - int16_t iso15765_separation_time_offset; - - uint16_t perf_en; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t misc_io_analog_enable; - uint16_t ain_sample_period; - uint16_t ain_threshold; - - struct - { - uint32_t : 1; - uint32_t enableLatencyTest : 1; - uint32_t reserved : 30; - } flags; - - STextAPISettings text_api; -} SOBD2SimSettings; - -typedef struct _CmProbeSettings -{ - - uint16_t network_enables; - uint16_t network_enabled_on_boot; - -} CmProbeSettings, SCmProbeSettings; - -typedef struct _OBD2ProSettings -{ - - uint16_t perf_en; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - CAN_SETTINGS can3; - CANFD_SETTINGS canfd3; - CAN_SETTINGS can4; - CANFD_SETTINGS canfd4; - - SWCAN_SETTINGS swcan1; - - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; - - ETHERNET_SETTINGS ethernet; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; - uint16_t iso_parity_1; - uint16_t iso_msg_termination_1; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; - - uint64_t network_enables; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t network_enabled_on_boot; - - int16_t iso15765_separation_time_offset; - - STextAPISettings text_api; - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t reserved : 30; - } flags; - uint16_t can_switch_mode; - - uint16_t misc_io_analog_enable; - ETHERNET_SETTINGS2 ethernet2; -} OBD2ProSettings, SOBD2ProSettings; - -typedef struct _VCAN412Settings -{ - - uint16_t perf_en; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - - uint64_t network_enables; - uint64_t termination_enables; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t network_enabled_on_boot; - - int16_t iso15765_separation_time_offset; - - STextAPISettings text_api; - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t reserved : 30; - } flags; -} VCAN412Settings, SVCAN412Settings; - -typedef struct _neoECU_AVBSettings -{ - - uint16_t perf_en; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - - uint64_t network_enables; - uint64_t termination_enables; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t network_enabled_on_boot; - - int16_t iso15765_separation_time_offset; - - STextAPISettings text_api; - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t reserved : 30; - } flags; -} ECU_AVBSettings, SECU_AVBSettings; -typedef struct SPluto_L2AddressLookupEntry_s -{ - uint16_t index; - uint16_t vlanID; - uint8_t macaddr[6]; - uint8_t destports; - uint8_t enfport; - uint8_t learnedEntry; - uint8_t pad1; - uint8_t pad2; - uint8_t pad3; -} SPluto_L2AddressLookupEntry; - -typedef struct SPluto_L2AddressLookupParams_s -{ - uint16_t maxage; - uint8_t dyn_tbsz; - uint8_t poly; - uint8_t shared_learn; - uint8_t no_enf_hostprt; - uint8_t no_mgmt_learn; - uint8_t pad; -} SPluto_L2AddressLookupParams; - -typedef struct SPluto_L2ForwardingParams_s -{ - uint16_t part_spc[8]; - uint8_t max_dynp; - uint8_t pad; -} SPluto_L2ForwardingParams; - -typedef struct SPluto_L2ForwardingEntry_s -{ - uint8_t vlan_pmap[8]; - uint8_t bc_domain; - uint8_t reach_port; - uint8_t fl_domain; - uint8_t pad; -} SPluto_L2ForwardingEntry; - -typedef struct SPluto_L2Policing_s -{ - uint16_t smax; - uint16_t rate; - uint16_t maxlen; - uint8_t sharindx; - uint8_t partition; -} SPluto_L2Policing; - -typedef struct SPluto_VlanLookup_s -{ - uint16_t vlanid; - uint8_t ving_mirr; - uint8_t vegr_mirr; - uint8_t vmemb_port; - uint8_t vlan_bc; - uint8_t tag_port; - uint8_t pad; -} SPluto_VlanLookup; - -typedef struct SPluto_MacConfig_s -{ - uint16_t top[8]; - uint16_t base[8]; - uint16_t tp_delin; - uint16_t tp_delout; - uint16_t vlanid; - uint8_t enabled[8]; - uint8_t ifg; - uint8_t speed; - uint8_t maxage; - uint8_t vlanprio; - uint8_t ing_mirr; - uint8_t egr_mirr; - uint8_t drpnona664; - uint8_t drpdtag; - uint8_t drpuntag; - uint8_t retag; - uint8_t dyn_learn; - uint8_t egress; - uint8_t ingress; - uint8_t pad; -} SPluto_MacConfig; - -typedef struct SPluto_RetaggingEntry_s -{ - uint16_t vlan_egr; - uint16_t vlan_ing; - uint8_t egr_port; - uint8_t ing_port; - uint8_t do_not_learn; - uint8_t use_dest_ports; - uint8_t destports; - uint8_t pad; -} SPluto_RetaggingEntry; - -typedef struct SPluto_GeneralParams_s -{ - uint64_t mac_fltres1; - uint64_t mac_fltres0; - uint64_t mac_flt1; - uint64_t mac_flt0; - uint32_t vlmarker; - uint32_t vlmask; - uint16_t tpid; - uint16_t tpid2; - uint8_t vllupformat; - uint8_t mirr_ptacu; - uint8_t switchid; - uint8_t hostprio; - uint8_t incl_srcpt1; - uint8_t incl_srcpt0; - uint8_t send_meta1; - uint8_t send_meta0; - uint8_t casc_port; - uint8_t host_port; - uint8_t mirr_port; - uint8_t ignore2stf; -} SPluto_GeneralParams; - -typedef struct SPluto_VlLookupEntry_s -{ - union - { - - struct - { - uint64_t macaddr; - uint16_t vlanid; - uint8_t destports; - uint8_t iscritical; - uint8_t port; - uint8_t vlanprior; - } vllupformat0; - - struct - { - uint16_t vlid; - uint8_t egrmirr; - uint8_t ingrmirr; - uint8_t port; - } vllupformat1; - }; -} SPluto_VlLookupEntry; - -typedef struct SPluto_VlPolicingEntry_s -{ - uint64_t type; - uint64_t maxlen; - uint64_t sharindx; - uint64_t bag; - uint64_t jitter; -} SPluto_VlPolicingEntry; - -typedef struct SPluto_VlForwardingParams_s -{ - uint16_t partspc[8]; - uint8_t debugen; - uint8_t pad; -} SPluto_VlForwardingParams; - -typedef struct SPluto_VlForwardingEntry_s -{ - uint8_t type; - uint8_t priority; - uint8_t partition; - uint8_t destports; -} SPluto_VlForwardingEntry; - -typedef struct SPluto_AVBParams_s -{ - uint64_t destmeta; - uint64_t srcmeta; -} SPluto_AVBParams; - -typedef struct SPluto_ClockSyncParams_s -{ - uint64_t etssrcpcf; - uint32_t wfintmout; - uint32_t maxtranspclk; - uint32_t listentmout; - uint32_t intcydur; - uint32_t caentmout; - uint16_t pcfsze; - uint16_t obvwinsz; - uint16_t vlidout; - uint16_t vlidimnmin; - uint16_t vlidinmax; - uint16_t accdevwin; - uint8_t srcport[8]; - uint8_t waitthsync; - uint8_t unsytotsyth; - uint8_t unsytosyth; - uint8_t tsytosyth; - uint8_t tsyth; - uint8_t tsytousyth; - uint8_t syth; - uint8_t sytousyth; - uint8_t sypriority; - uint8_t sydomain; - uint8_t stth; - uint8_t sttointth; - uint8_t pcfpriority; - uint8_t numunstbcy; - uint8_t numstbcy; - uint8_t maxintegcy; - uint8_t inttotentth; - uint8_t inttosyncth; - uint8_t vlidselect; - uint8_t tentsyrelen; - uint8_t asytensyen; - uint8_t sytostben; - uint8_t syrelen; - uint8_t sysyen; - uint8_t syasyen; - uint8_t ipcframesy; - uint8_t stabasyen; - uint8_t swmaster; - uint8_t fullcbg; - uint8_t pad1; - uint8_t pad2; - uint8_t pad3; -} SPluto_ClockSyncParams; -typedef struct SPlutoPtpParams_s -{ - uint32_t neighborPropDelayThresh; - uint32_t sys_phc_sync_interval; - int8_t logPDelayReqInterval; - int8_t logSyncInterval; - int8_t logAnnounceInterval; - uint8_t profile; - uint8_t priority1; - uint8_t clockclass; - uint8_t clockaccuracy; - uint8_t priority2; - uint16_t offset_scaled_log_variance; - uint8_t gPTPportRole[5 - 1]; - uint8_t portEnable[5 - 1]; -} PlutoPtpParams_t; - -typedef struct SPluto_CustomParams_s -{ - uint8_t mode[5]; - uint8_t speed[5]; - uint8_t enablePhy[5]; - uint8_t ae1Select; - uint8_t usbSelect; - uint8_t pad; - PlutoPtpParams_t ptpParams; -} SPluto_CustomParams; - -typedef struct SPlutoSwitchSettings_s -{ - ExtendedDataFlashHeader_t flashHeader; - SPluto_L2AddressLookupParams l2_addressLookupParams; - SPluto_L2AddressLookupEntry l2_addressLookupEntries[1024]; - SPluto_L2Policing l2_policing[45]; - SPluto_L2ForwardingParams l2_forwardingParams; - SPluto_L2ForwardingEntry l2_ForwardingEntries[13]; - SPluto_VlanLookup vlan_LookupEntries[4096]; - SPluto_MacConfig macConfig[5]; - SPluto_GeneralParams generalParams; - SPluto_RetaggingEntry retagging[32]; - -} SPlutoSwitchSettings; - -typedef struct _RADPlutoSettings -{ - - uint16_t perf_en; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - LIN_SETTINGS lin1; - - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enables_3; - uint64_t termination_enables; - uint16_t misc_io_analog_enable; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t network_enabled_on_boot; - - int16_t iso15765_separation_time_offset; - uint16_t iso9141_kwp_enable_reserved; - uint16_t iso_tester_pullup_enable; - uint16_t iso_parity; - uint16_t iso_msg_termination; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - ETHERNET_SETTINGS ethernet; - - STextAPISettings text_api; - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t reserved : 29; - } flags; - - SPluto_CustomParams custom; - ETHERNET_SETTINGS2 ethernet2; -} SRADPlutoSettings; - -typedef union -{ - uint32_t word; - struct - { - unsigned can_sleep_command_id : 29; - unsigned can_sleep_command_isExtended : 1; - unsigned reserved : 2; - } id; -} SCANSleepID; -typedef struct -{ - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - uint64_t network_enables; - uint64_t termination_enables; - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - uint16_t network_enabled_on_boot; - int16_t iso15765_separation_time_offset; - uint32_t ecu_id; - SCANSleepID sleep_id; -} CANHubSettings, SCANHubSettings; - -typedef struct _SFlexVnetzSettings -{ - uint16_t perf_en; - uint16_t network_enabled_on_boot; - uint16_t misc_io_on_report_events; - uint16_t pwr_man_enable; - int16_t iso15765_separation_time_offset; - uint16_t flex_mode; - uint16_t flex_termination; - uint16_t slaveVnetA; - uint64_t termination_enables; - union - { - uint64_t word; - struct - { - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enables_3; - }; - } network_enables; - uint32_t pwr_man_timeout; - uint16_t slaveVnetB; - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - CAN_SETTINGS can3; - CANFD_SETTINGS canfd3; - CAN_SETTINGS can4; - CANFD_SETTINGS canfd4; - CAN_SETTINGS can5; - CANFD_SETTINGS canfd5; - CAN_SETTINGS can6; - CANFD_SETTINGS canfd6; - CAN_SETTINGS can7; - CANFD_SETTINGS canfd7; - ETHERNET_SETTINGS ethernet; - TIMESYNC_ICSHARDWARE_SETTINGS timeSync; - STextAPISettings text_api; - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t busMessagesToAndroid : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t enableDefaultLogger : 1; - uint32_t enableDefaultUpload : 1; - uint32_t reserved : 26; - } flags; - DISK_SETTINGS disk; - ETHERNET_SETTINGS2 ethernet2; -} SFlexVnetzSettings; - -typedef enum _flexVnetMode -{ - flexVnetModeDisabled, - flexVnetModeOneSingle, - flexVnetModeOneDual, - flexVnetModeTwoSingle, - flexVnetModeColdStart -} flexVnetMode; - -typedef struct _NeoECU12Settings -{ - uint32_t ecu_id; - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - SWCAN_SETTINGS swcan1; - SWCAN_SETTINGS swcan2; - CAN_SETTINGS lsftcan1; - CAN_SETTINGS lsftcan2; - LIN_SETTINGS lin1; - - uint64_t network_enables; - uint16_t network_enabled_on_boot; - - uint64_t termination_enables; - uint16_t can_switch_mode; - - uint16_t iso_9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - uint16_t iso_parity; - uint16_t iso_msg_termination; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - uint16_t perf_en; - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_analog_enable; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t ain_sample_period; - uint16_t ain_threshold; - int16_t iso15765_separation_time_offset; - STextAPISettings text_api; - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t reserved : 30; - } flags; - uint32_t reserved_field[2]; -} SNeoECU12Settings; - -typedef struct _VCAN4IndSettings -{ - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - ETHERNET_SETTINGS ethernet; - LIN_SETTINGS lin1; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - uint16_t iso_parity; - uint16_t iso_msg_termination; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - uint16_t perf_en; - int16_t iso15765_separation_time_offset; - uint16_t network_enabled_on_boot; - - union - { - uint64_t word; - struct - { - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enables_3; - }; - } network_enables; - uint64_t termination_enables; - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t busMessagesToAndroid : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t reserved : 28; - } flags; - ETHERNET_SETTINGS2 ethernet2; -} VCAN4IndSettings, SVCAN4IndSettings; - -typedef struct _SOBD2LCSettings -{ - - uint16_t perf_en; - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - CAN_SETTINGS can3; - CANFD_SETTINGS canfd3; - CAN_SETTINGS can4; - CANFD_SETTINGS canfd4; - SWCAN_SETTINGS swcan1; - LIN_SETTINGS lin1; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; - uint16_t iso_parity_1; - uint16_t iso_msg_termination_1; - union - { - uint64_t word; - struct - { - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enables_3; - }; - } network_enables; - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - uint16_t network_enabled_on_boot; - - int16_t iso15765_separation_time_offset; - STextAPISettings text_api; - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t busMessagesToAndroid : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t enableDefaultLogger : 1; - uint32_t enableDefaultUpload : 1; - uint32_t reserved : 26; - } flags; - uint16_t can_switch_mode; - uint16_t misc_io_on_report_events; - DISK_SETTINGS disk; - ETHERNET_SETTINGS ethernet; - ETHERNET_SETTINGS2 ethernet2; -} OBD2LCSettings, SOBD2LCSettings; - -typedef struct SJupiterPtpParams_s -{ - uint32_t neighborPropDelay; - int8_t initLogPDelayReqInterval; - int8_t initLogSyncInterval; - int8_t operationLogPDelayReqInterval; - int8_t operationLogSyncInterval; - uint8_t gPTPportRole[8]; -} JupiterPtpParams_t; - -typedef struct _SRADJupiterSwitchSettings -{ - uint8_t phyMode[8]; - uint8_t enablePhy[8]; - uint8_t port7Select; - uint8_t port8Select; - uint8_t port8Speed; - uint8_t port8Legacy; - uint8_t spoofMacFlag; - uint8_t spoofedMac[6]; - uint8_t pad; - JupiterPtpParams_t ptpParams; -} SRADJupiterSwitchSettings; - -typedef struct _SRADJupiterSettings -{ - - uint16_t perf_en; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - LIN_SETTINGS lin1; - - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enables_3; - uint64_t termination_enables; - uint16_t misc_io_analog_enable; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t network_enabled_on_boot; - - int16_t iso15765_separation_time_offset; - uint16_t iso9141_kwp_enable_reserved; - uint16_t iso_tester_pullup_enable; - uint16_t iso_parity; - uint16_t iso_msg_termination; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - ETHERNET_SETTINGS ethernet; - - STextAPISettings text_api; - - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t reserved : 29; - } flags; - - SRADJupiterSwitchSettings switchSettings; - ETHERNET_SETTINGS2 ethernet2; -} SRADJupiterSettings; - -typedef struct -{ - uint8_t allowBoot; - uint8_t useExternalWifiAntenna; - uint8_t reserved[6]; -} Fire3LinuxSettings; - -typedef struct _SFire3Settings -{ - uint16_t perf_en; - uint16_t network_enabled_on_boot; - uint16_t misc_io_on_report_events; - uint16_t pwr_man_enable; - int16_t iso15765_separation_time_offset; - uint16_t slaveVnetA; - uint32_t reserved; - uint64_t termination_enables; - union - { - uint64_t word; - struct - { - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enables_3; - uint16_t network_enables_4; - }; - } network_enables; - uint32_t pwr_man_timeout; - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - CAN_SETTINGS can3; - CANFD_SETTINGS canfd3; - CAN_SETTINGS can4; - CANFD_SETTINGS canfd4; - CAN_SETTINGS can5; - CANFD_SETTINGS canfd5; - CAN_SETTINGS can6; - CANFD_SETTINGS canfd6; - CAN_SETTINGS can7; - CANFD_SETTINGS canfd7; - CAN_SETTINGS can8; - CANFD_SETTINGS canfd8; - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; - uint16_t iso_parity_1; - uint16_t iso_msg_termination_1; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; - ETHERNET_SETTINGS ethernet_1; - TIMESYNC_ICSHARDWARE_SETTINGS timeSync; - STextAPISettings text_api; - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t busMessagesToAndroid : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t enableDefaultLogger : 1; - uint32_t enableDefaultUpload : 1; - uint32_t reserved : 26; - } flags; - DISK_SETTINGS disk; - uint16_t misc_io_report_period; - uint16_t ain_threshold; - uint16_t misc_io_analog_enable; - uint16_t digitalIoThresholdTicks; - uint16_t digitalIoThresholdEnable; - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - ETHERNET_SETTINGS2 ethernet2_1; - ETHERNET_SETTINGS ethernet_2; - ETHERNET_SETTINGS2 ethernet2_2; - Fire3LinuxSettings os_settings; -} SFire3Settings; - -typedef struct -{ - uint16_t perf_en; - uint16_t network_enabled_on_boot; - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - RadMoonDuoConverterSettings converter; - uint64_t network_enables; - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t reserved : 30; - } flags; -} RadMoonDuoSettings, SRadMoonDuoSettings; - -typedef struct _SEtherBadgeSettings -{ - - uint16_t perf_en; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - LIN_SETTINGS lin1; - - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enables_3; - uint64_t termination_enables; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t network_enabled_on_boot; - - int16_t iso15765_separation_time_offset; - uint16_t iso9141_kwp_enable_reserved; - uint16_t iso_tester_pullup_enable; - uint16_t iso_parity; - uint16_t iso_msg_termination; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - ETHERNET_SETTINGS ethernet; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t misc_io_analog_enable; - uint16_t ain_sample_period; - uint16_t ain_threshold; - - STextAPISettings text_api; - - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t reserved : 29; - } flags; - - ETHERNET_SETTINGS2 ethernet2; -} SEtherBadgeSettings; - -typedef struct _SRADEpsilonSwitchSettings -{ - uint8_t phyMode[18]; - uint8_t enablePhy[18]; - uint8_t speed[18]; - uint8_t legacy[18]; - uint8_t spoofedMac[6]; - uint8_t spoofMacFlag; - uint8_t pad; -} SRADEpsilonSwitchSettings; - -typedef struct _SRADEpsilonSettings -{ - - uint16_t perf_en; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - LIN_SETTINGS lin1; - - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enables_3; - uint64_t termination_enables; - uint16_t misc_io_analog_enable; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t network_enabled_on_boot; - - int16_t iso15765_separation_time_offset; - uint16_t iso9141_kwp_enable_reserved; - uint16_t iso_tester_pullup_enable; - uint16_t iso_parity; - uint16_t iso_msg_termination; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - ETHERNET_SETTINGS ethernet; - - STextAPISettings text_api; - - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t reserved : 29; - } flags; - - SRADEpsilonSwitchSettings switchSettings; - ETHERNET_SETTINGS2 ethernet2; -} SRADEpsilonSettings; - -typedef union -{ - uint64_t dword; - struct - { - unsigned can_id : 29; - unsigned can_id_isExtended : 1; - uint16_t tcp_port; - unsigned reserved : 18; - } config; -} SWILBridgeConfig; - -typedef struct _SRADBMSSettings -{ - - uint16_t perf_en; - - uint64_t termination_enables; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enables_3; - - int16_t iso15765_separation_time_offset; - - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t reserved : 29; - } flags; - - ETHERNET_SETTINGS ethernet; - ETHERNET_SETTINGS2 ethernet2; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - uint16_t network_enabled_on_boot; - - SWILBridgeConfig wil_config; -} SRADBMSSettings; - -typedef struct _GLOBAL_SETTINGS -{ - uint16_t version; - uint16_t len; - uint16_t chksum; - union - { - SRedSettings red; - SFireSettings fire; - SFireVnetSettings firevnet; - SCyanSettings cyan; - SVCAN3Settings vcan3; - SVCAN4Settings vcan4; - SECUSettings ecu; - SIEVBSettings ievb; - SPendantSettings pendant; - SRADGalaxySettings radgalaxy; - SRADStar2Settings radstar2; - SOBD2SimSettings neoobd2_sim; - SCmProbeSettings cmprobe; - SOBD2ProSettings obd2pro; - SVCAN412Settings vcan412; - SVCAN412Settings vcan4_12; - SECU_AVBSettings neoecu_avb; - SRADSuperMoonSettings radsupermoon; - SRADMoon2Settings radmoon2; - SRADPlutoSettings pluto; - SRADGigalogSettings radgigalog; - SCANHubSettings canhub; - SNeoECU12Settings neoecu12; - SVCANRFSettings vcanrf; - SEEVBSettings eevb; - SFlexVnetzSettings flexvnetz; - SVividCANSettings vividcan; - SVCAN4IndSettings vcan4_ind; - SRADGigastarSettings radgigastar; - SRADJupiterSettings jupiter; - SFire3Settings fire3; - SRadMoonDuoSettings radmoonduo; - SEtherBadgeSettings etherBadge; - SRADA2BSettings rad_a2b; - SRADEpsilonSettings epsilon; - SOBD2LCSettings obd2lc; - SRADBMSSettings rad_bms; - }; -} GLOBAL_SETTINGS; - -typedef enum _EDeviceSettingsType -{ - DeviceFireSettingsType, - DeviceFireVnetSettingsType, - DeviceFire2SettingsType, - DeviceVCAN3SettingsType, - DeviceRADGalaxySettingsType, - DeviceRADStar2SettingsType, - DeviceVCAN4SettingsType, - DeviceVCAN412SettingsType, - DeviceVividCANSettingsType, - DeviceECU_AVBSettingsType, - DeviceRADSuperMoonSettingsType, - DeviceRADMoon2SettingsType, - DeviceRADPlutoSettingsType, - DeviceRADGigalogSettingsType, - DeviceVCANRFSettingsType, - DeviceEEVBSettingsType, - DeviceVCAN4IndSettingsType, - DeviceNeoECU12SettingsType, - DeviceFlexVnetzSettingsType, - DeviceCANHUBSettingsType, - DeviceIEVBSettingsType, - DeviceOBD2SimSettingsType, - DeviceCMProbeSettingsType, - DeviceOBD2ProSettingsType, - DeviceRedSettingsType, - DeviceRADPlutoSwitchSettingsType, - DeviceRADGigastarSettingsType, - DeviceRADJupiterSettingsType, - DeviceFire3SettingsType, - DeviceRadMoonDuoSettingsType, - DeviceEtherBadgeSettingsType, - DeviceRADA2BSettingsType, - DeviceRADEpsilonSettingsType, - DeviceOBD2LCSettingsType, - DeviceRADBMSSettingsType, - - DeviceSettingsTypeMax, - DeviceSettingsNone = 0xFFFFFFFF -} EDeviceSettingsType; - -typedef struct _SDeviceSettings -{ - EDeviceSettingsType DeviceSettingType; - union - { - SRedSettings red; - SFireSettings fire; - SFireVnetSettings firevnet; - SCyanSettings cyan; - SVCAN3Settings vcan3; - SVCAN4Settings vcan4; - SECUSettings ecu; - SIEVBSettings ievb; - SPendantSettings pendant; - SRADGalaxySettings radgalaxy; - SRADStar2Settings radstar2; - SOBD2SimSettings neoobd2_sim; - SCmProbeSettings cmprobe; - SOBD2ProSettings obd2pro; - SVCAN412Settings vcan412; - SVCAN412Settings vcan4_12; - SECU_AVBSettings neoecu_avb; - SRADSuperMoonSettings radsupermoon; - SRADMoon2Settings radmoon2; - SRADPlutoSettings pluto; - SPlutoSwitchSettings plutoswitch; - SRADGigalogSettings radgigalog; - SCANHubSettings canhub; - SNeoECU12Settings neoecu12; - SVCANRFSettings vcanrf; - SEEVBSettings eevb; - SFlexVnetzSettings flexvnetz; - SVividCANSettings vividcan; - SVCAN4IndSettings vcan4_ind; - SOBD2LCSettings obd2lc; - SRADGigastarSettings radgigastar; - SRADJupiterSettings jupiter; - SFire3Settings fire3; - SRadMoonDuoSettings radmoon_duo; - SEtherBadgeSettings etherBadge; - SRADA2BSettings rad_a2b; - SRADEpsilonSettings epsilon; - SRADBMSSettings rad_bms; - - } Settings; -} SDeviceSettings; - -typedef enum _EPlasmaIonVnetChannel_t -{ - PlasmaIonVnetChannelMain, - PlasmaIonVnetChannelA, - PlasmaIonVnetChannelB, - eSoftCore, - eFpgaStatusResp, -} EPlasmaIonVnetChannel_t; - -typedef struct _stCM_ISO157652_TxMessage -{ - uint16_t vs_netid; - - uint8_t padding; - - uint8_t tx_index; - - uint32_t id; - uint32_t fc_id; - uint32_t fc_id_mask; - - uint8_t stMin; - uint8_t blockSize; - uint8_t flowControlExtendedAddress; - uint8_t extendedAddress; - - uint16_t fs_timeout; - uint16_t fs_wait; - - uint8_t data[4 * 1024]; - - uint32_t num_bytes; - - union - { - struct - { - unsigned id_29_bit_enable : 1; - unsigned fc_id_29_bit_enable : 1; - unsigned ext_address_enable : 1; - unsigned fc_ext_address_enable : 1; - - unsigned overrideSTmin : 1; - unsigned overrideBlockSize : 1; - unsigned paddingEnable : 1; - unsigned iscanFD : 1; - unsigned isBRSEnabled : 1; - unsigned : 15; - unsigned tx_dl : 8; - }; - uint32_t flags; - }; -} stCM_ISO157652_TxMessage; - -typedef struct -{ - uint16_t vs_netid; - uint8_t padding; - - uint8_t tx_index; - - uint32_t id; - uint32_t fc_id; - uint32_t fc_id_mask; - - uint8_t stMin; - uint8_t blockSize; - - uint8_t flowControlExtendedAddress; - uint8_t extendedAddress; - - uint16_t fs_timeout; - uint16_t fs_wait; - - uint8_t* data; - uint32_t num_bytes; - - uint8_t tx_dl; - - union - { - struct - { - uint16_t id_29_bit_enable : 1; - uint16_t fc_id_29_bit_enable : 1; - uint16_t ext_address_enable : 1; - uint16_t fc_ext_address_enable : 1; - uint16_t overrideSTmin : 1; - uint16_t overrideBlockSize : 1; - uint16_t paddingEnable : 1; - uint16_t iscanFD : 1; - uint16_t isBRSEnabled : 1; - uint16_t : 7; - }; - uint16_t flags; - }; -} ISO15765_2015_TxMessage; - -typedef struct _stCM_ISO157652_RxMessage -{ - uint16_t vs_netid; - - uint8_t padding; - - uint32_t id; - uint32_t id_mask; - uint32_t fc_id; - - uint8_t flowControlExtendedAddress; - uint8_t extendedAddress; - - uint8_t blockSize; - uint8_t stMin; - - uint16_t cf_timeout; - - union - { - struct - { - unsigned id_29_bit_enable : 1; - unsigned fc_id_29_bit_enable : 1; - unsigned ext_address_enable : 1; - unsigned fc_ext_address_enable : 1; - unsigned enableFlowControlTransmission : 1; - unsigned paddingEnable : 1; - unsigned iscanFD : 1; - unsigned isBRSEnabled : 1; - }; - uint32_t flags; - }; - uint8_t reserved[16]; -} stCM_ISO157652_RxMessage; - -#pragma pack(pop) - -typedef struct -{ - uint32_t StatusValue; - uint32_t StatusMask; - uint32_t Status2Value; - uint32_t Status2Mask; - uint32_t Header; - uint32_t HeaderMask; - uint32_t MiscData; - uint32_t MiscDataMask; - uint32_t ByteDataMSB; - uint32_t ByteDataLSB; - uint32_t ByteDataMaskMSB; - uint32_t ByteDataMaskLSB; - uint32_t HeaderLength; - uint32_t ByteDataLength; - uint32_t NetworkID; - uint16_t FrameMaster; - uint8_t bUseArbIdRangeFilter; - uint8_t bStuff2; - uint32_t ExpectedLength; - uint32_t NodeID; -} spyFilterLong; - -typedef int16_t descIdType; - -typedef struct _icsSpyMessage -{ - uint32_t StatusBitField; - uint32_t StatusBitField2; - uint32_t TimeHardware; - uint32_t TimeHardware2; - uint32_t TimeSystem; - uint32_t TimeSystem2; - uint8_t TimeStampHardwareID; - uint8_t TimeStampSystemID; - uint8_t NetworkID; - uint8_t NodeID; - uint8_t Protocol; - uint8_t MessagePieceID; - uint8_t ExtraDataPtrEnabled; - uint8_t NumberBytesHeader; - uint8_t NumberBytesData; - uint8_t NetworkID2; - descIdType DescriptionID; - uint32_t ArbIDOrHeader; - uint8_t Data[8]; - union - { - struct - { - uint32_t StatusBitField3; - uint32_t StatusBitField4; - }; - uint8_t AckBytes[8]; - }; - void* ExtraDataPtr; - uint8_t MiscData; - uint8_t Reserved[3]; -} icsSpyMessage; - -typedef struct _icsSpyMessageFlexRay -{ - uint32_t StatusBitField; - uint32_t StatusBitField2; - uint32_t TimeHardware; - uint32_t TimeHardware2; - uint32_t TimeSystem; - uint32_t TimeSystem2; - uint8_t TimeStampHardwareID; - uint8_t TimeStampSystemID; - uint8_t NetworkID; - uint8_t NodeID; - uint8_t Protocol; - uint8_t MessagePieceID; - uint8_t ExtraDataPtrEnabled; - uint8_t NumberBytesHeader; - uint8_t NumberBytesData; - uint8_t NetworkID2; - descIdType DescriptionID; - union - { - uint32_t ArbIDOrHeader; - struct - { - uint32_t id : 12; - uint32_t res1 : 4; - uint32_t cycle : 6; - uint32_t chA : 1; - uint32_t chB : 1; - uint32_t startup : 1; - uint32_t sync : 1; - uint32_t null_frame : 1; - uint32_t payload_preamble : 1; - uint32_t frame_reserved : 1; - uint32_t dynamic : 1; - }; - }; - uint8_t Data[8]; - union - { - struct - { - uint32_t StatusBitField3; - uint32_t StatusBitField4; - }; - uint8_t AckBytes[8]; - struct - { - uint32_t hcrc_msbs : 3; - uint32_t res2 : 5; - uint32_t hcrc_lsbs : 8; - uint32_t frame_len_12_5ns : 16; - uint32_t fcrc0 : 8; - uint32_t fcrc1 : 8; - uint32_t fcrc2 : 8; - uint32_t tss_len_12_5ns : 8; - }; - }; - void* ExtraDataPtr; - uint8_t MiscData; - uint8_t Reserved[3]; -} icsSpyMessageFlexRay; -typedef struct _icsSpyMessageLong -{ - uint32_t StatusBitField; - uint32_t StatusBitField2; - uint32_t TimeHardware; - uint32_t TimeHardware2; - uint32_t TimeSystem; - uint32_t TimeSystem2; - uint8_t TimeStampHardwareID; - uint8_t TimeStampSystemID; - uint8_t NetworkID; - uint8_t NodeID; - uint8_t Protocol; - uint8_t MessagePieceID; - uint8_t ExtraDataPtrEnabled; - uint8_t NumberBytesHeader; - uint8_t NumberBytesData; - uint8_t NetworkID2; - descIdType DescriptionID; - uint32_t ArbIDOrHeader; - uint32_t DataMsb; - uint32_t DataLsb; - union - { - struct - { - uint32_t StatusBitField3; - uint32_t StatusBitField4; - }; - uint8_t AckBytes[8]; - }; - void* ExtraDataPtr; - uint8_t MiscData; - uint8_t Reserved[3]; -} icsSpyMessageLong; - -typedef struct _icsSpyMessageJ1850 -{ - uint32_t StatusBitField; - uint32_t StatusBitField2; - uint32_t TimeHardware; - uint32_t TimeHardware2; - uint32_t TimeSystem; - uint32_t TimeSystem2; - uint8_t TimeStampHardwareID; - uint8_t TimeStampSystemID; - uint8_t NetworkID; - uint8_t NodeID; - uint8_t Protocol; - uint8_t MessagePieceID; - uint8_t ExtraDataPtrEnabled; - uint8_t NumberBytesHeader; - uint8_t NumberBytesData; - uint8_t NetworkID2; - descIdType DescriptionID; - uint8_t Header[4]; - uint8_t Data[8]; - union - { - struct - { - uint32_t StatusBitField3; - uint32_t StatusBitField4; - }; - uint8_t AckBytes[8]; - }; - void* ExtraDataPtr; - uint8_t MiscData; - uint8_t Reserved[3]; -} icsSpyMessageJ1850; - -typedef struct _icsSpyMessageVSB -{ - uint32_t StatusBitField; - uint32_t StatusBitField2; - uint32_t TimeHardware; - uint32_t TimeHardware2; - uint32_t TimeSystem; - uint32_t TimeSystem2; - uint8_t TimeStampHardwareID; - uint8_t TimeStampSystemID; - uint8_t NetworkID; - uint8_t NodeID; - uint8_t Protocol; - uint8_t MessagePieceID; - uint8_t ExtraDataPtrEnabled; - uint8_t NumberBytesHeader; - uint8_t NumberBytesData; - uint8_t NetworkID2; - int16_t DescriptionID; - uint32_t ArbIDOrHeader; - uint8_t Data[8]; - union - { - struct - { - uint32_t StatusBitField3; - uint32_t StatusBitField4; - }; - uint8_t AckBytes[8]; - }; - uint32_t ExtraDataPtr; - uint8_t MiscData; - uint8_t Reserved[3]; -} icsSpyMessageVSB; -#pragma pack(push) -#pragma pack(1) -typedef struct _ethernetNetworkStatus_t -{ - uint16_t networkId; - uint8_t linkStatus; - uint8_t linkFullDuplex; - uint8_t linkSpeed; - uint8_t linkMode; -} ethernetNetworkStatus_t; -#pragma pack(pop) - -typedef struct -{ - uint8_t backupPowerGood; - uint8_t backupPowerEnabled; - uint8_t usbHostPowerEnabled; - uint8_t ethernetActivationLineEnabled; - ethernetNetworkStatus_t ethernetStatus; -} icsFire2DeviceStatus; - -typedef struct -{ - uint8_t ethernetActivationLineEnabled; - ethernetNetworkStatus_t ethernetStatus; - uint8_t unused; -} icsFire2VnetDeviceStatus; - -typedef struct -{ - uint8_t ethernetActivationLineEnabled; - ethernetNetworkStatus_t ethernetStatus; - uint8_t unused; -} icsVcan4DeviceStatus; - -typedef struct -{ - uint8_t ethernetActivationLineEnabled; - ethernetNetworkStatus_t ethernetStatus; - uint8_t unused; -} icsFlexVnetzDeviceStatus; - -typedef struct -{ - uint8_t ethernetActivationLineEnabled; - ethernetNetworkStatus_t ethernetStatus; - uint8_t unused; -} icsFire3DeviceStatus; - -typedef struct -{ - ethernetNetworkStatus_t ethernetStatus[4]; -} icsRadMoonDuoDeviceStatus; - -typedef struct -{ - ethernetNetworkStatus_t ethernetStatus[8 - 1]; -} icsRadJupiterDeviceStatus; - -typedef struct -{ - ethernetNetworkStatus_t ethernetStatus; -} icsOBD2ProDeviceStatus; - -typedef struct -{ - ethernetNetworkStatus_t ethernetStatus[4]; -} icsRadPlutoDeviceStatus; - -typedef struct -{ - ethernetNetworkStatus_t ethernetStatus; -} icsVcan4IndustrialDeviceStatus; - -typedef struct -{ - ethernetNetworkStatus_t ethernetStatus; -} icsRadEpsilonDeviceStatus; - -typedef struct -{ - ethernetNetworkStatus_t ethernetStatus; -} icsRadBMSDeviceStatus; - -typedef union -{ - icsFire2DeviceStatus fire2Status; - icsVcan4DeviceStatus vcan4Status; - icsFlexVnetzDeviceStatus flexVnetzStatus; - icsFire3DeviceStatus fire3Status; - icsRadMoonDuoDeviceStatus radMoonDuoStatus; - icsRadJupiterDeviceStatus jupiterStatus; - icsOBD2ProDeviceStatus obd2proStatus; - icsRadPlutoDeviceStatus plutoStatus; - icsVcan4IndustrialDeviceStatus vcan4indStatus; - icsRadBMSDeviceStatus radBMSStatus; -} icsDeviceStatus; - -typedef struct -{ - char szName[128]; - char szDeviceName[64]; - unsigned long Status; - unsigned char bMAC_Address[6]; - unsigned char bIPV6_Address[16]; - unsigned char bIPV4_Address[4]; - unsigned long EthernetPinConfig; -} NDIS_ADAPTER_INFORMATION; - -typedef struct SPhyRegPktHdr -{ - uint16_t numEntries; - uint8_t version; - uint8_t entryBytes; -} PhyRegPktHdr_t; - -typedef struct SPhyRegPktClause22Mess -{ - uint8_t phyAddr; - uint8_t page; - uint16_t regAddr; - uint16_t regVal; -} PhyRegPktClause22Mess_t; - -typedef struct SPhyRegPktClause45Mess -{ - uint8_t port; - uint8_t device; - uint16_t regAddr; - uint16_t regVal; -} PhyRegPktClause45Mess_t; - -typedef enum SPhyRegPktStatus -{ - PHYREG_SUCCESS = 0, - PHYREG_FAILURE, - PHYREG_INVALID_MDIO_BUS_INDEX, - PHYREG_INVALID_PHY_ADDR, - PHYREG_RESERVED0, - PHYREG_RESERVED1, - PHYREG_RESERVED2, - PHYREG_RESERVED3 -} PhyRegPktStatus_t; - -typedef enum SPhyRegPktRw -{ - PHYREG_READ = 0, - PHYREG_WRITE, - PHYREG_BOTH -} PhyRegPktRw_t; - -typedef struct SPhyRegPkt -{ - union - { - struct - { - uint16_t Enabled : 1; - uint16_t WriteEnable : 1; - uint16_t Clause45Enable : 1; - uint16_t status : 2; - uint16_t reserved : 3; - uint16_t BusIndex : 4; - uint16_t version : 4; - }; - uint16_t flags; - }; - - union - { - PhyRegPktClause22Mess_t clause22; - PhyRegPktClause45Mess_t clause45; - }; -} PhyRegPkt_t; -enum -{ - assert_line_4600 = 1 / (int)(!!(sizeof(CAN_SETTINGS) == 12)) -}; -; -enum -{ - assert_line_4601 = 1 / (int)(!!(sizeof(CANFD_SETTINGS) == 10)) -}; -; -enum -{ - assert_line_4602 = 1 / (int)(!!(sizeof(SWCAN_SETTINGS) == 14)) -}; -; -enum -{ - assert_line_4603 = 1 / (int)(!!(sizeof(LIN_SETTINGS) == 10)) -}; -; -enum -{ - assert_line_4604 = 1 / (int)(!!(sizeof(ISO9141_KEYWORD2000__INIT_STEP) == 6)) -}; -; -enum -{ - assert_line_4605 = 1 / (int)(!!(sizeof(ISO9141_KEYWORD2000_SETTINGS) == 114)) -}; -; -enum -{ - assert_line_4606 = 1 / (int)(!!(sizeof(UART_SETTINGS) == 16)) -}; -; -enum -{ - assert_line_4607 = 1 / (int)(!!(sizeof(J1708_SETTINGS) == 2)) -}; -; -enum -{ - assert_line_4608 = 1 / (int)(!!(sizeof(SRedSettings) == 44)) -}; -; -enum -{ - assert_line_4609 = 1 / (int)(!!(sizeof(STextAPISettings) == 72)) -}; -; -enum -{ - assert_line_4610 = 1 / (int)(!!(sizeof(stChipVersions) == 8)) -}; -; -enum -{ - assert_line_4611 = 1 / (int)(!!(sizeof(SNeoMostGatewaySettings) == 4)) -}; -; -enum -{ - assert_line_4612 = 1 / (int)(!!(sizeof(OP_ETH_GENERAL_SETTINGS) == 20)) -}; -; -enum -{ - assert_line_4613 = 1 / (int)(!!(sizeof(OP_ETH_SETTINGS) == 16)) -}; -; -enum -{ - assert_line_4614 = 1 / (int)(!!(sizeof(ETHERNET_SETTINGS) == 8)) -}; -; -enum -{ - assert_line_4615 = 1 / (int)(!!(sizeof(ETHERNET_SETTINGS2) == 16)) -}; -; -enum -{ - assert_line_4616 = 1 / (int)(!!(sizeof(ETHERNET10G_SETTINGS) == 24)) -}; -; -enum -{ - assert_line_4617 = 1 / (int)(!!(sizeof(LOGGER_SETTINGS) == 4)) -}; -; -enum -{ - assert_line_4618 = 1 / (int)(!!(sizeof(DISK_SETTINGS) == 14)) -}; -; -enum -{ - assert_line_4619 = 1 / (int)(!!(sizeof(SERDESCAM_SETTINGS) == 32)) -}; -; -enum -{ - assert_line_4620 = 1 / (int)(!!(sizeof(SERDESPOC_SETTINGS) == 10)) -}; -; -enum -{ - assert_line_4621 = 1 / (int)(!!(sizeof(SERDESGEN_SETTINGS) == 32)) -}; -; -enum -{ - assert_line_4622 = 1 / (int)(!!(sizeof(RAD_REPORTING_SETTINGS) == 16)) -}; -; -enum -{ - assert_line_4623 = 1 / (int)(!!(sizeof(CANTERM_SETTINGS) == 6)) -}; -; -enum -{ - assert_line_4624 = 1 / (int)(!!(sizeof(SFireSettings) == 744)) -}; -; -enum -{ - assert_line_4625 = 1 / (int)(!!(sizeof(SFireVnetSettings) == 792)) -}; -; -enum -{ - assert_line_4626 = 1 / (int)(!!(sizeof(SCyanSettings) == 936)) -}; -; -enum -{ - assert_line_4627 = 1 / (int)(!!(sizeof(SVCAN3Settings) == 40)) -}; -; -enum -{ - assert_line_4628 = 1 / (int)(!!(sizeof(SVCAN4Settings) == 342)) -}; -; -enum -{ - assert_line_4629 = 1 / (int)(!!(sizeof(SVCANRFSettings) == 340)) -}; -; -enum -{ - assert_line_4630 = 1 / (int)(!!(sizeof(SECUSettings) == 470)) -}; -; -enum -{ - assert_line_4631 = 1 / (int)(!!(sizeof(SPendantSettings) == 470)) -}; -; -enum -{ - assert_line_4632 = 1 / (int)(!!(sizeof(SIEVBSettings) == 434)) -}; -; -enum -{ - assert_line_4633 = 1 / (int)(!!(sizeof(SEEVBSettings) == 32)) -}; -; -enum -{ - assert_line_4634 = 1 / (int)(!!(sizeof(SRADGalaxySettings) == 768)) -}; -; -enum -{ - assert_line_4635 = 1 / (int)(!!(sizeof(SRADStar2Settings) == 414)) -}; -; -enum -{ - assert_line_4636 = 1 / (int)(!!(sizeof(SOBD2SimSettings) == 148)) -}; -enum -{ - assert_line_4637 = 1 / (int)(!!(sizeof(CmProbeSettings) == 4)) -}; -; -enum -{ - assert_line_4638 = 1 / (int)(!!(sizeof(GLOBAL_SETTINGS) == (936 + 6))) -}; -; -enum -{ - assert_line_4639 = 1 / (int)(!!(sizeof(stCM_ISO157652_TxMessage) == 4128)) -}; -; -enum -{ - assert_line_4640 = 1 / (int)(!!(sizeof(stCM_ISO157652_RxMessage) == 42)) -}; -; -enum -{ - assert_line_4641 = 1 / (int)(!!(sizeof(spyFilterLong) == 72)) -}; -; -enum -{ - assert_line_4642 = 1 / (int)(!!(sizeof(icsSpyMessage) == 72)) -}; -; -enum -{ - assert_line_4643 = 1 / (int)(!!(sizeof(icsSpyMessageLong) == 72)) -}; -; -enum -{ - assert_line_4644 = 1 / (int)(!!(sizeof(icsSpyMessageJ1850) == 72)) -}; -; -enum -{ - assert_line_4645 = 1 / (int)(!!(sizeof(icsSpyMessageVSB) == 64)) -}; -; -enum -{ - assert_line_4646 = 1 / (int)(!!(sizeof(OBD2ProSettings) == 482)) -}; -; -enum -{ - assert_line_4647 = 1 / (int)(!!(sizeof(ISO15765_2015_TxMessage) == (32 + sizeof(uint8_t*)))) -}; -; -enum -{ - assert_line_4648 = 1 / (int)(!!(sizeof(TIMESYNC_ICSHARDWARE_SETTINGS) == 4)) -}; -; -enum -{ - assert_line_4649 = 1 / (int)(!!(sizeof(SRADSuperMoonSettings) == 178)) -}; -; -enum -{ - assert_line_4650 = 1 / (int)(!!(sizeof(SRADMoon2Settings) == 162)) -}; -; -enum -{ - assert_line_4651 = 1 / (int)(!!(sizeof(SRADGigalogSettings) == 698)) -}; -; -enum -{ - assert_line_4652 = 1 / (int)(!!(sizeof(SRADGigastarSettings) == 702)) -}; -; -enum -{ - assert_line_4653 = 1 / (int)(!!(sizeof(SExtSubCmdHdr) == 4)) -}; -; -enum -{ - assert_line_4654 = 1 / (int)(!!(sizeof(SDiskStructure) == 16)) -}; -; -enum -{ - assert_line_4655 = 1 / (int)(!!(sizeof(SDiskFormatProgress) == 10)) -}; -; -enum -{ - assert_line_4656 = 1 / (int)(!!(sizeof(SDiskStatus) == 14)) -}; -; -enum -{ - assert_line_4657 = 1 / (int)(!!(sizeof(SExtSubCmdComm) == 262)) -}; -; -enum -{ - assert_line_4658 = 1 / (int)(!!(sizeof(SRADPlutoSettings) == 348)) -}; -; -enum -{ - assert_line_4659 = 1 / (int)(!!(sizeof(CANHubSettings) == 56)) -}; -; -enum -{ - assert_line_4660 = 1 / (int)(!!(sizeof(SNeoECU12Settings) == 358)) -}; -; -enum -{ - assert_line_4661 = 1 / (int)(!!(sizeof(SPlutoSwitchSettings) == 50378)) -}; -; -enum -{ - assert_line_4662 = 1 / (int)(!!(sizeof(VCAN4IndSettings) == (228))) -}; -; -enum -{ - assert_line_4663 = 1 / (int)(!!(sizeof(SRADJupiterSettings) == 348)) -}; -; -enum -{ - assert_line_4664 = 1 / (int)(!!(sizeof(RadMoonDuoSettings) == 38)) -}; -; -enum -{ - assert_line_4665 = 1 / (int)(!!(sizeof(SFire3Settings) == (632))) -}; -; -enum -{ - assert_line_4666 = 1 / (int)(!!(sizeof(SEtherBadgeSettings) == 316)) -}; -; -enum -{ - assert_line_4667 = 1 / (int)(!!(sizeof(SRADA2BSettings) == 280)) -}; -; -enum -{ - assert_line_4668 = 1 / (int)(!!(sizeof(A2BMonitorSettings) == 20)) -}; -; -enum -{ - assert_line_4669 = 1 / (int)(!!(sizeof(SRADEpsilonSettings) == 384)) -}; -; -enum -{ - assert_line_4670 = 1 / (int)(!!(sizeof(RAD_GPTP_SETTINGS) == 36)) -}; -; -enum -{ - assert_line_4671 = 1 / (int)(!!(sizeof(SRADBMSSettings) == 108)) -}; -; diff --git a/icsnVC40_processed.h.enums.json b/icsnVC40_processed.h.enums.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/icsnVC40_processed.h.enums.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/include/defines.h b/include/defines.h index f15dc95b3..171254f6d 100644 --- a/include/defines.h +++ b/include/defines.h @@ -4,8 +4,9 @@ #define MODULE_NAME "ics.ics" #define MODULE_DESCRIPTION "Copyright Intrepid Control Systems, Inc." -#define VSPY3_BUILD_VERSION 901 +#define MIN_BASE36_SERIAL (16796160) +#define MAX_SERIAL (2176782335) // https://bugs.python.org/issue28769 // 2.x = char* PyString_AsString(return_value); @@ -22,10 +23,11 @@ #endif #ifdef _cplusplus -extern "C" { +extern "C" +{ #endif -int setup_module_defines(PyObject* module); + int setup_module_defines(PyObject* module); #ifdef _cplusplus } diff --git a/include/dll.h b/include/dll.h index 85b544028..f7c39b65c 100644 --- a/include/dll.h +++ b/include/dll.h @@ -1,24 +1,27 @@ #ifndef _DLL_H_ #define _DLL_H_ +#ifdef _MSC_VER +#pragma warning(disable : 4290) +#endif +#include -#pragma warning( disable : 4290 ) -#include "ice/ice_library.h" -#include "ice/ice_exception.h" -#include "ice/ice_function.h" -#pragma warning( default : 4290 ) +#ifdef _MSC_VER +#pragma warning(default : 4290) +#endif #ifdef _cplusplus -extern "C" { +extern "C" +{ #endif -bool dll_initialize(char* name=NULL); -bool dll_is_initialized(void); -void dll_uninitialize(void); -bool dll_reinitialize(char* name=NULL); -char* dll_get_error(char* error_msg); -ice::Library* dll_get_library(void); + bool dll_initialize(char* name = NULL); + bool dll_is_initialized(void); + void dll_uninitialize(void); + bool dll_reinitialize(char* name = NULL); + char* dll_get_error(char* error_msg); + ice::Library* dll_get_library(void); #ifdef _cplusplus } diff --git a/include/exceptions.h b/include/exceptions.h index 36660fdfc..cacf98e16 100644 --- a/include/exceptions.h +++ b/include/exceptions.h @@ -3,18 +3,16 @@ #include #ifdef _cplusplus -extern "C" { +extern "C" +{ #endif -int initialize_exceptions(PyObject* module); -PyObject* _set_ics_exception(PyObject* exception, char* msg, const char* func_name); + int initialize_exceptions(PyObject* module); + PyObject* _set_ics_exception(PyObject* exception, const char* msg, const char* func_name); #define set_ics_exception(exception, msg) _set_ics_exception(exception, msg, __FUNCTION__); -PyObject* _set_ics_exception_dev(PyObject* exception, PyObject* obj, char* msg, const char* func_name); -#define set_ics_exception_dev(exception, obj, msg) _set_ics_exception_dev(exception, obj, msg, __FUNCTION__); - -PyObject* exception_argument_error(void); -PyObject* exception_runtime_error(void); + PyObject* exception_argument_error(void); + PyObject* exception_runtime_error(void); #ifdef _cplusplus } diff --git a/include/ice/ice.h b/include/ice/ice.h deleted file mode 100644 index 101448dd4..000000000 --- a/include/ice/ice.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __ICE_H__ -#define __ICE_H__ - -#include "ice_exception.h" -#include "ice_function.h" -#include "ice_library.h" -#include "ice_library_manager.h" - -#endif // __ICE_H__ \ No newline at end of file diff --git a/include/ice/ice_exception.h b/include/ice/ice_exception.h deleted file mode 100644 index 170c825a5..000000000 --- a/include/ice/ice_exception.h +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Ice multiplatform dynamic library loader. - * - * @copyright 2011 David Rebbe - */ - -#ifndef __ICE_EXCEPTION_H__ -#define __ICE_EXCEPTION_H__ - -#include -#include - -namespace ice -{ -class Exception; -}; - -class ice::Exception : std::exception -{ - const std::string m_msg; -public: - Exception(const std::string msg) - : m_msg(msg) {} - ~Exception() throw() {} - const char* what() const throw() - { return this->m_msg.c_str(); } - std::string const whatString() const - { return this->m_msg; } -}; - -#endif // ice_exception.h diff --git a/include/ice/ice_function.h b/include/ice/ice_function.h deleted file mode 100644 index a649e249d..000000000 --- a/include/ice/ice_function.h +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Ice multiplatform dynamic library loader. - * - * @copyright 2011 David Rebbe - */ - -#ifndef __ICE_FUNCTIONS_H__ -#define __ICE_FUNCTIONS_H__ - -#include "ice_library.h" -#include "ice_exception.h" -#include -#include - -namespace ice -{ -template -class Function; -} - -template -class ice::Function -{ - ice::Library* m_lib; - -public: - Function(ice::Library* library, std::string name) - : m_name(name) - { - m_lib = library; - if (library == NULL) - { - std::stringstream ss; - ss << "Library is NULL, can't call function: '" << - name << "'"; - throw ice::Exception(ss.str()); - } -#if (defined(_WIN32) || defined(__WIN32__)) - m_func = reinterpret_cast( - GetProcAddress(library->_library(), name.c_str())); - if (m_func == NULL) - { - std::stringstream err; - err << "Failed to Retrieve address of function '" << name << - "': Windows Error #" << GetLastError() << " for library '" << - library->name() << "'"; - throw ice::Exception(err.str()); - } -#else - m_func = reinterpret_cast( - dlsym(library->_library(), name.c_str())); - if (m_func == NULL) - { - std::stringstream err; - err << "Failed to Retrieve address of function '" << name << - "': " << dlerror() << " for library '" << - library->name() << "'"; - throw ice::Exception(err.str()); - } -#endif - } - operator Signature *() const - { - if (m_func == NULL) - { - std::stringstream ss; - ss << "Function address '" << m_name + "' isn't resolved for library: '" << - m_lib->name() << "'"; - throw ice::Exception(ss.str()); - } - return m_func; - } - bool isValid() const { return m_func != NULL; } - std::string name() const { return m_name; } - -protected: - Signature* m_func; - const std::string m_name; -}; - -#endif // ice_function.h diff --git a/include/ice/ice_library.h b/include/ice/ice_library.h deleted file mode 100644 index dc5efb3df..000000000 --- a/include/ice/ice_library.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Ice multiplatform dynamic library loader. - * - * @copyright 2011 David Rebbe - */ - -#ifndef __ICE_LIBRARY_H__ -#define __ICE_LIBRARY_H__ - -#if (defined(_WIN32) || defined(__WIN32__)) -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#define VC_EXTRALEAN -#endif // WIN32_LEAN_AND_MEAN -#include -#else -#include -#define HMODULE void* -#endif - -#include - -namespace ice -{ -class Library; -}; - -class ice::Library -{ - HMODULE m_lib; - std::string m_name; - -public: - Library(std::string name); - ~Library(); - bool isLoaded() const; - std::string name() const { return m_name; } - - std::string getPath(bool* okay=NULL); - - HMODULE const& _library() const; -}; - -#endif // ice_library.h diff --git a/include/ice/ice_library_manager.h b/include/ice/ice_library_manager.h deleted file mode 100644 index 39230c68d..000000000 --- a/include/ice/ice_library_manager.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef __ICE_LIBRARY_MANAGER_H__ -#define __ICE_LIBRARY_MANAGER_H__ - -#include "ice_library.h" -#include -#include -#include - -namespace ice -{ - class LibraryManager; -}; - -class ice::LibraryManager -{ -public: - LibraryManager(); - ~LibraryManager(); - - void add(std::string name, std::string path); - void remove(std::string name); - void remove(ice::Library& library); - - std::vector getLibraryNames() const; - - ice::Library& operator[](std::string name); - -private: - typedef std::map Libraries; - Libraries m_libs; -}; - -#endif // __ICE_LIBRARY_MANAGER_H__ \ No newline at end of file diff --git a/include/ics/cicsSpyStatusBits.h b/include/ics/cicsSpyStatusBits.h new file mode 100644 index 000000000..53bcb8901 --- /dev/null +++ b/include/ics/cicsSpyStatusBits.h @@ -0,0 +1,249 @@ +// -------------------------------------------------------------------------- +// COPYRIGHT INTREPID CONTROL SYSTEMS, INC. (c) 1994-20xx +// Confidential and proprietary. This document and its contents are the +// property of Intrepid Control Systems, Inc. It is not to be copied, +// distributed, or otherwise disclosed or used without the prior written +// consent of Intrepid Control Systems Inc. +// All rights reserved. +// -------------------------------------------------------------------------- + +// SPY Status Bit Definitions +// Generated automatically - DO NOT MODIFY +// Modify cicsSpyStatusBits_config.yml and run cicsSpyStatusBits_gen.py +// Generated on: 2025-07-14 14:31:40 + + +#ifndef CICSSPYSTATUSBITS_H_ +#define CICSSPYSTATUSBITS_H_ 1 + +// WARNING: The following bit conflicts were detected: +// spystatus value 0x10000000: // VSI value 'SPY_STATUS_VSI_IFR_CRC_BIT' conflicts with common value 'SPY_STATUS_PDU' +// spystatus value 0x10000000: // A2B value 'SPY_STATUS_A2B_CONTROL' conflicts with common value 'SPY_STATUS_PDU' +// spystatus value 0x08: // A2B value 'SPY_STATUS_A2B_SCF_VALID_WAITING' conflicts with common value 'SPY_STATUS_REMOTE_FRAME' +// spystatus value 0x40000000: // A2B value 'SPY_STATUS_A2B_UPSTREAM' conflicts with common value 'SPY_STATUS_HIGH_SPEED' +// spystatus value 0x10000000: // FLEXRAY value 'SPY_STATUS_FLEXRAY_PDU' conflicts with common value 'SPY_STATUS_PDU' +// spystatus value 0x40000000: // FLEXRAY value 'SPY_STATUS_FLEXRAY_PDU_UPDATE_BIT_SET' conflicts with common value 'SPY_STATUS_HIGH_SPEED' +// spystatus value 0x08: // FLEXRAY value 'SPY_STATUS_FLEXRAY_PDU_NO_UPDATE_BIT' conflicts with common value 'SPY_STATUS_REMOTE_FRAME' + + +// Glyph definitions +// '|' - byte divider +// '.' - nibble divider +// '-' - unused bit +// 'o' - common bit +// 'x' - protocol specific bit +// '!' - conflict bit + +// SPYSTATUS bit definitions +// SPYSTATUS - Common bits +// |oo-o.oooo|oooo.oooo|oooo.oo-o|oo-o.oooo| +#define SPY_STATUS_GLOBAL_ERR 0x01 // Global error flag +#define SPY_STATUS_TX_MSG 0x02 // Transmitted message +#define SPY_STATUS_XTD_FRAME 0x04 // Extended frame +#define SPY_STATUS_REMOTE_FRAME 0x08 // Remote frame +#define SPY_STATUS_CRC_ERROR 0x10 // CRC error +#define SPY_STATUS_INCOMPLETE_FRAME 0x40 // Incomplete frame +#define SPY_STATUS_LOST_ARBITRATION 0x80 // Lost arbitration +#define SPY_STATUS_UNDEFINED_ERROR 0x0100 // Undefined error +#define SPY_STATUS_BUS_RECOVERED 0x0400 // Bus recovered +#define SPY_STATUS_BUS_SHORTED_PLUS 0x0800 // Bus shorted to plus +#define SPY_STATUS_BUS_SHORTED_GND 0x1000 // Bus shorted to ground +#define SPY_STATUS_CHECKSUM_ERROR 0x2000 // Checksum error +#define SPY_STATUS_BAD_MESSAGE_BIT_TIME_ERROR 0x4000 // Bad message bit time error +#define SPY_STATUS_TX_NOMATCH 0x8000 // TX no match +#define SPY_STATUS_COMM_IN_OVERFLOW 0x010000 // Communication input overflow +#define SPY_STATUS_EXPECTED_LEN_MISMATCH 0x020000 // Expected length mismatch +#define SPY_STATUS_MSG_NO_MATCH 0x040000 // Message no match +#define SPY_STATUS_BREAK 0x080000 // Break detected +#define SPY_STATUS_AVSI_REC_OVERFLOW 0x100000 // AVSI record overflow +#define SPY_STATUS_TEST_TRIGGER 0x200000 // Test trigger +#define SPY_STATUS_AUDIO_COMMENT 0x400000 // Audio comment +#define SPY_STATUS_GPS_DATA 0x800000 // GPS data +#define SPY_STATUS_ANALOG_DIGITAL_INPUT 0x01000000 // Analog digital input +#define SPY_STATUS_TEXT_COMMENT 0x02000000 // Text comment +#define SPY_STATUS_NETWORK_MESSAGE_TYPE 0x04000000 // Network message type +#define SPY_STATUS_VSI_TX_UNDERRUN 0x08000000 // VSI TX underrun +#define SPY_STATUS_PDU 0x10000000 // PDU message +#define SPY_STATUS_HIGH_SPEED 0x40000000 // High speed +#define SPY_STATUS_EXTENDED 0x80000000 // Extended - if this bit is set than decode StatusBitField3 in AckBytes + +// SPYSTATUS - A2B protocol bits +// |o!x!.oooo|oooo.oooo|oooo.oo-o|oo-o.!ooo| +#define SPY_STATUS_A2B_SCF_VALID_WAITING 0x08 // A2B SCF valid waiting +#define SPY_STATUS_A2B_CONTROL 0x10000000 // A2B control message +#define SPY_STATUS_A2B_MONITOR 0x20000000 // A2B monitor message +#define SPY_STATUS_A2B_UPSTREAM 0x40000000 // A2B upstream message + +// SPYSTATUS - CAN protocol bits +// |ooxo.oooo|oooo.oooo|oooo.ooxo|ooxo.oooo| +#define SPY_STATUS_CAN_ERROR_PASSIVE 0x20 // CAN error passive state +#define SPY_STATUS_CAN_BUS_OFF 0x0200 // CAN bus off state +#define SPY_STATUS_CANFD 0x20000000 // CAN FD frame + +// SPYSTATUS - ETHERNET protocol bits +// |oo-o.oooo|oooo.oooo|oooo.oo-o|ooxo.oooo| +#define SPY_STATUS_HEADERCRC_ERROR 0x20 // Header CRC error + +// SPYSTATUS - FLEXRAY protocol bits +// |o!-!.oooo|oooo.oooo|oooo.oo-o|oo-o.!ooo| +#define SPY_STATUS_FLEXRAY_PDU_NO_UPDATE_BIT 0x08 // FlexRay PDU no update bit +#define SPY_STATUS_FLEXRAY_PDU 0x10000000 // FlexRay PDU (alias for SPY_STATUS_PDU) +#define SPY_STATUS_FLEXRAY_PDU_UPDATE_BIT_SET 0x40000000 // FlexRay PDU update bit set + +// SPYSTATUS - LIN protocol bits +// |ooxo.oooo|oooo.oooo|oooo.oo-o|oo-o.oooo| +#define SPY_STATUS_LIN_MASTER 0x20000000 // LIN master message + +// SPYSTATUS - VSI protocol bits +// |oox!.oooo|oooo.oooo|oooo.oo-o|oo-o.oooo| +#define SPY_STATUS_VSI_IFR_CRC_BIT 0x10000000 // VSI IFR CRC bit +#define SPY_STATUS_INIT_MESSAGE 0x20000000 // Initialization message + + +// SPYSTATUS2 bit definitions +// SPYSTATUS2 - Common bits +// |----.----|---o.--oo|----.----|----.oooo| +#define SPY_STATUS2_HAS_VALUE 0x01 +#define SPY_STATUS2_VALUE_IS_BOOLEAN 0x02 +#define SPY_STATUS2_HIGH_VOLTAGE 0x04 +#define SPY_STATUS2_LONG_MESSAGE 0x08 +#define SPY_STATUS2_GLOBAL_CHANGE 0x010000 +#define SPY_STATUS2_ERROR_FRAME 0x020000 +#define SPY_STATUS2_END_OF_LONG_MESSAGE 0x100000 + +// SPYSTATUS2 - CAN protocol bits +// |----.----|-xxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_CAN_ISO15765_LOGICAL_FRAME 0x200000 +#define SPY_STATUS2_CAN_HAVE_LINK_DATA 0x400000 + +// SPYSTATUS2 - ETHERNET protocol bits +// |xxxx.xxxx|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_ETHERNET_CRC_ERROR 0x200000 +#define SPY_STATUS2_ETHERNET_FRAME_TOO_SHORT 0x400000 +#define SPY_STATUS2_ETHERNET_FCS_AVAILABLE 0x800000 // This frame contains FCS (4 bytes) obtained from ICS Ethernet hardware (ex. RAD-STAR) +#define SPY_STATUS2_ETHERNET_NO_PADDING 0x01000000 +#define SPY_STATUS2_ETHERNET_PREEMPTION_ENABLED 0x02000000 +#define SPY_STATUS2_ETHERNET_UPDATE_CHECKSUMS 0x04000000 +#define SPY_STATUS2_ETHERNET_MANUALFCS_ENABLED 0x08000000 +#define SPY_STATUS2_ETHERNET_FCS_VERIFIED 0x10000000 +#define SPY_STATUS2_ETHERNET_T1S_SYMBOL 0x20000000 +#define SPY_STATUS2_ETHERNET_T1S_BURST 0x40000000 +#define SPY_STATUS2_ETHERNET_T1S_ETHERNET 0x80000000 + +// SPYSTATUS2 - FLEXRAY protocol bits +// |----.-xxx|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_FLEXRAY_TX_AB 0x200000 +#define SPY_STATUS2_FLEXRAY_TX_AB_NO_A 0x400000 +#define SPY_STATUS2_FLEXRAY_TX_AB_NO_B 0x800000 +#define SPY_STATUS2_FLEXRAY_TX_AB_NO_MATCH 0x01000000 +#define SPY_STATUS2_FLEXRAY_NO_CRC 0x02000000 +#define SPY_STATUS2_FLEXRAY_NO_HEADERCRC 0x04000000 // + +// SPYSTATUS2 - I2C protocol bits +// |----.----|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_I2C_ERR_TIMEOUT 0x200000 +#define SPY_STATUS2_I2C_ERR_NACK 0x400000 +#define SPY_STATUS2_I2C_DIR_READ 0x800000 + +// SPYSTATUS2 - ISO protocol bits +// |-xxx.x---|---o.--oo|----.----|----.oooo| +#define SPY_STATUS2_ISO_FRAME_ERROR 0x08000000 // ISO frame error +#define SPY_STATUS2_ISO_OVERFLOW_ERROR 0x10000000 // ISO overflow error +#define SPY_STATUS2_ISO_PARITY_ERROR 0x20000000 // ISO parity error +#define SPY_STATUS2_ISO_RX_TIMEOUT_ERROR 0x40000000 // ISO specific timeout error + +// SPYSTATUS2 - LIN protocol bits +// |xxxx.xxxx|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_LIN_ERR_RX_BREAK_NOT_0 0x200000 // LIN RX break not 0 error +#define SPY_STATUS2_LIN_ERR_RX_BREAK_TOO_SHORT 0x400000 // LIN RX break too short error +#define SPY_STATUS2_LIN_ERR_RX_SYNC_NOT_55 0x800000 // LIN RX sync not 0x55 error +#define SPY_STATUS2_LIN_ERR_RX_DATA_GREATER_8 0x01000000 // LIN RX data greater than 8 bytes error +#define SPY_STATUS2_LIN_ERR_TX_RX_MISMATCH 0x02000000 // LIN TX/RX mismatch error +#define SPY_STATUS2_LIN_ERR_MSG_ID_PARITY 0x04000000 // LIN message ID parity error +#define SPY_STATUS2_LIN_SYNC_FRAME_ERROR 0x08000000 // LIN sync frame error +#define SPY_STATUS2_LIN_ID_FRAME_ERROR 0x10000000 // LIN ID frame error +#define SPY_STATUS2_LIN_SLAVE_BYTE_ERROR 0x20000000 // LIN slave byte error +#define SPY_STATUS2_LIN_RX_TIMEOUT_ERROR 0x40000000 // RX timeout error +#define SPY_STATUS2_LIN_NO_SLAVE_DATA 0x80000000 // LIN no slave data + +// SPYSTATUS2 - MDIO protocol bits +// |-xxx.xxxx|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_MDIO_ERR_TIMEOUT 0x200000 +#define SPY_STATUS2_MDIO_JOB_CANCELLED 0x400000 +#define SPY_STATUS2_MDIO_INVALID_BUS 0x800000 +#define SPY_STATUS2_MDIO_INVALID_PHYADDR 0x01000000 +#define SPY_STATUS2_MDIO_INVALID_REGADDR 0x02000000 +#define SPY_STATUS2_MDIO_UNSUPPORTED_CLAUSE 0x04000000 +#define SPY_STATUS2_MDIO_UNSUPPORTED_OPCODE 0x08000000 +#define SPY_STATUS2_MDIO_OVERFLOW 0x10000000 +#define SPY_STATUS2_MDIO_CLAUSE45 0x20000000 +#define SPY_STATUS2_MDIO_READ 0x40000000 + +// SPYSTATUS2 - MOST protocol bits +// |xxxx.xxxx|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_MOST_PACKET_DATA 0x200000 +#define SPY_STATUS2_MOST_STATUS 0x400000 // reflects changes in light/lock/MPR/SBC/etc... +#define SPY_STATUS2_MOST_LOW_LEVEL 0x800000 // MOST low level message, allocs, deallocs, remote requests...*/ +#define SPY_STATUS2_MOST_CONTROL_DATA 0x01000000 +#define SPY_STATUS2_MOST_MHP_USER_DATA 0x02000000 // MOST HIGH User Data Frame +#define SPY_STATUS2_MOST_MHP_CONTROL_DATA 0x04000000 // MOST HIGH Control Data +#define SPY_STATUS2_MOST_I2S_DUMP 0x08000000 +#define SPY_STATUS2_MOST_TOO_SHORT 0x10000000 +#define SPY_STATUS2_MOST_MOST50 0x20000000 // absence of MOST50 and MOST150 implies it's MOST25 +#define SPY_STATUS2_MOST_MOST150 0x40000000 +#define SPY_STATUS2_MOST_CHANGED_PAR 0x80000000 // first byte in ack reflects what changed. + +// SPYSTATUS2 - WBMS protocol bits +// |----.----|--xo.--oo|----.----|----.oooo| +#define SPY_STATUS2_WBMS_API_IS_CALLBACK 0x200000 + + +// SPYSTATUS3 bit definitions +// SPYSTATUS3 - CAN protocol bits +// |----.----|-xxx.xxxx|-xxx.xxxx|----.-xxx| +#define SPY_STATUS3_CAN_ERR_PASSIVE 0x01 // CAN error passive state: typically when error counter is > 127 +#define SPY_STATUS3_CAN_BUS_OFF 0x02 // CAN bus off state +#define SPY_STATUS3_CAN_ERR_WARNING 0x04 // CAN error warning: typically when error counter is > 96 +#define SPY_STATUS3_CAN_DATAERR_STUFF_ERROR 0x0100 // CAN stuff error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_FORM_ERROR 0x0200 // CAN form error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_ACK_ERROR 0x0400 // CAN ack error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_BIT1_ERROR 0x0800 // CAN bit1 error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_BIT0_ERROR 0x1000 // CAN bit0 error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_CRC_ERROR 0x2000 // CAN CRC error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_NOCHANGE 0x4000 // CAN data error occurred before and no change yet +#define SPY_STATUS3_CAN_GENERR_STUFF_ERROR 0x010000 // CAN stuff error at the general frame level +#define SPY_STATUS3_CAN_GENERR_FORM_ERROR 0x020000 // CAN form error at the general frame level +#define SPY_STATUS3_CAN_GENERR_ACK_ERROR 0x040000 // CAN ack error at the general frame level +#define SPY_STATUS3_CAN_GENERR_BIT1_ERROR 0x080000 // CAN bit1 error at the general frame level +#define SPY_STATUS3_CAN_GENERR_BIT0_ERROR 0x100000 // CAN bit0 error at the general frame level +#define SPY_STATUS3_CAN_GENERR_CRC_ERROR 0x200000 // CAN CRC error at the general frame level +#define SPY_STATUS3_CAN_GENERR_NOCHANGE 0x400000 // CAN frame Error occurred before and no change yet + +// SPYSTATUS3 - CANFD protocol bits +// |----.----|----.----|----.----|---x.xxxx| +#define SPY_STATUS3_CANFD_ESI 0x01 // CAN FD Error State Indicator (ESI) reflects the error state of the transmitting node +#define SPY_STATUS3_CANFD_IDE 0x02 // CAN FD Identifier Extension (IDE) indicates if standard or extended IDs are in use +#define SPY_STATUS3_CANFD_RTR 0x04 +#define SPY_STATUS3_CANFD_FDF 0x08 // CAN FD Format (FDF) flag -- distinguishes classic CAN from CANFD +#define SPY_STATUS3_CANFD_BRS 0x10 // CANFD Baud Rate Select (BRS) flag, indicates if the data portion transmits at a higher bitrate + +// SPYSTATUS3 - ETHERNET protocol bits +// |----.----|----.----|----.----|----.--xx| +#define SPY_STATUS3_ETHERNET_TX_COLLISION 0x01 +#define SPY_STATUS3_ETHERNET_T1S_WAKE 0x02 + +// SPYSTATUS3 - LIN protocol bits +// |----.----|----.----|----.----|----.-xxx| +#define SPY_STATUS3_LIN_JUST_BREAK_SYNC 0x01 +#define SPY_STATUS3_LIN_SLAVE_DATA_TOO_SHORT 0x02 +#define SPY_STATUS3_LIN_ONLY_UPDATE_SLAVE_TABLE_ONCE 0x04 + + +// SPYSTATUS4 bit definitions +// SPYSTATUS4 - ETHERNET protocol bits +// |----.----|----.----|----.----|----.--xx| +#define SPY_STATUS4_ETH_CRC_ERROR 0x01 // Ethernet CRC error +#define SPY_STATUS4_ETH_FRAME_TOO_LONG 0x02 // Ethernet frame too long + + +#endif // CICSSPYSTATUSBITS_H_ diff --git a/include/ics/icsnVC40.h b/include/ics/icsnVC40.h index 80ffea720..99fe25d43 100644 --- a/include/ics/icsnVC40.h +++ b/include/ics/icsnVC40.h @@ -41,7 +41,11 @@ typedef unsigned __int64 uint64_t; #include #endif +#include "cicsSpyStatusBits.h" +#if defined(_MSC_VER) +#pragma warning(disable : 4200) +#endif // MSVC++ 10.0 _MSC_VER == 1600 64-bit version doesn't allow multi-line #if directives... #if defined(_WIN64) || defined(__x86_64__) || defined(__aarch64__) || defined(__x86_64__) || defined(__LP64__) || defined(_M_AMD64) || \ @@ -49,6 +53,9 @@ typedef unsigned __int64 uint64_t; #define IS_64BIT_SYSTEM #endif +//deprecated old definition! Use either SPY_STATUS2_ISO_RX_TIMEOUT_ERROR or SPY_STATUS2_LIN_RX_TIMEOUT_ERROR! +#define SPY_STATUS2_RX_TIMEOUT_ERROR SPY_STATUS2_ISO_RX_TIMEOUT_ERROR + /* OpenPort "OpenType" Argument Constants -- deprecated, use OpenNeoDevice */ #define NEOVI_COMMTYPE_RS232 0 #define NEOVI_COMMTYPE_USB_BULK 1 @@ -58,7 +65,9 @@ typedef unsigned __int64 uint64_t; /* Network IDs -- value of NetworkID member of icsSpyMessage */ #define NETID_DEVICE 0 #define NETID_HSCAN 1 +#define NETID_DWCAN_01 (NETID_HSCAN) #define NETID_MSCAN 2 +#define NETID_DWCAN_08 (NETID_MSCAN) #define NETID_SWCAN 3 #define NETID_LSFTCAN 4 #define NETID_FORDSCP 5 @@ -74,13 +83,20 @@ typedef unsigned __int64 uint64_t; #define NETID_ISO14230 15 #define NETID_LIN 16 #define NETID_OP_ETHERNET1 17 +#define NETID_AE_01 (NETID_OP_ETHERNET1) #define NETID_OP_ETHERNET2 18 +#define NETID_AE_02 (NETID_OP_ETHERNET2) #define NETID_OP_ETHERNET3 19 +#define NETID_AE_03 (NETID_OP_ETHERNET3) #define NETID_ISO3 41 #define NETID_HSCAN2 42 +#define NETID_DWCAN_02 (NETID_HSCAN2) #define NETID_HSCAN3 44 +#define NETID_DWCAN_03 (NETID_HSCAN3) #define NETID_OP_ETHERNET4 45 +#define NETID_AE_04 (NETID_OP_ETHERNET4) #define NETID_OP_ETHERNET5 46 +#define NETID_AE_05 (NETID_OP_ETHERNET5) #define NETID_ISO4 47 #define NETID_LIN2 48 #define NETID_LIN3 49 @@ -96,7 +112,9 @@ typedef unsigned __int64 uint64_t; #define NETID_3G_LOGGING_OVERFLOW 59 #define NETID_3G_READ_SETTINGS_EX 60 #define NETID_HSCAN4 61 +#define NETID_DWCAN_04 (NETID_HSCAN4) #define NETID_HSCAN5 62 +#define NETID_DWCAN_05 (NETID_HSCAN5) #define NETID_RS232 63 #define NETID_UART 64 #define NETID_UART2 65 @@ -108,12 +126,18 @@ typedef unsigned __int64 uint64_t; #define NETID_TEXTAPI_TO_HOST 71 #define NETID_SPI1 72 #define NETID_OP_ETHERNET6 73 +#define NETID_AE_06 (NETID_OP_ETHERNET6) #define NETID_RED_VBAT 74 #define NETID_OP_ETHERNET7 75 +#define NETID_AE_07 (NETID_OP_ETHERNET7) #define NETID_OP_ETHERNET8 76 +#define NETID_AE_08 (NETID_OP_ETHERNET8) #define NETID_OP_ETHERNET9 77 +#define NETID_AE_09 (NETID_OP_ETHERNET9) #define NETID_OP_ETHERNET10 78 +#define NETID_AE_10 (NETID_OP_ETHERNET10) #define NETID_OP_ETHERNET11 79 +#define NETID_AE_11 (NETID_OP_ETHERNET11) #define NETID_FLEXRAY1A 80 #define NETID_FLEXRAY1B 81 #define NETID_FLEXRAY2A 82 @@ -122,6 +146,7 @@ typedef unsigned __int64 uint64_t; #define NETID_FLEXRAY 85 #define NETID_FLEXRAY2 86 #define NETID_OP_ETHERNET12 87 +#define NETID_AE_12 (NETID_OP_ETHERNET12) #define NETID_I2C1 88 #define NETID_MOST25 90 #define NETID_MOST50 91 @@ -130,7 +155,9 @@ typedef unsigned __int64 uint64_t; #define NETID_GMFSA 94 #define NETID_TCP 95 #define NETID_HSCAN6 96 +#define NETID_DWCAN_06 (NETID_HSCAN6) #define NETID_HSCAN7 97 +#define NETID_DWCAN_07 (NETID_HSCAN7) #define NETID_LIN6 98 #define NETID_LSFTCAN2 99 /** @@ -152,6 +179,50 @@ typedef unsigned __int64 uint64_t; #define NETID_ISM_LOGGER 525 #define NETID_CAN_SWITCH 526 +#define NETID_WBMS 532 +#define NETID_WBMS2 533 +#define NETID_DWCAN_09 534 +#define NETID_DWCAN_10 535 +#define NETID_DWCAN_11 536 +#define NETID_DWCAN_12 537 +#define NETID_DWCAN_13 538 +#define NETID_DWCAN_14 539 +#define NETID_DWCAN_15 540 +#define NETID_DWCAN_16 541 +#define NETID_LIN_07 542 +#define NETID_LIN_08 543 +#define NETID_SPI2 544 +#define NETID_MDIO_01 545 +#define NETID_MDIO_02 546 +#define NETID_MDIO_03 547 +#define NETID_MDIO_04 548 +#define NETID_MDIO_05 549 +#define NETID_MDIO_06 550 +#define NETID_MDIO_07 551 +#define NETID_MDIO_08 552 +#define NETID_OP_ETHERNET13 553 +#define NETID_AE_13 (NETID_OP_ETHERNET13) +#define NETID_OP_ETHERNET14 554 +#define NETID_AE_14 (NETID_OP_ETHERNET14) +#define NETID_OP_ETHERNET15 555 +#define NETID_AE_15 (NETID_OP_ETHERNET15) +#define NETID_OP_ETHERNET16 556 +#define NETID_AE_16 (NETID_OP_ETHERNET16) +#define NETID_SPI3 557 +#define NETID_SPI4 558 +#define NETID_SPI5 559 +#define NETID_SPI6 560 +#define NETID_SPI7 561 +#define NETID_SPI8 562 +#define NETID_LIN_09 563 +#define NETID_LIN_10 564 +#define NETID_LIN_11 565 +#define NETID_LIN_12 566 +#define NETID_LIN_13 567 +#define NETID_LIN_14 568 +#define NETID_LIN_15 569 +#define NETID_LIN_16 570 + /* Upper boundry of Network IDs */ #define NETID_MAX 100 #define NETID_INVALID 0xffff @@ -163,71 +234,84 @@ typedef unsigned __int64 uint64_t; */ //clang-format off #define NEODEVICE_UNKNOWN (0x00000000) -#define NEODEVICE_BLUE (0x00000001) -#define NEODEVICE_ECU_AVB (0x00000002) -#define NEODEVICE_RADSUPERMOON (0x00000003) -#define NEODEVICE_DW_VCAN (0x00000004) +#define NEODEVICE_BLUE_DEPRECATED (0x00000001) +#define NEODEVICE_ECU_AVB_DEPRECATED (0x00000002) +#define NEODEVICE_RADSUPERMOON_DEPRECATED (0x00000003) +#define NEODEVICE_DW_VCAN_DEPRECATED (0x00000004) #define NEODEVICE_RADMOON2 (0x00000005) -#define NEODEVICE_RADGIGALOG (0x00000006) /* AKA RADMARS */ +#define NEODEVICE_RADGIGALOG_DEPRECATED (0x00000006) /* AKA RADMARS */ #define NEODEVICE_VCAN41 (0x00000007) -#define NEODEVICE_FIRE (0x00000008) -#define NEODEVICE_RADPLUTO (0x00000009) +#define NEODEVICE_FIRE_DEPRECATED (0x00000008) +#define NEODEVICE_RADPLUTO_DEPRECATED (0x00000009) #define NEODEVICE_VCAN42_EL (0x0000000a) #define NEODEVICE_RADIO_CANHUB (0x0000000b) #define NEODEVICE_NEOECU12 (0x0000000c) #define NEODEVICE_OBD2_LC (0x0000000d) -#define NEODEVICE_RAD_MOON_DUO (0x0000000e) +#define NEODEVICE_RAD_MOON_DUO_DEPRECATED (0x0000000e) #define NEODEVICE_FIRE3 (0x0000000f) -#define NEODEVICE_VCAN3 (0x00000010) +#define NEODEVICE_VCAN3_DEPRECATED (0x00000010) #define NEODEVICE_RADJUPITER (0x00000011) #define NEODEVICE_VCAN4_IND (0x00000012) #define NEODEVICE_GIGASTAR (0x00000013) #define NEODEVICE_RED2 (0x00000014) -#define NEODEVICE_FIRE2_REDLINE (0x00000015) -#define NEODEVICE_ETHER_BADGE (0x00000016) +#define NEODEVICE_FIRE2_REDLINE_DEPRECATED (0x00000015) +#define NEODEVICE_ETHER_BADGE_DEPRECATED (0x00000016) #define NEODEVICE_RAD_A2B (0x00000017) #define NEODEVICE_RADEPSILON (0x00000018) -#define NEODEVICE_OBD2_SIM_DOIP (0x00000019) -#define NEODEVICE_OBD2_DEV (0x0000001a) -#define NEODEVICE_ECU22 (0x0000001b) +#define NEODEVICE_OBD2_SIM_DOIP_DEPRECATED (0x00000019) +#define NEODEVICE_OBD2_DEV_DEPRECATED (0x0000001a) +#define NEODEVICE_ECU22_DEPRECATED (0x0000001b) #define NEODEVICE_RADEPSILON_T (0x0000001c) #define NEODEVICE_RADEPSILON_EXPRESS (0x0000001d) #define NEODEVICE_RADPROXIMA (0x0000001e) -#define NEODEVICE_NEW_DEVICE_58 (0x0000001f) + // I'm not sure what was 0x20 anymore, but we'll skip it to be safe -#define NEODEVICE_NEW_DEVICE_59 (0x00000021) +#define NEODEVICE_RAD_GALAXY_2 (0x00000021) #define NEODEVICE_RAD_BMS (0x00000022) -#define NEODEVICE_RED (0x00000040) -#define NEODEVICE_ECU (0x00000080) -#define NEODEVICE_IEVB (0x00000100) -#define NEODEVICE_PENDANT (0x00000200) -#define NEODEVICE_OBD2_PRO (0x00000400) -#define NEODEVICE_ECUCHIP_UART (0x00000800) +#define NEODEVICE_RADMOON3 (0x00000023) +#define NEODEVICE_RADCOMET (0x00000024) +#define NEODEVICE_FIRE3_FLEXRAY (0x00000025) +#define NEODEVICE_NEOVI_CONNECT (0x00000026) +#define NEODEVICE_RADCOMET3 (0x00000027) +#define NEODEVICE_RADMOONT1S (0x00000028) +#define NEODEVICE_GIGASTAR2 (0x00000029) +#define NEODEVICE_FIRE3_T1S_LIN (0x0000002A) +#define NEODEVICE_FIRE3_T1S_SENT (0x0000002B) +#define NEODEVICE_RADGEMINI (0x0000002C) + +#define NEODEVICE_RED_DEPRECATED (0x00000040) +#define NEODEVICE_ECU_DEPRECATED (0x00000080) +#define NEODEVICE_IEVB_DEPRECATED (0x00000100) +#define NEODEVICE_PENDANT_DEPRECATED (0x00000200) +#define NEODEVICE_OBD2_PRO_DEPRECATED (0x00000400) +#define NEODEVICE_ECUCHIP_UART_DEPRECATED (0x00000800) #define NEODEVICE_PLASMA (0x00001000) -#define NEODEVICE_DONT_REUSE0 (0x00002000)//NEODEVICE_FIRE_VNET -#define NEODEVICE_NEOANALOG (0x00004000) -#define NEODEVICE_CT_OBD (0x00008000) -#define NEODEVICE_DONT_REUSE1 (0x00010000)//NEODEVICE_PLASMA_1_12 -#define NEODEVICE_DONT_REUSE2 (0x00020000)//NEODEVICE_PLASMA_1_13 +#define NEODEVICE_DONT_REUSE0 (0x00002000) //NEODEVICE_FIRE_VNET +#define NEODEVICE_NEOANALOG_DEPRECATED (0x00004000) +#define NEODEVICE_CT_OBD_DEPRECATED (0x00008000) +#define NEODEVICE_DONT_REUSE1 (0x00010000) //NEODEVICE_PLASMA_1_12 +#define NEODEVICE_DONT_REUSE2 (0x00020000) //NEODEVICE_PLASMA_1_13 #define NEODEVICE_ION (0x00040000) -#define NEODEVICE_RADSTAR (0x00080000) -#define NEODEVICE_DONT_REUSE3 (0x00100000)//NEODEVICE_ION3 +#define NEODEVICE_RADSTAR_DEPRECATED (0x00080000) +#define NEODEVICE_DONT_REUSE3 (0x00100000) //NEODEVICE_ION3 #define NEODEVICE_VCAN44 (0x00200000) #define NEODEVICE_VCAN42 (0x00400000) -#define NEODEVICE_CMPROBE (0x00800000) -#define NEODEVICE_EEVB (0x01000000) -#define NEODEVICE_VCANRF (0x02000000) +#define NEODEVICE_CMPROBE_DEPRECATED (0x00800000) +#define NEODEVICE_EEVB_DEPRECATED (0x01000000) +#define NEODEVICE_DONT_REUSE4 (0x02000000) #define NEODEVICE_FIRE2 (0x04000000) -#define NEODEVICE_FLEX (0x08000000) +#define NEODEVICE_FLEX_DEPRECATED (0x08000000) #define NEODEVICE_RADGALAXY (0x10000000) #define NEODEVICE_RADSTAR2 (0x20000000) #define NEODEVICE_VIVIDCAN (0x40000000) -#define NEODEVICE_OBD2_SIM (0x80000000) +#define NEODEVICE_OBD2_SIM_DEPRECATED (0x80000000) #define NEODEVICE_ANY_PLASMA (NEODEVICE_PLASMA) #define NEODEVICE_ANY_ION (NEODEVICE_ION) -#define NEODEVICE_NEOECUCHIP NEODEVICE_IEVB +#define NEODEVICE_NEOECUCHIP NEODEVICE_IEVB_DEPRECATED //clang-format on +#define DEVICECOUNT_FOR_EXPLORER (32) //this value will be checked by the NeoViExplorer after #6453! + #define ISO15765_2_NETWORK_HSCAN 0x01 #define ISO15765_2_NETWORK_MSCAN 0x02 #define ISO15765_2_NETWORK_HSCAN2 0x04 @@ -253,7 +337,6 @@ typedef unsigned __int64 uint64_t; #define SCRIPT_LOCATION_FLASH_MEM 0 #define SCRIPT_LOCATION_INTERNAL_FLASH 2 #define SCRIPT_LOCATION_SDCARD 1 -#define SCRIPT_LOCATION_VCAN3_MEM 4 #define SCRIPT_LOCATION_EMMC 6 /* Protocols -- value of Protocol member of icsSpyMessage */ @@ -293,127 +376,8 @@ typedef unsigned __int64 uint64_t; #define SPY_PROTOCOL_UDP 33 #define SPY_PROTOCOL_AUTOSAR 34 #define SPY_PROTOCOL_A2B 35 - -/* Bitmasks for StatusBitField member of icsSpyMessage */ -#define SPY_STATUS_GLOBAL_ERR 0x01 -#define SPY_STATUS_TX_MSG 0x02 -#define SPY_STATUS_XTD_FRAME 0x04 -#define SPY_STATUS_REMOTE_FRAME 0x08 -#define SPY_STATUS_CRC_ERROR 0x10 -#define SPY_STATUS_CAN_ERROR_PASSIVE 0x20 -#define SPY_STATUS_HEADERCRC_ERROR 0x20 -#define SPY_STATUS_INCOMPLETE_FRAME 0x40 -#define SPY_STATUS_LOST_ARBITRATION 0x80 -#define SPY_STATUS_UNDEFINED_ERROR 0x100 -#define SPY_STATUS_CAN_BUS_OFF 0x200 -#define SPY_STATUS_BUS_RECOVERED 0x400 -#define SPY_STATUS_BUS_SHORTED_PLUS 0x800 -#define SPY_STATUS_BUS_SHORTED_GND 0x1000 -#define SPY_STATUS_CHECKSUM_ERROR 0x2000 -#define SPY_STATUS_BAD_MESSAGE_BIT_TIME_ERROR 0x4000 -#define SPY_STATUS_TX_NOMATCH 0x8000 -#define SPY_STATUS_COMM_IN_OVERFLOW 0x10000 -#define SPY_STATUS_EXPECTED_LEN_MISMATCH 0x20000 -#define SPY_STATUS_MSG_NO_MATCH 0x40000 -#define SPY_STATUS_BREAK 0x80000 -#define SPY_STATUS_AVSI_REC_OVERFLOW 0x100000 -#define SPY_STATUS_TEST_TRIGGER 0x200000 -#define SPY_STATUS_AUDIO_COMMENT 0x400000 -#define SPY_STATUS_GPS_DATA 0x800000 -#define SPY_STATUS_ANALOG_DIGITAL_INPUT 0x1000000 -#define SPY_STATUS_TEXT_COMMENT 0x2000000 -#define SPY_STATUS_NETWORK_MESSAGE_TYPE 0x4000000 -#define SPY_STATUS_VSI_TX_UNDERRUN 0x8000000 -#define SPY_STATUS_VSI_IFR_CRC_BIT 0x10000000 -#define SPY_STATUS_INIT_MESSAGE 0x20000000 -#define SPY_STATUS_LIN_MASTER 0x20000000 -#define SPY_STATUS_CANFD 0x20000000 -#define SPY_STATUS_A2B_CONTROL 0x80000 -#define SPY_STATUS_A2B_SCF_VALID_WAITING 0x08 -#define SPY_STATUS_A2B_MONITOR 0x20000000 -#define SPY_STATUS_A2B_UPSTREAM 0x40000000 -#define SPY_STATUS_PDU 0x10000000 -#define SPY_STATUS_FLEXRAY_PDU SPY_STATUS_PDU -#define SPY_STATUS_HIGH_SPEED 0x40000000 -#define SPY_STATUS_EXTENDED 0x80000000 /* if this bit is set than decode StatusBitField3 in AckBytes */ -#define SPY_STATUS_FLEXRAY_PDU_UPDATE_BIT_SET 0x40000000 -#define SPY_STATUS_FLEXRAY_PDU_NO_UPDATE_BIT 0x08 - -/* Bitmasks for StatusBitField2 member of icsSpyMessage */ -#define SPY_STATUS2_HAS_VALUE 0x1 -#define SPY_STATUS2_VALUE_IS_BOOLEAN 0x2 -#define SPY_STATUS2_HIGH_VOLTAGE 0x4 -#define SPY_STATUS2_LONG_MESSAGE 0x8 -#define SPY_STATUS2_GLOBAL_CHANGE 0x10000 -#define SPY_STATUS2_ERROR_FRAME 0x20000 -#define SPY_STATUS2_END_OF_LONG_MESSAGE 0x100000 - -/* I2C Specific - check protocol before handling */ -#define SPY_STATUS2_I2C_ERR_TIMEOUT 0x200000 -#define SPY_STATUS2_I2C_ERR_NACK 0x400000 -#define SPY_STATUS2_I2C_DIR_READ 0x800000 - -/* LIN/ISO Specific - check protocol before handling */ -#define SPY_STATUS2_LIN_ERR_RX_BREAK_NOT_0 0x200000 -#define SPY_STATUS2_LIN_ERR_RX_BREAK_TOO_SHORT 0x400000 -#define SPY_STATUS2_LIN_ERR_RX_SYNC_NOT_55 0x800000 -#define SPY_STATUS2_LIN_ERR_RX_DATA_GREATER_8 0x1000000 -#define SPY_STATUS2_LIN_ERR_TX_RX_MISMATCH 0x2000000 -#define SPY_STATUS2_LIN_ERR_MSG_ID_PARITY 0x4000000 -#define SPY_STATUS2_ISO_FRAME_ERROR 0x8000000 -#define SPY_STATUS2_LIN_SYNC_FRAME_ERROR 0x8000000 -#define SPY_STATUS2_ISO_OVERFLOW_ERROR 0x10000000 -#define SPY_STATUS2_LIN_ID_FRAME_ERROR 0x10000000 -#define SPY_STATUS2_ISO_PARITY_ERROR 0x20000000 -#define SPY_STATUS2_LIN_SLAVE_BYTE_ERROR 0x20000000 -#define SPY_STATUS2_RX_TIMEOUT_ERROR 0x40000000 -#define SPY_STATUS2_LIN_NO_SLAVE_DATA 0x80000000 -#define SPY_STATUS3_LIN_JUST_BREAK_SYNC 0x1 -#define SPY_STATUS3_LIN_SLAVE_DATA_TOO_SHORT 0x2 -#define SPY_STATUS3_LIN_ONLY_UPDATE_SLAVE_TABLE_ONCE 0x4 - -/* MOST Specific - check protocol before handling */ -#define SPY_STATUS2_MOST_PACKET_DATA 0x200000 -#define SPY_STATUS2_MOST_STATUS 0x400000 /* reflects changes in light/lock/MPR/SBC/etc... */ -#define SPY_STATUS2_MOST_LOW_LEVEL 0x800000 /* MOST low level message, allocs, deallocs, remote requests...*/ -#define SPY_STATUS2_MOST_CONTROL_DATA 0x1000000 -#define SPY_STATUS2_MOST_MHP_USER_DATA 0x2000000 /* MOST HIGH User Data Frame */ -#define SPY_STATUS2_MOST_MHP_CONTROL_DATA 0x4000000 /* MOST HIGH Control Data */ -#define SPY_STATUS2_MOST_I2S_DUMP 0x8000000 -#define SPY_STATUS2_MOST_TOO_SHORT 0x10000000 -#define SPY_STATUS2_MOST_MOST50 0x20000000 /* absence of MOST50 and MOST150 implies it's MOST25 */ -#define SPY_STATUS2_MOST_MOST150 0x40000000 -#define SPY_STATUS2_MOST_CHANGED_PAR 0x80000000 /* first byte in ack reflects what changed. */ - -/* Ethernet Specific - check protocol before handling */ -#define SPY_STATUS2_ETHERNET_CRC_ERROR 0x200000 -#define SPY_STATUS2_ETHERNET_FRAME_TOO_SHORT 0x400000 -#define SPY_STATUS2_ETHERNET_FCS_AVAILABLE \ - 0x800000 /* This frame contains FCS (4 bytes) obtained from ICS Ethernet hardware (ex. RAD-STAR) */ -#define SPY_STATUS2_ETHERNET_NO_PADDING 0x1000000 -#define SPY_STATUS2_ETHERNET_PREEMPTION_ENABLED 0x2000000 -#define SPY_STATUS2_ETHERNET_UPDATE_CHECKSUMS 0x4000000 -#define SPY_STATUS2_ETHERNET_MANUALFCS_ENABLED 0x8000000 -#define SPY_STATUS2_ETHERNET_FCS_VERIFIED 0x10000000 - -/* FlexRay Specific - check protocol before handling */ -#define SPY_STATUS2_FLEXRAY_TX_AB 0x200000 -#define SPY_STATUS2_FLEXRAY_TX_AB_NO_A 0x400000 -#define SPY_STATUS2_FLEXRAY_TX_AB_NO_B 0x800000 -#define SPY_STATUS2_FLEXRAY_TX_AB_NO_MATCH 0x1000000 -#define SPY_STATUS2_FLEXRAY_NO_CRC 0x2000000 -#define SPY_STATUS2_FLEXRAY_NO_HEADERCRC 0x4000000 - -/* CAN/CAN-FD Specific - check protocol before handling */ -#define SPY_STATUS2_CAN_ISO15765_LOGICAL_FRAME 0x200000 -#define SPY_STATUS2_CAN_HAVE_LINK_DATA 0x400000 - -/* CAN-FD Specific - check protocol before handling */ -#define SPY_STATUS3_CANFD_ESI 0x01 -#define SPY_STATUS3_CANFD_IDE 0x02 -#define SPY_STATUS3_CANFD_RTR 0x04 -#define SPY_STATUS3_CANFD_FDF 0x08 -#define SPY_STATUS3_CANFD_BRS 0x10 +#define SPY_PROTOCOL_WBMS 36 +#define SPY_PROTOCOL_MDIO 37 /* Configuration Array constants */ /* HSCAN neoVI or ValueCAN */ @@ -465,6 +429,25 @@ typedef unsigned __int64 uint64_t; #define HARDWARE_TIMESTAMP_ID_NEORED_25NS (unsigned char)9 #define HARDWARE_TIMESTAMP_ID_NEORED_10NS (unsigned char)10 +//flag to indicate if the timestamp is a fixed value, or if it is a timestamp referenced to a network object +//if this flag is NOT set, then the TimeStampHardwareID is a 1-based index for GetHWAt(index) +//see CMessageTimeDecoder::GetSpyTimeType() +//see cicsSpyCE::GetSpyTimeType() +#define HADRWARE_TIMESTAMP_ID_FIXED 0x80 + +#define FIRE2_REPORT_PERIODIC (0x0001) +#define FIRE2_REPORT_EMISC1_DIGITAL (0x0002) +#define FIRE2_REPORT_EMISC2_DIGITAL (0x0004) +#define FIRE2_REPORT_MISC5_DIGITAL (0x0008) +#define FIRE2_REPORT_MISC6_DIGITAL (0x0010) +#define FIRE2_REPORT_EMISC1_ANALOG (0x0020) +#define FIRE2_REPORT_EMISC2_ANALOG (0x0040) +#define FIRE2_REPORT_VBATT_ANALOG (0x0080) +#define FIRE2_REPORT_TEMP_ANALOG (0x0100) +#define FIRE2_REPORT_PWM_IN (0x0200) +#define FIRE2_REPORT_GPS (0x0400) +#define FIRE3_REPORT_ORIENTATION (0x0800) + typedef struct SExtendedDataFlashHeader { uint16_t version; @@ -491,7 +474,7 @@ typedef struct _NeoDeviceEx #define CANNODE_STATUS_COREMINI_IS_RUNNING (0x1) #define CANNODE_STATUS_IN_BOOTLOADER (0x2) - uint32_t Status;// Bitfield, see defs above + uint32_t Status; // Bitfield, see defs above // Option bit flags #define MAIN_VNET (0x01) @@ -499,6 +482,11 @@ typedef struct _NeoDeviceEx #define SLAVE_VNET_B (0x04) #define WIFI_CONNECTION (0x08) #define REGISTER_BY_SERIAL (0x10) +#define TCP_SUPPORTED (0x20) +#define DRIVER_MASK (0xC0) +#define DRIVER_USB1 (0x40) +#define DRIVER_USB2 (0x80) +#define DRIVER_USB3 (0xC0) uint32_t Options; void* pAvailWIFINetwork; @@ -509,11 +497,15 @@ typedef struct _NeoDeviceEx uint8_t MACAddress[6]; uint16_t hardwareRev; uint16_t revReserved; - uint32_t Reserved[6];// may be expanded in future revisions + uint32_t ipAddress[4]; + uint16_t tcpPort; + uint16_t Reserved0; + uint32_t Reserved1; } NeoDeviceEx; -typedef union tagOptionsOpenNeoEx { +typedef union tagOptionsOpenNeoEx +{ struct { int32_t iNetworkID; /* Network ID indicating which CAN network to communicate over */ @@ -522,7 +514,8 @@ typedef union tagOptionsOpenNeoEx { uint32_t Reserved[16]; /* may be expanded in future revisions */ } OptionsOpenNeoEx, *POptionsOpenNeoEx; -typedef union tagOptionsFindNeoEx { +typedef union tagOptionsFindNeoEx +{ struct { int32_t iNetworkID; /* Network ID indicating which CAN network to communicate over */ @@ -538,6 +531,19 @@ typedef struct tagicsneoVICommand uint8_t Data[14]; } icsneoVICommand; +typedef enum +{ + PHY_88Q211x_Z1 = 0, + PHY_88Q211x_A0 = 1, + PHY_88Q211x_A1 = 2, + PHY_88Q211x_A2 = 3, + PHY_88Q222xM_A0 = 4, + PHY_88Q222xM_B0 = 5, + PHY_88Q222xM_B1 = 6, + PHY_88Q222xM_B2 = 7, + PHY_UNKNOWN = 255, +} PhyId; + #pragma pack(push, 1) typedef struct _stAPIFirmwareInfo @@ -578,6 +584,58 @@ typedef struct _stAPIFirmwareInfo /* Settings structures come are all packed to 2 bytes */ #pragma pack(push, 2) +/* Define number of CMP streams per device*/ +#define CMP_STREAMS_FIRE3 (10) +#define CMP_STREAMS_FIRE3FR (10) +#define CMP_STREAMS_FIRE3T1SLIN (10) +#define CMP_STREAMS_RED2 (10) +#define CMP_STREAMS_A2B (3) +#define CMP_STREAMS_GIGASTAR (10) +#define CMP_STREAMS_GIGASTAR2 (10) +#define CMP_STREAMS_COMET (10) +#define CMP_STREAMS_COMET3 (10) +#define CMP_STREAMS_GALAXY2 (10) + +/* CMP Network Enables */ +typedef struct +{ + union + { + uint8_t byte0; + struct + { + uint8_t bStreamEnabled : 1; + uint8_t EthModule : 2; + uint8_t bControlEnabled : 1; + uint8_t EthModule2 : 3; + uint8_t spare : 1; + }; + }; + uint8_t streamId; + uint8_t dstMac[6]; + union + { + uint64_t word; + struct + { + uint16_t network_enables; + uint16_t network_enables_2; + uint16_t network_enables_3; + uint16_t network_enables_4; + }; + } network_enables; + uint64_t network_enables_2; +} CMP_NETWORK_DATA; + +/* Global CMP Data */ +typedef struct +{ + uint8_t cmp_enabled : 1; + uint8_t sparebits : 7; + uint8_t spare; + uint16_t cmp_device_id; +} CMP_GLOBAL_DATA; + /* SetBaudrate in CAN_SETTINGS */ enum { @@ -630,7 +688,10 @@ typedef struct uint8_t TqSync; uint16_t BRP; uint8_t auto_baud; - uint8_t innerFrameDelay25us; + uint8_t innerFrameDelay25us : 4; + uint8_t : 1; + uint8_t disableRetransmission : 1; + uint8_t canClk : 2; } CAN_SETTINGS; #define CAN_SETTINGS_SIZE 12 @@ -756,7 +817,8 @@ typedef struct _UART_SETTINGS uint16_t stop_bits; uint8_t flow_control; /* 0- off, 1 - Simple CTS RTS */ uint8_t reserved_1; - union { + union + { uint32_t bOptions; struct { @@ -776,20 +838,12 @@ typedef struct } J1708_SETTINGS; #define J1708_SETTINGS_SIZE 2 -typedef struct _SRedSettings -{ - CAN_SETTINGS can1; - CAN_SETTINGS can2; - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; -} SRedSettings; -#define SRedSettings_SIZE 44 - typedef struct _STextAPISettings { uint32_t can1_tx_id; uint32_t can1_rx_id; - union { + union + { struct { unsigned bExtended : 1; @@ -799,7 +853,8 @@ typedef struct _STextAPISettings } can1_options; uint32_t can2_tx_id; uint32_t can2_rx_id; - union { + union + { struct { unsigned bExtended : 1; @@ -812,7 +867,8 @@ typedef struct _STextAPISettings uint32_t can3_tx_id; uint32_t can3_rx_id; - union { + union + { struct { unsigned bExtended : 1; @@ -823,7 +879,8 @@ typedef struct _STextAPISettings uint32_t can4_tx_id; uint32_t can4_rx_id; - union { + union + { struct { unsigned bExtended : 1; @@ -837,7 +894,8 @@ typedef struct _STextAPISettings } STextAPISettings; #define STextAPISettings_SIZE 72 -typedef union _stChipVersions { +typedef union _stChipVersions +{ struct { uint8_t mpic_maj; @@ -862,18 +920,6 @@ typedef union _stChipVersions { uint8_t hid_min; } plasma_fire_vnet; - struct - { - uint8_t mpic_maj; - uint8_t mpic_min; - } vcan3_versions; - - struct - { - uint8_t mpic_maj; - uint8_t mpic_min; - } vcanrf_versions; - struct { uint8_t zynq_core_major; @@ -896,22 +942,6 @@ typedef union _stChipVersions { uint8_t nrf52_min; } vividcan_versions; - struct - { - uint8_t zynq_core_major; - uint8_t zynq_core_minor; - } cmprobe_versions; - - struct - { - uint8_t mchip_major; - uint8_t mchip_minor; - uint8_t schip_major; - uint8_t schip_minor; - uint8_t core_major; - uint8_t core_minor; - } obd2pro_versions; - struct { uint8_t mchip_major; @@ -924,16 +954,6 @@ typedef union _stChipVersions { uint8_t mchip_minor; } vcan42_versions; struct - { - uint8_t mchip_major; - uint8_t mchip_minor; - } neoecu_avb_versions; - struct - { - uint8_t zynq_core_major; - uint8_t zynq_core_minor; - } radsupermoon_versions; - struct { uint8_t zynq_core_major; uint8_t zynq_core_minor; @@ -947,30 +967,26 @@ typedef union _stChipVersions { { uint8_t mchip_major; uint8_t mchip_minor; - } pluto_versions; - struct - { - uint8_t zynq_core_major; - uint8_t zynq_core_minor; - } radgigalog_versions; - + } radmoon3_versions; struct { - uint8_t zynq_core_major; - uint8_t zynq_core_minor; - } radgigalog3_versions; + uint8_t mchip_major; + uint8_t mchip_minor; + } radgemini_versions; struct { uint8_t zynq_core_major; uint8_t zynq_core_minor; + uint8_t usb_core_major; + uint8_t usb_core_minor; } radgigastar_versions; struct { uint8_t zynq_core_major; uint8_t zynq_core_minor; - } radgigastar_usbz_versions; + } radGalaxy2_versions; struct { @@ -991,39 +1007,89 @@ typedef union _stChipVersions { uint8_t zchip_minor; uint8_t schip_major; uint8_t schip_minor; + } red2_versions; + struct + { + uint8_t zchip_major; + uint8_t zchip_minor; + uint8_t schip_major; + uint8_t schip_minor; + uint8_t vem_z_major; + uint8_t vem_z_minor; } fire3_versions; + struct + { + uint8_t zchip_major; + uint8_t zchip_minor; + uint8_t schip_major; + uint8_t schip_minor; + uint8_t vem_z_major; + uint8_t vem_z_minor; + uint8_t vem_f_major; + uint8_t vem_f_minor; + } fire3_flexray_versions; struct { - uint8_t mchip_major; - uint8_t mchip_minor; - } rad_moon_duo_versions; + uint8_t zchip_major; + uint8_t zchip_minor; + uint8_t schip_major; + uint8_t schip_minor; + uint8_t vem_z_major; + uint8_t vem_z_minor; + } fire3_t1slin_versions; + + struct + { + uint8_t zynq_core_major; + uint8_t zynq_core_minor; + } rad_a2b_versions; struct { uint8_t mchip_major; uint8_t mchip_minor; - uint8_t schip_major; - uint8_t schip_minor; - } obd2dev_versions; + } epsilon_versions; struct { uint8_t mchip_major; uint8_t mchip_minor; - } ether_badge_versions; + uint8_t wil_major; + uint8_t wil_minor; + } rad_wbms_versions; struct { uint8_t zynq_core_major; uint8_t zynq_core_minor; - } rad_a2b_versions; + } rad_comet_versions; struct { - uint8_t mchip_major; - uint8_t mchip_minor; - } epsilon_versions; + uint8_t zynq_core_major; + uint8_t zynq_core_minor; + } rad_comet3_versions; + + struct + { + uint8_t zynq_core_major; + uint8_t zynq_core_minor; + uint8_t usb_core_major; + uint8_t usb_core_minor; + } radgigastar2_versions; + + struct + { + uint8_t zynq_core_major; + uint8_t zynq_core_minor; + } rad_moont1s_versions; + + struct + { + uint8_t zchip_major; + uint8_t zchip_minor; + } neovi_connect_versions; } stChipVersions; @@ -1051,14 +1117,30 @@ enum typedef struct OP_ETH_GENERAL_SETTINGS_t { uint8_t ucInterfaceType; - uint8_t reserved0[3]; + union + { + uint8_t tapPairOpt; + struct + { + uint8_t tap1ToVspy : 1; + uint8_t tap2ToVspy : 1; + uint8_t tap3ToVspy : 1; + uint8_t tap4ToVspy : 1; + uint8_t tap5ToVspy : 1; + uint8_t tap6ToVspy : 1; + uint8_t tap7ToVspy : 1; + uint8_t tap8ToVspy : 1; + }; + }; + uint8_t reserved0[2]; uint16_t tapPair0; uint16_t tapPair1; uint16_t tapPair2; uint16_t tapPair3; uint16_t tapPair4; uint16_t tapPair5; - union { + union + { struct { uint32_t bTapEnSwitch : 1; @@ -1074,11 +1156,11 @@ typedef struct OP_ETH_GENERAL_SETTINGS_t typedef struct SRAD_GPTP_SETTINGS_s { - uint32_t neighborPropDelayThresh;//ns - uint32_t sys_phc_sync_interval;//ns - int8_t logPDelayReqInterval;// log2ms - int8_t logSyncInterval;// log2ms - int8_t logAnnounceInterval;// log2ms + uint32_t neighborPropDelayThresh; //ns + uint32_t sys_phc_sync_interval; //ns + int8_t logPDelayReqInterval; // log2ms + int8_t logSyncInterval; // log2ms + int8_t logAnnounceInterval; // log2ms uint8_t profile; uint8_t priority1; uint8_t clockclass; @@ -1088,23 +1170,52 @@ typedef struct SRAD_GPTP_SETTINGS_s uint8_t gPTPportRole; uint8_t gptpEnabledPort; uint8_t enableClockSyntonization; - uint8_t rsvd[15]; + uint8_t rsvd_1; + uint8_t icsGptpDrvVerHeader; + union { + uint8_t icsGptpDrvVerMajorMinor; + struct { + uint8_t icsGptpDrvVerMajor:4; + uint8_t icsGptpDrvVerMinor:4; + }; + }; + union{ + uint32_t multiPortsEnabledForMaster; + struct { + uint32_t PORT_AE01:1; // this is LSB in Little Endian + uint32_t PORT_AE02:1; + uint32_t PORT_AE03:1; + uint32_t PORT_AE04:1; + uint32_t PORT_AE05:1; + uint32_t PORT_AE06:1; + uint32_t PORT_AE07:1; + uint32_t PORT_AE08:1; + uint32_t PORT_AE09:1; + uint32_t PORT_AE10:1; + uint32_t PORT_AE11:1; + uint32_t PORT_AE12:1; + + uint32_t PORT_ETH1:1; + uint32_t PORT_ETH2:1; + uint32_t PORT_ETH3:1; + + uint32_t PORT_AE13:1; + uint32_t PORT_AE14:1; + uint32_t PORT_AE15:1; + uint32_t PORT_AE16:1; + }; + }; + uint8_t rsvd_2[8]; } RAD_GPTP_SETTINGS; //36 Bytes #define RAD_GPTP_SETTINGS_SIZE 36 typedef struct SRAD_GPTP_AND_TAP_SETTINGS_s { RAD_GPTP_SETTINGS gPTP; - OP_ETH_GENERAL_SETTINGS tap; + OP_ETH_GENERAL_SETTINGS tap; } RAD_GPTP_AND_TAP_SETTINGS; #define RAD_GPTP_AND_TAP_SETTINGS_SIZE 40 -typedef struct HW_ETH_SETTINGS_t -{ - OP_ETH_GENERAL_SETTINGS General_Settings; -} HW_ETH_SETTINGS; -#define HW_ETH_SETTINGS_SIZE 20 - /* ucConfigMode in OP_ETH_SETTINGS */ typedef enum _opEthLinkMode { @@ -1122,20 +1233,29 @@ enum typedef struct OP_ETH_SETTINGS_t { uint8_t ucConfigMode; - unsigned char preemption_en; - union { + uint8_t preemption_en; + union + { struct { // Reuse the mac_addr for switch mode if required! - unsigned char mac_addr1[6];// Original Addr for spoofing - unsigned char mac_addr2[6];// Target Addr for spoofing - unsigned short mac_spoofing_en : 1; - unsigned short mac_spoofing_isDstOrSrc : 1; - unsigned short link_spd : 2; - unsigned short q2112_phy_mode : 1; - unsigned short reserved : 11; + uint8_t mac_addr1[6]; // Original Addr for spoofing + uint8_t mac_addr2[6]; // Target Addr for spoofing + uint16_t mac_spoofing_en : 1; + uint16_t mac_spoofing_isDstOrSrc : 1; + uint16_t link_spd : 2; + uint16_t q2112_phy_mode : 1; + uint16_t macsec_en : 1; // enable loading MACsec config on boot + uint16_t compliance_mode_en : 1; + uint16_t cut_thru_tap : 1; + uint16_t snf_tap : 1; // store and forward + uint16_t disable_tap_to_host : 1; + uint16_t show_tap_tx_receipt : 1; + uint16_t tap_dest : 2; + uint16_t tc10_tap : 1; + uint16_t reserved : 2; }; - unsigned char reserved0[14]; + uint8_t reserved0[14]; }; } OP_ETH_SETTINGS; #define OP_ETH_SETTINGS_SIZE 16 @@ -1151,72 +1271,434 @@ typedef struct ETHERNET_SETTINGS_t #define ETHERNET_SETTINGS_SIZE 8 -#define ETHERNET_SETTINGS2_FLAG_FULL_DUPLEX 0x01 -#define ETHERNET_SETTINGS2_FLAG_AUTO_NEG 0x02 +#define ETHERNET_SETTINGS2_FLAG_FULL_DUPLEX 0x01 +#define ETHERNET_SETTINGS2_FLAG_AUTO_NEG 0x02 #define ETHERNET_SETTINGS2_FLAG_TCPIP_ENABLE 0x04 -#define ETHERNET_SETTINGS2_FLAG_RTSP_ENABLE 0x08 -#define ETHERNET_SETTINGS2_FLAG_DEVICE_HOSTING_ENABLE 0x10 +#define ETHERNET_SETTINGS2_FLAG_RTSP_ENABLE 0x08 +#define ETHERNET_SETTINGS2_FLAG_DEVICE_HOSTING_ENABLE 0x10 #define ETHERNET_SETTINGS2_FLAG_CONFIG_NOT_ALLOWED 0x20 -#define ETHERNET_SETTINGS2_FLAG_COMM_IN_USE 0x80 +#define ETHERNET_SETTINGS2_FLAG_ICS_SFP 0x40 +#define ETHERNET_SETTINGS2_FLAG_COMM_IN_USE 0x80 + +#define ETHERNET_SETTINGS2_FLAG2_LINK_MODE 0x01 +#define ETHERNET_SETTINGS2_FLAG2_PHY_MODE 0x02 +#define ETHERNET_SETTINGS2_FLAG2_LINK_MODE_AUTO 0x04 +#define ETHERNET_SETTINGS2_FLAG2_IP_CONFIG_NOT_ALLOWED 0x08 +#define ETHERNET_SETTINGS2_FLAG2_SFP_ID_SHIFT 4 +#define ETHERNET_SETTINGS2_FLAG2_SFP_ID_MASK 0xF0 +#define ETHERNET_SETTINGS2_FLAG2_CUT_THRU_TAP_ENABLE 0x0100 +#define ETHERNET_SETTINGS2_FLAG2_SNF_TAP_ENABLE 0x0200 // store and forward +#define ETHERNET_SETTINGS2_FLAG2_DISABLE_TAP_TO_HOST 0x0400 +#define ETHERNET_SETTINGS2_FLAG2_SHOW_TAP_TX_RECEIPT 0x0800 +#define ETHERNET_SETTINGS2_FLAG2_TCP_COMM_STATIC_PORT_ENABLE 0x1000 +#define ETHERNET_SETTINGS2_FLAG2_TAP_DEST_SHIFT 13 +#define ETHERNET_SETTINGS2_FLAG2_TAP_DEST_MASK 0x3 +#define ETHERNET_SETTINGS2_FLAG2_TC10_FWD_TAP_ENABLE 0x8000 +#define ETHERNET_SETTINGS2_FLAG2_GET_TAP_DEST(s) \ + (((s)->flags2 >> ETHERNET_SETTINGS2_FLAG2_TAP_DEST_SHIFT) & ETHERNET_SETTINGS2_FLAG2_TAP_DEST_MASK) +#define ETHERNET_SETTINGS2_FLAG2_SET_TAP_DEST(s, d) \ + ((s)->flags2 |= ((d)ÐERNET_SETTINGS2_FLAG2_TAP_DEST_MASK) << ETHERNET_SETTINGS2_FLAG2_TAP_DEST_SHIFT) + +typedef enum +{ + SFP_ID_UNKNOWN = 0, + SFP_ID_FINISAR_FCLF8522P2BTL, + SFP_ID_FS_GB_GE_T, + SFP_ID_ICS_MV2112A2, + SFP_ID_ICS_MV2221MB1, + SFP_ID_ICS_MV3244, + SFP_ID_ICS_MC8670, + SFP_ID_ICS_EN11100, + SFP_ID_ICS_AD1101, + // add new entries here + SFP_ID_MAX, +} SfpId; typedef struct ETHERNET_SETTINGS2_t { - /* bit0: 0=half duplex, 1=full duplex + /* FLAGS + * bit0: 0=half duplex, 1=full duplex * bit1: auto negot * bit2: enable tcp/ip stack * bit3: enable rtsp server * bit4: enable intepid device hosting (go online and log other devices) * bit5: config not allowed + * bit6: ICS SFP detected + * bit7: comm in use */ uint8_t flags; - uint8_t link_speed;//0=10, 1=100, 2=1000 + uint8_t link_speed; // 0=10, 1=100, 2=1000 uint32_t ip_addr; uint32_t netmask; uint32_t gateway; - uint8_t rsvd[2]; + /* FLAGS2 + * bit0: Link mode - 0=master, 1=slave + * bit1: PHY mode - 0=IEEE, 1=legacy + * bit2: auto master/slave + * bit3: IP config not allowed + * bit4: SFP module ID0 + * bit5: SFP module ID1 + * bit6: SFP module ID2 + * bit7: SFP module ID3 + * bit8: cut through tap enabled (only TX forwarded from tap partner) + * bit9: store and forward tap enabled (forward RX to tap partner) + * bit10: disable tap frames to host + * bit11: show TX receipt for tap frames + * bit12: enable static port for TCP comm + */ + uint16_t flags2; } ETHERNET_SETTINGS2; #define ETHERNET_SETTINGS2_SIZE 16 -/* ETHERNET_SETTINGS2 link speed, duplex options */ -enum -{ - LINK_SPEED_AUTO_NEGOTIATION = 0, - LINK_SPEED_1GBPS_FULL_DUPLEX, - LINK_SPEED_1GBPS_HALF_DUPLEX, - LINK_SPEED_100MBPS_FULL_DUPLEX, - LINK_SPEED_100MBPS_HALF_DUPLEX, - LINK_SPEED_10MBPS_FULL_DUPLEX, - LINK_SPEED_10MBPS_HALF_DUPLEX, - // NOTE: new entries must be appended to maintain backwards compatibility - // insert new entries here - LINK_SPEED_COUNT, -}; - -#define ETHERNET_SETTINGS10G_FLAG_FULL_DUPLEX 0x01 -#define ETHERNET_SETTINGS10G_FLAG_AUTO_NEG 0x02 -#define ETHERNET_SETTINGS10G_FLAG_TCPIP_ENABLE 0x04 -#define ETHERNET_SETTINGS10G_FLAG_RTSP_ENABLE 0x08 -#define ETHERNET_SETTINGS10G_FLAG_DEVICE_HOSTING_ENABLE 0x10 -#define ETHERNET_SETTINGS10G_FLAG_COMM_IN_USE 0x80000000 +#define ETHERNET_SETTINGS10G_FLAG_FULL_DUPLEX 0x00000001 +#define ETHERNET_SETTINGS10G_FLAG_AUTO_NEG 0x00000002 +#define ETHERNET_SETTINGS10G_FLAG_TCPIP_ENABLE 0x00000004 +#define ETHERNET_SETTINGS10G_FLAG_RTSP_ENABLE 0x00000008 +#define ETHERNET_SETTINGS10G_FLAG_DEVICE_HOSTING_ENABLE 0x00000010 +#define ETHERNET_SETTINGS10G_FLAG_CONFIG_NOT_ALLOWED 0x00000020 +#define ETHERNET_SETTINGS10G_FLAG_ICS_SFP 0x00000040 +#define ETHERNET_SETTINGS10G_FLAG_LINK_MODE 0x00000080 +#define ETHERNET_SETTINGS10G_FLAG_PHY_MODE 0x00000100 +#define ETHERNET_SETTINGS10G_FLAG_LINK_MODE_AUTO 0x00000200 +#define ETHERNET_SETTINGS10G_FLAG_COMPL_MODE 0x00000400 +#define ETHERNET_SETTINGS10G_FLAG_PKT_CHECK 0x00000800 +#define ETHERNET_SETTINGS10G_FLAG_PKT_GEN 0x00001000 +#define ETHERNET_SETTINGS10G_FLAG_IP_CONFIG_NOT_ALLOWED 0x00002000 +#define ETHERNET_SETTINGS10G_FLAG_CUT_THRU_TAP_ENABLE 0x00004000 +#define ETHERNET_SETTINGS10G_FLAG_SNF_TAP_ENABLE 0x00008000 // store and forward +#define ETHERNET_SETTINGS10G_FLAG_DISABLE_TAP_TO_HOST 0x00010000 +#define ETHERNET_SETTINGS10G_FLAG_MACSEC_ENABLE 0x00020000 +#define ETHERNET_SETTINGS10G_FLAG_SHOW_TAP_TX_RECEIPT 0x00040000 +#define ETHERNET_SETTINGS10G_FLAG_TCP_COMM_STATIC_PORT_ENABLE 0x00080000 +#define ETHERNET_SETTINGS10G_FLAG_COMM_IN_USE 0x80000000 typedef struct ETHERNET10G_SETTINGS_t { - /* bit0: 0=half duplex, 1=full duplex + /* FLAGS + * bit0: 0=half duplex, 1=full duplex * bit1: auto negot * bit2: enable tcp/ip stack * bit3: enable rtsp server * bit4: enable intepid device hosting (go online and log other devices) + * bit5: config not allowed + * bit6: ICS SFP detected + * bit7: link mode - 0=master, 1=slave + * bit8: PHY mode - 0=IEEE, 1=legacy + * bit9: auto master/slave + * bit10: enable compliance test mode (device specific) + * bit11: enable packet checker + * bit12: enable packet generator + * bit13: IP config not allowed + * bit14: cut through tap enabled (only TX forwarded from tap partner) + * bit15: store and forward tap enabled (forward RX to tap partner) + * bit16: disable tap frames to host + * bit17: macsec enable + * bit18: show TX receipt for tap frames + * bit19: enable static port for TCP comm * bit31: comm in use */ uint32_t flags; uint32_t ip_addr; uint32_t netmask; uint32_t gateway; - uint8_t link_speed;//0=10, 1=100, 2=1000, 3=2500, 4=5000, 5=10000 - uint8_t rsvd2[7]; + uint8_t link_speed; //0=10, 1=100, 2=1000, 3=2500, 4=5000, 5=10000 + uint8_t compliance_mode; + uint8_t rsvd2[6]; } ETHERNET10G_SETTINGS; #define ETHERNET10G_SETTINGS_SIZE 24 +typedef struct ETHERNET10T1S_SETTINGS_t +{ + uint8_t max_burst_count; + uint8_t burst_timer; + uint8_t max_num_nodes; + uint8_t local_id; + uint8_t to_timer; + uint8_t flags; + uint8_t local_id_alternate; + struct + { + uint8_t pcp_thresh : 3; // >= pcp_thresh means high priority + uint8_t enable_high_priority : 1; + uint8_t : 4; + } vlan_cos; + uint8_t rsvd[4]; +} ETHERNET10T1S_SETTINGS; +#define ETHERNET10T1S_SETTINGS_SIZE 12 + +#define ETHERNET10T1S_SETTINGS_FLAG_ENABLE_PLCA 0x01 +#define ETHERNET10T1S_SETTINGS_FLAG_TERMINATION 0x02 +#define ETHERNET10T1S_SETTINGS_FLAG_BUS_DECODING_BEACONS 0x04 +#define ETHERNET10T1S_SETTINGS_FLAG_BUS_DECODING_ALL 0x08 +#define ETHERNET10T1S_SETTINGS_FLAG_ENABLE_PLCA_COL_DET 0x10 +#define ETHERNET10T1S_SETTINGS_FLAG_ENABLE_CSMA_FALLBACK 0x20 +#define ETHERNET10T1S_SETTINGS_FLAG_DISABLE_ALL_DECODING 0x40 + +typedef struct ETHERNET10T1S_SETTINGS_EXT_t +{ + uint8_t enable_multi_id; // Mask representing whether ID at corresponding bit enabled or not + uint8_t multi_id[7]; + uint8_t rsvd[8]; +} ETHERNET10T1S_SETTINGS_EXT; +#define ETHERNET10T1S_SETTINGS_EXT_SIZE 16 + +typedef struct ETHERNET10T1L_SETTINGS_t +{ + uint8_t tx_mode; + uint8_t rsvd[7]; +} ETHERNET10T1L_SETTINGS; +#define ETHERNET10T1L_SETTINGS_SIZE 8 + +/* + * START - MACsec Definitions + */ +/* MACsec Rule */ +/** + * @brief Structure of Vlan tag + * + */ +#pragma pack(push, 1) +typedef struct +{ + uint16_t VID; /*!< 12 bits */ + uint8_t PRI_CFI; /*!< PRI - 3 bits, CFI - 1bit */ +} MACSEC_VLANTAG_t; +/** + * @brief Structure of MPLS + * + */ +typedef struct +{ + uint32_t MPLS_label; /*!< 20 bits */ + uint8_t exp; /*!< 3 bits */ +} MACSEC_MPLS_OUTER_t; +/** + * @brief Define Encoded Packet Type from the parser + * + */ +typedef enum +{ + MACSEC_PACKET_NO_VLAN_OR_MPLS = 0, + MACSEC_PACKET_SINGLE_VLAN = 1, + MACSEC_PACKET_DUAL_VLAN = 2, + MACSEC_PACKET_MPLS = 3, + MACSEC_PACKET_SINGLE_VLAN_FOLLOW_BY_MPLS = 4, + MACSEC_PACKET_DUAL_VLAN_FOLLOW_BY_MPLS = 5, + MACSEC_PACKET_UNSUPPORTED_TYPE = 6 +} MACSEC_PACKET_TYPE; +#define MACSEC_SETTINGS_RULE_SIZE (88) +typedef union _MACSecRule +{ + struct + { + uint8_t index; + uint8_t key_MAC_DA[6]; /*!< MAC DA field extracted from the packet */ + uint8_t mask_MAC_DA[6]; /*!< Set bits to 1 to mask/exclude corresponding flowid_tcam_data bit from compare */ + uint8_t key_MAC_SA[6]; /*!< MAC SA field extracted from the packet */ + uint8_t mask_MAC_SA[6]; /*!< Set bits to 1 to mask/exclude corresponding flowid_tcam_data bit from compare */ + uint16_t key_Ethertype; /*!< First E-Type found in the packet that doesn't match one of the preconfigured custom tag. */ + uint16_t mask_Ethertype; /*!< Set bits to 1 to mask/exclude corresponding flowid_tcam_data bit from compare */ + MACSEC_VLANTAG_t key_vlantag_outer1; /*!< outermost/1st VLAN ID {8'd0, VLAN_ID[11:0]}, or 20-bit MPLS label. */ + MACSEC_MPLS_OUTER_t key_MPLS_outer1; + MACSEC_VLANTAG_t mask_vlantag_outer1; /*!< Set bits to 1 to mask/exclude corresponding flowid_tcam_data bit from compare */ + MACSEC_MPLS_OUTER_t mask_MPLS_outer1; + MACSEC_VLANTAG_t key_vlantag_outer2; /*!< 2nd outermost VLAN ID {8'd0, VLAN_ID[11:0]}, or 20-bit MPLS label. */ + MACSEC_MPLS_OUTER_t key_MPLS_outer2; + MACSEC_VLANTAG_t mask_vlantag_outer2; /*!< Set bits to 1 to mask/exclude corresponding flowid_tcam_data bit from compare */ + MACSEC_MPLS_OUTER_t mask_MPLS_outer2; + uint16_t key_bonus_data; /*!< 2 bytes of additional bonus data extracted from one of the custom tags. */ + uint16_t mask_bonus_data; /*!< Set bits to 1 to mask/exclude corresponding flowid_tcam_data bit from compare */ + uint8_t + key_tag_match_bitmap; /*!< 8 bits total. Maps 1 to 1 bitwise with the set of custom tags. (set bit[N]=1 if check Nth custom tag) */ + uint8_t mask_tag_match_bitmap; /*!< Set bits to 1 to mask/exclude corresponding flowid_tcam_data bit from compare */ + uint8_t key_packet_type; /*!< Encoded Packet Type, see MACSEC_PACKET_TYPE */ + uint8_t mask_packet_type; /*!< Set bits to 1 to mask/exclude corresponding flowid_tcam_data bit from compare */ + uint16_t + key_inner_vlan_type; /*!< 3 bits total. Encoded value indicating which VLAN TPID value matched for the second outermost VLAN Tag. */ + uint16_t mask_inner_vlan_type; /*!< Set bits to 1 to mask/exclude corresponding flowid_tcam_data bit from compare */ + uint16_t key_outer_vlan_type; /*!< 3 bits total. Encoded value indicating which VLAN TPID value matched for the outermost VLAN Tag. */ + uint16_t mask_outer_vlan_type; /*!< Set bits to 1 to mask/exclude corresponding flowid_tcam_data bit from compare */ + uint8_t + key_num_tags; /*!< 7 bits total. Number of VLAN/custom tags or MPLS lables detected. Ingress: before SecTag; Egress: total detected. Exclude MCS header tags. i.e. Bit 2: 2 tags/labels before SecTAG...Bit 6: 6 or more tags/labels before SecTAG. */ + uint8_t mask_num_tags; /*!< Set bits to 1 to mask/exclude corresponding flowid_tcam_data bit from compare */ + uint8_t key_express; /*!< 1 bits. Express packet. */ + uint8_t mask_express; /*!< Set bits to 1 to mask/exclude corresponding flowid_tcam_data bit from compare */ + uint8_t isMPLS; + uint8_t rsvd[5]; + uint8_t enable; + }; + uint8_t byte[MACSEC_SETTINGS_RULE_SIZE]; +} MACSecRule_t; +/* MACsec Map */ +#define MACSEC_SETTINGS_MAP_SIZE (20) +typedef union _MACSecMap +{ + struct + { + uint8_t index; + uint64_t sectag_sci; /*!< Identifies the SecTAG SCI for this Flow. */ + uint8_t secYIndex; /*!< index for entry in Egress secY Policy */ + uint8_t isControlPacket; /*!< Identifies all packets matching this index lookup as control packets. */ + uint8_t scIndex; /*!< Identifies the SC for this Flow. */ + uint8_t auxiliary_plcy; /*!< Auxiliary policy bits. */ + uint8_t ruleId; /*!< Identifies the Rule for this Flow. */ + uint8_t rsvd[5]; + uint8_t enable; + }; + uint8_t byte[MACSEC_SETTINGS_MAP_SIZE]; +} MACSecMap_t; +/* MACsec SecY */ +/** + * @brief Define the permit police for frames as defined in 802.1ae + * + */ +typedef enum +{ + MACSEC_VF_DISABLED = 0, /*!< Disable validation */ + MACSEC_VF_CHECK = 1, /*!< Enable validation, do not discard invalid frames*/ + MACSEC_VF_STRICT = 2, /*!< Enable validation and discard invalid frames */ + MACSEC_VF_NA = 3 /*!< No processing or accounting */ +} MACSEC_VALIDATEFRAME; +/** + * @brief Define SecTag and ICV configuration. + * + */ +typedef enum +{ + MACSEC_SECTAG_ICV_BOTH_STRIP = 0, /*!< Strip both SecTag and ICV from packet */ + MACSEC_SECTAG_ICV_RESERVED = 1, + MACSEC_SECTAG_ICV_STRIP_ICV_ONLY = 2, /*!< Preserve SecTag, Strip ICV */ + MACSEC_SECTAG_ICV_NO_STRIP = 3 /*!< Preserve both SecTag and ICV */ +} MACSEC_STRIP_SECTAG_ICV; +/** + * @brief Define the cipher suite to use for this SecY + * + */ +typedef enum +{ + MACSEC_CIPHER_GCM_AES_128 = 0, + MACSEC_CIPHER_GCM_AES_256 = 1, + MACSEC_CIPHER_GCM_AES_128_XPN = 2, + MACSEC_CIPHER_GCM_AES_256_XPN = 3 +} MACSEC_CIPHER_SUITE; +#define MACSEC_SETTINGS_SECY_SIZE (24) +typedef union _MACSecSecY +{ + struct + { + uint8_t index; /*!< Identifies the SecY for this Flow. */ + uint8_t controlled_port_enabled; /*!< Enable (or disable) operation of the Controlled port associated with this SecY */ + uint8_t validate_frames; /*!< see MACSEC_VALIDATEFRAME */ + uint8_t strip_sectag_icv; /*!< see MACSEC_STRIP_SECTAG_ICV */ + uint8_t cipher; /*!< Define the cipher suite to use for this SecY see MACSEC_CIPHER_SUITE */ + uint8_t confidential_offset; /*!< Define the number of bytes that are unencrypted following the SecTag. */ + uint8_t icv_includes_da_sa; /*!< When set, the outer DA/SA bytes are included in the authentication GHASH calculation */ + uint8_t replay_protect; /*!< Enables Anti-Replay protection */ + uint32_t replay_window; /*!< Unsigned value indicating the size of the anti-replay window. */ + uint8_t + protect_frames; /*!< 0 = do not encrypt or authenticate this packet; 1 = always Authenticate frame and if SecTag.TCI.E = 1 encrypt the packet as well. */ + uint8_t + sectag_offset; /*!< Define the offset in bytes from either the start of the packet or a matching Etype depending on SecTag_Insertion_Mode. */ + uint8_t sectag_tci; /*!< Tag Control Information excluding the AN field which originates from the SA Policy table */ + uint16_t mtu; /*!< Specifies the outgoing MTU for this SecY */ + uint8_t rsvd[6]; + uint8_t enable; + }; + uint8_t byte[MACSEC_SETTINGS_SECY_SIZE]; +} MACSecSecY_t; +/* MACsec SC */ +#define MACSEC_SETTINGS_SC_SIZE (24) +typedef union _MACSecSc +{ + struct + { + uint8_t index; /*!< SC index. */ + uint8_t secYIndex; /*!< SecY associated with this packet. */ + uint64_t sci; /*!< The Secure Channel Identifier. */ + uint8_t sa_index0; /*!< Define the 1st SA to use */ + uint8_t sa_index1; /*!< Define the 2nd SA to use */ + uint8_t sa_index0_in_use; /*!< Specifies whether 1st SA is in use or not. */ + uint8_t sa_index1_in_use; /*!< Specifies whether 2nd SA is in use or not. */ + uint8_t enable_auto_rekey; /*!< If enabled, then once the pn_threshold is reached, auto rekey will happen. */ + uint8_t + isActiveSA1; /*!< If set, then sa_index1 is the currently active SA index. If cleared, the sa_index0 is the currently active SA index). */ + uint8_t rsvd[7]; + uint8_t enable; + }; + uint8_t byte[MACSEC_SETTINGS_SC_SIZE]; +} MACSecSc_t; +/* MACsec SA */ +#define MACSEC_SETTINGS_SA_SIZE (80) +typedef union _MACSecSa +{ + struct + { + uint8_t index; /*!< SA index */ + uint8_t + sak[32]; /*!< 256b SAK: Define the encryption key to be used to encrypte this packet. The lower 128 bits are used for 128-bit ciphers. */ + uint8_t hashKey[16]; /*!< 128b Hash Key: Key used for authentication. */ + uint8_t salt[12]; /*!< 96b Salt value: Salt value used in XPN ciphers. */ + uint32_t ssci; /*!< 32b SSCI value: Short Secure Channel Identifier, used in XPN ciphers. */ + uint8_t AN; /*!< 2b SecTag Association Number (AN) */ + uint64_t nextPN; /*!< 64b next_pn value: Next packet number to insert into outgoing packet on a particular SA. */ + uint8_t rsvd[5]; + uint8_t enable; + }; + uint8_t byte[MACSEC_SETTINGS_SA_SIZE]; +} MACSecSa_t; +/* MACsec Flags */ +#define MACSEC_SETTINGS_FLAGS_SIZE (4) +typedef union _MACSecFlags +{ + struct + { + uint32_t en : 1; // '1' = enable; '0' = disable + uint32_t reserved : 31; + }; + uint32_t flags_32b; +} MACSecFlags_t; +/* MACSec Settings for 1 port/phy */ +#define MACSEC_NUM_FLAGS_PER_CONFIG (1) +#define MACSEC_NUM_RULES_PER_CONFIG (2) +#define MACSEC_NUM_MAPS_PER_CONFIG (2) +#define MACSEC_NUM_SECY_PER_CONFIG (2) +#define MACSEC_NUM_SC_PER_CONFIG (2) +#define MACSEC_NUM_SA_PER_CONFIG (4) +typedef struct MACSEC_CONFIG_t +{ + MACSecFlags_t flags; + MACSecRule_t rule[MACSEC_NUM_RULES_PER_CONFIG]; + MACSecMap_t map[MACSEC_NUM_MAPS_PER_CONFIG]; + MACSecSecY_t secy[MACSEC_NUM_SECY_PER_CONFIG]; + MACSecSc_t sc[MACSEC_NUM_SC_PER_CONFIG]; + MACSecSa_t sa[MACSEC_NUM_SA_PER_CONFIG]; +} MACSEC_CONFIG; +typedef union _MACSecGlobalFlags +{ + struct + { + uint32_t en : 1; // '1' = enable; '0' = disable + uint32_t nvm : 1; // store macsec config in non-volatile memory + uint32_t reserved : 30; + }; + uint32_t flags_32b; +} MACSecGlobalFlags_t; +#define MACSEC_SETTINGS_SIZE (2040) // leave space for expansion and keep nicely aligned for flashing +typedef union _MACSEC_SETTINGS +{ + struct + { + MACSecGlobalFlags_t flags; + MACSEC_CONFIG rx; + MACSEC_CONFIG tx; + }; + uint8_t byte[MACSEC_SETTINGS_SIZE]; +} MACSEC_SETTINGS; +#pragma pack(pop) +/* + * END - MACsec Definitions + */ + typedef struct LOGGER_SETTINGS_t { /* bit6-0: timeout in seconds @@ -1229,9 +1711,9 @@ typedef struct LOGGER_SETTINGS_t typedef struct DISK_SETTINGS_t { - uint8_t disk_layout;// RAID0, spanned, etc - uint8_t disk_format;// FAT32 - uint32_t disk_enables;// mask of enabled disks in this layout + uint8_t disk_layout; // RAID0, spanned, etc + uint8_t disk_format; // FAT32 + uint32_t disk_enables; // mask of enabled disks in this layout uint8_t rsvd[8]; } DISK_SETTINGS; #define DISK_SETTINGS_SIZE 14 @@ -1275,7 +1757,7 @@ typedef enum _EDiskLayout typedef struct _SDiskStatus { - uint16_t status;// 0x1 = present, 0x2 = initialized + uint16_t status; // 0x1 = present, 0x2 = initialized uint8_t sectors[8]; uint8_t bytesPerSector[4]; } SDiskStatus; @@ -1286,7 +1768,7 @@ typedef struct _SDiskStatus typedef struct _SDiskStructure { DISK_SETTINGS settings; - uint16_t options;// 0x01 full format + uint16_t options; // 0x01 full format } SDiskStructure; #define SDiskStructure_SIZE 16 @@ -1299,7 +1781,7 @@ typedef struct _SDiskDetails typedef struct _SDiskFormatProgress { - uint16_t state;// state of formatting (not started, writing file system, formatting, writing VSAs, finished) + uint16_t state; // state of formatting (not started, writing file system, formatting, writing VSAs, finished) uint8_t sectorsRemaining[8]; } SDiskFormatProgress; #define SDiskFormatProgress_SIZE 10 @@ -1342,65 +1824,71 @@ typedef struct _ExtendedResponseGeneric int32_t returnCode; } ExtendedResponseGeneric; -#define GET_SUPPORTED_FEATURES_COMMAND_VERSION (1) -typedef struct +typedef struct _GenericAPISelector { - uint16_t cmdVersion; - uint16_t numValidBits; - uint32_t featureBitfields[0]; -} GetSupportedFeaturesResponse; + uint8_t apiIndex; + uint8_t instance; + uint8_t functionID; +} GenericAPISelector; -typedef struct _VersionReport +typedef struct _GenericAPIStatus { - uint8_t valid; - uint8_t expansionSlot; // aka vnet slot - uint8_t componentInfo; // used for any component specific data (e.g. Linux: boot device) - uint8_t reserved; - uint32_t identifier; - uint32_t dotVersion; // major.minor.release.build - uint32_t commitHash; -} VersionReport; + GenericAPISelector api; + uint8_t functionError; + uint8_t calbackError; + uint8_t finishedProcessing; +} GenericAPIStatus; -typedef struct _GetComponentVersions -{ - uint32_t reserved[2]; -} GetComponentVersions; +#define GENERIC_API_DATA_BUFFER_SIZE 513 -#define MAX_REPORTED_VERSIONS (16) -#define EXT_GET_VERSIONS_RESPONSE_SIZE(numVers) (((numVers) * sizeof(VersionReport)) + sizeof(SExtSubCmdHdr) + sizeof(uint16_t)) -typedef struct _ExtendedGetVersionsResponse +typedef struct _GenericAPIData { - uint16_t numVersions; - VersionReport versions[MAX_REPORTED_VERSIONS]; -} GetComponentVersionsResponse; + uint16_t length; + GenericAPISelector api; + uint8_t bData[GENERIC_API_DATA_BUFFER_SIZE]; +} GenericAPIData; -enum +typedef struct _GenericAPIData_OLD { - swUpdateWrite, - swUpdateErase, - swUpdateGetProgress, - swUpdateValidateAll, - swUpdateGetBufferSize, - swUpdateCheckVersion, -}; + GenericAPISelector api; + uint8_t bData[GENERIC_API_DATA_BUFFER_SIZE]; + uint16_t length; +} GenericAPIData_OLD; -typedef struct +typedef struct _wBMSManagerSetLock { - uint32_t componentIdentifier; // unique id for the software component - analogous to what used to be "chip id" - uint8_t commandType; // See enum - uint32_t offset; - uint32_t commandSizeOrProgress; // size - uint8_t commandData[0]; // max size TBD or per-device -} SoftwareUpdateCommand; + uint8_t managerIndex; + uint8_t setLock; +} wBMSManagerSetLock; -typedef struct _SExtSubCmdHdr +typedef struct _wBMSManagerReset { - uint16_t command; - uint16_t length; -} SExtSubCmdHdr; -#define SExtSubCmdHdr_SIZE 4 + uint8_t managerIndex; +} wBMSManagerReset; -#pragma pack(push, 1) +#define UART_DATA_BUFFER_SIZE 256 + +typedef struct _UartPortData +{ + uint16_t len; + uint8_t port; + uint8_t bData[UART_DATA_BUFFER_SIZE]; +} UartPortData; + +typedef struct _UartPortPortBytes +{ + uint16_t len; + uint8_t port; + uint8_t flag; +} UartPortPortBytes; + +typedef struct _UartPortConfig +{ + uint32_t baudrate; + uint8_t port; + uint8_t reserve[7]; +} UartPortConfig; +#pragma pack(push, 1) struct _timestamp { @@ -1436,6 +1924,38 @@ struct priority_vector struct port_identity portid; uint16_t port_number; }; +struct _scaled_ns { + int16_t nanoseconds_msb; + int64_t nanoseconds_lsb; + int16_t fractional_nanoseconds; +}; + +// IEEE 802.1AS-2020 14.3 +// This is a read-only data structure +struct _current_ds { + uint16_t steps_removed; + int64_t offset_from_master; + struct _scaled_ns last_gm_phase_change; + double last_gm_freq_change; + uint16_t gm_time_base_indicator; + uint32_t gm_change_count; + uint32_t time_of_last_gm_change_event; + uint32_t time_of_last_gm_phase_change_event; + uint32_t time_of_last_gm_freq_change_event; +}; + +// IEEE 802.1AS-2020 14.4 +// This is a read-only data structure +struct _parent_ds { + struct port_identity parent_port_identity; + int32_t cumulative_rate_ratio; + _clock_identity grandmaster_identity; + uint8_t gm_clock_quality_clock_class; + uint8_t gm_clock_quality_clock_accuracy; + uint16_t gm_clock_quality_offset_scaled_log_variance; + uint8_t gm_priority1; + uint8_t gm_priority2; +}; typedef struct _GPTPStatus { @@ -1443,37 +1963,47 @@ typedef struct _GPTPStatus struct priority_vector gm_priority; int64_t ms_offset_ns; uint8_t is_sync; - uint8_t link_status; int64_t link_delay_ns; uint8_t selected_role; uint8_t as_capable; - uint8_t is_syntonized; - uint8_t reserved[8]; + struct _timestamp last_rx_sync_ts; // t2 in IEEE 1588-2019 Figure-16 + struct _current_ds current_ds; + struct _parent_ds parent_ds; } GPTPStatus; -#pragma pack(pop) +typedef struct _GenericBinaryStatus +{ + uint32_t size; + uint16_t index; + uint16_t status; + uint8_t reserved[8]; +} GenericBinaryStatus; -typedef struct _SExtSubCmdComm +//----------------------------------------------------------------- +#define MACADDR_LEN 6 +#define MULTI_MACADDR_CNT 32 +typedef struct _MacAddrEntry { - SExtSubCmdHdr header; - union { - SDiskStructure structure; - SDiskDetails details; - SDiskFormatProgress progress; - StartDHCPServerCommand startDHCPServer; - StopDHCPServerCommand stopDHCPServer; - GetSupportedFeaturesResponse getSupportedFeatures; - ExtendedResponseGeneric genericResponse; - GPTPStatus gptpStatus; - GetComponentVersions getComponentVersions; - SoftwareUpdateCommand softwareUpdate; - GetComponentVersionsResponse getComponentVersionsResponse; - // Add additional extension commands to this union as needed. - } extension; -} SExtSubCmdComm; -#define SExtSubCmdComm_SIZE 262 + uint16_t mMacId; + uint8_t mMacAddr[MACADDR_LEN]; +} MacAddrEntry; + +typedef struct _MultiMacAddrInfo +{ + uint16_t mAddrCnt; + MacAddrEntry mMacEntries[MULTI_MACADDR_CNT]; +} MultiMacAddrInfo; +//----------------------------------------------------------------- + +#define GENERIC_BINARY_STATUS_ERROR_UNKNOWN_BINARY 0x0001 +#define GENERIC_BINARY_STATUS_ERROR_OVERSIZE 0x0002 +#define GENERIC_BINARY_STATUS_ERROR_BINARY_EMPTY 0x0004 +#define GENERIC_BINARY_STATUS_ERROR_ANY_MASK \ + (GENERIC_BINARY_STATUS_ERROR_UNKNOWN_BINARY | GENERIC_BINARY_STATUS_ERROR_OVERSIZE | GENERIC_BINARY_STATUS_ERROR_BINARY_EMPTY) + +#pragma pack(pop) #define SERDESCAM_SETTINGS_FLAG_ENABLE 0x0001 #define SERDESCAM_SETTINGS_FLAG_RTSP_ENABLE 0x0002 @@ -1515,7 +2045,7 @@ enum SERDESCAM_VIDEO_FORMAT_YVYU_422_8, // packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb SERDESCAM_VIDEO_FORMAT_VYUY_422_8, // packed YUV 4:2:2, 16bpp, Cr Y0 Cb Y1 SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_8, - SERDESCAM_VIDEO_FORMAT_RAW_8, // e.g. bayer 8 bit, gray 8 bit + SERDESCAM_VIDEO_FORMAT_RAW_8, // e.g. bayer 8 bit, gray 8 bit SERDESCAM_VIDEO_FORMAT_RAW_10, // e.g. bayer 10 bit, gray 10 bit SERDESCAM_VIDEO_FORMAT_RAW_12, SERDESCAM_VIDEO_FORMAT_RAW_16, // e.g. planar YUV 4:2:2, 16bpp, 8 bit samples @@ -1525,21 +2055,21 @@ enum SERDESCAM_VIDEO_FORMAT_RAW_32, // e.g. packed ARGB 8:8:8:8, 32bpp, 8 bit samples SERDESCAM_VIDEO_FORMAT_RAW_36, SERDESCAM_VIDEO_FORMAT_RGB888, // packed RGB 8:8:8, 24bpp, RGBRGB... - SERDESCAM_VIDEO_FORMAT_UYVY_422_10LE_PACKED,// packed YUV 4:2:2, 20bpp, Cb Y0 Cr Y1, bitpacked - SERDESCAM_VIDEO_FORMAT_YUYV_422_10LE_PACKED,// packed YUV 4:2:2, 20bpp, Y0 Cb Y1 Cr, FOURCC Y210 bitpacked - SERDESCAM_VIDEO_FORMAT_YVYU_422_10LE_PACKED,// packed YUV 4:2:2, 20bpp, Y0 Cr Y1 Cb, bitpacked - SERDESCAM_VIDEO_FORMAT_VYUY_422_10LE_PACKED,// packed YUV 4:2:2, 20bpp, Cr Y0 Cb Y1, bitpacked - SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_10LE_PACKED,// 10-bit samples bitpacked into 40-bits little endian - SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_12LE_PACKED,// 12-bit samples bitpacked into 24-bits little endian - SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16LE,// 16-bit samples little endian - SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16BE,// 16-bit samples big endian + SERDESCAM_VIDEO_FORMAT_UYVY_422_10LE_PACKED, // packed YUV 4:2:2, 20bpp, Cb Y0 Cr Y1, bitpacked + SERDESCAM_VIDEO_FORMAT_YUYV_422_10LE_PACKED, // packed YUV 4:2:2, 20bpp, Y0 Cb Y1 Cr, FOURCC Y210 bitpacked + SERDESCAM_VIDEO_FORMAT_YVYU_422_10LE_PACKED, // packed YUV 4:2:2, 20bpp, Y0 Cr Y1 Cb, bitpacked + SERDESCAM_VIDEO_FORMAT_VYUY_422_10LE_PACKED, // packed YUV 4:2:2, 20bpp, Cr Y0 Cb Y1, bitpacked + SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_10LE_PACKED, // 10-bit samples bitpacked into 40-bits little endian + SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_12LE_PACKED, // 12-bit samples bitpacked into 24-bits little endian + SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16LE, // 16-bit samples little endian + SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16BE, // 16-bit samples big endian SERDESCAM_VIDEO_FORMAT_JPEG, - SERDESCAM_VIDEO_FORMAT_UYVY_422_12LE_PACKED,// packed YUV 4:2:2, 24bpp, Cb Y0 Cr Y1, bitpacked - SERDESCAM_VIDEO_FORMAT_YUYV_422_12LE_PACKED,// packed YUV 4:2:2, 24bpp, Y0 Cb Y1 Cr, bitpacked - SERDESCAM_VIDEO_FORMAT_YVYU_422_12LE_PACKED,// packed YUV 4:2:2, 24bpp, Y0 Cr Y1 Cb, bitpacked - SERDESCAM_VIDEO_FORMAT_VYUY_422_12LE_PACKED,// packed YUV 4:2:2, 24bpp, Cr Y0 Cb Y1, bitpacked - SERDESCAM_VIDEO_FORMAT_YUV422_10LE_PLANAR,// planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian - SERDESCAM_VIDEO_FORMAT_YUV422_16LE_PLANAR,// planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian + SERDESCAM_VIDEO_FORMAT_UYVY_422_12LE_PACKED, // packed YUV 4:2:2, 24bpp, Cb Y0 Cr Y1, bitpacked + SERDESCAM_VIDEO_FORMAT_YUYV_422_12LE_PACKED, // packed YUV 4:2:2, 24bpp, Y0 Cb Y1 Cr, bitpacked + SERDESCAM_VIDEO_FORMAT_YVYU_422_12LE_PACKED, // packed YUV 4:2:2, 24bpp, Y0 Cr Y1 Cb, bitpacked + SERDESCAM_VIDEO_FORMAT_VYUY_422_12LE_PACKED, // packed YUV 4:2:2, 24bpp, Cr Y0 Cb Y1, bitpacked + SERDESCAM_VIDEO_FORMAT_YUV422_10LE_PLANAR, // planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian + SERDESCAM_VIDEO_FORMAT_YUV422_16LE_PLANAR, // planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian SERDESCAM_VIDEO_FORMAT_RGB565, // packed RGB 5:6:5, 16bpp, RGBRGB... SERDESCAM_VIDEO_FORMAT_RGB666, // packed RGB 6:6:6, 18bpp, RGBRGB... SERDESCAM_VIDEO_FORMAT_RAW_11x2, @@ -1552,21 +2082,21 @@ enum SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_8, // packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_8, // packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_8, // packed YUV 4:2:2, 16bpp, Cr Y0 Cb Y1 - SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_10LE_PACKED,// packed YUV 4:2:2, 20bpp, Cb Y0 Cr Y1, bitpacked - SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_10LE_PACKED,// packed YUV 4:2:2, 20bpp, Y0 Cb Y1 Cr, FOURCC Y210 bitpacked - SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_10LE_PACKED,// packed YUV 4:2:2, 20bpp, Y0 Cr Y1 Cb, bitpacked - SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_10LE_PACKED,// packed YUV 4:2:2, 20bpp, Cr Y0 Cb Y1, bitpacked - SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_12LE_PACKED,// packed YUV 4:2:2, 24bpp, Cb Y0 Cr Y1, bitpacked - SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_12LE_PACKED,// packed YUV 4:2:2, 24bpp, Y0 Cb Y1 Cr, bitpacked - SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_12LE_PACKED,// packed YUV 4:2:2, 24bpp, Y0 Cr Y1 Cb, bitpacked - SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_12LE_PACKED,// packed YUV 4:2:2, 24bpp, Cr Y0 Cb Y1, bitpacked + SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_10LE_PACKED, // packed YUV 4:2:2, 20bpp, Cb Y0 Cr Y1, bitpacked + SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_10LE_PACKED, // packed YUV 4:2:2, 20bpp, Y0 Cb Y1 Cr, FOURCC Y210 bitpacked + SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_10LE_PACKED, // packed YUV 4:2:2, 20bpp, Y0 Cr Y1 Cb, bitpacked + SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_10LE_PACKED, // packed YUV 4:2:2, 20bpp, Cr Y0 Cb Y1, bitpacked + SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_12LE_PACKED, // packed YUV 4:2:2, 24bpp, Cb Y0 Cr Y1, bitpacked + SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_12LE_PACKED, // packed YUV 4:2:2, 24bpp, Y0 Cb Y1 Cr, bitpacked + SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_12LE_PACKED, // packed YUV 4:2:2, 24bpp, Y0 Cr Y1 Cb, bitpacked + SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_12LE_PACKED, // packed YUV 4:2:2, 24bpp, Cr Y0 Cb Y1, bitpacked SERDESCAM_VIDEO_FORMAT_CSI2_RGB565, // packed RGB 5:6:5, 16bpp, BGRBGR... SERDESCAM_VIDEO_FORMAT_CSI2_RGB666, // packed RGB 6:6:6, 18bpp, BGRBGR... SERDESCAM_VIDEO_FORMAT_CSI2_RGB888, // packed RGB 8:8:8, 24bpp, BGRBGR... SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_8, - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_10LE_PACKED,// 10-bit samples bitpacked into 40-bits little endian - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_12LE_PACKED,// 12-bit samples bitpacked into 40-bits little endian - SERDESCAM_VIDEO_FORMAT_CSI2_RAW_8, // e.g. bayer 8 bit, gray 8 bit + SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_10LE_PACKED, // 10-bit samples bitpacked into 40-bits little endian + SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_12LE_PACKED, // 12-bit samples bitpacked into 40-bits little endian + SERDESCAM_VIDEO_FORMAT_CSI2_RAW_8, // e.g. bayer 8 bit, gray 8 bit SERDESCAM_VIDEO_FORMAT_CSI2_RAW_10, // e.g. bayer 10 bit, gray 10 bit SERDESCAM_VIDEO_FORMAT_CSI2_RAW_11x2, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_12, @@ -1580,31 +2110,31 @@ enum SERDESCAM_VIDEO_FORMAT_CSI2_RAW_36, SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_8, - SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_10LE_PACKED,// 10-bit samples bitpacked into 40-bits little endian - SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_12LE_PACKED,// 12-bit samples bitpacked into 24-bits little endian - SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16LE,// 16-bit samples little endian - SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16BE,// 16-bit samples big endian + SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_10LE_PACKED, // 10-bit samples bitpacked into 40-bits little endian + SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_12LE_PACKED, // 12-bit samples bitpacked into 24-bits little endian + SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16LE, // 16-bit samples little endian + SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16BE, // 16-bit samples big endian SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_8, - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_10LE_PACKED,// 10-bit samples bitpacked into 40-bits little endian - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_12LE_PACKED,// 12-bit samples bitpacked into 24-bits little endian + SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_10LE_PACKED, // 10-bit samples bitpacked into 40-bits little endian + SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_12LE_PACKED, // 12-bit samples bitpacked into 24-bits little endian SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_8, - SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_10LE_PACKED,// 10-bit samples bitpacked into 40-bits little endian - SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_12LE_PACKED,// 12-bit samples bitpacked into 24-bits little endian - SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16LE,// 16-bit samples little endian - SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16BE,// 16-bit samples big endian + SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_10LE_PACKED, // 10-bit samples bitpacked into 40-bits little endian + SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_12LE_PACKED, // 12-bit samples bitpacked into 24-bits little endian + SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16LE, // 16-bit samples little endian + SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16BE, // 16-bit samples big endian SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_8, - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_10LE_PACKED,// 10-bit samples bitpacked into 40-bits little endian - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_12LE_PACKED,// 12-bit samples bitpacked into 24-bits little endian - + SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_10LE_PACKED, // 10-bit samples bitpacked into 40-bits little endian + SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_12LE_PACKED, // 12-bit samples bitpacked into 24-bits little endian + SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_8, - SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_10LE_PACKED,// 10-bit samples bitpacked into 40-bits little endian - SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_12LE_PACKED,// 12-bit samples bitpacked into 24-bits little endian - SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16LE,// 16-bit samples little endian - SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16BE,// 16-bit samples big endian + SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_10LE_PACKED, // 10-bit samples bitpacked into 40-bits little endian + SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_12LE_PACKED, // 12-bit samples bitpacked into 24-bits little endian + SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16LE, // 16-bit samples little endian + SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16BE, // 16-bit samples big endian SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_8, - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_10LE_PACKED,// 10-bit samples bitpacked into 40-bits little endian - SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_12LE_PACKED,// 12-bit samples bitpacked into 24-bits little endian + SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_10LE_PACKED, // 10-bit samples bitpacked into 40-bits little endian + SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_12LE_PACKED, // 12-bit samples bitpacked into 24-bits little endian // NOTE: new entries must be appended to maintain backwards compatibility // insert new entries before this SERDESCAM_VIDEO_FORMAT_COUNT, @@ -1624,13 +2154,13 @@ typedef struct SERDESCAM_SETTINGS_t * bit8: forward on port 3 */ uint32_t flags; - uint8_t mode;// passthrough, tap, etc + uint8_t mode; // passthrough, tap, etc uint8_t rsvd1; uint8_t bitPos; - uint8_t videoFormat;// bytes per pixel + uint8_t videoFormat; // bytes per pixel uint16_t resWidth; uint16_t resHeight; - uint8_t frameSkip;// skip every nth frame + uint8_t frameSkip; // skip every nth frame uint8_t rsvd2[19]; } SERDESCAM_SETTINGS; #define SERDESCAM_SETTINGS_SIZE 32 @@ -1641,10 +2171,10 @@ typedef struct SERDESCAM_SETTINGS_t typedef struct SERDESPOC_SETTINGS_t { - uint8_t mode;// no poc, generated supply, serializer passthrough + uint8_t mode; // no poc, generated supply, serializer passthrough uint8_t rsvd[6]; - uint8_t voltage;// generated voltage - uint16_t chksum;// checksum to protect settings structure (don't want corrupt voltage settings) + uint8_t voltage; // generated voltage + uint16_t chksum; // checksum to protect settings structure (don't want corrupt voltage settings) } SERDESPOC_SETTINGS; #define SERDESPOC_SETTINGS_SIZE 10 @@ -1653,8 +2183,8 @@ enum SERDESGEN_MOD_ID_NONE = 0, SERDESGEN_MOD_ID_FPD3_2x2 = 1, SERDESGEN_MOD_ID_GMSL2_2x2 = 2, - SERDESGEN_MOD_ID_GMSL1_4x4 = 3, - SERDESGEN_MOD_ID_FPD3_TO_GMSL2_2x2 = 4, + SERDESGEN_MOD_ID_GMSL1_4x4 = 3, + SERDESGEN_MOD_ID_FPD3_TO_GMSL2_2x2 = 4, // new modules go above this line SERDESGEN_MOD_ID_UNKNOWN = -1, }; @@ -1669,40 +2199,27 @@ typedef struct SERDESGEN_SETTINGS_t uint16_t flags; uint8_t rsvd1; uint8_t mod_id; // connected module passed back from device - uint16_t tx_speed;// Mbps per lane, all tx ports - uint16_t rx_speed;// Mbps per lane, all rx ports + uint16_t tx_speed; // Mbps per lane, all tx ports + uint16_t rx_speed; // Mbps per lane, all rx ports // reserved space for the future // maybe pattern generator settings uint8_t rsvd2[24]; } SERDESGEN_SETTINGS; #define SERDESGEN_SETTINGS_SIZE 32 -typedef struct _RadMoonDuoConverterSettings -{ - // OPETH_LINK_AUTO/MASTER/SLAVE - uint8_t linkMode0; - uint8_t linkMode1; - // USB/CM or RJ45 selection - uint8_t converter1Mode; - // IP Settings if converter is hooked up to Coremini - uint32_t ipAddress; - uint32_t ipMask; - uint32_t ipGateway; -} RadMoonDuoConverterSettings; -#define RADMOONDUO_CONVERTER_SETTINGS_SIZE (16) - // clang-format off -#define RAD_REPORTING_SETTINGS_FLAG_TEMP_ENABLE 0x00000001 -#define RAD_REPORTING_SETTINGS_FLAG_MIC2_GPS_ENABLE 0x00000002 // USB port 1 -#define RAD_REPORTING_SETTINGS_FLAG_INT_GPS_ENABLE 0x00000004 -#define RAD_REPORTING_SETTINGS_FLAG_MIC2_GPS_ENABLE2 0x00000008 // USB port 2 -#define RAD_REPORTING_SETTINGS_FLAG_MISC1_DIN 0x00000010 -#define RAD_REPORTING_SETTINGS_FLAG_MISC2_DIN 0x00000020 -#define RAD_REPORTING_SETTINGS_FLAG_MISC1_PWMIN 0x00000040 -#define RAD_REPORTING_SETTINGS_FLAG_MISC2_PWMIN 0x00000080 -#define RAD_REPORTING_SETTINGS_FLAG_AIN1 0x00000100 -#define RAD_REPORTING_SETTINGS_FLAG_SERDES_ENABLE 0x00000200 -#define RAD_REPORTING_SETTINGS_FLAG_FAN_SPEED_ENABLE 0x00000400 +#define RAD_REPORTING_SETTINGS_FLAG_TEMP_ENABLE 0x00000001 +#define RAD_REPORTING_SETTINGS_FLAG_MIC2_GPS_ENABLE 0x00000002 // USB port 1 +#define RAD_REPORTING_SETTINGS_FLAG_INT_GPS_ENABLE 0x00000004 +#define RAD_REPORTING_SETTINGS_FLAG_MIC2_GPS_ENABLE2 0x00000008 // USB port 2 +#define RAD_REPORTING_SETTINGS_FLAG_MISC1_DIN 0x00000010 +#define RAD_REPORTING_SETTINGS_FLAG_MISC2_DIN 0x00000020 +#define RAD_REPORTING_SETTINGS_FLAG_MISC1_PWMIN 0x00000040 +#define RAD_REPORTING_SETTINGS_FLAG_MISC2_PWMIN 0x00000080 +#define RAD_REPORTING_SETTINGS_FLAG_AIN1 0x00000100 +#define RAD_REPORTING_SETTINGS_FLAG_SERDES_ENABLE 0x00000200 +#define RAD_REPORTING_SETTINGS_FLAG_FAN_SPEED_ENABLE 0x00000400 +#define RAD_REPORTING_SETTINGS_FLAG_REPORT_ORIENTATION_ENABLE 0x00000800 // clang-format on typedef struct RAD_REPORTING_SETTINGS_t @@ -1738,94 +2255,6 @@ enum REPORT_ON_GPS, /* send GPS 0x110-0x116 on change */ }; -typedef struct _SFireSettings -{ - CAN_SETTINGS can1; - CAN_SETTINGS can2; - CAN_SETTINGS can3; - CAN_SETTINGS can4; - - SWCAN_SETTINGS swcan; - CAN_SETTINGS lsftcan; - - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; - LIN_SETTINGS lin3; - LIN_SETTINGS lin4; - - uint16_t cgi_enable_reserved; - uint16_t cgi_baud; - uint16_t cgi_tx_ifs_bit_times; - uint16_t cgi_rx_ifs_bit_times; - uint16_t cgi_chksum_enable; - - uint16_t network_enables; - uint16_t network_enabled_on_boot; - - uint32_t pwm_man_timeout; - uint16_t pwr_man_enable; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - - uint16_t misc_io_analog_enable; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t ain_sample_period; - uint16_t ain_threshold; - - uint16_t iso15765_separation_time_offset; - - uint16_t iso9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - - uint16_t perf_en; - - /* ISO9141: iso_parity 0 - no parity, 1 - event, 2 - odd; iso_msg_termination 0 - use inner frame time, 1 - GME CIM-SCL */ - - uint16_t iso_parity; - uint16_t iso_msg_termination; - uint16_t iso_tester_pullup_enable; - - uint16_t network_enables_2; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_3; - uint16_t iso_parity_3; - uint16_t iso_msg_termination_3; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_4; - uint16_t iso_parity_4; - uint16_t iso_msg_termination_4; - - uint16_t fast_init_network_enables_1; - uint16_t fast_init_network_enables_2; - - UART_SETTINGS uart; - UART_SETTINGS uart2; - - STextAPISettings text_api; - - SNeoMostGatewaySettings neoMostGateway; - -#define VNETBITS_FEATURE_ANDROID_MSGS (1) - /** - * Unfortuntely I haven't gone thru the trouble - * of splitting the FIRE VNET and FIRE settings - * structures. So until I can do so and reserve - * some time to test it, add a member that only - * VNET looks at for VNET features (like - * Android CoreMiniMsg pump). - * Defaults to zero. - * @see VNETBITS_FEATURE_ANDROID_MSGS - */ - uint16_t vnetBits; -} SFireSettings; -#define SFireSettings_SIZE 744 - typedef struct _SFireVnetSettings { CAN_SETTINGS can1; @@ -2009,32 +2438,13 @@ typedef struct _SCyanSettings uint16_t digitalIoThresholdTicks; uint16_t digitalIoThresholdEnable; TIMESYNC_ICSHARDWARE_SETTINGS timeSync; - DISK_SETTINGS disk; + DISK_SETTINGS disk; ETHERNET_SETTINGS2 ethernet2; // supercedes ethernet settings } SCyanSettings; #define SCyanSettings_SIZE 936 typedef SCyanSettings SFire2Settings; -typedef struct _SVCAN3Settings -{ - CAN_SETTINGS can1; - CAN_SETTINGS can2; - - uint16_t network_enables; - uint16_t network_enabled_on_boot; - - uint16_t iso15765_separation_time_offset; - - uint16_t perf_en; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; -} SVCAN3Settings; -#define SVCAN3Settings_SIZE 40 - typedef struct _SVCAN4Settings { uint16_t perf_en; @@ -2071,278 +2481,347 @@ typedef struct _SVCAN4Settings } SVCAN4Settings; #define SVCAN4Settings_SIZE 342 -typedef struct _SVCANRFSettings +/* GPTP portEnable options */ +enum eGPTPPort +{ + ePortDisabled = 0, + ePortOpEth1 = 1, + ePortOpEth2 = 2, + ePortOpEth3 = 3, + ePortOpEth4 = 4, + ePortOpEth5 = 5, + ePortOpEth6 = 6, + ePortOpEth7 = 7, + ePortOpEth8 = 8, + ePortOpEth9 = 9, + ePortOpEth10 = 10, + ePortOpEth11 = 11, + ePortOpEth12 = 12, + + ePortStdEth1 = 13, + ePortStdEth2 = 14, + ePortStdEth3 = 15, + + ePortOpEth13 = 16, + ePortOpEth14 = 17, + ePortOpEth15 = 18, + ePortOpEth16 = 19, +}; + +/* GPTP port role options */ +enum eGPTPRole +{ + eRoleDisabled = 0, + eRolePassive = 1, + eRoleMaster = 2, + eRoleSlave = 3, +}; + +enum eGPTPProfile +{ + eGPTP_PROFILE_STANDARD = 0, + eGPTP_PROFILE_AUTOMOTIVE = 1, +}; + +typedef struct _SRADGalaxySettings { + uint16_t perf_en; + + OP_ETH_GENERAL_SETTINGS opEthGen; + OP_ETH_SETTINGS opEth1; + OP_ETH_SETTINGS opEth2; + OP_ETH_SETTINGS opEth3; + OP_ETH_SETTINGS opEth4; + OP_ETH_SETTINGS opEth5; + OP_ETH_SETTINGS opEth6; + OP_ETH_SETTINGS opEth7; + OP_ETH_SETTINGS opEth8; + OP_ETH_SETTINGS opEth9; + OP_ETH_SETTINGS opEth10; + OP_ETH_SETTINGS opEth11; + OP_ETH_SETTINGS opEth12; + CAN_SETTINGS can1; + CANFD_SETTINGS canfd1; CAN_SETTINGS can2; + CANFD_SETTINGS canfd2; CAN_SETTINGS can3; + CANFD_SETTINGS canfd3; CAN_SETTINGS can4; + CANFD_SETTINGS canfd4; + CAN_SETTINGS can5; + CANFD_SETTINGS canfd5; + CAN_SETTINGS can6; + CANFD_SETTINGS canfd6; + CAN_SETTINGS can7; + CANFD_SETTINGS canfd7; + CAN_SETTINGS can8; + CANFD_SETTINGS canfd8; - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; - + /* Native CAN are either LS1/LS2 or SW1/SW2 */ + SWCAN_SETTINGS swcan1; uint16_t network_enables; - uint16_t network_enabled_on_boot; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; + SWCAN_SETTINGS swcan2; + uint16_t network_enables_2; + LIN_SETTINGS lin1; uint16_t misc_io_initial_ddr; uint16_t misc_io_initial_latch; - uint16_t misc_io_analog_enable; uint16_t misc_io_report_period; uint16_t misc_io_on_report_events; + uint16_t misc_io_analog_enable; + uint16_t ain_sample_period; + uint16_t ain_threshold; - uint16_t iso15765_separation_time_offset; + uint32_t pwr_man_timeout; + uint16_t pwr_man_enable; - uint16_t iso9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; + uint16_t network_enabled_on_boot; - uint16_t perf_en; + uint16_t iso15765_separation_time_offset; - uint16_t iso_parity; - uint16_t iso_msg_termination; - uint16_t iso_tester_pullup_enable; - uint16_t network_enables_2; + uint16_t iso_9141_kwp_enable_reserved; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; + uint16_t iso_parity_1; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; + uint16_t iso_msg_termination_1; uint16_t idle_wakeup_network_enables_1; uint16_t idle_wakeup_network_enables_2; - uint16_t disableFwLEDs : 1; - uint16_t reservedZero : 15; -} SVCANRFSettings; -#define SVCANRFSettings_SIZE 340 + uint16_t network_enables_3; + uint16_t idle_wakeup_network_enables_3; + + uint16_t can_switch_mode; + STextAPISettings text_api; + TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; + uint16_t hwComLatencyTestEn; + RAD_REPORTING_SETTINGS reporting; + DISK_SETTINGS disk; + LOGGER_SETTINGS logger; + + ETHERNET_SETTINGS2 ethernet1; // DAQ port on label, NETID_ETHERNET + ETHERNET_SETTINGS2 ethernet2; // LAN port on label, NETID_ETHERNET2 + uint16_t network_enables_4; + + RAD_GPTP_SETTINGS gPTP; + uint64_t network_enables_5; +} SRADGalaxySettings; +#define SRADGalaxySettings_SIZE 776 -typedef struct _SECUSettings +typedef struct _SRADStar2Settings { - /* ECU ID used in CAN communications. - * TX ID = ECU ID with bit28 cleared, - * RX ID = ECUID with bit28 set, - * ECU ID = 0 implies ECU ID = serial no with bit 27 set\ - */ - uint32_t ecu_id; + uint16_t perf_en; - uint16_t selected_network;// not supported yet - default to HSCAN + OP_ETH_GENERAL_SETTINGS opEthGen; + OP_ETH_SETTINGS opEth1; + OP_ETH_SETTINGS opEth2; CAN_SETTINGS can1; + CANFD_SETTINGS canfd1; CAN_SETTINGS can2; + CANFD_SETTINGS canfd2; - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; - - uint16_t iso15765_separation_time_offset; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - uint16_t iso_parity; - uint16_t iso_msg_termination; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; - - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enabled_on_boot; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; + uint16_t network_enables; + uint16_t network_enables_2; + LIN_SETTINGS lin1; uint16_t misc_io_initial_ddr; uint16_t misc_io_initial_latch; - uint16_t misc_io_analog_enable; uint16_t misc_io_report_period; uint16_t misc_io_on_report_events; + uint16_t misc_io_analog_enable; uint16_t ain_sample_period; uint16_t ain_threshold; - SWCAN_SETTINGS swcan; - SWCAN_SETTINGS swcan2; - CAN_SETTINGS lsftcan; - CAN_SETTINGS lsftcan2; + uint32_t pwr_man_timeout; + uint16_t pwr_man_enable; - UART_SETTINGS uart; - UART_SETTINGS uart2; + uint16_t network_enabled_on_boot; - STextAPISettings text_api; -} SECUSettings; -#define SECUSettings_SIZE 470 + uint16_t iso15765_separation_time_offset; -typedef struct _SPendantSettings -{ - /* see SECUSettings */ - uint32_t ecu_id; + uint16_t iso_9141_kwp_enable_reserved; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; + uint16_t iso_parity_1; - uint16_t selected_network; /* not supported yet - default to HSCAN */ + uint16_t iso_msg_termination_1; - CAN_SETTINGS can1; - CAN_SETTINGS can2; + uint16_t idle_wakeup_network_enables_1; + uint16_t idle_wakeup_network_enables_2; - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; + uint16_t network_enables_3; + uint16_t idle_wakeup_network_enables_3; - uint16_t iso15765_separation_time_offset; + uint16_t can_switch_mode; + STextAPISettings text_api; + uint16_t pc_com_mode; + TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; + struct + { + uint16_t hwComLatencyTestEn : 1; + uint16_t disableUsbCheckOnBoot : 1; + uint16_t reserved : 14; + } flags; + RAD_REPORTING_SETTINGS reporting; + ETHERNET_SETTINGS2 ethernet; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - uint16_t iso_parity; - uint16_t iso_msg_termination; + RAD_GPTP_SETTINGS gPTP; + uint64_t network_enables_5; +} SRADStar2Settings; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; +#define SRADStar2Settings_SIZE 422 - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enabled_on_boot; +typedef enum +{ + tdmModeTDM2 = 0, + tdmModeTDM4, + tdmModeTDM8, + tdmModeTDM12, + tdmModeTDM16, + tdmModeTDM20, + tdmModeTDM24, + tdmModeTDM32, +} A2BTDMMode; - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; +typedef enum +{ + a2bNodeTypeMonitor = 0, + a2bNodeTypeMaster, + a2bNodeTypeSlave, +} A2BNodeType; - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_analog_enable; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t ain_sample_period; - uint16_t ain_threshold; +#define A2B_SETTINGS_FLAG_16BIT 0x01 - SWCAN_SETTINGS swcan; - SWCAN_SETTINGS swcan2; - CAN_SETTINGS lsftcan; - CAN_SETTINGS lsftcan2; +typedef struct +{ + uint8_t tdmMode; // see enum A2BTDMMode + uint8_t upstreamChannelOffset; + uint8_t downstreamChannelOffset; + uint8_t nodeType; // see enum A2BNodeType + /* + * bit0: 16-bit channel width + */ + uint8_t flags; + uint8_t reserved[15]; +} A2BMonitorSettings; +#define A2BMonitorSettings_SIZE 20 - UART_SETTINGS uart; - UART_SETTINGS uart2; +typedef struct _SRADA2BSettings +{ + uint16_t perf_en; + struct + { + uint16_t hwComLatencyTestEn : 1; + uint16_t disableUsbCheckOnBoot : 1; + uint16_t : 14; + } flags; + uint16_t network_enabled_on_boot; + CAN_SETTINGS can1; + CANFD_SETTINGS canfd1; + CAN_SETTINGS can2; + CANFD_SETTINGS canfd2; + LIN_SETTINGS lin1; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; + uint16_t iso_parity_1; + uint16_t iso_msg_termination_1; + uint64_t network_enables; + uint64_t termination_enables; + TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; + RAD_REPORTING_SETTINGS reporting; + DISK_SETTINGS disk; + LOGGER_SETTINGS logger; + int16_t iso15765_separation_time_offset; + A2BMonitorSettings a2b_monitor; + A2BMonitorSettings a2b_node; + uint32_t pwr_man_timeout; + uint16_t pwr_man_enable; + ETHERNET_SETTINGS2 ethernet; + RAD_GPTP_SETTINGS gPTP; + uint64_t network_enables_5; + CMP_GLOBAL_DATA cmp_global_data; + CMP_NETWORK_DATA cmp_stream_data[CMP_STREAMS_A2B]; +} SRADA2BSettings; - STextAPISettings text_api; -} SPendantSettings; -#define SPendantSettings_SIZE 470 +#define SRADA2BSettings_SIZE 416 -typedef struct _SIEVBSettings +typedef struct _SRADMoon2Settings { - /* see SECUSettings */ - uint32_t ecu_id; - - uint16_t selected_network; /* not supported yet - default to HSCAN */ + uint16_t perf_en; - CAN_SETTINGS can1; - LIN_SETTINGS lin1; + OP_ETH_GENERAL_SETTINGS opEthGen; + OP_ETH_SETTINGS opEth1; uint16_t network_enables; uint16_t network_enables_2; uint16_t network_enabled_on_boot; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_analog_enable; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t ain_sample_period; - uint16_t ain_threshold; - - uint16_t iso15765_separation_time_offset; - - CAN_SETTINGS can2; - LIN_SETTINGS lin2; - - UART_SETTINGS uart; - UART_SETTINGS uart2; + uint16_t network_enables_3; STextAPISettings text_api; - uint32_t reserved_1; - uint32_t reserved_2; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t idle_wakeup_network_enables_1; - uint16_t idle_wakeup_network_enables_2; + uint16_t pc_com_mode; + TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; + uint16_t hwComLatencyTestEn; - uint16_t misc_io_analog_enable_2; + RAD_GPTP_SETTINGS gPTP; + uint64_t network_enables_5; +} SRADMoon2Settings; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - uint16_t iso_parity; - uint16_t iso_msg_termination; - uint16_t iso_tester_pullup_enable; +#define SRADMoon2Settings_SIZE 170 - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; +typedef struct _SRADMoon3Settings +{ + uint16_t perf_en; // 2 -} SIEVBSettings; -#define SIEVBSettings_SIZE 434 + ETHERNET10G_SETTINGS autoEth10g; // 24 + ETHERNET10G_SETTINGS eth10g; // 24 -typedef struct _SEEVBSettings -{ - uint32_t ecu_id; + uint16_t network_enables; // 2 + uint16_t network_enables_2; // 2 + uint16_t network_enabled_on_boot; // 2 + uint16_t network_enables_3; // 2 - CAN_SETTINGS can1; + struct + { + uint16_t enableLatencyTest : 1; + uint16_t reserved : 15; + } flags; // 2 + uint64_t network_enables_5; +} SRADMoon3Settings; - uint16_t network_enables; - uint16_t network_enabled_on_boot; +#define SRADMoon3Settings_SIZE 68 - uint16_t iso15765_separation_time_offset; +typedef struct _SRADGeminiSettings +{ + uint16_t perf_en; // 2 - uint16_t perf_en; + ETHERNET_SETTINGS2 ethernet1; // 16 + ETHERNET_SETTINGS2 ethernet2; // 16 + ETHERNET_SETTINGS2 autoEthernet1; // 16 + ETHERNET_SETTINGS2 autoEthernet2; // 16 - uint16_t ain_sample_period; - uint16_t ain_threshold; + uint16_t network_enabled_on_boot; // 2 + uint16_t network_enables; // 2 + uint16_t network_enables_2; // 2 + uint16_t network_enables_3; // 2 + uint16_t network_enables_4; // 2 + uint64_t network_enables_5; // 8 - uint32_t rsvd; -} SEEVBSettings; -#define SEEVBSettings_SIZE 32 + struct + { + uint16_t enableLatencyTest : 1; + uint16_t reserved : 15; + } flags; // 2 +} SRADGeminiSettings; -/* GPTP portEnable options */ -enum eGPTPPort -{ - ePortDisabled = 0, - ePortOpEth1 = 1, - ePortOpEth2 = 2, - ePortOpEth3 = 3, - ePortOpEth4 = 4, - ePortOpEth5 = 5, - ePortOpEth6 = 6, - ePortOpEth7 = 7, - ePortOpEth8 = 8, - ePortOpEth9 = 9, - ePortOpEth10 = 10, - ePortOpEth11 = 11, - ePortOpEth12 = 12, - ePortStdEth1 = 13, - ePortStdEth2 = 14, -}; +#define SRADGeminiSettings_SIZE 86 -/* GPTP port role options */ -enum eGPTPRole +typedef struct _SRADGigastarSettings { - eRoleDisabled = 0, - eRolePassive = 1, - eRoleMaster = 2, - eRoleSlave = 3, -}; + uint32_t ecu_id; -typedef struct _SRADGalaxySettings -{ uint16_t perf_en; - OP_ETH_GENERAL_SETTINGS opEthGen; - OP_ETH_SETTINGS opEth1; - OP_ETH_SETTINGS opEth2; - OP_ETH_SETTINGS opEth3; - OP_ETH_SETTINGS opEth4; - OP_ETH_SETTINGS opEth5; - OP_ETH_SETTINGS opEth6; - OP_ETH_SETTINGS opEth7; - OP_ETH_SETTINGS opEth8; - OP_ETH_SETTINGS opEth9; - OP_ETH_SETTINGS opEth10; - OP_ETH_SETTINGS opEth11; - OP_ETH_SETTINGS opEth12; - CAN_SETTINGS can1; CANFD_SETTINGS canfd1; CAN_SETTINGS can2; @@ -2355,86 +2834,10 @@ typedef struct _SRADGalaxySettings CANFD_SETTINGS canfd5; CAN_SETTINGS can6; CANFD_SETTINGS canfd6; - CAN_SETTINGS can7; - CANFD_SETTINGS canfd7; - CAN_SETTINGS can8; - CANFD_SETTINGS canfd8; - /* Native CAN are either LS1/LS2 or SW1/SW2 */ - SWCAN_SETTINGS swcan1; uint16_t network_enables; - SWCAN_SETTINGS swcan2; uint16_t network_enables_2; - LIN_SETTINGS lin1; - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t misc_io_analog_enable; - uint16_t ain_sample_period; - uint16_t ain_threshold; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t network_enabled_on_boot; - - uint16_t iso15765_separation_time_offset; - - uint16_t iso_9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; - uint16_t iso_parity_1; - - uint16_t iso_msg_termination_1; - - uint16_t idle_wakeup_network_enables_1; - uint16_t idle_wakeup_network_enables_2; - - uint16_t network_enables_3; - uint16_t idle_wakeup_network_enables_3; - - uint16_t can_switch_mode; - STextAPISettings text_api; - TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; - uint16_t hwComLatencyTestEn; - RAD_REPORTING_SETTINGS reporting; - DISK_SETTINGS disk; - LOGGER_SETTINGS logger; - - ETHERNET_SETTINGS2 ethernet1;// DAQ port on label, NETID_ETHERNET - ETHERNET_SETTINGS2 ethernet2;// LAN port on label, NETID_ETHERNET2 - uint16_t network_enables_4; - - RAD_GPTP_SETTINGS gPTP; -} SRADGalaxySettings; -#define SRADGalaxySettings_SIZE 768 - -typedef struct _SRADStar2Settings -{ - uint16_t perf_en; - - OP_ETH_GENERAL_SETTINGS opEthGen; - OP_ETH_SETTINGS opEth1; - OP_ETH_SETTINGS opEth2; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - - uint16_t network_enables; - uint16_t network_enables_2; - - LIN_SETTINGS lin1; - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t misc_io_analog_enable; - uint16_t ain_sample_period; - uint16_t ain_threshold; - uint32_t pwr_man_timeout; uint16_t pwr_man_enable; @@ -2454,141 +2857,60 @@ typedef struct _SRADStar2Settings uint16_t network_enables_3; uint16_t idle_wakeup_network_enables_3; - uint16_t can_switch_mode; STextAPISettings text_api; - uint16_t pc_com_mode; - TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; - uint16_t hwComLatencyTestEn; - RAD_REPORTING_SETTINGS reporting; - ETHERNET_SETTINGS2 ethernet; - - RAD_GPTP_SETTINGS gPTP; -} SRADStar2Settings; - -#define SRADStar2Settings_SIZE 414 - -typedef struct _SRADSuperMoonSettings -{ - uint16_t perf_en; - - OP_ETH_GENERAL_SETTINGS opEthGen; - OP_ETH_SETTINGS opEth1; - - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enabled_on_boot; - uint16_t network_enables_3; + uint64_t termination_enables; - STextAPISettings text_api; + DISK_SETTINGS disk; - uint16_t pc_com_mode; TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; - uint16_t hwComLatencyTestEn; - - ETHERNET_SETTINGS2 Eth2; - - RAD_GPTP_SETTINGS gPTP; -} SRADSuperMoonSettings; - -#define SRADSuperMoonSettings_SIZE 178 - -typedef enum -{ - tdmModeTDM2 = 0, - tdmModeTDM4, - tdmModeTDM8, - tdmModeTDM12, - tdmModeTDM16, - tdmModeTDM20, - tdmModeTDM24, - tdmModeTDM32, -} A2BTDMMode; - -typedef enum -{ - a2bNodeTypeMonitor = 0, - a2bNodeTypeMaster, - a2bNodeTypeSlave, -} A2BNodeType; - -#define A2B_SETTINGS_FLAG_16BIT 0x01 - -typedef struct -{ - uint8_t tdmMode; // see enum A2BTDMMode - uint8_t upstreamChannelOffset; - uint8_t downstreamChannelOffset; - uint8_t nodeType; // see enum A2BNodeType - /* - * bit0: 16-bit channel width - */ - uint8_t flags; - uint8_t reserved[15]; -} A2BMonitorSettings; -#define A2BMonitorSettings_SIZE 20 - -typedef struct _SRADA2BSettings -{ - // TODO!!!! - uint16_t perf_en; struct { uint16_t hwComLatencyTestEn : 1; - uint16_t : 15; + uint16_t disableUsbCheckOnBoot : 1; + uint16_t reserved : 14; } flags; - uint16_t network_enabled_on_boot; - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - LIN_SETTINGS lin1; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; - uint16_t iso_parity_1; - uint16_t iso_msg_termination_1; - uint64_t network_enables; - uint64_t termination_enables; - TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; - RAD_REPORTING_SETTINGS reporting; - DISK_SETTINGS disk; - LOGGER_SETTINGS logger; - int16_t iso15765_separation_time_offset; - A2BMonitorSettings a2b_monitor; - A2BMonitorSettings a2b_node; - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; -} SRADA2BSettings; - -#define SRADA2BSettings_SIZE 280 + ETHERNET_SETTINGS2 ethernet1; + ETHERNET_SETTINGS2 ethernet2; -typedef struct _SRADMoon2Settings -{ - uint16_t perf_en; + LIN_SETTINGS lin1; OP_ETH_GENERAL_SETTINGS opEthGen; OP_ETH_SETTINGS opEth1; + OP_ETH_SETTINGS opEth2; - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enabled_on_boot; - uint16_t network_enables_3; - - STextAPISettings text_api; + SERDESCAM_SETTINGS serdescam1; + SERDESPOC_SETTINGS serdespoc; + LOGGER_SETTINGS logger; + SERDESCAM_SETTINGS serdescam2; + SERDESCAM_SETTINGS serdescam3; + SERDESCAM_SETTINGS serdescam4; + RAD_REPORTING_SETTINGS reporting; + uint16_t network_enables_4; + SERDESGEN_SETTINGS serdesgen; - uint16_t pc_com_mode; - TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; - uint16_t hwComLatencyTestEn; - RAD_GPTP_SETTINGS gPTP; -} SRADMoon2Settings; + uint64_t network_enables_5; + // SFP T1S + ETHERNET10T1S_SETTINGS sfp_t1s_1; + ETHERNET10T1S_SETTINGS_EXT sfp_t1s_ext_1; + ETHERNET10T1S_SETTINGS sfp_t1s_2; + ETHERNET10T1S_SETTINGS_EXT sfp_t1s_ext_2; + + CMP_GLOBAL_DATA cmp_global_data; + CMP_NETWORK_DATA cmp_stream_data[CMP_STREAMS_GIGASTAR]; + // SFP T1L + ETHERNET10T1L_SETTINGS sfp_t1l_1; + ETHERNET10T1L_SETTINGS sfp_t1l_2; +} SRADGigastarSettings; -#define SRADMoon2Settings_SIZE 162 +#define SRADGigastarSettings_SIZE 1026 -typedef struct _SRADGigalogSettings +typedef struct _SRADGalaxy2Settings { uint32_t ecu_id; - uint16_t perf_en; + /* CAN */ CAN_SETTINGS can1; CANFD_SETTINGS canfd1; CAN_SETTINGS can2; @@ -2606,7 +2928,9 @@ typedef struct _SRADGigalogSettings CAN_SETTINGS can8; CANFD_SETTINGS canfd8; + // SWCAN_SETTINGS swcan1; G2 does not have SWCAN. uint16_t network_enables; + // SWCAN_SETTINGS swcan2; G2 does not have SWCAN. uint16_t network_enables_2; uint32_t pwr_man_timeout; @@ -2614,153 +2938,93 @@ typedef struct _SRADGigalogSettings uint16_t network_enabled_on_boot; + /* ISO15765-2 Transport Layer */ uint16_t iso15765_separation_time_offset; + /* ISO9141 - Keyword */ uint16_t iso_9141_kwp_enable_reserved; ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; uint16_t iso_parity_1; - uint16_t iso_msg_termination_1; uint16_t idle_wakeup_network_enables_1; uint16_t idle_wakeup_network_enables_2; + /* reserved for T1 networks such as BR1, BR2, etc.. */ uint16_t network_enables_3; uint16_t idle_wakeup_network_enables_3; STextAPISettings text_api; - uint64_t termination_enables; - uint8_t rsvd1[8];// previously ETHERNET_SETTINGS - uint8_t rsvd2[8];// previously ETHERNET10G_SETTINGS - DISK_SETTINGS disk; + uint64_t termination_enables; // New feature unlike Galaxy. TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; struct { uint16_t hwComLatencyTestEn : 1; - uint16_t disableUsbCheckOnBoot : 1; + uint16_t hwFramePackerEn : 1; uint16_t reserved : 14; } flags; - ETHERNET_SETTINGS2 ethernet; - - SERDESCAM_SETTINGS serdescam1; - ETHERNET10G_SETTINGS ethernet10g; LIN_SETTINGS lin1; - SERDESPOC_SETTINGS serdespoc; - LOGGER_SETTINGS logger; - SERDESCAM_SETTINGS serdescam2; - SERDESCAM_SETTINGS serdescam3; - SERDESCAM_SETTINGS serdescam4; + OP_ETH_GENERAL_SETTINGS opEthGen; + OP_ETH_SETTINGS opEth1; + OP_ETH_SETTINGS opEth2; + OP_ETH_SETTINGS opEth3; + OP_ETH_SETTINGS opEth4; + OP_ETH_SETTINGS opEth5; + OP_ETH_SETTINGS opEth6; + OP_ETH_SETTINGS opEth7; + OP_ETH_SETTINGS opEth8; + OP_ETH_SETTINGS opEth9; + OP_ETH_SETTINGS opEth10; + OP_ETH_SETTINGS opEth11; + OP_ETH_SETTINGS opEth12; + OP_ETH_SETTINGS opEth13; + OP_ETH_SETTINGS opEth14; + OP_ETH_SETTINGS opEth15; + OP_ETH_SETTINGS opEth16; + + ETHERNET10G_SETTINGS ethernet10g_3; + ETHERNET10G_SETTINGS ethernet10g; + ETHERNET10G_SETTINGS ethernet10g_2; - ETHERNET_SETTINGS2 ethernet2; uint16_t network_enables_4; RAD_REPORTING_SETTINGS reporting; - SERDESGEN_SETTINGS serdesgen; - -} SRADGigalogSettings; + RAD_GPTP_SETTINGS gPTP; + uint64_t network_enables_5; -#define SRADGigalogSettings_SIZE 698 + LIN_SETTINGS lin2; + uint16_t iso_9141_kwp_enable_reserved_2; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; + uint16_t iso_parity_2; + uint16_t iso_msg_termination_2; + CMP_GLOBAL_DATA cmp_global_data; + CMP_NETWORK_DATA cmp_stream_data[CMP_STREAMS_GALAXY2]; +} SRADGalaxy2Settings; +#define SRADGalaxy2Settings_SIZE 1204 -typedef struct _SRADGigastarSettings +typedef struct _SVividCANSettings { uint32_t ecu_id; - uint16_t perf_en; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - CAN_SETTINGS can3; - CANFD_SETTINGS canfd3; - CAN_SETTINGS can4; - CANFD_SETTINGS canfd4; - CAN_SETTINGS can5; - CANFD_SETTINGS canfd5; - CAN_SETTINGS can6; - CANFD_SETTINGS canfd6; + CAN_SETTINGS can1; // 12 bytes + SWCAN_SETTINGS swcan1; // 14 bytes + CAN_SETTINGS lsftcan1; // 12 bytes uint16_t network_enables; - uint16_t network_enables_2; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - uint16_t network_enabled_on_boot; uint16_t iso15765_separation_time_offset; - uint16_t iso_9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; - uint16_t iso_parity_1; - - uint16_t iso_msg_termination_1; - - uint16_t idle_wakeup_network_enables_1; - uint16_t idle_wakeup_network_enables_2; + uint16_t perf_en; - uint16_t network_enables_3; - uint16_t idle_wakeup_network_enables_3; + uint32_t pwr_man_timeout; + uint16_t pwr_man_enable; - STextAPISettings text_api; - uint64_t termination_enables; - - DISK_SETTINGS disk; - - TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; - struct - { - uint16_t hwComLatencyTestEn : 1; - uint16_t disableUsbCheckOnBoot : 1; - uint16_t reserved : 14; - } flags; - ETHERNET_SETTINGS2 ethernet1; - ETHERNET_SETTINGS2 ethernet2; - - LIN_SETTINGS lin1; - - OP_ETH_GENERAL_SETTINGS opEthGen; - OP_ETH_SETTINGS opEth1; - OP_ETH_SETTINGS opEth2; - - SERDESCAM_SETTINGS serdescam1; - SERDESPOC_SETTINGS serdespoc; - LOGGER_SETTINGS logger; - SERDESCAM_SETTINGS serdescam2; - SERDESCAM_SETTINGS serdescam3; - SERDESCAM_SETTINGS serdescam4; - RAD_REPORTING_SETTINGS reporting; - uint16_t network_enables_4; - SERDESGEN_SETTINGS serdesgen; - - RAD_GPTP_SETTINGS gPTP; -} SRADGigastarSettings; - -#define SRADGigastarSettings_SIZE 702 - -typedef struct _SVividCANSettings -{ - uint32_t ecu_id; - - CAN_SETTINGS can1;// 12 bytes - SWCAN_SETTINGS swcan1;// 14 bytes - CAN_SETTINGS lsftcan1;// 12 bytes - - uint16_t network_enables; - uint16_t network_enabled_on_boot; - - uint16_t iso15765_separation_time_offset; - - uint16_t perf_en; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t can_switch_mode; - uint16_t termination_enables; + uint16_t can_switch_mode; + uint16_t termination_enables; struct { @@ -2771,120 +3035,6 @@ typedef struct _SVividCANSettings } SVividCANSettings; #define SVividCANSettings_SIZE 64 -typedef struct _SOBD2SimSettings -{ - CAN_SETTINGS can1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd1; - CANFD_SETTINGS canfd2; - - uint64_t network_enables; - uint16_t network_enabled_on_boot; - - int16_t iso15765_separation_time_offset; - - uint16_t perf_en; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t misc_io_analog_enable; - uint16_t ain_sample_period; - uint16_t ain_threshold; - - struct - { - uint32_t : 1; - uint32_t enableLatencyTest : 1; - uint32_t reserved : 30; - } flags; - - STextAPISettings text_api; -} SOBD2SimSettings; -#define SOBD2SimSettings_SIZE 148 - -typedef struct _CmProbeSettings -{ - // uint16_t perf_en; - - // ETHERNET_SETTINGS eth1; // 16 bytes - // OP_ETH_SETTINGS opEth1; - - uint16_t network_enables; - - // uint16_t misc_io_initial_ddr; - // uint16_t misc_io_initial_latch; - // uint16_t misc_io_report_period; - // uint16_t misc_io_on_report_events; - // uint16_t misc_io_analog_enable; - // uint16_t ain_sample_period; - // uint16_t ain_threshold; - // - // uint32_t pwr_man_timeout; - // uint16_t pwr_man_enable; - // - uint16_t network_enabled_on_boot; - // - // uint16_t idle_wakeup_network_enables_1; - -} CmProbeSettings, SCmProbeSettings; -#define CmProbeSettings_SIZE 4 - -typedef struct _OBD2ProSettings -{ - /* Performance Test */ - uint16_t perf_en; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - CAN_SETTINGS can3; - CANFD_SETTINGS canfd3; - CAN_SETTINGS can4; - CANFD_SETTINGS canfd4; - - SWCAN_SETTINGS swcan1; - - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; - - ETHERNET_SETTINGS ethernet; - - /* ISO9141 - Keyword */ - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; - uint16_t iso_parity_1; - uint16_t iso_msg_termination_1; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; - - uint64_t network_enables; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t network_enabled_on_boot; - - /* ISO15765-2 Transport Layer */ - int16_t iso15765_separation_time_offset; - - STextAPISettings text_api; - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t reserved : 30; - } flags; - uint16_t can_switch_mode; - - uint16_t misc_io_analog_enable; - ETHERNET_SETTINGS2 ethernet2; -} OBD2ProSettings, SOBD2ProSettings; -#define OBD2ProSettings_SIZE 482 - typedef struct _VCAN412Settings { /* Performance Test */ @@ -2917,271 +3067,6 @@ typedef struct _VCAN412Settings #define VCAN412Settings_SIZE 148 #define SVCAN412Settings_SIZE VCAN412Settings_SIZE -typedef struct _neoECU_AVBSettings -{ - /* Performance Test */ - uint16_t perf_en; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - - uint64_t network_enables; - uint64_t termination_enables; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t network_enabled_on_boot; - - /* ISO15765-2 Transport Layer */ - int16_t iso15765_separation_time_offset; - - STextAPISettings text_api; - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t reserved : 30; - } flags; -} ECU_AVBSettings, SECU_AVBSettings; -#define ECU_AVBSettings_SIZE 148 - -#define PLUTO_NUM_PORTS 5 -#define PLUTO_NUM_PRIORITY 8 -#define PLUTO_MAX_L2_POLICING 45 -#define PLUTO_MAX_L2_ADDRESS_LOOKUP 1024 -#define PLUTO_MAX_VLAN_LOOKUP 4096 -#define PLUTO_MAX_FORWARDING_ENTRIES 13 -#define PLUTO_MAX_MAC_CONFIG_ENTRIES 5 -#define PLUTO_MAX_RETAGGING_ENTRIES 32 -#define MAX_VL_POLICING_ENTRIES 1024 -#define MAX_VL_FORWARDING_ENTRIES 1024 - -typedef struct SPluto_L2AddressLookupEntry_s -{ - uint16_t index; - uint16_t vlanID; - uint8_t macaddr[6]; - uint8_t destports; - uint8_t enfport; - uint8_t learnedEntry; - uint8_t pad1; - uint8_t pad2; - uint8_t pad3; -} SPluto_L2AddressLookupEntry;//16 - -typedef struct SPluto_L2AddressLookupParams_s -{ - uint16_t maxage; - uint8_t dyn_tbsz; - uint8_t poly; - uint8_t shared_learn; - uint8_t no_enf_hostprt; - uint8_t no_mgmt_learn; - uint8_t pad; -} SPluto_L2AddressLookupParams;//8 - -typedef struct SPluto_L2ForwardingParams_s -{ - uint16_t part_spc[PLUTO_NUM_PRIORITY]; - uint8_t max_dynp; - uint8_t pad; -} SPluto_L2ForwardingParams;//18 - -typedef struct SPluto_L2ForwardingEntry_s -{ - uint8_t vlan_pmap[PLUTO_NUM_PRIORITY]; - uint8_t bc_domain; - uint8_t reach_port; - uint8_t fl_domain; - uint8_t pad; -} SPluto_L2ForwardingEntry;//12 - -typedef struct SPluto_L2Policing_s -{ - uint16_t smax; - uint16_t rate; - uint16_t maxlen; - uint8_t sharindx; - uint8_t partition; -} SPluto_L2Policing;//8 - -typedef struct SPluto_VlanLookup_s -{ - uint16_t vlanid; - uint8_t ving_mirr; - uint8_t vegr_mirr; - uint8_t vmemb_port; - uint8_t vlan_bc; - uint8_t tag_port; - uint8_t pad; -} SPluto_VlanLookup;//8 - -typedef struct SPluto_MacConfig_s -{ - uint16_t top[PLUTO_NUM_PRIORITY]; - uint16_t base[PLUTO_NUM_PRIORITY]; - uint16_t tp_delin; - uint16_t tp_delout; - uint16_t vlanid; - uint8_t enabled[PLUTO_NUM_PRIORITY]; - uint8_t ifg; - uint8_t speed; - uint8_t maxage; - uint8_t vlanprio; - uint8_t ing_mirr; - uint8_t egr_mirr; - uint8_t drpnona664; - uint8_t drpdtag; - uint8_t drpuntag; - uint8_t retag; - uint8_t dyn_learn; - uint8_t egress; - uint8_t ingress; - uint8_t pad; -} SPluto_MacConfig;//60 - -typedef struct SPluto_RetaggingEntry_s -{ - uint16_t vlan_egr; - uint16_t vlan_ing; - uint8_t egr_port; - uint8_t ing_port; - uint8_t do_not_learn; - uint8_t use_dest_ports; - uint8_t destports; - uint8_t pad; -} SPluto_RetaggingEntry;//10 - -typedef struct SPluto_GeneralParams_s -{ - uint64_t mac_fltres1; - uint64_t mac_fltres0; - uint64_t mac_flt1; - uint64_t mac_flt0; - uint32_t vlmarker; - uint32_t vlmask; - uint16_t tpid; - uint16_t tpid2; - uint8_t vllupformat; - uint8_t mirr_ptacu; - uint8_t switchid; - uint8_t hostprio; - uint8_t incl_srcpt1; - uint8_t incl_srcpt0; - uint8_t send_meta1; - uint8_t send_meta0; - uint8_t casc_port; - uint8_t host_port; - uint8_t mirr_port; - uint8_t ignore2stf; -} SPluto_GeneralParams;//60 - -typedef struct SPluto_VlLookupEntry_s -{ - union { - /* format == 0 */ - struct - { - uint64_t macaddr; - uint16_t vlanid; - uint8_t destports; - uint8_t iscritical; - uint8_t port; - uint8_t vlanprior; - } vllupformat0;//14 - /* format == 1 */ - struct - { - uint16_t vlid; - uint8_t egrmirr; - uint8_t ingrmirr; - uint8_t port; - } vllupformat1;//5 - }; -} SPluto_VlLookupEntry;//14 - -typedef struct SPluto_VlPolicingEntry_s -{ - uint64_t type; - uint64_t maxlen; - uint64_t sharindx; - uint64_t bag; - uint64_t jitter; -} SPluto_VlPolicingEntry;//40 - -typedef struct SPluto_VlForwardingParams_s -{ - uint16_t partspc[PLUTO_NUM_PRIORITY]; - uint8_t debugen; - uint8_t pad; -} SPluto_VlForwardingParams;//18 - -typedef struct SPluto_VlForwardingEntry_s -{ - uint8_t type; - uint8_t priority; - uint8_t partition; - uint8_t destports; -} SPluto_VlForwardingEntry;//4 - -typedef struct SPluto_AVBParams_s -{ - uint64_t destmeta; - uint64_t srcmeta; -} SPluto_AVBParams;//16 - -typedef struct SPluto_ClockSyncParams_s -{ - uint64_t etssrcpcf; - uint32_t wfintmout; - uint32_t maxtranspclk; - uint32_t listentmout; - uint32_t intcydur; - uint32_t caentmout; - uint16_t pcfsze; - uint16_t obvwinsz; - uint16_t vlidout; - uint16_t vlidimnmin; - uint16_t vlidinmax; - uint16_t accdevwin; - uint8_t srcport[8]; - uint8_t waitthsync; - uint8_t unsytotsyth; - uint8_t unsytosyth; - uint8_t tsytosyth; - uint8_t tsyth; - uint8_t tsytousyth; - uint8_t syth; - uint8_t sytousyth; - uint8_t sypriority; - uint8_t sydomain; - uint8_t stth; - uint8_t sttointth; - uint8_t pcfpriority; - uint8_t numunstbcy; - uint8_t numstbcy; - uint8_t maxintegcy; - uint8_t inttotentth; - uint8_t inttosyncth; - uint8_t vlidselect; - uint8_t tentsyrelen; - uint8_t asytensyen; - uint8_t sytostben; - uint8_t syrelen; - uint8_t sysyen; - uint8_t syasyen; - uint8_t ipcframesy; - uint8_t stabasyen; - uint8_t swmaster; - uint8_t fullcbg; - uint8_t pad1; - uint8_t pad2; - uint8_t pad3; -} SPluto_ClockSyncParams;//80 - #define gPTP_ROLE_DISABLED 0 #define gPTP_ROLE_PASSIVE 1 #define gPTP_ROLE_MASTER 2 @@ -3193,108 +3078,14 @@ typedef struct SPluto_ClockSyncParams_s #define gPTP_PORT_DISABLED 0 #define gPTP_PORT_ENABLED 1 -typedef struct SPlutoPtpParams_s -{ - uint32_t neighborPropDelayThresh;//ns - uint32_t sys_phc_sync_interval;//ns - int8_t logPDelayReqInterval;// log2ms - int8_t logSyncInterval;// log2ms - int8_t logAnnounceInterval;// log2ms - uint8_t profile; - uint8_t priority1; - uint8_t clockclass; - uint8_t clockaccuracy; - uint8_t priority2; - uint16_t offset_scaled_log_variance; - uint8_t gPTPportRole[PLUTO_NUM_PORTS - 1];// the 5th port is used for SAM - uint8_t portEnable[PLUTO_NUM_PORTS - 1];// the 5th port is used for SAM -} PlutoPtpParams_t;//26 - -typedef struct SPluto_CustomParams_s -{ - uint8_t mode[PLUTO_MAX_MAC_CONFIG_ENTRIES]; - uint8_t speed[PLUTO_MAX_MAC_CONFIG_ENTRIES]; - uint8_t enablePhy[PLUTO_MAX_MAC_CONFIG_ENTRIES]; - uint8_t ae1Select; - uint8_t usbSelect; - uint8_t pad; - PlutoPtpParams_t ptpParams; -} SPluto_CustomParams;//44 - -typedef struct SPlutoSwitchSettings_s -{ - ExtendedDataFlashHeader_t flashHeader;//all extended data must start with this header //8 - SPluto_L2AddressLookupParams l2_addressLookupParams;// 8 - SPluto_L2AddressLookupEntry l2_addressLookupEntries[PLUTO_MAX_L2_ADDRESS_LOOKUP];// 16 * 1024 - SPluto_L2Policing l2_policing[PLUTO_MAX_L2_POLICING];// 8 * 45 - SPluto_L2ForwardingParams l2_forwardingParams;// 18 - SPluto_L2ForwardingEntry l2_ForwardingEntries[PLUTO_MAX_FORWARDING_ENTRIES];// 12 * 13 - SPluto_VlanLookup vlan_LookupEntries[PLUTO_MAX_VLAN_LOOKUP];// 8 * 4096 - SPluto_MacConfig macConfig[PLUTO_MAX_MAC_CONFIG_ENTRIES];// 60 * 5 - SPluto_GeneralParams generalParams;// 60 - SPluto_RetaggingEntry retagging[PLUTO_MAX_RETAGGING_ENTRIES];// 10 * 32 -#if 0 - SPluto_VlPolicingEntry vl_policing[MAX_VL_POLICING_ENTRIES]; - SPluto_VlForwardingParams vl_forwardingParams; - SPluto_VlForwardingEntry vl_forwardingEntries[MAX_VL_FORWARDING_ENTRIES]; - SPluto_AVBParams avbParams; - SPluto_ClockSyncParams clkSyncParams; -#endif -} SPlutoSwitchSettings; -#define SPlutoSwitchSettings_SIZE 50378 - -typedef struct _RADPlutoSettings +typedef union { - /* Performance Test */ - uint16_t perf_en;//2 - - CAN_SETTINGS can1;//12 - CANFD_SETTINGS canfd1;//10 - CAN_SETTINGS can2;//12 - CANFD_SETTINGS canfd2;//10 - LIN_SETTINGS lin1;//10 - - uint16_t network_enables;//2 - uint16_t network_enables_2;//2 - uint16_t network_enables_3;//2 - uint64_t termination_enables;//8 - uint16_t misc_io_analog_enable;//2 - - uint32_t pwr_man_timeout;//4 - uint16_t pwr_man_enable;//2 - - uint16_t network_enabled_on_boot;//2 - - /* ISO15765-2 Transport Layer */ - int16_t iso15765_separation_time_offset;//2 - uint16_t iso9141_kwp_enable_reserved;//2 - uint16_t iso_tester_pullup_enable;//2 - uint16_t iso_parity;//2 - uint16_t iso_msg_termination;//2 - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings;//114 - ETHERNET_SETTINGS ethernet;//8 - - STextAPISettings text_api;//72 - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t reserved : 29; - } flags;//4 - - SPluto_CustomParams custom;//44 - ETHERNET_SETTINGS2 ethernet2;//16 -} SRADPlutoSettings; -#define SRADPlutoSettings_SIZE 348 - -typedef union { uint32_t word; struct { - unsigned can_sleep_command_id:29; - unsigned can_sleep_command_isExtended:1; - unsigned reserved:2; + unsigned can_sleep_command_id : 29; + unsigned can_sleep_command_isExtended : 1; + unsigned reserved : 2; } id; } SCANSleepID; typedef struct @@ -3323,7 +3114,8 @@ typedef struct _SFlexVnetzSettings uint16_t flex_termination; uint16_t slaveVnetA; uint64_t termination_enables; - union { + union + { uint64_t word; struct { @@ -3388,84 +3180,1013 @@ typedef struct _NeoECU12Settings CAN_SETTINGS lsftcan2; LIN_SETTINGS lin1; - uint64_t network_enables; - uint16_t network_enabled_on_boot; + uint64_t network_enables; + uint16_t network_enabled_on_boot; + + uint64_t termination_enables; + uint16_t can_switch_mode; + + /* ISO9141 - Keyword */ + uint16_t iso_9141_kwp_enable_reserved; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; + uint16_t iso_parity; + uint16_t iso_msg_termination; + + uint32_t pwr_man_timeout; + uint16_t pwr_man_enable; + uint16_t perf_en; + uint16_t misc_io_initial_ddr; + uint16_t misc_io_initial_latch; + uint16_t misc_io_analog_enable; + uint16_t misc_io_report_period; + uint16_t misc_io_on_report_events; + uint16_t ain_sample_period; + uint16_t ain_threshold; + int16_t iso15765_separation_time_offset; + STextAPISettings text_api; + struct + { + uint32_t disableUsbCheckOnBoot : 1; + uint32_t enableLatencyTest : 1; + uint32_t reserved : 30; + } flags; + uint32_t reserved_field[2]; //#3166 reserved field for downgrade support +} SNeoECU12Settings; +#define SNeoECU12Settings_SIZE 358 + +typedef struct _VCAN4IndSettings +{ + CAN_SETTINGS can1; + CANFD_SETTINGS canfd1; + CAN_SETTINGS can2; + CANFD_SETTINGS canfd2; + ETHERNET_SETTINGS ethernet; + LIN_SETTINGS lin1; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; + uint16_t iso_parity; + uint16_t iso_msg_termination; + + uint32_t pwr_man_timeout; + uint16_t pwr_man_enable; + uint16_t perf_en; + int16_t iso15765_separation_time_offset; + uint16_t network_enabled_on_boot; + + union + { + uint64_t word; + struct + { + uint16_t network_enables; + uint16_t network_enables_2; + uint16_t network_enables_3; + }; + } network_enables; + uint64_t termination_enables; + struct + { + uint32_t disableUsbCheckOnBoot : 1; + uint32_t enableLatencyTest : 1; + uint32_t busMessagesToAndroid : 1; + uint32_t enablePcEthernetComm : 1; + uint32_t reserved : 28; + } flags; + ETHERNET_SETTINGS2 ethernet2; +} VCAN4IndSettings, SVCAN4IndSettings; +#define VCAN4IndSettings_SIZE (228) + +typedef struct _SOBD2LCSettings +{ + /* Performance Test */ + uint16_t perf_en; + CAN_SETTINGS can1; + CANFD_SETTINGS canfd1; + CAN_SETTINGS can2; + CANFD_SETTINGS canfd2; + CAN_SETTINGS can3; + CANFD_SETTINGS canfd3; + CAN_SETTINGS can4; + CANFD_SETTINGS canfd4; + SWCAN_SETTINGS swcan1; + LIN_SETTINGS lin1; + /* ISO9141 - Keyword */ + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; + uint16_t iso_parity; + uint16_t iso_msg_termination; + union + { + uint64_t word; + struct + { + uint16_t network_enables; + uint16_t network_enables_2; + uint16_t network_enables_3; + }; + } network_enables; + uint32_t pwr_man_timeout; + uint16_t pwr_man_enable; + uint16_t network_enabled_on_boot; + /* ISO15765-2 Transport Layer */ + int16_t iso15765_separation_time_offset; + STextAPISettings text_api; + struct + { + uint32_t disableUsbCheckOnBoot : 1; + uint32_t enableLatencyTest : 1; + uint32_t busMessagesToAndroid : 1; + uint32_t enablePcEthernetComm : 1; + uint32_t enableDefaultLogger : 1; + uint32_t enableDefaultUpload : 1; + uint32_t reserved : 26; + } flags; + uint16_t can_switch_mode; + uint16_t misc_io_on_report_events; + DISK_SETTINGS disk; + ETHERNET_SETTINGS ethernet; + ETHERNET_SETTINGS2 ethernet2; // supercedes ethernet settings + uint16_t iso_tester_pullup_enable; +} OBD2LCSettings, SOBD2LCSettings; +#define OBD2LCSettings_SIZE 370 + +#define RADJUPITER_NUM_PORTS 8 + +typedef struct SJupiterPtpParams_s +{ + uint32_t neighborPropDelay; //ns + int8_t initLogPDelayReqInterval; // log2ms + int8_t initLogSyncInterval; // log2ms + int8_t operationLogPDelayReqInterval; // log2ms + int8_t operationLogSyncInterval; // log2ms + uint8_t gPTPportRole[RADJUPITER_NUM_PORTS]; // the 6th port is used for SAM +} JupiterPtpParams_t; //16 + +typedef struct _SRADJupiterSwitchSettings +{ + uint8_t phyMode[RADJUPITER_NUM_PORTS]; //8 + uint8_t enablePhy[RADJUPITER_NUM_PORTS]; //8 + uint8_t port7Select; //1 + uint8_t port8Select; //1 + uint8_t port8Speed; + uint8_t port8Legacy; + uint8_t spoofMacFlag; + uint8_t spoofedMac[6]; + uint8_t pad; + JupiterPtpParams_t ptpParams_unused; //16 +} SRADJupiterSwitchSettings; //44 + +typedef struct _SRADJupiterSettings +{ + /* Performance Test */ + uint16_t perf_en; //2 + + CAN_SETTINGS can1; //12 + CANFD_SETTINGS canfd1; //10 + CAN_SETTINGS can2; //12 + CANFD_SETTINGS canfd2; //10 + LIN_SETTINGS lin1; //10 + + uint16_t network_enables; //2 + uint16_t network_enables_2; //2 + uint16_t network_enables_3; //2 + uint64_t termination_enables; //8 + uint16_t misc_io_analog_enable; //2 + + uint32_t pwr_man_timeout; //4 + uint16_t pwr_man_enable; //2 + + uint16_t network_enabled_on_boot; //2 + + /* ISO15765-2 Transport Layer */ + int16_t iso15765_separation_time_offset; //2 + uint16_t iso9141_kwp_enable_reserved; //2 + uint16_t iso_tester_pullup_enable; //2 + uint16_t iso_parity; //2 + uint16_t iso_msg_termination; //2 + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; //114 + ETHERNET_SETTINGS ethernet; //8 + + STextAPISettings text_api; //72 + + struct + { + uint32_t disableUsbCheckOnBoot : 1; + uint32_t enableLatencyTest : 1; + uint32_t enablePcEthernetComm : 1; + uint32_t reserved : 29; + } flags; //4 + + SRADJupiterSwitchSettings switchSettings; //44 + ETHERNET_SETTINGS2 ethernet2; +} SRADJupiterSettings; //348 + +#define SRADJupiterSettings_SIZE 348 + +#define LINUX_BOOT_ALLOWED (1) + +#define WIFI_ANTENNA_INTERNAL (0) +#define WIFI_ANTENNA_EXTERNAL (1) + +#define LINUX_CONFIG_PORT_NONE (0) +#define LINUX_CONFIG_PORT_ETH_01 (1) +#define LINUX_CONFIG_PORT_ETH_02 (2) +typedef struct +{ + uint8_t allowBoot; // 0 - disable booting Linux, 1 - enable booting Linux, Others - Disable booting linux + uint8_t useExternalWifiAntenna; // 0 for internal, 1 for external, Others - Internal + uint8_t + ethConfigurationPort; // 0 - both ports used by logger, 1 - ETH 01 for Linux Configuration, 2 - ETH 02 for Linux Configuration, Others - both ports used by logger + uint8_t reserved[5]; +} Fire3LinuxSettings; + +enum +{ + NETWORK_TIMESYNC_OFF, + NETWORK_TIMESYNC_AUTO, + NETWORK_TIMESYNC_NTP_ONLY, + NETWORK_TIMESYNC_GPS_ONLY +}; + +typedef struct _SRed2Settings +{ + uint16_t perf_en; + uint16_t network_enabled_on_boot; + uint16_t misc_io_on_report_events; + uint16_t pwr_man_enable; + int16_t iso15765_separation_time_offset; + uint16_t slaveVnetA; + uint32_t reserved; + uint64_t termination_enables; + union + { + uint64_t word; + struct + { + uint16_t network_enables; + uint16_t network_enables_2; + uint16_t network_enables_3; + uint16_t network_enables_4; + }; + } network_enables; + uint32_t pwr_man_timeout; + CAN_SETTINGS can1; + CANFD_SETTINGS canfd1; + CAN_SETTINGS can2; + CANFD_SETTINGS canfd2; + CAN_SETTINGS can3; + CANFD_SETTINGS canfd3; + CAN_SETTINGS can4; + CANFD_SETTINGS canfd4; + CAN_SETTINGS can5; + CANFD_SETTINGS canfd5; + CAN_SETTINGS can6; + CANFD_SETTINGS canfd6; + CAN_SETTINGS can7; + CANFD_SETTINGS canfd7; + CAN_SETTINGS can8; + CANFD_SETTINGS canfd8; + LIN_SETTINGS lin1; + LIN_SETTINGS lin2; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; + uint16_t iso_parity_1; + uint16_t iso_msg_termination_1; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; + uint16_t iso_parity_2; + uint16_t iso_msg_termination_2; + ETHERNET_SETTINGS ethernet_1; + TIMESYNC_ICSHARDWARE_SETTINGS timeSync; + STextAPISettings text_api; + struct + { + uint32_t disableUsbCheckOnBoot : 1; + uint32_t enableLatencyTest : 1; + uint32_t busMessagesToAndroid : 1; + uint32_t enablePcEthernetComm : 1; + uint32_t enableDefaultLogger : 1; + uint32_t enableDefaultUpload : 1; + uint32_t reserved : 26; + } flags; + DISK_SETTINGS disk; + uint16_t misc_io_report_period; + uint16_t ain_threshold; + uint16_t misc_io_analog_enable; + uint16_t digitalIoThresholdTicks; + uint16_t digitalIoThresholdEnable; + uint16_t misc_io_initial_ddr; + uint16_t misc_io_initial_latch; + ETHERNET_SETTINGS2 ethernet2_1; + ETHERNET_SETTINGS ethernet_2; + ETHERNET_SETTINGS2 ethernet2_2; + Fire3LinuxSettings os_settings; + RAD_GPTP_SETTINGS gPTP; + uint16_t iso_tester_pullup_enable; + CMP_GLOBAL_DATA cmp_global_data; + CMP_NETWORK_DATA cmp_stream_data[CMP_STREAMS_RED2]; + uint32_t networkTimeSync; +} SRed2Settings; +#define SRed2Settings_SIZE (918) + +typedef struct _SFire3Settings +{ + uint16_t perf_en; + uint16_t network_enabled_on_boot; + uint16_t misc_io_on_report_events; + uint16_t pwr_man_enable; + int16_t iso15765_separation_time_offset; + uint16_t slaveVnetA; + uint32_t reserved; + uint64_t termination_enables_1; + uint64_t network_enables; + uint32_t pwr_man_timeout; + CAN_SETTINGS can1; + CANFD_SETTINGS canfd1; + CAN_SETTINGS can2; + CANFD_SETTINGS canfd2; + CAN_SETTINGS can3; + CANFD_SETTINGS canfd3; + CAN_SETTINGS can4; + CANFD_SETTINGS canfd4; + CAN_SETTINGS can5; + CANFD_SETTINGS canfd5; + CAN_SETTINGS can6; + CANFD_SETTINGS canfd6; + CAN_SETTINGS can7; + CANFD_SETTINGS canfd7; + CAN_SETTINGS can8; + CANFD_SETTINGS canfd8; + LIN_SETTINGS lin1; + LIN_SETTINGS lin2; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; + uint16_t iso_parity_1; + uint16_t iso_msg_termination_1; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; + uint16_t iso_parity_2; + uint16_t iso_msg_termination_2; + ETHERNET_SETTINGS ethernet_1; + TIMESYNC_ICSHARDWARE_SETTINGS timeSync; + STextAPISettings text_api; + struct + { + uint32_t disableUsbCheckOnBoot : 1; + uint32_t enableLatencyTest : 1; + uint32_t busMessagesToAndroid : 1; + uint32_t enablePcEthernetComm : 1; + uint32_t enableDefaultLogger : 1; + uint32_t enableDefaultUpload : 1; + uint32_t reserved : 26; + } flags; + DISK_SETTINGS disk; + uint16_t misc_io_report_period; + uint16_t ain_threshold; + uint16_t misc_io_analog_enable; + uint16_t digitalIoThresholdTicks; + uint16_t digitalIoThresholdEnable; + uint16_t misc_io_initial_ddr; + uint16_t misc_io_initial_latch; + ETHERNET_SETTINGS2 ethernet2_1; + ETHERNET_SETTINGS ethernet_2; + ETHERNET_SETTINGS2 ethernet2_2; + Fire3LinuxSettings os_settings; + RAD_GPTP_SETTINGS gPTP; + CAN_SETTINGS can9; + CANFD_SETTINGS canfd9; + CAN_SETTINGS can10; + CANFD_SETTINGS canfd10; + CAN_SETTINGS can11; + CANFD_SETTINGS canfd11; + CAN_SETTINGS can12; + CANFD_SETTINGS canfd12; + CAN_SETTINGS can13; + CANFD_SETTINGS canfd13; + CAN_SETTINGS can14; + CANFD_SETTINGS canfd14; + CAN_SETTINGS can15; + CANFD_SETTINGS canfd15; + CAN_SETTINGS can16; + CANFD_SETTINGS canfd16; + SWCAN_SETTINGS swcan1; + SWCAN_SETTINGS swcan2; + CAN_SETTINGS lsftcan1; + CAN_SETTINGS lsftcan2; + ETHERNET_SETTINGS ethernet_3; + ETHERNET_SETTINGS2 ethernet2_3; + LIN_SETTINGS lin3; + LIN_SETTINGS lin4; + LIN_SETTINGS lin5; + LIN_SETTINGS lin6; + LIN_SETTINGS lin7; + LIN_SETTINGS lin8; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_3; + uint16_t iso_parity_3; + uint16_t iso_msg_termination_3; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_4; + uint16_t iso_parity_4; + uint16_t iso_msg_termination_4; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_5; + uint16_t iso_parity_5; + uint16_t iso_msg_termination_5; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_6; + uint16_t iso_parity_6; + uint16_t iso_msg_termination_6; + uint16_t selectable_network_1; + uint16_t selectable_network_2; + uint64_t network_enables_2; + uint64_t termination_enables_2; + uint16_t iso_tester_pullup_enable; + CMP_GLOBAL_DATA cmp_global_data; + CMP_NETWORK_DATA cmp_stream_data[CMP_STREAMS_FIRE3]; + uint32_t networkTimeSync; +} SFire3Settings; +#define SFire3Settings_SIZE (1722) + + +typedef struct _SFire3FlexraySettings +{ + uint16_t perf_en; + uint16_t network_enabled_on_boot; + uint16_t misc_io_on_report_events; + uint16_t pwr_man_enable; + int16_t iso15765_separation_time_offset; + uint16_t slaveVnetA; + uint32_t reserved; + uint64_t termination_enables_1; + uint64_t network_enables; + uint32_t pwr_man_timeout; + CAN_SETTINGS can1; + CANFD_SETTINGS canfd1; + CAN_SETTINGS can2; + CANFD_SETTINGS canfd2; + CAN_SETTINGS can3; + CANFD_SETTINGS canfd3; + CAN_SETTINGS can4; + CANFD_SETTINGS canfd4; + CAN_SETTINGS can5; + CANFD_SETTINGS canfd5; + CAN_SETTINGS can6; + CANFD_SETTINGS canfd6; + CAN_SETTINGS can7; + CANFD_SETTINGS canfd7; + CAN_SETTINGS can8; + CANFD_SETTINGS canfd8; + LIN_SETTINGS lin1; + LIN_SETTINGS lin2; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; + uint16_t iso_parity_1; + uint16_t iso_msg_termination_1; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; + uint16_t iso_parity_2; + uint16_t iso_msg_termination_2; + ETHERNET_SETTINGS ethernet_1; + TIMESYNC_ICSHARDWARE_SETTINGS timeSync; + STextAPISettings text_api; + struct + { + uint32_t disableUsbCheckOnBoot : 1; + uint32_t enableLatencyTest : 1; + uint32_t busMessagesToAndroid : 1; + uint32_t reserved1 : 1; + uint32_t enableDefaultLogger : 1; + uint32_t enableDefaultUpload : 1; + uint32_t reserved : 26; + } flags; + DISK_SETTINGS disk; + uint16_t misc_io_report_period; + uint16_t ain_threshold; + uint16_t misc_io_analog_enable; + uint16_t digitalIoThresholdTicks; + uint16_t digitalIoThresholdEnable; + uint16_t misc_io_initial_ddr; + uint16_t misc_io_initial_latch; + ETHERNET_SETTINGS2 ethernet2_1; + ETHERNET_SETTINGS ethernet_2; + ETHERNET_SETTINGS2 ethernet2_2; + Fire3LinuxSettings os_settings; + RAD_GPTP_SETTINGS gPTP; + CAN_SETTINGS can9; + CANFD_SETTINGS canfd9; + CAN_SETTINGS can10; + CANFD_SETTINGS canfd10; + CAN_SETTINGS can11; + CANFD_SETTINGS canfd11; + CAN_SETTINGS can12; + CANFD_SETTINGS canfd12; + CAN_SETTINGS can13; + CANFD_SETTINGS canfd13; + CAN_SETTINGS can14; + CANFD_SETTINGS canfd14; + CAN_SETTINGS can15; + CANFD_SETTINGS canfd15; + ETHERNET_SETTINGS ethernet_3; + ETHERNET_SETTINGS2 ethernet2_3; + LIN_SETTINGS lin3; + LIN_SETTINGS lin4; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_3; + uint16_t iso_parity_3; + uint16_t iso_msg_termination_3; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_4; + uint16_t iso_parity_4; + uint16_t iso_msg_termination_4; + uint64_t network_enables_2; + uint64_t termination_enables_2; + uint16_t flex_mode; + uint16_t flex_termination; + uint16_t iso_tester_pullup_enable; + CMP_GLOBAL_DATA cmp_global_data; + CMP_NETWORK_DATA cmp_stream_data[CMP_STREAMS_FIRE3FR]; + uint32_t networkTimeSync; +} SFire3FlexraySettings; +#define SFire3FlexraySettings_SIZE (1372) + +typedef struct _SFire3T1SLINSettings +{ + uint16_t perf_en; + uint16_t network_enabled_on_boot; + uint16_t misc_io_on_report_events; + uint16_t pwr_man_enable; + int16_t iso15765_separation_time_offset; + uint16_t slaveVnetA; + uint32_t reserved; + uint64_t termination_enables_1; + uint64_t network_enables; + uint32_t pwr_man_timeout; + CAN_SETTINGS can1; + CANFD_SETTINGS canfd1; + CAN_SETTINGS can2; + CANFD_SETTINGS canfd2; + CAN_SETTINGS can3; + CANFD_SETTINGS canfd3; + CAN_SETTINGS can4; + CANFD_SETTINGS canfd4; + CAN_SETTINGS can5; + CANFD_SETTINGS canfd5; + CAN_SETTINGS can6; + CANFD_SETTINGS canfd6; + CAN_SETTINGS can7; + CANFD_SETTINGS canfd7; + CAN_SETTINGS can8; + CANFD_SETTINGS canfd8; + LIN_SETTINGS lin1; + LIN_SETTINGS lin2; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; + uint16_t iso_parity_1; + uint16_t iso_msg_termination_1; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; + uint16_t iso_parity_2; + uint16_t iso_msg_termination_2; + ETHERNET_SETTINGS ethernet_1; + TIMESYNC_ICSHARDWARE_SETTINGS timeSync; + STextAPISettings text_api; + struct + { + uint32_t disableUsbCheckOnBoot : 1; + uint32_t enableLatencyTest : 1; + uint32_t busMessagesToAndroid : 1; + uint32_t reserved1 : 1; + uint32_t enableDefaultLogger : 1; + uint32_t enableDefaultUpload : 1; + uint32_t reserved : 26; + } flags; + DISK_SETTINGS disk; + uint16_t misc_io_report_period; + uint16_t ain_threshold; + uint16_t misc_io_analog_enable; + uint16_t digitalIoThresholdTicks; + uint16_t digitalIoThresholdEnable; + uint16_t misc_io_initial_ddr; + uint16_t misc_io_initial_latch; + ETHERNET_SETTINGS2 ethernet2_1; + ETHERNET_SETTINGS ethernet_2; + ETHERNET_SETTINGS2 ethernet2_2; + Fire3LinuxSettings os_settings; + RAD_GPTP_SETTINGS gPTP; + + /* VEM */ + // 10T1S + ETHERNET_SETTINGS2 ethT1s1; + ETHERNET10T1S_SETTINGS t1s1; + ETHERNET10T1S_SETTINGS_EXT t1s1Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s2; + ETHERNET10T1S_SETTINGS t1s2; + ETHERNET10T1S_SETTINGS_EXT t1s2Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s3; + ETHERNET10T1S_SETTINGS t1s3; + ETHERNET10T1S_SETTINGS_EXT t1s3Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s4; + ETHERNET10T1S_SETTINGS t1s4; + ETHERNET10T1S_SETTINGS_EXT t1s4Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s5; + ETHERNET10T1S_SETTINGS t1s5; + ETHERNET10T1S_SETTINGS_EXT t1s5Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s6; + ETHERNET10T1S_SETTINGS t1s6; + ETHERNET10T1S_SETTINGS_EXT t1s6Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s7; + ETHERNET10T1S_SETTINGS t1s7; + ETHERNET10T1S_SETTINGS_EXT t1s7Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s8; + ETHERNET10T1S_SETTINGS t1s8; + ETHERNET10T1S_SETTINGS_EXT t1s8Ext; + + LIN_SETTINGS lin3; + LIN_SETTINGS lin4; + LIN_SETTINGS lin5; + LIN_SETTINGS lin6; + LIN_SETTINGS lin7; + LIN_SETTINGS lin8; + LIN_SETTINGS lin9; + LIN_SETTINGS lin10; + + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_3; + uint16_t iso_parity_3; + uint16_t iso_msg_termination_3; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_4; + uint16_t iso_parity_4; + uint16_t iso_msg_termination_4; + + uint16_t iso_tester_pullup_enable; + + uint64_t network_enables_5; + + CMP_GLOBAL_DATA cmp_global_data; + CMP_NETWORK_DATA cmp_stream_data[CMP_STREAMS_FIRE3T1SLIN]; + uint32_t networkTimeSync; +} SFire3T1sLinSettings; +#define SFire3T1sLinSettings_SIZE (1594) + +#define RADEPSILON_NUM_PORTS 18 // ATSAM + PHYs +#define RADEPSILON_MAX_PHY 18 +#define EPSILON_88Q6113_SWITCH_A 1 +#define EPSILON_88Q6113_SWITCH_B 2 +#define EPSILON_88Q6113_SWITCH_AB 3 +typedef enum +{ + EPSILON_10G_PHY1 = (1 << 0), + EPSILON_10G_PHY2 = (1 << 1), +} Epsilon_10G_PHY_select; + +typedef struct _SRADEpsilonSwitchSettings +{ + uint8_t phyMode[RADEPSILON_MAX_PHY]; + uint8_t enablePhy[RADEPSILON_MAX_PHY]; + uint8_t speed[RADEPSILON_MAX_PHY]; + uint8_t legacy[RADEPSILON_MAX_PHY]; + uint8_t spoofedMac[6]; + uint8_t spoofMacFlag; + uint8_t pad; +} SRADEpsilonSwitchSettings; //80 + +typedef struct _SRADEpsilonSettings +{ + /* Performance Test */ + uint16_t perf_en; //2 + + CAN_SETTINGS can1; //12 + CANFD_SETTINGS canfd1; //10 + CAN_SETTINGS can2; //12 + CANFD_SETTINGS canfd2; //10 + LIN_SETTINGS lin1; //10 + + uint16_t network_enables; //2 + uint16_t network_enables_2; //2 + uint16_t network_enables_3; //2 + uint64_t termination_enables; //8 + uint16_t misc_io_analog_enable; //2 + + uint32_t pwr_man_timeout; //4 + uint16_t pwr_man_enable; //2 + + uint16_t network_enabled_on_boot; //2 + + /* ISO15765-2 Transport Layer */ + int16_t iso15765_separation_time_offset; //2 + uint16_t iso9141_kwp_enable_reserved; //2 + uint16_t iso_tester_pullup_enable; //2 + uint16_t iso_parity; //2 + uint16_t iso_msg_termination; //2 + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; //114 + ETHERNET_SETTINGS ethernet; //8 + + STextAPISettings text_api; //72 + + struct + { + uint32_t disableUsbCheckOnBoot : 1; + uint32_t enableLatencyTest : 1; + uint32_t enablePcEthernetComm : 1; + uint32_t reserved : 29; + } flags; //4 + + SRADEpsilonSwitchSettings switchSettings; //80 + ETHERNET_SETTINGS2 ethernet2; //16 + uint16_t misc_io_on_report_events; //2 + DISK_SETTINGS disk; //14 + +} SRADEpsilonSettings; //400 +#define SRADEpsilonSettings_SIZE 400 + +typedef struct +{ + uint8_t wBMSDeviceID; + uint8_t enabled; +} sWIL_FAULT_SERVICING_SETTINGS; //2 + +typedef struct +{ + uint8_t enabled; +} sWIL_NETWORK_DATA_CAPTURE_SETTINGS; //1 + +typedef struct _sWIL_CONNECTION_SETTINGS +{ + uint8_t using_port_a; //1 + uint8_t using_port_b; //1 + uint8_t attemptConnect; //1 + sWIL_FAULT_SERVICING_SETTINGS fault_servicing_config; //2 + sWIL_NETWORK_DATA_CAPTURE_SETTINGS network_data_capture_config; //1 + uint16_t sensor_buffer_size; //2 +} sWIL_CONNECTION_SETTINGS; + +enum +{ + enumWILPortConfig_Single_Port_A = 0, + enumWILPortConfig_Single_Port_B, + enumWILPortConfig_Dual_Port_A_And_B, + enumWILPortConfig_Single_Port_A_And_B, + _enumWILPortConfig_Total, +}; + +enum +{ + SPI_PORT_ONBOARD = 0, + SPI_PORT_EXTERNAL, +}; + +enum +{ + SPI_TYPE_WIL = 0, + SPI_TYPE_RAW, +}; + +enum +{ + SPI_MODE_MASTER, + SPI_MODE_SLAVE, + SPI_MODE_PMS_EMULATION, +}; + +typedef union +{ + uint64_t dword; + struct + { + uint64_t can_id : 29; + uint64_t can_id_isExtended : 1; + uint64_t tcp_port : 16; + uint64_t reserved : 18; + } config; +} sWILBridgeConfig; + + +typedef union +{ + uint8_t byte; + struct + { + uint8_t onboard_external : 1; + uint8_t type : 1; + uint8_t mode: 3; + uint8_t reserved : 3; + } config; +} sSPI_PORT_SETTING; + +typedef struct +{ + sSPI_PORT_SETTING port_a; //1 + sSPI_PORT_SETTING port_b; //1 +} sSPI_PORT_SETTINGS; + +// clang-format off +#define WBMS_GATEWAY_NETWORK_NONE (0) +#define WBMS_GATEWAY_NETWORK_DWCAN_01 (1) +#define WBMS_GATEWAY_NETWORK_DWCAN_02 (2) +#define WBMS_GATEWAY_NETWORK_UDP_MULTICAST (3) +// clang-format on + +typedef struct +{ + uint8_t wbms1_network; + uint8_t wbms1_canfd_enable; + uint8_t wbms2_network; + uint8_t wbms2_canfd_enable; + uint16_t reserved[6]; +} WBMSGatewaySettings; //16 + +typedef struct _SRADBMSSettings +{ + /* Performance Test */ + uint16_t perf_en; //2 + + uint64_t termination_enables; //8 + + CAN_SETTINGS can1; //12 + CANFD_SETTINGS canfd1; //10 - uint64_t termination_enables; - uint16_t can_switch_mode; + CAN_SETTINGS can2; //12 + CANFD_SETTINGS canfd2; //10 - /* ISO9141 - Keyword */ - uint16_t iso_9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - uint16_t iso_parity; - uint16_t iso_msg_termination; + uint16_t network_enables; //2 + uint16_t network_enables_2; //2 + uint16_t network_enables_3; //2 + + /* ISO15765-2 Transport Layer */ + int16_t iso15765_separation_time_offset; //2 - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - uint16_t perf_en; - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_analog_enable; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t ain_sample_period; - uint16_t ain_threshold; - int16_t iso15765_separation_time_offset; - STextAPISettings text_api; struct { uint32_t disableUsbCheckOnBoot : 1; uint32_t enableLatencyTest : 1; - uint32_t reserved : 30; - } flags; - uint32_t reserved_field[2]; //#3166 reserved field for downgrade support -} SNeoECU12Settings; -#define SNeoECU12Settings_SIZE 358 + uint32_t enablePcEthernetComm : 1; + uint32_t reserved : 29; + } flags; //4 -typedef struct _VCAN4IndSettings + ETHERNET_SETTINGS ethernet; //8 + ETHERNET_SETTINGS2 ethernet2; //16 + + uint32_t pwr_man_timeout; // 4 + uint16_t pwr_man_enable; //2 + uint16_t network_enabled_on_boot; //2 + + uint8_t rsvd[10]; //Was sWILBridgeConfig + + sSPI_PORT_SETTINGS spi_config; //2 + + sWIL_CONNECTION_SETTINGS wbms_wil_1; //8 + sWIL_CONNECTION_SETTINGS wbms_wil_2; //8 + + uint16_t wil1_nwk_metadata_buff_count; //2 + uint16_t wil2_nwk_metadata_buff_count; //2 + + WBMSGatewaySettings gateway; //16 + + uint16_t network_enables_4; //2 + uint64_t network_enables_5; //8 +}SRADBMSSettings; +#define SRADBMSSettings_SIZE 156 + +typedef struct _SRADCometSettings { + // ECU ID used in CAN communications. + // TX ID = ECU ID with bit28 cleared, + // RX ID = ECUID with bit28 set, + // ECU ID = 0 implies ECU ID = serial no with bit 27 set + uint32_t ecu_id; + uint16_t perf_en; + struct + { + uint16_t hwComLatencyTestEn : 1; + uint16_t disableUsbCheckOnBoot : 1; + uint16_t reserved : 14; + } flags; + uint16_t network_enabled_on_boot; CAN_SETTINGS can1; CANFD_SETTINGS canfd1; CAN_SETTINGS can2; CANFD_SETTINGS canfd2; - ETHERNET_SETTINGS ethernet; - LIN_SETTINGS lin1; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - uint16_t iso_parity; - uint16_t iso_msg_termination; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - uint16_t perf_en; - int16_t iso15765_separation_time_offset; - uint16_t network_enabled_on_boot; - - union { + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; + uint16_t iso_parity_1; + uint16_t iso_msg_termination_1; + union + { uint64_t word; struct { uint16_t network_enables; uint16_t network_enables_2; uint16_t network_enables_3; + uint16_t network_enables_4; }; } network_enables; uint64_t termination_enables; + TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; + RAD_REPORTING_SETTINGS reporting; + int16_t iso15765_separation_time_offset; + uint32_t pwr_man_timeout; + uint16_t pwr_man_enable; + RAD_GPTP_SETTINGS gPTP; + STextAPISettings text_api; + // Ethernet 10/100/1000 + ETHERNET_SETTINGS2 ethernet; + // Ethernet General + OP_ETH_GENERAL_SETTINGS opEthGen; + // 100/1000T1 + ETHERNET_SETTINGS2 ethT1; + OP_ETH_SETTINGS opEth1; + // 10T1S + ETHERNET_SETTINGS2 ethT1s1; + ETHERNET10T1S_SETTINGS t1s1; + // 10T1S + ETHERNET_SETTINGS2 ethT1s2; + ETHERNET10T1S_SETTINGS t1s2; + uint64_t network_enables_5; + LIN_SETTINGS lin1; + // 10T1S Extended settings + ETHERNET10T1S_SETTINGS_EXT t1s1Ext; + ETHERNET10T1S_SETTINGS_EXT t1s2Ext; + CMP_GLOBAL_DATA cmp_global_data; + CMP_NETWORK_DATA cmp_stream_data[CMP_STREAMS_COMET]; +} SRADCometSettings; +#define SRADCometSettings_SIZE 742 + +typedef struct _SRADComet3Settings +{ + // ECU ID used in CAN communications. + // TX ID = ECU ID with bit28 cleared, + // RX ID = ECUID with bit28 set, + // ECU ID = 0 implies ECU ID = serial no with bit 27 set + uint32_t ecu_id; + uint16_t perf_en; struct { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t busMessagesToAndroid : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t reserved : 28; + uint16_t hwComLatencyTestEn : 1; + uint16_t disableUsbCheckOnBoot : 1; + uint16_t reserved : 14; } flags; - ETHERNET_SETTINGS2 ethernet2; -} VCAN4IndSettings, SVCAN4IndSettings; -#define VCAN4IndSettings_SIZE (228) - -typedef struct _SOBD2LCSettings -{ - /* Performance Test */ + uint16_t network_enabled_on_boot; + CAN_SETTINGS can1; + CANFD_SETTINGS canfd1; + CAN_SETTINGS can2; + CANFD_SETTINGS canfd2; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; + uint16_t iso_parity_1; + uint16_t iso_msg_termination_1; + uint64_t network_enables; + uint64_t network_enables_2; + uint64_t termination_enables; + TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; + RAD_REPORTING_SETTINGS reporting; + int16_t iso15765_separation_time_offset; + uint32_t pwr_man_timeout; + uint16_t pwr_man_enable; + RAD_GPTP_SETTINGS gPTP; + STextAPISettings text_api; + // Ethernet 10/100/1000 + ETHERNET_SETTINGS2 ethernet; + // Ethernet General + OP_ETH_GENERAL_SETTINGS opEthGen; + // 100/1000T1 + ETHERNET_SETTINGS2 ethT1; + OP_ETH_SETTINGS opEth1; + // 10T1S + ETHERNET_SETTINGS2 ethT1s1; + ETHERNET10T1S_SETTINGS t1s1; + // 10T1S + ETHERNET_SETTINGS2 ethT1s2; + ETHERNET10T1S_SETTINGS t1s2; + // 10T1S + ETHERNET_SETTINGS2 ethT1s3; + ETHERNET10T1S_SETTINGS t1s3; + // 10T1S + ETHERNET_SETTINGS2 ethT1s4; + ETHERNET10T1S_SETTINGS t1s4; + // 10T1S + ETHERNET_SETTINGS2 ethT1s5; + ETHERNET10T1S_SETTINGS t1s5; + // 10T1S + ETHERNET_SETTINGS2 ethT1s6; + ETHERNET10T1S_SETTINGS t1s6; + LIN_SETTINGS lin1; + // 10T1S Extended Settings + ETHERNET10T1S_SETTINGS_EXT t1s1Ext; + ETHERNET10T1S_SETTINGS_EXT t1s2Ext; + ETHERNET10T1S_SETTINGS_EXT t1s3Ext; + ETHERNET10T1S_SETTINGS_EXT t1s4Ext; + ETHERNET10T1S_SETTINGS_EXT t1s5Ext; + ETHERNET10T1S_SETTINGS_EXT t1s6Ext; + CMP_GLOBAL_DATA cmp_global_data; + CMP_NETWORK_DATA cmp_stream_data[CMP_STREAMS_COMET3]; +} SRADComet3Settings; +#define SRADComet3Settings_SIZE 918 + +typedef struct _SRADGigaStar2Settings +{ + // ECU ID used in CAN communications. + // TX ID = ECU ID with bit28 cleared, + // RX ID = ECUID with bit28 set, + // ECU ID = 0 implies ECU ID = serial no with bit 27 set + uint32_t ecu_id; uint16_t perf_en; + struct + { + uint16_t hwComLatencyTestEn : 1; + uint16_t disableUsbCheckOnBoot : 1; + uint16_t reserved : 14; + } flags; + uint16_t network_enabled_on_boot; CAN_SETTINGS can1; CANFD_SETTINGS canfd1; CAN_SETTINGS can2; @@ -3474,139 +4195,168 @@ typedef struct _SOBD2LCSettings CANFD_SETTINGS canfd3; CAN_SETTINGS can4; CANFD_SETTINGS canfd4; - SWCAN_SETTINGS swcan1; - LIN_SETTINGS lin1; - /* ISO9141 - Keyword */ + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; uint16_t iso_parity_1; uint16_t iso_msg_termination_1; - union { - uint64_t word; - struct - { - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enables_3; - }; - } network_enables; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; + uint16_t iso_parity_2; + uint16_t iso_msg_termination_2; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_3; + uint16_t iso_parity_3; + uint16_t iso_msg_termination_3; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_4; + uint16_t iso_parity_4; + uint16_t iso_msg_termination_4; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_5; + uint16_t iso_parity_5; + uint16_t iso_msg_termination_5; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_6; + uint16_t iso_parity_6; + uint16_t iso_msg_termination_6; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_7; + uint16_t iso_parity_7; + uint16_t iso_msg_termination_7; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_8; + uint16_t iso_parity_8; + uint16_t iso_msg_termination_8; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_9; + uint16_t iso_parity_9; + uint16_t iso_msg_termination_9; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_10; + uint16_t iso_parity_10; + uint16_t iso_msg_termination_10; + uint64_t network_enables; + uint64_t network_enables_2; + uint64_t termination_enables; + TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; + RAD_REPORTING_SETTINGS reporting; + int16_t iso15765_separation_time_offset; uint32_t pwr_man_timeout; uint16_t pwr_man_enable; - uint16_t network_enabled_on_boot; - /* ISO15765-2 Transport Layer */ - int16_t iso15765_separation_time_offset; + RAD_GPTP_SETTINGS gPTP; STextAPISettings text_api; - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t busMessagesToAndroid : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t enableDefaultLogger : 1; - uint32_t enableDefaultUpload : 1; - uint32_t reserved : 26; - } flags; - uint16_t can_switch_mode; - uint16_t misc_io_on_report_events; DISK_SETTINGS disk; - ETHERNET_SETTINGS ethernet; - ETHERNET_SETTINGS2 ethernet2; // supercedes ethernet settings -} OBD2LCSettings, SOBD2LCSettings; -#define OBD2LCSettings_SIZE 360 - -#define RADJUPITER_NUM_PORTS 8 - -#define JUPITER_PTP_ROLE_DISABLED 0 -#define JUPITER_PTP_ROLE_MASTER 1 -#define JUPITER_PTP_ROLE_SLAVE 2 -typedef struct SJupiterPtpParams_s -{ - uint32_t neighborPropDelay;//ns - int8_t initLogPDelayReqInterval;// log2ms - int8_t initLogSyncInterval;// log2ms - int8_t operationLogPDelayReqInterval;// log2ms - int8_t operationLogSyncInterval;// log2ms - uint8_t gPTPportRole[RADJUPITER_NUM_PORTS];// the 6th port is used for SAM -} JupiterPtpParams_t;//16 - -typedef struct _SRADJupiterSwitchSettings -{ - uint8_t phyMode[RADJUPITER_NUM_PORTS]; //8 - uint8_t enablePhy[RADJUPITER_NUM_PORTS];//8 - uint8_t port7Select; //1 - uint8_t port8Select; //1 - uint8_t port8Speed; - uint8_t port8Legacy; - uint8_t spoofMacFlag; - uint8_t spoofedMac[6]; - uint8_t pad; - JupiterPtpParams_t ptpParams;//16 -} SRADJupiterSwitchSettings;//44 + LOGGER_SETTINGS logger; + LIN_SETTINGS lin1; + LIN_SETTINGS lin2; + LIN_SETTINGS lin3; + LIN_SETTINGS lin4; + LIN_SETTINGS lin5; + LIN_SETTINGS lin6; + LIN_SETTINGS lin7; + LIN_SETTINGS lin8; + LIN_SETTINGS lin9; + LIN_SETTINGS lin10; + // TODO more LIN + // Ethernet SFP + ETHERNET_SETTINGS2 ethernet1; + ETHERNET_SETTINGS2 ethernet2; + // Ethernet General + OP_ETH_GENERAL_SETTINGS opEthGen; + // 100/1000T1 + ETHERNET_SETTINGS2 ethT1; + OP_ETH_SETTINGS opEth1; + ETHERNET_SETTINGS2 ethT12; + OP_ETH_SETTINGS opEth2; + // 10T1S + ETHERNET_SETTINGS2 ethT1s1; + ETHERNET10T1S_SETTINGS t1s1; + ETHERNET10T1S_SETTINGS_EXT t1s1Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s2; + ETHERNET10T1S_SETTINGS t1s2; + ETHERNET10T1S_SETTINGS_EXT t1s2Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s3; + ETHERNET10T1S_SETTINGS t1s3; + ETHERNET10T1S_SETTINGS_EXT t1s3Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s4; + ETHERNET10T1S_SETTINGS t1s4; + ETHERNET10T1S_SETTINGS_EXT t1s4Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s5; + ETHERNET10T1S_SETTINGS t1s5; + ETHERNET10T1S_SETTINGS_EXT t1s5Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s6; + ETHERNET10T1S_SETTINGS t1s6; + ETHERNET10T1S_SETTINGS_EXT t1s6Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s7; + ETHERNET10T1S_SETTINGS t1s7; + ETHERNET10T1S_SETTINGS_EXT t1s7Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s8; + ETHERNET10T1S_SETTINGS t1s8; + ETHERNET10T1S_SETTINGS_EXT t1s8Ext; + // SFP T1S + ETHERNET10T1S_SETTINGS sfp_t1s_1; + ETHERNET10T1S_SETTINGS_EXT sfp_t1s_ext_1; + ETHERNET10T1S_SETTINGS sfp_t1s_2; + ETHERNET10T1S_SETTINGS_EXT sfp_t1s_ext_2; + LIN_SETTINGS lin11; + LIN_SETTINGS lin12; + LIN_SETTINGS lin13; + LIN_SETTINGS lin14; + LIN_SETTINGS lin15; + LIN_SETTINGS lin16; + // SFP T1L + ETHERNET10T1L_SETTINGS sfp_t1l_1; + ETHERNET10T1L_SETTINGS sfp_t1l_2; + CMP_GLOBAL_DATA cmp_global_data; + CMP_NETWORK_DATA cmp_stream_data[CMP_STREAMS_GIGASTAR2]; +} SRADGigastar2Settings; +#define SRADGigastar2Settings_SIZE 2400 + +// variants to be used with icsneoSetFirmwareVariant +enum Gigastar2FwVariants +{ + GIGASTAR2_FW_VARIANT_6T1S_1CAN_16LIN = 0, + GIGASTAR2_FW_VARIANT_8T1S_4CAN_6LIN = 1, + GIGASTAR2_FW_VARIANT_COUNT, +}; -typedef struct _SRADJupiterSettings +typedef struct _SRADMoonT1SSettings { - /* Performance Test */ - uint16_t perf_en;//2 - - CAN_SETTINGS can1;//12 - CANFD_SETTINGS canfd1;//10 - CAN_SETTINGS can2;//12 - CANFD_SETTINGS canfd2;//10 - LIN_SETTINGS lin1;//10 - - uint16_t network_enables;//2 - uint16_t network_enables_2;//2 - uint16_t network_enables_3;//2 - uint64_t termination_enables;//8 - uint16_t misc_io_analog_enable;//2 - - uint32_t pwr_man_timeout;//4 - uint16_t pwr_man_enable;//2 - - uint16_t network_enabled_on_boot;//2 - - /* ISO15765-2 Transport Layer */ - int16_t iso15765_separation_time_offset;//2 - uint16_t iso9141_kwp_enable_reserved;//2 - uint16_t iso_tester_pullup_enable;//2 - uint16_t iso_parity;//2 - uint16_t iso_msg_termination;//2 - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings;//114 - ETHERNET_SETTINGS ethernet;//8 - - STextAPISettings text_api;//72 - + uint16_t perf_en; struct { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t reserved : 29; - } flags;//4 - - SRADJupiterSwitchSettings switchSettings;//44 - ETHERNET_SETTINGS2 ethernet2; -} SRADJupiterSettings;//348 - -#define SRADJupiterSettings_SIZE 348 - -typedef struct -{ - uint8_t allowBoot; - uint8_t useExternalWifiAntenna; // 0 for internal, 1 for external - uint8_t reserved[6]; -} Fire3LinuxSettings; + uint16_t hwComLatencyTestEn : 1; + uint16_t disableUsbCheckOnBoot : 1; + uint16_t reserved : 14; + } flags; + uint16_t network_enabled_on_boot; + uint64_t network_enables; + uint64_t network_enables_2; + RAD_REPORTING_SETTINGS reporting; + uint32_t pwr_man_timeout; + uint16_t pwr_man_enable; + // Ethernet 10/100/1000 + ETHERNET_SETTINGS2 ethernet; + // Ethernet General + OP_ETH_GENERAL_SETTINGS opEthGen; + // 10T1S + ETHERNET_SETTINGS2 ethT1s; + ETHERNET10T1S_SETTINGS t1s; + // 10T1S Extended Settings + ETHERNET10T1S_SETTINGS_EXT t1sExt; + RAD_GPTP_SETTINGS gPTP; +} SRADMoonT1SSettings; +#define SRADMoonT1SSettings_SIZE 160 -typedef struct _SFire3Settings +typedef struct _SNeoVIConnectSettings { uint16_t perf_en; uint16_t network_enabled_on_boot; uint16_t misc_io_on_report_events; uint16_t pwr_man_enable; int16_t iso15765_separation_time_offset; - uint16_t slaveVnetA; - uint32_t reserved; - uint64_t termination_enables; - union { + uint16_t reservedA; + uint32_t pwr_man_timeout; + union + { uint64_t word; struct { @@ -3616,7 +4366,6 @@ typedef struct _SFire3Settings uint16_t network_enables_4; }; } network_enables; - uint32_t pwr_man_timeout; CAN_SETTINGS can1; CANFD_SETTINGS canfd1; CAN_SETTINGS can2; @@ -3641,19 +4390,9 @@ typedef struct _SFire3Settings ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; uint16_t iso_parity_2; uint16_t iso_msg_termination_2; - ETHERNET_SETTINGS ethernet_1; - TIMESYNC_ICSHARDWARE_SETTINGS timeSync; - STextAPISettings text_api; - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t busMessagesToAndroid : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t enableDefaultLogger : 1; - uint32_t enableDefaultUpload : 1; - uint32_t reserved : 26; - } flags; + ETHERNET_SETTINGS ethernet_1; + ETHERNET_SETTINGS2 ethernet2_1; + STextAPISettings text_api; DISK_SETTINGS disk; uint16_t misc_io_report_period; uint16_t ain_threshold; @@ -3662,193 +4401,18 @@ typedef struct _SFire3Settings uint16_t digitalIoThresholdEnable; uint16_t misc_io_initial_ddr; uint16_t misc_io_initial_latch; - ETHERNET_SETTINGS2 ethernet2_1; - ETHERNET_SETTINGS ethernet_2; - ETHERNET_SETTINGS2 ethernet2_2; Fire3LinuxSettings os_settings; -}SFire3Settings; -#define SFire3Settings_SIZE (632) - -typedef struct -{ - uint16_t perf_en; - uint16_t network_enabled_on_boot; - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - RadMoonDuoConverterSettings converter; - uint64_t network_enables; + RAD_GPTP_SETTINGS gPTP; struct { uint32_t disableUsbCheckOnBoot : 1; uint32_t enableLatencyTest : 1; - uint32_t reserved : 30; + uint32_t enableDefaultLogger : 1; + uint32_t enableDefaultUpload : 1; + uint32_t reserved3 : 28; } flags; -} RadMoonDuoSettings, SRadMoonDuoSettings; -#define RadMoonDuoSettings_SIZE 38 - -typedef struct _SEtherBadgeSettings -{ - /* Performance Test */ - uint16_t perf_en;//2 - - CAN_SETTINGS can1;//12 - CANFD_SETTINGS canfd1;//10 - CAN_SETTINGS can2;//12 - CANFD_SETTINGS canfd2;//10 - LIN_SETTINGS lin1;//10 - - uint16_t network_enables;//2 - uint16_t network_enables_2;//2 - uint16_t network_enables_3;//2 - uint64_t termination_enables;//8 - - uint32_t pwr_man_timeout;//4 - uint16_t pwr_man_enable;//2 - - uint16_t network_enabled_on_boot;//2 - - /* ISO15765-2 Transport Layer */ - int16_t iso15765_separation_time_offset;//2 - uint16_t iso9141_kwp_enable_reserved;//2 - uint16_t iso_tester_pullup_enable;//2 - uint16_t iso_parity;//2 - uint16_t iso_msg_termination;//2 - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings;//114 - ETHERNET_SETTINGS ethernet;//8 - - uint16_t misc_io_initial_ddr;//2 - uint16_t misc_io_initial_latch;//2 - uint16_t misc_io_report_period;//2 - uint16_t misc_io_on_report_events;//2 - uint16_t misc_io_analog_enable;//2 - uint16_t ain_sample_period;//2 - uint16_t ain_threshold;//2 - - STextAPISettings text_api;//72 - - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t reserved : 29; - } flags;//4 - - ETHERNET_SETTINGS2 ethernet2;//16 -} SEtherBadgeSettings;//316 - -#define SEtherBadgeSettings_SIZE 316 - -#define RADEPSILON_MAX_PHY 18 - -typedef struct _SRADEpsilonSwitchSettings -{ - uint8_t phyMode[RADEPSILON_MAX_PHY]; - uint8_t enablePhy[RADEPSILON_MAX_PHY]; - uint8_t speed[RADEPSILON_MAX_PHY]; - uint8_t legacy[RADEPSILON_MAX_PHY]; - uint8_t spoofedMac[6]; - uint8_t spoofMacFlag; - uint8_t pad; -}SRADEpsilonSwitchSettings;//80 - -typedef struct _SRADEpsilonSettings -{ - /* Performance Test */ - uint16_t perf_en;//2 - - CAN_SETTINGS can1;//12 - CANFD_SETTINGS canfd1;//10 - CAN_SETTINGS can2;//12 - CANFD_SETTINGS canfd2;//10 - LIN_SETTINGS lin1;//10 - - uint16_t network_enables;//2 - uint16_t network_enables_2;//2 - uint16_t network_enables_3;//2 - uint64_t termination_enables;//8 - uint16_t misc_io_analog_enable;//2 - - uint32_t pwr_man_timeout;//4 - uint16_t pwr_man_enable;//2 - - uint16_t network_enabled_on_boot;//2 - - /* ISO15765-2 Transport Layer */ - int16_t iso15765_separation_time_offset;//2 - uint16_t iso9141_kwp_enable_reserved;//2 - uint16_t iso_tester_pullup_enable;//2 - uint16_t iso_parity;//2 - uint16_t iso_msg_termination;//2 - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings;//114 - ETHERNET_SETTINGS ethernet;//8 - - STextAPISettings text_api;//72 - - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t reserved : 29; - } flags;//4 - - SRADEpsilonSwitchSettings switchSettings;//80 - ETHERNET_SETTINGS2 ethernet2;//16 -}SRADEpsilonSettings;//384 -#define SRADEpsilonSettings_SIZE 384 - -typedef union -{ - uint64_t dword; - struct - { - unsigned can_id:29; - unsigned can_id_isExtended:1; - uint16_t tcp_port; - unsigned reserved:18; - }config; -} SWILBridgeConfig; - -typedef struct _SRADBMSSettings -{ - /* Performance Test */ - uint16_t perf_en;//2 - - uint64_t termination_enables; - - CAN_SETTINGS can1; - CANFD_SETTINGS canfd1; - - CAN_SETTINGS can2; - CANFD_SETTINGS canfd2; - - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enables_3; - - /* ISO15765-2 Transport Layer */ - int16_t iso15765_separation_time_offset;//2 - - struct - { - uint32_t disableUsbCheckOnBoot : 1; - uint32_t enableLatencyTest : 1; - uint32_t enablePcEthernetComm : 1; - uint32_t reserved : 29; - } flags;//4 - - ETHERNET_SETTINGS ethernet; - ETHERNET_SETTINGS2 ethernet2; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - uint16_t network_enabled_on_boot; - - //WIL wrapped CAN and ETHERNET - SWILBridgeConfig wil_config; -} SRADBMSSettings; -#define SRADBMSSettings_SIZE 108 +} SNeoVIConnectSettings; +#define SNeoVIConnectSettings_SIZE (628) #define GS_VERSION 5 typedef struct _GLOBAL_SETTINGS @@ -3856,48 +4420,43 @@ typedef struct _GLOBAL_SETTINGS uint16_t version; uint16_t len; uint16_t chksum; - union { - SRedSettings red; - SFireSettings fire; + union + { SFireVnetSettings firevnet; SCyanSettings cyan; - SVCAN3Settings vcan3; SVCAN4Settings vcan4; - SECUSettings ecu; - SIEVBSettings ievb; - SPendantSettings pendant; SRADGalaxySettings radgalaxy; SRADStar2Settings radstar2; - SOBD2SimSettings neoobd2_sim; - SCmProbeSettings cmprobe; - SOBD2ProSettings obd2pro; SVCAN412Settings vcan412; - SVCAN412Settings vcan4_12;// backwards compatibility with older code - SECU_AVBSettings neoecu_avb; - SRADSuperMoonSettings radsupermoon; + SVCAN412Settings vcan4_12; // backwards compatibility with older code SRADMoon2Settings radmoon2; - SRADPlutoSettings pluto; - SRADGigalogSettings radgigalog; SCANHubSettings canhub; SNeoECU12Settings neoecu12; - SVCANRFSettings vcanrf; - SEEVBSettings eevb; SFlexVnetzSettings flexvnetz; SVividCANSettings vividcan; SVCAN4IndSettings vcan4_ind; + SOBD2LCSettings obd2lc; SRADGigastarSettings radgigastar; + SRADGalaxy2Settings radGalaxy2; SRADJupiterSettings jupiter; + SRed2Settings red2; SFire3Settings fire3; - SRadMoonDuoSettings radmoonduo; - SEtherBadgeSettings etherBadge; + SFire3FlexraySettings fire3fr; + SFire3T1sLinSettings fire3t1slin; SRADA2BSettings rad_a2b; SRADEpsilonSettings epsilon; - SOBD2LCSettings obd2lc; SRADBMSSettings rad_bms; + SRADMoon3Settings radmoon3; + SRADGeminiSettings radgemini; + SRADCometSettings radcomet; + SRADComet3Settings radcomet3; + SRADGigastar2Settings radgigastar2; + SRADMoonT1SSettings radmoont1s; + SNeoVIConnectSettings neovi_connect; // Make sure SDeviceSettings matches this }; } GLOBAL_SETTINGS; -#define GLOBAL_SETTINGS_SIZE (SCyanSettings_SIZE + 6) +#define GLOBAL_SETTINGS_SIZE (SRADGigastar2Settings_SIZE + 6) #define NEOVI_3G_MAX_SETTINGS_SIZE sizeof(GLOBAL_SETTINGS) @@ -3906,86 +4465,91 @@ typedef enum _EDeviceSettingsType DeviceFireSettingsType, DeviceFireVnetSettingsType, DeviceFire2SettingsType, - DeviceVCAN3SettingsType, + DeviceVCAN3SettingsTypeDeprecated, DeviceRADGalaxySettingsType, DeviceRADStar2SettingsType, DeviceVCAN4SettingsType, DeviceVCAN412SettingsType, DeviceVividCANSettingsType, - DeviceECU_AVBSettingsType, - DeviceRADSuperMoonSettingsType, + DeviceECU_AVBSettingsTypeDeprecated, + DeviceRADSuperMoonSettingsTypeDeprecated, DeviceRADMoon2SettingsType, - DeviceRADPlutoSettingsType, - DeviceRADGigalogSettingsType, - DeviceVCANRFSettingsType, - DeviceEEVBSettingsType, + DeviceRADPlutoSettingsTypeDeprecated, + DeviceRADGigalogSettingsTypeDeprecated, + DeviceDeprecatedType, + DeviceEEVBSettingsTypeDeprecated, DeviceVCAN4IndSettingsType, DeviceNeoECU12SettingsType, DeviceFlexVnetzSettingsType, DeviceCANHUBSettingsType, - DeviceIEVBSettingsType, - DeviceOBD2SimSettingsType, - DeviceCMProbeSettingsType, - DeviceOBD2ProSettingsType, - DeviceRedSettingsType, - DeviceRADPlutoSwitchSettingsType, + DeviceIEVBSettingsTypeDeprecated, + DeviceOBD2SimSettingsTypeDeprecated, + DeviceCMProbeSettingsTypeDeprecated, + DeviceOBD2ProSettingsTypeDeprecated, + DeviceRedSettingsTypeDeprecated, + DeviceRADPlutoSwitchSettingsTypeDeprecated, DeviceRADGigastarSettingsType, DeviceRADJupiterSettingsType, - DeviceFire3SettingsType, - DeviceRadMoonDuoSettingsType, - DeviceEtherBadgeSettingsType, + DeviceRed2SettingsType, + DeviceRadMoonDuoSettingsTypeDeprecated, + DeviceEtherBadgeSettingsTypeDeprecated, DeviceRADA2BSettingsType, DeviceRADEpsilonSettingsType, DeviceOBD2LCSettingsType, DeviceRADBMSSettingsType, + DeviceRADMoon3SettingsType, + DeviceFire3SettingsType, + DeviceFire3FlexraySettingsType, + DeviceRADCometSettingsType, + DeviceNeoVIConnectSettingsType, + DeviceRADComet3SettingsType, + DeviceRADGalaxy2SettingsType, + DeviceRADGigastar2SettingsType, + DeviceRADMoonT1SSettingsType, + DeviceRADGeminiSettingsType, + DeviceFire3T1sLinSettingsType, // add new settings type here // Also add to map inside cicsneoVI::Init() DeviceSettingsTypeMax, - DeviceSettingsNone = 0xFFFFFFFF// just wanted to reserve this + DeviceSettingsNone = 0xFFFFFFFF // just wanted to reserve this } EDeviceSettingsType; typedef struct _SDeviceSettings { EDeviceSettingsType DeviceSettingType; - union { - SRedSettings red; - SFireSettings fire; + union + { SFireVnetSettings firevnet; SCyanSettings cyan; - SVCAN3Settings vcan3; SVCAN4Settings vcan4; - SECUSettings ecu; - SIEVBSettings ievb; - SPendantSettings pendant; SRADGalaxySettings radgalaxy; SRADStar2Settings radstar2; - SOBD2SimSettings neoobd2_sim; - SCmProbeSettings cmprobe; - SOBD2ProSettings obd2pro; SVCAN412Settings vcan412; - SVCAN412Settings vcan4_12;// backwards compatibility with older code - SECU_AVBSettings neoecu_avb; - SRADSuperMoonSettings radsupermoon; + SVCAN412Settings vcan4_12; // backwards compatibility with older code SRADMoon2Settings radmoon2; - SRADPlutoSettings pluto; - SPlutoSwitchSettings plutoswitch; - SRADGigalogSettings radgigalog; SCANHubSettings canhub; SNeoECU12Settings neoecu12; - SVCANRFSettings vcanrf; - SEEVBSettings eevb; SFlexVnetzSettings flexvnetz; SVividCANSettings vividcan; SVCAN4IndSettings vcan4_ind; SOBD2LCSettings obd2lc; SRADGigastarSettings radgigastar; + SRADGalaxy2Settings radGalaxy2; SRADJupiterSettings jupiter; SFire3Settings fire3; - SRadMoonDuoSettings radmoon_duo; - SEtherBadgeSettings etherBadge; + SRed2Settings red2; SRADA2BSettings rad_a2b; SRADEpsilonSettings epsilon; SRADBMSSettings rad_bms; + SRADMoon3Settings radmoon3; + SRADGeminiSettings radgemini; + SFire3FlexraySettings fire3Flexray; + SFire3T1sLinSettings fire3t1slin; + SRADCometSettings radcomet; + SRADComet3Settings radcomet3; + SRADGigastar2Settings radgigastar2; + SRADMoonT1SSettings radmoont1s; + SNeoVIConnectSettings neovi_connect; // Make sure GLOBAL_SETTINGS matches this // NOTE: When adding new structures here implement inside icsneoGetDeviceSettings and icsneoSetDeviceSettings also. } Settings; } Settings; @@ -3994,13 +4558,43 @@ typedef struct _SDeviceSettings typedef enum _EPlasmaIonVnetChannel_t { - PlasmaIonVnetChannelMain,// PLASMA = SLOT 2, ION = VNET2 - PlasmaIonVnetChannelA,// PLASMA = SLOT 1, ION = VNET1 - PlasmaIonVnetChannelB,// PLASMA = SLOT 3, ION = NA + PlasmaIonVnetChannelMain, // PLASMA = SLOT 2, ION = VNET2 + PlasmaIonVnetChannelA, // PLASMA = SLOT 1, ION = VNET1 + PlasmaIonVnetChannelB, // PLASMA = SLOT 3, ION = NA eSoftCore, eFpgaStatusResp, } EPlasmaIonVnetChannel_t; +typedef enum _EwBMSManagerPort_t +{ + eManagerPortA = 0, + eManagerPortB, +} EwBMSManagerPort_t; + +typedef enum _EwBMSManagerLockState_t +{ + eLockManager = 0, + eUnlockManager, +} EwBMSManagerLockState_t; + +typedef enum _EUartPort_t +{ + eUART0 = 0, + eUART1, +} EUartPort_t; + +typedef enum _eGenericAPIOptions +{ + eGENERIC_API = 0, + eADI_WIL_API = 1, +} eGenericAPIOptions; + +typedef enum _EwBMSInstance_t +{ + ewBMSInstance0 = 0, + ewBMSInstance1, +} EwBMSInstance_t; + typedef struct _stCM_ISO157652_TxMessage { uint16_t vs_netid; /* The netid of the message (determines which network to transmit on), not supported */ @@ -4027,7 +4621,8 @@ typedef struct _stCM_ISO157652_TxMessage uint32_t num_bytes; /* Number of data bytes */ - union { + union + { struct { unsigned @@ -4079,7 +4674,8 @@ typedef struct uint8_t tx_dl; /* Maximum CAN(FD) protocol length for transmitted frames. Valid values are 8, 12, 16, 20, 24, 32, 48, 64 */ - union { + union + { struct { uint16_t id_29_bit_enable : 1; @@ -4118,7 +4714,8 @@ typedef struct _stCM_ISO157652_RxMessage uint16_t cf_timeout; /* max timeout (ms) for waiting on consecutive frame. Set this to N_CR_MAX's value in J2534 */ - union { + union + { struct { unsigned id_29_bit_enable : 1; /* Enables 29 bit arbId filter for frames (from ECU to neoVI) */ @@ -4190,7 +4787,8 @@ typedef struct _icsSpyMessage descIdType DescriptionID; uint32_t ArbIDOrHeader; uint8_t Data[8]; - union { + union + { struct { uint32_t StatusBitField3; @@ -4222,7 +4820,8 @@ typedef struct _icsSpyMessageFlexRay uint8_t NumberBytesData; uint8_t NetworkID2; descIdType DescriptionID; - union { + union + { uint32_t ArbIDOrHeader; struct { @@ -4240,7 +4839,8 @@ typedef struct _icsSpyMessageFlexRay }; }; uint8_t Data[8]; - union { + union + { struct { uint32_t StatusBitField3; @@ -4264,6 +4864,104 @@ typedef struct _icsSpyMessageFlexRay uint8_t Reserved[3]; } icsSpyMessageFlexRay; +typedef struct _icsSpyMessageMdio +{ + uint32_t StatusBitField; + uint32_t StatusBitField2; + uint32_t TimeHardware; + uint32_t TimeHardware2; + uint32_t TimeSystem; + uint32_t TimeSystem2; + uint8_t TimeStampHardwareID; + uint8_t TimeStampSystemID; + uint8_t NetworkID; + uint8_t NodeID; + uint8_t Protocol; + uint8_t MessagePieceID; + uint8_t ExtraDataPtrEnabled; + uint8_t NumberBytesHeader; + uint8_t NumberBytesData; + uint8_t NetworkID2; + descIdType DescriptionID; + union + { + uint32_t ArbIDOrHeader; + struct + { + uint32_t RegAddr : 16; + uint32_t PhyAddr : 5; + uint32_t DevType : 5; + uint32_t : 6; + }; + }; + uint8_t Data[8]; + union + { + struct + { + uint32_t StatusBitField3; + uint32_t StatusBitField4; + }; + uint8_t AckBytes[8]; + }; + void* ExtraDataPtr; + uint8_t MiscData; + uint8_t Reserved[3]; +} icsSpyMessageMdio; + +typedef struct _icsSpyMessagewBMS +{ + uint32_t StatusBitField; + uint32_t StatusBitField2; + uint32_t TimeHardware; + uint32_t TimeHardware2; + uint32_t TimeSystem; + uint32_t TimeSystem2; + uint8_t TimeStampHardwareID; + uint8_t TimeStampSystemID; + uint8_t NetworkID; + uint8_t NodeID; + uint8_t Protocol; + uint8_t MessagePieceID; + uint8_t ExtraDataPtrEnabled; + uint8_t NumberBytesHeader; + uint8_t NumberBytesData; + uint8_t NetworkID2; + descIdType DescriptionID; + union + { + uint32_t ArbIDOrHeader; + struct + { + uint32_t : 8; + uint32_t PacketType : 8; + uint32_t PacketID : 8; + uint32_t PacketSource : 8; + }; + }; + uint8_t Data[8]; + union + { + struct + { + union + { + uint32_t StatusBitField3; + struct + { + uint32_t APICode : 8; + uint32_t : 24; + }; + }; + uint32_t StatusBitField4; + }; + uint8_t AckBytes[8]; + }; + void* ExtraDataPtr; + uint8_t MiscData; + uint8_t Reserved[3]; +} icsSpyMessagewBMS; + #if defined(VSPY3_GUI) || defined(WIVI_EXPORT) || defined(VS4A) || defined(CORELIB_CMAKE) || defined(NEOVI3GEXPLORER) #if defined(IS_64BIT_SYSTEM) #define icsSpyMessage_SIZE 80 @@ -4300,7 +4998,8 @@ typedef struct _icsSpyMessageLong uint32_t ArbIDOrHeader; uint32_t DataMsb; uint32_t DataLsb; - union { + union + { struct { uint32_t StatusBitField3; @@ -4335,7 +5034,8 @@ typedef struct _icsSpyMessageJ1850 descIdType DescriptionID; uint8_t Header[4]; uint8_t Data[8]; - union { + union + { struct { uint32_t StatusBitField3; @@ -4370,7 +5070,8 @@ typedef struct _icsSpyMessageVSB int16_t DescriptionID; uint32_t ArbIDOrHeader; uint8_t Data[8]; - union { + union + { struct { uint32_t StatusBitField3; @@ -4378,7 +5079,7 @@ typedef struct _icsSpyMessageVSB }; uint8_t AckBytes[8]; }; - uint32_t ExtraDataPtr; + uint32_t ExtraDataPtr; //in the context of a vsb file, this is a size, not a pointer uint8_t MiscData; uint8_t Reserved[3]; } icsSpyMessageVSB; @@ -4443,30 +5144,17 @@ typedef struct typedef struct { uint8_t ethernetActivationLineEnabled; - ethernetNetworkStatus_t ethernetStatus; - uint8_t unused; + ethernetNetworkStatus_t ethernetStatus[16]; + uint8_t numNetworks; + uint8_t reserved; + uint8_t ethernetActivationLineEnabled_2; } icsFire3DeviceStatus; typedef struct { - ethernetNetworkStatus_t ethernetStatus[4]; -} icsRadMoonDuoDeviceStatus; - -typedef struct -{ - ethernetNetworkStatus_t ethernetStatus[RADJUPITER_NUM_PORTS-1]; + ethernetNetworkStatus_t ethernetStatus[RADJUPITER_NUM_PORTS - 1]; } icsRadJupiterDeviceStatus; -typedef struct -{ - ethernetNetworkStatus_t ethernetStatus; -} icsOBD2ProDeviceStatus; - -typedef struct -{ - ethernetNetworkStatus_t ethernetStatus[4]; -} icsRadPlutoDeviceStatus; - typedef struct { ethernetNetworkStatus_t ethernetStatus; @@ -4474,7 +5162,7 @@ typedef struct typedef struct { - ethernetNetworkStatus_t ethernetStatus; + ethernetNetworkStatus_t ethernetStatus[RADEPSILON_NUM_PORTS]; } icsRadEpsilonDeviceStatus; typedef struct @@ -4485,15 +5173,14 @@ typedef struct #pragma pack(push) #pragma pack(4) -typedef union { +typedef union +{ icsFire2DeviceStatus fire2Status; icsVcan4DeviceStatus vcan4Status; icsFlexVnetzDeviceStatus flexVnetzStatus; icsFire3DeviceStatus fire3Status; - icsRadMoonDuoDeviceStatus radMoonDuoStatus; icsRadJupiterDeviceStatus jupiterStatus; - icsOBD2ProDeviceStatus obd2proStatus; - icsRadPlutoDeviceStatus plutoStatus; + icsRadEpsilonDeviceStatus epsilonStatus; icsVcan4IndustrialDeviceStatus vcan4indStatus; icsRadBMSDeviceStatus radBMSStatus; } icsDeviceStatus; @@ -4502,14 +5189,14 @@ typedef union { typedef struct { - char szName[128];//Adaptor name - ASCII Null terminated - char szDeviceName[64];//Device name - ASCII Null terminated - unsigned long Status;//Adaptor Status, 0 for disabled, 1 for enabled + char szName[128]; //Adaptor name - ASCII Null terminated + char szDeviceName[64]; //Device name - ASCII Null terminated + unsigned long Status; //Adaptor Status, 0 for disabled, 1 for enabled unsigned char - bMAC_Address[6];// The Media Access Control (MAC) Address of the Network interface in the PC that is to be connected to the vehicle. + bMAC_Address[6]; // The Media Access Control (MAC) Address of the Network interface in the PC that is to be connected to the vehicle. unsigned char bIPV6_Address - [16];//The Ipv6 address assigned to the Network interface. No compressed or short form notation// If not available, all bytes are set to zero to imply the absence of an address. - unsigned char bIPV4_Address[4];// The Ipv4 address assigned to the Network interface. If not available, all bytes are set to zero. + [16]; //The Ipv6 address assigned to the Network interface. No compressed or short form notation// If not available, all bytes are set to zero to imply the absence of an address. + unsigned char bIPV4_Address[4]; // The Ipv4 address assigned to the Network interface. If not available, all bytes are set to zero. unsigned long EthernetPinConfig; } NDIS_ADAPTER_INFORMATION; @@ -4520,18 +5207,18 @@ typedef struct SPhyRegPktHdr uint16_t numEntries; uint8_t version; uint8_t entryBytes; -}PhyRegPktHdr_t; +} PhyRegPktHdr_t; -#define MAX_PHY_SETTINGS_STRUCT 128 -#define MAX_NUMBYTES_PHYSETTINGS MAX_PHY_SETTINGS_STRUCT*sizeof(PhyRegPktHdr_t) +#define MAX_PHY_SETTINGS_STRUCT 128 +#define MAX_NUMBYTES_PHYSETTINGS MAX_PHY_SETTINGS_STRUCT * sizeof(PhyRegPktHdr_t) typedef struct SPhyRegPktClause22Mess { uint8_t phyAddr; //5 bits - uint8_t page;//8 bits + uint8_t page; //8 bits uint16_t regAddr; //5 bits uint16_t regVal; -}PhyRegPktClause22Mess_t; //6 bytes +} PhyRegPktClause22Mess_t; //6 bytes typedef struct SPhyRegPktClause45Mess { @@ -4539,7 +5226,7 @@ typedef struct SPhyRegPktClause45Mess uint8_t device; //5 bits uint16_t regAddr; uint16_t regVal; -}PhyRegPktClause45Mess_t; //6 bytes +} PhyRegPktClause45Mess_t; //6 bytes typedef enum SPhyRegPktStatus { @@ -4547,7 +5234,7 @@ typedef enum SPhyRegPktStatus PHYREG_FAILURE, PHYREG_INVALID_MDIO_BUS_INDEX, PHYREG_INVALID_PHY_ADDR, - PHYREG_RESERVED0, + PHYREG_UNSUPPORTED_MDIO_CLAUSE, PHYREG_RESERVED1, PHYREG_RESERVED2, PHYREG_RESERVED3 @@ -4564,14 +5251,15 @@ typedef struct SPhyRegPkt { union { - struct{ - uint16_t Enabled:1; - uint16_t WriteEnable:1; - uint16_t Clause45Enable:1; - uint16_t status:2; - uint16_t reserved:3; - uint16_t BusIndex:4; - uint16_t version:4; + struct + { + uint16_t Enabled : 1; + uint16_t WriteEnable : 1; + uint16_t Clause45Enable : 1; + uint16_t status : 3; + uint16_t reserved : 2; + uint16_t BusIndex : 4; + uint16_t version : 4; }; uint16_t flags; }; @@ -4581,26 +5269,104 @@ typedef struct SPhyRegPkt PhyRegPktClause22Mess_t clause22; PhyRegPktClause45Mess_t clause45; }; -}PhyRegPkt_t; - +} PhyRegPkt_t; -#ifndef INTREPID_NO_CHECK_STRUCT_SIZE +typedef enum +{ + networkDWCAN01, + networkDWCAN02, + networkDWCAN03, + networkDWCAN04, + networkDWCAN05, + networkDWCAN06, + networkDWCAN07, + networkDWCAN08, + networkTerminationDWCAN01, + networkTerminationDWCAN02, + networkTerminationDWCAN03, + networkTerminationDWCAN04, + networkTerminationDWCAN05, + networkTerminationDWCAN06, + networkTerminationDWCAN07, + networkTerminationDWCAN08, + enhancedFlashDriver, + rtcCalibration, + rtcClosedLoopCalibration, + cmp, + NUM_VALID_DEVICE_FEATURES, + supportedFeatureMax = 0xFFFF, +} DeviceFeature; + +typedef enum AccessoryErrorType +{ + AccessoryOperationError = 0, + AccessoryOperationSuccess = 1, + AccessoryFlashingInitError = 2, + AccessoryFlashingEraseError = 3, + AccessoryFlashingWriteError = 4, + AccessoryFlashingReadError = 5, + AccessoryFlashingVerifyError = 6, + AccessoryFlashingDeinitError = 7, + AccessoryFlashingInvalidHardware = 8, + AccessoryFlashingInvalidDataFile = 9, + AccessoryGetVersionError = 10, + AccessoryIndexError = 11, + AccessoryParamApiVersionError = 12, + AccessoryParamSizeMismatchError = 13, + AccessoryParameterNull = 14, +} AccessoryOperationErrorType; + +typedef enum _EDevNameType +{ + EDevNameTypeDefault, + EDevNameTypeNoSerial, + EDevNameTypeTCP, + EDevNameTypeTCPShort, +} EDevNameType; -#if (defined(__cplusplus) && (__cplusplus > 199711L)) -#define ics_static_assert(e, msg) static_assert(e, msg) -#define CHECK_STRUCT_SIZE(X) ics_static_assert(sizeof(X) == X##_SIZE, #X " is the wrong size"); +#pragma pack(push, 1) +typedef struct _FlashAccessoryFirmwareParams +{ + // set to FlashAccessoryFirmwareAPIVersion - This should increment anytime there is a breakage of ABI / API. + uint32_t apiVersion; + // sizeof(FlashAccessoryFirmwareParams) + uint32_t size; + // Device specific Index - we should have an enum/preprocess define for all of these + uint8_t index; + // firmware data + uint8_t* data; + // size of firmware data + uint32_t dataSize; +} FlashAccessoryFirmwareParams; +#pragma pack(pop) +#if defined(IS_64BIT_SYSTEM) +#define FlashAccessoryFirmwareParams_SIZE (21) #else -#define ASSERT_CONCAT_(a, b) a##b -#define ASSERT_CONCAT(a, b) ASSERT_CONCAT_(a, b) -#define ics_static_assert(e, msg) \ - enum \ - { \ - ASSERT_CONCAT(assert_line_, __LINE__) = 1 / (int)(!!(e)) \ - } -#define CHECK_STRUCT_SIZE(X) ics_static_assert(sizeof(X) == X##_SIZE, #X " is the wrong size"); +#define FlashAccessoryFirmwareParams_SIZE (17) #endif +typedef enum _flashAccessoryIndex +{ + FLASH_ACCESSORY_EPSILON_10G_PHY1, + FLASH_ACCESSORY_EPSILON_10G_PHY2, + FLASH_ACCESSORY_EPSILON_SWITCH_A, + FLASH_ACCESSORY_EPSILON_SWITCH_B, +} flashAccessoryIndex; + +typedef enum _epsilon10GPHYFW +{ + FLASH_ACCESSORY_EPSILON_10G_PHY_FW_0_3_7_0 +} epsilon10GPHYFW; + +// Update this assert when we add features to this enum +//static_assert(NUM_VALID_DEVICE_FEATURES == (networkTerminationDWCAN08 + 1)); +//static_assert(NUM_VALID_DEVICE_FEATURES <= supportedFeatureMax); +#define NUM_DEVICE_FEATURE_BITFIELDS ((NUM_VALID_DEVICE_FEATURES + 31) / 32) + + +#if !defined(INTREPID_NO_CHECK_STRUCT_SIZE) && defined(__cpp_static_assert) +#define CHECK_STRUCT_SIZE(X) static_assert(sizeof(X) == X##_SIZE, #X " is the wrong size"); CHECK_STRUCT_SIZE(CAN_SETTINGS); CHECK_STRUCT_SIZE(CANFD_SETTINGS); CHECK_STRUCT_SIZE(SWCAN_SETTINGS); @@ -4609,7 +5375,6 @@ CHECK_STRUCT_SIZE(ISO9141_KEYWORD2000__INIT_STEP); CHECK_STRUCT_SIZE(ISO9141_KEYWORD2000_SETTINGS); CHECK_STRUCT_SIZE(UART_SETTINGS); CHECK_STRUCT_SIZE(J1708_SETTINGS); -CHECK_STRUCT_SIZE(SRedSettings); CHECK_STRUCT_SIZE(STextAPISettings); CHECK_STRUCT_SIZE(stChipVersions); CHECK_STRUCT_SIZE(SNeoMostGatewaySettings); @@ -4618,6 +5383,10 @@ CHECK_STRUCT_SIZE(OP_ETH_SETTINGS); CHECK_STRUCT_SIZE(ETHERNET_SETTINGS); CHECK_STRUCT_SIZE(ETHERNET_SETTINGS2); CHECK_STRUCT_SIZE(ETHERNET10G_SETTINGS); +CHECK_STRUCT_SIZE(ETHERNET10T1S_SETTINGS); +CHECK_STRUCT_SIZE(ETHERNET10T1S_SETTINGS_EXT); +CHECK_STRUCT_SIZE(ETHERNET10T1L_SETTINGS); +CHECK_STRUCT_SIZE(MACSEC_SETTINGS); CHECK_STRUCT_SIZE(LOGGER_SETTINGS); CHECK_STRUCT_SIZE(DISK_SETTINGS); CHECK_STRUCT_SIZE(SERDESCAM_SETTINGS); @@ -4625,20 +5394,11 @@ CHECK_STRUCT_SIZE(SERDESPOC_SETTINGS); CHECK_STRUCT_SIZE(SERDESGEN_SETTINGS); CHECK_STRUCT_SIZE(RAD_REPORTING_SETTINGS); CHECK_STRUCT_SIZE(CANTERM_SETTINGS); -CHECK_STRUCT_SIZE(SFireSettings); CHECK_STRUCT_SIZE(SFireVnetSettings); CHECK_STRUCT_SIZE(SCyanSettings); -CHECK_STRUCT_SIZE(SVCAN3Settings); CHECK_STRUCT_SIZE(SVCAN4Settings); -CHECK_STRUCT_SIZE(SVCANRFSettings); -CHECK_STRUCT_SIZE(SECUSettings); -CHECK_STRUCT_SIZE(SPendantSettings); -CHECK_STRUCT_SIZE(SIEVBSettings); -CHECK_STRUCT_SIZE(SEEVBSettings); CHECK_STRUCT_SIZE(SRADGalaxySettings); CHECK_STRUCT_SIZE(SRADStar2Settings); -CHECK_STRUCT_SIZE(SOBD2SimSettings) -CHECK_STRUCT_SIZE(CmProbeSettings); CHECK_STRUCT_SIZE(GLOBAL_SETTINGS); CHECK_STRUCT_SIZE(stCM_ISO157652_TxMessage); CHECK_STRUCT_SIZE(stCM_ISO157652_RxMessage); @@ -4647,32 +5407,37 @@ CHECK_STRUCT_SIZE(icsSpyMessage); CHECK_STRUCT_SIZE(icsSpyMessageLong); CHECK_STRUCT_SIZE(icsSpyMessageJ1850); CHECK_STRUCT_SIZE(icsSpyMessageVSB); -CHECK_STRUCT_SIZE(OBD2ProSettings); CHECK_STRUCT_SIZE(ISO15765_2015_TxMessage); CHECK_STRUCT_SIZE(TIMESYNC_ICSHARDWARE_SETTINGS); -CHECK_STRUCT_SIZE(SRADSuperMoonSettings); CHECK_STRUCT_SIZE(SRADMoon2Settings); -CHECK_STRUCT_SIZE(SRADGigalogSettings); CHECK_STRUCT_SIZE(SRADGigastarSettings); -CHECK_STRUCT_SIZE(SExtSubCmdHdr); +CHECK_STRUCT_SIZE(SRADGalaxy2Settings); CHECK_STRUCT_SIZE(SDiskStructure); CHECK_STRUCT_SIZE(SDiskFormatProgress); CHECK_STRUCT_SIZE(SDiskStatus); -CHECK_STRUCT_SIZE(SExtSubCmdComm); -CHECK_STRUCT_SIZE(SRADPlutoSettings); CHECK_STRUCT_SIZE(CANHubSettings); CHECK_STRUCT_SIZE(SNeoECU12Settings); -CHECK_STRUCT_SIZE(SPlutoSwitchSettings); CHECK_STRUCT_SIZE(VCAN4IndSettings); CHECK_STRUCT_SIZE(SRADJupiterSettings); -CHECK_STRUCT_SIZE(RadMoonDuoSettings); CHECK_STRUCT_SIZE(SFire3Settings); -CHECK_STRUCT_SIZE(SEtherBadgeSettings); +CHECK_STRUCT_SIZE(SRed2Settings); CHECK_STRUCT_SIZE(SRADA2BSettings); CHECK_STRUCT_SIZE(A2BMonitorSettings); CHECK_STRUCT_SIZE(SRADEpsilonSettings); CHECK_STRUCT_SIZE(RAD_GPTP_SETTINGS); CHECK_STRUCT_SIZE(SRADBMSSettings); +CHECK_STRUCT_SIZE(SRADMoon3Settings); +CHECK_STRUCT_SIZE(SRADGeminiSettings); +CHECK_STRUCT_SIZE(SFire3FlexraySettings); +CHECK_STRUCT_SIZE(SFire3T1sLinSettings); +CHECK_STRUCT_SIZE(CANHubSettings); +CHECK_STRUCT_SIZE(SRADCometSettings); +CHECK_STRUCT_SIZE(SRADComet3Settings); +CHECK_STRUCT_SIZE(SRADGigastar2Settings); +CHECK_STRUCT_SIZE(SRADMoonT1SSettings); +CHECK_STRUCT_SIZE(SNeoVIConnectSettings); +CHECK_STRUCT_SIZE(FlashAccessoryFirmwareParams); +#undef CHECK_STRUCT_SIZE #endif /* INTREPID_NO_CHECK_STRUCT_SIZE */ #endif /* _ICSNVC40_H */ diff --git a/include/ics/icsnVC40.h.patch b/include/ics/icsnVC40.h.patch deleted file mode 100644 index 73292dc83..000000000 --- a/include/ics/icsnVC40.h.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/include/ics/icsnVC40.h b/include/ics/icsnVC40.h -index 5a5bc27..279ae0d 100644 ---- a/include/ics/icsnVC40.h -+++ b/include/ics/icsnVC40.h -@@ -4046,6 +4046,9 @@ typedef struct _ethernetNetworkStatus_t - } ethernetNetworkStatus_t; - #pragma pack(pop) - -+#pragma pack(push) -+#pragma pack(4) -+ - typedef struct - { - uint8_t backupPowerGood; -@@ -4119,7 +4122,7 @@ typedef union { - icsRadPlutoDeviceStatus plutoStatus; - icsVcan4IndustrialDeviceStatus vcan4indStatus; - } icsDeviceStatus; -- -+#pragma pack(pop) - - typedef struct - { diff --git a/include/methods.h b/include/methods.h index d8ae81937..605c12792 100644 --- a/include/methods.h +++ b/include/methods.h @@ -1,1482 +1,2024 @@ #ifndef _METHODS_H_ #define _METHODS_H_ #include -#include "object_neo_device.h" #include "object_spy_message.h" #include "setup_module_auto_defines.h" #ifdef _cplusplus -extern "C" { +extern "C" +{ #endif -PyObject* meth_find_devices(PyObject* self, PyObject* args, PyObject* keywords); -PyObject* meth_open_device(PyObject* self, PyObject* args, PyObject* keywords); -PyObject* meth_close_device(PyObject* self, PyObject* args); -PyObject* meth_get_rtc(PyObject* self, PyObject* args); -PyObject* meth_set_rtc(PyObject* self, PyObject* args); -PyObject* meth_coremini_load(PyObject* self, PyObject* args); -PyObject* meth_coremini_start(PyObject* self, PyObject* args); -PyObject* meth_coremini_stop(PyObject* self, PyObject* args); -PyObject* meth_coremini_clear(PyObject* self, PyObject* args); -PyObject* meth_coremini_get_status(PyObject* self, PyObject* args); -PyObject* meth_transmit_messages(PyObject* self, PyObject* args); -PyObject* meth_get_messages(PyObject* self, PyObject* args); -PyObject* meth_get_script_status(PyObject* self, PyObject* args); -PyObject* meth_get_error_messages(PyObject* self, PyObject* args); + PyObject* meth_find_devices(PyObject* self, PyObject* args, PyObject* keywords); + PyObject* meth_open_device(PyObject* self, PyObject* args, PyObject* keywords); + PyObject* meth_close_device(PyObject* self, PyObject* args); + PyObject* meth_get_rtc(PyObject* self, PyObject* args); + PyObject* meth_set_rtc(PyObject* self, PyObject* args); + PyObject* meth_coremini_load(PyObject* self, PyObject* args); + PyObject* meth_coremini_start(PyObject* self, PyObject* args); + PyObject* meth_coremini_stop(PyObject* self, PyObject* args); + PyObject* meth_coremini_clear(PyObject* self, PyObject* args); + PyObject* meth_coremini_get_status(PyObject* self, PyObject* args); + PyObject* meth_transmit_messages(PyObject* self, PyObject* args); + PyObject* meth_get_messages(PyObject* self, PyObject* args); + PyObject* meth_get_script_status(PyObject* self, PyObject* args); + PyObject* meth_get_error_messages(PyObject* self, PyObject* args); #ifdef _USE_INTERNAL_HEADER_ -PyObject* meth_flash_devices(PyObject* self, PyObject* args); + PyObject* meth_flash_devices(PyObject* self, PyObject* args); #endif // _USE_INTERNAL_HEADER_ -PyObject* meth_set_reflash_callback(PyObject* self, PyObject* args); -PyObject* meth_get_device_settings(PyObject* self, PyObject* args); -PyObject* meth_set_device_settings(PyObject* self, PyObject* args); -PyObject* meth_load_default_settings(PyObject* self, PyObject* args); // icsneoLoadDefaultSettings -//PyObject* meth_spy_message_to_j1850(PyObject* self, PyObject* args); -PyObject* meth_read_sdcard(PyObject* self, PyObject* args); -PyObject* meth_write_sdcard(PyObject* self, PyObject* args); -PyObject* meth_create_neovi_radio_message(PyObject* self, PyObject* args, PyObject* keywords); -PyObject* meth_coremini_start_fblock(PyObject* self, PyObject* args); //ScriptStartFBlock -PyObject* meth_coremini_stop_fblock(PyObject* self, PyObject* args); //ScriptStopFBlock -PyObject* meth_coremini_get_fblock_status(PyObject* self, PyObject* args); //ScriptGetFBlockStatus -PyObject* meth_coremini_read_app_signal(PyObject* self, PyObject* args); //ScriptReadAppSignal -PyObject* meth_coremini_write_app_signal(PyObject* self, PyObject* args); //ScriptWriteAppSignal -PyObject* meth_coremini_read_tx_message(PyObject* self, PyObject* args); //ScriptReadTxMessage -PyObject* meth_coremini_read_rx_message(PyObject* self, PyObject* args); //ScriptReadRxMessage -PyObject* meth_coremini_write_tx_message(PyObject* self, PyObject* args); //ScriptWriteTxMessage -PyObject* meth_coremini_write_rx_message(PyObject* self, PyObject* args); //ScriptWriteRxMessage -PyObject* meth_get_performance_parameters(PyObject* self, PyObject* args); -PyObject* meth_validate_hobject(PyObject* self, PyObject* args); -PyObject* meth_get_last_api_error(PyObject* self, PyObject* args); -PyObject* meth_get_dll_version(PyObject* self, PyObject* args); -PyObject* meth_get_hw_firmware_info(PyObject* self, PyObject* args); -PyObject* meth_base36enc(PyObject* self, PyObject* args); -PyObject* meth_get_serial_number(PyObject* self, PyObject* args); -PyObject* meth_request_enter_sleep_mode(PyObject* self, PyObject* args); -PyObject* meth_set_context(PyObject* self, PyObject* args); -PyObject* meth_force_firmware_update(PyObject* self, PyObject* args); -PyObject* meth_firmware_update_required(PyObject* self, PyObject* args); -PyObject* meth_get_dll_firmware_info(PyObject* self, PyObject* args); -PyObject* meth_get_backup_power_enabled(PyObject* self, PyObject* args); -PyObject* meth_set_backup_power_enabled(PyObject* self, PyObject* args); -PyObject* meth_get_backup_power_ready(PyObject* self, PyObject* args); -PyObject* meth_load_readbin(PyObject* self, PyObject* args); -PyObject* meth_iso15765_transmit_message(PyObject* self, PyObject* args); // icsneoISO15765_TransmitMessage -PyObject* meth_iso15765_receive_message(PyObject* self, PyObject* args); // icsneoISO15765_ReceiveMessageMessage -PyObject* meth_iso15765_enable_networks(PyObject* self, PyObject* args); // icsneoISO15765_EnableNetworks -PyObject* meth_iso15765_disable_networks(PyObject* self, PyObject* args); // icsneoISO15765_DisableNetworks -PyObject* meth_get_active_vnet_channel(PyObject* self, PyObject* args); -PyObject* meth_set_active_vnet_channel(PyObject* self, PyObject* args); -PyObject* meth_override_library_name(PyObject* self, PyObject* args); -PyObject* meth_get_library_path(PyObject* self); -PyObject* meth_set_bit_rate(PyObject* self, PyObject* args); -PyObject* meth_set_fd_bit_rate(PyObject* self, PyObject* args); -PyObject* meth_set_bit_rate_ex(PyObject* self, PyObject* args); -PyObject* meth_get_timestamp_for_msg(PyObject* self, PyObject* args); -PyObject* meth_get_device_status(PyObject* self, PyObject* args); -PyObject* meth_enable_network_com(PyObject* self, PyObject* args); //icsneoEnableNetworkCom -PyObject* meth_enable_bus_voltage_monitor(PyObject* self, PyObject* args); -PyObject* meth_get_bus_voltage(PyObject* self, PyObject* args); -PyObject* meth_read_jupiter_firmware(PyObject* self, PyObject* args); -PyObject* meth_write_jupiter_firmware(PyObject* self, PyObject* args); -PyObject* meth_get_disk_details(PyObject* self, PyObject* args); -PyObject* meth_disk_format(PyObject* self, PyObject* args); -PyObject* meth_disk_format_cancel(PyObject* self, PyObject* args); -PyObject* meth_get_disk_format_progress(PyObject* self, PyObject* args); -PyObject* meth_enable_doip_line(PyObject* self, PyObject* args); //icsneoEnableDOIPLine -//PyObject* meth_is_device_feature_supported(PyObject* self, PyObject* args); // icsneoIsDeviceFeatureSupported + PyObject* meth_set_reflash_callback(PyObject* self, PyObject* args); + PyObject* meth_get_device_settings(PyObject* self, PyObject* args); + PyObject* meth_set_device_settings(PyObject* self, PyObject* args); + PyObject* meth_load_default_settings(PyObject* self, PyObject* args); // icsneoLoadDefaultSettings + // PyObject* meth_spy_message_to_j1850(PyObject* self, PyObject* args); + PyObject* meth_read_sdcard(PyObject* self, PyObject* args); + PyObject* meth_write_sdcard(PyObject* self, PyObject* args); + PyObject* meth_create_neovi_radio_message(PyObject* self, PyObject* args, PyObject* keywords); + PyObject* meth_coremini_start_fblock(PyObject* self, PyObject* args); // ScriptStartFBlock + PyObject* meth_coremini_stop_fblock(PyObject* self, PyObject* args); // ScriptStopFBlock + PyObject* meth_coremini_get_fblock_status(PyObject* self, PyObject* args); // ScriptGetFBlockStatus + PyObject* meth_coremini_read_app_signal(PyObject* self, PyObject* args); // ScriptReadAppSignal + PyObject* meth_coremini_write_app_signal(PyObject* self, PyObject* args); // ScriptWriteAppSignal + PyObject* meth_coremini_read_tx_message(PyObject* self, PyObject* args); // ScriptReadTxMessage + PyObject* meth_coremini_read_rx_message(PyObject* self, PyObject* args); // ScriptReadRxMessage + PyObject* meth_coremini_write_tx_message(PyObject* self, PyObject* args); // ScriptWriteTxMessage + PyObject* meth_coremini_write_rx_message(PyObject* self, PyObject* args); // ScriptWriteRxMessage + PyObject* meth_get_performance_parameters(PyObject* self, PyObject* args); + PyObject* meth_validate_hobject(PyObject* self, PyObject* args); + PyObject* meth_get_last_api_error(PyObject* self, PyObject* args); + PyObject* meth_get_dll_version(PyObject* self, PyObject* args); + PyObject* meth_get_hw_firmware_info(PyObject* self, PyObject* args); + PyObject* meth_base36enc(PyObject* self, PyObject* args); + PyObject* meth_get_serial_number(PyObject* self, PyObject* args); + PyObject* meth_request_enter_sleep_mode(PyObject* self, PyObject* args); + PyObject* meth_set_context(PyObject* self, PyObject* args); + PyObject* meth_force_firmware_update(PyObject* self, PyObject* args); + PyObject* meth_firmware_update_required(PyObject* self, PyObject* args); + PyObject* meth_get_dll_firmware_info(PyObject* self, PyObject* args); + PyObject* meth_get_backup_power_enabled(PyObject* self, PyObject* args); + PyObject* meth_set_backup_power_enabled(PyObject* self, PyObject* args); + PyObject* meth_get_backup_power_ready(PyObject* self, PyObject* args); + PyObject* meth_load_readbin(PyObject* self, PyObject* args); + PyObject* meth_iso15765_transmit_message(PyObject* self, PyObject* args); // icsneoISO15765_TransmitMessage + PyObject* meth_iso15765_receive_message(PyObject* self, PyObject* args); // icsneoISO15765_ReceiveMessageMessage + PyObject* meth_iso15765_enable_networks(PyObject* self, PyObject* args); // icsneoISO15765_EnableNetworks + PyObject* meth_iso15765_disable_networks(PyObject* self, PyObject* args); // icsneoISO15765_DisableNetworks + PyObject* meth_get_active_vnet_channel(PyObject* self, PyObject* args); + PyObject* meth_set_active_vnet_channel(PyObject* self, PyObject* args); + PyObject* meth_override_library_name(PyObject* self, PyObject* args); + PyObject* meth_get_library_path(PyObject* self); + PyObject* meth_set_bit_rate(PyObject* self, PyObject* args); + PyObject* meth_set_fd_bit_rate(PyObject* self, PyObject* args); + PyObject* meth_set_bit_rate_ex(PyObject* self, PyObject* args); + PyObject* meth_get_timestamp_for_msg(PyObject* self, PyObject* args); + PyObject* meth_get_device_status(PyObject* self, PyObject* args); + PyObject* meth_enable_network_com(PyObject* self, PyObject* args); // icsneoEnableNetworkCom + PyObject* meth_enable_bus_voltage_monitor(PyObject* self, PyObject* args); + PyObject* meth_get_bus_voltage(PyObject* self, PyObject* args); + PyObject* meth_read_jupiter_firmware(PyObject* self, PyObject* args); + PyObject* meth_write_jupiter_firmware(PyObject* self, PyObject* args); + PyObject* meth_get_disk_details(PyObject* self, PyObject* args); + PyObject* meth_disk_format(PyObject* self, PyObject* args); + PyObject* meth_disk_format_cancel(PyObject* self, PyObject* args); + PyObject* meth_get_disk_format_progress(PyObject* self, PyObject* args); + PyObject* meth_enable_doip_line(PyObject* self, PyObject* args); // icsneoEnableDOIPLine + PyObject* meth_is_device_feature_supported(PyObject* self, PyObject* args); // icsneoIsDeviceFeatureSupported + PyObject* meth_get_pcb_serial_number(PyObject* self, PyObject* args); + PyObject* meth_set_led_property(PyObject* self, PyObject* args); + PyObject* meth_start_dhcp_server(PyObject* self, PyObject* args); + PyObject* meth_stop_dhcp_server(PyObject* self, PyObject* args); + PyObject* meth_wbms_manager_write_lock(PyObject* self, PyObject* args); + PyObject* meth_wbms_manager_reset(PyObject* self, PyObject* args); + PyObject* meth_uart_write(PyObject* self, PyObject* args); + PyObject* meth_uart_read(PyObject* self, PyObject* args); + PyObject* meth_uart_set_baudrate(PyObject* self, PyObject* args); + PyObject* meth_uart_get_baudrate(PyObject* self, PyObject* args); + PyObject* meth_generic_api_send_command(PyObject* self, PyObject* args); + PyObject* meth_generic_api_read_data(PyObject* self, PyObject* args); + PyObject* meth_generic_api_get_status(PyObject* self, PyObject* args); + PyObject* meth_get_gptp_status(PyObject* self, PyObject* args); // icsneoGetGPTPStatus + PyObject* meth_get_all_chip_versions(PyObject* self, PyObject* args); // icsneoGetAllChipVersions + PyObject* meth_flash_accessory_firmware(PyObject* self, PyObject* args); + PyObject* meth_get_accessory_firmware_version(PyObject* self, PyObject* args); + PyObject* meth_set_safe_boot_mode(PyObject* self, PyObject* args); + PyObject* meth_get_device_name(PyObject* self, PyObject* args); // icsneoGetDeviceName + PyObject* meth_get_imei(PyObject* self, PyObject* args); // icsneoGetIMEI + PyObject* meth_get_component_versions(PyObject* self, PyObject* args); // icsneoGetComponentVersions + PyObject* meth_request_set_neovi_miscio(PyObject* self, PyObject* args); // icsneoRequestSetNeoVIMiscIO + PyObject* meth_get_firmware_variant(PyObject* self, PyObject* args); // icsneoGetFirmwareVariant #ifdef _cplusplus } #endif -#define _EZ_ICS_STRUCT_METHOD(name, icsname, icsname_no_icsneo, meth, flags, doc) \ - {name, (PyCFunction)meth, flags, doc}, \ - {icsname, (PyCFunction)meth, flags, "\n.. note:: Compatibility Function: Identical to PEP8 compliant :func:`" MODULE_NAME "." name "` method.\n\n"}, \ - {icsname_no_icsneo, (PyCFunction)meth, flags, "\n.. note:: Compatibility Function: Identical to PEP8 compliant :func:`" MODULE_NAME "." name "` method.\n\n"} - -#define _EZ_ICS_STRUCT_METHOD_MULTIPLE(name, icsname, icsname_no_icsneo, meth, flags, doc) \ - {icsname, (PyCFunction)meth, flags, "\n.. note:: Compatibility Function: Identical to PEP8 compliant :func:`" MODULE_NAME "." name "` method.\n\n"}, \ - {icsname_no_icsneo, (PyCFunction)meth, flags, "\n.. note:: Compatibility Function: Identical to PEP8 compliant :func:`" MODULE_NAME "." name "` method.\n\n"} - -#define _DOC_FIND_DEVICES \ - MODULE_NAME ".find_devices(device_type=" MODULE_NAME ".NEODEVICE_ALL)\n" \ - "\n" \ - "Finds all connected devices and returns a tuple of :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "` for use in :func:`" MODULE_NAME ".open_device`\n" \ - "\n" \ - "Args:\n" \ - "\tdevice_type (int): Accepts " MODULE_NAME ".NEODEVICE_* Macros\n\n" \ - "\t*New in 3.0 (803):*\n\n" \ - "\tdevice_types (List/Tuple): Accepts a Container of " MODULE_NAME ".NEODEVICE_* Macros\n\n" \ - "\tnetwork_id (int): OptionsFindNeoEx.CANOptions.iNetworkID. Usually ics.NETID_CAN, if needed\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tTuple of :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "` for use in :func:`" MODULE_NAME ".open_device`\n" \ - "\n" \ - "\t>>> for device in ics.find_devices():\n" \ - "\t... print(device.Name, device.SerialNumber)\n" \ - "\t...\n" \ - "\tneoVI FIRE 59886\n" \ - "\n*New in 3.0 (803):*\n" \ - "\t>>> for device in ics.find_devices([ics.NEODEVICE_FIRE, ics.NEODEVICE_VCAN3]):\n" \ - "\t... print(device.Name, device.SerialNumber)\n" \ - "\t...\n" \ - "\tneoVI FIRE 59886\n" - - -#define _DOC_OPEN_DEVICES \ - MODULE_NAME ".open_device(device)\n" \ - "\n" \ - "Opens the device. `device` can be omitted to return a :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "` of the\n" \ - "first free availible device, a :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`, or a serial number of the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\tdevice (int): Serial Number of the device\n\n" \ - "\tnetwork_ids (List/Tuple): This is an array of number IDs which specify the NetworkID parameter of each network. This allows you to assign a custom network ID to each network. Normally, you will assign consecutive IDs to each of the networks. See NetworkIDList for a list of current network ID's. You may also set this parameter to NULL (zero) and the default network ID's will be used.\n\n" \ - "\tconfig_read (int): Specifies whether the DLL should read the neoVI's device configuration before enabling the device. It is recommended that this value be set to 1.\n\n" \ - "\toptions (int): DEVICE_OPTION_* defines\n\n" \ - "\tnetwork_id (int): OptionsFindNeoEx.CANOptions.iNetworkID. Usually ics.NETID_CAN, if needed\n\n" \ - "\tuse_server (int): Defaults to False, Setting to True allows opening the same device more than once.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tIf :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "` is passed as a parameter, None. \n" \ - "\tIf serial number is passed as a parameter, a :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "` will be returned. \n" \ - "\tIf `device` parameter is omitted, a :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "` will be returned with the first availible free device. \n" \ - "\n" \ - "\t>>> for device in ics.find_devices():\n" \ - "\t... ics.open_device(device)\n" \ - "\t...\n" \ - "\n" \ - ".. note::\n\t:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "` will automatically close the device when it goes out of scope.\n\n" - -#define _DOC_CLOSE_DEVICES \ - MODULE_NAME ".close_device(device)\n" \ - "\n" \ - "Closes the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tError Count (int)\n" \ - "\n" \ - "\t>>> for device in ics.find_devices():\n" \ - "\t... ics.open_device(device)\n" \ - "\t... # Do something with the device...\n" \ - "\t... ics.close_device(device)\n" \ - "\t...\n" \ - "\n" \ - ".. note::\n\t:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "` will automatically close the device when it goes out of scope.\n\n" \ - -#define _DOC_GET_RTC \ - MODULE_NAME ".get_rtc(device)\n" \ - "\n" \ - "Gets the Real-Time Clock of the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tTuple: (datetime.datetime object, offset in seconds)\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> ics.get_rtc(device)\n" \ - "\t(datetime.datetime(2014, 9, 10, 17, 45, 45), 3)\n" - -#define _DOC_SET_RTC \ - MODULE_NAME ".set_rtc(device[, time])\n" \ - "\n" \ - "Sets the Real-Time Clock of the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\time (:class:`datetime.datetime`): Optional. Sets to current time, if omitted.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone.\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> ics.set_rtc(device)\n" - -#define _DOC_COREMINI_LOAD \ - MODULE_NAME ".coremini_load(device, coremini, location)\n" \ - "\n" \ - "Loads the CoreMini into the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\tcoremini (str/tuple): Use string to load from file, Use Tuple if file data.\n\n" \ - "\tlocation (int): Accepts :class:`" MODULE_NAME ".SCRIPT_LOCATION_FLASH_MEM`, :class:`" MODULE_NAME ".SCRIPT_LOCATION_SDCARD`, or :class:`" MODULE_NAME ".SCRIPT_LOCATION_VCAN3_MEM`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone.\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> ics.coremini_load(device, 'cmvspy.vs3cmb', ics.SCRIPT_LOCATION_SDCARD)\n" - -#define _DOC_COREMINI_START \ - MODULE_NAME ".coremini_start(device, location)\n" \ - "\n" \ - "Starts the CoreMini into the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\tlocation (int): Accepts :class:`" MODULE_NAME ".SCRIPT_LOCATION_FLASH_MEM`, :class:`" MODULE_NAME ".SCRIPT_LOCATION_SDCARD`, or :class:`" MODULE_NAME ".SCRIPT_LOCATION_VCAN3_MEM`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone.\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> ics.coremini_start(device, ics.SCRIPT_LOCATION_SDCARD)\n" - -#define _DOC_COREMINI_STOP \ - MODULE_NAME ".coremini_stop(device)\n" \ - "\n" \ - "Stops the CoreMini into the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone.\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> ics.coremini_stop(device)\n" - -#define _DOC_COREMINI_CLEAR \ - MODULE_NAME ".coremini_clear(device, location)\n" \ - "\n" \ - "Clears the CoreMini into the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\tlocation (int): Accepts :class:`" MODULE_NAME ".SCRIPT_LOCATION_FLASH_MEM`, :class:`" MODULE_NAME ".SCRIPT_LOCATION_SDCARD`, or :class:`" MODULE_NAME ".SCRIPT_LOCATION_VCAN3_MEM`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone.\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> ics.coremini_clear(device, ics.SCRIPT_LOCATION_SDCARD)\n" - -#define _DOC_COREMINI_GET_STATUS \ - MODULE_NAME ".coremini_get_status(device)\n" \ - "\n" \ - "Gets the status of the CoreMini in the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tTrue if running, otherwise False.\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> ics.coremini_get_status(device)\n" \ - "\t>>>\n" - -#define _DOC_TRANSMIT_MESSAGES \ - MODULE_NAME ".transmit_messages(device, messages)\n" \ - "\n" \ - "Transmits message(s) on the device. `messages` can be a tuple of :class:`" MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME "`\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\tmessages (:class:`" MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME "`): :class:`" MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone.\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> msg = ics.SpyMessage()\n" \ - "\t>>> msg.ArbIDOrHeader = 0xFF\n" \ - "\t>>> msg.NetworkID = ics.NETID_HSCAN\n" \ - "\t>>> msg.Data = (0,1,2,3,4,5,6,7)\n" \ - "\t>>> ics.transmit_messages(device, msg)\n" \ - "\t>>>\n" - -#define _DOC_GET_MESSAGES \ - MODULE_NAME ".get_messages(device[, j1850, timeout])\n" \ - "\n" \ - "Gets the message(s) on the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\tj1850 (:class:`bool`): Return :class:`" MODULE_NAME "." SPY_MESSAGE_J1850_OBJECT_NAME "` instead.\n\n" \ - "\timeout (:class:`float`): Optional timeout to wait for messages in seconds (0.1 = 100ms).\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\t:class:`tuple` of two items. First item is a :class:`tuple` of :class:`" MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME "` and second is the error count.\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> messages, errors = ics.get_messages(device)\n" \ - "\t>>> len(messages)\n" \ - "\t14\n" \ - "\t>>> hex(messages[0].ArbIDOrHeader)\n" \ - "\t'0x160'\n" \ - "\t>>> messages[0].Data\n" \ - "\t(36, 11, 11, 177, 37, 3, 11, 199)\n" \ - "\t>>> errors\n" \ - "\t0\n" - -//"Accepts a " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME ", exception on error. Returns a list of (error #, string)" -#define _DOC_GET_ERROR_MESSAGES \ - MODULE_NAME ".get_error_messages(device[, j1850, timeout])\n" \ - "\n" \ - "Gets the error message(s) on the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\t:class:`list` of :class:`tuple`s. :class:`tuple` contents: (error_number, description_short, description_long, severity, restart_needed)\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> errors = ics.get_error_messages(device)\n" - +#define _EZ_ICS_STRUCT_METHOD(name, icsname, icsname_no_icsneo, meth, flags, doc) \ + { name, (PyCFunction)meth, flags, doc }, \ + { icsname, \ + (PyCFunction)meth, \ + flags, \ + "\n.. note:: Compatibility Function: Identical to PEP8 compliant :func:`" MODULE_NAME "." name \ + "` method.\n\n" }, \ + { \ + icsname_no_icsneo, (PyCFunction)meth, flags, \ + "\n.. note:: Compatibility Function: Identical to PEP8 compliant :func:`" MODULE_NAME "." name \ + "` method.\n\n" \ + } + +#define _DOC_FIND_DEVICES \ + MODULE_NAME ".find_devices(device_type=" MODULE_NAME ".NEODEVICE_ALL)\n" \ + "\n" \ + "Finds all connected devices and returns a tuple of :class:` PyNeoDeviceEx" \ + "` for use in :func:`" MODULE_NAME ".open_device`\n" \ + "\n" \ + "Args:\n" \ + "\tdevice_type (int): Accepts " MODULE_NAME ".NEODEVICE_* Macros\n\n" \ + "\t*New in 3.0 (803):*\n\n" \ + "\tdevice_types (List/Tuple): Accepts a Container of " MODULE_NAME ".NEODEVICE_* Macros\n\n" \ + "\tnetwork_id (int): OptionsFindNeoEx.CANOptions.iNetworkID. Usually ics.NETID_CAN, if needed\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tTuple of :class:` PyNeoDeviceEx" \ + "` for use in :func:`" MODULE_NAME ".open_device`\n" \ + "\n" \ + "\t>>> for device in ics.find_devices():\n" \ + "\t... print(device.Name, device.SerialNumber)\n" \ + "\t...\n" \ + "\tneoVI FIRE 59886\n" \ + "\n*New in 3.0 (803):*\n" \ + "\t>>> for device in ics.find_devices([ics.NEODEVICE_FIRE, ics.NEODEVICE_VCAN3]):\n" \ + "\t... print(device.Name, device.SerialNumber)\n" \ + "\t...\n" \ + "\tneoVI FIRE 59886\n" + +#define _DOC_OPEN_DEVICES \ + MODULE_NAME \ + ".open_device(device)\n" \ + "\n" \ + "Opens the device. `device` can be omitted to return a :class:` PyNeoDeviceEx" \ + "` of the\n" \ + "first free availible device, a :class:` PyNeoDeviceEx" \ + "`, or a serial number of the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:` PyNeoDeviceEx" \ + "`\n\n" \ + "\tdevice (int): Serial Number of the device\n\n" \ + "\tnetwork_ids (List/Tuple): This is an array of number IDs which specify the NetworkID parameter of each " \ + "network. This allows you to assign a custom network ID to each network. Normally, you will assign consecutive " \ + "IDs to each of the networks. See NetworkIDList for a list of current network ID's. You may also set this " \ + "parameter to NULL (zero) and the default network ID's will be used.\n\n" \ + "\tconfig_read (int): Specifies whether the DLL should read the neoVI's device configuration before enabling the " \ + "device. It is recommended that this value be set to 1.\n\n" \ + "\toptions (int): DEVICE_OPTION_* defines\n\n" \ + "\tnetwork_id (int): OptionsFindNeoEx.CANOptions.iNetworkID. Usually ics.NETID_CAN, if needed\n\n" \ + "\tuse_server (int): Defaults to False, Setting to True allows opening the same device more than once.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tIf :class:` PyNeoDeviceEx" \ + "` is passed as a parameter, None. \n" \ + "\tIf serial number is passed as a parameter, a :class:` PyNeoDeviceEx" \ + "` will be returned. \n" \ + "\tIf `device` parameter is omitted, a :class:` PyNeoDeviceEx" \ + "` will be returned with the first availible free device. \n" \ + "\n" \ + "\t>>> for device in ics.find_devices():\n" \ + "\t... ics.open_device(device)\n" \ + "\t...\n" \ + "\n" \ + ".. note::\n\t:class:` PyNeoDeviceEx" \ + "` will automatically close the device when it goes out of scope.\n\n" + +#define _DOC_CLOSE_DEVICES \ + MODULE_NAME ".close_device(device)\n" \ + "\n" \ + "Closes the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tError Count (int)\n" \ + "\n" \ + "\t>>> for device in ics.find_devices():\n" \ + "\t... ics.open_device(device)\n" \ + "\t... # Do something with the device...\n" \ + "\t... ics.close_device(device)\n" \ + "\t...\n" \ + "\n" \ + ".. note::\n\t:class:` PyNeoDeviceEx" \ + "` will automatically close the device when it goes out of scope.\n\n" + +#define _DOC_GET_RTC \ + MODULE_NAME ".get_rtc(device)\n" \ + "\n" \ + "Gets the Real-Time Clock of the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tTuple: (datetime.datetime object, offset in seconds)\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> ics.get_rtc(device)\n" \ + "\t(datetime.datetime(2014, 9, 10, 17, 45, 45), 3)\n" + +#define _DOC_SET_RTC \ + MODULE_NAME ".set_rtc(device[, time])\n" \ + "\n" \ + "Sets the Real-Time Clock of the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\ttime (:class:`datetime.datetime`): Optional. Sets to current time, if omitted.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> ics.set_rtc(device)\n" + +#define _DOC_COREMINI_LOAD \ + MODULE_NAME ".coremini_load(device, coremini, location)\n" \ + "\n" \ + "Loads the CoreMini into the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tcoremini (str/tuple): Use string to load from file, Use Tuple if file data.\n\n" \ + "\tlocation (int): Accepts :class:`" MODULE_NAME ".SCRIPT_LOCATION_FLASH_MEM`, :class:`" MODULE_NAME \ + ".SCRIPT_LOCATION_SDCARD`, or :class:`" MODULE_NAME ".SCRIPT_LOCATION_VCAN3_MEM`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> ics.coremini_load(device, 'cmvspy.vs3cmb', ics.SCRIPT_LOCATION_SDCARD)\n" + +#define _DOC_COREMINI_START \ + MODULE_NAME ".coremini_start(device, location)\n" \ + "\n" \ + "Starts the CoreMini into the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tlocation (int): Accepts :class:`" MODULE_NAME ".SCRIPT_LOCATION_FLASH_MEM`, :class:`" MODULE_NAME \ + ".SCRIPT_LOCATION_SDCARD`, or :class:`" MODULE_NAME ".SCRIPT_LOCATION_VCAN3_MEM`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> ics.coremini_start(device, ics.SCRIPT_LOCATION_SDCARD)\n" + +#define _DOC_COREMINI_STOP \ + MODULE_NAME ".coremini_stop(device)\n" \ + "\n" \ + "Stops the CoreMini into the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> ics.coremini_stop(device)\n" + +#define _DOC_COREMINI_CLEAR \ + MODULE_NAME ".coremini_clear(device, location)\n" \ + "\n" \ + "Clears the CoreMini into the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tlocation (int): Accepts :class:`" MODULE_NAME ".SCRIPT_LOCATION_FLASH_MEM`, :class:`" MODULE_NAME \ + ".SCRIPT_LOCATION_SDCARD`, or :class:`" MODULE_NAME ".SCRIPT_LOCATION_VCAN3_MEM`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> ics.coremini_clear(device, ics.SCRIPT_LOCATION_SDCARD)\n" + +#define _DOC_COREMINI_GET_STATUS \ + MODULE_NAME ".coremini_get_status(device)\n" \ + "\n" \ + "Gets the status of the CoreMini in the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tTrue if running, otherwise False.\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> ics.coremini_get_status(device)\n" \ + "\t>>>\n" + +#define _DOC_TRANSMIT_MESSAGES \ + MODULE_NAME ".transmit_messages(device, messages)\n" \ + "\n" \ + "Transmits message(s) on the device. `messages` can be a tuple of :class:`" MODULE_NAME \ + "." SPY_MESSAGE_OBJECT_NAME "`\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tmessages (:class:`" MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME "`): :class:`" MODULE_NAME \ + "." SPY_MESSAGE_OBJECT_NAME "`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> msg = ics.SpyMessage()\n" \ + "\t>>> msg.ArbIDOrHeader = 0xFF\n" \ + "\t>>> msg.NetworkID = ics.NETID_HSCAN\n" \ + "\t>>> msg.Data = (0,1,2,3,4,5,6,7)\n" \ + "\t>>> ics.transmit_messages(device, msg)\n" \ + "\t>>>\n" + +#define _DOC_GET_MESSAGES \ + MODULE_NAME ".get_messages(device[, j1850, timeout])\n" \ + "\n" \ + "Gets the message(s) on the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tj1850 (:class:`bool`): Return :class:`" MODULE_NAME "." SPY_MESSAGE_J1850_OBJECT_NAME \ + "` instead.\n\n" \ + "\ttimeout (:class:`float`): Optional timeout to wait for messages in seconds (0.1 = 100ms).\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\t:class:`tuple` of two items. First item is a :class:`tuple` of :class:`" MODULE_NAME \ + "." SPY_MESSAGE_OBJECT_NAME "` and second is the error count.\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> messages, errors = ics.get_messages(device)\n" \ + "\t>>> len(messages)\n" \ + "\t14\n" \ + "\t>>> hex(messages[0].ArbIDOrHeader)\n" \ + "\t'0x160'\n" \ + "\t>>> messages[0].Data\n" \ + "\t(36, 11, 11, 177, 37, 3, 11, 199)\n" \ + "\t>>> errors\n" \ + "\t0\n" + +//"Accepts a PyNeoDeviceEx" ", exception on error. Returns a list of (error #, string)" +#define _DOC_GET_ERROR_MESSAGES \ + MODULE_NAME ".get_error_messages(device[, j1850, timeout])\n" \ + "\n" \ + "Gets the error message(s) on the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\t:class:`list` of :class:`tuple`s. :class:`tuple` contents: (error_number, description_short, " \ + "description_long, severity, restart_needed)\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> errors = ics.get_error_messages(device)\n" //_DOC_SET_REFLASH_DISPLAY_CALLBACKS), "icsneoSetReflashCallback(), pass a python function func(msg, progress)" -#define _DOC_SET_REFLASH_CALLBACK \ - MODULE_NAME ".set_reflash_callback(callback)\n" \ - "\n" \ - "Sets the reflash display callback.\n" \ - "\n" \ - "Args:\n" \ - "\tcallback (:class:`function`): Must be a callable Python function (`def callback(msg, progress)`)\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone.\n" \ - "\n" \ - "\t>>> def callback(msg, progress):\n" \ - "\t... print(msg, progress)\n" \ - "\t...\n" \ - "\t>>> ics.set_reflash_callback(callback)\n" \ - "\t>>> \n" - -#define _DOC_GET_DEVICE_SETTINGS \ - MODULE_NAME ".get_device_settings(device, device_type, vnet_slot)\n" \ - "\n" \ - "Gets the settings in the device. vnet_slot defaults to " MODULE_NAME ".PlasmaIonVnetChannelMain\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\tdevice_type (EDeviceSettingsType): Optional: Overrides default device setings type. Defaults to '-1'\n\n" \ - "\tvnet_slot (PlasmaIonVnetChannelMain): Optional: Defaults to PlasmaIonVnetChannelMain, Used only for PLASMA/ION Devices.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\t:class:`" MODULE_NAME ".""device_settings""`\n" \ - "\n" \ - "\t>>> d = ics.open_device()\n" \ - "\t>>> d.Name\n" \ - "\t'neoVI ION'\n" \ - "\t>>> d.SerialNumber\n" \ - "\t404444\n" \ - "\t>>> s = ics.get_device_settings(d)\n" \ - "\t>>> s.DeviceSettingType\n" \ - "\t2\n" \ - "\t>>> s.cyan\n" \ - "\t\n" \ - "\t>>> s.cyan.canfd1.FDMode\n" \ - "\t4\n" \ - "\t>>> s2.cyan\n" \ - "\t\n" \ - "\t>>> s2 = ics.get_device_settings(d, -1, ics.PlasmaIonVnetChannelA)\n" \ - "\t>>> s2.DeviceSettingType\n" \ - "\t2\n" \ - "\t>>> s2.cyan.canfd1.FDMode\n" \ - "\t4\n" - - -#define _DOC_SET_DEVICE_SETTINGS \ - MODULE_NAME ".set_device_settings(device, settings, save_to_eeprom, vnet_slot)\n" \ - "\n" \ - "Sets the settings in the device. vnet_slot defaults to " MODULE_NAME ".PlasmaIonVnetChannelMain\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\tsettings (:class:`" MODULE_NAME ".""device_settings""`): :class:`" MODULE_NAME ".""device_settings""`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone.\n" \ - "\n" \ - "\t>>> d = ics.open_device()\n" \ - "\t>>> d.Name\n" \ - "\t'neoVI ION'\n" \ - "\t>>> d.SerialNumber\n" \ - "\t404444\n" \ - "\t>>> s = ics.get_device_settings(d, ics.PlasmaIonVnetChannelA) # Get Slave settings, channel selection not needed if not a Plasma/Ion\n" \ - "\t>>> s.DeviceSettingType\n" \ - "\t2\n" \ - "\t>>> s.cyan.can_switch_mode\n" \ - "\t1\n" \ - "\t>>> s.cyan.can_switch_mode = 2\n" \ - "\t>>> ics.set_device_settings(d, s, True, ics.PlasmaIonVnetChannelA)\n" \ +#define _DOC_SET_REFLASH_CALLBACK \ + MODULE_NAME \ + ".set_reflash_callback(callback)\n" \ + "\n" \ + "Sets the reflash display callback.\n" \ + "\n" \ + "Args:\n" \ + "\tcallback (:class:`function`): Must be a callable Python function (`def callback(msg, progress)`)\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> def callback(msg, progress):\n" \ + "\t... print(msg, progress)\n" \ + "\t...\n" \ + "\t>>> ics.set_reflash_callback(callback)\n" \ "\t>>> \n" -//"Accepts a " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME ", exception on error." -#define _DOC_LOAD_DEFAULT_SETTINGS \ - MODULE_NAME ".load_default_settings(device)\n" \ - "\n" \ - "Load the default settings in the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone.\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> ics.load_default_settings(device)\n" \ - "\t>>> \n" +#define _DOC_GET_DEVICE_SETTINGS \ + MODULE_NAME \ + ".get_device_settings(device, device_type, vnet_slot)\n" \ + "\n" \ + "Gets the settings in the device. vnet_slot defaults to " MODULE_NAME ".PlasmaIonVnetChannelMain\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:` PyNeoDeviceEx" \ + "`\n\n" \ + "\tdevice_type (EDeviceSettingsType): Optional: Overrides default device setings type. Defaults to '-1'\n\n" \ + "\tvnet_slot (PlasmaIonVnetChannelMain): Optional: Defaults to PlasmaIonVnetChannelMain, Used only for " \ + "PLASMA/ION Devices.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\t:class:`" MODULE_NAME "." \ + "device_settings" \ + "`\n" \ + "\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> d.Name\n" \ + "\t'neoVI ION'\n" \ + "\t>>> d.SerialNumber\n" \ + "\t404444\n" \ + "\t>>> s = ics.get_device_settings(d)\n" \ + "\t>>> s.DeviceSettingType\n" \ + "\t2\n" \ + "\t>>> s.cyan\n" \ + "\t\n" \ + "\t>>> s.cyan.canfd1.FDMode\n" \ + "\t4\n" \ + "\t>>> s2.cyan\n" \ + "\t\n" \ + "\t>>> s2 = ics.get_device_settings(d, -1, ics.PlasmaIonVnetChannelA)\n" \ + "\t>>> s2.DeviceSettingType\n" \ + "\t2\n" \ + "\t>>> s2.cyan.canfd1.FDMode\n" \ + "\t4\n" -#define _DOC_CREATE_NEOVI_RADIO_MESSAGE \ - MODULE_NAME ".create_neovi_radio_message(Relay1, Relay2, Relay3, Relay4, Relay5, LED6, LED5, MSB_report_rate, LSB_report_rate, analog_change_report_rate, relay_timeout)\n\n" \ - "Python API only. Generates data bytes for use with neoVI RADI/O CAN Messages\n\n" \ - "Kwargs:\n" \ - "\tRelay1 (boolean): Enable/Disable Relay1\n\n" \ - "\tRelay2 (boolean): Enable/Disable Relay2\n\n" \ - "\tRelay3 (boolean): Enable/Disable Relay3\n\n" \ - "\tRelay4 (boolean): Enable/Disable Relay4\n\n" \ - "\tRelay5 (boolean): Enable/Disable Relay5\n\n" \ - "\tLED5 (boolean): Enable/Disable LED5\n\n" \ - "\tLED6 (boolean): Enable/Disable LED6\n\n" \ - "\tMSB_report_rate (int): MSB Report Rate in ms (0-255)\n\n" \ - "\tLSB_report_rate (int): LSB Report Rate in ms (0-255)\n\n" \ - "\tanalog_change_report_rate (int): Analog change report rate\n\n" \ - "\trelay_timeout (int): Relay Timeout (0-255)*255ms\n\n" \ - "\n" \ - "Returns:\n" \ - "\n" \ - "\tTuple of data bytes for use with :class:`" MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME "`\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "\t>>> msg = ics.SpyMessage()\n" \ - "\t>>> msg.Data = ics.create_neovi_radio_message(Relay1=True, Relay4=False, LED6=True, MSB_report_rate=10)\n" \ - "\t>>> msg.Data\n" \ +#define _DOC_SET_DEVICE_SETTINGS \ + MODULE_NAME ".set_device_settings(device, settings, save_to_eeprom, vnet_slot)\n" \ + "\n" \ + "Sets the settings in the device. vnet_slot defaults to " MODULE_NAME ".PlasmaIonVnetChannelMain\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tsettings (:class:`" MODULE_NAME "." \ + "device_settings" \ + "`): :class:`" MODULE_NAME "." \ + "device_settings" \ + "`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> d.Name\n" \ + "\t'neoVI ION'\n" \ + "\t>>> d.SerialNumber\n" \ + "\t404444\n" \ + "\t>>> s = ics.get_device_settings(d, ics.PlasmaIonVnetChannelA) # Get Slave settings, channel " \ + "selection not needed if not a Plasma/Ion\n" \ + "\t>>> s.DeviceSettingType\n" \ + "\t2\n" \ + "\t>>> s.cyan.can_switch_mode\n" \ + "\t1\n" \ + "\t>>> s.cyan.can_switch_mode = 2\n" \ + "\t>>> ics.set_device_settings(d, s, True, ics.PlasmaIonVnetChannelA)\n" \ + "\t>>> \n" + +//"Accepts a PyNeoDeviceEx" ", exception on error." +#define _DOC_LOAD_DEFAULT_SETTINGS \ + MODULE_NAME ".load_default_settings(device)\n" \ + "\n" \ + "Load the default settings in the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> ics.load_default_settings(device)\n" \ + "\t>>> \n" + +#define _DOC_CREATE_NEOVI_RADIO_MESSAGE \ + MODULE_NAME \ + ".create_neovi_radio_message(Relay1, Relay2, Relay3, Relay4, Relay5, LED6, LED5, MSB_report_rate, " \ + "LSB_report_rate, analog_change_report_rate, relay_timeout)\n\n" \ + "Python API only. Generates data bytes for use with neoVI RADI/O CAN Messages\n\n" \ + "Kwargs:\n" \ + "\tRelay1 (boolean): Enable/Disable Relay1\n\n" \ + "\tRelay2 (boolean): Enable/Disable Relay2\n\n" \ + "\tRelay3 (boolean): Enable/Disable Relay3\n\n" \ + "\tRelay4 (boolean): Enable/Disable Relay4\n\n" \ + "\tRelay5 (boolean): Enable/Disable Relay5\n\n" \ + "\tLED5 (boolean): Enable/Disable LED5\n\n" \ + "\tLED6 (boolean): Enable/Disable LED6\n\n" \ + "\tMSB_report_rate (int): MSB Report Rate in ms (0-255)\n\n" \ + "\tLSB_report_rate (int): LSB Report Rate in ms (0-255)\n\n" \ + "\tanalog_change_report_rate (int): Analog change report rate\n\n" \ + "\trelay_timeout (int): Relay Timeout (0-255)*255ms\n\n" \ + "\n" \ + "Returns:\n" \ + "\n" \ + "\tTuple of data bytes for use with :class:`" MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME "`\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "\t>>> msg = ics.SpyMessage()\n" \ + "\t>>> msg.Data = ics.create_neovi_radio_message(Relay1=True, Relay4=False, LED6=True, MSB_report_rate=10)\n" \ + "\t>>> msg.Data\n" \ "\t(65, 10, 0, 0, 0)\n" -#define _DOC_COREMINI_START_FBLOCK \ - MODULE_NAME ".coremini_start_fblock(device, index)\n" \ - "\n" \ - "Starts a Coremini Function Block at `index` on `device`.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\tindex (int): Index of the function block.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone on Success.\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> ics.coremini_start_fblock(device, 1)\n" - -#define _DOC_COREMINI_STOP_FBLOCK \ - MODULE_NAME ".coremini_stop_fblock(device, index)\n" \ - "\n" \ - "Stops a Coremini Function Block at `index` on `device`.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\tindex (int): Index of the function block.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone on Success.\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> ics.coremini_stop_fblock(device, 1)\n" - -#define _DOC_COREMINI_GET_FBLOCK_STATUS \ - MODULE_NAME ".coremini_get_fblock_status(device, index)\n" \ - "\n" \ - "Gets the status of a Coremini Function Block at `index` on `device`.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\tindex (int): Index of the function block.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone on Success.\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> ics.coremini_get_fblock_status(device, 1)\n" \ - "\tTrue\n" - -#define _DOC_COREMINI_READ_APP_SIGNAL \ - MODULE_NAME ".coremini_read_app_signal(device, index)\n" \ - "\n" \ - "Gets the value of a Coremini application signal at `index` on `device`.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\tindex (int): Index of the application signal.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tfloat on Success.\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> ics.coremini_read_app_signal(device, 1)\n" \ - "\t52\n" - -#define _DOC_COREMINI_WRITE_APP_SIGNAL \ - MODULE_NAME ".coremini_write_app_signal(device, index, value)\n" \ - "\n" \ - "Sets the value of a Coremini application signal at `index` on `device`.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\tindex (int): Index of the application signal.\n\n" \ - "\tvalue (float): New value of the application signal.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone on Success.\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> ics.coremini_write_app_signal(device, 1, 52)\n" \ - "\t>>>\n" - -#define _DOC_COREMINI_READ_TX_MESSAGE \ - MODULE_NAME ".coremini_read_tx_message(device, index, j1850=False)\n" \ - "\n" \ - "Gets the value of a Coremini Message at `index` on `device`.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\tindex (int): Index of the application signal.\n\n" \ - "\tj1850 (bool): Use :class:`" MODULE_NAME "." SPY_MESSAGE_J1850_OBJECT_NAME "` instead.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\t:class:`" MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME "` Success.\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> msg = ics.coremini_read_tx_message(device, 0)\n" - -#define _DOC_COREMINI_READ_RX_MESSAGE \ - MODULE_NAME ".coremini_read_rx_message(device, index, j1850=False)\n" \ - "\n" \ - "Gets the value of a Coremini Message at `index` on `device`.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\tindex (int): Index of the application signal.\n\n" \ - "\tj1850 (bool): Use :class:`" MODULE_NAME "." SPY_MESSAGE_J1850_OBJECT_NAME "` instead.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\t:class:`" MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME "` Success.\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> msg = ics.coremini_read_tx_message(device, 0)\n" - -#define _DOC_COREMINI_WRITE_TX_MESSAGE \ - MODULE_NAME ".coremini_write_tx_message(device, index, msg)\n" \ - "TODO" - -#define _DOC_COREMINI_WRITE_RX_MESSAGE \ - MODULE_NAME ".coremini_write_rx_message(device, index, TODO)\n" \ - "TODO" - -#define _DOC_GET_PERFORMANCE_PARAMETERS \ - MODULE_NAME ".get_performance_parameters(device)\n" \ - "\n" \ - "Gets the Performance Parameters on `device`.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tTuple on Success: (buffer count, buffer max, overflow count, reserved, reserved, reserved, reserved, reserved)\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> ics.get_performance_parameters(device)\n" \ - "\t(0, 24576, 0, 0, 0, 0, 0, 0)\n" - -#define _DOC_VALIDATE_HOBJECT \ - MODULE_NAME ".validate_hobject(device)\n" \ - "\n" \ - "Validates the handle is valid for a `device`. Handles are only valid when the device is open.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\tor:\n\n" \ - "\tdevice (int): c style integer handle to the device.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tBoolean: True if valid, false otherwise.\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> ics.validate_hobject(device)\n" \ - "\t1\n" \ - "\t>>> ics.validate_hobject(device._Handle)\n" \ - "\t1\n" - -#define _DOC_GET_LAST_API_ERROR \ - MODULE_NAME ".get_last_api_error(device)\n" \ - "\n" \ - "Gets the error message from the last API call.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tTuple: (error, description short, description long, severity, restart needed)\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> try:\n" \ - "\t... msg = ics.coremini_read_tx_message(device, 0)\n" \ - "\t... except ics.RuntimeError as ex:\n" \ - "\t... print(ex)\n" \ - "\t... print(ics.get_last_api_error(device))\n" \ - "\t...\n" \ - "\tError: coremini_read_tx_message(): icsneoScriptReadTxMessage() Failed\n" \ - "\t(224, 'Invalid Message Index for script.', 'Invalid Message Index for script.', 16, 0)\n" - -#define _DOC_GET_DLL_VERSION \ - MODULE_NAME ".get_dll_version(device)\n" \ - "\n" \ - "Gets the DLL version.\n" \ - "\n" \ - "Args:\n" \ - "\tNone\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tInt: DLL Version\n" \ - "\n" \ - "\t>>> ics.get_dll_version()\n" \ - "\t700\n" - -#define _DOC_BASE36ENC \ - MODULE_NAME ".base36enc(serial)\n" \ - "\n" \ - "Converts a decimal serial number to base36.\n" \ - "\n" \ - "Args:\n" \ - "\tserial (int): serial number.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tStr: Serial Number\n" \ - "\n" \ - "\t>>> ics.base36enc(device.SerialNumber)\n" \ - "\tCY0024\n" - -#define _DOC_GET_SERIAL_NUMBER \ - MODULE_NAME ".get_serial_number(device)\n" \ - "\n" \ - "Gets the serial number out of the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tInt: Serial Number Version\n" \ - "\n" \ - "\t>>> ics.get_serial_number(device)\n" \ - "\t53123\n" - -#define _DOC_REQUEST_ENTER_SLEEP_MODE \ - MODULE_NAME ".request_enter_sleep_mode(device, timeout_ms, mode, reserved_zero)\n" \ - "\n" \ - "Signal neoVI to immediete go to sleep. Currently only supported by FIREVNET/PLASMA.\n" \ - "If using over USB this will likely return true but never cause PLASMA to sleep\n" \ - "since USB insertion keeps it alive.\n" \ - "This API allows Android/Linux applications to invoke power management.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "\ttimeout_ms (int): 16bit word for how long to wait on idle bus before going to sleep. " \ - "If caller does not want to change it pass in 65535 (0xFFFF) and it " \ - "will stay whatever it was set to in explorer/coremini.\n\n" \ - "\n" \ - "\tmode (int): 16bit word for power mode to enter. " \ - "If caller does not want to change it pass in 65535 (0xFFFF) and it " \ - "will stay whatever it was set to in explorer/coremini. " \ - "If it is zero then neoVI will do 'normal sleep'. " \ - "0 - power mode off but calling this function will do 'normal sleep'. " \ - "1 - normal sleep. " \ - "2 - instant sleep. " \ - "3 - comatose sleep.\n\n" \ - "\n" \ - "\treserved_zero (int): Reserved, Keep as zero.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tBoolean: True on success, False on failure.\n" \ - "\n" \ - "\t>>> ics.request_enter_sleep_mode(device, 1, 0)\n" \ - "\tTrue\n" - - -#define _DOC_SET_CONTEXT \ - MODULE_NAME ".set_context(device)\n" \ - "\n" \ - "Sets the \"context\" of how icsneoFindNeoDevices(Ex) and icsneoOpenNeoDevice(Ex)\n" \ - "function. If the context is 0 (null) than icsneoFindNeoDevices(Ex) will be system\n" \ - "wide, searching USB and other supported computer interfaces. icsneoFindNeoDevices can\n" \ - "then be used to connect to devices found in this manner. If the context is a handle\n" \ - "to connected CAN tool than icsneoFindNeoDevices(Ex) will search a specific CAN bus\n" \ - "for supported IntrepidCS CAN Nodes. Again icsneoOpenNeoDevice(Ex) would be used\n" \ - "create logical connections to found CAN Nodes.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tBoolean: True on success, False on failure.\n" \ - "\n" \ - "\t>>> ics.set_context(device)\n" \ - "\tTrue\n" - -#define _DOC_FORCE_FIRMWARE_UPDATE \ - MODULE_NAME ".force_firmware_update(device)\n" \ - "\n" \ - "Forces the device to flash firmware.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tBoolean: True on success, False on failure.\n" \ - "\n" \ - "\t>>> ics.force_firmware_update(device)\n" \ - "\tTrue\n" - -#define _DOC_FIRMWARE_UPDATE_REQUIRED \ - MODULE_NAME ".firmware_update_required(device)\n" \ - "\n" \ - "Determines if the device firmware needs flashing.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tBoolean: True on success, False on failure.\n" \ - "\n" \ - "\t>>> ics.force_firmware_update(device)\n" \ - "\tTrue\n" - -#define _DOC_GET_DLL_FIRMWARE_INFO \ - MODULE_NAME ".get_dll_firmware_info(device)\n" \ - "\n" \ - "Returns the DLL firmware info for the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\t(:class:`" MODULE_NAME "." "st_api_firmware_info" "`)\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> info = ics.get_dll_firmware_info(device)\n" \ - "\t>>> info.iAppMajor\n" \ - "\t7\n" \ - "\t>>> info.iAppMinor\n" \ - "\t55\n" \ - "\t>>>\n" - -#define _DOC_GET_HW_FIRMWARE_INFO \ - MODULE_NAME ".get_hw_firmware_info(device)\n" \ - "\n" \ - "Returns the device firmware info for the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\t(:class:`" MODULE_NAME "." "st_api_firmware_info" "`)\n" \ - "\n" \ - "\t>>> device = ics.open_device()\n" \ - "\t>>> info = ics.get_hw_firmware_info(device)\n" \ - "\t>>> info.iAppMajor\n" \ - "\t7\n" \ - "\t>>> info.iAppMinor\n" \ - "\t55\n" \ - "\t>>>\n" - -#define _DOC_GET_BACKUP_POWER_ENABLED \ - MODULE_NAME ".get_backup_power_enabled(device)\n" \ - "\n" \ - "Returns the device backup power enabled for the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tBoolean: True on success, False on failure.\n" \ - "\n" - -#define _DOC_SET_BACKUP_POWER_ENABLED \ - MODULE_NAME ".set_backup_power_enabled(device, enable)\n" \ - "\n" \ - "Sets the device backup power enabled for the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tBoolean: True on success, False on failure.\n" \ - "\n" - -#define _DOC_GET_BACKUP_POWER_READY \ - MODULE_NAME ".get_backup_power_ready(device)\n" \ - "\n" \ - "Returns the device backup power is ready for the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tBoolean: True on success, False on failure.\n" \ - "\n" - -#define _DOC_LOAD_READBIN \ - "Internal Use only\n" +#define _DOC_COREMINI_START_FBLOCK \ + MODULE_NAME ".coremini_start_fblock(device, index)\n" \ + "\n" \ + "Starts a Coremini Function Block at `index` on `device`.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tindex (int): Index of the function block.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone on Success.\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> ics.coremini_start_fblock(device, 1)\n" + +#define _DOC_COREMINI_STOP_FBLOCK \ + MODULE_NAME ".coremini_stop_fblock(device, index)\n" \ + "\n" \ + "Stops a Coremini Function Block at `index` on `device`.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tindex (int): Index of the function block.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone on Success.\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> ics.coremini_stop_fblock(device, 1)\n" + +#define _DOC_COREMINI_GET_FBLOCK_STATUS \ + MODULE_NAME ".coremini_get_fblock_status(device, index)\n" \ + "\n" \ + "Gets the status of a Coremini Function Block at `index` on `device`.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tindex (int): Index of the function block.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone on Success.\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> ics.coremini_get_fblock_status(device, 1)\n" \ + "\tTrue\n" + +#define _DOC_COREMINI_READ_APP_SIGNAL \ + MODULE_NAME ".coremini_read_app_signal(device, index)\n" \ + "\n" \ + "Gets the value of a Coremini application signal at `index` on `device`.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tindex (int): Index of the application signal.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tfloat on Success.\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> ics.coremini_read_app_signal(device, 1)\n" \ + "\t52\n" + +#define _DOC_COREMINI_WRITE_APP_SIGNAL \ + MODULE_NAME ".coremini_write_app_signal(device, index, value)\n" \ + "\n" \ + "Sets the value of a Coremini application signal at `index` on `device`.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tindex (int): Index of the application signal.\n\n" \ + "\tvalue (float): New value of the application signal.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone on Success.\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> ics.coremini_write_app_signal(device, 1, 52)\n" \ + "\t>>>\n" + +#define _DOC_COREMINI_READ_TX_MESSAGE \ + MODULE_NAME ".coremini_read_tx_message(device, index, j1850=False)\n" \ + "\n" \ + "Gets the value of a Coremini Message at `index` on `device`.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tindex (int): Index of the application signal.\n\n" \ + "\tj1850 (bool): Use :class:`" MODULE_NAME "." SPY_MESSAGE_J1850_OBJECT_NAME "` instead.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\t:class:`" MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME "` Success.\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> msg = ics.coremini_read_tx_message(device, 0)\n" + +#define _DOC_COREMINI_READ_RX_MESSAGE \ + MODULE_NAME ".coremini_read_rx_message(device, index, j1850=False)\n" \ + "\n" \ + "Gets the value of a Coremini Message at `index` on `device`.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tindex (int): Index of the application signal.\n\n" \ + "\tj1850 (bool): Use :class:`" MODULE_NAME "." SPY_MESSAGE_J1850_OBJECT_NAME "` instead.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\t:class:`" MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME "` Success.\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> msg = ics.coremini_read_tx_message(device, 0)\n" + +#define _DOC_COREMINI_WRITE_TX_MESSAGE \ + MODULE_NAME ".coremini_write_tx_message(device, index, msg)\n" \ + "TODO" + +#define _DOC_COREMINI_WRITE_RX_MESSAGE \ + MODULE_NAME ".coremini_write_rx_message(device, index, TODO)\n" \ + "TODO" + +#define _DOC_GET_PERFORMANCE_PARAMETERS \ + MODULE_NAME ".get_performance_parameters(device)\n" \ + "\n" \ + "Gets the Performance Parameters on `device`.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tTuple on Success: (buffer count, buffer max, overflow count, reserved, reserved, reserved, " \ + "reserved, reserved)\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> ics.get_performance_parameters(device)\n" \ + "\t(0, 24576, 0, 0, 0, 0, 0, 0)\n" + +#define _DOC_VALIDATE_HOBJECT \ + MODULE_NAME ".validate_hobject(device)\n" \ + "\n" \ + "Validates the handle is valid for a `device`. Handles are only valid when the device is open.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tor:\n\n" \ + "\tdevice (int): c style integer handle to the device.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tBoolean: True if valid, false otherwise.\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> ics.validate_hobject(device)\n" \ + "\t1\n" \ + "\t>>> ics.validate_hobject(device._Handle)\n" \ + "\t1\n" + +#define _DOC_GET_LAST_API_ERROR \ + MODULE_NAME ".get_last_api_error(device)\n" \ + "\n" \ + "Gets the error message from the last API call.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tTuple: (error, description short, description long, severity, restart needed)\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> try:\n" \ + "\t... msg = ics.coremini_read_tx_message(device, 0)\n" \ + "\t... except ics.RuntimeError as ex:\n" \ + "\t... print(ex)\n" \ + "\t... print(ics.get_last_api_error(device))\n" \ + "\t...\n" \ + "\tError: coremini_read_tx_message(): icsneoScriptReadTxMessage() Failed\n" \ + "\t(224, 'Invalid Message Index for script.', 'Invalid Message Index for script.', 16, 0)\n" + +#define _DOC_GET_DLL_VERSION \ + MODULE_NAME ".get_dll_version(device)\n" \ + "\n" \ + "Gets the DLL version.\n" \ + "\n" \ + "Args:\n" \ + "\tNone\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tInt: DLL Version\n" \ + "\n" \ + "\t>>> ics.get_dll_version()\n" \ + "\t700\n" + +#define _DOC_BASE36ENC \ + MODULE_NAME ".base36enc(serial)\n" \ + "\n" \ + "Converts a decimal serial number to base36.\n" \ + "\n" \ + "Args:\n" \ + "\tserial (int): serial number.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tStr: Serial Number\n" \ + "\n" \ + "\t>>> ics.base36enc(device.SerialNumber)\n" \ + "\tCY0024\n" + +#define _DOC_GET_SERIAL_NUMBER \ + MODULE_NAME ".get_serial_number(device)\n" \ + "\n" \ + "Gets the serial number out of the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tInt: Serial Number Version\n" \ + "\n" \ + "\t>>> ics.get_serial_number(device)\n" \ + "\t53123\n" + +#define _DOC_REQUEST_ENTER_SLEEP_MODE \ + MODULE_NAME ".request_enter_sleep_mode(device, timeout_ms, mode, reserved_zero)\n" \ + "\n" \ + "Signal neoVI to immediete go to sleep. Currently only supported by FIREVNET/PLASMA.\n" \ + "If using over USB this will likely return true but never cause PLASMA to sleep\n" \ + "since USB insertion keeps it alive.\n" \ + "This API allows Android/Linux applications to invoke power management.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "\ttimeout_ms (int): 16bit word for how long to wait on idle bus before going to sleep. " \ + "If caller does not want to change it pass in 65535 (0xFFFF) and it " \ + "will stay whatever it was set to in explorer/coremini.\n\n" \ + "\n" \ + "\tmode (int): 16bit word for power mode to enter. " \ + "If caller does not want to change it pass in 65535 (0xFFFF) and it " \ + "will stay whatever it was set to in explorer/coremini. " \ + "If it is zero then neoVI will do 'normal sleep'. " \ + "0 - power mode off but calling this function will do 'normal sleep'. " \ + "1 - normal sleep. " \ + "2 - instant sleep. " \ + "3 - comatose sleep.\n\n" \ + "\n" \ + "\treserved_zero (int): Reserved, Keep as zero.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tBoolean: True on success, False on failure.\n" \ + "\n" \ + "\t>>> ics.request_enter_sleep_mode(device, 1, 0)\n" \ + "\tTrue\n" + +#define _DOC_SET_CONTEXT \ + MODULE_NAME ".set_context(device)\n" \ + "\n" \ + "Sets the \"context\" of how icsneoFindNeoDevices(Ex) and icsneoOpenNeoDevice(Ex)\n" \ + "function. If the context is 0 (null) than icsneoFindNeoDevices(Ex) will be system\n" \ + "wide, searching USB and other supported computer interfaces. icsneoFindNeoDevices can\n" \ + "then be used to connect to devices found in this manner. If the context is a handle\n" \ + "to connected CAN tool than icsneoFindNeoDevices(Ex) will search a specific CAN bus\n" \ + "for supported IntrepidCS CAN Nodes. Again icsneoOpenNeoDevice(Ex) would be used\n" \ + "create logical connections to found CAN Nodes.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tBoolean: True on success, False on failure.\n" \ + "\n" \ + "\t>>> ics.set_context(device)\n" \ + "\tTrue\n" + +#define _DOC_FORCE_FIRMWARE_UPDATE \ + MODULE_NAME ".force_firmware_update(device)\n" \ + "\n" \ + "Forces the device to flash firmware.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tBoolean: True on success, False on failure.\n" \ + "\n" \ + "\t>>> ics.force_firmware_update(device)\n" \ + "\tTrue\n" + +#define _DOC_FIRMWARE_UPDATE_REQUIRED \ + MODULE_NAME ".firmware_update_required(device)\n" \ + "\n" \ + "Determines if the device firmware needs flashing.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tBoolean: True on success, False on failure.\n" \ + "\n" \ + "\t>>> ics.force_firmware_update(device)\n" \ + "\tTrue\n" + +#define _DOC_GET_DLL_FIRMWARE_INFO \ + MODULE_NAME ".get_dll_firmware_info(device)\n" \ + "\n" \ + "Returns the DLL firmware info for the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\t(:class:`" MODULE_NAME "." \ + "st_api_firmware_info" \ + "`)\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> info = ics.get_dll_firmware_info(device)\n" \ + "\t>>> info.iAppMajor\n" \ + "\t7\n" \ + "\t>>> info.iAppMinor\n" \ + "\t55\n" \ + "\t>>>\n" + +#define _DOC_GET_HW_FIRMWARE_INFO \ + MODULE_NAME ".get_hw_firmware_info(device)\n" \ + "\n" \ + "Returns the device firmware info for the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\t(:class:`" MODULE_NAME "." \ + "st_api_firmware_info" \ + "`)\n" \ + "\n" \ + "\t>>> device = ics.open_device()\n" \ + "\t>>> info = ics.get_hw_firmware_info(device)\n" \ + "\t>>> info.iAppMajor\n" \ + "\t7\n" \ + "\t>>> info.iAppMinor\n" \ + "\t55\n" \ + "\t>>>\n" + +#define _DOC_GET_BACKUP_POWER_ENABLED \ + MODULE_NAME ".get_backup_power_enabled(device)\n" \ + "\n" \ + "Returns the device backup power enabled for the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tBoolean: True on success, False on failure.\n" \ + "\n" + +#define _DOC_SET_BACKUP_POWER_ENABLED \ + MODULE_NAME ".set_backup_power_enabled(device, enable)\n" \ + "\n" \ + "Sets the device backup power enabled for the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tBoolean: True on success, False on failure.\n" \ + "\n" + +#define _DOC_GET_BACKUP_POWER_READY \ + MODULE_NAME ".get_backup_power_ready(device)\n" \ + "\n" \ + "Returns the device backup power is ready for the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tBoolean: True on success, False on failure.\n" \ + "\n" + +#define _DOC_LOAD_READBIN "Internal Use only\n" // void* hObject, unsigned long ulNetworkID, stCM_ISO157652_TxMessage *pMsg, unsigned long ulBlockingTimeout -#define _DOC_ISO15765_TRANSMIT_MESSAGE \ - MODULE_NAME ".iso15765_transmit_message(device, ulNetworkID, pMsg, ulBlockingTimeout)\n" \ - "\n" \ - "Transmits an ISO15765 Message.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "\tpMsg (:class:`" MODULE_NAME "." "st_cm_iso157652_tx_message" "`): :class:`" MODULE_NAME "." "st_cm_iso157652_tx_message" "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tBoolean: True on success, False on failure.\n" \ - "\n" +#define _DOC_ISO15765_TRANSMIT_MESSAGE \ + MODULE_NAME ".iso15765_transmit_message(device, ulNetworkID, pMsg, ulBlockingTimeout)\n" \ + "\n" \ + "Transmits an ISO15765 Message.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "\tpMsg (:class:`" MODULE_NAME "." \ + "st_cm_iso157652_tx_message" \ + "`): :class:`" MODULE_NAME "." \ + "st_cm_iso157652_tx_message" \ + "`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tBoolean: True on success, False on failure.\n" \ + "\n" // (void* hObject, unsigned int iIndex, const stCM_ISO157652_RxMessage * pRxMessage) -#define _DOC_ISO15765_RECEIVE_MESSAGE \ - MODULE_NAME ".iso15765_receive_message(device, netid, rx_msg)\n" \ - "\n" \ - "Setup rx ISO15765 Message.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "\tprx_msg (:class:`" MODULE_NAME "." "st_cm_iso157652_rx_message" "`): :class:`" MODULE_NAME "." "st_cm_iso157652_rx_message" "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tBoolean: True on success, False on failure.\n" \ - "\n" - -#define _DOC_ISO15765_ENABLE_NETWORKS \ - MODULE_NAME ".iso15765_enable_networks(device, networks)\n" \ - "\n" \ - "Enables ISO15765 networks.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone\n" \ - "\n" - -#define _DOC_ISO15765_DISABLE_NETWORKS \ - MODULE_NAME ".iso15765_disable_networks(device)\n" \ - "\n" \ - "Disables ISO15765 networks.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone\n" \ - "\n" - -#define _DOC_GET_ACTIVE_VNET_CHANNEL \ - MODULE_NAME ".get_active_vnet_channel(device)\n" \ - "\n" \ - "Gets active vnet channel for the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tInt: Returns active vnet channel.\n" \ - "\n" - -#define _DOC_SET_ACTIVE_VNET_CHANNEL \ - MODULE_NAME ".set_active_vnet_channel(device, channel)\n" \ - "\n" \ - "Sets active vnet channel for the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tBoolean: True on success, False on failure.\n" \ - "\n" - -#define _DOC_OVERRIDE_LIBRARY_NAME \ - MODULE_NAME ".override_library_name(new_name)\n" \ - "\n" \ - "Overrides the default search for loading the icsneo40 library\n" \ - "\n" \ - "Args:\n" \ - "\tname: Absolute path or relative path including filename.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone\n" \ - "\n" \ - "\t>>> import ics\n" \ - "\t>>> ics.find_devices()\n" \ - "\tTraceback (most recent call last):\n" \ - "\t File \"\", line 1, in \n" \ - "\tics.RuntimeError: Error: find_devices(): Failed to open library: 'icsneo40.dll' with error code: #126\n" \ - "\t>>> ics.override_library_name(r\"C:\\Windows\\SysWOW64\\icsneo40-different.dll\")\n" \ - "\t>>> ics.find_devices()\n" \ +#define _DOC_ISO15765_RECEIVE_MESSAGE \ + MODULE_NAME ".iso15765_receive_message(device, netid, rx_msg)\n" \ + "\n" \ + "Setup rx ISO15765 Message.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "\tprx_msg (:class:`" MODULE_NAME "." \ + "st_cm_iso157652_rx_message" \ + "`): :class:`" MODULE_NAME "." \ + "st_cm_iso157652_rx_message" \ + "`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tBoolean: True on success, False on failure.\n" \ + "\n" + +#define _DOC_ISO15765_ENABLE_NETWORKS \ + MODULE_NAME ".iso15765_enable_networks(device, networks)\n" \ + "\n" \ + "Enables ISO15765 networks.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone\n" \ + "\n" + +#define _DOC_ISO15765_DISABLE_NETWORKS \ + MODULE_NAME ".iso15765_disable_networks(device)\n" \ + "\n" \ + "Disables ISO15765 networks.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone\n" \ + "\n" + +#define _DOC_GET_ACTIVE_VNET_CHANNEL \ + MODULE_NAME ".get_active_vnet_channel(device)\n" \ + "\n" \ + "Gets active vnet channel for the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tInt: Returns active vnet channel.\n" \ + "\n" + +#define _DOC_SET_ACTIVE_VNET_CHANNEL \ + MODULE_NAME ".set_active_vnet_channel(device, channel)\n" \ + "\n" \ + "Sets active vnet channel for the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tBoolean: True on success, False on failure.\n" \ + "\n" + +#define _DOC_OVERRIDE_LIBRARY_NAME \ + MODULE_NAME \ + ".override_library_name(new_name)\n" \ + "\n" \ + "Overrides the default search for loading the icsneo40 library\n" \ + "\n" \ + "Args:\n" \ + "\tname: Absolute path or relative path including filename.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> ics.find_devices()\n" \ + "\tTraceback (most recent call last):\n" \ + "\t File \"\", line 1, in \n" \ + "\tics.RuntimeError: Error: find_devices(): Failed to open library: 'icsneo40.dll' with error code: #126\n" \ + "\t>>> ics.override_library_name(r\"C:\\Windows\\SysWOW64\\icsneo40-different.dll\")\n" \ + "\t>>> ics.find_devices()\n" \ "\t(, )\n" -#define _DOC_SET_BIT_RATE \ - MODULE_NAME ".set_bit_rate(device, BitRate, NetworkID)\n" \ - "\n" \ - "Specifies bit rate setting. Valid values depend on the network specified.\n" \ - "\n" \ - "For the networks NETID_HSCAN, NETID_MSCAN, NETID_SWCAN, NETID_FIRE_HSCAN2, NETID_HSCAN3, NETID_LSFTCAN,\n" \ - "valid bit rates are 2000, 33333, 50000, 62500, 83333, 100000, 125000, 250000, 500000, 800000, 1000000\n" \ - "\n" \ - "For the networks NETID_LIN, NETID_ISO2, NETID_FIRE_LIN2, NETID_FIRE_LIN3, NETID_FIRE_LIN4,\n" \ - "valid bit rates are\n" \ - "\n" \ - "For the network NETID_FIRE_CGI valid bit rates are 625000 and 115200\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tInt: None.\n" \ - "\n" - -#define _DOC_SET_FD_BIT_RATE \ - MODULE_NAME ".set_fd_bit_rate(device, BitRate, NetworkID)\n" \ - "\n" \ - "Sets the FD bitrate for a given Network ID on the device..\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tInt: None.\n" \ +#define _DOC_SET_BIT_RATE \ + MODULE_NAME \ + ".set_bit_rate(device, BitRate, NetworkID)\n" \ + "\n" \ + "Specifies bit rate setting. Valid values depend on the network specified.\n" \ + "\n" \ + "For the networks NETID_HSCAN, NETID_MSCAN, NETID_SWCAN, NETID_FIRE_HSCAN2, NETID_HSCAN3, NETID_LSFTCAN,\n" \ + "valid bit rates are 2000, 33333, 50000, 62500, 83333, 100000, 125000, 250000, 500000, 800000, 1000000\n" \ + "\n" \ + "For the networks NETID_LIN, NETID_ISO2, NETID_FIRE_LIN2, NETID_FIRE_LIN3, NETID_FIRE_LIN4,\n" \ + "valid bit rates are\n" \ + "\n" \ + "For the network NETID_FIRE_CGI valid bit rates are 625000 and 115200\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:` PyNeoDeviceEx" \ + "`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tInt: None.\n" \ "\n" -#define _DOC_SET_BIT_RATE_EX \ - MODULE_NAME ".set_bit_rate_ex(device, BitRate, NetworkID, iOptions)\n" \ - "\n" \ - "Sets the bitrate for a given Network ID on the device with extended options.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tInt: None.\n" \ +#define _DOC_SET_FD_BIT_RATE \ + MODULE_NAME ".set_fd_bit_rate(device, BitRate, NetworkID)\n" \ + "\n" \ + "Sets the FD bitrate for a given Network ID on the device..\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tInt: None.\n" \ + "\n" + +#define _DOC_SET_BIT_RATE_EX \ + MODULE_NAME ".set_bit_rate_ex(device, BitRate, NetworkID, iOptions)\n" \ + "\n" \ + "Sets the bitrate for a given Network ID on the device with extended options.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tInt: None.\n" \ + "\n" + +#define _DOC_GET_TIMESTAMP_FOR_MSG \ + MODULE_NAME ".get_timestamp_for_msg(device, msg)\n" \ + "\n" \ + "Calculates the timestamp for a message.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "\tmsg (:class:`" MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME "`): :class:`" MODULE_NAME \ + "." SPY_MESSAGE_OBJECT_NAME "`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tFloat: Timestamp for the message.\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> msgs, error_count = ics.get_messages(d)\n" \ + "\t>>> ics.get_timestamp_for_msg(d, msgs[0])\n" \ + "\t354577568.9145524\n" + +#define _DOC_GET_DEVICE_STATUS \ + MODULE_NAME ".get_device_status(device)\n" \ + "\n" \ + "Returns the device status.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\t(:class:`" MODULE_NAME "." \ + "ics_device_status" \ + "`).\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> status = ics.get_device_status(d)\n" \ + "\t>>> status.fire2Status.ethernetActivationLineEnabled\n" \ + "\t0\n" + +#define _DOC_ENABLE_NETWORK_COM \ + MODULE_NAME ".enable_network_com(device, enable, net_id)\n" \ + "\n" \ + "Enable or disable network communication.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "\tenable (:class:`bool`): :class:`bool`\n\n" \ + "\n" \ + "\tnet_id (:class:`int`): :class:`int`: Optional. If left blank, disables/enables all networks.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> status = ics.enable_network_com(d, True)\n" \ + "\t>>> \n" + +#define _DOC_ENABLE_BUS_VOLTAGE_MONITOR \ + MODULE_NAME ".enable_bus_voltage_monitor(device, enable, reserved)\n" \ + "\n" \ + "Enable or disable bus voltage monitoring.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "\tenable (:class:`bool`): :class:`int`\n\n" \ + "\n" \ + "\treserved (:class:`int`): :class:`int`: Optional. Should be set to zero. Don't set, if unsure.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> status = ics.enable_bus_voltage_monitor(d, 1)\n" \ + "\t>>> \n" + +#define _DOC_GET_BUS_VOLTAGE \ + MODULE_NAME ".get_bus_voltage(device, reserved)\n" \ + "\n" \ + "Reads bus voltage. (:class:`" MODULE_NAME ".enable_bus_voltage_monitor`) needs to be called first.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "\treserved (:class:`int`): :class:`int`: Optional. Should be set to zero. Don't set, if unsure.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tInt: value returned is in mV.\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> status = ics.enable_bus_voltage_monitor(d, 1)\n" \ + "\t>>> ics.get_bus_voltage(d)\n" \ + "\t12000\n" \ + "\t>>> \n" + +#define _DOC_READ_JUPITER_FIRMWARE \ + MODULE_NAME ".read_jupiter_firmware(device, size, [vnetChannel])\n" \ + "\n" \ + "Reads firmware binary from a RAD-Jupiter. If not sure, don't use this method\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "\tsize (:class:`int`): :class:`int`: size of the bytes to read of the firmware binary.\n\n" \ + "\n" \ + "\tvnetChannel (:class:`int`): :class:`int`: Optional. Don't set, if unsure.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone\n" \ + "\n" + +#define _DOC_WRITE_JUPITER_FIRMWARE \ + MODULE_NAME ".write_jupiter_firmware(device, bytes, [vnetChannel])\n" \ + "\n" \ + "Writes firmware binary to a RAD-Jupiter. If not sure, don't use this method\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "\tbytes (:class:`bytes`): :class:`bytes`: bytes of the firmware binary.\n\n" \ + "\n" \ + "\tvnetChannel (:class:`int`): :class:`int`: Optional. Don't set, if unsure.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone\n" \ + "\n" + +#define _DOC_GET_DISK_DETAILS \ + MODULE_NAME ".get_disk_details(device)\n" \ + "\n" \ + "Returns the device disk details.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\t(:class:`" MODULE_NAME "." \ + "srad_gigalog_disk_details" \ + "`).\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> details = ics.get_disk_details(d)\n" \ + "\t>>> details.structure.options\n" \ + "\t>>> \n" + +#define _DOC_DISK_FORMAT \ + MODULE_NAME ".disk_format(device)\n" \ + "\n" \ + "Starts disk formatting on the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> details = ics.get_disk_details(d)\n" \ + "\t>>> details. = ics.get_disk_details(d)\n" \ + "\t>>> ics.disk_format(d, details)\n" \ + "\t>>> \n" + +#define _DOC_DISK_FORMAT_CANCEL \ + MODULE_NAME ".disk_format_cancel(device)\n" \ + "\n" \ + "Cancel in progress disk formatting on the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> ics.disk_format(d, details)\n" \ + "\t>>> ics.disk_format_cancel(d)\n" \ + "\t>>> \n" + +#define _DOC_DISK_FORMAT_PROGRESS \ + MODULE_NAME ".get_disk_format_progress(device)\n" \ + "\n" \ + "Returns the device disk formatting progress.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\t(:class:`" MODULE_NAME "." \ + "srad_gigalog_disk_format_progress" \ + "`).\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> d = ics.disk_format(d, details)\n" \ + "\t>>> progress = ics.get_disk_format_progress(d)\n" \ + "\t>>> progress.sectorsRemaining\n" \ + "\t>>> \n" + +#define _DOC_ENABLE_DOIP_LINE \ + MODULE_NAME ".enable_doip_line(device, enable)\n" \ + "\n" \ + "Activate or De-activate DOIP Line.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "\tenable (:class:`bool`): :class:`bool`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> status = ics.enable_doip_line(d, True)\n" \ + "\t>>> \n" + +#define _DOC_IS_DEVICE_FEATURE_SUPPORTED \ + MODULE_NAME ".is_device_feature_supported(device, feature)\n" \ + "\n" \ + "Polls firmware in device to see if the feature is supported. As of 908 only ValueCAN4-2EL, " \ + "ValueCAN4-4 and ValueCAN4-Industrial are supported.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "\tenable (:class:`DeviceFeature`): :class:`DeviceFeature`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> from ics.structures.device_feature import DeviceFeature\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> supported = ics.is_device_feature_supported(d, DeviceFeature.networkTerminationDWCAN01)\n" \ + "\t>>> \n" + +#define _DOC_GET_PCB_SERIAL_NUMBER \ + MODULE_NAME ".get_pcb_serial_number(device)\n" \ + "\n" \ + "Gets the unique PCB serial number of the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\t(:class:`str`): PCB Serial Number\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> pcb_sn = ics.get_pcb_serial_number(d)\n" \ + "\t>>> \n" + +#define _DOC_SET_LED_PROPERTY \ + MODULE_NAME ".set_led_property(device, led, prop, value)\n" \ + "\n" \ + "Sets the LED property on the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tled (:class:`int`): Index or position of the LED\n\n" \ + "\tprop (:class:`int`): Property of the LED\n\n" \ + "\tvalue (:class:`int`): Value of the LED Property\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> ics.set_led_property(d, TODO, TODO, TODO)\n" \ + "\t>>> \n" + +#define _DOC_START_DHCP_SERVER \ + MODULE_NAME ".start_dhcp_server(device, network_id, device_ip_address, subnet_mask, gateway, start_address, " \ + "end_address, overwrite_dhcp_settings, lease_time, reserved)\n" \ + "\n" \ + "Starts a DHCP Server.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tnetwork_id (:class:`int`): NetworkID\n\n" \ + "\tdevice_ip_address (:class:`str`): Device IP Address\n\n" \ + "\tsubnet_mask (:class:`str`): Subnet Mask\n\n" \ + "\tgateway (:class:`str`): Gateway\n\n" \ + "\tstart_address (:class:`str`): Start Address\n\n" \ + "\tend_address (:class:`str`): End Address\n\n" \ + "\toverwrite_dhcp_settings (:class:`bool`): Overwrite DHCP Settings\n\n" \ + "\tlease_time (:class:`int`): Lease time\n\n" \ + "\treserved (:class:`int`): (Optional) Reserved, set to 0\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> ics.start_dhcp_server(d, TODO)\n" \ + "\t>>> \n" + +#define _DOC_STOP_DHCP_SERVER \ + MODULE_NAME ".stop_dhcp_server(device, network_id)\n" \ + "\n" \ + "Stops the DHCP Server\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tnetwork_id (:class:`int`): NetworkID\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> ics.stop_dhcp_server(d, TODO)\n" \ + "\t>>> \n" + +#define _DOC_WBMS_MANAGER_WRITE_LOCK \ + MODULE_NAME ".wbms_manager_write_lock(device, manager, lock_state)\n" \ + "\n" \ + "Sets the lock state on the manager\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tmanager (:class:`" MODULE_NAME \ + ".structures.ew_bms_manager_port_t.ew_bms_manager_port_t`): :class:`" MODULE_NAME \ + ".structures.ew_bms_manager_port_t.ew_bms_manager_port_t`\n\n" \ + "\tlock_state (:class:`" MODULE_NAME \ + ".structures.ew_bms_manager_lock_state_t.ew_bms_manager_lock_state_t`): :class:`" MODULE_NAME \ + ".structures.ew_bms_manager_lock_state_t.ew_bms_manager_lock_state_t`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> from ics.structures.ew_bms_manager_port_t import ew_bms_manager_port_t\n" \ + "\t>>> from ics.structures.ew_bms_manager_lock_state_t import ew_bms_manager_lock_state_t\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> ics.wbms_manager_write_lock(d, ew_bms_manager_port_t.eManagerPortA.value, " \ + "ew_bms_manager_lock_state_t.eLockManager.value)\n" \ + "\t>>> \n" + +#define _DOC_WBMS_MANAGER_RESET \ + MODULE_NAME ".wbms_manager_reset(device, manager)\n" \ + "\n" \ + "Resets the manager\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tmanager (:class:`" MODULE_NAME \ + ".structures.ew_bms_manager_port_t.ew_bms_manager_port_t`): :class:`" MODULE_NAME \ + ".structures.ew_bms_manager_port_t.ew_bms_manager_port_t`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> from ics.structures.ew_bms_manager_port_t import ew_bms_manager_port_t\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> ics.wbms_manager_reset(d, ew_bms_manager_port_t.eManagerPortA.value)\n" \ + "\t>>> \n" + +#define _DOC_UART_WRITE \ + MODULE_NAME ".uart_write(device, port, data, flags)\n" \ + "\n" \ + "Writes UART on the given port\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tport (:class:`" MODULE_NAME ".structures.e_uart_port_t.e_uart_port_t`): :class:`" MODULE_NAME \ + ".structures.e_uart_port_t.e_uart_port_t`\n\n" \ + "\tdata (:class:`bytes`): :class:`bytes`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> from ics.structures.e_uart_port_t import e_uart_port_t\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> ics.uart_write(d, e_uart_port_t.eUART0, b'my uart data goes here')\n" \ + "\t>>> \n" + +#define _DOC_UART_READ \ + MODULE_NAME ".uart_read(device, port, bytes_to_read, flags)\n" \ + "\n" \ + "Reads UART on the given port. \n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tport (:class:`" MODULE_NAME ".structures.e_uart_port_t.e_uart_port_t`): :class:`" MODULE_NAME \ + ".structures.e_uart_port_t.e_uart_port_t`\n\n" \ + "\tbytes_to_read (:class:`int`): Optional. How many bytes to read from the UART, 256 if omitted.\n\n" \ + "\tflags (:class:`int`): Optional. Flags to be used. Don't use if unsure.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> from ics.structures.e_uart_port_t import e_uart_port_t\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> data = ics.uart_read(d, e_uart_port_t.eUART0)\n" \ + "\t>>> print(f\"Read {len(data)} bytes: {data}\")\n" \ + "\t>>> \n" + +#define _DOC_UART_SET_BAUDRATE \ + MODULE_NAME ".uart_set_baudrate(device, port, baudrate)\n" \ + "\n" \ + "Sets the UART baudrate on the given port. \n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tport (:class:`" MODULE_NAME ".structures.e_uart_port_t.e_uart_port_t`): :class:`" MODULE_NAME \ + ".structures.e_uart_port_t.e_uart_port_t`\n\n" \ + "\tbaudrate (:class:`int`): Baudrate of the UART to set.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> from ics.structures.e_uart_port_t import e_uart_port_t\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> ics.uart_set_baudrate(d, e_uart_port_t.eUART0, 115200)\n" \ + "\t>>> print(f\"Read {len(data)} bytes: {data}\")\n" \ + "\t>>> \n" + +#define _DOC_UART_GET_BAUDRATE \ + MODULE_NAME ".uart_get_baudrate(device, port)\n" \ + "\n" \ + "Gets the UART baudrate on the given port. \n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tport (:class:`" MODULE_NAME ".structures.e_uart_port_t.e_uart_port_t`): :class:`" MODULE_NAME \ + ".structures.e_uart_port_t.e_uart_port_t`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone.\n" \ + "\n" \ + "\t>>> import ics\n" \ + "\t>>> from ics.structures.e_uart_port_t import e_uart_port_t\n" \ + "\t>>> d = ics.open_device()\n" \ + "\t>>> baudrate = ics.uart_set_baudrate(d, e_uart_port_t.eUART0)\n" \ + "\t>>> \n" + +#define _DOC_GENERIC_API_SEND_COMMAND \ + MODULE_NAME ".generic_api_send_command(device, api_index, instance_index, function_index, data)\n" \ + "\n" \ + "Sends a command in a generic way.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tapi_index (:class:`int`): api_index.\n\n" \ + "\tinstance_index (:class:`int`): instance_index.\n\n" \ + "\tfunction_index (:class:`int`): function_index.\n\n" \ + "\tdata (:class:`bytes`): Data to be passed in.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tfunctionError (:class:`int`): functionError.\n\n" \ + "\n" + +// if (!PyArg_ParseTuple(args, arg_parse("ObbI:", __FUNCTION__), &obj, &apiIndex, &instanceIndex, &length)) { +#define _DOC_GENERIC_API_READ_DATA \ + MODULE_NAME \ + ".generic_api_read_data(device, api_index, instance_index, [length])\n" \ + "\n" \ + "Reads data in a generic way.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:` PyNeoDeviceEx" \ + "`\n\n" \ + "\tapi_index (:class:`int`): api_index.\n\n" \ + "\tinstance_index (:class:`int`): instance_index.\n\n" \ + "\tfunction_index (:class:`int`): function_index.\n\n" \ + "\tlength (:class:`int`): (optional) Length of the data to read. defaults to `GENERIC_API_DATA_BUFFER_SIZE`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\ttuple of (functionIndex, data) \n\n" \ "\n" -#define _DOC_GET_TIMESTAMP_FOR_MSG \ - MODULE_NAME ".get_timestamp_for_msg(device, msg)\n" \ - "\n" \ - "Calculates the timestamp for a message.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "\tmsg (:class:`" MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME "`): :class:`" MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tFloat: Timestamp for the message.\n" \ - "\n" \ - "\t>>> import ics\n" \ - "\t>>> d = ics.open_device()\n" \ - "\t>>> msgs, error_count = ics.get_messages(d)\n" \ - "\t>>> ics.get_timestamp_for_msg(d, msgs[0])\n" \ - "\t354577568.9145524\n" \ - -#define _DOC_GET_DEVICE_STATUS \ - MODULE_NAME ".get_device_status(device)\n" \ - "\n" \ - "Returns the device status.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\t(:class:`" MODULE_NAME "." "ics_device_status" "`).\n" \ - "\n" \ - "\t>>> import ics\n" \ - "\t>>> d = ics.open_device()\n" \ - "\t>>> status = ics.get_device_status(d)\n" \ - "\t>>> status.fire2Status.ethernetActivationLineEnabled\n" \ - "\t0\n" \ - -#define _DOC_ENABLE_NETWORK_COM \ - MODULE_NAME ".enable_network_com(device, enable, net_id)\n" \ - "\n" \ - "Enable or disable network communication.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "\tenable (:class:`bool`): :class:`bool`\n\n" \ - "\n" \ - "\tnet_id (:class:`int`): :class:`int`: Optional. If left blank, disables/enables all networks.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone.\n" \ - "\n" \ - "\t>>> import ics\n" \ - "\t>>> d = ics.open_device()\n" \ - "\t>>> status = ics.enable_network_com(d, True)\n" \ - "\t>>> \n" - -#define _DOC_ENABLE_BUS_VOLTAGE_MONITOR \ - MODULE_NAME ".enable_bus_voltage_monitor(device, enable, reserved)\n" \ - "\n" \ - "Enable or disable bus voltage monitoring.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "\tenable (:class:`bool`): :class:`int`\n\n" \ - "\n" \ - "\treserved (:class:`int`): :class:`int`: Optional. Should be set to zero. Don't set, if unsure.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone.\n" \ - "\n" \ - "\t>>> import ics\n" \ - "\t>>> d = ics.open_device()\n" \ - "\t>>> status = ics.enable_bus_voltage_monitor(d, 1)\n" \ - "\t>>> \n" - -#define _DOC_GET_BUS_VOLTAGE \ - MODULE_NAME ".get_bus_voltage(device, reserved)\n" \ - "\n" \ - "Reads bus voltage. (:class:`" MODULE_NAME ".enable_bus_voltage_monitor`) needs to be called first.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "\treserved (:class:`int`): :class:`int`: Optional. Should be set to zero. Don't set, if unsure.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tInt: value returned is in mV.\n" \ - "\n" \ - "\t>>> import ics\n" \ - "\t>>> d = ics.open_device()\n" \ - "\t>>> status = ics.enable_bus_voltage_monitor(d, 1)\n" \ - "\t>>> ics.get_bus_voltage(d)\n" \ - "\t12000\n" \ - "\t>>> \n" - -#define _DOC_READ_JUPITER_FIRMWARE \ - MODULE_NAME ".read_jupiter_firmware(device, size, [vnetChannel])\n" \ - "\n" \ - "Reads firmware binary from a RAD-Jupiter. If not sure, don't use this method\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "\tsize (:class:`int`): :class:`int`: size of the bytes to read of the firmware binary.\n\n" \ - "\n" \ - "\tvnetChannel (:class:`int`): :class:`int`: Optional. Don't set, if unsure.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone\n" \ - "\n" \ - -#define _DOC_WRITE_JUPITER_FIRMWARE \ - MODULE_NAME ".write_jupiter_firmware(device, bytes, [vnetChannel])\n" \ - "\n" \ - "Writes firmware binary to a RAD-Jupiter. If not sure, don't use this method\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "\tbytes (:class:`bytes`): :class:`bytes`: bytes of the firmware binary.\n\n" \ - "\n" \ - "\tvnetChannel (:class:`int`): :class:`int`: Optional. Don't set, if unsure.\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone\n" \ - "\n" \ - -#define _DOC_GET_DISK_DETAILS \ - MODULE_NAME ".get_disk_details(device)\n" \ - "\n" \ - "Returns the device disk details.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\t(:class:`" MODULE_NAME "." "srad_gigalog_disk_details" "`).\n" \ - "\n" \ - "\t>>> import ics\n" \ - "\t>>> d = ics.open_device()\n" \ - "\t>>> details = ics.get_disk_details(d)\n" \ - "\t>>> details.structure.options\n" \ - "\t>>> \n" - -#define _DOC_DISK_FORMAT \ - MODULE_NAME ".disk_format(device)\n" \ - "\n" \ - "Starts disk formatting on the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone.\n" \ - "\n" \ - "\t>>> import ics\n" \ - "\t>>> d = ics.open_device()\n" \ - "\t>>> details = ics.get_disk_details(d)\n" \ - "\t>>> details. = ics.get_disk_details(d)\n" \ - "\t>>> ics.disk_format(d, details)\n" \ - "\t>>> \n" - -#define _DOC_DISK_FORMAT_CANCEL \ - MODULE_NAME ".disk_format_cancel(device)\n" \ - "\n" \ - "Cancel in progress disk formatting on the device.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone.\n" \ - "\n" \ - "\t>>> import ics\n" \ - "\t>>> d = ics.open_device()\n" \ - "\t>>> ics.disk_format(d, details)\n" \ - "\t>>> ics.disk_format_cancel(d)\n" \ - "\t>>> \n" - -#define _DOC_DISK_FORMAT_PROGRESS \ - MODULE_NAME ".get_disk_format_progress(device)\n" \ - "\n" \ - "Returns the device disk formatting progress.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\t(:class:`" MODULE_NAME "." "srad_gigalog_disk_format_progress" "`).\n" \ - "\n" \ - "\t>>> import ics\n" \ - "\t>>> d = ics.open_device()\n" \ - "\t>>> d = ics.disk_format(d, details)\n" \ - "\t>>> progress = ics.get_disk_format_progress(d)\n" \ - "\t>>> progress.sectorsRemaining\n" \ - "\t>>> \n" - -#define _DOC_ENABLE_DOIP_LINE \ - MODULE_NAME ".enable_doip_line(device, enable)\n" \ - "\n" \ - "Activate or De-activate DOIP Line.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "\tenable (:class:`bool`): :class:`bool`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone.\n" \ - "\n" \ - "\t>>> import ics\n" \ - "\t>>> d = ics.open_device()\n" \ - "\t>>> status = ics.enable_doip_line(d, True)\n" \ - "\t>>> \n" - -#define _DOC_IS_DEVICE_FEATURE_SUPPORTED \ - MODULE_NAME ".is_device_feature_supported(device, feature)\n" \ - "\n" \ - "Polls firmware in device to see if the feature is supported. As of 908 only ValueCAN4-2EL, ValueCAN4-4 and ValueCAN4-Industrial are supported.\n" \ - "\n" \ - "Args:\n" \ - "\tdevice (:class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`): :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "`\n\n" \ - "\n" \ - "\tenable (:class:`DeviceFeature`): :class:`DeviceFeature`\n\n" \ - "\n" \ - "Raises:\n" \ - "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ - "\n" \ - "Returns:\n" \ - "\tNone.\n" \ - "\n" \ - "\t>>> import ics\n" \ - "\t>>> from ics.structures.device_feature import DeviceFeature\n" \ - "\t>>> d = ics.open_device()\n" \ - "\t>>> supported = ics.is_device_feature_supported(d, DeviceFeature.networkTerminationDWCAN01)\n" \ - "\t>>> \n" - -static PyMethodDef IcsMethods[] = { - _EZ_ICS_STRUCT_METHOD("find_devices", "icsneoFindNeoDevices", "FindNeoDevices", (PyCFunction)meth_find_devices, METH_VARARGS | METH_KEYWORDS, _DOC_FIND_DEVICES), - _EZ_ICS_STRUCT_METHOD("open_device", "icsneoOpenNeoDevice", "OpenNeoDevice", (PyCFunction)meth_open_device, METH_VARARGS | METH_KEYWORDS, _DOC_OPEN_DEVICES), - _EZ_ICS_STRUCT_METHOD("close_device", "icsneoClosePort", "ClosePort", meth_close_device, METH_VARARGS, _DOC_CLOSE_DEVICES), - _EZ_ICS_STRUCT_METHOD("get_rtc", "icsneoGetRTC", "GetRTC", meth_get_rtc, METH_VARARGS, _DOC_GET_RTC), - _EZ_ICS_STRUCT_METHOD("set_rtc", "icsneoSetRTC", "SetRTC", meth_set_rtc, METH_VARARGS, _DOC_SET_RTC), - _EZ_ICS_STRUCT_METHOD("coremini_load", "icsneoScriptLoad", "ScriptLoad", meth_coremini_load, METH_VARARGS, _DOC_COREMINI_LOAD), - _EZ_ICS_STRUCT_METHOD("coremini_start", "icsneoScriptStart", "ScriptStart", meth_coremini_start, METH_VARARGS, _DOC_COREMINI_START), - _EZ_ICS_STRUCT_METHOD("coremini_stop", "icsneoScriptStop", "ScriptStop", meth_coremini_stop, METH_VARARGS, _DOC_COREMINI_STOP), - _EZ_ICS_STRUCT_METHOD("coremini_clear", "icsneoScriptClear", "ScriptClear", meth_coremini_clear, METH_VARARGS, _DOC_COREMINI_CLEAR), - _EZ_ICS_STRUCT_METHOD("coremini_get_status", "icsneoScriptGetScriptStatus", "ScriptGetScriptStatus", meth_coremini_get_status, METH_VARARGS, _DOC_COREMINI_GET_STATUS), - _EZ_ICS_STRUCT_METHOD("transmit_messages", "icsneoTxMessages", "TxMessages", meth_transmit_messages, METH_VARARGS, _DOC_TRANSMIT_MESSAGES), - _EZ_ICS_STRUCT_METHOD("get_messages", "icsneoGetMessages", "GetMessages", meth_get_messages, METH_VARARGS, _DOC_GET_MESSAGES), - _EZ_ICS_STRUCT_METHOD("get_script_status", "icsneoScriptGetScriptStatusEx", "ScriptGetScriptStatusEx", meth_get_script_status, METH_VARARGS, "Accepts a " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME ", exception on error. Returns a list of values of what ulParameters would hold"), - _EZ_ICS_STRUCT_METHOD("get_error_messages", "icsneoGetErrorMessages", "GetErrorMessages", meth_get_error_messages, METH_VARARGS, _DOC_GET_ERROR_MESSAGES), -#ifdef _USE_INTERNAL_HEADER_ - _EZ_ICS_STRUCT_METHOD("flash_devices", "FlashDevice2", "FlashDevice2", meth_flash_devices, METH_VARARGS, "int _stdcall FlashDevice2()"), -#endif - _EZ_ICS_STRUCT_METHOD("set_reflash_callback", "icsneoSetReflashDisplayCallbacks", "SetReflashDisplayCallback", meth_set_reflash_callback, METH_VARARGS, _DOC_SET_REFLASH_CALLBACK), - _EZ_ICS_STRUCT_METHOD("get_device_settings", "icsneoGetDeviceSettings", "GetDeviceSettings", meth_get_device_settings, METH_VARARGS, _DOC_GET_DEVICE_SETTINGS), - _EZ_ICS_STRUCT_METHOD("set_device_settings", "icsneoSetDeviceSettings", "SetDeviceSettings", meth_set_device_settings, METH_VARARGS, _DOC_SET_DEVICE_SETTINGS), - _EZ_ICS_STRUCT_METHOD("load_default_settings", "icsneoLoadDefaultSettings", "LoadDefaultSettings", meth_load_default_settings, METH_VARARGS, _DOC_LOAD_DEFAULT_SETTINGS), - //_EZ_ICS_STRUCT_METHOD("spy_message_to_j1850", METH_spy_message_to_j1850, METH_VARARGS, "Accepts a " MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME ", and returns a " MODULE_NAME "." SPY_MESSAGE_J1850_OBJECT_NAME ". Exception on error."), - _EZ_ICS_STRUCT_METHOD("read_sdcard", "icsneoReadSDCard", "ReadSDCard", meth_read_sdcard, METH_VARARGS, "icsneoReadSDCard(), Accepts a " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME " and sector index. Returns a bytearray of 512 bytes max. Exception on error."), - _EZ_ICS_STRUCT_METHOD("write_sdcard", "icsneoWriteSDCard", "WriteSDCard", meth_write_sdcard, METH_VARARGS, "icsneoReadSDCard(), Accepts a " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME ", sector index, and a bytearray of 512 bytes. Exception on error."), - {"create_neovi_radio_message", (PyCFunction)meth_create_neovi_radio_message, METH_VARARGS | METH_KEYWORDS, _DOC_CREATE_NEOVI_RADIO_MESSAGE}, - _EZ_ICS_STRUCT_METHOD("coremini_start_fblock", "icsneoScriptStartFBlock", "ScriptStartFBlock", meth_coremini_start_fblock, METH_VARARGS, _DOC_COREMINI_START_FBLOCK), - _EZ_ICS_STRUCT_METHOD("coremini_stop_fblock", "icsneoScriptStopFBlock", "ScriptStopFBlock", meth_coremini_stop_fblock, METH_VARARGS, _DOC_COREMINI_STOP_FBLOCK), - _EZ_ICS_STRUCT_METHOD("coremini_get_fblock_status", "icsneoScriptGetFBlockStatus", "ScriptGetFBlockStatus", meth_coremini_get_fblock_status, METH_VARARGS, _DOC_COREMINI_GET_FBLOCK_STATUS), - _EZ_ICS_STRUCT_METHOD("coremini_read_app_signal", "icsneoScriptReadAppSignal", "ScriptReadAppSignal", meth_coremini_read_app_signal, METH_VARARGS, _DOC_COREMINI_READ_APP_SIGNAL), - _EZ_ICS_STRUCT_METHOD("coremini_write_app_signal", "icsneoScriptWriteAppSignal", "ScriptWriteAppSignal", meth_coremini_write_app_signal, METH_VARARGS, _DOC_COREMINI_WRITE_APP_SIGNAL), - _EZ_ICS_STRUCT_METHOD("coremini_read_tx_message", "icsneoScriptReadTxMessage", "ScriptReadTxMessage", meth_coremini_read_tx_message, METH_VARARGS, _DOC_COREMINI_READ_TX_MESSAGE), - _EZ_ICS_STRUCT_METHOD("coremini_read_rx_message", "icsneoScriptReadRxMessage", "ScriptReadRxMessage", meth_coremini_read_rx_message, METH_VARARGS, _DOC_COREMINI_READ_RX_MESSAGE), - _EZ_ICS_STRUCT_METHOD("coremini_write_tx_message", "icsneoScriptWriteTxMessage", "ScriptWriteTxMessage", meth_coremini_write_tx_message, METH_VARARGS, _DOC_COREMINI_WRITE_TX_MESSAGE), - _EZ_ICS_STRUCT_METHOD("coremini_write_rx_message", "icsneoScriptWriteRxMessage", "ScriptWriteRxMessage", meth_coremini_write_rx_message, METH_VARARGS, _DOC_COREMINI_WRITE_RX_MESSAGE), - _EZ_ICS_STRUCT_METHOD("get_performance_parameters", "icsneoGetPerformanceParameters", "GetPerformanceParameters", meth_get_performance_parameters, METH_VARARGS, _DOC_GET_PERFORMANCE_PARAMETERS), - _EZ_ICS_STRUCT_METHOD("validate_hobject", "icsneoValidateHObject", "ValidateHObject", meth_validate_hobject, METH_VARARGS, _DOC_VALIDATE_HOBJECT), - _EZ_ICS_STRUCT_METHOD("get_last_api_error", "icsneoGetLastAPIError", "GetLastAPIError", meth_get_last_api_error, METH_VARARGS, _DOC_GET_LAST_API_ERROR), - _EZ_ICS_STRUCT_METHOD("get_dll_version", "icsneoGetDLLVersion", "GetDLLVersion", meth_get_dll_version, METH_NOARGS, _DOC_GET_DLL_VERSION), - _EZ_ICS_STRUCT_METHOD("get_serial_number", "icsneoGetSerialNumber", "GetSerialNumber", meth_get_serial_number, METH_VARARGS, _DOC_GET_SERIAL_NUMBER), - _EZ_ICS_STRUCT_METHOD("get_hw_firmware_info", "icsneoGetHWFirmwareInfo", "GetHWFirmwareInfo", meth_get_hw_firmware_info, METH_VARARGS, _DOC_GET_HW_FIRMWARE_INFO), - _EZ_ICS_STRUCT_METHOD("request_enter_sleep_mode", "icsneoRequestEnterSleepMode", "RequestEnterSleepMode", meth_request_enter_sleep_mode, METH_VARARGS, _DOC_REQUEST_ENTER_SLEEP_MODE), - {"base36enc", (PyCFunction)meth_base36enc, METH_VARARGS | METH_KEYWORDS, _DOC_BASE36ENC}, - _EZ_ICS_STRUCT_METHOD("set_context", "icsneoSetContext", "SetContext", meth_set_context, METH_VARARGS, _DOC_SET_CONTEXT), - _EZ_ICS_STRUCT_METHOD("force_firmware_update", "icsneoForceFirmwareUpdate", "ForceFirmwareUpdate", meth_force_firmware_update, METH_VARARGS, _DOC_FORCE_FIRMWARE_UPDATE), - _EZ_ICS_STRUCT_METHOD("firmware_update_required", "icsneoFirmwareUpdateRequired", "FirmwareUpdateRequired", meth_firmware_update_required, METH_VARARGS, _DOC_FIRMWARE_UPDATE_REQUIRED), - _EZ_ICS_STRUCT_METHOD("get_dll_firmware_info", "icsneoGetDLLFirmwareInfo", "GetDLLFirmwareInfo", meth_get_dll_firmware_info, METH_VARARGS, _DOC_GET_DLL_FIRMWARE_INFO), - _EZ_ICS_STRUCT_METHOD("get_backup_power_enabled", "icsneoGetBackupPowerEnabled", "GetBackupPowerEnabled", meth_get_backup_power_enabled, METH_VARARGS, _DOC_GET_BACKUP_POWER_ENABLED), - _EZ_ICS_STRUCT_METHOD("set_backup_power_enabled", "icsneoSetBackupPowerEnabled", "SetBackupPowerEnabled", meth_set_backup_power_enabled, METH_VARARGS, _DOC_SET_BACKUP_POWER_ENABLED), - _EZ_ICS_STRUCT_METHOD("get_backup_power_ready", "icsneoGetBackupPowerReady", "GetBackupPowerReady", meth_get_backup_power_ready, METH_VARARGS, _DOC_GET_BACKUP_POWER_READY), -#ifdef _USE_INTERNAL_HEADER_ - _EZ_ICS_STRUCT_METHOD("load_readbin", "icsneoScriptLoadReadBin", "ScriptLoadReadBin", meth_load_readbin, METH_VARARGS, _DOC_LOAD_READBIN), -#endif - _EZ_ICS_STRUCT_METHOD("iso15765_transmit_message", "icsneoISO15765_TransmitMessage", "ISO15765_TransmitMessage", meth_iso15765_transmit_message, METH_VARARGS, _DOC_ISO15765_TRANSMIT_MESSAGE), - _EZ_ICS_STRUCT_METHOD("iso15765_receive_message", "icsneoISO15765_ReceiveMessage", "ISO15765_ReceiveMessage", meth_iso15765_receive_message, METH_VARARGS, _DOC_ISO15765_RECEIVE_MESSAGE), - _EZ_ICS_STRUCT_METHOD("iso15765_enable_networks", "icsneoISO15765_EnableNetworks", "ISO15765_EnableNetworks", meth_iso15765_enable_networks, METH_VARARGS, _DOC_ISO15765_ENABLE_NETWORKS), - _EZ_ICS_STRUCT_METHOD("iso15765_disable_networks", "icsneoISO15765_DisableNetworks", "ISO15765_DisableNetworks", meth_iso15765_disable_networks, METH_VARARGS, _DOC_ISO15765_DISABLE_NETWORKS), - - _EZ_ICS_STRUCT_METHOD("get_active_vnet_channel", "icsneoGetActiveVNETChannel", "GetActiveVNETChannel", meth_get_active_vnet_channel, METH_VARARGS, _DOC_GET_ACTIVE_VNET_CHANNEL), - _EZ_ICS_STRUCT_METHOD("set_active_vnet_channel", "icsneoSetActiveVNETChannel", "SetActiveVNETChannel", meth_set_active_vnet_channel, METH_VARARGS, _DOC_SET_ACTIVE_VNET_CHANNEL), - _EZ_ICS_STRUCT_METHOD("set_bit_rate", "icsneoSetBitRate", "SetBitRate", meth_set_bit_rate, METH_VARARGS, _DOC_SET_BIT_RATE), - _EZ_ICS_STRUCT_METHOD("set_fd_bit_rate", "icsneoSetFDBitRate", "SetFDBitRate", meth_set_fd_bit_rate, METH_VARARGS, _DOC_SET_FD_BIT_RATE), - _EZ_ICS_STRUCT_METHOD("set_bit_rate_ex", "icsneoSetBitRateEx", "SetBitRateEx", meth_set_bit_rate_ex, METH_VARARGS, _DOC_SET_BIT_RATE_EX), - _EZ_ICS_STRUCT_METHOD("get_timestamp_for_msg", "icsneoGetTimeStampForMsg", "GetTimeStampForMsg", meth_get_timestamp_for_msg, METH_VARARGS, _DOC_GET_TIMESTAMP_FOR_MSG), - _EZ_ICS_STRUCT_METHOD("get_device_status", "icsneoGetDeviceStatus", "GetDeviceStatus", meth_get_device_status, METH_VARARGS, _DOC_GET_DEVICE_STATUS), - - _EZ_ICS_STRUCT_METHOD("enable_network_com", "icsneoEnableNetworkCom", "EnableNetworkCom", meth_enable_network_com, METH_VARARGS, _DOC_ENABLE_NETWORK_COM), - - _EZ_ICS_STRUCT_METHOD("enable_bus_voltage_monitor", "icsneoEnableBusVoltageMonitor", "EnableBusVoltageMonitor", meth_enable_bus_voltage_monitor, METH_VARARGS, _DOC_ENABLE_BUS_VOLTAGE_MONITOR), - _EZ_ICS_STRUCT_METHOD("get_bus_voltage", "icsneoGetBusVoltage", "GetBusVoltage", meth_get_bus_voltage, METH_VARARGS, _DOC_GET_BUS_VOLTAGE), - - _EZ_ICS_STRUCT_METHOD("read_jupiter_firmware", "icsneoReadJupiterFirmware", "ReadJupiterFirmware", meth_read_jupiter_firmware, METH_VARARGS, _DOC_READ_JUPITER_FIRMWARE), - _EZ_ICS_STRUCT_METHOD("write_jupiter_firmware", "icsneoWriteJupiterFirmware", "WriteJupiterFirmware", meth_write_jupiter_firmware, METH_VARARGS, _DOC_WRITE_JUPITER_FIRMWARE), - - _EZ_ICS_STRUCT_METHOD("get_disk_details", "icsneoRequestDiskDetails", "RequestDiskDetails", meth_get_disk_details, METH_VARARGS, _DOC_GET_DISK_DETAILS), - _EZ_ICS_STRUCT_METHOD("disk_format", "icsneoRequestDiskFormat", "RequestDiskFormat", meth_disk_format, METH_VARARGS, _DOC_DISK_FORMAT), - _EZ_ICS_STRUCT_METHOD("disk_format_cancel", "icsneoRequestDiskFormatCancel", "RequestDiskFormatCancel", meth_disk_format_cancel, METH_VARARGS, _DOC_DISK_FORMAT_CANCEL), - _EZ_ICS_STRUCT_METHOD("get_disk_format_progress", "icsneoRequestDiskFormatProgress", "RequestDiskFormatProgress", meth_get_disk_format_progress, METH_VARARGS, _DOC_DISK_FORMAT_PROGRESS), - _EZ_ICS_STRUCT_METHOD("enable_doip_line", "icsneoEnableDOIPLine", "EnableDOIPLine", meth_enable_doip_line, METH_VARARGS, _DOC_ENABLE_DOIP_LINE), - // not in official builds yet... - //_EZ_ICS_STRUCT_METHOD("is_device_feature_supported", "icsneoIsDeviceFeatureSupported", "IsDeviceFeatureSupported", meth_is_device_feature_supported, METH_VARARGS, _DOC_IS_DEVICE_FEATURE_SUPPORTED), - - {"override_library_name", (PyCFunction)meth_override_library_name, METH_VARARGS, _DOC_OVERRIDE_LIBRARY_NAME}, - {"get_library_path", (PyCFunction)meth_get_library_path, METH_NOARGS, ""}, - - { NULL, NULL, 0, NULL } -}; +// if (!PyArg_ParseTuple(args, arg_parse("Obb:", __FUNCTION__), &obj, &apiIndex, &instanceIndex)) { +#define _DOC_GENERIC_API_GET_STATUS \ + MODULE_NAME ".generic_api_get_status(device, api_index, instance_index)\n" \ + "\n" \ + "Reads data in a generic way.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\tapi_index (:class:`int`): api_index.\n\n" \ + "\tinstance_index (:class:`int`): instance_index.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\ttuple of (:class:`int`): (functionIndex, callbackError, finishedProcessing) \n\n" \ + "\n" + +#define _DOC_GET_GPTP_STATUS \ + MODULE_NAME ".get_gptp_status(device)\n" \ + "\n" \ + "Gets the gPTP Status from the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tics.structures.gptp_status.gptp_status (:class:`ics.structures.gptp_status.gptp_status`)\n\n" \ + "\n" + +#define _DOC_GET_ALL_CHIP_VERSIONS \ + MODULE_NAME ".get_all_chip_versions(device, api_index, instance_index)\n" \ + "\n" \ + "Get all the chip (firmware) versions of the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tics.structures.st_chip_versions.st_chip_versions " \ + "(:class:`ics.structures.st_chip_versions.st_chip_versions`)\n\n" \ + "\n" + +#define _DOC_FLASH_ACCESSORY_FIRMWARE \ + MODULE_NAME ".flash_accessory_firmware(device, data, index[, check_success])\n" \ + "\n" \ + "Flashes Accessory Firmware. If not sure, don't use this method\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "\tdata (:class:`bytes`): :class:`bytes`: data of the firmware binary.\n\n" \ + "\n" \ + "\tindex (:class:`int`): :class:`int`: Index enum.\n\n" \ + "\n" \ + "\tcheck_success (:class:`bool`): :class:`bool`: Optional, raises an exception if not successful \n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone\n" \ + "\n" + +#define _DOC_GET_ACCESSORY_FIRMWARE_VERSION \ + MODULE_NAME ".get_Accessory_firmware_version(device, index[, check_success])\n" \ + "\n" \ + "Gets Accessory Firmware version. If not sure, don't use this method\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:` PyNeoDeviceEx" \ + "`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "\tindex (:class:`int`): :class:`int`: Index enum.\n\n" \ + "\n" \ + "\tcheck_success (:class:`bool`): :class:`bool`: Optional, raises an exception if not successful \n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone\n" \ + "\n" + +#define _DOC_SET_SAFE_BOOT_MODE \ + MODULE_NAME ".set_safe_boot_mode(device, enable: bool) -> bool\n" \ + "\n" \ + "Sets safe boot mode. If not sure, don't use this method.\n" \ + "FIRE3 will reboot to safe boot mode when called with enable = True.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:`" MODULE_NAME ".PyNeoDeviceEx`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "\tenable (:class:`bool`): :class:`bool`: Tells the device to enter safe boot mode upon restart.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone\n" \ + "\n" + +#define _DOC_GET_DEVICE_NAME \ + MODULE_NAME ".get_device_name(device[, dev_name_type]) -> bool\n" \ + "\n" \ + "Gets the device name of the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:`" MODULE_NAME ".PyNeoDeviceEx`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "\tdev_name_type (:class:`int`): :class:`int`: See EDevNameType.\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tstr\n" \ + "\n" + +#define _DOC_GET_IMEI \ + MODULE_NAME ".get_imei(device) -> int\n" \ + "\n" \ + "Gets the unique 15 digit IMEI from the device. raises RuntimeError if not supported.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:`" MODULE_NAME ".PyNeoDeviceEx`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tint\n" \ + "\n" + +#define _DOC_GET_COMPONENT_VERSIONS \ + MODULE_NAME ".get_component_versions(device[, force, length]) -> (ics.structures.version_report.version_report)\n" \ + "\n" \ + "Gets the component versions from the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:`" MODULE_NAME ".PyNeoDeviceEx`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\ttuple of ics.structures.version_report.version_report\n" \ + "\n" + +#define _DOC_REQUEST_SET_NEOVI_MISCIO \ + MODULE_NAME ".request_set_neovi_miscio(device, ddrs, ddrs_mask, states, states_mask, leds, leds_mask) -> None\n" \ + "\n" \ + "Sets MISCIO states for the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:`" MODULE_NAME ".PyNeoDeviceEx`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "\tddrs (:class:`int`): :class:`int`: Bitfield direction of IO. 1 = output.\n\n" \ + "\n" \ + "\tddrs_mask (:class:`int`): :class:`int`: Bitfield mask for ddrs. 1 = set\n\n" \ + "\n" \ + "\tstates (:class:`int`): :class:`int`: Bitfield state of IO. 1 = high.\n\n" \ + "\n" \ + "\tstates_mask (:class:`int`): :class:`int`: Bitfield mask for states. 1 = set\n\n" \ + "\n" \ + "\tleds (:class:`int`): :class:`int`: Bitfield state of LEDs. 1 = on.\n\n" \ + "\n" \ + "\tleds_mask (:class:`int`): :class:`int`: Bitfield mask for LEDs. 1 = set\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\tNone\n" \ + "\n" + +#define _DOC_GET_FIRMWARE_VARIANT \ + MODULE_NAME ".get_firmware_variant(device) -> Int\n" \ + "\n" \ + "Gets firmware variant of the device.\n" \ + "\n" \ + "Args:\n" \ + "\tdevice (:class:`" MODULE_NAME ".PyNeoDeviceEx`): :class:`" MODULE_NAME ".PyNeoDeviceEx`\n\n" \ + "\n" \ + "Raises:\n" \ + "\t:class:`" MODULE_NAME ".RuntimeError`\n" \ + "\n" \ + "Returns:\n" \ + "\t(:class:`int`): :class:`int`: variant\n" \ + "\n" + +extern PyMethodDef IcsMethods[]; #endif // _METHODS_H_ diff --git a/include/object_neo_device.h b/include/object_neo_device.h deleted file mode 100644 index 921574ccf..000000000 --- a/include/object_neo_device.h +++ /dev/null @@ -1,161 +0,0 @@ -#ifndef _OBJECT_NEO_DEVICE_H_ -#define _OBJECT_NEO_DEVICE_H_ -//http://docs.python.org/3/extending/newtypes.html - -#include -#include -#if (defined(_WIN32) || defined(__WIN32__)) - #ifndef USING_STUDIO_8 - #define USING_STUDIO_8 1 - #endif - #include -#else - #include -#endif - -#include "defines.h" -#include "exceptions.h" -#include "dll.h" - - -// Linux specific fixes -#if !(defined(_WIN32) || defined(__WIN32__)) - -// __int64 is a msvc specific type -#include -#define __int64 int64_t - -// __stdcall is a windows calling convention -#ifndef __stdcall -#define __stdcall - -// Sleep is a windows.h specific function. -#include -#define Sleep(i) sleep(i) - - -#endif -#endif - - -#define NEO_DEVICE_OBJECT_NAME "NeoDevice" - -#if ICS_LEGACY_SUPPORT -#define ICS_HANDLE int -#define ICS_HANDLE_PY_TYPE T_INT -#else -#define ICS_HANDLE void* -#define ICS_HANDLE_PY_TYPE T_INT -#endif - -typedef struct { - PyObject_HEAD - NeoDevice dev; - PyObject* name; - char auto_cleanup; - ICS_HANDLE handle; - PyObject* dict; -} neo_device_object; - -static PyMemberDef neo_device_object_members[] = { - { "Name", T_OBJECT_EX, offsetof(neo_device_object, name), 0, "String describing DeviceType, extension to Python api only." }, - { "DeviceType", T_UINT, offsetof(neo_device_object, dev.DeviceType), 0, "" }, - { "Handle", T_INT, offsetof(neo_device_object, dev.Handle), 0, "" }, - { "NumberOfClients", T_INT, offsetof(neo_device_object, dev.NumberOfClients), 0, "" }, - { "SerialNumber", T_INT, offsetof(neo_device_object, dev.SerialNumber), 0, "" }, - { "MaxAllowedClients", T_INT, offsetof(neo_device_object, dev.MaxAllowedClients), 0, "" }, - { "AutoHandleClose", T_BOOL, offsetof(neo_device_object, dev.MaxAllowedClients), 0, "When " NEO_DEVICE_OBJECT_NAME " is freed the handle will automatically be closed, if true." }, - { "_Handle", ICS_HANDLE_PY_TYPE, offsetof(neo_device_object, handle), 0, "This contains the handle returned from icsneoOpenDevice() API. If uncertain, don't use this." }, - { "IsOpen", T_BOOL, offsetof(neo_device_object, handle), 0, "This contains the handle returned from icsneoOpenDevice() API. If uncertain, don't use this." }, - { NULL, 0, 0, 0, 0 }, -}; - -static int neo_device_object_alloc(neo_device_object* self, PyObject* args, PyObject* kwds) -{ - self->name = PyUnicode_FromString(""); - self->auto_cleanup = 1; - self->handle = 0; - - return 0; -} - -static void neo_device_object_dealloc(neo_device_object* self) -{ - if (self->auto_cleanup && self->handle) { - try - { - // Auto clean up device handle if NeoDevice object is going out of scope. - ice::Library* lib = dll_get_library(); - if (lib) { - ice::Function icsneoClosePort(lib, "icsneoClosePort"); - ice::Function icsneoFreeObject(lib, "icsneoFreeObject"); - int error_count = 0; - if (icsneoClosePort(self->handle, &error_count)) { - icsneoFreeObject(self->handle); - } - } - } - catch (...) - { - //return set_ics_exception(exception_runtime_error(), (char*)ex.what()); - } - } - Py_XDECREF(self->name); - Py_TYPE(self)->tp_free((PyObject*)self); -} - -static PyObject* neo_device_object_getattr(PyObject *o, PyObject *attr_name) -{ - return PyObject_GenericGetAttr(o, attr_name); -} - -static int neo_device_object_setattr(PyObject *o, PyObject *name, PyObject *value) -{ - return PyObject_GenericSetAttr(o, name, value); -} - -// Shamelessly copied from base36enc -static PyObject* convert_to_base36(unsigned long value) -{ - char base36[37] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - /* log(2**64) / log(36) = 12.38 => max 13 char + '\0' */ - char buffer[100]; - unsigned int offset = sizeof(buffer); - - buffer[--offset] = '\0'; - do { - buffer[--offset] = base36[value % 36]; - } while (value /= 36); - return PyUnicode_FromString(&buffer[offset]); -} - -static PyObject* neo_device_object_tp_repr(PyObject* o) -{ - // example output: - neo_device_object* nd = (neo_device_object*)(o); - // Check range is AA0000-ZZZZZZ - PyObject* sn = NULL; - if (621457920 <= nd->dev.SerialNumber && nd->dev.SerialNumber <= 2176782335) - sn = convert_to_base36(nd->dev.SerialNumber); - else - sn = PyUnicode_FromFormat("%lu", nd->dev.SerialNumber); - return PyUnicode_FromFormat("<" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME " %U %U>", nd->name, sn); -} - -extern PyTypeObject neo_device_object_type; - -// Copied from tupleobject.h -#define PyNeoDevice_Check(op) \ - PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_BASETYPE) -#define PyNeoDevice_CheckExact(op) (Py_TYPE(PyNeoDevice_GetNeoDevice(op)) == &neo_device_object_type) - -#define PyNeoDevice_GetNeoDevice(nd) ((neo_device_object*)nd) -#define PyNeoDevice_GetName(nd) (PyNeoDevice_GetNeoDevice(nd)->name) -#define PyNeoDevice_GetSerialNumber(nd) (PyNeoDevice_GetNeoDevice(nd)->dev.SerialNumber) - -#define PyNeoDevice_GetHandle(nd) (PyNeoDevice_GetNeoDevice(nd)->handle) -#define PyNeoDevice_SetHandle(nd, hndle) PyNeoDevice_GetNeoDevice(nd)->handle = hndle - -bool setup_neo_device_object(PyObject* module); - -#endif // _OBJECT_NEO_DEVICE_H_ diff --git a/include/object_spy_message.h b/include/object_spy_message.h index e62dc39af..44778a34a 100644 --- a/include/object_spy_message.h +++ b/include/object_spy_message.h @@ -1,16 +1,16 @@ #ifndef _OBJECT_SPY_MESSAGE_H_ #define _OBJECT_SPY_MESSAGE_H_ -//http://docs.python.org/3/extending/newtypes.html +// http://docs.python.org/3/extending/newtypes.html #include #include #if (defined(_WIN32) || defined(__WIN32__)) - #ifndef USING_STUDIO_8 - #define USING_STUDIO_8 1 - #endif - #include +#ifndef USING_STUDIO_8 +#define USING_STUDIO_8 1 +#endif +#include #else - #include +#include #endif #include @@ -34,305 +34,28 @@ int PyUnicode_CompareWithASCIIString(PyObject *uni, const char *string) */ #endif -typedef struct { - PyObject_HEAD - icsSpyMessage msg; +#pragma pack(push, 1) +typedef struct +{ + PyObject_HEAD icsSpyMessage msg; bool noExtraDataPtrCleanup; } spy_message_object; +#pragma pack(pop) -typedef struct { - PyObject_HEAD - icsSpyMessageJ1850 msg; +#pragma pack(push, 1) +typedef struct +{ + PyObject_HEAD icsSpyMessageJ1850 msg; bool noExtraDataPtrCleanup; } spy_message_j1850_object; +#pragma pack(pop) -static PyMemberDef spy_message_object_members[] = { - { "StatusBitField", T_UINT, offsetof(spy_message_object, msg.StatusBitField), 0, "StatusBitField" }, - { "StatusBitField2", T_UINT, offsetof(spy_message_object, msg.StatusBitField2), 0, "StatusBitField2" }, - { "TimeHardware", T_UINT, offsetof(spy_message_object, msg.TimeHardware), 0, "Hardware time stamp. The TimeStamp is reset on device open" }, - { "TimeHardware2", T_UINT, offsetof(spy_message_object, msg.TimeHardware2), 0, "Hardware time stamp. The TimeStamp is reset on device open" }, - { "TimeSystem", T_UINT, offsetof(spy_message_object, msg.TimeSystem), 0, "TimeSystem is loaded with the value received from the timeGetTime call in the WIN32 multimedia API." }, - { "TimeSystem2", T_UINT, offsetof(spy_message_object, msg.TimeSystem2), 0, "TimeSystem is loaded with the value received from the timeGetTime call in the WIN32 multimedia API." }, - { "TimeStampHardwareID", T_UBYTE, offsetof(spy_message_object, msg.TimeStampHardwareID), 0, "This is an identifier of what type of hardware timestamp is used. Since neoVI's timestamp is always the same, this doesn't change." }, - { "TimeStampSystemID", T_UBYTE, offsetof(spy_message_object, msg.TimeStampSystemID), 0, "This is an identifier of what type of system timestamp is used. Since WIN32 neoVI's timestamp is always the same, from the timeGetTime API, this doesn't change." }, - { "NetworkID", T_UBYTE, offsetof(spy_message_object, msg.NetworkID), 0, "This value is used to identify which network this message was received on." }, - { "NodeID", T_UBYTE, offsetof(spy_message_object, msg.NodeID), 0, "Not Used" }, - { "Protocol", T_UBYTE, offsetof(spy_message_object, msg.Protocol), 0, "Valid values are SPY_PROTOCOL_CAN, SPY_PROTOCOL_J1850VPW, and SPY_PROTOCOL_ISO9141." }, - { "MessagePieceID", T_UBYTE, offsetof(spy_message_object, msg.MessagePieceID), 0, "Not Used" }, - { "ExtraDataPtrEnabled", T_UBYTE, offsetof(spy_message_object, msg.ExtraDataPtrEnabled), 0, "" }, - { "NumberBytesHeader", T_UBYTE, offsetof(spy_message_object, msg.NumberBytesHeader), 0, " Used for J1850/ISO messages. It indicates how many bytes are stored in the Header(1 to 4) array." }, - { "NumberBytesData", T_UBYTE, offsetof(spy_message_object, msg.NumberBytesData), 0, "Holds the number of bytes in the Data(1 to 8) array or the number of bytes in a CAN remote frame (The DLC)." }, - { "NetworkID2", T_UBYTE, offsetof(spy_message_object, msg.NetworkID2), 0, "This value is used to identify which network this message was received on." }, - { "DescriptionID", T_SHORT, offsetof(spy_message_object, msg.DescriptionID), 0, "Not Used" }, - { "ArbIDOrHeader", T_UINT, offsetof(spy_message_object, msg.ArbIDOrHeader), 0, "" }, - { "Data", T_OBJECT_EX, NULL, 0, "" }, - { "StatusBitField3", T_UINT, offsetof(spy_message_object, msg.StatusBitField3), 0, "StatusBitField3" }, - { "StatusBitField4", T_UINT, offsetof(spy_message_object, msg.StatusBitField4), 0, "StatusBitField4" }, - { "AckBytes", T_OBJECT_EX, NULL, 0, "" }, - { "ExtraDataPtr", T_OBJECT_EX, offsetof(spy_message_object, msg.ExtraDataPtr), 0, "" }, - { "MiscData", T_UBYTE, offsetof(spy_message_object, msg.MiscData), 0, "" }, - { "noExtraDataPtrCleanup", T_BOOL, offsetof(spy_message_object, noExtraDataPtrCleanup), 0, "Tells Python to not clean up ExtraDataPtrMemory, If this is enabled. Ignore, if unsure." }, - { NULL, 0, 0, 0, 0 }, -}; - -static PyMemberDef spy_message_j1850_object_members[] = { - { "StatusBitField", T_UINT, offsetof(spy_message_j1850_object, msg.StatusBitField), 0, "StatusBitField" }, - { "StatusBitField2", T_UINT, offsetof(spy_message_j1850_object, msg.StatusBitField2), 0, "StatusBitField2" }, - { "TimeHardware", T_UINT, offsetof(spy_message_j1850_object, msg.TimeHardware), 0, "Hardware time stamp. The TimeStamp is reset on device open" }, - { "TimeHardware2", T_UINT, offsetof(spy_message_j1850_object, msg.TimeHardware2), 0, "Hardware time stamp. The TimeStamp is reset on device open" }, - { "TimeSystem", T_UINT, offsetof(spy_message_j1850_object, msg.TimeSystem), 0, "TimeSystem is loaded with the value received from the timeGetTime call in the WIN32 multimedia API." }, - { "TimeSystem2", T_UINT, offsetof(spy_message_j1850_object, msg.TimeSystem2), 0, "TimeSystem is loaded with the value received from the timeGetTime call in the WIN32 multimedia API." }, - { "TimeStampHardwareID", T_UBYTE, offsetof(spy_message_j1850_object, msg.TimeStampHardwareID), 0, "This is an identifier of what type of hardware timestamp is used. Since neoVI's timestamp is always the same, this doesn't change." }, - { "TimeStampSystemID", T_UBYTE, offsetof(spy_message_j1850_object, msg.TimeStampSystemID), 0, "This is an identifier of what type of system timestamp is used. Since WIN32 neoVI's timestamp is always the same, from the timeGetTime API, this doesn't change." }, - { "NetworkID", T_UBYTE, offsetof(spy_message_j1850_object, msg.NetworkID), 0, "This value is used to identify which network this message was received on." }, - { "NodeID", T_UBYTE, offsetof(spy_message_j1850_object, msg.NodeID), 0, "Not Used" }, - { "Protocol", T_UBYTE, offsetof(spy_message_j1850_object, msg.Protocol), 0, "Valid values are SPY_PROTOCOL_CAN, SPY_PROTOCOL_J1850VPW, and SPY_PROTOCOL_ISO9141." }, - { "MessagePieceID", T_UBYTE, offsetof(spy_message_j1850_object, msg.MessagePieceID), 0, "Not Used" }, - { "ExtraDataPtrEnabled", T_UBYTE, offsetof(spy_message_j1850_object, msg.ExtraDataPtrEnabled), 0, "" }, - { "NumberBytesHeader", T_UBYTE, offsetof(spy_message_j1850_object, msg.NumberBytesHeader), 0, " Used for J1850/ISO messages. It indicates how many bytes are stored in the Header(1 to 4) array." }, - { "NumberBytesData", T_UBYTE, offsetof(spy_message_j1850_object, msg.NumberBytesData), 0, "Holds the number of bytes in the Data(1 to 8) array or the number of bytes in a CAN remote frame (The DLC)." }, - { "NetworkID2", T_UBYTE, offsetof(spy_message_object, msg.NetworkID2), 0, "This value is used to identify which network this message was received on." }, - { "DescriptionID", T_SHORT, offsetof(spy_message_j1850_object, msg.DescriptionID), 0, "Not Used" }, - { "Header", T_OBJECT_EX, NULL, 0, "" }, - { "Data", T_OBJECT_EX, NULL, 0, "" }, - { "StatusBitField3", T_UINT, offsetof(spy_message_j1850_object, msg.StatusBitField3), 0, "StatusBitField3" }, - { "StatusBitField4", T_UINT, offsetof(spy_message_j1850_object, msg.StatusBitField4), 0, "StatusBitField4" }, - { "AckBytes", T_OBJECT_EX, NULL, 0, "" }, - { "ExtraDataPtr", T_OBJECT_EX, offsetof(spy_message_j1850_object, msg.ExtraDataPtr), 0, "" }, - { "MiscData", T_UBYTE, offsetof(spy_message_j1850_object, msg.MiscData), 0, "" }, - { "noExtraDataPtrCleanup", T_BOOL, offsetof(spy_message_object, noExtraDataPtrCleanup), 0, "Tells Python to not clean up ExtraDataPtrMemory, If this is enabled. Ignore, if unsure." }, - { NULL, 0, 0, 0, 0 }, -}; - - -static int spy_message_object_alloc(spy_message_object* self, PyObject* args, PyObject* kwds) -{ - memset(&self->msg, 0, sizeof(self->msg)); - self->noExtraDataPtrCleanup = false; - return 0; -} - -static void spy_message_object_dealloc(spy_message_object* self) -{ - if ((!self->noExtraDataPtrCleanup && self->msg.ExtraDataPtrEnabled && self->msg.ExtraDataPtr != NULL) || - (!self->noExtraDataPtrCleanup && self->msg.Protocol == SPY_PROTOCOL_ETHERNET && self->msg.ExtraDataPtr != NULL)) { - // Clean up the ExtraDataPtr if we can - // Ethernet protocol uses the ExtraDataPtrEnabled reversed internally so do a double check here - delete[] self->msg.ExtraDataPtr; - self->msg.ExtraDataPtr = NULL; - self->msg.ExtraDataPtrEnabled = 0; - } - Py_TYPE(self)->tp_free((PyObject*)self); -} - -static PyObject* spy_message_object_getattr(PyObject *o, PyObject *attr_name) -{ -#if PY_MAJOR_VERSION >= 3 - if (!PyUnicode_Check(attr_name)) { -#else - if (!PyString_Check(attr_name)) { -#endif - PyErr_Format(PyExc_TypeError, - "attribute name must be string, not '%.200s'", - attr_name->ob_type->tp_name); - return NULL; - } - else { - Py_INCREF(attr_name); - } - if (PyUnicode_CompareWithASCIIString(attr_name, "Data") == 0) { - Py_DECREF(attr_name); - spy_message_object* obj = (spy_message_object*)o; - PyObject* temp = Py_BuildValue("(i,i,i,i,i,i,i,i)", - obj->msg.Data[0], - obj->msg.Data[1], - obj->msg.Data[2], - obj->msg.Data[3], - obj->msg.Data[4], - obj->msg.Data[5], - obj->msg.Data[6], - obj->msg.Data[7]); - PyObject* data = PyTuple_GetSlice(temp, 0, obj->msg.NumberBytesData); - Py_DECREF(temp); - return data; - } - else if (PyUnicode_CompareWithASCIIString(attr_name, "AckBytes") == 0) { - Py_DECREF(attr_name); - spy_message_object* obj = (spy_message_object*)o; - return Py_BuildValue("(i,i,i,i,i,i,i,i)", - obj->msg.AckBytes[0], - obj->msg.AckBytes[1], - obj->msg.AckBytes[2], - obj->msg.AckBytes[3], - obj->msg.AckBytes[4], - obj->msg.AckBytes[5], - obj->msg.AckBytes[6], - obj->msg.AckBytes[7]); - } - else if (PyUnicode_CompareWithASCIIString(attr_name, "Header") == 0) { - Py_DECREF(attr_name); - spy_message_j1850_object* obj = (spy_message_j1850_object*)o; - PyObject* temp = Py_BuildValue("(i,i,i,i)", - obj->msg.Header[0], - obj->msg.Header[1], - obj->msg.Header[2], - obj->msg.Header[3]); - PyObject* data = PyTuple_GetSlice(temp, 0, obj->msg.NumberBytesHeader); - Py_DECREF(temp); - return data; - } - else if (PyUnicode_CompareWithASCIIString(attr_name, "ExtraDataPtr") == 0) { - Py_DECREF(attr_name); - spy_message_j1850_object* obj = (spy_message_j1850_object*)o; - unsigned char *ExtraDataPtr = (unsigned char*)obj->msg.ExtraDataPtr; - bool extra_data_ptr_enabled = obj->msg.ExtraDataPtrEnabled != 0; - // Ethernet protocol uses the ExtraDataPtrEnabled reversed internally - if (obj->msg.Protocol == SPY_PROTOCOL_ETHERNET && obj->msg.ExtraDataPtr != NULL) { - extra_data_ptr_enabled = true; - } - if (extra_data_ptr_enabled && obj->msg.NumberBytesData && obj->msg.ExtraDataPtr) { - int actual_size = 0; - // Some newer protocols are packing the length into NumberBytesHeader also so lets handle it here... - if (obj->msg.Protocol == SPY_PROTOCOL_A2B || obj->msg.Protocol == SPY_PROTOCOL_ETHERNET) { - actual_size = (obj->msg.NumberBytesHeader << 8) | obj->msg.NumberBytesData; - } - else { - actual_size = obj->msg.NumberBytesData; - } - PyObject *tuple = PyTuple_New(actual_size); - for (int i=0; i < actual_size; ++i) { - PyTuple_SET_ITEM(tuple, i, PyLong_FromLong(ExtraDataPtr[i])); - } - return tuple; - } else { - return Py_None; - } - } - else { - return PyObject_GenericGetAttr(o, attr_name); - } -} - -static int spy_message_object_setattr(PyObject *o, PyObject *name, PyObject *value) -{ - spy_message_object* obj = (spy_message_object*)o; - if (PyUnicode_CompareWithASCIIString(name, "Data") == 0) { - // Make sure we are a tuple and len() == 8 - if (!PyTuple_Check(value)) { - PyErr_Format(PyExc_AttributeError, - "'%.50s' object attribute '%.400s' needs to be a tuple", - MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME, name); - return -1; - } - // Get tuple items and place them in array, set as 0 if error. - for (int i=0; i < 8 && i < PyObject_Length(value); ++i) { - PyObject* data = PyTuple_GetItem(value, i); - if (!data && !PyLong_Check(data)) { - obj->msg.Data[i] = 0; - } else { - obj->msg.Data[i] = (unsigned char)PyLong_AsLong(data); - } - } - obj->msg.NumberBytesData = PyObject_Length(value); - return 0; - } - else if (PyUnicode_CompareWithASCIIString(name, "AckBytes") == 0) { - // Make sure we are a tuple and len() == 8 - if (!PyTuple_Check(value)) { - PyErr_Format(PyExc_AttributeError, - "'%.50s' object attribute '%.400s' needs to be a tuple", - MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME, name); - return -1; - } - // Get tuple items and place them in array, set as 0 if error. - for (int i=0; i < 8 && i < PyObject_Length(value); ++i) { - PyObject* data = PyTuple_GetItem(value, i); - if (!data && !PyLong_Check(data)) { - obj->msg.AckBytes[i] = 0; - } else { - obj->msg.AckBytes[i] = (unsigned char)PyLong_AsLong(data); - } - } - return 0; - } - else if (PyUnicode_CompareWithASCIIString(name, "Header") == 0) { - // Make sure we are a tuple and len() == 8 - if (!PyTuple_Check(value)) { - PyErr_Format(PyExc_AttributeError, - "'%.50s' object attribute '%.400s' needs to be a tuple", - MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME, name); - return -1; - } - // Get tuple items and place them in array, set as 0 if error. - for (int i=0; i < 8 && i < PyObject_Length(value); ++i) { - PyObject* data = PyTuple_GetItem(value, i); - if (!data && !PyLong_Check(data)) { - ((spy_message_j1850_object*)obj)->msg.Header[i] = 0; - } else { - ((spy_message_j1850_object*)obj)->msg.Header[i] = (unsigned char)PyLong_AsLong(data); - } - obj->msg.NumberBytesHeader = PyObject_Length(value); - } - return 0; - } - else if (PyUnicode_CompareWithASCIIString(name, "Protocol") == 0) { - // Ethernet behavior is backward to CAN and will crash if enabled. - if (PyLong_AsLong(value) == SPY_PROTOCOL_ETHERNET) - obj->msg.ExtraDataPtrEnabled = 0; - return PyObject_GenericSetAttr(o, name, value); - } - else if (PyUnicode_CompareWithASCIIString(name, "ExtraDataPtr") == 0) { - // Make sure we are a tuple and len() == 8 - if (!PyTuple_Check(value)) { - PyErr_Format(PyExc_AttributeError, - "'%.50s' object attribute '%.400s' needs to be a tuple", - MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME, name); - return -1; - } - // Get tuple items and place them in array, set as 0 if error. - Py_ssize_t length = PyObject_Length(value); - if (obj->msg.ExtraDataPtr != NULL) - delete[] obj->msg.ExtraDataPtr; - obj->msg.ExtraDataPtr = new unsigned char[PyObject_Length(value)]; - obj->msg.NumberBytesData = PyObject_Length(value); - if (obj->msg.Protocol != SPY_PROTOCOL_ETHERNET) - obj->msg.ExtraDataPtrEnabled = 1; - unsigned char * ExtraDataPtr = (unsigned char*)(obj->msg.ExtraDataPtr); - for (int i=0; i < PyObject_Length(value); ++i) { - PyObject* data = PyTuple_GetItem(value, i); - if (!data && !PyLong_Check(data)) { - ExtraDataPtr[i] = (unsigned char)0; - } else { - ExtraDataPtr[i] = (unsigned char)PyLong_AsLong(data); - } - } - return 0; - } - else if (PyUnicode_CompareWithASCIIString(name, "ExtraDataPtrEnabled") == 0) { - // Make sure we clean up here so we don't memory leak - if ((!obj->noExtraDataPtrCleanup && PyLong_AsLong(value) != 1 && obj->msg.ExtraDataPtrEnabled == 1) || - (!obj->noExtraDataPtrCleanup && PyLong_AsLong(value) != 1 && obj->msg.Protocol == SPY_PROTOCOL_ETHERNET)) { - if (obj->msg.ExtraDataPtr != NULL) - delete[] obj->msg.ExtraDataPtr; - } - else if (PyLong_AsLong(value) != 0 && obj->msg.Protocol == SPY_PROTOCOL_ETHERNET) - { - // Ethernet always needs to be set to 0 - return 0; - } - return PyObject_GenericSetAttr(o, name, value); - } - else { - return PyObject_GenericSetAttr(o, name, value); - } -} extern PyTypeObject spy_message_object_type; extern PyTypeObject spy_message_j1850_object_type; // Copied from tupleobject.h -#define PySpyMessage_Check(op) \ - PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_BASETYPE) +#define PySpyMessage_Check(op) PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_BASETYPE) #define PySpyMessage_CheckExact(op) (Py_TYPE(op) == &spy_message_object_type) #define PySpyMessageJ1850_CheckExact(op) (Py_TYPE(op) == &spy_message_j1850_object_type) diff --git a/msvc/python_ics.vcxproj b/msvc/python_ics.vcxproj index 83a2853ce..904f7cc78 100644 --- a/msvc/python_ics.vcxproj +++ b/msvc/python_ics.vcxproj @@ -184,8 +184,7 @@ true - - + @@ -196,7 +195,6 @@ - diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..faea49e51 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,83 @@ +[project] +name = "python_ics" +dynamic = ["version"] +authors = [{ name = "David Rebbe", email = "drebbe@intrepidcs.com" }] +maintainers = [{ name = "David Rebbe", email = "drebbe@intrepidcs.com" }] +description = "Python wrapper for interfacing to IntrepidCS Hardware." +keywords = ["intrepidcs", "CAN", "Ethernet", "Automotive", "ICS"] +readme = { file = "README.md", content-type = "text/markdown" } +requires-python = ">=3.10" +license = "MIT" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Topic :: Software Development :: Libraries :: Python Modules", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", +] + +[project.urls] +Homepage = "https://intrepidcs.com" +Documentation = "http://python-ics.readthedocs.io/" +Repository = "https://github.com/intrepidcs/python_ics/" +Issues = "https://github.com/intrepidcs/python_ics/issues" + +[dependency-groups] +test = [ + "pytest>=8.4.2", +] + +[tool.setuptools.dynamic] +version = { attr = "ics.__version__" } + +[build-system] +requires = [ + "setuptools", + "wheel", + "dunamai", + "pytest>=8.4.2", + # Puts the ninja executable on the isolated build env's PATH; required by + # build_libicsneo.py's `cmake -G Ninja` on Linux/macOS (see comments there). + "ninja", +] + + +[tool.cibuildwheel] +build = "cp{310,311,312,313,314}-{win32,win_amd64,macosx_universal2,manylinux_x86_64,manylinux_aarch64}" +skip = "cp36-* cp37-* cp38-* cp39-* pp* *-manylinux_i686 *-musllinux_*" +environment = { CIBW_BUILD_VERBOSITY = 1, DISTUTILS_DEBUG = 1, MACOSX_DEPLOYMENT_TARGET = "10.13", CIBW_ARCHS_LINUX = "auto aarch64" } +before-build = "python -m pip install wheel" +manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64" +manylinux-aarch64-image = "quay.io/pypa/manylinux_2_28_aarch64" + +[tool.cibuildwheel.linux] +before-build = "dnf install -y cmake clang clang-tools-extra flex bison" +archs = "auto aarch64" + +[tool.cibuildwheel.macos] +archs = ["universal2"] +before-build = "brew install cmake clang-format" + +[tool.cibuildwheel.windows] +before-build = "choco install llvm" + +[tool.black] +line-length = 120 +# https://stackoverflow.com/questions/73247204/black-not-respecting-extend-exclude-in-pyproject-toml +force-exclude = ''' +/( + | .vscode + | .venv + | build + | ics + | include + | msvc + | src +)/ +''' diff --git a/requirements.txt b/requirements.txt index e69de29bb..2b48fdeed 100644 --- a/requirements.txt +++ b/requirements.txt @@ -0,0 +1,3 @@ +setuptools >= 69 +dunamai >= 1.19.2 +wheel >= 0.42.0 \ No newline at end of file diff --git a/setup.py b/setup.py index 366cf7bd2..d1ace4650 100644 --- a/setup.py +++ b/setup.py @@ -1,137 +1,152 @@ #!/usr/bin/env python3 from setuptools import setup, Extension - -from distutils.command import build as build_module +from setuptools.command.build_clib import build_clib +from setuptools.command.build_py import build_py import os -import platform import sys -import unittest +import platform import shutil +import os.path +import extract_icsneo40_defines +import generate_icsneo40_structs +from ics_utility import get_pkg_version, create_version_py, create_ics_init +import pathlib +from typing import List + +# I had this in build_py but there are certain times its not called, for now lets force +# it to run every single time we call setup. Its quick enough where it shouldn't hurt. +create_ics_init() +create_version_py() +generate_icsneo40_structs.generate_all_files() -MAJOR_VERSION = 909 -MINOR_VERSION = 8 -POST_VERSION = None - -if POST_VERSION: - VERSION_STRING = '%d.%d-%d' % (MAJOR_VERSION, MINOR_VERSION, POST_VERSION) -else: - VERSION_STRING = '%d.%d' % (MAJOR_VERSION, MINOR_VERSION) - - -def _run_tests(): - directory = os.path.abspath(os.path.dirname(sys.modules['__main__'].__file__)) - loader = unittest.defaultTestLoader - runner = unittest.TextTestRunner() - suite = loader.discover(os.path.join(directory, 'test')) - runner.run(suite) - - -try: - from setuptools.command.test import test - - class UnitTests(test): - def finalize_options(self): - test.finalize_options(self) - self.test_args = [] - self.test_suite = True - - def run_tests(self): - _run_tests() -except ImportError: - from distutils.core import Command - - class UnitTests(Command): - user_options = [] - - def initialize_options(self): - pass - - def finalize_options(self): - pass - - def run(self): - _run_tests() +# Check for clang stuff here, read the docs doesn't have this so use what is in the repo +if not os.getenv("READTHEDOCS"): + if not shutil.which("clang"): + raise RuntimeError("clang is required for building python_ics.") + if not shutil.which("clang-format"): + raise RuntimeError("clang-format is required for building python_ics.") +def get_version(): + # Strip a PEP 440 epoch ("1!26.3.9" -> "26.3.9") before numeric parsing. + version = get_pkg_version().split("!", 1)[-1] + major = int(version.split(".")[0]) + minor = int(version.split(".")[1]) + return major, minor -class build(build_module.build): +class _build_libicsneo(build_clib): def run(self): - import extract_icsneo40_defines - import generate_icsneo40_structs - extract_icsneo40_defines.extract() - generate_icsneo40_structs.generate() - if 'DARWIN' in platform.system().upper(): + # checkout and build libicsneo + if platform.system().upper() in ("DARWIN", "LINUX"): import build_libicsneo + + print("Checking out libicsneo...") build_libicsneo.checkout() + print("Building libicsneo...") build_libicsneo.build() + print("Copying libicsneo...") build_libicsneo.copy() - build_module.build.run(self) + super().run() -home_path = os.path.expanduser('~') -# Grab all the source files -source_files = [] -for root, dirs, files in os.walk('src'): - for file in files: - if file.endswith('.cpp') or file.endswith('.c'): - source_files.append(os.path.join(root, file)) +class _build_ics_py(build_py): + def run(self): + print("Generating python defines from icsnVC40.h...") + extract_icsneo40_defines.extract() -# Set compiler flags here -if 'LINUX' in platform.system().upper(): - compile_args = [ - '-fpermissive', - '-Wno-unused-variable', - '-Wno-unused-function', - '-Wno-write-strings' + print("Copy python source files over to gen...") + src_path = pathlib.Path("./src/") + gen_path = pathlib.Path("./gen/") + for dirpath, dirnames, filenames in os.walk(src_path): + dirpath = pathlib.Path(dirpath) + for name in filenames: + if pathlib.Path(name).suffix == ".py" and 'icsdebug' not in name: + src = (dirpath / name) + dest = (gen_path / dirpath.relative_to(src_path) / name) + print(f"Copying {src} to {dest}{' '*20}", end="") + shutil.copy(src, dest) + print("") + self.run_command("build_libicsneo") + super().run() + + +def get_ics_extension_compiler_arguments() -> List[str]: + """Return a list of compiler arguments to append for compiling the ics extension module""" + # Debug arguments + is_debug = True if os.environ.get("DEBUG") else False + # gcc and clang arguments + GCC_COMPILE_ARGS = [ + "-Wno-unknown-pragmas", ] -else: - compile_args = [] - -# Check for clang stuff here, read the docs doesn't have this so use what is in the repo -if not os.getenv("READTHEDOCS"): - if not shutil.which('clang'): - raise RuntimeError("clang is required for building python_ics.") - if not shutil.which('clang-format'): - raise RuntimeError("clang-format is required for building python_ics.") - - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() - + if is_debug: + print("NOTICE: Building for DEBUG!") + GCC_COMPILE_ARGS.extend(["-g", "-O0"]) + # Set compiler flags here + if "WINDOWS" in platform.system().upper(): + compile_args = [ + "/W4", + "/Wall", # Displays all warnings displayed by /W4 and all other warnings that /W4 doesn't include + #"/WX", # Treats all compiler warnings as errors. + "/external:anglebrackets", + "/external:W0", + "/wd4710", + "/wd4711", + "/wd5045", + "/std:c++17", + ] + if is_debug: + compile_args.extend(["CL=/Zi", "/Od", "/DEBUG"]) + # mingw and clang python builds won't have MSC in the version string + if "MSC" not in sys.version: + compile_args = GCC_COMPILE_ARGS + elif "LINUX" in platform.system().upper(): + compile_args = GCC_COMPILE_ARGS + elif "DARWIN" in platform.system().upper(): + # Mac doesn't respect the compiler args, but will append with ARCHFLAGS environment variable + archflags = os.environ.get("ARCHFLAGS", "") + os.environ["ARCHFLAGS"] = archflags + " -std=c++17" + compile_args = [] + else: + compile_args = [] + return compile_args ics_extension = Extension( - 'ics.ics', - define_macros=[('MAJOR_VERSION', MAJOR_VERSION), - ('MINOR_VERSION', MINOR_VERSION), - ('EXTERNAL_PROJECT', 1)], - include_dirs=['include', 'include/ics', 'include/ice'], + "ics.ics", + define_macros=[("MAJOR_VERSION", get_version()[0]), ("MINOR_VERSION", get_version()[1]), ("EXTERNAL_PROJECT", 1)], + include_dirs=["include", "include/ics", "src/ice/include", "src/ice/include/ice"], libraries=[], - library_dirs=['/usr/local/lib'], - sources=source_files, extra_compile_args=compile_args) + library_dirs=["/usr/local/lib"], + sources=[ + "src/object_spy_message.cpp", + "src/defines.cpp", + "src/exceptions.cpp", + "src/dll.cpp", + "src/setup_module_auto_defines.cpp", + "src/main.cpp", + "src/methods.cpp", + "src/ice/src/ice_library_manager.cpp", + "src/ice/src/ice_library_name.cpp", + "src/ice/src/ice_library.cpp", + ], + extra_compile_args=get_ics_extension_compiler_arguments(), +) package_data = {} -if 'DARWIN' in platform.system().upper(): - package_data['ics'] = ['*.dylib'] - -setup(name='python_ics', - version=VERSION_STRING, - description='Library for interfacing with Intrepid devices in Python', - long_description=read('README.md'), - license="MIT", - author='David Rebbe', - author_email='drebbe@intrepidcs.com', - maintainer='David Rebbe', - maintainer_email='drebbe@intrepidcs.com', - url='https://github.com/intrepidcs/python_ics/', - cmdclass={'build': build, 'test': UnitTests, }, - download_url='https://github.com/intrepidcs/python_ics/releases', - packages=['ics', 'ics.structures'], - package_data=package_data, - include_package_data=True, - ext_modules=[ics_extension], - classifiers=[ - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - ],) +if "DARWIN" in platform.system().upper(): + package_data["ics"] = ["*.dylib"] +elif "LINUX" in platform.system().upper(): + package_data[""] = ["*.so"] + +setup( + name="python_ics", + version=get_pkg_version(), + cmdclass={ + "build_libicsneo": _build_libicsneo, + "build_py": _build_ics_py, + }, + download_url="https://github.com/intrepidcs/python_ics/releases", + packages=["ics", "ics.structures"], + package_dir={"ics": "gen/ics", "ics.structures": "gen/ics/structures"}, + package_data=package_data, + include_package_data=True, + ext_modules=[ics_extension], +) diff --git a/src/defines.cpp b/src/defines.cpp index 06dca9338..89e8766b0 100644 --- a/src/defines.cpp +++ b/src/defines.cpp @@ -7,6 +7,8 @@ int setup_module_defines(PyObject* module) return --result; result += PyModule_AddStringConstant(module, "BUILD_DATETIME", __DATE__ " " __TIME__); + result += PyModule_AddObject(module, "MIN_BASE36_SERIAL", PyLong_FromUnsignedLong(MIN_BASE36_SERIAL)); + result += PyModule_AddObject(module, "MAX_SERIAL", PyLong_FromUnsignedLong(MAX_SERIAL)); if (result == 0) { return 1; diff --git a/src/dll.cpp b/src/dll.cpp index 8b16be3b4..eeaa0f448 100644 --- a/src/dll.cpp +++ b/src/dll.cpp @@ -1,74 +1,38 @@ #include "dll.h" +#include #include -ice::Library* LIBRARY = NULL; -char ERROR_MESSAGE[512]; +#pragma warning(push) +#pragma warning(disable : 4996) // warning C4996: 'strcpy': This function or variable may be unsafe. -bool __initialize(char* name) -{ - if (dll_is_initialized()) { - return true; - } - try - { - memset(ERROR_MESSAGE, '\0', sizeof(ERROR_MESSAGE)/sizeof(ERROR_MESSAGE[0])); - if (!name) - { -#if (defined(_WIN32) || defined(__WIN32__)) - LIBRARY = new ice::Library("icsneo40.dll"); -#elif (defined(__APPLE__)) - LIBRARY = new ice::Library("@loader_path/libicsneolegacy.dylib"); -#else - LIBRARY = new ice::Library("libicsneoapi.so"); -#endif - } - else - { - LIBRARY = new ice::Library(name); - } - } - catch (ice::Exception& ex) - { - strncpy(ERROR_MESSAGE, ex.whatString().c_str(), sizeof(ERROR_MESSAGE)/sizeof(ERROR_MESSAGE[0])); - ERROR_MESSAGE[sizeof(ERROR_MESSAGE)/sizeof(ERROR_MESSAGE[0]) - 1] = '\0'; - return false; - } - return true; -} - -bool dll_initialize(char* name) -{ - return __initialize(name); -} - -bool dll_is_initialized(void) -{ - return LIBRARY != NULL; -} -void dll_uninitialize(void) -{ - if (!dll_is_initialized()) { - return; - } - delete LIBRARY; - LIBRARY = NULL; -} bool dll_reinitialize(char* name) { - dll_uninitialize(); - return dll_initialize(name); + auto& mgr = ice::LibraryManager::instance(); + mgr.add("ics", name, false, true); + + return mgr.exists("ics"); } char* dll_get_error(char* error_msg) { - strcpy(error_msg, ERROR_MESSAGE); + auto& mgr = ice::LibraryManager::instance(); + if (!mgr.exists("ics")) { + strcpy(error_msg, "Critical Error: Library isn't loaded!"); + return error_msg; + } + strcpy(error_msg, mgr["ics"]->getLastError().c_str()); return error_msg; } ice::Library* dll_get_library(void) { - dll_initialize(); - return LIBRARY; + auto& mgr = ice::LibraryManager::instance(); + if (!mgr.exists("ics")) { + return nullptr; + } + return mgr["ics"]; } + +#pragma warning(pop) \ No newline at end of file diff --git a/src/exceptions.cpp b/src/exceptions.cpp index f550f3183..92ae888a6 100644 --- a/src/exceptions.cpp +++ b/src/exceptions.cpp @@ -2,39 +2,9 @@ #include "defines.h" #include -#include "object_neo_device.h" - static PyObject* IcsArgumentError = NULL; static PyObject* IcsRuntimeError = NULL; -char *pyics_base36enc(int sn) -{ - char *result = NULL; -#if PY_MAJOR_VERSION >= 3 - PyObject *name = PyUnicode_FromString("ics.ics"); -#else - PyObject *name = PyString_FromString("ics.ics"); -#endif - PyObject *module = PyImport_Import(name); - PyObject *dict = PyModule_GetDict(module); - PyObject *base36enc = PyDict_GetItemString(dict, "base36enc"); - if (PyCallable_Check(base36enc)) { - PyObject *return_value = PyObject_CallFunction(base36enc, "i", sn); - if (return_value == NULL) { - // We failed for some reason... - PyErr_Print(); - Py_DECREF(module); - Py_DECREF(name); - return NULL; - } else { - return PyUniStr_AsStrOrUTF8(return_value); - } - } - Py_DECREF(module); - Py_DECREF(name); - return ""; -} - int initialize_exceptions(PyObject* module) { if (!module && IcsArgumentError && IcsRuntimeError) { @@ -57,11 +27,11 @@ int initialize_exceptions(PyObject* module) return 1; } -PyObject* _set_ics_exception(PyObject* exception, char* msg, const char* func_name) +PyObject* _set_ics_exception(PyObject* exception, const char* msg, const char* func_name) { std::stringstream ss; std::string function = std::string(func_name); - int loc = function.find("meth_"); + auto loc = function.find("meth_"); if (loc != std::string::npos) { function.erase(loc, 5); } @@ -74,38 +44,6 @@ PyObject* _set_ics_exception(PyObject* exception, char* msg, const char* func_na return NULL; } -PyObject* _set_ics_exception_dev(PyObject* exception, PyObject* obj, char* msg, const char* func_name) -{ - std::stringstream ss; - std::string function = std::string(func_name); - int loc = function.find("meth_"); - if (loc != std::string::npos) { - function.erase(loc, 5); - } - ss << "Error: " << function << "(): " << msg; - if (obj && PyNeoDevice_CheckExact(obj)) { - ss << " ("; - // Grab the String "name" out of the NeoDeviceObject - char* name = PyUniStr_AsStrOrUTF8(PyNeoDevice_GetNeoDevice(obj)->name); - if (name) { - ss << name << " "; - } - char* b36sn = pyics_base36enc(PyNeoDevice_GetSerialNumber(obj)); - ss << PyNeoDevice_GetSerialNumber(obj); - if (b36sn != NULL && PyNeoDevice_GetSerialNumber(obj) >= 604661760 /* "A00000" */) { - ss << " - " << b36sn << ")"; - } else { - ss << ")"; - } - } - if (!exception) { - PyErr_SetString(PyExc_Exception, ss.str().c_str()); - } else { - PyErr_SetString(exception, ss.str().c_str()); - } - return NULL; -} - PyObject* exception_argument_error(void) { return IcsArgumentError; diff --git a/src/ice b/src/ice new file mode 160000 index 000000000..8c2b0c505 --- /dev/null +++ b/src/ice @@ -0,0 +1 @@ +Subproject commit 8c2b0c505a6ddc9cc9dbe6b9a2313cfe7b9e4063 diff --git a/src/ice/ice_library.cpp b/src/ice/ice_library.cpp deleted file mode 100644 index 925e4ca3c..000000000 --- a/src/ice/ice_library.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Ice multiplatform dynamic library loader. - * - * @copyright 2011 David Rebbe - */ - -#include "ice_library.h" -#include "ice_exception.h" -#include - -using namespace ice; - -Library::Library(std::string name) -{ - m_name = name; -#if (defined(_WIN32) || defined(__WIN32__)) -#ifdef UNICODE - int len = MultiByteToWideChar(CP_UTF8, 0, name.c_str(), -1, NULL, 0); - if (len) - { - wchar_t* n = new wchar_t[len]; - MultiByteToWideChar(CP_UTF8, 0, name.c_str(), -1, n, len); - m_lib = LoadLibrary(n); - delete[] n; - } else m_lib = NULL; -#else - m_lib = LoadLibrary(name.c_str()); -#endif // UNICODE - if (m_lib == NULL) - { - DWORD error = GetLastError(); - std::stringstream err; - err << "Failed to open library: '" << name << - "' with error code: #" << error; - throw Exception(err.str()); - } -#else - m_lib = dlopen(name.c_str(), RTLD_NOW); - if (m_lib == NULL) - { - std::stringstream err; - err << "Failed to open library '" << name << - "': " << dlerror(); - throw Exception(err.str()); - } -#endif -} - -Library::~Library() -{ - if (this->isLoaded()) - { -#if (defined(_WIN32) || defined(__WIN32__)) - FreeLibrary(m_lib); -#else - dlclose(m_lib); -#endif - } -} - -bool Library::isLoaded() const -{ - return m_lib != NULL; -} - -std::string Library::getPath(bool* okay) -{ - if (okay) - *okay = false; - if (!isLoaded()) - return m_name; -#if (defined(_WIN32) || defined(__WIN32__)) - TCHAR buffer[MAX_PATH] = {0}; - int len = GetModuleFileName(m_lib, buffer, MAX_PATH); - if (!len) - { - DWORD error = GetLastError(); - std::stringstream err; - err << "Failed to get Library path: '" << m_name << - "' with error code: #" << error; - throw Exception(err.str()); - } -#ifdef UNICODE - int length = WideCharToMultiByte(CP_UTF8, 0, buffer, -1, NULL, 0, NULL, NULL); - if (length) - { - char* temp = new char[MAX_PATH]; - WideCharToMultiByte(CP_UTF8, 0, buffer, -1, temp, length, NULL, NULL); - std::stringstream ss; - ss << temp; - if (okay) - *okay = true; - return ss.str(); - } -#else - std::stringstream ss; - ss << buffer; - if (okay) - *okay = true; - return ss.str(); -#endif // UNICODE -#else - // Linux doesn't really have a way to get the library path from the handle and - // its recommended to use absolute paths when loading with dlopen(). -#endif // WIN32 - return m_name; -} - -HMODULE const& Library::_library() const -{ - return m_lib; -} diff --git a/src/ice/ice_library_manager.cpp b/src/ice/ice_library_manager.cpp deleted file mode 100644 index 8fee9fc06..000000000 --- a/src/ice/ice_library_manager.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include "ice_library_manager.h" -#include -#include "ice_exception.h" - -using namespace ice; - -LibraryManager::LibraryManager() -{ - -} - -LibraryManager::~LibraryManager() -{ - Libraries::iterator iter = m_libs.begin(); - for (; iter != m_libs.end(); iter = m_libs.begin()) - this->remove(iter->first); -} - -void LibraryManager::add(std::string name, std::string path) -{ - m_libs[name] = new ice::Library(path); -} - -void LibraryManager::remove(std::string name) -{ - if (m_libs.find(name) == m_libs.end()) - return; - ice::Library* lib = m_libs[name]; - delete lib; - lib = NULL; - m_libs.erase(name); -} - -std::vector LibraryManager::getLibraryNames() const -{ - std::vector names; - names.reserve(m_libs.size()); - Libraries::const_iterator iter = m_libs.begin(); - for (; iter != m_libs.end(); ++iter) - names.push_back(iter->first); - return names; -} - -ice::Library& LibraryManager::operator[](std::string name) -{ - if (m_libs.find(name) == m_libs.end()) - { - std::stringstream ss; - ss << "LibraryManager Failed to retreive '" << name << "' From loaded library list!"; - throw Exception(ss.str()); - } - return *m_libs[name]; -} diff --git a/src/ics/py_neo_device_ex.py b/src/ics/py_neo_device_ex.py new file mode 100644 index 000000000..e21c0270a --- /dev/null +++ b/src/ics/py_neo_device_ex.py @@ -0,0 +1,517 @@ +import ics +from ics.ics import SpyMessage +import ctypes +from typing import Tuple + +class PyNeoDeviceEx(ics.neo_device_ex.neo_device_ex): + """Wrapper class around ics.neo_device_ex.neo_device_ex to support a more pythonic way of doing things.""" + # Internal handle from icsneoOpenDevice() + _handle = None + # python_ics extension for grabbing the name of the device + _name: str = "Unknown" + # Automatically close the handle on garbage collection + _auto_handle_close: bool = True + + def __init__(self): + super().__init__() + + def __del__(self): + if self._auto_handle_close and ics is not None: + ics.close_device(self) + + def __str__(self): + return f"{self.Name} {self.serial_number}" + + def __repr__(self): + return f"" + + def __eq__(self, other) -> bool: + return \ + self.DeviceType == other.DeviceType and \ + self.Handle == other.Handle and \ + self.NumberOfClients == other.NumberOfClients and \ + self.MaxAllowedClients == other.MaxAllowedClients and \ + self.FirmwareMajor == other.FirmwareMajor and \ + self.FirmwareMinor == other.FirmwareMinor and \ + self.Status == other.Status and \ + self.Options == other.Options and \ + self.pAvailWIFINetwork == other.pAvailWIFINetwork and \ + self.isEthernetDevice == other.isEthernetDevice and \ + self.hardwareRev == other.hardwareRev and \ + self.revReserved == other.revReserved and \ + self.tcpPort == other.tcpPort + + @property + def _Handle(self): + """Return the internal device handle from icsneoOpenDevice()""" + if self._handle is None: + raise RuntimeError("Handle isn't valid for {self}. Is the device open?") + ctypes.pythonapi.PyCapsule_GetPointer.restype = ctypes.c_void_p + ctypes.pythonapi.PyCapsule_GetPointer.argtypes = [ctypes.py_object, ctypes.c_char_p] + return ctypes.pythonapi.PyCapsule_GetPointer(self._handle, None) + + @property + def Name(self) -> str: + """Return the internal device name from python_ics""" + return self._name.rstrip() + + @property + def DeviceType(self) -> int: + """Return the DeviceType from the internal NeoDevice object.""" + return self.neoDevice.DeviceType + + @property + def Handle(self): + """Return the Handle from the internal NeoDevice object.""" + return self.neoDevice.Handle + + @property + def NumberOfClients(self) -> int: + """Return the NumberOfClients from the internal NeoDevice object.""" + return self.neoDevice.NumberOfClients + + @property + def MaxAllowedClients(self) -> int: + """Return the MaxAllowedClients from the internal NeoDevice object.""" + return self.neoDevice.MaxAllowedClients + + @property + def SerialNumber(self) -> int: + """Return the SerialNumber from the internal NeoDevice object.""" + return self.neoDevice.SerialNumber + + @property + def serial_number(self) -> str: + """Return the serial number as a string.""" + # SerialNumber is an int32_t in the NeoDevice struct, so serials + # above 0x7FFFFFFF ("ZIK0ZK".."ZZZZZZ") read back negative. + serial = self.SerialNumber & 0xFFFFFFFF + if serial < ics.MIN_BASE36_SERIAL: + return str(serial) + elif serial <= ics.MAX_SERIAL: + return ics.base36enc(serial) + else: + raise ValueError(f"Failed to convert SerialNumber {serial} to a valid serial number.") + + @property + def AutoHandleClose(self) -> bool: + """Return the AutoHandleClose from the internal NeoDevice object.""" + return self._auto_handle_close + + def open(self, *args, **kwargs): + """Open the device. Returns a reference to Self on open. See ics.open_device for details on arguments.""" + return ics.open_device(self, *args, **kwargs) + + def close(self): + """Close the device. Returns the number of errors on close. See ics.close_device for details on arguments.""" + result = ics.close_device(self) + self._handle = None + return result + + def load_default_settings(self): + """Loads default settings on the device. Requires the device to be open. See ics.load_default_settings for details on arguments.""" + return ics.load_default_settings(self) + + + def transmit_messages(self, *args, **kwargs): + """Transmit messages on the device. Requires the device to be open. See ics.transmit_messages for details on arguments.""" + return ics.transmit_messages(self, *args, **kwargs) + + def get_messages(self, *args, **kwargs) -> Tuple[SpyMessage, int]: + """Get messages on the device. Requires the device to be open. See ics.get_messages for details on arguments.""" + return ics.get_messages(self, *args, **kwargs) + + def coremini_clear(self, *args, **kwargs): + "See ics.coremini_clear for details on arguments." + return ics.coremini_clear(self, *args, **kwargs) + + + def coremini_get_fblock_status(self, *args, **kwargs): + "See ics.coremini_get_fblock_status for details on arguments." + return ics.coremini_get_fblock_status(self, *args, **kwargs) + + + def coremini_get_status(self, *args, **kwargs): + "See ics.coremini_get_status for details on arguments." + return ics.coremini_get_status(self, *args, **kwargs) + + + def coremini_load(self, *args, **kwargs): + "See ics.coremini_load for details on arguments." + return ics.coremini_load(self, *args, **kwargs) + + + def coremini_read_app_signal(self, *args, **kwargs): + "See ics.coremini_read_app_signal for details on arguments." + return ics.coremini_read_app_signal(self, *args, **kwargs) + + + def coremini_read_rx_message(self, *args, **kwargs): + "See ics.coremini_read_rx_message for details on arguments." + return ics.coremini_read_rx_message(self, *args, **kwargs) + + + def coremini_read_tx_message(self, *args, **kwargs): + "See ics.coremini_read_tx_message for details on arguments." + return ics.coremini_read_tx_message(self, *args, **kwargs) + + + def coremini_start(self, *args, **kwargs): + "See ics.coremini_start for details on arguments." + return ics.coremini_start(self, *args, **kwargs) + + + def coremini_start_fblock(self, *args, **kwargs): + "See ics.coremini_start_fblock for details on arguments." + return ics.coremini_start_fblock(self, *args, **kwargs) + + + def coremini_stop(self, *args, **kwargs): + "See ics.coremini_stop for details on arguments." + return ics.coremini_stop(self, *args, **kwargs) + + + def coremini_stop_fblock(self, *args, **kwargs): + "See ics.coremini_stop_fblock for details on arguments." + return ics.coremini_stop_fblock(self, *args, **kwargs) + + + def coremini_write_app_signal(self, *args, **kwargs): + "See ics.coremini_write_app_signal for details on arguments." + return ics.coremini_write_app_signal(self, *args, **kwargs) + + + def coremini_write_rx_message(self, *args, **kwargs): + "See ics.coremini_write_rx_message for details on arguments." + return ics.coremini_write_rx_message(self, *args, **kwargs) + + + def coremini_write_tx_message(self, *args, **kwargs): + "See ics.coremini_write_tx_message for details on arguments." + return ics.coremini_write_tx_message(self, *args, **kwargs) + + + def create_neovi_radio_message(self, *args, **kwargs): + "See ics.create_neovi_radio_message for details on arguments." + return ics.create_neovi_radio_message(self, *args, **kwargs) + + + def disk_format(self, *args, **kwargs): + "See ics.disk_format for details on arguments." + return ics.disk_format(self, *args, **kwargs) + + + def disk_format_cancel(self, *args, **kwargs): + "See ics.disk_format_cancel for details on arguments." + return ics.disk_format_cancel(self, *args, **kwargs) + + + def enable_bus_voltage_monitor(self, *args, **kwargs): + "See ics.enable_bus_voltage_monitor for details on arguments." + return ics.enable_bus_voltage_monitor(self, *args, **kwargs) + + + def enable_doip_line(self, *args, **kwargs): + "See ics.enable_doip_line for details on arguments." + return ics.enable_doip_line(self, *args, **kwargs) + + + def enable_network_com(self, *args, **kwargs): + "See ics.enable_network_com for details on arguments." + return ics.enable_network_com(self, *args, **kwargs) + + def firmware_update_required(self, *args, **kwargs): + "See ics.firmware_update_required for details on arguments." + return ics.firmware_update_required(self, *args, **kwargs) + + + def flash_accessory_firmware(self, *args, **kwargs): + "See ics.flash_accessory_firmware for details on arguments." + return ics.flash_accessory_firmware(self, *args, **kwargs) + + + def force_firmware_update(self, *args, **kwargs): + "See ics.force_firmware_update for details on arguments." + return ics.force_firmware_update(self, *args, **kwargs) + + + def generic_api_get_status(self, *args, **kwargs): + "See ics.generic_api_get_status for details on arguments." + return ics.generic_api_get_status(self, *args, **kwargs) + + + def generic_api_read_data(self, *args, **kwargs): + "See ics.generic_api_read_data for details on arguments." + return ics.generic_api_read_data(self, *args, **kwargs) + + + def generic_api_send_command(self, *args, **kwargs): + "See ics.generic_api_send_command for details on arguments." + return ics.generic_api_send_command(self, *args, **kwargs) + + + def get_accessory_firmware_version(self, *args, **kwargs): + "See ics.get_accessory_firmware_version for details on arguments." + return ics.get_accessory_firmware_version(self, *args, **kwargs) + + + def get_active_vnet_channel(self, *args, **kwargs): + "See ics.get_active_vnet_channel for details on arguments." + return ics.get_active_vnet_channel(self, *args, **kwargs) + + + def get_all_chip_versions(self, *args, **kwargs): + "See ics.get_all_chip_versions for details on arguments." + return ics.get_all_chip_versions(self, *args, **kwargs) + + + def get_backup_power_enabled(self, *args, **kwargs): + "See ics.get_backup_power_enabled for details on arguments." + return ics.get_backup_power_enabled(self, *args, **kwargs) + + + def get_backup_power_ready(self, *args, **kwargs): + "See ics.get_backup_power_ready for details on arguments." + return ics.get_backup_power_ready(self, *args, **kwargs) + + + def get_bus_voltage(self, *args, **kwargs): + "See ics.get_bus_voltage for details on arguments." + return ics.get_bus_voltage(self, *args, **kwargs) + + + def get_device_settings(self, *args, **kwargs): + "See ics.get_device_settings for details on arguments." + return ics.get_device_settings(self, *args, **kwargs) + + + def get_device_status(self, *args, **kwargs): + "See ics.get_device_status for details on arguments." + return ics.get_device_status(self, *args, **kwargs) + + + def get_disk_details(self, *args, **kwargs): + "See ics.get_disk_details for details on arguments." + return ics.get_disk_details(self, *args, **kwargs) + + + def get_disk_format_progress(self, *args, **kwargs): + "See ics.get_disk_format_progress for details on arguments." + return ics.get_disk_format_progress(self, *args, **kwargs) + + + def get_dll_firmware_info(self, *args, **kwargs): + "See ics.get_dll_firmware_info for details on arguments." + return ics.get_dll_firmware_info(self, *args, **kwargs) + + + def get_error_messages(self, *args, **kwargs): + "See ics.get_error_messages for details on arguments." + return ics.get_error_messages(self, *args, **kwargs) + + + def get_gptp_status(self, *args, **kwargs): + "See ics.get_gptp_status for details on arguments." + return ics.get_gptp_status(self, *args, **kwargs) + + + def get_hw_firmware_info(self, *args, **kwargs): + "See ics.get_hw_firmware_info for details on arguments." + return ics.get_hw_firmware_info(self, *args, **kwargs) + + + def get_last_api_error(self, *args, **kwargs): + "See ics.get_last_api_error for details on arguments." + return ics.get_last_api_error(self, *args, **kwargs) + + + def get_pcb_serial_number(self, *args, **kwargs): + "See ics.get_pcb_serial_number for details on arguments." + return ics.get_pcb_serial_number(self, *args, **kwargs) + + + def get_performance_parameters(self, *args, **kwargs): + "See ics.get_performance_parameters for details on arguments." + return ics.get_performance_parameters(self, *args, **kwargs) + + + def get_rtc(self, *args, **kwargs): + "See ics.get_rtc for details on arguments." + return ics.get_rtc(self, *args, **kwargs) + + + def get_script_status(self, *args, **kwargs): + "See ics.get_script_status for details on arguments." + return ics.get_script_status(self, *args, **kwargs) + + + def get_serial_number(self, *args, **kwargs): + "See ics.get_serial_number for details on arguments." + return ics.get_serial_number(self, *args, **kwargs) + + + def get_timestamp_for_msg(self, *args, **kwargs): + "See ics.get_timestamp_for_msg for details on arguments." + return ics.get_timestamp_for_msg(self, *args, **kwargs) + + + def is_device_feature_supported(self, *args, **kwargs): + "See ics.is_device_feature_supported for details on arguments." + return ics.is_device_feature_supported(self, *args, **kwargs) + + + def iso15765_disable_networks(self, *args, **kwargs): + "See ics.iso15765_disable_networks for details on arguments." + return ics.iso15765_disable_networks(self, *args, **kwargs) + + + def iso15765_enable_networks(self, *args, **kwargs): + "See ics.iso15765_enable_networks for details on arguments." + return ics.iso15765_enable_networks(self, *args, **kwargs) + + + def iso15765_receive_message(self, *args, **kwargs): + "See ics.iso15765_receive_message for details on arguments." + return ics.iso15765_receive_message(self, *args, **kwargs) + + + def iso15765_transmit_message(self, *args, **kwargs): + "See ics.iso15765_transmit_message for details on arguments." + return ics.iso15765_transmit_message(self, *args, **kwargs) + + + def read_jupiter_firmware(self, *args, **kwargs): + "See ics.read_jupiter_firmware for details on arguments." + return ics.read_jupiter_firmware(self, *args, **kwargs) + + + def read_sdcard(self, *args, **kwargs): + "See ics.read_sdcard for details on arguments." + return ics.read_sdcard(self, *args, **kwargs) + + + def request_enter_sleep_mode(self, *args, **kwargs): + "See ics.request_enter_sleep_mode for details on arguments." + return ics.request_enter_sleep_mode(self, *args, **kwargs) + + + def set_active_vnet_channel(self, *args, **kwargs): + "See ics.set_active_vnet_channel for details on arguments." + return ics.set_active_vnet_channel(self, *args, **kwargs) + + + def set_backup_power_enabled(self, *args, **kwargs): + "See ics.set_backup_power_enabled for details on arguments." + return ics.set_backup_power_enabled(self, *args, **kwargs) + + + def set_bit_rate(self, *args, **kwargs): + "See ics.set_bit_rate for details on arguments." + return ics.set_bit_rate(self, *args, **kwargs) + + + def set_bit_rate_ex(self, *args, **kwargs): + "See ics.set_bit_rate_ex for details on arguments." + return ics.set_bit_rate_ex(self, *args, **kwargs) + + + def set_device_settings(self, *args, **kwargs): + "See ics.set_device_settings for details on arguments." + return ics.set_device_settings(self, *args, **kwargs) + + + def set_fd_bit_rate(self, *args, **kwargs): + "See ics.set_fd_bit_rate for details on arguments." + return ics.set_fd_bit_rate(self, *args, **kwargs) + + + def set_led_property(self, *args, **kwargs): + "See ics.set_led_property for details on arguments." + return ics.set_led_property(self, *args, **kwargs) + + def set_rtc(self, *args, **kwargs): + "See ics.set_rtc for details on arguments." + return ics.set_rtc(self, *args, **kwargs) + + + def start_dhcp_server(self, *args, **kwargs): + "See ics.start_dhcp_server for details on arguments." + return ics.start_dhcp_server(self, *args, **kwargs) + + + def stop_dhcp_server(self, *args, **kwargs): + "See ics.stop_dhcp_server for details on arguments." + return ics.stop_dhcp_server(self, *args, **kwargs) + + + def uart_get_baudrate(self, *args, **kwargs): + "See ics.uart_get_baudrate for details on arguments." + return ics.uart_get_baudrate(self, *args, **kwargs) + + + def uart_read(self, *args, **kwargs): + "See ics.uart_read for details on arguments." + return ics.uart_read(self, *args, **kwargs) + + + def uart_set_baudrate(self, *args, **kwargs): + "See ics.uart_set_baudrate for details on arguments." + return ics.uart_set_baudrate(self, *args, **kwargs) + + + def uart_write(self, *args, **kwargs): + "See ics.uart_write for details on arguments." + return ics.uart_write(self, *args, **kwargs) + + + def validate_hobject(self, *args, **kwargs): + "See ics.validate_hobject for details on arguments." + return ics.validate_hobject(self, *args, **kwargs) + + + def wbms_manager_reset(self, *args, **kwargs): + "See ics.wbms_manager_reset for details on arguments." + return ics.wbms_manager_reset(self, *args, **kwargs) + + + def wbms_manager_write_lock(self, *args, **kwargs): + "See ics.wbms_manager_write_lock for details on arguments." + return ics.wbms_manager_write_lock(self, *args, **kwargs) + + + def write_jupiter_firmware(self, *args, **kwargs): + "See ics.write_jupiter_firmware for details on arguments." + return ics.write_jupiter_firmware(self, *args, **kwargs) + + + def write_sdcard(self, *args, **kwargs): + "See ics.write_sdcard for details on arguments." + return ics.write_sdcard(self, *args, **kwargs) + + def set_safe_boot_mode(self, *args, **kwargs): + "See ics.set_safe_boot_mode for details on arguments." + return ics.set_safe_boot_mode(self, *args, **kwargs) + + def flash_devices(self, *args, **kwargs): + "See ics.flash_devices for details on arguments. This is an internal intrepid function only." + return ics.flash_device(self, *args, **kwargs) + + def get_device_name(self, *args, **kwargs): + "see ics.get_device_name for details on arguments." + return ics.get_device_name(self, *args, **kwargs) + + def get_imei(self, *args, **kwargs): + "see ics.get_imei for details on arguments." + return ics.get_imei(self, *args, **kwargs) + + def get_component_versions(self, *args, **kwargs): + "see ics.get_component_versions for details on arguments." + return ics.get_component_versions(self, *args, **kwargs) + + def request_set_neovi_miscio(self, *args, **kwargs): + "see ics.request_set_neovi_miscio for details on arguments." + return ics.request_set_neovi_miscio(self, *args, **kwargs) + + def get_firmware_variant(self, *args, **kwargs): + "see ics.get_firmware_variant for details on arguments." + return ics.get_firmware_variant(self, *args, **kwargs) \ No newline at end of file diff --git a/src/icsdebug.py b/src/icsdebug.py new file mode 100644 index 000000000..af6a55819 --- /dev/null +++ b/src/icsdebug.py @@ -0,0 +1,43 @@ +import os + +input(os.getpid()) + +import ics +import struct + +ics.override_library_name(r"C:\dev\vspy3\Binaries\win64\icsneo40.dll") + +CHIP_IDs = { + 82: "FIRE3_ZCHIP_ID", + 109: "NEOVI_FIRE3_LINUX_ID", + 121: "NEOVI_CONNECT_ZCHIP_ID", + 126: "NEOVI_FIRE3_LINUX_ID", +} + +def dot_version(version: int) -> str: + version = '.'.join(str(x) for x in struct.unpack("4B", version.to_bytes(4, byteorder='big'))) + return version.lstrip('0.') + +def linux_state(component_info: int) -> str: + match component_info: + case 1: + return "SD Card/MMC Partition 2" + case 2: + return "SD Card/MMC Partition 3" + case 3: + return "RAM" + case _: + return f"Unknown {component_info}" + +d = ics.open_device() +print(str(d)) +versions = d.get_component_versions() +for version in versions: + print(f"\t{version.valid}") + print(f"\t{version.expansionSlot}") + print(f"\t{version.componentInfo}: {linux_state(version.componentInfo)}") + print(f"\t{version.reserved}") + print(f"\t{version.identifier}: {CHIP_IDs[version.identifier]}") + print(f"\t{version.dotVersion}: {dot_version(version.dotVersion)}") + print(f"\t{version.commitHash}") + print() diff --git a/src/main.cpp b/src/main.cpp index 6a52a1ac9..f9897c398 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,4 +1,4 @@ - +#include #include #include #include "defines.h" @@ -6,99 +6,91 @@ #include "methods.h" #include "exceptions.h" #include "object_spy_message.h" -#include "object_neo_device.h" -#define _DOC_ICS_MODULE \ - "Python C Code module for interfacing to the icsneo40 dynamic library. Code tries\n" \ - "to respect PEP 8 (http://python.org/dev/peps/pep-0008). Function naming convention does\n" \ - "not follow the tradition c style icsneo40 naming convention as pyics module\n" \ - "name acts as the namespace (icsneo portion of the function) and function names\n" \ - "are suppose to be lowercase with underscores instead of mixedCase like icsneo API.\n" \ - "\n" \ - "C API can be mimiced almost identically by doing the following:\n" \ - "\t>>> import ics as icsneo\n" \ - "\t>>> devices = icsneo.FindNeoDevices()\n" \ - "\t>>> for device in devices:\n" \ - "\t... print(device.Name, device.SerialNumber)\n" \ - "\t...\n" \ - "\tneoVI FIRE 59886\n" \ - "\n" \ - "Recommended `Python` way by doing the following:\n" \ - "\t>>> import ics\n" \ - "\t>>> devices = ics.find_devices()\n" \ - "\t>>> for device in devices:\n" \ - "\t... print(device.Name, device.SerialNumber)\n" \ - "\t...\n" \ - "\tneoVI FIRE 59886\n" \ - "\n" \ - "It should be noted that :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "` is used a little bit differently than the C API.\n" \ - ":class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "` contains two extra members:\n" \ - ":class:`" MODULE_NAME"." NEO_DEVICE_OBJECT_NAME ".AutoHandleClose` and :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "._Handle`\n\n" \ - "The handle normally returned from `icsneoOpenNeoDevice()` is stored inside _Handle and setting AutoHandleClose to True (Default)\n" \ - "will automatically close the handle when the :class:`" MODULE_NAME "." NEO_DEVICE_OBJECT_NAME "` goes out of scope.\n" \ - "\n" \ - "\n" \ - "Installation:\n" \ - "\n" \ - "\tpip install python_ics\n" \ - "\n" \ +#define _DOC_ICS_MODULE \ + "Python C Code module for interfacing to the icsneo40 dynamic library. Code tries\n" \ + "to respect PEP 8 (http://python.org/dev/peps/pep-0008). Function naming convention does\n" \ + "not follow the tradition c style icsneo40 naming convention as the python_ics module\n" \ + "name acts as the namespace (icsneo portion of the function) and function names\n" \ + "are suppose to be lowercase with underscores instead of mixedCase like the icsneo API.\n" \ + "\n" \ + "C API can be mimiced almost identically by doing the following:\n" \ + "\t>>> import ics as icsneo\n" \ + "\t>>> devices = icsneo.FindNeoDevices()\n" \ + "\t>>> for device in devices:\n" \ + "\t... print(device)\n" \ + "\t...\n" \ + "\tneoVI FIRE 59886\n" \ + "\n" \ + "Recommended `Python` way by doing the following:\n" \ + "\t>>> import ics\n" \ + "\t>>> devices = ics.find_devices()\n" \ + "\t>>> for device in devices:\n" \ + "\t... print(device)\n" \ + "\t...\n" \ + "\tneoVI FIRE 59886\n" \ + "\n" \ + "It should be noted that :class:`" MODULE_NAME ".PyNeoDeviceEx`" \ + " is used a little bit differently than the C API.\n" \ + ":class:`" MODULE_NAME ".PyNeoDeviceEx` contains two extra members:\n" \ + ":class:`" MODULE_NAME ".PyNeoDeviceEx.AutoHandleClose` and :class:`" MODULE_NAME ".PyNeoDeviceEx._Handle`\n\n" \ + "The handle normally returned from `icsneoOpenNeoDevice()` is stored inside _Handle and setting AutoHandleClose " \ + "to True (Default)\n" \ + "will automatically close the handle when the :class:`" MODULE_NAME ".PyNeoDeviceEx" \ + "` goes out of scope.\n" \ + "\n" \ + "\n" \ + "Installation:\n" \ + "\n" \ + "\tpip install python_ics\n" \ + "\n" \ "https://pypi.python.org/pypi/python-ics\n" - -#if PY_MAJOR_VERSION >= 3 static PyModuleDef IcsModule = { - PyModuleDef_HEAD_INIT, - MODULE_NAME, - _DOC_ICS_MODULE, - -1, - IcsMethods, - NULL, - NULL, - NULL, - NULL + PyModuleDef_HEAD_INIT, MODULE_NAME, _DOC_ICS_MODULE, -1, IcsMethods, NULL, NULL, NULL, NULL }; -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#if PY_MAJOR_VERSION >= 3 -PyMODINIT_FUNC PyInit_ics(void) +void initialize_ics_library() { +#if (defined(_WIN32) || defined(__WIN32__)) + // Everything besides windows uses libicsneo + constexpr char LIBRARY_NAME[] = "icsneo40"; #else -void initics(void) + constexpr char LIBRARY_NAME[] = "icsneolegacy"; #endif + auto& mgr = ice::LibraryManager::instance(); + const auto& library_name = ice::LibraryName(LIBRARY_NAME); + mgr.add("ics", library_name.build(), true); +} + +#ifdef __cplusplus +extern "C" { -#if PY_MAJOR_VERSION >= 3 - PyObject* module = PyModule_Create(&IcsModule); -#else - PyObject* module = Py_InitModule3(MODULE_NAME, IcsMethods, _DOC_ICS_MODULE); -#endif - if (!module) { -#if PY_MAJOR_VERSION >= 3 - return module; -#else - return; #endif - } - PyDateTime_IMPORT; - // Add build constant variables - setup_module_defines(module); - setup_module_auto_defines(module); + PyMODINIT_FUNC PyInit_ics(void) + { + PyObject* module = PyModule_Create(&IcsModule); + if (!module) { + return module; + } + PyDateTime_IMPORT; - initialize_exceptions(module); + initialize_ics_library(); - // These were a WIP, as you get towards the bottom the code structure is simplier. - setup_neo_device_object(module); - setup_spy_message_object(module); - -#if PY_MAJOR_VERSION >= 3 - return module; -#else - return; +#ifdef Py_GIL_DISABLED + // Enable the experimental free threaded introduced in 3.13 + PyUnstable_Module_SetGIL(module, Py_MOD_GIL_NOT_USED); #endif -} + // Add build constant variables + setup_module_defines(module); + setup_module_auto_defines(module); + + initialize_exceptions(module); + + setup_spy_message_object(module); + + return module; + } #ifdef __cplusplus } diff --git a/src/methods.cpp b/src/methods.cpp index ed2921853..1fde87fd8 100644 --- a/src/methods.cpp +++ b/src/methods.cpp @@ -3,29 +3,55 @@ #include "dll.h" #include "defines.h" #ifndef USING_STUDIO_8 - #define USING_STUDIO_8 1 +#define USING_STUDIO_8 1 #endif +#pragma warning(push, 0) #include #ifdef _USE_INTERNAL_HEADER_ #include #endif +#pragma warning(pop) #include #include "object_spy_message.h" -#include "object_neo_device.h" #include "setup_module_auto_defines.h" +#include #include +#include +#include + +// This class allows RAII of the python GIL. This is a C++ replacement of +// Py_BEGIN_ALLOW_THREADS / Py_END_ALLOW_THREADS +class PyAllowThreads +{ + PyThreadState* _save = nullptr; + + public: + // Save the thread state and Release the GIL + PyAllowThreads() { _save = PyEval_SaveThread(); } + // Restore the thread state and Acquire the GIL + virtual ~PyAllowThreads() { restore(); } + + // Restore the thread and GIL state, this is safe to call multiple times. + void restore() + { + if (_save) { + PyEval_RestoreThread(_save); + } + _save = nullptr; + } +}; extern PyTypeObject spy_message_object_type; // __func__, __FUNCTION__ and __PRETTY_FUNCTION__ are not preprocessor macros. // but MSVC doesn't follow c standard and treats __FUNCTION__ as a string literal macro... #ifdef _MSC_VER -#define arg_parse(a,f) a f +#define arg_parse(a, f) a f #else const char* arg_parse(const char* args, const char* func) { static char buffer[128]; - memset(buffer, '\0', sizeof(buffer)/sizeof(buffer[0])); + memset(buffer, '\0', sizeof(buffer) / sizeof(buffer[0])); strcpy(buffer, args); strcat(buffer, func); return (const char*)buffer; @@ -33,14 +59,14 @@ const char* arg_parse(const char* args, const char* func) #endif #ifndef _USE_INTERNAL_HEADER_ -typedef struct -{ - unsigned char sec; // --- Seconds (00-59) - unsigned char min; // --- (00-59) - unsigned char hour; // --- (00-23) - unsigned char day; // --- (01-31) - unsigned char month; // --- (01-12) - unsigned char year; // --- (00-99) +typedef struct +{ + unsigned char sec; // --- Seconds (00-59) + unsigned char min; // --- (00-59) + unsigned char hour; // --- (00-23) + unsigned char day; // --- (01-31) + unsigned char month; // --- (01-12) + unsigned char year; // --- (00-99) } icsSpyTime; #endif @@ -58,94 +84,709 @@ typedef struct #endif #endif -// Internal function -char* neodevice_to_string(unsigned long type) -{ - switch (type) { - case NEODEVICE_UNKNOWN: return "Unknown"; - case NEODEVICE_BLUE: return "neoVI BLUE"; - case NEODEVICE_ECU_AVB: return "neoECU AVB/TSN"; - case NEODEVICE_RADSUPERMOON: return "RAD-Supermoon"; - case NEODEVICE_DW_VCAN: return "ValueCAN DW"; - case NEODEVICE_RADMOON2: return "RAD-Moon 2"; - case NEODEVICE_RADGIGALOG: return "RAD-Gigalog"; - case NEODEVICE_VCAN41: return "ValueCAN 4-1"; - case NEODEVICE_FIRE: return "neoVI FIRE"; - case NEODEVICE_RADPLUTO: return "RAD-Pluto"; - case NEODEVICE_VCAN42_EL: return "ValueCAN 4-2EL"; - case NEODEVICE_RADIO_CANHUB: return "neoRAD-IO2-CANHUB"; -#if defined(NEODEVICE_OBD2_LCBADGE) - case NEODEVICE_OBD2_LCBADGE: return "neoOBD2-LC BADGE"; -#endif - case NEODEVICE_RAD_MOON_DUO: return "RAD-Moon Duo"; - case NEODEVICE_VCAN3: return "ValueCAN 3"; -#if defined(NEODEVICE_ONYX) - case NEODEVICE_ONYX: return "neoVI FIRE 3"; +#pragma warning(push) +// warning C4191: 'type cast': unsafe conversion from 'PyObject *(__cdecl *)(PyObject *,PyObject *,PyObject *)' +// to 'PyCFunction' Making a function call using the resulting pointer may cause your program to fail +#pragma warning(disable : 4191) +PyMethodDef IcsMethods[] = { + _EZ_ICS_STRUCT_METHOD("find_devices", + "icsneoFindNeoDevices", + "FindNeoDevices", + meth_find_devices, + METH_VARARGS | METH_KEYWORDS, + _DOC_FIND_DEVICES), + _EZ_ICS_STRUCT_METHOD("open_device", + "icsneoOpenNeoDevice", + "OpenNeoDevice", + meth_open_device, + METH_VARARGS | METH_KEYWORDS, + _DOC_OPEN_DEVICES), + _EZ_ICS_STRUCT_METHOD("close_device", + "icsneoClosePort", + "ClosePort", + meth_close_device, + METH_VARARGS, + _DOC_CLOSE_DEVICES), + _EZ_ICS_STRUCT_METHOD("get_rtc", "icsneoGetRTC", "GetRTC", meth_get_rtc, METH_VARARGS, _DOC_GET_RTC), + _EZ_ICS_STRUCT_METHOD("set_rtc", "icsneoSetRTC", "SetRTC", meth_set_rtc, METH_VARARGS, _DOC_SET_RTC), + _EZ_ICS_STRUCT_METHOD("coremini_load", + "icsneoScriptLoad", + "ScriptLoad", + meth_coremini_load, + METH_VARARGS, + _DOC_COREMINI_LOAD), + _EZ_ICS_STRUCT_METHOD("coremini_start", + "icsneoScriptStart", + "ScriptStart", + meth_coremini_start, + METH_VARARGS, + _DOC_COREMINI_START), + _EZ_ICS_STRUCT_METHOD("coremini_stop", + "icsneoScriptStop", + "ScriptStop", + meth_coremini_stop, + METH_VARARGS, + _DOC_COREMINI_STOP), + _EZ_ICS_STRUCT_METHOD("coremini_clear", + "icsneoScriptClear", + "ScriptClear", + meth_coremini_clear, + METH_VARARGS, + _DOC_COREMINI_CLEAR), + _EZ_ICS_STRUCT_METHOD("coremini_get_status", + "icsneoScriptGetScriptStatus", + "ScriptGetScriptStatus", + meth_coremini_get_status, + METH_VARARGS, + _DOC_COREMINI_GET_STATUS), + _EZ_ICS_STRUCT_METHOD("transmit_messages", + "icsneoTxMessages", + "TxMessages", + meth_transmit_messages, + METH_VARARGS, + _DOC_TRANSMIT_MESSAGES), + _EZ_ICS_STRUCT_METHOD("get_messages", + "icsneoGetMessages", + "GetMessages", + meth_get_messages, + METH_VARARGS, + _DOC_GET_MESSAGES), + _EZ_ICS_STRUCT_METHOD("get_script_status", + "icsneoScriptGetScriptStatusEx", + "ScriptGetScriptStatusEx", + meth_get_script_status, + METH_VARARGS, + "Accepts a PyNeoDeviceEx" + ", exception on error. Returns a list of values of what ulParameters would hold"), + _EZ_ICS_STRUCT_METHOD("get_error_messages", + "icsneoGetErrorMessages", + "GetErrorMessages", + meth_get_error_messages, + METH_VARARGS, + _DOC_GET_ERROR_MESSAGES), +#ifdef _USE_INTERNAL_HEADER_ + _EZ_ICS_STRUCT_METHOD("flash_devices", + "FlashDevice2", + "FlashDevice2", + meth_flash_devices, + METH_VARARGS, + "int _stdcall FlashDevice2()"), #endif - case NEODEVICE_FIRE3: return "neoVI FIRE 3"; -#if defined(NEODEVICE_JUPITER) - case NEODEVICE_JUPITER: return "RAD-Jupiter"; -#elif defined(NEODEVICE_RADJUPITER) - case NEODEVICE_RADJUPITER: return "RAD-Jupiter"; + _EZ_ICS_STRUCT_METHOD("set_reflash_callback", + "icsneoSetReflashDisplayCallbacks", + "SetReflashDisplayCallback", + meth_set_reflash_callback, + METH_VARARGS, + _DOC_SET_REFLASH_CALLBACK), + _EZ_ICS_STRUCT_METHOD("get_device_settings", + "icsneoGetDeviceSettings", + "GetDeviceSettings", + meth_get_device_settings, + METH_VARARGS, + _DOC_GET_DEVICE_SETTINGS), + _EZ_ICS_STRUCT_METHOD("set_device_settings", + "icsneoSetDeviceSettings", + "SetDeviceSettings", + meth_set_device_settings, + METH_VARARGS, + _DOC_SET_DEVICE_SETTINGS), + _EZ_ICS_STRUCT_METHOD("load_default_settings", + "icsneoLoadDefaultSettings", + "LoadDefaultSettings", + meth_load_default_settings, + METH_VARARGS, + _DOC_LOAD_DEFAULT_SETTINGS), + //_EZ_ICS_STRUCT_METHOD("spy_message_to_j1850", METH_spy_message_to_j1850, METH_VARARGS, "Accepts a " + // MODULE_NAME + //"." + // SPY_MESSAGE_OBJECT_NAME ", and returns a " MODULE_NAME "." SPY_MESSAGE_J1850_OBJECT_NAME ". Exception on + // error."), + _EZ_ICS_STRUCT_METHOD("read_sdcard", + "icsneoReadSDCard", + "ReadSDCard", + meth_read_sdcard, + METH_VARARGS, + "icsneoReadSDCard(), Accepts a PyNeoDeviceEx" + " and sector index. Returns a bytearray of 512 bytes max. Exception on error."), + _EZ_ICS_STRUCT_METHOD("write_sdcard", + "icsneoWriteSDCard", + "WriteSDCard", + meth_write_sdcard, + METH_VARARGS, + "icsneoReadSDCard(), Accepts a PyNeoDeviceEx" + ", sector index, and a bytearray of 512 bytes. Exception on error."), + { "create_neovi_radio_message", + (PyCFunction)meth_create_neovi_radio_message, + METH_VARARGS | METH_KEYWORDS, + _DOC_CREATE_NEOVI_RADIO_MESSAGE }, + _EZ_ICS_STRUCT_METHOD("coremini_start_fblock", + "icsneoScriptStartFBlock", + "ScriptStartFBlock", + meth_coremini_start_fblock, + METH_VARARGS, + _DOC_COREMINI_START_FBLOCK), + _EZ_ICS_STRUCT_METHOD("coremini_stop_fblock", + "icsneoScriptStopFBlock", + "ScriptStopFBlock", + meth_coremini_stop_fblock, + METH_VARARGS, + _DOC_COREMINI_STOP_FBLOCK), + _EZ_ICS_STRUCT_METHOD("coremini_get_fblock_status", + "icsneoScriptGetFBlockStatus", + "ScriptGetFBlockStatus", + meth_coremini_get_fblock_status, + METH_VARARGS, + _DOC_COREMINI_GET_FBLOCK_STATUS), + _EZ_ICS_STRUCT_METHOD("coremini_read_app_signal", + "icsneoScriptReadAppSignal", + "ScriptReadAppSignal", + meth_coremini_read_app_signal, + METH_VARARGS, + _DOC_COREMINI_READ_APP_SIGNAL), + _EZ_ICS_STRUCT_METHOD("coremini_write_app_signal", + "icsneoScriptWriteAppSignal", + "ScriptWriteAppSignal", + meth_coremini_write_app_signal, + METH_VARARGS, + _DOC_COREMINI_WRITE_APP_SIGNAL), + _EZ_ICS_STRUCT_METHOD("coremini_read_tx_message", + "icsneoScriptReadTxMessage", + "ScriptReadTxMessage", + meth_coremini_read_tx_message, + METH_VARARGS, + _DOC_COREMINI_READ_TX_MESSAGE), + _EZ_ICS_STRUCT_METHOD("coremini_read_rx_message", + "icsneoScriptReadRxMessage", + "ScriptReadRxMessage", + meth_coremini_read_rx_message, + METH_VARARGS, + _DOC_COREMINI_READ_RX_MESSAGE), + _EZ_ICS_STRUCT_METHOD("coremini_write_tx_message", + "icsneoScriptWriteTxMessage", + "ScriptWriteTxMessage", + meth_coremini_write_tx_message, + METH_VARARGS, + _DOC_COREMINI_WRITE_TX_MESSAGE), + _EZ_ICS_STRUCT_METHOD("coremini_write_rx_message", + "icsneoScriptWriteRxMessage", + "ScriptWriteRxMessage", + meth_coremini_write_rx_message, + METH_VARARGS, + _DOC_COREMINI_WRITE_RX_MESSAGE), + _EZ_ICS_STRUCT_METHOD("get_performance_parameters", + "icsneoGetPerformanceParameters", + "GetPerformanceParameters", + meth_get_performance_parameters, + METH_VARARGS, + _DOC_GET_PERFORMANCE_PARAMETERS), + _EZ_ICS_STRUCT_METHOD("validate_hobject", + "icsneoValidateHObject", + "ValidateHObject", + meth_validate_hobject, + METH_VARARGS, + _DOC_VALIDATE_HOBJECT), + _EZ_ICS_STRUCT_METHOD("get_last_api_error", + "icsneoGetLastAPIError", + "GetLastAPIError", + meth_get_last_api_error, + METH_VARARGS, + _DOC_GET_LAST_API_ERROR), + _EZ_ICS_STRUCT_METHOD("get_dll_version", + "icsneoGetDLLVersion", + "GetDLLVersion", + meth_get_dll_version, + METH_NOARGS, + _DOC_GET_DLL_VERSION), + _EZ_ICS_STRUCT_METHOD("get_serial_number", + "icsneoGetSerialNumber", + "GetSerialNumber", + meth_get_serial_number, + METH_VARARGS, + _DOC_GET_SERIAL_NUMBER), + _EZ_ICS_STRUCT_METHOD("get_hw_firmware_info", + "icsneoGetHWFirmwareInfo", + "GetHWFirmwareInfo", + meth_get_hw_firmware_info, + METH_VARARGS, + _DOC_GET_HW_FIRMWARE_INFO), + _EZ_ICS_STRUCT_METHOD("request_enter_sleep_mode", + "icsneoRequestEnterSleepMode", + "RequestEnterSleepMode", + meth_request_enter_sleep_mode, + METH_VARARGS, + _DOC_REQUEST_ENTER_SLEEP_MODE), + { "base36enc", (PyCFunction)meth_base36enc, METH_VARARGS | METH_KEYWORDS, _DOC_BASE36ENC }, + _EZ_ICS_STRUCT_METHOD("set_context", + "icsneoSetContext", + "SetContext", + meth_set_context, + METH_VARARGS, + _DOC_SET_CONTEXT), + _EZ_ICS_STRUCT_METHOD("force_firmware_update", + "icsneoForceFirmwareUpdate", + "ForceFirmwareUpdate", + meth_force_firmware_update, + METH_VARARGS, + _DOC_FORCE_FIRMWARE_UPDATE), + _EZ_ICS_STRUCT_METHOD("firmware_update_required", + "icsneoFirmwareUpdateRequired", + "FirmwareUpdateRequired", + meth_firmware_update_required, + METH_VARARGS, + _DOC_FIRMWARE_UPDATE_REQUIRED), + _EZ_ICS_STRUCT_METHOD("get_dll_firmware_info", + "icsneoGetDLLFirmwareInfo", + "GetDLLFirmwareInfo", + meth_get_dll_firmware_info, + METH_VARARGS, + _DOC_GET_DLL_FIRMWARE_INFO), + _EZ_ICS_STRUCT_METHOD("get_backup_power_enabled", + "icsneoGetBackupPowerEnabled", + "GetBackupPowerEnabled", + meth_get_backup_power_enabled, + METH_VARARGS, + _DOC_GET_BACKUP_POWER_ENABLED), + _EZ_ICS_STRUCT_METHOD("set_backup_power_enabled", + "icsneoSetBackupPowerEnabled", + "SetBackupPowerEnabled", + meth_set_backup_power_enabled, + METH_VARARGS, + _DOC_SET_BACKUP_POWER_ENABLED), + _EZ_ICS_STRUCT_METHOD("get_backup_power_ready", + "icsneoGetBackupPowerReady", + "GetBackupPowerReady", + meth_get_backup_power_ready, + METH_VARARGS, + _DOC_GET_BACKUP_POWER_READY), +#ifdef _USE_INTERNAL_HEADER_ + _EZ_ICS_STRUCT_METHOD("load_readbin", + "icsneoScriptLoadReadBin", + "ScriptLoadReadBin", + meth_load_readbin, + METH_VARARGS, + _DOC_LOAD_READBIN), #endif - case NEODEVICE_VCAN4_IND: return "ValueCAN 4 Industrial"; - case NEODEVICE_GIGASTAR: return "RAD-Gigastar"; - case NEODEVICE_RED2: return "neoVI RED 2"; - case NEODEVICE_ECU22: return "neoECU22"; - case NEODEVICE_RED: return "neoVI RED"; - case NEODEVICE_ECU: return "neoECU"; - case NEODEVICE_IEVB: return "IEVB"; - case NEODEVICE_PENDANT: return "Pendant"; - case NEODEVICE_OBD2_PRO: return "neoOBD2 PRO"; - case NEODEVICE_ECUCHIP_UART: return "ECUCHIP"; - case NEODEVICE_PLASMA: return "neoVI PLASMA"; - case NEODEVICE_NEOANALOG: return "neoAnalog"; - case NEODEVICE_CT_OBD: return "neoOBD CT"; - case NEODEVICE_ION: return "neoVI ION"; - case NEODEVICE_RADSTAR: return "RAD-Star"; - case NEODEVICE_VCAN44: return "ValueCAN 4-4"; - case NEODEVICE_VCAN42: return "ValueCAN 4-2"; - case NEODEVICE_CMPROBE: return "CM Probe"; - case NEODEVICE_EEVB: return "EEVB"; - case NEODEVICE_VCANRF: return "ValueCAN.rf"; - case NEODEVICE_FIRE2: return "neoVI FIRE 2"; - case NEODEVICE_FLEX: return "neoVI FLEX"; - case NEODEVICE_RADGALAXY: return "RAD-Galaxy"; - case NEODEVICE_RADSTAR2: return "RAD-Star 2"; - case NEODEVICE_VIVIDCAN: return "VividCAN"; - case NEODEVICE_OBD2_SIM: return "neoOBD2 Sim"; - }; - return "Unknown"; + _EZ_ICS_STRUCT_METHOD("iso15765_transmit_message", + "icsneoISO15765_TransmitMessage", + "ISO15765_TransmitMessage", + meth_iso15765_transmit_message, + METH_VARARGS, + _DOC_ISO15765_TRANSMIT_MESSAGE), + _EZ_ICS_STRUCT_METHOD("iso15765_receive_message", + "icsneoISO15765_ReceiveMessage", + "ISO15765_ReceiveMessage", + meth_iso15765_receive_message, + METH_VARARGS, + _DOC_ISO15765_RECEIVE_MESSAGE), + _EZ_ICS_STRUCT_METHOD("iso15765_enable_networks", + "icsneoISO15765_EnableNetworks", + "ISO15765_EnableNetworks", + meth_iso15765_enable_networks, + METH_VARARGS, + _DOC_ISO15765_ENABLE_NETWORKS), + _EZ_ICS_STRUCT_METHOD("iso15765_disable_networks", + "icsneoISO15765_DisableNetworks", + "ISO15765_DisableNetworks", + meth_iso15765_disable_networks, + METH_VARARGS, + _DOC_ISO15765_DISABLE_NETWORKS), + + _EZ_ICS_STRUCT_METHOD("get_active_vnet_channel", + "icsneoGetActiveVNETChannel", + "GetActiveVNETChannel", + meth_get_active_vnet_channel, + METH_VARARGS, + _DOC_GET_ACTIVE_VNET_CHANNEL), + _EZ_ICS_STRUCT_METHOD("set_active_vnet_channel", + "icsneoSetActiveVNETChannel", + "SetActiveVNETChannel", + meth_set_active_vnet_channel, + METH_VARARGS, + _DOC_SET_ACTIVE_VNET_CHANNEL), + _EZ_ICS_STRUCT_METHOD("set_bit_rate", + "icsneoSetBitRate", + "SetBitRate", + meth_set_bit_rate, + METH_VARARGS, + _DOC_SET_BIT_RATE), + _EZ_ICS_STRUCT_METHOD("set_fd_bit_rate", + "icsneoSetFDBitRate", + "SetFDBitRate", + meth_set_fd_bit_rate, + METH_VARARGS, + _DOC_SET_FD_BIT_RATE), + _EZ_ICS_STRUCT_METHOD("set_bit_rate_ex", + "icsneoSetBitRateEx", + "SetBitRateEx", + meth_set_bit_rate_ex, + METH_VARARGS, + _DOC_SET_BIT_RATE_EX), + _EZ_ICS_STRUCT_METHOD("get_timestamp_for_msg", + "icsneoGetTimeStampForMsg", + "GetTimeStampForMsg", + meth_get_timestamp_for_msg, + METH_VARARGS, + _DOC_GET_TIMESTAMP_FOR_MSG), + _EZ_ICS_STRUCT_METHOD("get_device_status", + "icsneoGetDeviceStatus", + "GetDeviceStatus", + meth_get_device_status, + METH_VARARGS, + _DOC_GET_DEVICE_STATUS), + + _EZ_ICS_STRUCT_METHOD("enable_network_com", + "icsneoEnableNetworkCom", + "EnableNetworkCom", + meth_enable_network_com, + METH_VARARGS, + _DOC_ENABLE_NETWORK_COM), + + _EZ_ICS_STRUCT_METHOD("enable_bus_voltage_monitor", + "icsneoEnableBusVoltageMonitor", + "EnableBusVoltageMonitor", + meth_enable_bus_voltage_monitor, + METH_VARARGS, + _DOC_ENABLE_BUS_VOLTAGE_MONITOR), + _EZ_ICS_STRUCT_METHOD("get_bus_voltage", + "icsneoGetBusVoltage", + "GetBusVoltage", + meth_get_bus_voltage, + METH_VARARGS, + _DOC_GET_BUS_VOLTAGE), + + _EZ_ICS_STRUCT_METHOD("read_jupiter_firmware", + "icsneoReadJupiterFirmware", + "ReadJupiterFirmware", + meth_read_jupiter_firmware, + METH_VARARGS, + _DOC_READ_JUPITER_FIRMWARE), + _EZ_ICS_STRUCT_METHOD("write_jupiter_firmware", + "icsneoWriteJupiterFirmware", + "WriteJupiterFirmware", + meth_write_jupiter_firmware, + METH_VARARGS, + _DOC_WRITE_JUPITER_FIRMWARE), + + _EZ_ICS_STRUCT_METHOD("get_disk_details", + "icsneoRequestDiskDetails", + "RequestDiskDetails", + meth_get_disk_details, + METH_VARARGS, + _DOC_GET_DISK_DETAILS), + _EZ_ICS_STRUCT_METHOD("disk_format", + "icsneoRequestDiskFormat", + "RequestDiskFormat", + meth_disk_format, + METH_VARARGS, + _DOC_DISK_FORMAT), + _EZ_ICS_STRUCT_METHOD("disk_format_cancel", + "icsneoRequestDiskFormatCancel", + "RequestDiskFormatCancel", + meth_disk_format_cancel, + METH_VARARGS, + _DOC_DISK_FORMAT_CANCEL), + _EZ_ICS_STRUCT_METHOD("get_disk_format_progress", + "icsneoRequestDiskFormatProgress", + "RequestDiskFormatProgress", + meth_get_disk_format_progress, + METH_VARARGS, + _DOC_DISK_FORMAT_PROGRESS), + _EZ_ICS_STRUCT_METHOD("enable_doip_line", + "icsneoEnableDOIPLine", + "EnableDOIPLine", + meth_enable_doip_line, + METH_VARARGS, + _DOC_ENABLE_DOIP_LINE), + _EZ_ICS_STRUCT_METHOD("is_device_feature_supported", + "icsneoIsDeviceFeatureSupported", + "IsDeviceFeatureSupported", + meth_is_device_feature_supported, + METH_VARARGS, + _DOC_IS_DEVICE_FEATURE_SUPPORTED), + _EZ_ICS_STRUCT_METHOD("get_pcb_serial_number", + "icsneoGetPCBSerialNumber", + "GetPCBSerialNumber", + meth_get_pcb_serial_number, + METH_VARARGS, + _DOC_GET_PCB_SERIAL_NUMBER), + _EZ_ICS_STRUCT_METHOD("set_led_property", + "icsneoSetLedProperty", + "SetLedProperty", + meth_set_led_property, + METH_VARARGS, + _DOC_SET_LED_PROPERTY), + _EZ_ICS_STRUCT_METHOD("start_dhcp_server", + "icsneoStartDHCPServer", + "StartDHCPServer", + meth_start_dhcp_server, + METH_VARARGS, + _DOC_START_DHCP_SERVER), + _EZ_ICS_STRUCT_METHOD("stop_dhcp_server", + "icsneoStopDHCPServer", + "StopDHCPServer", + meth_stop_dhcp_server, + METH_VARARGS, + _DOC_STOP_DHCP_SERVER), + + _EZ_ICS_STRUCT_METHOD("wbms_manager_write_lock", + "icsneowBMSManagerWriteLock", + "wBMSManagerWriteLock", + meth_wbms_manager_write_lock, + METH_VARARGS, + _DOC_WBMS_MANAGER_WRITE_LOCK), + _EZ_ICS_STRUCT_METHOD("wbms_manager_reset", + "icsneowBMSManagerReset", + "wBMSManagerReset", + meth_wbms_manager_reset, + METH_VARARGS, + _DOC_WBMS_MANAGER_RESET), + _EZ_ICS_STRUCT_METHOD("uart_write", "icsneoUartWrite", "UartWrite", meth_uart_write, METH_VARARGS, _DOC_UART_WRITE), + _EZ_ICS_STRUCT_METHOD("uart_read", "icsneoUartRead", "UartRead", meth_uart_read, METH_VARARGS, _DOC_UART_READ), + _EZ_ICS_STRUCT_METHOD("uart_set_baudrate", + "icsneoUartSetBaudrate", + "UartSetBaudrate", + meth_uart_set_baudrate, + METH_VARARGS, + _DOC_UART_SET_BAUDRATE), + _EZ_ICS_STRUCT_METHOD("uart_get_baudrate", + "icsneoUartGetBaudrate", + "UartGetBaudrate", + meth_uart_get_baudrate, + METH_VARARGS, + _DOC_UART_GET_BAUDRATE), + _EZ_ICS_STRUCT_METHOD("generic_api_send_command", + "icsneoGenericAPISendCommand", + "GenericAPISendCommand", + meth_generic_api_send_command, + METH_VARARGS, + _DOC_GENERIC_API_SEND_COMMAND), + _EZ_ICS_STRUCT_METHOD("generic_api_read_data", + "icsneoGenericAPIReadData", + "GenericAPIReadData", + meth_generic_api_read_data, + METH_VARARGS, + _DOC_GENERIC_API_READ_DATA), + _EZ_ICS_STRUCT_METHOD("generic_api_get_status", + "icsneoGenericAPIGetStatus", + "GenericAPIGetStatus", + meth_generic_api_get_status, + METH_VARARGS, + _DOC_GENERIC_API_GET_STATUS), + _EZ_ICS_STRUCT_METHOD("get_gptp_status", + "icsneoGetGPTPStatus", + "GetGPTPStatus", + meth_get_gptp_status, + METH_VARARGS, + _DOC_GET_GPTP_STATUS), + _EZ_ICS_STRUCT_METHOD("get_all_chip_versions", + "icsneoGetAllChipVersions", + "GetAllChipVersions", + meth_get_all_chip_versions, + METH_VARARGS, + _DOC_GET_ALL_CHIP_VERSIONS), + + _EZ_ICS_STRUCT_METHOD("flash_accessory_firmware", + "icsneoFlashAccessoryFirmware", + "FlashAccessoryFirmware", + meth_flash_accessory_firmware, + METH_VARARGS, + _DOC_FLASH_ACCESSORY_FIRMWARE), + _EZ_ICS_STRUCT_METHOD("get_accessory_firmware_version", + "icsneoGetAccessoryFwVersion", + "GetAccessoryFwVersion", + meth_get_accessory_firmware_version, + METH_VARARGS, + _DOC_GET_ACCESSORY_FIRMWARE_VERSION), + _EZ_ICS_STRUCT_METHOD("set_safe_boot_mode", + "icsneoSetSafeBootMode", + "SetSafeBootMode", + meth_set_safe_boot_mode, + METH_VARARGS, + _DOC_SET_SAFE_BOOT_MODE), + _EZ_ICS_STRUCT_METHOD("get_device_name", + "icsneoGetDeviceName", + "GetDeviceName", + meth_get_device_name, + METH_VARARGS, + _DOC_GET_DEVICE_NAME), + _EZ_ICS_STRUCT_METHOD("get_imei", "icsneoGetIMEI", "GetIMEI", meth_get_imei, METH_VARARGS, _DOC_GET_IMEI), + _EZ_ICS_STRUCT_METHOD("get_component_versions", + "icsneoGetComponentVersions", + "GetComponentVersions", + meth_get_component_versions, + METH_VARARGS, + _DOC_GET_COMPONENT_VERSIONS), + _EZ_ICS_STRUCT_METHOD("request_set_neovi_miscio", + "icsneoRequestSetNeoVIMiscIO", + "RequestSetNeoVIMiscIO", + meth_request_set_neovi_miscio, + METH_VARARGS, + _DOC_REQUEST_SET_NEOVI_MISCIO), + _EZ_ICS_STRUCT_METHOD("get_firmware_variant", + "icsneoGetFirmwareVariant", + "GetFirmwareVariant", + meth_get_firmware_variant, + METH_VARARGS, + _DOC_GET_FIRMWARE_VARIANT), + + { "override_library_name", (PyCFunction)meth_override_library_name, METH_VARARGS, _DOC_OVERRIDE_LIBRARY_NAME }, + { "get_library_path", (PyCFunction)meth_get_library_path, METH_NOARGS, "" }, + + { NULL, NULL, 0, NULL } +}; + +#pragma warning(pop) + +// Internal function +// This function doesn't call any python methods and doesn't do anything with thread states or GIL +auto device_name_from_nde(NeoDeviceEx* nde) -> std::string +{ + if (!nde) { + return std::string("Bug: nde invalid!"); + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return std::string(dll_get_error(buffer)); + } + std::string name; + name.reserve(255); + name.resize(255); + // Get the struct + // int _stdcall icsneoGetDeviceName(const NeoDeviceEx* nde, char* name, const size_t length, const enum + // _EDevNameType devNameType) + ice::Function + icsneoGetDeviceName(lib, "icsneoGetDeviceName"); + if (auto length = + icsneoGetDeviceName(const_cast(nde), &name[0], name.capacity(), EDevNameTypeNoSerial); + length == 0) { + return std::string("icsneoGetDeviceName() Failed"); + } else { + name.resize(length, '\0'); + } + return name; + } catch (ice::Exception&) { + // Legacy support - we are assuming icsneoGetDeviceName isn't available here + // and suppressing ex error message. + switch (nde->neoDevice.DeviceType) { + case NEODEVICE_UNKNOWN: + return "Unknown"; + case NEODEVICE_BLUE_DEPRECATED: + return "neoVI BLUE"; + case NEODEVICE_DW_VCAN_DEPRECATED: + return "ValueCAN DW"; + case NEODEVICE_RADMOON2: + return "RAD-Moon 2"; + case NEODEVICE_VCAN41: + return "ValueCAN 4-1"; + case NEODEVICE_FIRE_DEPRECATED: + return "neoVI FIRE"; + case NEODEVICE_VCAN42_EL: + return "ValueCAN 4-2EL"; + case NEODEVICE_RADIO_CANHUB: + return "neoRAD-IO2-CANHUB"; + case NEODEVICE_NEOECU12: + return "neoECU12"; + case NEODEVICE_OBD2_LC: + return "neoOBD2-LC"; + case NEODEVICE_VCAN3_DEPRECATED: + return "ValueCAN 3"; + case NEODEVICE_FIRE3: + return "neoVI FIRE 3"; + case NEODEVICE_RADJUPITER: + return "RAD-Jupiter"; + case NEODEVICE_VCAN4_IND: + return "ValueCAN 4 Industrial"; + case NEODEVICE_GIGASTAR: + return "RAD-Gigastar"; + case NEODEVICE_RED2: + return "neoVI RED 2"; + case NEODEVICE_RAD_A2B: + return "RAD-A2B"; + case NEODEVICE_RADEPSILON: + return "RAD-Epsilon"; + case NEODEVICE_RADEPSILON_T: + return "RAD-EpsilonT"; + case NEODEVICE_RADEPSILON_EXPRESS: + return "RAD-Epsilon Express"; + case NEODEVICE_RADPROXIMA: + return "RAD-Proxima"; + case NEODEVICE_RAD_BMS: + return "RAD-wBMS"; + case NEODEVICE_RADMOON3: + return "RAD-Moon3"; + case NEODEVICE_RADCOMET: + return "RAD-Comet"; + case NEODEVICE_FIRE3_FLEXRAY: + return "neoVI FIRE 3 Flexray"; + case NEODEVICE_NEOVI_CONNECT: + return "neoVI CONNECT"; + case NEODEVICE_RADCOMET3: + return "RAD-COMET3"; + case NEODEVICE_RADMOONT1S: + return "RAD-MOON-T1S"; + case NEODEVICE_GIGASTAR2: + return "RAD-GigaStar2"; + case NEODEVICE_RED_DEPRECATED: + return "neoVI RED"; + case NEODEVICE_ECU_DEPRECATED: + return "neoECU"; + case NEODEVICE_PENDANT_DEPRECATED: + return "Pendant"; + case NEODEVICE_PLASMA: // also NEODEVICE_ANY_PLASMA + return "neoVI PLASMA"; + case NEODEVICE_NEOANALOG_DEPRECATED: + return "neoAnalog"; + case NEODEVICE_CT_OBD_DEPRECATED: + return "neoOBD CT"; + case NEODEVICE_ION: // also NEODEVICE_ANY_ION + return "neoVI ION"; + case NEODEVICE_VCAN44: + return "ValueCAN 4-4"; + case NEODEVICE_VCAN42: + return "ValueCAN 4-2"; + case NEODEVICE_FIRE2: + return "neoVI FIRE 2"; + case NEODEVICE_RADGALAXY: + return "RAD-Galaxy"; + case NEODEVICE_RADSTAR2: + return "RAD-Star 2"; + case NEODEVICE_VIVIDCAN: + return "VividCAN"; + case NEODEVICE_DONT_REUSE0: + case NEODEVICE_DONT_REUSE1: + case NEODEVICE_DONT_REUSE2: + case NEODEVICE_DONT_REUSE3: + case NEODEVICE_DONT_REUSE4: + default: + return "Unknown"; + }; + } } bool _convertListOrTupleToArray(PyObject* obj, std::vector* results) { - if (!obj || !results) - { - set_ics_exception(exception_runtime_error(), "_convertListOrTupleToArray() was passed invalid arguments"); + if (!obj || !results) { + set_ics_exception(exception_runtime_error(), "passed invalid arguments"); return false; } results->clear(); - if (PyList_CheckExact(obj)) - { + if (PyList_CheckExact(obj)) { Py_ssize_t length = PyList_Size(obj); - for (Py_ssize_t i=0; i < length; ++i) + for (Py_ssize_t i = 0; i < length; ++i) results->push_back(PyList_GetItem(obj, i)); return true; - } - else if (PyTuple_CheckExact(obj)) - { + } else if (PyTuple_CheckExact(obj)) { Py_ssize_t length = PyTuple_Size(obj); - for (Py_ssize_t i=0; i < length; ++i) + for (Py_ssize_t i = 0; i < length; ++i) results->push_back(PyTuple_GetItem(obj, i)); return true; - } - else - { - set_ics_exception(exception_runtime_error(), "_convertListOrTupleToArray() was passed neither a list or tuple"); + } else { + set_ics_exception(exception_runtime_error(), "was passed neither a list or tuple"); return false; } - set_ics_exception(exception_runtime_error(), "_convertListOrTupleToArray() bug!"); + set_ics_exception(exception_runtime_error(), "bug!"); return false; } @@ -154,27 +795,26 @@ PyObject* _getPythonModuleObject(const char* module_name, const char* module_obj { // Before we do anything, we need to grab the python s_device_settings ctype.Structure. PyObject* module = PyImport_ImportModule(module_name); - if (!module) - { + if (!module) { return set_ics_exception(exception_runtime_error(), "_getPythonModuleObject(): Failed to import module"); } // Grab the module Dictionary PyObject* module_dict = PyModule_GetDict(module); - if (!module_dict) - { - return set_ics_exception(exception_runtime_error(), "_getPythonModuleObject(): Failed to grab module dict from module"); + if (!module_dict) { + return set_ics_exception(exception_runtime_error(), + "_getPythonModuleObject(): Failed to grab module dict from module"); } // Grab the actual object PyObject* module_object = PyDict_GetItemString(module_dict, module_object_name); - if (!module_object) - { - return set_ics_exception(exception_runtime_error(), "_getPythonModuleObject(): Failed to grab object s_device_settings from module"); + if (!module_object) { + return set_ics_exception(exception_runtime_error(), + "_getPythonModuleObject(): Failed to grab object s_device_settings from module"); } // Call the object so we have our own reference - we are going to return this PyObject* object = PyObject_CallObject(module_object, NULL); - if (!object) - { - return set_ics_exception(exception_runtime_error(), "_getPythonModuleObject(): Failed to call object from module"); + if (!object) { + return set_ics_exception(exception_runtime_error(), + "_getPythonModuleObject(): Failed to call object from module"); } return object; } @@ -184,41 +824,225 @@ int _isPythonModuleObject_IsInstance(PyObject* object, const char* module_name, { // Before we do anything, we need to grab the python s_device_settings ctype.Structure. PyObject* module = PyImport_ImportModule(module_name); - if (!module) - { + if (!module) { set_ics_exception(exception_runtime_error(), "_isPythonModuleObjectInstanceOf(): Failed to import module"); return -1; } // Grab the module Dictionary PyObject* module_dict = PyModule_GetDict(module); - if (!module_dict) - { - set_ics_exception(exception_runtime_error(), "_isPythonModuleObjectInstanceOf(): Failed to grab module dict from module"); + if (!module_dict) { + set_ics_exception(exception_runtime_error(), + "_isPythonModuleObjectInstanceOf(): Failed to grab module dict from module"); return -1; } // Grab the actual object PyObject* module_object = PyDict_GetItemString(module_dict, module_object_name); - if (!module_object) - { - set_ics_exception(exception_runtime_error(), "_isPythonModuleObjectInstanceOf(): Failed to grab object s_device_settings from module"); + if (!module_object) { + set_ics_exception(exception_runtime_error(), + "_isPythonModuleObjectInstanceOf(): Failed to grab object s_device_settings from module"); return -1; } return PyObject_IsInstance(object, module_object); } +// Returns true if object instance is the same as ics.py_neo_device_ex.PyNeoDeviceEx +bool PyNeoDeviceEx_CheckExact(PyObject* object) +{ + const char CLASS_NAME[] = "PyNeoDeviceEx"; + if (!object) { + return false; + } + PyTypeObject* type_obj = Py_TYPE(object); + if (!type_obj && !type_obj->tp_name) { + return false; + } + + return strncmp(type_obj->tp_name, CLASS_NAME, sizeof(CLASS_NAME) / sizeof(CLASS_NAME[0])) == 0; + // This will fail on cleanup because we can't import ics anymore... + // return _isPythonModuleObject_IsInstance(object, "ics.py_neo_device_ex", "PyNeoDeviceEx") == 1; +} + +// Get the NeoDeviceEx from PyNeoDeviceEx. Caller is responsible for managing the +// Py_buffer and nde is UB once Py_buffer goes out of scope. +// Note: Calls to PyNeoDeviceEx_GetNeoDeviceEx() must be paired with calls +// to PyBuffer_Release(), similar to malloc() and free(). +// +// Returns true on success, false on failure with exception set. nde will be set to NULL on failure. +// Example: +// Py_buffer buffer = {}; +// NeoDeviceEx* nde = NULL; +// if (PyNeoDeviceEx_GetNeoDeviceEx(obj, &buffer, &nde)) { +// // use nde here +// } +// PyBuffer_Release(&buffer); +bool PyNeoDeviceEx_GetNeoDeviceEx(PyObject* object, Py_buffer* buffer, NeoDeviceEx** nde) +{ + if (!object && !buffer && !nde) { + set_ics_exception(exception_runtime_error(), "Object and or buffer is not valid"); + nde = NULL; + return false; + } + if (!PyNeoDeviceEx_CheckExact(object)) { + set_ics_exception(exception_runtime_error(), "Object is not of type PyNeoDeviceEx"); + nde = NULL; + return false; + } + if (PyObject_GetBuffer(object, buffer, PyBUF_CONTIG) != 0) { + *nde = NULL; + return false; + } + *nde = (NeoDeviceEx*)buffer->buf; + return true; +} + +// Copies the NeoDeviceEx src_nde to the PyNeoDeviceEx object. Returns true on success, false on +// error with an exception set. +bool PyNeoDeviceEx_SetNeoDeviceEx(PyObject* object, NeoDeviceEx* src_nde) +{ + if (!object || !src_nde) { + return false; + } + if (!PyNeoDeviceEx_CheckExact(object)) { + set_ics_exception(exception_runtime_error(), "Object is not of type PyNeoDeviceEx"); + return false; + } + // Get the NeoDeviceEx from PyNeoDeviceEx + Py_buffer buffer = {}; + if (PyObject_GetBuffer(object, &buffer, PyBUF_CONTIG) != 0) { + return false; + } + memcpy(buffer.buf, src_nde, sizeof(*src_nde)); + PyBuffer_Release(&buffer); + return true; +} + +extern "C" void __destroy_PyNeoDeviceEx_Handle(PyObject* handle) +{ + (void)handle; + /* + if (handle) { + delete handle; + handle = NULL; + } + */ +} + +// Return the _handle attribute of PyNeoDeviceEx. Sets handle to NULL on failure or not valid. +// Returns false on error and exception is set. Returns true on success. +bool PyNeoDeviceEx_GetHandle(PyObject* object, void** handle) +{ + if (!object && !handle && !*handle) { + set_ics_exception(exception_runtime_error(), "Object is not valid"); + return false; + } + *handle = NULL; + if (!PyNeoDeviceEx_CheckExact(object)) { + set_ics_exception(exception_runtime_error(), "Object is not of type PyNeoDeviceEx"); + return false; + } + PyObject* _handle = PyObject_GetAttrString(object, "_handle"); + if (!_handle) { + return false; + } + if (!PyCapsule_CheckExact(_handle)) { + return true; + } + void* ptr = PyCapsule_GetPointer(_handle, NULL); + if (!ptr) { + return false; + } + *handle = ptr; + return true; +} +// Returns false on error and exception is set. Returns true on success. +bool PyNeoDeviceEx_SetHandle(PyObject* object, void* handle) +{ + if (!object) { + set_ics_exception(exception_runtime_error(), "Object is not valid"); + return false; + } + if (!PyNeoDeviceEx_CheckExact(object)) { + set_ics_exception(exception_runtime_error(), "Object is not of type PyNeoDeviceEx"); + return false; + } + PyObject* _handle = PyObject_GetAttrString(object, "_handle"); + if (!_handle) { + return false; + } + if (!PyCapsule_CheckExact(_handle) && handle) { + PyObject* capsule = PyCapsule_New(handle, NULL, __destroy_PyNeoDeviceEx_Handle); + if (!capsule) { + return false; + } + if (PyObject_SetAttrString(object, "_handle", capsule) != 0) { + return false; + } + } else if (handle) { + if (!PyCapsule_SetPointer(_handle, handle)) { + return NULL; + } + } else { + if (PyObject_SetAttrString(object, "_handle", Py_None) != 0) { + return false; + } + } + return true; +} + +// Get the _name attribute of PyNeoDeviceEx. +// Returns false on error and exception is set. Returns true on success. +bool PyNeoDeviceEx_GetName(PyObject* object, PyObject* name) +{ + if (!object) { + set_ics_exception(exception_runtime_error(), "Object is not valid"); + return false; + } + if (!PyNeoDeviceEx_CheckExact(object)) { + set_ics_exception(exception_runtime_error(), "Object is not of type PyNeoDeviceEx"); + return false; + } + // Get the _name of PyNeoDeviceEx + name = PyObject_GetAttrString(object, "_name"); + return name != NULL; +} + +// Set the _name attribute of PyNeoDeviceEx. Will create if needed. +// Returns false on error and exception is set. Returns true on success. +bool PyNeoDeviceEx_SetName(PyObject* object, PyObject* name) +{ + if (!object) { + set_ics_exception(exception_runtime_error(), "Object is not valid"); + return false; + } + if (!PyNeoDeviceEx_CheckExact(object)) { + set_ics_exception(exception_runtime_error(), "Object is not of type PyNeoDeviceEx"); + return false; + } + if (!PyUnicode_CheckExact(name)) { + set_ics_exception(exception_runtime_error(), "name is not of type str"); + return false; + } + // Get the _handle of PyNeoDeviceEx + return PyObject_SetAttrString(object, "_name", name) == 0; +} + PyObject* meth_find_devices(PyObject* self, PyObject* args, PyObject* keywords) { + (void)self; PyObject* device_types = NULL; int network_id = -1; - char* kwords[] = { "device_types", "network_id", NULL }; - if (!PyArg_ParseTupleAndKeywords(args, keywords, arg_parse("|Oi:", __FUNCTION__), - kwords, &device_types, &network_id)) { +#if (PY_MAJOR_VERSION) >= 3 && (PY_MINOR_VERSION >= 13) + const +#endif + char* kwords[] = { "device_types", "network_id", NULL }; + if (!PyArg_ParseTupleAndKeywords( + args, keywords, arg_parse("|Oi:", __FUNCTION__), kwords, &device_types, &network_id)) { return NULL; } // Grab the library before we start doing anything... ice::Library* lib = dll_get_library(); - if (!lib) { + if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } @@ -226,19 +1050,22 @@ PyObject* meth_find_devices(PyObject* self, PyObject* args, PyObject* keywords) // Create a vector from the device_types python container std::unique_ptr device_types_list; unsigned int device_types_list_size = 0; - if (device_types && device_types != Py_None) - { + if (device_types && device_types != Py_None) { std::vector device_type_vector; if (!_convertListOrTupleToArray(device_types, &device_type_vector)) return NULL; - device_types_list_size = device_type_vector.size(); - device_types_list.reset((new unsigned int(device_types_list_size))); - for (unsigned int i=0; i < device_types_list_size; ++i) - device_types_list[i] = (unsigned int)PyLong_AsLong(device_type_vector[i]); + device_types_list_size = static_cast(device_type_vector.size()); + device_types_list.reset(new unsigned int[device_types_list_size]); + for (unsigned int i = 0; i < device_types_list_size; ++i) { + // Device type masks like NEODEVICE_ALL (0xFFFFFFFF) don't fit in a + // 32 bit signed long, so use the masked unsigned conversion. + device_types_list[i] = (unsigned int)PyLong_AsUnsignedLongMask(device_type_vector[i]); + if (PyErr_Occurred()) + return NULL; + } } // Lets finally call the icsneo40 function - try - { + try { /* int _stdcall icsneoFindDevices(NeoDeviceEx* pNeoDeviceEx, int* pNumDevices, @@ -247,52 +1074,59 @@ PyObject* meth_find_devices(PyObject* self, PyObject* args, PyObject* keywords) POptionsFindNeoEx* pOptionsFindNeoEx, unsigned long reserved​) */ - ice::Function icsneoFindDevices(lib, "icsneoFindDevices"); - NeoDeviceEx devices[255] = { 0 }; + ice::Function + icsneoFindDevices(lib, "icsneoFindDevices"); + NeoDeviceEx devices[255] = {}; int count = 255; - // - OptionsFindNeoEx opts = {0}; + OptionsFindNeoEx opts = {}; opts.CANOptions.iNetworkID = network_id; POptionsFindNeoEx popts = NULL; if (network_id != -1) popts = &opts; - Py_BEGIN_ALLOW_THREADS - if (!icsneoFindDevices(devices, &count, device_types_list.get(), device_types_list_size, (network_id != -1) ? &popts : NULL, 0)) { - Py_BLOCK_THREADS + auto gil = PyAllowThreads(); + if (!icsneoFindDevices(devices, + &count, + device_types_list.get(), + device_types_list_size, + (network_id != -1) ? &popts : NULL, + 0)) { + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoFindDevices() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); PyObject* tuple = PyTuple_New(count); if (!tuple) { return NULL; } - for (int i=0; i < count; ++i) { - PyObject* obj = PyObject_CallObject((PyObject*)&neo_device_object_type, NULL); + for (int i = 0; i < count; ++i) { + PyObject* obj = _getPythonModuleObject("ics.py_neo_device_ex", "PyNeoDeviceEx"); if (!obj) { - // This should only happen if we run out of memory (malloc failure)? - PyErr_Print(); - return set_ics_exception(exception_runtime_error(), "Failed to allocate " NEO_DEVICE_OBJECT_NAME); + return set_ics_exception(exception_runtime_error(), "Failed to allocate PyNeoDeviceEx"); + } + // Copy the NeoDeviceEx struct into our python NeoDevice object + if (!PyNeoDeviceEx_SetNeoDeviceEx(obj, &devices[i])) { + return NULL; + } + std::string device_name = device_name_from_nde(&devices[i]); + PyObject* py_device_name = + PyUnicode_FromStringAndSize(device_name.c_str(), static_cast(device_name.length())); + if (!py_device_name || !PyNeoDeviceEx_SetName(obj, py_device_name)) { + return NULL; } - // Copy the NeoDevice struct into our python NeoDevice object - neo_device_object* neo_device = (neo_device_object*)obj; - neo_device->dev = devices[i].neoDevice; - neo_device->name = PyUnicode_FromString(neodevice_to_string(devices[i].neoDevice.DeviceType)); PyTuple_SetItem(tuple, i, obj); } return tuple; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_open_device(PyObject* self, PyObject* args, PyObject* keywords) { + (void)self; unsigned long serial_number = 0; PyObject* device = NULL; PyObject* network_ids = NULL; @@ -301,15 +1135,26 @@ PyObject* meth_open_device(PyObject* self, PyObject* args, PyObject* keywords) int network_id = -1; bool use_neovi_server = false; bool device_need_ref_inc = false; - char* kwords[] = { "device", "network_ids", "config_read", "options", "network_id", "use_server", NULL }; - if (!PyArg_ParseTupleAndKeywords(args, keywords, arg_parse("|OOiiib:", __FUNCTION__), - kwords, &device, &network_ids, &config_read, &options, &network_id, &use_neovi_server)) { +#if (PY_MAJOR_VERSION) >= 3 && (PY_MINOR_VERSION >= 13) + const +#endif + char* kwords[] = { "device", "network_ids", "config_read", "options", "network_id", "use_server", NULL }; + if (!PyArg_ParseTupleAndKeywords(args, + keywords, + arg_parse("|OOiiib:", __FUNCTION__), + kwords, + &device, + &network_ids, + &config_read, + &options, + &network_id, + &use_neovi_server)) { return NULL; } // Grab the library before we start doing anything... ice::Library* lib = dll_get_library(); - if (!lib) { + if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } @@ -318,62 +1163,56 @@ PyObject* meth_open_device(PyObject* self, PyObject* args, PyObject* keywords) std::unique_ptr network_ids_list; unsigned int network_ids_list_size = 0; bool use_network_ids = false; - if (network_ids && network_ids != Py_None) - { + if (network_ids && network_ids != Py_None) { std::vector network_ids_vector; if (!_convertListOrTupleToArray(network_ids, &network_ids_vector)) return NULL; - network_ids_list_size = network_ids_vector.size(); - network_ids_list.reset((new unsigned char(network_ids_list_size))); - for (unsigned int i=0; i < network_ids_list_size; ++i) + network_ids_list_size = static_cast(network_ids_vector.size()); + network_ids_list.reset(new unsigned char[network_ids_list_size]); + for (unsigned int i = 0; i < network_ids_list_size; ++i) { network_ids_list[i] = (unsigned char)PyLong_AsLong(network_ids_vector[i]); + if (PyErr_Occurred()) + return NULL; + } use_network_ids = true; } // Verify device type - if (device && PyLong_CheckExact(device)) - { + if (device && PyLong_CheckExact(device)) { // Device is a serial number in integer format - serial_number = PyLong_AsLong(device); - } - else if (device && PyUnicode_CheckExact(device)) - { + serial_number = PyLong_AsUnsignedLong(device); + if (PyErr_Occurred()) + return NULL; + } else if (device && PyUnicode_CheckExact(device)) { // Lets convert the base36 string into an integer PyObject* module_name = PyUnicode_FromString("builtins"); PyObject* builtins_module = PyImport_Import(module_name); - if (!builtins_module) - { - return set_ics_exception(exception_runtime_error(),"Failed to import __builtins__ module"); + if (!builtins_module) { + return set_ics_exception(exception_runtime_error(), "Failed to import __builtins__ module"); } PyObject* builtin_dict = PyModule_GetDict(builtins_module); - PyObject *builtin_int = PyDict_GetItemString(builtin_dict, "int"); - if (PyCallable_Check(builtin_int)) - { - PyObject *return_value = PyObject_CallFunction(builtin_int, "Oi", device, 36); + PyObject* builtin_int = PyDict_GetItemString(builtin_dict, "int"); + if (PyCallable_Check(builtin_int)) { + PyObject* return_value = PyObject_CallFunction(builtin_int, "Oi", device, 36); Py_DECREF(builtins_module); - if (return_value == NULL) - { + if (return_value == NULL) { // We failed for some reason... PyErr_Print(); return NULL; - } - else - { - serial_number = PyLong_AsLong(return_value); + } else { + serial_number = PyLong_AsUnsignedLong(return_value); + Py_DECREF(return_value); + if (PyErr_Occurred()) + return NULL; } + } else { + return set_ics_exception(exception_runtime_error(), "Failed to convert serial number string to integer."); } - else - { - return set_ics_exception(exception_runtime_error(),"Failed to convert serial number string to integer."); - } - } - else if (device && !PyNeoDevice_CheckExact(device)) - { - return set_ics_exception(exception_runtime_error(),"Invalid 'device' parameter object type passed to open_device()."); - } - else if (device && PyNeoDevice_CheckExact(device)) - { - // If the user passed in a NeoDevice device we need to increment + } else if (device && !PyNeoDeviceEx_CheckExact(device)) { + return set_ics_exception(exception_runtime_error(), + "Invalid 'device' parameter object type passed to open_device()."); + } else if (device && PyNeoDeviceEx_CheckExact(device)) { + // If the user passed in a NeoDevice device we need to increment // the reference counter when we return it since device is a borrowed // reference. // devs = ics.find_devices() @@ -382,60 +1221,60 @@ PyObject* meth_open_device(PyObject* self, PyObject* args, PyObject* keywords) device_need_ref_inc = true; } - if ((device && !PyNeoDevice_CheckExact(device)) || !device) - { + if ((device && !PyNeoDeviceEx_CheckExact(device)) || !device) { // We don't have a device parameter so lets find the first one - try - { - ice::Function icsneoFindDevices(lib, "icsneoFindDevices"); + try { + ice::Function + icsneoFindDevices(lib, "icsneoFindDevices"); NeoDeviceEx devices[255]; int count = 255; - OptionsFindNeoEx opts = {0}; + OptionsFindNeoEx opts = {}; opts.CANOptions.iNetworkID = network_id; POptionsFindNeoEx popts = NULL; if (network_id != -1) popts = &opts; - Py_BEGIN_ALLOW_THREADS - if (!icsneoFindDevices(devices, &count, NULL, 0, (network_id != -1) ? &popts : NULL, 0)) - { - Py_BLOCK_THREADS + auto gil = PyAllowThreads(); + if (!icsneoFindDevices(devices, &count, NULL, 0, (network_id != -1) ? &popts : NULL, 0)) { + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoFindDevices() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); // Find the first free device - for (int i=0; i < count; ++i) - { + for (int i = 0; i < count; ++i) { // If we are looking for a serial number, check here - if (serial_number && devices[i].neoDevice.SerialNumber != serial_number) + if (serial_number && devices[i].neoDevice.SerialNumber != (int32_t)serial_number) continue; // If we aren't using neoVI Server and already have a connection we can't proceed. - if (!use_neovi_server && devices[i].neoDevice.NumberOfClients != 0) - { + if (!use_neovi_server && devices[i].neoDevice.NumberOfClients != 0) { continue; - //return set_ics_exception(exception_runtime_error(), "Found device, but its already open!"); + // return set_ics_exception(exception_runtime_error(), "Found device, but its already open!"); } // We matched a neoDevice, lets allocate it here. - device = PyObject_CallObject((PyObject*)&neo_device_object_type, NULL); - PyNeoDevice_GetNeoDevice(device)->dev = devices[i].neoDevice; - PyNeoDevice_GetNeoDevice(device)->name = PyUnicode_FromString(neodevice_to_string(devices[i].neoDevice.DeviceType)); + device = _getPythonModuleObject("ics.py_neo_device_ex", "PyNeoDeviceEx"); + if (!device) { + return NULL; + } + if (!PyNeoDeviceEx_SetNeoDeviceEx(device, &devices[i])) { + return NULL; + } + if (!PyNeoDeviceEx_SetName(device, PyUnicode_FromString(device_name_from_nde(&devices[i]).c_str()))) { + return NULL; + } break; } - if (!device || !PyNeoDevice_CheckExact(device)) - { + if (!device || !PyNeoDeviceEx_CheckExact(device)) { return set_ics_exception(exception_runtime_error(), "Failed to find a device to open."); } - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } } // We should finally have our device allocated at this point! - try - { + try { /* int _stdcall icsneoOpenDevice(NeoDeviceEx* pNeoDeviceEx, void** hObject, @@ -445,73 +1284,98 @@ PyObject* meth_open_device(PyObject* self, PyObject* args, PyObject* keywords) OptionsOpenNeoEx* stOptionsOpenNeoEx, unsigned long reserved) */ - ice::Function icsneoOpenDevice(lib, "icsneoOpenDevice"); - NeoDeviceEx neo_device_ex = {}; - neo_device_ex.neoDevice = PyNeoDevice_GetNeoDevice(device)->dev; - OptionsFindNeoEx opts = {0}; + ice::Function + icsneoOpenDevice(lib, "icsneoOpenDevice"); + OptionsFindNeoEx opts = {}; opts.CANOptions.iNetworkID = network_id; POptionsFindNeoEx popts = NULL; if (network_id != -1) popts = &opts; - - Py_BEGIN_ALLOW_THREADS - if (!icsneoOpenDevice(&neo_device_ex, &PyNeoDevice_GetNeoDevice(device)->handle, use_network_ids ? network_ids_list.get() : NULL, config_read, options, (network_id != -1) ? popts : NULL, 0)) - { - Py_BLOCK_THREADS + // Get the handle from PyNeoDeviceEx + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(device, &handle)) { + return NULL; + } + // Get the NeoDeviceEx from PyNeoDeviceEx + Py_buffer buffer = {}; + NeoDeviceEx* nde = NULL; + if (!PyNeoDeviceEx_GetNeoDeviceEx(device, &buffer, &nde)) { + PyBuffer_Release(&buffer); + return NULL; + } + auto gil = PyAllowThreads(); + if (!icsneoOpenDevice(nde, + &handle, + use_network_ids ? network_ids_list.get() : NULL, + config_read, + options, + (network_id != -1) ? popts : NULL, + 0)) { + gil.restore(); + PyBuffer_Release(&buffer); return set_ics_exception(exception_runtime_error(), "icsneoOpenDevice() Failed"); } - Py_END_ALLOW_THREADS - - if (device_need_ref_inc) - { + gil.restore(); + PyBuffer_Release(&buffer); + if (!PyNeoDeviceEx_SetHandle(device, handle)) { + return NULL; + } + if (device_need_ref_inc) { Py_INCREF(device); } return device; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_close_device(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (obj == NULL) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type PyNeoDeviceEx, got NULL"); } - try - { + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type PyNeoDeviceEx"); + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoClosePort(lib, "icsneoClosePort"); - ice::Function icsneoFreeObject(lib, "icsneoFreeObject"); + ice::Function icsneoClosePort(lib, "icsneoClosePort"); + ice::Function icsneoFreeObject(lib, "icsneoFreeObject"); int error_count = 0; - Py_BEGIN_ALLOW_THREADS - if (!icsneoClosePort(PyNeoDevice_GetNeoDevice(obj)->handle, &error_count)) { - Py_BLOCK_THREADS + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + // nothing to do here, we have an invalid handle. We probably were never opened. + if (!handle) { + return Py_BuildValue("i", error_count); + } + auto gil = PyAllowThreads(); + if (!icsneoClosePort(handle, &error_count)) { + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoClosePort() Failed"); } - icsneoFreeObject(PyNeoDevice_GetNeoDevice(obj)->handle); - Py_END_ALLOW_THREADS - PyNeoDevice_GetNeoDevice(obj)->handle = 0; + icsneoFreeObject(handle); + gil.restore(); + if (!PyNeoDeviceEx_SetHandle(obj, NULL)) { + return NULL; + } return Py_BuildValue("i", error_count); - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } -/* +/* * Converts tm structure to second resolution. * Returns seconds elapsed since the beginning of the month. */ @@ -520,9 +1384,9 @@ __int64 _tm_secs(tm* t) __int64 result = -1; if (!t) return result; - result = t->tm_mday*86400; - result += t->tm_hour*3600; - result += t->tm_min*60; + result = t->tm_mday * 86400; + result += t->tm_hour * 3600; + result += t->tm_min * 60; result += t->tm_sec; return result; @@ -542,8 +1406,7 @@ __int64 _tm_secs_offset(tm* t1, tm* t2) __int64 r2 = _tm_secs(t2); if (r1 == -1 || r2 == -1) return result; - if (t1->tm_year != t2->tm_year || - t1->tm_mon != t1->tm_mon) + if (t1->tm_year != t2->tm_year || t1->tm_mon != t2->tm_mon) return -2; if ((result = r1 - r2) < 0) result *= -1; @@ -552,74 +1415,78 @@ __int64 _tm_secs_offset(tm* t1, tm* t2) PyObject* meth_get_rtc(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); icsSpyTime ics_time; - try - { + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoGetRTC(lib, "icsneoGetRTC"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoGetRTC(lib, "icsneoGetRTC"); + auto gil = PyAllowThreads(); if (!icsneoGetRTC(handle, &ics_time)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoGetRTC() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); time_t current_time = time(0); // Bug #6600 - icsneoSetRTC is utc, icsneoGetRTC is local - //tm* current_utc_time = gmtime(¤t_time); // UTC + // tm* current_utc_time = gmtime(¤t_time); // UTC tm* current_utc_time = localtime(¤t_time); // Local tm device_utc_time; device_utc_time.tm_hour = ics_time.hour; device_utc_time.tm_min = ics_time.min; device_utc_time.tm_sec = ics_time.sec; - device_utc_time.tm_mon = ics_time.month-1; + device_utc_time.tm_mon = ics_time.month - 1; device_utc_time.tm_mday = ics_time.day; device_utc_time.tm_year = ics_time.year; device_utc_time.tm_isdst = -1; device_utc_time.tm_year += 100; - unsigned long offset = (unsigned long)_tm_secs_offset(&device_utc_time, current_utc_time); + long long offset = _tm_secs_offset(&device_utc_time, current_utc_time); PyDateTime_IMPORT; if (!PyDateTimeAPI) { return set_ics_exception(exception_runtime_error(), "Failed to initialize PyDateTime"); } - PyObject* datetime = PyDateTime_FromDateAndTime(device_utc_time.tm_year+1900, - device_utc_time.tm_mon+1, - device_utc_time.tm_mday, - device_utc_time.tm_hour, - device_utc_time.tm_min, - device_utc_time.tm_sec, - 0); - return Py_BuildValue("(O,i)", datetime, offset); - } - catch (ice::Exception& ex) - { + PyObject* datetime = PyDateTime_FromDateAndTime(device_utc_time.tm_year + 1900, + device_utc_time.tm_mon + 1, + device_utc_time.tm_mday, + device_utc_time.tm_hour, + device_utc_time.tm_min, + device_utc_time.tm_sec, + 0); + return Py_BuildValue("(O,L)", datetime, offset); + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_set_rtc(PyObject* self, PyObject* args) { + (void)self; PyObject* datetime_object = NULL; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O|O:", __FUNCTION__), &obj, &datetime_object)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; } - ICS_HANDLE handle = PyNeoDevice_GetNeoDevice(obj)->handle; PyDateTime_IMPORT; if (!PyDateTimeAPI) { return set_ics_exception(exception_runtime_error(), "Failed to initialize PyDateTime"); @@ -628,13 +1495,13 @@ PyObject* meth_set_rtc(PyObject* self, PyObject* args) // We didn't get a valid Python DateTime Object, use current UTC Time time_t current_time = time(0); tm* current_utc_time = gmtime(¤t_time); - datetime_object = PyDateTime_FromDateAndTime(current_utc_time->tm_year+1900, - current_utc_time->tm_mon+1, - current_utc_time->tm_mday, - current_utc_time->tm_hour, - current_utc_time->tm_min, - current_utc_time->tm_sec, - 0); + datetime_object = PyDateTime_FromDateAndTime(current_utc_time->tm_year + 1900, + current_utc_time->tm_mon + 1, + current_utc_time->tm_mday, + current_utc_time->tm_hour, + current_utc_time->tm_min, + current_utc_time->tm_sec, + 0); } // Convert Python DateTime object to icsSpyTime icsSpyTime ics_time; @@ -643,43 +1510,42 @@ PyObject* meth_set_rtc(PyObject* self, PyObject* args) ics_time.hour = PyDateTime_DATE_GET_HOUR(datetime_object); ics_time.day = PyDateTime_GET_DAY(datetime_object); ics_time.month = PyDateTime_GET_MONTH(datetime_object); - ics_time.year = PyDateTime_GET_YEAR(datetime_object) % 100; - try - { + ics_time.year = static_cast(PyDateTime_GET_YEAR(datetime_object) % 100); + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoSetRTC(lib, "icsneoSetRTC"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoSetRTC(lib, "icsneoSetRTC"); + auto gil = PyAllowThreads(); if (!icsneoSetRTC(handle, &ics_time)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoSetRTC() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_load(PyObject* self, PyObject* args) { + (void)self; PyObject* arg_data = NULL; int location; PyObject* obj = NULL; - bool isFileData = false; if (!PyArg_ParseTuple(args, arg_parse("OOi:", __FUNCTION__), &obj, &arg_data, &location)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; } - ICS_HANDLE handle = PyNeoDevice_GetNeoDevice(obj)->handle; long fsize; unsigned char* data = NULL; int data_size = 0; @@ -691,213 +1557,220 @@ PyObject* meth_coremini_load(PyObject* self, PyObject* args) char* file_name = PyUniStr_AsStrOrUTF8(arg_data); #endif if (!file_name) { - return set_ics_exception_dev(exception_runtime_error(), obj, "Failed to convert file path to string"); + return set_ics_exception(exception_runtime_error(), "Failed to convert file path to string"); } FILE* f; f = fopen(file_name, "rb"); - if (!f) { + if (!f) { std::stringstream ss; ss << "Failed to open CoreMini script file: '" << file_name << "'. Please make sure path exists"; - return set_ics_exception_dev(exception_runtime_error(), obj, (char*)ss.str().c_str()); + return set_ics_exception(exception_runtime_error(), (char*)ss.str().c_str()); } fseek(f, 0, SEEK_END); fsize = ftell(f); rewind(f); - data = (unsigned char*) malloc(sizeof(char)*fsize); - data_size = (int)fread(data, 1, fsize, f); + // ftell() returns a 32 bit long on Windows; a negative or huge result + // means the file is too large to load through this int-sized API. + if (fsize < 0 || fsize > INT_MAX) { + fclose(f); + return set_ics_exception(exception_runtime_error(), "CoreMini script file size is invalid"); + } + data = (unsigned char*)malloc(sizeof(char) * fsize); + data_size = (int)fread(data, 1, static_cast(fsize), f); fclose(f); if (fsize != data_size) { - return set_ics_exception_dev(exception_runtime_error(), obj, "CoreMini binary file size mismatch"); + return set_ics_exception(exception_runtime_error(), "CoreMini binary file size mismatch"); } } else if (PyTuple_CheckExact(arg_data)) { Py_ssize_t tuple_size = PyTuple_Size(arg_data); - data = (unsigned char*) malloc(sizeof(char)*tuple_size); + data = (unsigned char*)malloc(sizeof(char) * tuple_size); // Move tuple data into array - for (int i=0; i < tuple_size; ++i) { + for (int i = 0; i < tuple_size; ++i) { PyObject* value = PyTuple_GET_ITEM(arg_data, i); if (!PyLong_CheckExact(value)) { - return set_ics_exception_dev(exception_runtime_error(), obj, "Failed to convert tuple data. Tuple data must be integer type"); + return set_ics_exception(exception_runtime_error(), + "Failed to convert tuple data. Tuple data must be integer type"); } data[i] = (unsigned char)PyLong_AsLong(PyTuple_GET_ITEM(arg_data, i)); } - fsize = tuple_size; + fsize = static_cast(tuple_size); data_size = fsize; } else { - return set_ics_exception_dev(exception_runtime_error(), obj, "Argument must be filepath or tuple"); + return set_ics_exception(exception_runtime_error(), "Argument must be filepath or tuple"); } - try - { + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoScriptLoad(lib, "icsneoScriptLoad"); - Py_BEGIN_ALLOW_THREADS - if (!icsneoScriptLoad(handle, data, data_size, location)) { - Py_BLOCK_THREADS + ice::Function icsneoScriptLoad( + lib, "icsneoScriptLoad"); + auto gil = PyAllowThreads(); + if (!icsneoScriptLoad(handle, data, static_cast(data_size), location)) { + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoScriptLoad() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_start(PyObject* self, PyObject* args) { + (void)self; int location; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("Oi:", __FUNCTION__), &obj, &location)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetNeoDevice(obj)->handle; - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoScriptStart(lib, "icsneoScriptStart"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoScriptStart(lib, "icsneoScriptStart"); + auto gil = PyAllowThreads(); if (!icsneoScriptStart(handle, location)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoScriptStart() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_stop(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoScriptStop(lib, "icsneoScriptStop"); - Py_BEGIN_ALLOW_THREADS - if (! icsneoScriptStop(handle)) { - Py_BLOCK_THREADS + ice::Function icsneoScriptStop(lib, "icsneoScriptStop"); + auto gil = PyAllowThreads(); + if (!icsneoScriptStop(handle)) { + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoScriptStop() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_clear(PyObject* self, PyObject* args) { + (void)self; int location; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("Oi:", __FUNCTION__), &obj, &location)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoScriptClear(lib, "icsneoScriptClear"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoScriptClear(lib, "icsneoScriptClear"); + auto gil = PyAllowThreads(); if (!icsneoScriptClear(handle, location)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoScriptClear() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } - PyObject* meth_coremini_get_status(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; } - ICS_HANDLE handle = PyNeoDevice_GetNeoDevice(obj)->handle; - try - { + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoScriptGetScriptStatus(lib, "icsneoScriptGetScriptStatus"); + ice::Function icsneoScriptGetScriptStatus(lib, "icsneoScriptGetScriptStatus"); int status = 0; - Py_BEGIN_ALLOW_THREADS + auto gil = PyAllowThreads(); if (!icsneoScriptGetScriptStatus(handle, &status)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoScriptClear() Failed"); } - Py_END_ALLOW_THREADS - return Py_BuildValue("b", status==1); - } - catch (ice::Exception& ex) - { + gil.restore(); + return Py_BuildValue("b", status == 1); + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_transmit_messages(PyObject* self, PyObject* args) { + (void)self; PyObject* temp; bool created_tuple = false; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("OO:", __FUNCTION__), &obj, &temp)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); PyObject* tuple = temp; if (!PyTuple_CheckExact(temp)) { tuple = Py_BuildValue("(O)", temp); @@ -909,131 +1782,126 @@ PyObject* meth_transmit_messages(PyObject* self, PyObject* args) if (!PyTuple_CheckExact(tuple)) { return set_ics_exception(exception_argument_error(), "Second argument must be of tuple type!"); } - try - { + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoTxMessages(lib, "icsneoTxMessages"); + ice::Function icsneoTxMessages(lib, "icsneoTxMessages"); const Py_ssize_t TUPLE_COUNT = PyTuple_Size(tuple); - icsSpyMessage** msgs = new icsSpyMessage*[TUPLE_COUNT](); - for (int i=0; i < TUPLE_COUNT; ++i) { - spy_message_object* obj = (spy_message_object*)PyTuple_GetItem(tuple, i); - if (!obj) { + icsSpyMessage** msgs = new icsSpyMessage*[static_cast(TUPLE_COUNT)](); + for (int i = 0; i < TUPLE_COUNT; ++i) { + spy_message_object* _obj = (spy_message_object*)PyTuple_GetItem(tuple, static_cast(i)); + if (!_obj) { if (created_tuple) { Py_XDECREF(tuple); } delete[] msgs; - return set_ics_exception(exception_runtime_error(), "Tuple item must be of " MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME); + return set_ics_exception(exception_runtime_error(), + "Tuple item must be of " MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME); } - msgs[i] = &(obj->msg); + msgs[i] = &(_obj->msg); } - Py_BEGIN_ALLOW_THREADS - for (int i=0; i < TUPLE_COUNT; ++i) { + auto gil = PyAllowThreads(); + for (int i = 0; i < TUPLE_COUNT; ++i) { if (!icsneoTxMessages(handle, msgs[i], (msgs[i]->NetworkID2 << 8) | msgs[i]->NetworkID, 1)) { - Py_BLOCK_THREADS + gil.restore(); if (created_tuple) { Py_XDECREF(tuple); } delete[] msgs; return set_ics_exception(exception_runtime_error(), "icsneoTxMessages() Failed"); } - /* - if (msgs[i]->ExtraDataPtrEnabled && msgs[i]->ExtraDataPtr != NULL) { - delete msgs[i]->ExtraDataPtr; - msgs[i]->ExtraDataPtr = NULL; - msgs[i]->ExtraDataPtrEnabled = 0; - } - */ - } - Py_END_ALLOW_THREADS + } + gil.restore(); if (created_tuple) { Py_XDECREF(tuple); } delete[] msgs; Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_messages(PyObject* self, PyObject* args) { - //Py_RETURN_NONE; + (void)self; double timeout = 0.1; - int use_j1850 = 0; + // 'b' writes a single byte, so the target must be byte sized + unsigned char use_j1850 = 0; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O|bd:", __FUNCTION__), &obj, &use_j1850, &timeout)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); // Convert timeout to ms timeout *= 1000; - try - { + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoWaitForRxMessagesWithTimeOut(lib, "icsneoWaitForRxMessagesWithTimeOut"); - ice::Function icsneoGetMessages(lib, "icsneoGetMessages"); + ice::Function icsneoWaitForRxMessagesWithTimeOut( + lib, "icsneoWaitForRxMessagesWithTimeOut"); + ice::Function icsneoGetMessages(lib, "icsneoGetMessages"); int count = 20000; int errors = 0; - union SpyMessage { + union SpyMessage + { icsSpyMessageJ1850 msg_j1850; icsSpyMessage msg; }; - SpyMessage *msgs = PyMem_New(SpyMessage, count); + SpyMessage* msgs = PyMem_New(SpyMessage, count); if (!msgs) { // This should only happen if we run out of memory (malloc failure)? PyErr_Print(); - return set_ics_exception_dev(exception_runtime_error(), obj, "Failed to allocate " SPY_MESSAGE_OBJECT_NAME); + return set_ics_exception(exception_runtime_error(), "Failed to allocate " SPY_MESSAGE_OBJECT_NAME); } - Py_BEGIN_ALLOW_THREADS + auto gil = PyAllowThreads(); if (timeout == 0 || icsneoWaitForRxMessagesWithTimeOut(handle, (unsigned int)timeout)) { if (!icsneoGetMessages(handle, (icsSpyMessage*)msgs, &count, &errors)) { - Py_BLOCK_THREADS + gil.restore(); PyMem_Free(msgs); - return set_ics_exception_dev(exception_runtime_error(), obj, "icsneoGetMessages() Failed"); + return set_ics_exception(exception_runtime_error(), "icsneoGetMessages() Failed"); } } else { count = 0; } - Py_END_ALLOW_THREADS + gil.restore(); PyObject* tuple = PyTuple_New(count); - for (int i=0; i < count; ++i) { - PyObject* obj = NULL; + for (int i = 0; i < count; ++i) { + PyObject* _obj = NULL; if (use_j1850) { - obj = PyObject_CallObject((PyObject*)&spy_message_j1850_object_type, NULL); + _obj = PyObject_CallObject((PyObject*)&spy_message_j1850_object_type, NULL); } else { - obj = PyObject_CallObject((PyObject*)&spy_message_object_type, NULL); + _obj = PyObject_CallObject((PyObject*)&spy_message_object_type, NULL); } - if (!obj) { + if (!_obj) { // This should only happen if we run out of memory (malloc failure)? PyErr_Print(); - return set_ics_exception_dev(exception_runtime_error(), obj, "Failed to allocate " SPY_MESSAGE_OBJECT_NAME); + return set_ics_exception(exception_runtime_error(), "Failed to allocate " SPY_MESSAGE_OBJECT_NAME); } if (use_j1850) { - spy_message_j1850_object* msg = (spy_message_j1850_object*)obj; + spy_message_j1850_object* msg = (spy_message_j1850_object*)_obj; memcpy(&msg->msg, &msgs[i].msg_j1850, sizeof(msgs[i].msg_j1850)); // Looks like icsneo40 does its own memory management so don't delete when we dealloc msg->noExtraDataPtrCleanup = true; } else { - spy_message_object* msg = (spy_message_object*)obj; + spy_message_object* msg = (spy_message_object*)_obj; memcpy(&msg->msg, &msgs[i].msg, sizeof(msgs[i].msg)); // Looks like icsneo40 does its own memory management so don't delete when we dealloc msg->noExtraDataPtrCleanup = true; } - PyTuple_SetItem(tuple, i, obj); + PyTuple_SetItem(tuple, i, _obj); } PyObject* result = Py_BuildValue("(O,i)", tuple, errors); // We have to decrement the ref counter here because BuildValue increases it and @@ -1041,112 +1909,120 @@ PyObject* meth_get_messages(PyObject* self, PyObject* args) Py_XDECREF(tuple); PyMem_Del(msgs); return result; + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - catch (ice::Exception& ex) - { - return set_ics_exception_dev(exception_runtime_error(), obj, (char*)ex.what()); - } - return set_ics_exception_dev(exception_runtime_error(), obj, "This is a bug!"); } PyObject* meth_get_script_status(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); - } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } - unsigned long parameters[255] = {0}; + unsigned long parameters[255] = { 0 }; unsigned long parameters_count = 0; - try - { + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoScriptGetScriptStatusEx(lib, "icsneoScriptGetScriptStatusEx"); - Py_BEGIN_ALLOW_THREADS - if (!icsneoScriptGetScriptStatusEx(handle, parameters, sizeof(parameters)/sizeof(¶meters[0]), parameters_count)) { - Py_BLOCK_THREADS + ice::Function + icsneoScriptGetScriptStatusEx(lib, "icsneoScriptGetScriptStatusEx"); + auto gil = PyAllowThreads(); + if (!icsneoScriptGetScriptStatusEx( + handle, parameters, sizeof(parameters) / sizeof(parameters[0]), parameters_count)) { + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoScriptGetScriptStatusEx() Failed"); } - Py_END_ALLOW_THREADS - } - catch (ice::Exception& ex) - { + gil.restore(); + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } PyObject* list_object = PyList_New(0); - for (unsigned long i=0; i < parameters_count; ++i) { - PyObject* obj = Py_BuildValue("i", parameters[i]); - PyList_Append(list_object, obj); + for (unsigned long i = 0; i < parameters_count; ++i) { + PyObject* _obj = PyLong_FromUnsignedLong(parameters[i]); + PyList_Append(list_object, _obj); + Py_XDECREF(_obj); } return list_object; } PyObject* meth_get_error_messages(PyObject* self, PyObject* args) { - //return PyList_New(0); + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - int errors[600] = {0}; + int errors[600] = { 0 }; int error_count = 600; - - try - { + + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoGetErrorMessages(lib, "icsneoGetErrorMessages"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoGetErrorMessages(lib, "icsneoGetErrorMessages"); + auto gil = PyAllowThreads(); if (!icsneoGetErrorMessages(handle, errors, &error_count)) { - Py_UNBLOCK_THREADS - return set_ics_exception(exception_runtime_error(), "icsneoScriptGetScriptStatusEx() Failed"); + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoGetErrorMessages() Failed"); } - Py_END_ALLOW_THREADS - ice::Function icsneoGetErrorInfo(lib, "icsneoGetErrorInfo"); + gil.restore(); + ice::Function icsneoGetErrorInfo( + lib, "icsneoGetErrorInfo"); PyObject* list = PyList_New(0); - for (int i=0; i < error_count; ++i) { - char description_short[255] = {0}; - char description_long[255] = {0}; + for (int i = 0; i < error_count; ++i) { + char description_short[255] = { 0 }; + char description_long[255] = { 0 }; int description_short_length = 255; int description_long_length = 255; int severity = 0, restart_needed = 0; - Py_BEGIN_ALLOW_THREADS - if (!icsneoGetErrorInfo(errors[i], description_short, description_long, - &description_short_length, &description_long_length, &severity, &restart_needed)) { - Py_BLOCK_THREADS + auto gil2 = PyAllowThreads(); + if (!icsneoGetErrorInfo(errors[i], + description_short, + description_long, + &description_short_length, + &description_long_length, + &severity, + &restart_needed)) { + gil2.restore(); Py_XDECREF(list); return set_ics_exception(exception_runtime_error(), "icsneoGetErrorInfo() Failed"); } - Py_END_ALLOW_THREADS - PyObject* tuple = Py_BuildValue("i, s, s, i, i", errors[i], description_short, description_long, severity, restart_needed); - + gil2.restore(); + PyObject* tuple = Py_BuildValue( + "i, s, s, i, i", errors[i], description_short, description_long, severity, restart_needed); + PyList_Append(list, tuple); Py_XDECREF(tuple); } return list; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } +#ifdef _USE_INTERNAL_HEADER_ PyObject* msg_callback = NULL; static void message_callback(const char* message, bool success) { @@ -1163,19 +2039,20 @@ static void message_callback(const char* message, bool success) PyGILState_Release(state); } -#ifdef _USE_INTERNAL_HEADER_ PyObject* meth_flash_devices(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; PyObject* callback = NULL; PyObject* dict; - if (!PyArg_ParseTuple(args, arg_parse("OO|O:", __FUNCTION__), &obj, &dict, &callback)) { + int network_id = -1; + unsigned long iOptions = 0; + if (!PyArg_ParseTuple(args, arg_parse("OO|Oik:", __FUNCTION__), &obj, &dict, &callback, &network_id, &iOptions)) { return NULL; } - if (obj && !PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "First argument must be of " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME " type"); + if (obj && !PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "First argument must be of PyNeoDeviceEx type"); } - neo_device_object* neo_device = (neo_device_object*)obj; if (PyCallable_Check(callback) || PyObject_HasAttrString(callback, "message_callback")) { msg_callback = callback; } else { @@ -1185,10 +2062,10 @@ PyObject* meth_flash_devices(PyObject* self, PyObject* args) return set_ics_exception(exception_runtime_error(), "Third argument must be of dictionary type"); } // Populate rc array from the python dictionary - SReflashChip_t rc[16] = {0}; + SReflashChip_t rc[16] = { 0 }; unsigned long reflash_count = 0; Py_ssize_t pos = 0; - PyObject* key, * value; + PyObject *key, *value; while (PyDict_Next(dict, &pos, &key, &value)) { unsigned long id = PyLong_AsUnsignedLong(key); char* path = PyUniStr_AsStrOrUTF8(value); @@ -1206,27 +2083,59 @@ PyObject* meth_flash_devices(PyObject* self, PyObject* args) strcpy(rc[reflash_count].path, path); reflash_count++; } - try - { + // handle network_id if provided, otherwise 0 + OptionsFindNeoEx opts = { 0 }; + opts.CANOptions.iNetworkID = static_cast(network_id); + POptionsFindNeoEx popts = NULL; + if (network_id != -1) + popts = &opts; + // If iOptions was provided, use it. Otherwise, fall back to network_id. + if (iOptions == 0 && network_id != -1) { + iOptions = opts.CANOptions.iNetworkID; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function FlashDevice2(lib, "FlashDevice2"); - Py_BEGIN_ALLOW_THREADS - if (!FlashDevice2(0x3835C256, &(neo_device->dev), rc, reflash_count, 0, 0, 0, &message_callback)) { - Py_BLOCK_THREADS + // Get the NeoDeviceEx from PyNeoDeviceEx + Py_buffer buffer = {}; + NeoDeviceEx* nde = NULL; + if (!PyNeoDeviceEx_GetNeoDeviceEx(obj, &buffer, &nde)) { + PyBuffer_Release(&buffer); + return NULL; + } + ice::Function + FlashDevice2(lib, "FlashDevice2"); + auto gil = PyAllowThreads(); + // Avoid sign-extending the -1 sentinel to 0xFFFFFFFFFFFFFFFF on LP64; + // the DLL expects the 32 bit value on every platform. + if (!FlashDevice2(0x3835C256, + &nde->neoDevice, + rc, + reflash_count, + static_cast(static_cast(network_id)), + iOptions, + 0, + &message_callback)) { + gil.restore(); + PyBuffer_Release(&buffer); return set_ics_exception(exception_runtime_error(), "FlashDevice2() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); + PyBuffer_Release(&buffer); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } #endif // _USE_INTERNAL_HEADER_ @@ -1236,11 +2145,11 @@ static void message_reflash_callback(const wchar_t* message, unsigned long progr // We need to relock the GIL here otherwise we crash PyGILState_STATE state = PyGILState_Ensure(); if (!msg_reflash_callback) { - PySys_WriteStdout("%s -%d\n", message, progress); + PySys_WriteStdout("%ls -%ld\n", message, progress); } else if (PyObject_HasAttrString(msg_reflash_callback, "reflash_callback")) { - PyObject_CallMethod(msg_reflash_callback, "reflash_callback", "u,i", message, progress); + PyObject_CallMethod(msg_reflash_callback, "reflash_callback", "u,k", message, progress); } else { - PyObject_CallFunction(msg_reflash_callback, "u,i", message, progress); + PyObject_CallFunction(msg_reflash_callback, "u,k", message, progress); } // Unlock the GIL here again... PyGILState_Release(state); @@ -1249,6 +2158,7 @@ static void message_reflash_callback(const wchar_t* message, unsigned long progr // void _stdcall icsneoSetReflashCallback( void(*OnReflashUpdate)(const wchar_t*,unsigned long) ) PyObject* meth_set_reflash_callback(PyObject* self, PyObject* args) { + (void)self; PyObject* callback = NULL; if (!PyArg_ParseTuple(args, arg_parse("|O:", __FUNCTION__), &callback)) { return NULL; @@ -1258,64 +2168,60 @@ PyObject* meth_set_reflash_callback(PyObject* self, PyObject* args) } else { msg_reflash_callback = callback; } - try - { + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoSetReflashCallback(lib, "icsneoSetReflashCallback"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoSetReflashCallback( + lib, "icsneoSetReflashCallback"); + auto gil = PyAllowThreads(); if (callback == Py_None) { - if (!icsneoSetReflashCallback(NULL)) { - Py_BLOCK_THREADS - return set_ics_exception(exception_runtime_error(), "icsneoSetReflashCallback() Failed"); - } + icsneoSetReflashCallback(NULL); } else { - if (!icsneoSetReflashCallback(&message_reflash_callback)) { - Py_BLOCK_THREADS - return set_ics_exception(exception_runtime_error(), "icsneoSetReflashCallback() Failed"); - } + icsneoSetReflashCallback(&message_reflash_callback); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_device_settings(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; long device_type_override = -1; - EPlasmaIonVnetChannel_t vnet_slot = (EPlasmaIonVnetChannel_t)PlasmaIonVnetChannelMain; - if (!PyArg_ParseTuple(args, arg_parse("O|lk:", __FUNCTION__), &obj, &device_type_override, &vnet_slot)) { + // 'k' would write a full unsigned long (8 bytes on LP64) into a 4 byte + // enum, so parse into an unsigned int and cast at the call sites. + unsigned int vnet_slot_arg = (unsigned int)PlasmaIonVnetChannelMain; + if (!PyArg_ParseTuple(args, arg_parse("O|lI:", __FUNCTION__), &obj, &device_type_override, &vnet_slot_arg)) { return NULL; } + EPlasmaIonVnetChannel_t vnet_slot = static_cast(vnet_slot_arg); // Before we do anything, we need to grab the python s_device_settings ctype.Structure. PyObject* settings = _getPythonModuleObject("ics.structures.s_device_settings", "s_device_settings"); - if (!settings) - { + if (!settings) { return NULL; } // Grab the buffer out of the newly created object - make sure to call PyBuffer_Release(&settings_buffer) when done. Py_buffer settings_buffer = {}; - PyObject_GetBuffer(settings, &settings_buffer, PyBUF_C_CONTIGUOUS | PyBUF_WRITABLE); + PyObject_GetBuffer(settings, &settings_buffer, PyBUF_CONTIG); // Verify we have a valid NeoDevice Object - This comes after s_device_settings allocation for testing purposes - if (!PyNeoDevice_CheckExact(obj)) { + if (!PyNeoDeviceEx_CheckExact(obj)) { PyBuffer_Release(&settings_buffer); Py_DECREF(settings); - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { PyBuffer_Release(&settings_buffer); @@ -1324,175 +2230,187 @@ PyObject* meth_get_device_settings(PyObject* self, PyObject* args) return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } // Set/Get the DeviceSettingsType - Py_BEGIN_ALLOW_THREADS + auto gil = PyAllowThreads(); EDeviceSettingsType* setting_type = &((SDeviceSettings*)settings_buffer.buf)->DeviceSettingType; - if (device_type_override == -1) - { - // int _stdcall icsneoGetDeviceSettingsType(void* hObject, EPlasmaIonVnetChannel_t vnetSlot, EDeviceSettingsType* pDeviceSettingsType) - ice::Function icsneoGetDeviceSettingsType(lib, "icsneoGetDeviceSettingsType"); - if (!icsneoGetDeviceSettingsType(handle, vnet_slot, setting_type)) - { - Py_BLOCK_THREADS + if (device_type_override == -1) { + // int _stdcall icsneoGetDeviceSettingsType(void* hObject, EPlasmaIonVnetChannel_t vnetSlot, + // EDeviceSettingsType* pDeviceSettingsType) + ice::Function + icsneoGetDeviceSettingsType(lib, "icsneoGetDeviceSettingsType"); + if (!icsneoGetDeviceSettingsType(handle, vnet_slot, setting_type)) { + gil.restore(); PyBuffer_Release(&settings_buffer); Py_DECREF(settings); return set_ics_exception(exception_runtime_error(), "icsneoGetDeviceSettingsType() Failed"); } } - // int _stdcall icsneoGetDeviceSettings(void* hObject, SDeviceSettings* pSettings, int iNumBytes, EPlasmaIonVnetChannel_t vnetSlot) - ice::Function icsneoGetDeviceSettings(lib, "icsneoGetDeviceSettings"); - if (!icsneoGetDeviceSettings(handle, (SDeviceSettings*)settings_buffer.buf, settings_buffer.len, vnet_slot)) - { - Py_BLOCK_THREADS + // int _stdcall icsneoGetDeviceSettings(void* hObject, SDeviceSettings* pSettings, int iNumBytes, + // EPlasmaIonVnetChannel_t vnetSlot) + ice::Function icsneoGetDeviceSettings( + lib, "icsneoGetDeviceSettings"); + if (!icsneoGetDeviceSettings( + handle, (SDeviceSettings*)settings_buffer.buf, static_cast(settings_buffer.len), vnet_slot)) { + gil.restore(); PyBuffer_Release(&settings_buffer); Py_DECREF(settings); return set_ics_exception(exception_runtime_error(), "icsneoGetDeviceSettings() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); PyBuffer_Release(&settings_buffer); return settings; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { PyBuffer_Release(&settings_buffer); return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_set_device_settings(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; PyObject* settings = NULL; int save_to_eeprom = 1; - EPlasmaIonVnetChannel_t vnet_slot = PlasmaIonVnetChannelMain; - if (!PyArg_ParseTuple(args, arg_parse("OO|ik:", __FUNCTION__), &obj, &settings, &save_to_eeprom, &vnet_slot)) { + // 'k' would write a full unsigned long (8 bytes on LP64) into a 4 byte + // enum, so parse into an unsigned int and cast at the call site. + unsigned int vnet_slot_arg = (unsigned int)PlasmaIonVnetChannelMain; + if (!PyArg_ParseTuple(args, arg_parse("OO|iI:", __FUNCTION__), &obj, &settings, &save_to_eeprom, &vnet_slot_arg)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + EPlasmaIonVnetChannel_t vnet_slot = static_cast(vnet_slot_arg); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - // int _stdcall icsneoSetDeviceSettings(void* hObject, SDeviceSettings* pSettings, int bSaveToEEPROM, EPlasmaIonVnetChannel_t vnetSlot) - // int _stdcall icsneoSetDeviceSettings(void* hObject, SDeviceSettings* pSettings, int iNumBytes, int bSaveToEEPROM, EPlasmaIonVnetChannel_t vnetSlot) - ice::Function icsneoSetDeviceSettings(lib, "icsneoSetDeviceSettings"); + // int _stdcall icsneoSetDeviceSettings(void* hObject, SDeviceSettings* pSettings, int bSaveToEEPROM, + // EPlasmaIonVnetChannel_t vnetSlot) int _stdcall icsneoSetDeviceSettings(void* hObject, SDeviceSettings* + // pSettings, int iNumBytes, int bSaveToEEPROM, EPlasmaIonVnetChannel_t vnetSlot) + ice::Function + icsneoSetDeviceSettings(lib, "icsneoSetDeviceSettings"); Py_buffer settings_buffer = {}; - PyObject_GetBuffer(settings, &settings_buffer, PyBUF_C_CONTIGUOUS | PyBUF_WRITABLE); - Py_BEGIN_ALLOW_THREADS - if (!icsneoSetDeviceSettings(handle, (SDeviceSettings*)settings_buffer.buf, settings_buffer.len, save_to_eeprom, vnet_slot)) { - Py_BLOCK_THREADS + PyObject_GetBuffer(settings, &settings_buffer, PyBUF_CONTIG); + auto gil = PyAllowThreads(); + if (!icsneoSetDeviceSettings(handle, + (SDeviceSettings*)settings_buffer.buf, + static_cast(settings_buffer.len), + save_to_eeprom, + vnet_slot)) { + gil.restore(); PyBuffer_Release(&settings_buffer); - return set_ics_exception_dev(exception_runtime_error(), obj, "icsneoSetDeviceSettings() Failed"); + return set_ics_exception(exception_runtime_error(), "icsneoSetDeviceSettings() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); PyBuffer_Release(&settings_buffer); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_load_default_settings(PyObject* self, PyObject* args) // icsneoLoadDefaultSettings { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - int errors[600] = {0}; - int error_count = 600; - PyObject* list = PyList_New(0); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoLoadDefaultSettings(lib, "icsneoLoadDefaultSettings"); - Py_BEGIN_ALLOW_THREADS - if (!icsneoLoadDefaultSettings(PyNeoDevice_GetNeoDevice(obj)->handle)) { - Py_BLOCK_THREADS - return set_ics_exception_dev(exception_runtime_error(), obj, "icsneoLoadDefaultSettings() Failed"); + ice::Function icsneoLoadDefaultSettings(lib, "icsneoLoadDefaultSettings"); + auto gil = PyAllowThreads(); + if (!icsneoLoadDefaultSettings(handle)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoLoadDefaultSettings() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } -PyObject* meth_read_sdcard(PyObject* self, PyObject* args) // icsneoReadSDCard(int hObject,unsigned long iSectorIndex,unsigned char *data, unsigned long *bytesRead) +PyObject* meth_read_sdcard(PyObject* self, + PyObject* args) // icsneoReadSDCard(int hObject,unsigned long iSectorIndex,unsigned char + // *data, unsigned long *bytesRead) { + (void)self; PyObject* obj = NULL; unsigned long index = 0; unsigned long size = 0; - if (!PyArg_ParseTuple(args, arg_parse("Ok:", __FUNCTION__), &obj, &index, &size)) { + if (!PyArg_ParseTuple(args, arg_parse("Okk:", __FUNCTION__), &obj, &index, &size)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } // We only read 512 bytes internally, x4 for future compatibility? - unsigned char data[2048] = {0}; - try - { + unsigned char data[2048] = { 0 }; + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoReadSDCard(lib, "icsneoReadSDCard"); - Py_BEGIN_ALLOW_THREADS - if (!icsneoReadSDCard(PyNeoDevice_GetNeoDevice(obj)->handle, index, data, &size)) { - Py_BLOCK_THREADS - return set_ics_exception_dev(exception_runtime_error(), obj, "icsneoReadSDCard() Failed"); + ice::Function icsneoReadSDCard( + lib, "icsneoReadSDCard"); + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + auto gil = PyAllowThreads(); + if (!icsneoReadSDCard(handle, index, data, &size)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoReadSDCard() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); PyObject* tuple = PyTuple_New(size); if (!tuple) { return NULL; } - for (unsigned long i=0; i < size; ++i) { + for (unsigned long i = 0; i < size; ++i) { PyTuple_SetItem(tuple, i, PyLong_FromLong(data[i])); } PyObject* byte_array = PyByteArray_FromObject(tuple); Py_DECREF(tuple); return byte_array; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } -PyObject* meth_write_sdcard(PyObject* self, PyObject* args) // icsneoWriteSDCard(int hObject,unsigned long iSectorIndex,const unsigned char *data) +PyObject* meth_write_sdcard( + PyObject* self, + PyObject* args) // icsneoWriteSDCard(int hObject,unsigned long iSectorIndex,const unsigned char *data) { + (void)self; PyObject* obj = NULL; unsigned long index = 0; PyObject* ba_obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("OkO:", __FUNCTION__), &obj, &index, &ba_obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } if (!PyByteArray_CheckExact(ba_obj)) { return set_ics_exception(exception_runtime_error(), "Argument must be a bytearray"); @@ -1501,33 +2419,32 @@ PyObject* meth_write_sdcard(PyObject* self, PyObject* args) // icsneoWriteSDCard return set_ics_exception(exception_runtime_error(), "bytearray must be 512 in length"); } // We only read 512 bytes internally, x4 for future compatibility? - try - { + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoWriteSDCard(lib, "icsneoWriteSDCard"); - Py_BEGIN_ALLOW_THREADS - if (!icsneoWriteSDCard(PyNeoDevice_GetNeoDevice(obj)->handle, index, (unsigned char*)PyByteArray_AsString(ba_obj))) { - Py_BLOCK_THREADS - return set_ics_exception_dev(exception_runtime_error(), obj, "icsneoWriteSDCard() Failed"); + ice::Function icsneoWriteSDCard(lib, "icsneoWriteSDCard"); + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + auto gil = PyAllowThreads(); + if (!icsneoWriteSDCard(handle, index, (unsigned char*)PyByteArray_AsString(ba_obj))) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoWriteSDCard() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_create_neovi_radio_message(PyObject* self, PyObject* args, PyObject* keywords) { - //int PyArg_ParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, char *keywords[], ...) - PyObject* obj = NULL; + (void)self; int relay1 = 0; int relay2 = 0; int relay3 = 0; @@ -1538,23 +2455,40 @@ PyObject* meth_create_neovi_radio_message(PyObject* self, PyObject* args, PyObje int msb = 0; int lsb = 0; int analog = 0; - int relay_timeout=0; - char* kwords[] = { "Relay1", "Relay2", "Relay3", "Relay4", "Relay5", "LED5", - "LED6", "MSB_report_rate", "LSB_report_rate", "analog_change_report_rate", "relay_timeout" }; - // Accepts keywords: Relay1-Relay5 (boolean), LED5 (boolean), LED6 (boolean), MSB_report_rate (int), + int relay_timeout = 0; +#if (PY_MAJOR_VERSION) >= 3 && (PY_MINOR_VERSION >= 13) + const +#endif + char* kwords[] = { "Relay1", "Relay2", "Relay3", "Relay4", "Relay5", + "LED5", "LED6", "MSB_report_rate", "LSB_report_rate", "analog_change_report_rate", + "relay_timeout" }; + // Accepts keywords: Relay1-Relay5 (boolean), LED5 (boolean), LED6 (boolean), MSB_report_rate (int), // LSB_report_rate (int), analog_change_report_rate (int), relay_timeout (int). - if (!PyArg_ParseTupleAndKeywords(args, keywords, arg_parse("|bbbbbbbiiii:", __FUNCTION__), kwords, &relay1, &relay2, - &relay3, &relay4, &relay5, &led5, &led6, &msb, &lsb, &analog, &relay_timeout)) { + if (!PyArg_ParseTupleAndKeywords(args, + keywords, + arg_parse("|bbbbbbbiiii:", __FUNCTION__), + kwords, + &relay1, + &relay2, + &relay3, + &relay4, + &relay5, + &led5, + &led6, + &msb, + &lsb, + &analog, + &relay_timeout)) { return NULL; } int byte1 = 0; - byte1 |= (relay1 ? 1:0) << 6; - byte1 |= (relay2 ? 1:0) << 5; - byte1 |= (relay3 ? 1:0) << 4; - byte1 |= (relay4 ? 1:0) << 3; - byte1 |= (relay5 ? 1:0) << 2; - byte1 |= (led5 ? 1:0) << 1; - byte1 |= (led6 ? 1:0) << 0; + byte1 |= (relay1 ? 1 : 0) << 6; + byte1 |= (relay2 ? 1 : 0) << 5; + byte1 |= (relay3 ? 1 : 0) << 4; + byte1 |= (relay4 ? 1 : 0) << 3; + byte1 |= (relay5 ? 1 : 0) << 2; + byte1 |= (led5 ? 1 : 0) << 1; + byte1 |= (led6 ? 1 : 0) << 0; int byte2 = msb & 0xFF; int byte3 = lsb & 0xFF; int byte4 = analog & 0xFF; @@ -1564,375 +2498,398 @@ PyObject* meth_create_neovi_radio_message(PyObject* self, PyObject* args, PyObje PyObject* meth_coremini_start_fblock(PyObject* self, PyObject* args) { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; - if (!PyArg_ParseTuple(args, arg_parse("Oi:", __FUNCTION__), &obj, &index)) { + if (!PyArg_ParseTuple(args, arg_parse("OI:", __FUNCTION__), &obj, &index)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetNeoDevice(obj)->handle; - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoScriptStartFBlock(lib, "icsneoScriptStartFBlock"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoScriptStartFBlock(lib, "icsneoScriptStartFBlock"); + auto gil = PyAllowThreads(); if (!icsneoScriptStartFBlock(handle, index)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoScriptStartFBlock() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_stop_fblock(PyObject* self, PyObject* args) { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; - if (!PyArg_ParseTuple(args, arg_parse("Oi:", __FUNCTION__), &obj, &index)) { + if (!PyArg_ParseTuple(args, arg_parse("OI:", __FUNCTION__), &obj, &index)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetNeoDevice(obj)->handle; - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoScriptStopFBlock(lib, "icsneoScriptStopFBlock"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoScriptStopFBlock(lib, "icsneoScriptStopFBlock"); + auto gil = PyAllowThreads(); if (!icsneoScriptStopFBlock(handle, index)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoScriptStopFBlock() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_get_fblock_status(PyObject* self, PyObject* args) { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; - if (!PyArg_ParseTuple(args, arg_parse("Oi:", __FUNCTION__), &obj, &index)) { + if (!PyArg_ParseTuple(args, arg_parse("OI:", __FUNCTION__), &obj, &index)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetNeoDevice(obj)->handle; - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoScriptGetFBlockStatus(lib, "icsneoScriptGetFBlockStatus"); + ice::Function icsneoScriptGetFBlockStatus( + lib, "icsneoScriptGetFBlockStatus"); int status = 0; - Py_BEGIN_ALLOW_THREADS + auto gil = PyAllowThreads(); if (!icsneoScriptGetFBlockStatus(handle, index, &status)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoScriptGetFBlockStatus() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); return Py_BuildValue("b", status == 1); - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } -PyObject* meth_coremini_read_app_signal(PyObject* self, PyObject* args) //ScriptReadAppSignal +PyObject* meth_coremini_read_app_signal(PyObject* self, PyObject* args) // ScriptReadAppSignal { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; - if (!PyArg_ParseTuple(args, arg_parse("Oi:", __FUNCTION__), &obj, &index)) { + if (!PyArg_ParseTuple(args, arg_parse("OI:", __FUNCTION__), &obj, &index)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetNeoDevice(obj)->handle; - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoScriptReadAppSignal(lib, "icsneoScriptReadAppSignal"); + ice::Function icsneoScriptReadAppSignal( + lib, "icsneoScriptReadAppSignal"); double value = 0; - Py_BEGIN_ALLOW_THREADS + auto gil = PyAllowThreads(); if (!icsneoScriptReadAppSignal(handle, index, &value)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoScriptReadAppSignal() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); return Py_BuildValue("d", value); - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } -PyObject* meth_coremini_write_app_signal(PyObject* self, PyObject* args) //ScriptWriteAppSignal +PyObject* meth_coremini_write_app_signal(PyObject* self, PyObject* args) // ScriptWriteAppSignal { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; double value = 0; - if (!PyArg_ParseTuple(args, arg_parse("Oid:", __FUNCTION__), &obj, &index, &value)) { + if (!PyArg_ParseTuple(args, arg_parse("OId:", __FUNCTION__), &obj, &index, &value)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetNeoDevice(obj)->handle; - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoScriptWriteAppSignal(lib, "icsneoScriptWriteAppSignal"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoScriptWriteAppSignal( + lib, "icsneoScriptWriteAppSignal"); + auto gil = PyAllowThreads(); if (!icsneoScriptWriteAppSignal(handle, index, value)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoScriptWriteAppSignal() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } -PyObject* meth_coremini_read_tx_message(PyObject* self, PyObject* args) //ScriptReadTxMessage +PyObject* meth_coremini_read_tx_message(PyObject* self, PyObject* args) // ScriptReadTxMessage { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; - int j1850 = 0; - if (!PyArg_ParseTuple(args, arg_parse("Oi|b:", __FUNCTION__), &obj, &index, &j1850)) { + // 'b' writes a single byte, so the target must be byte sized + unsigned char j1850 = 0; + if (!PyArg_ParseTuple(args, arg_parse("OI|b:", __FUNCTION__), &obj, &index, &j1850)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetNeoDevice(obj)->handle; - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoScriptReadTxMessage(lib, "icsneoScriptReadTxMessage"); + ice::Function icsneoScriptReadTxMessage(lib, + "icsneoScriptReadTxMessage"); PyObject* msg = NULL; if (j1850) { msg = PyObject_CallObject((PyObject*)&spy_message_j1850_object_type, NULL); if (!msg) { - // This should only happen if we run out of memory (malloc failure)? - PyErr_Print(); - return set_ics_exception(exception_runtime_error(), "Failed to allocate " SPY_MESSAGE_J1850_OBJECT_NAME); + // This should only happen if we run out of memory (malloc failure)? + PyErr_Print(); + return set_ics_exception(exception_runtime_error(), + "Failed to allocate " SPY_MESSAGE_J1850_OBJECT_NAME); } - Py_BEGIN_ALLOW_THREADS + auto gil = PyAllowThreads(); if (!icsneoScriptReadTxMessage(handle, index, &PySpyMessageJ1850_GetObject(msg)->msg)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoScriptReadTxMessage() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); } else { - PyObject* msg = PyObject_CallObject((PyObject*)&spy_message_object_type, NULL); + msg = PyObject_CallObject((PyObject*)&spy_message_object_type, NULL); if (!msg) { - // This should only happen if we run out of memory (malloc failure)? - PyErr_Print(); - return set_ics_exception(exception_runtime_error(), "Failed to allocate " SPY_MESSAGE_OBJECT_NAME); + // This should only happen if we run out of memory (malloc failure)? + PyErr_Print(); + return set_ics_exception(exception_runtime_error(), "Failed to allocate " SPY_MESSAGE_OBJECT_NAME); } - Py_BEGIN_ALLOW_THREADS + auto gil = PyAllowThreads(); if (!icsneoScriptReadTxMessage(handle, index, &PySpyMessage_GetObject(msg)->msg)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoScriptReadTxMessage() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); } return msg; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } -PyObject* meth_coremini_read_rx_message(PyObject* self, PyObject* args) //ScriptReadRxMessage +PyObject* meth_coremini_read_rx_message(PyObject* self, PyObject* args) // ScriptReadRxMessage { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; - int j1850 = 0; - if (!PyArg_ParseTuple(args, arg_parse("Oi|b:", __FUNCTION__), &obj, &index, &j1850)) { + // 'b' writes a single byte, so the target must be byte sized + unsigned char j1850 = 0; + if (!PyArg_ParseTuple(args, arg_parse("OI|b:", __FUNCTION__), &obj, &index, &j1850)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetNeoDevice(obj)->handle; - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoScriptReadRxMessage(lib, "icsneoScriptReadRxMessage"); + ice::Function icsneoScriptReadRxMessage( + lib, "icsneoScriptReadRxMessage"); PyObject* msg = NULL; PyObject* msg_mask = NULL; if (j1850) { msg = PyObject_CallObject((PyObject*)&spy_message_j1850_object_type, NULL); if (!msg) { - // This should only happen if we run out of memory (malloc failure)? - PyErr_Print(); - return set_ics_exception(exception_runtime_error(), "Failed to allocate " SPY_MESSAGE_J1850_OBJECT_NAME); + // This should only happen if we run out of memory (malloc failure)? + PyErr_Print(); + return set_ics_exception(exception_runtime_error(), + "Failed to allocate " SPY_MESSAGE_J1850_OBJECT_NAME); } msg_mask = PyObject_CallObject((PyObject*)&spy_message_j1850_object_type, NULL); if (!msg_mask) { - // This should only happen if we run out of memory (malloc failure)? - PyErr_Print(); - return set_ics_exception(exception_runtime_error(), "Failed to allocate " SPY_MESSAGE_J1850_OBJECT_NAME); + // This should only happen if we run out of memory (malloc failure)? + PyErr_Print(); + return set_ics_exception(exception_runtime_error(), + "Failed to allocate " SPY_MESSAGE_J1850_OBJECT_NAME); } - Py_BEGIN_ALLOW_THREADS - if (!icsneoScriptReadRxMessage(handle, index, &PySpyMessageJ1850_GetObject(msg_mask)->msg, &PySpyMessageJ1850_GetObject(msg_mask)->msg)) { - Py_BLOCK_THREADS + auto gil = PyAllowThreads(); + if (!icsneoScriptReadRxMessage(handle, + index, + &PySpyMessageJ1850_GetObject(msg_mask)->msg, + &PySpyMessageJ1850_GetObject(msg_mask)->msg)) { + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoScriptReadRxMessage() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); } else { - PyObject* msg = PyObject_CallObject((PyObject*)&spy_message_object_type, NULL); + msg = PyObject_CallObject((PyObject*)&spy_message_object_type, NULL); if (!msg) { - // This should only happen if we run out of memory (malloc failure)? - PyErr_Print(); - return set_ics_exception(exception_runtime_error(), "Failed to allocate " SPY_MESSAGE_OBJECT_NAME); + // This should only happen if we run out of memory (malloc failure)? + PyErr_Print(); + return set_ics_exception(exception_runtime_error(), "Failed to allocate " SPY_MESSAGE_OBJECT_NAME); } - PyObject* msg_mask = PyObject_CallObject((PyObject*)&spy_message_object_type, NULL); + msg_mask = PyObject_CallObject((PyObject*)&spy_message_object_type, NULL); if (!msg_mask) { - // This should only happen if we run out of memory (malloc failure)? - PyErr_Print(); - return set_ics_exception(exception_runtime_error(), "Failed to allocate " SPY_MESSAGE_OBJECT_NAME); + // This should only happen if we run out of memory (malloc failure)? + PyErr_Print(); + return set_ics_exception(exception_runtime_error(), "Failed to allocate " SPY_MESSAGE_OBJECT_NAME); } - Py_BEGIN_ALLOW_THREADS - if (!icsneoScriptReadRxMessage(handle, index, &PySpyMessage_GetObject(msg)->msg, &PySpyMessage_GetObject(msg_mask)->msg)) { - Py_BLOCK_THREADS + auto gil = PyAllowThreads(); + if (!icsneoScriptReadRxMessage( + handle, index, &PySpyMessage_GetObject(msg)->msg, &PySpyMessage_GetObject(msg_mask)->msg)) { + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoScriptReadRxMessage() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); } return Py_BuildValue("(O,O)", msg, msg_mask); - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } -PyObject* meth_coremini_write_tx_message(PyObject* self, PyObject* args) //icsneoScriptWriteTxMessage +PyObject* meth_coremini_write_tx_message(PyObject* self, PyObject* args) // icsneoScriptWriteTxMessage { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; PyObject* msg_obj = NULL; - int j1850 = 0; - if (!PyArg_ParseTuple(args, arg_parse("OiO|b:", __FUNCTION__), &obj, &index, &msg_obj, &j1850)) { + // 'b' writes a single byte, so the target must be byte sized + unsigned char j1850 = 0; + if (!PyArg_ParseTuple(args, arg_parse("OIO|b:", __FUNCTION__), &obj, &index, &msg_obj, &j1850)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; } - ICS_HANDLE handle = PyNeoDevice_GetNeoDevice(obj)->handle; void* msg = NULL; - void* msg_mask = NULL; if (j1850) { // We are going to use icsSpyMessageJ1850 objects here. if (!PySpyMessageJ1850_CheckExact(msg_obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." SPY_MESSAGE_J1850_OBJECT_NAME); + return set_ics_exception(exception_runtime_error(), + "Argument must be of type " MODULE_NAME "." SPY_MESSAGE_J1850_OBJECT_NAME); } msg = (void*)&PySpyMessageJ1850_GetObject(msg_obj)->msg; } else { // We are going to use icsSpyMessage objects here. if (!PySpyMessage_CheckExact(msg_obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME); + return set_ics_exception(exception_runtime_error(), + "Argument must be of type " MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME); } msg = (void*)&PySpyMessage_GetObject(msg_obj)->msg; } - try - { + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoScriptWriteTxMessage(lib, "icsneoScriptWriteTxMessage"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoScriptWriteTxMessage( + lib, "icsneoScriptWriteTxMessage"); + auto gil = PyAllowThreads(); if (!icsneoScriptWriteTxMessage(handle, index, msg)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoScriptWriteTxMessage() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } -PyObject* meth_coremini_write_rx_message(PyObject* self, PyObject* args) //icsneoScriptWriteRxMessage +PyObject* meth_coremini_write_rx_message(PyObject* self, PyObject* args) // icsneoScriptWriteRxMessage { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; PyObject* msg_obj = NULL; PyObject* msg_mask_obj = NULL; - int j1850 = 0; - if (!PyArg_ParseTuple(args, arg_parse("OiOO|b:", __FUNCTION__), &obj, &index, &msg_obj, &msg_mask_obj, &j1850)) { + // 'b' writes a single byte, so the target must be byte sized + unsigned char j1850 = 0; + if (!PyArg_ParseTuple(args, arg_parse("OIOO|b:", __FUNCTION__), &obj, &index, &msg_obj, &msg_mask_obj, &j1850)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; } - ICS_HANDLE handle = PyNeoDevice_GetNeoDevice(obj)->handle; void* msg = NULL; void* msg_mask = NULL; if (j1850) { // We are going to use icsSpyMessageJ1850 objects here. if (!PySpyMessageJ1850_CheckExact(msg_obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." SPY_MESSAGE_J1850_OBJECT_NAME); + return set_ics_exception(exception_runtime_error(), + "Argument must be of type " MODULE_NAME "." SPY_MESSAGE_J1850_OBJECT_NAME); } msg = (void*)&PySpyMessageJ1850_GetObject(msg_obj)->msg; if (!PySpyMessageJ1850_CheckExact(msg_mask_obj)) { @@ -1944,7 +2901,8 @@ PyObject* meth_coremini_write_rx_message(PyObject* self, PyObject* args) //icsne } else { // We are going to use icsSpyMessage objects here. if (!PySpyMessage_CheckExact(msg_obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME); + return set_ics_exception(exception_runtime_error(), + "Argument must be of type " MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME); } msg = (void*)&PySpyMessage_GetObject(msg_obj)->msg; if (!PySpyMessage_CheckExact(msg_mask_obj)) { @@ -1954,44 +2912,45 @@ PyObject* meth_coremini_write_rx_message(PyObject* self, PyObject* args) //icsne msg_mask = (void*)&PySpyMessage_GetObject(msg_mask_obj)->msg; } } - try - { + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoScriptWriteRxMessage(lib, "icsneoScriptWriteRxMessage"); + ice::Function icsneoScriptWriteRxMessage( + lib, "icsneoScriptWriteRxMessage"); if (!icsneoScriptWriteRxMessage(handle, index, msg, msg_mask)) { return set_ics_exception(exception_runtime_error(), "icsneoScriptWriteRxMessage() Failed"); } Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_performance_parameters(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetNeoDevice(obj)->handle; - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoGetPerformanceParameters(lib, "icsneoGetPerformanceParameters"); + ice::Function + icsneoGetPerformanceParameters(lib, "icsneoGetPerformanceParameters"); int buffer_count = 0; int buffer_max = 0; int overflow_count = 0; @@ -2000,206 +2959,224 @@ PyObject* meth_get_performance_parameters(PyObject* self, PyObject* args) int reserved3 = 0; int reserved4 = 0; int reserved5 = 0; - Py_BEGIN_ALLOW_THREADS - if (!icsneoGetPerformanceParameters(handle, &buffer_count, &buffer_max, &overflow_count, &reserved1, &reserved2, &reserved3, &reserved4, &reserved5)) { - Py_BLOCK_THREADS + auto gil = PyAllowThreads(); + if (!icsneoGetPerformanceParameters(handle, + &buffer_count, + &buffer_max, + &overflow_count, + &reserved1, + &reserved2, + &reserved3, + &reserved4, + &reserved5)) { + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoGetPerformanceParameters() Failed"); } - Py_END_ALLOW_THREADS - return Py_BuildValue("(i,i,i,i,i,i,i,i)", buffer_count, buffer_max, overflow_count, reserved1, reserved2, reserved3, reserved4, reserved5); - } - catch (ice::Exception& ex) - { + gil.restore(); + return Py_BuildValue("(i,i,i,i,i,i,i,i)", + buffer_count, + buffer_max, + overflow_count, + reserved1, + reserved2, + reserved3, + reserved4, + reserved5); + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_validate_hobject(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyLong_CheckExact(obj) && !PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME " or Integer"); + if (!PyLong_CheckExact(obj) && !PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), + "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx" + " or Integer"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoValidateHObject(lib, "icsneoValidateHObject"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoValidateHObject(lib, "icsneoValidateHObject"); + auto gil = PyAllowThreads(); if (!icsneoValidateHObject(handle)) { - Py_BLOCK_THREADS + gil.restore(); return Py_BuildValue("b", false); } - Py_END_ALLOW_THREADS + gil.restore(); return Py_BuildValue("b", true); - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_last_api_error(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetNeoDevice(obj)->handle; - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoGetLastAPIError(lib, "icsneoGetLastAPIError"); - ice::Function icsneoGetErrorInfo(lib, "icsneoGetErrorInfo"); - int error = 0; - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoGetLastAPIError(lib, "icsneoGetLastAPIError"); + ice::Function icsneoGetErrorInfo( + lib, "icsneoGetErrorInfo"); + unsigned long error = 0; + auto gil = PyAllowThreads(); if (!icsneoGetLastAPIError(handle, &error)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoGetLastAPIError() Failed"); } - Py_END_ALLOW_THREADS - char description_short[255] = {0}; - char description_long[255] = {0}; + gil.restore(); + char description_short[255] = { 0 }; + char description_long[255] = { 0 }; int description_short_length = 255; int description_long_length = 255; int severity = 0, restart_needed = 0; - if (!icsneoGetErrorInfo(error, description_short, description_long, - &description_short_length, &description_long_length, &severity, &restart_needed)) { + if (!icsneoGetErrorInfo(error, + description_short, + description_long, + &description_short_length, + &description_long_length, + &severity, + &restart_needed)) { return set_ics_exception(exception_runtime_error(), "icsneoGetErrorInfo() Failed"); } - return Py_BuildValue("i, s, s, i, i", error, description_short, description_long, severity, restart_needed); - } - catch (ice::Exception& ex) - { + return Py_BuildValue("k, s, s, i, i", error, description_short, description_long, severity, restart_needed); + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_dll_version(PyObject* self, PyObject* args) { - try - { + (void)self; + (void)args; + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoGetDLLVersion(lib, "icsneoGetDLLVersion"); + ice::Function icsneoGetDLLVersion(lib, "icsneoGetDLLVersion"); int result = 0; - Py_BEGIN_ALLOW_THREADS + auto gil = PyAllowThreads(); result = icsneoGetDLLVersion(); - Py_END_ALLOW_THREADS + gil.restore(); return Py_BuildValue("i", result); - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } - PyObject* meth_get_serial_number(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoGetSerialNumber(lib, "icsneoGetSerialNumber"); + ice::Function icsneoGetSerialNumber(lib, "icsneoGetSerialNumber"); unsigned int serial = 0; - Py_BEGIN_ALLOW_THREADS + auto gil = PyAllowThreads(); if (!icsneoGetSerialNumber(handle, &serial)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoGetSerialNumber() Failed"); } - Py_END_ALLOW_THREADS - return Py_BuildValue("i", serial); - } - catch (ice::Exception& ex) - { + gil.restore(); + // 'I': serials above 0x7FFFFFFF ("ZIK0ZK".."ZZZZZZ") must stay positive + return Py_BuildValue("I", serial); + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_hw_firmware_info(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoGetHWFirmwareInfo(lib, "icsneoGetHWFirmwareInfo"); + ice::Function icsneoGetHWFirmwareInfo(lib, "icsneoGetHWFirmwareInfo"); PyObject* info = _getPythonModuleObject("ics.structures.st_api_firmware_info", "st_api_firmware_info"); - if (!info) - { + if (!info) { return NULL; } Py_buffer info_buffer = {}; - PyObject_GetBuffer(info, &info_buffer, PyBUF_SIMPLE); + PyObject_GetBuffer(info, &info_buffer, PyBUF_CONTIG); - - Py_BEGIN_ALLOW_THREADS + auto gil = PyAllowThreads(); if (!icsneoGetHWFirmwareInfo(handle, (stAPIFirmwareInfo*)info_buffer.buf)) { - Py_BLOCK_THREADS + gil.restore(); PyBuffer_Release(&info_buffer); return set_ics_exception(exception_runtime_error(), "icsneoGetHWFirmwareInfo() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); return info; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_base36enc(PyObject* self, PyObject* args) { - unsigned long value = 0; - if (!PyArg_ParseTuple(args, arg_parse("i:", __FUNCTION__), &value)) { + (void)self; + unsigned long long value = 0; + if (!PyArg_ParseTuple(args, arg_parse("K:", __FUNCTION__), &value)) { return NULL; } - char base36[37] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + constexpr char base36[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; /* log(2**64) / log(36) = 12.38 => max 13 char + '\0' */ char buffer[100]; unsigned int offset = sizeof(buffer); @@ -2211,9 +3188,9 @@ PyObject* meth_base36enc(PyObject* self, PyObject* args) return Py_BuildValue("s", &buffer[offset]); } - PyObject* meth_request_enter_sleep_mode(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned int timeout_ms = 0; unsigned int mode = 0; @@ -2221,294 +3198,303 @@ PyObject* meth_request_enter_sleep_mode(PyObject* self, PyObject* args) if (!PyArg_ParseTuple(args, arg_parse("Oii|i:", __FUNCTION__), &obj, &timeout_ms, &mode, &reserved)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoRequestEnterSleepMode(lib, "icsneoRequestEnterSleepMode"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoRequestEnterSleepMode( + lib, "icsneoRequestEnterSleepMode"); + auto gil = PyAllowThreads(); if (!icsneoRequestEnterSleepMode(handle, timeout_ms, mode, reserved)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoRequestEnterSleepMode() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); return Py_BuildValue("b", true); - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_set_context(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj) && !PyLong_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + void* handle = NULL; + if (!PyNeoDeviceEx_CheckExact(obj) && obj != Py_None && obj != Py_False && + !(PyLong_Check(obj) && PyLong_AsLong(obj) == 0)) { + return set_ics_exception(exception_runtime_error(), + "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx, or False"); + } + // Set 'handle' to NULL if 'obj' is None, False, or a zero-valued integer. + // Otherwise, attempt to retrieve the handle using 'PyNeoDeviceEx_GetHandle'. + // If handle retrieval fails, raise a runtime error exception. + if (obj == Py_None || obj == Py_False || (PyLong_Check(obj) && PyLong_AsLong(obj) == 0)) { + handle = NULL; + } else { + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return set_ics_exception(exception_runtime_error(), "Failed to retrieve handle."); + } } - ICS_HANDLE handle = 0; - if (PyNeoDevice_CheckExact(obj)) - handle = PyNeoDevice_GetHandle(obj); - try - { + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoSetContext(lib, "icsneoSetContext"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoSetContext(lib, "icsneoSetContext"); + auto gil = PyAllowThreads(); if (!icsneoSetContext(handle)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoSetContext() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); return Py_BuildValue("b", true); - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_force_firmware_update(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj) && !PyLong_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj) && !PyLong_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = 0; - if (PyNeoDevice_CheckExact(obj)) - handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoForceFirmwareUpdate(lib, "icsneoForceFirmwareUpdate"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoForceFirmwareUpdate(lib, "icsneoForceFirmwareUpdate"); + auto gil = PyAllowThreads(); if (!icsneoForceFirmwareUpdate(handle)) { - Py_BLOCK_THREADS + gil.restore(); return Py_BuildValue("b", false); } - Py_END_ALLOW_THREADS + gil.restore(); return Py_BuildValue("b", true); - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_firmware_update_required(PyObject* self, PyObject* args) -{ +{ + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj) && !PyLong_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj) && !PyLong_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = 0; - if (PyNeoDevice_CheckExact(obj)) - handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoFirmwareUpdateRequired(lib, "icsneoFirmwareUpdateRequired"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoFirmwareUpdateRequired(lib, "icsneoFirmwareUpdateRequired"); + auto gil = PyAllowThreads(); if (!icsneoFirmwareUpdateRequired(handle)) { - Py_BLOCK_THREADS + gil.restore(); return Py_BuildValue("b", false); } - Py_END_ALLOW_THREADS + gil.restore(); return Py_BuildValue("b", true); - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_dll_firmware_info(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoGetDLLFirmwareInfo(lib, "icsneoGetDLLFirmwareInfo"); + ice::Function icsneoGetDLLFirmwareInfo(lib, + "icsneoGetDLLFirmwareInfo"); PyObject* info = _getPythonModuleObject("ics.structures.st_api_firmware_info", "st_api_firmware_info"); - if (!info) - { + if (!info) { return NULL; } Py_buffer info_buffer = {}; - PyObject_GetBuffer(info, &info_buffer, PyBUF_SIMPLE); - Py_BEGIN_ALLOW_THREADS + PyObject_GetBuffer(info, &info_buffer, PyBUF_CONTIG); + auto gil = PyAllowThreads(); if (!icsneoGetDLLFirmwareInfo(handle, (stAPIFirmwareInfo*)info_buffer.buf)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoGetDLLFirmwareInfo() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); return info; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_backup_power_enabled(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned int enabled = 0; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoGetBackupPowerEnabled(lib, "icsneoGetBackupPowerEnabled"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoGetBackupPowerEnabled(lib, + "icsneoGetBackupPowerEnabled"); + auto gil = PyAllowThreads(); if (!icsneoGetBackupPowerEnabled(handle, enabled)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoGetBackupPowerEnabled() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); return Py_BuildValue("b", enabled); - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_set_backup_power_enabled(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; - unsigned int enabled = 1; + // 'b' writes a single byte, so the target must be byte sized + unsigned char enabled = 1; if (!PyArg_ParseTuple(args, arg_parse("O|b:", __FUNCTION__), &obj, &enabled)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoSetBackupPowerEnabled(lib, "icsneoSetBackupPowerEnabled"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoSetBackupPowerEnabled(lib, + "icsneoSetBackupPowerEnabled"); + auto gil = PyAllowThreads(); if (!icsneoSetBackupPowerEnabled(handle, enabled)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoSetBackupPowerEnabled() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); return Py_BuildValue("b", enabled); - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_backup_power_ready(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned int enabled = 0; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoGetBackupPowerReady(lib, "icsneoGetBackupPowerReady"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoGetBackupPowerReady(lib, "icsneoGetBackupPowerReady"); + auto gil = PyAllowThreads(); if (!icsneoGetBackupPowerReady(handle, enabled)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoGetBackupPowerReady() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); return Py_BuildValue("b", enabled); - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } -//icsneoScriptLoadReadBin +// icsneoScriptLoadReadBin PyObject* meth_load_readbin(PyObject* self, PyObject* args) { + (void)self; PyObject* arg_data = NULL; int location; PyObject* obj = NULL; - bool isFileData = false; if (!PyArg_ParseTuple(args, arg_parse("OOi:", __FUNCTION__), &obj, &arg_data, &location)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; } - ICS_HANDLE handle = PyNeoDevice_GetNeoDevice(obj)->handle; long fsize; unsigned char* data = NULL; int data_size = 0; @@ -2520,506 +3506,520 @@ PyObject* meth_load_readbin(PyObject* self, PyObject* args) char* file_name = PyUniStr_AsStrOrUTF8(arg_data); #endif if (!file_name) { - return set_ics_exception_dev(exception_runtime_error(), obj, "Failed to convert file path to string"); + return set_ics_exception(exception_runtime_error(), "Failed to convert file path to string"); } FILE* f; f = fopen(file_name, "rb"); - if (!f) { + if (!f) { std::stringstream ss; ss << "Failed to open Readbin: '" << file_name << "'. Please make sure path exists"; - return set_ics_exception_dev(exception_runtime_error(), obj, (char*)ss.str().c_str()); + return set_ics_exception(exception_runtime_error(), (char*)ss.str().c_str()); } fseek(f, 0, SEEK_END); fsize = ftell(f); rewind(f); - data = (unsigned char*) malloc(sizeof(char)*fsize); - data_size = (int)fread(data, 1, fsize, f); + // ftell() returns a 32 bit long on Windows; a negative or huge result + // means the file is too large to load through this int-sized API. + if (fsize < 0 || fsize > INT_MAX) { + fclose(f); + return set_ics_exception(exception_runtime_error(), "Readbin file size is invalid"); + } + data = (unsigned char*)malloc(sizeof(char) * fsize); + data_size = (int)fread(data, 1, static_cast(fsize), f); fclose(f); if (fsize != data_size) { - return set_ics_exception_dev(exception_runtime_error(), obj, "Readbin file size mismatch"); + return set_ics_exception(exception_runtime_error(), "Readbin file size mismatch"); } } else if (PyTuple_CheckExact(arg_data)) { Py_ssize_t tuple_size = PyTuple_Size(arg_data); - data = (unsigned char*) malloc(sizeof(char)*tuple_size); + data = (unsigned char*)malloc(sizeof(char) * tuple_size); // Move tuple data into array - for (int i=0; i < tuple_size; ++i) { + for (int i = 0; i < tuple_size; ++i) { PyObject* value = PyTuple_GET_ITEM(arg_data, i); if (!PyLong_CheckExact(value)) { - return set_ics_exception_dev(exception_runtime_error(), obj, "Failed to convert tuple data. Tuple data must be integer type"); + return set_ics_exception(exception_runtime_error(), + "Failed to convert tuple data. Tuple data must be integer type"); } data[i] = (unsigned char)PyLong_AsLong(PyTuple_GET_ITEM(arg_data, i)); } - fsize = tuple_size; + fsize = static_cast(tuple_size); data_size = fsize; } else { - return set_ics_exception_dev(exception_runtime_error(), obj, "Argument must be filepath or tuple"); + return set_ics_exception(exception_runtime_error(), "Argument must be filepath or tuple"); } - try - { + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoScriptLoadReadBin(lib, "icsneoScriptLoadReadBin"); - Py_BEGIN_ALLOW_THREADS - if (!icsneoScriptLoadReadBin(handle, data, data_size, location)) { - Py_BLOCK_THREADS + ice::Function icsneoScriptLoadReadBin( + lib, "icsneoScriptLoadReadBin"); + auto gil = PyAllowThreads(); + if (!icsneoScriptLoadReadBin(handle, data, static_cast(data_size), location)) { + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoScriptLoadReadBin() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } -//void* hObject, unsigned long ulNetworkID, stCM_ISO157652_TxMessage *pMsg, unsigned long ulBlockingTimeout) +// void* hObject, unsigned long ulNetworkID, stCM_ISO157652_TxMessage *pMsg, unsigned long ulBlockingTimeout) PyObject* meth_iso15765_transmit_message(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned long ulNetworkID = 0; PyObject* obj_tx_msg = NULL; unsigned long ulBlockingTimeout = 0; - if (!PyArg_ParseTuple(args, arg_parse("OkOk:", __FUNCTION__), &obj, &ulNetworkID, &obj_tx_msg, &ulBlockingTimeout)) { + if (!PyArg_ParseTuple( + args, arg_parse("OkOk:", __FUNCTION__), &obj, &ulNetworkID, &obj_tx_msg, &ulBlockingTimeout)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - if (_isPythonModuleObject_IsInstance(obj_tx_msg, "ics.structures.st_cm_iso157652_tx_message", "st_cm_iso157652_tx_message") != 1) - { + if (_isPythonModuleObject_IsInstance( + obj_tx_msg, "ics.structures.st_cm_iso157652_tx_message", "st_cm_iso157652_tx_message") != 1) { return NULL; } Py_buffer obj_tx_msg_buffer = {}; - PyObject_GetBuffer(obj_tx_msg, &obj_tx_msg_buffer, PyBUF_SIMPLE); + PyObject_GetBuffer(obj_tx_msg, &obj_tx_msg_buffer, PyBUF_CONTIG); - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoISO15765_TransmitMessage(lib, "icsneoISO15765_TransmitMessage"); - Py_BEGIN_ALLOW_THREADS - if (!icsneoISO15765_TransmitMessage(handle, ulNetworkID, (stCM_ISO157652_TxMessage*)obj_tx_msg_buffer.buf, ulBlockingTimeout)) { - Py_BLOCK_THREADS + ice::Function + icsneoISO15765_TransmitMessage(lib, "icsneoISO15765_TransmitMessage"); + auto gil = PyAllowThreads(); + if (!icsneoISO15765_TransmitMessage( + handle, ulNetworkID, (stCM_ISO157652_TxMessage*)obj_tx_msg_buffer.buf, ulBlockingTimeout)) { + gil.restore(); PyBuffer_Release(&obj_tx_msg_buffer); return set_ics_exception(exception_runtime_error(), "icsneoISO15765_TransmitMessage() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); PyBuffer_Release(&obj_tx_msg_buffer); return Py_BuildValue("b", true); - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_iso15765_receive_message(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; PyObject* obj_rx_msg = NULL; unsigned int iIndex = 0; - //PyObject* obj_rx_msg = PyObject_CallObject((PyObject*)&cm_iso157652_rx_message_object_type, NULL); + // PyObject* obj_rx_msg = PyObject_CallObject((PyObject*)&cm_iso157652_rx_message_object_type, NULL); if (!PyArg_ParseTuple(args, arg_parse("OiO:", __FUNCTION__), &obj, &iIndex, &obj_rx_msg)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - if (_isPythonModuleObject_IsInstance(obj_rx_msg, "ics.structures.st_cm_iso157652_rx_message", "st_cm_iso157652_rx_message") != 1) - { + if (_isPythonModuleObject_IsInstance( + obj_rx_msg, "ics.structures.st_cm_iso157652_rx_message", "st_cm_iso157652_rx_message") != 1) { return NULL; } Py_buffer obj_rx_msg_buffer = {}; - PyObject_GetBuffer(obj_rx_msg, &obj_rx_msg_buffer, PyBUF_SIMPLE); + PyObject_GetBuffer(obj_rx_msg, &obj_rx_msg_buffer, PyBUF_CONTIG); - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; PyBuffer_Release(&obj_rx_msg_buffer); return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - //stCM_ISO157652_RxMessage rx_msg_temp = {0}; - //memcpy(&rx_msg_temp, &(temp->s), sizeof(temp->s)); - ice::Function icsneoISO15765_ReceiveMessage(lib, "icsneoISO15765_ReceiveMessage"); - Py_BEGIN_ALLOW_THREADS + // stCM_ISO157652_RxMessage rx_msg_temp = {0}; + // memcpy(&rx_msg_temp, &(temp->s), sizeof(temp->s)); + ice::Function icsneoISO15765_ReceiveMessage( + lib, "icsneoISO15765_ReceiveMessage"); + auto gil = PyAllowThreads(); if (!icsneoISO15765_ReceiveMessage(handle, iIndex, (stCM_ISO157652_RxMessage*)obj_rx_msg_buffer.buf)) { - Py_BLOCK_THREADS + gil.restore(); PyBuffer_Release(&obj_rx_msg_buffer); return set_ics_exception(exception_runtime_error(), "icsneoISO15765_ReceiveMessage() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); PyBuffer_Release(&obj_rx_msg_buffer); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { PyBuffer_Release(&obj_rx_msg_buffer); return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_iso15765_enable_networks(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned long networks = 0; - if (!PyArg_ParseTuple(args, arg_parse("Oi:", __FUNCTION__), &obj, &networks)) { + if (!PyArg_ParseTuple(args, arg_parse("Ok:", __FUNCTION__), &obj, &networks)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoISO15765_EnableNetworks(lib, "icsneoISO15765_EnableNetworks"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoISO15765_EnableNetworks( + lib, "icsneoISO15765_EnableNetworks"); + auto gil = PyAllowThreads(); if (!icsneoISO15765_EnableNetworks(handle, networks)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoISO15765_EnableNetworks() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_iso15765_disable_networks(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoISO15765_DisableNetworks(lib, "icsneoISO15765_DisableNetworks"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoISO15765_DisableNetworks(lib, "icsneoISO15765_DisableNetworks"); + auto gil = PyAllowThreads(); if (!icsneoISO15765_DisableNetworks(handle)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoISO15765_DisableNetworks() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_active_vnet_channel(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned long channel = 0; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoGetActiveVNETChannel(lib, "icsneoGetActiveVNETChannel"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoGetActiveVNETChannel(lib, + "icsneoGetActiveVNETChannel"); + auto gil = PyAllowThreads(); if (!icsneoGetActiveVNETChannel(handle, &channel)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoGetActiveVNETChannel() Failed"); } - Py_END_ALLOW_THREADS - return Py_BuildValue("i", channel); - } - catch (ice::Exception& ex) - { + gil.restore(); + return Py_BuildValue("k", channel); + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_set_active_vnet_channel(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned long channel = 0; - if (!PyArg_ParseTuple(args, arg_parse("Oi:", __FUNCTION__), &obj, &channel)) { + if (!PyArg_ParseTuple(args, arg_parse("Ok:", __FUNCTION__), &obj, &channel)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoSetActiveVNETChannel(lib, "icsneoSetActiveVNETChannel"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoSetActiveVNETChannel(lib, + "icsneoSetActiveVNETChannel"); + auto gil = PyAllowThreads(); if (!icsneoSetActiveVNETChannel(handle, channel)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoSetActiveVNETChannel() Failed"); } - Py_END_ALLOW_THREADS - return Py_BuildValue("i", channel); - } - catch (ice::Exception& ex) - { + gil.restore(); + return Py_BuildValue("k", channel); + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_set_bit_rate(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; int bitrate = 0; int net_id = 0; if (!PyArg_ParseTuple(args, arg_parse("Oii:", __FUNCTION__), &obj, &bitrate, &net_id)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoSetBitRate(lib, "icsneoSetBitRate"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoSetBitRate(lib, "icsneoSetBitRate"); + auto gil = PyAllowThreads(); if (!icsneoSetBitRate(handle, bitrate, net_id)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoSetBitRate() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_set_fd_bit_rate(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; int bitrate = 0; int net_id = 0; if (!PyArg_ParseTuple(args, arg_parse("Oii:", __FUNCTION__), &obj, &bitrate, &net_id)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoSetFDBitRate(lib, "icsneoSetFDBitRate"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoSetFDBitRate(lib, "icsneoSetFDBitRate"); + auto gil = PyAllowThreads(); if (!icsneoSetFDBitRate(handle, bitrate, net_id)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoSetFDBitRate() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_set_bit_rate_ex(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; - int bitrate = 0; + unsigned long bitrate = 0; int net_id = 0; int options = 0; - if (!PyArg_ParseTuple(args, arg_parse("Oiii:", __FUNCTION__), &obj, &bitrate, &net_id)) { + if (!PyArg_ParseTuple(args, arg_parse("Okii:", __FUNCTION__), &obj, &bitrate, &net_id, &options)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoSetBitRateEx(lib, "icsneoSetBitRateEx"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoSetBitRateEx(lib, "icsneoSetBitRateEx"); + auto gil = PyAllowThreads(); if (!icsneoSetBitRateEx(handle, bitrate, net_id, options)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoSetBitRateEx() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_timestamp_for_msg(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; PyObject* obj_msg = NULL; if (!PyArg_ParseTuple(args, arg_parse("OO:", __FUNCTION__), &obj, &obj_msg)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } if (!PySpyMessage_CheckExact(obj_msg) && !PySpyMessageJ1850_CheckExact(obj_msg)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME); + return set_ics_exception(exception_runtime_error(), + "Argument must be of type " MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); icsSpyMessage* msg = &PySpyMessage_GetObject(obj_msg)->msg; - try - { + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoGetTimeStampForMsg(lib, "icsneoGetTimeStampForMsg"); + ice::Function icsneoGetTimeStampForMsg( + lib, "icsneoGetTimeStampForMsg"); double timestamp = 0; - Py_BEGIN_ALLOW_THREADS + auto gil = PyAllowThreads(); if (!icsneoGetTimeStampForMsg(handle, msg, ×tamp)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoGetTimeStampForMsg() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); return Py_BuildValue("d", timestamp); - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_device_status(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; - int throw_exception_on_size_mismatch = 0; + // 'b' writes a single byte, so the target must be byte sized + unsigned char throw_exception_on_size_mismatch = 0; if (!PyArg_ParseTuple(args, arg_parse("O|b:", __FUNCTION__), &obj, &throw_exception_on_size_mismatch)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } PyObject* device_status = _getPythonModuleObject("ics.structures.ics_device_status", "ics_device_status"); - if (!device_status) - { + if (!device_status) { return NULL; } Py_buffer device_status_buffer = {}; - PyObject_GetBuffer(device_status, &device_status_buffer, PyBUF_SIMPLE); + PyObject_GetBuffer(device_status, &device_status_buffer, PyBUF_CONTIG); - size_t device_status_size = device_status_buffer.len; - ice::Function icsneoGetDeviceStatus(lib, "icsneoGetDeviceStatus"); - double timestamp = 0; - Py_BEGIN_ALLOW_THREADS + size_t device_status_size = static_cast(device_status_buffer.len); + ice::Function icsneoGetDeviceStatus(lib, + "icsneoGetDeviceStatus"); + auto gil = PyAllowThreads(); if (!icsneoGetDeviceStatus(handle, (icsDeviceStatus*)device_status_buffer.buf, &device_status_size)) { - Py_BLOCK_THREADS + gil.restore(); PyBuffer_Release(&device_status_buffer); return set_ics_exception(exception_runtime_error(), "icsneoGetDeviceStatus() Failed"); } - if (throw_exception_on_size_mismatch) - { - if (device_status_size != device_status_buffer.len) - { - Py_BLOCK_THREADS + if (throw_exception_on_size_mismatch) { + if (device_status_size != (size_t)device_status_buffer.len) { + gil.restore(); PyBuffer_Release(&device_status_buffer); return set_ics_exception(exception_runtime_error(), "icsneoGetDeviceStatus() API mismatch detected!"); } } - Py_END_ALLOW_THREADS + gil.restore(); return device_status; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_enable_network_com(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; - bool enable = true; + bool enable = true; long net_id = -1; if (!PyArg_ParseTuple(args, arg_parse("O|bk:", __FUNCTION__), &obj, &enable, &net_id)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; @@ -3027,79 +4027,80 @@ PyObject* meth_enable_network_com(PyObject* self, PyObject* args) } // int _stdcall icsneoEnableNetworkCom(void* hObject, int iEnable) // int _stdcall icsneoEnableNetworkComEx(void* hObject, int iEnable, int iNetId) - ice::Function icsneoEnableNetworkCom(lib, "icsneoEnableNetworkCom"); - ice::Function icsneoEnableNetworkComEx(lib, "icsneoEnableNetworkComEx"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoEnableNetworkCom(lib, "icsneoEnableNetworkCom"); + ice::Function icsneoEnableNetworkComEx(lib, "icsneoEnableNetworkComEx"); + auto gil = PyAllowThreads(); if (net_id == -1) { if (!icsneoEnableNetworkCom(handle, enable)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoEnableNetworkCom() Failed"); } } else { if (!icsneoEnableNetworkComEx(handle, enable, net_id)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoEnableNetworkComEx() Failed"); } } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_enable_bus_voltage_monitor(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned int enable = 1; unsigned int reserved = 0; if (!PyArg_ParseTuple(args, arg_parse("O|ii:", __FUNCTION__), &obj, &enable, &reserved)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } // int _stdcall icsneoEnableBusVoltageMonitor(void* hObject, unsigned int enable, unsigned int reserved) - ice::Function icsneoEnableBusVoltageMonitor(lib, "icsneoEnableBusVoltageMonitor"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoEnableBusVoltageMonitor( + lib, "icsneoEnableBusVoltageMonitor"); + auto gil = PyAllowThreads(); if (!icsneoEnableBusVoltageMonitor(handle, enable, reserved)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoEnableBusVoltageMonitor() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_bus_voltage(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned int reserved = 0; if (!PyArg_ParseTuple(args, arg_parse("O|i:", __FUNCTION__), &obj, &reserved)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { unsigned long mV = 0; ice::Library* lib = dll_get_library(); if (!lib) { @@ -3107,30 +4108,35 @@ PyObject* meth_get_bus_voltage(PyObject* self, PyObject* args) return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } // int _stdcall icsneoGetBusVoltage(void* hObject, unsigned long* pVBusVoltage, unsigned int reserved - ice::Function icsneoGetBusVoltage(lib, "icsneoGetBusVoltage"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoGetBusVoltage(lib, + "icsneoGetBusVoltage"); + auto gil = PyAllowThreads(); if (!icsneoGetBusVoltage(handle, &mV, reserved)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoGetBusVoltage() Failed"); } - Py_END_ALLOW_THREADS - return Py_BuildValue("i", mV); - } - catch (ice::Exception& ex) - { + gil.restore(); + return Py_BuildValue("k", mV); + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_read_jupiter_firmware(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; - size_t fileSize = 0; + // 'i' would write only 4 of size_t's 8 bytes (and reject sizes >= 2GB), + // so parse with 'n' into a Py_ssize_t. + Py_ssize_t file_size_arg = 0; EPlasmaIonVnetChannel_t channel = PlasmaIonVnetChannelMain; - if (!PyArg_ParseTuple(args, arg_parse("Oi|i:", __FUNCTION__), &obj, &fileSize, &channel)) { + if (!PyArg_ParseTuple(args, arg_parse("On|i:", __FUNCTION__), &obj, &file_size_arg, &channel)) { return NULL; } + if (file_size_arg < 0) { + return set_ics_exception(exception_runtime_error(), "file_size must not be negative"); + } + size_t fileSize = static_cast(file_size_arg); // Create the ByteArray PyObject* ba = PyObject_CallObject((PyObject*)&PyByteArray_Type, NULL); @@ -3138,47 +4144,50 @@ PyObject* meth_read_jupiter_firmware(PyObject* self, PyObject* args) return NULL; } // Resize the ByteArray - int ret_val = PyByteArray_Resize(ba, fileSize); + int ret_val = PyByteArray_Resize(ba, static_cast(fileSize)); + (void)ret_val; // TODO: Documentation doesn't say what return value is. - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - // int __stdcall icsneoReadJupiterFirmware(void* hObject, char* fileData, size_t* fileDataSize, EPlasmaIonVnetChannel_t channel) - ice::Function icsneoReadJupiterFirmware(lib, "icsneoReadJupiterFirmware"); + // int __stdcall icsneoReadJupiterFirmware(void* hObject, char* fileData, size_t* fileDataSize, + // EPlasmaIonVnetChannel_t channel) + ice::Function icsneoReadJupiterFirmware( + lib, "icsneoReadJupiterFirmware"); // Grab the ByteArray Buffer Object Py_buffer ba_buffer = {}; - PyObject_GetBuffer(ba, &ba_buffer, PyBUF_C_CONTIGUOUS | PyBUF_WRITABLE); + PyObject_GetBuffer(ba, &ba_buffer, PyBUF_CONTIG); - Py_BEGIN_ALLOW_THREADS + auto gil = PyAllowThreads(); if (!icsneoReadJupiterFirmware(handle, (char*)ba_buffer.buf, &fileSize, channel)) { - Py_BLOCK_THREADS + gil.restore(); PyBuffer_Release(&ba_buffer); return set_ics_exception(exception_runtime_error(), "icsneoReadJupiterFirmware() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); PyBuffer_Release(&ba_buffer); - return Py_BuildValue("Oi", ba, fileSize); - } - catch (ice::Exception& ex) - { + return Py_BuildValue("On", ba, (Py_ssize_t)fileSize); + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_write_jupiter_firmware(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; PyObject* bytes_obj = NULL; EPlasmaIonVnetChannel_t channel = PlasmaIonVnetChannelMain; @@ -3188,332 +4197,1520 @@ PyObject* meth_write_jupiter_firmware(PyObject* self, PyObject* args) if (!PyBytes_CheckExact(bytes_obj)) { return set_ics_exception(exception_runtime_error(), "Argument must be of Bytes type "); } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - // int __stdcall icsneoWriteJupiterFirmware(void* hObject, char* fileData, size_t fileDataSize, EPlasmaIonVnetChannel_t channel) - ice::Function icsneoWriteJupiterFirmware(lib, "icsneoWriteJupiterFirmware"); - + // int __stdcall icsneoWriteJupiterFirmware(void* hObject, char* fileData, size_t fileDataSize, + // EPlasmaIonVnetChannel_t channel) + ice::Function icsneoWriteJupiterFirmware( + lib, "icsneoWriteJupiterFirmware"); + // Convert the object to a bytes object PyObject* bytes = PyBytes_FromObject(bytes_obj); // Grab the byte size Py_ssize_t bsize = PyBytes_Size(bytes); // Grab the data out of the bytes char* bytes_str = PyBytes_AsString(bytes); - if (!bytes_str) - { + if (!bytes_str) { return NULL; } - - // Grab the ByteArray Buffer Object - //Py_buffer bytes_buffer = {}; - //PyObject_GetBuffer(bytes, &bytes_buffer, PyBUF_C_CONTIGUOUS); - Py_BEGIN_ALLOW_THREADS - //if (!icsneoWriteJupiterFirmware(handle, (char*)bytes_buffer.buf, bytes_buffer.len, channel)) { - if (!icsneoWriteJupiterFirmware(handle, bytes_str, bsize, channel)) { - Py_BLOCK_THREADS + auto gil = PyAllowThreads(); + // if (!icsneoWriteJupiterFirmware(handle, (char*)bytes_buffer.buf, bytes_buffer.len, channel)) { + if (!icsneoWriteJupiterFirmware(handle, bytes_str, static_cast(bsize), channel)) { + gil.restore(); Py_DECREF(bytes); - //PyBuffer_Release(&bytes_buffer); + // PyBuffer_Release(&bytes_buffer); return set_ics_exception(exception_runtime_error(), "icsneoWriteJupiterFirmware() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_DECREF(bytes); - //PyBuffer_Release(&bytes_buffer); + // PyBuffer_Release(&bytes_buffer); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); - } - -PyObject* meth_override_library_name(PyObject* self, PyObject* args) +PyObject* meth_flash_accessory_firmware(PyObject* self, PyObject* args) { - const char* name = NULL; - if (!PyArg_ParseTuple(args, arg_parse("s:", __FUNCTION__), &name)) { + (void)self; + PyObject* obj = NULL; + PyObject* parms = NULL; + bool check_success = true; + if (!PyArg_ParseTuple(args, arg_parse("OO|b:", __FUNCTION__), &obj, &parms, &check_success)) { return NULL; } - try - { - if (!dll_reinitialize((char*)name)) { - char buffer[512]; + + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + + try { + + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } + int function_error = (int)AccessoryOperationError; + // int __stdcall icsneoFlashAccessoryFirmware(void* hObject, FlashAccessoryFirmwareParams* param, int* + // errorCode) + // int __stdcall icsneoFlashPhyFirmware(void* hObject, unsigned char phyIndx, unsigned char* fileData, size_t + // fileDataSize, int* errorCode) + ice::Function icsneoFlashAccessoryFirmware( + lib, "icsneoFlashAccessoryFirmware"); + + Py_buffer parms_buffer = {}; + PyObject_GetBuffer(parms, &parms_buffer, PyBUF_CONTIG_RO); + + auto gil = PyAllowThreads(); + if (!icsneoFlashAccessoryFirmware(handle, (FlashAccessoryFirmwareParams*)parms_buffer.buf, &function_error)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoFlashAccessoryFirmware() Failed"); + } + // check the return value to make sure we are good + if (check_success && function_error != AccessoryOperationSuccess) { + std::stringstream ss; + ss << "icsneoFlashAccessoryFirmware() Failed with error code: " << function_error << " ("; + switch (function_error) { + case AccessoryOperationError: + ss << "AccessoryOperationError"; + break; + case AccessoryOperationSuccess: + ss << "AccessoryOperationSuccess"; + break; + case AccessoryFlashingInitError: + ss << "AccessoryFlashingInitError"; + break; + case AccessoryFlashingEraseError: + ss << "AccessoryFlashingEraseError"; + break; + case AccessoryFlashingWriteError: + ss << "AccessoryFlashingWriteError"; + break; + case AccessoryFlashingReadError: + ss << "AccessoryFlashingReadError"; + break; + case AccessoryFlashingVerifyError: + ss << "AccessoryFlashingVerifyError"; + break; + case AccessoryFlashingDeinitError: + ss << "AccessoryFlashingDeinitError"; + break; + case AccessoryFlashingInvalidHardware: + ss << "AccessoryFlashingInvalidHardware"; + break; + case AccessoryFlashingInvalidDataFile: + ss << "AccessoryFlashingInvalidDataFile"; + break; + case AccessoryGetVersionError: + ss << "AccessoryGetVersionError"; + break; + case AccessoryIndexError: + ss << "AccessoryIndexError"; + break; + case AccessoryParamApiVersionError: + ss << "AccessoryParamApiVersionError "; + break; + case AccessoryParamSizeMismatchError: + ss << "AccessoryParamSizeMismatchError"; + break; + case AccessoryParameterNull: + ss << "AccessoryParameterNull"; + break; + default: + ss << "Unknown"; + break; + }; + return set_ics_exception(exception_runtime_error(), (char*)ss.str().c_str()); + } + gil.restore(); + return Py_BuildValue("i", function_error); + + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_get_accessory_firmware_version(PyObject* self, PyObject* args) +{ + (void)self; + PyObject* obj = NULL; + // 'i' writes a full int, so the target must be int sized + int accessory_indx = 0; + unsigned char check_success = 1; + if (!PyArg_ParseTuple(args, arg_parse("Oi|b:", __FUNCTION__), &obj, &accessory_indx, &check_success)) { + return NULL; + } + + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } + // int __stdcall icsneoGetAccessoryFirmwareVersion(void* hObject, unsigned char index, unsigned int* fwVers, + // int* errorCode) + ice::Function icsneoGetAccessoryFirmwareVersion( + lib, "icsneoGetAccessoryFirmwareVersion"); + + if (accessory_indx < 0 || accessory_indx > 255) { + return set_ics_exception(exception_runtime_error(), "Accessory index must be between 0 and 255"); + } + unsigned int accessory_version = 0; + int function_error = 0; + auto gil = PyAllowThreads(); + if (!icsneoGetAccessoryFirmwareVersion( + handle, static_cast(accessory_indx), &accessory_version, &function_error)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoGetAccessoryFirmwareVersion() Failed"); + } + gil.restore(); + // check the return value to make sure we are good + if (check_success && function_error != AccessoryOperationSuccess) { + std::stringstream ss; + ss << "icsneoFlashAccessoryFirmware() Failed with error code: " << function_error << " ("; + switch (function_error) { + case AccessoryOperationError: + ss << "AccessoryOperationError"; + break; + case AccessoryOperationSuccess: + ss << "AccessoryOperationSuccess"; + break; + case AccessoryFlashingInitError: + ss << "AccessoryFlashingInitError"; + break; + case AccessoryFlashingEraseError: + ss << "AccessoryFlashingEraseError"; + break; + case AccessoryFlashingWriteError: + ss << "AccessoryFlashingWriteError"; + break; + case AccessoryFlashingReadError: + ss << "AccessoryFlashingReadError"; + break; + case AccessoryFlashingVerifyError: + ss << "AccessoryFlashingVerifyError"; + break; + case AccessoryFlashingDeinitError: + ss << "AccessoryFlashingDeinitError"; + break; + case AccessoryFlashingInvalidHardware: + ss << "AccessoryFlashingInvalidHardware"; + break; + case AccessoryFlashingInvalidDataFile: + ss << "AccessoryFlashingInvalidDataFile"; + break; + case AccessoryGetVersionError: + ss << "AccessoryGetVersionError"; + break; + case AccessoryIndexError: + ss << "AccessoryIndexError"; + break; + case AccessoryParamApiVersionError: + ss << "AccessoryParamApiVersionError "; + break; + case AccessoryParamSizeMismatchError: + ss << "AccessoryParamSizeMismatchError"; + break; + case AccessoryParameterNull: + ss << "AccessoryParameterNull"; + break; + default: + ss << "Unknown"; + break; + }; + ss << ")"; + return set_ics_exception(exception_runtime_error(), (char*)ss.str().c_str()); + } + return Py_BuildValue("Ii", accessory_version, function_error); + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_set_safe_boot_mode(PyObject* self, PyObject* args) +{ + (void)self; + PyObject* obj = NULL; + bool enable = true; + if (!PyArg_ParseTuple(args, arg_parse("Ob:", __FUNCTION__), &obj, &enable)) { + return NULL; + } + + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + // int _stdcall icsneoSetSafeBootMode(void* hObject, const uint8_t enable) + ice::Function icsneoSetSafeBootMode(lib, "icsneoSetSafeBootMode"); + + auto gil = PyAllowThreads(); + if (!icsneoSetSafeBootMode(handle, enable)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoSetSafeBootMode() Failed"); + } + gil.restore(); Py_RETURN_NONE; + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - catch (ice::Exception& ex) - { +} + +PyObject* meth_override_library_name(PyObject* self, PyObject* args) +{ + (void)self; + const char* name = NULL; + if (!PyArg_ParseTuple(args, arg_parse("s:", __FUNCTION__), &name)) { + return NULL; + } + try { + if (!dll_reinitialize((char*)name)) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + Py_RETURN_NONE; + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_library_path(PyObject* self) { - try - { + (void)self; + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - return Py_BuildValue("s", lib->getPath().c_str()); - } - catch (ice::Exception& ex) - { + bool okay = false; + auto path = lib->getPath(&okay); + // auto isLoaded = lib->isLoaded(); + return Py_BuildValue("s", path.c_str()); + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_disk_details(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; - if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { + if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoRequestDiskDetails(lib, "icsneoRequestDiskDetails"); + ice::Function icsneoRequestDiskDetails(lib, "icsneoRequestDiskDetails"); PyObject* details = _getPythonModuleObject("ics.structures.s_disk_details", "s_disk_details"); - if (!details) - { + if (!details) { return NULL; } Py_buffer details_buffer = {}; - PyObject_GetBuffer(details, &details_buffer, PyBUF_SIMPLE); + PyObject_GetBuffer(details, &details_buffer, PyBUF_CONTIG); - Py_BEGIN_ALLOW_THREADS + auto gil = PyAllowThreads(); if (!icsneoRequestDiskDetails(handle, (SDiskDetails*)details_buffer.buf)) { - Py_BLOCK_THREADS + gil.restore(); PyBuffer_Release(&details_buffer); Py_DECREF(details); return set_ics_exception(exception_runtime_error(), "icsneoRequestDiskDetails() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); PyBuffer_Release(&details_buffer); return details; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_disk_format(PyObject* self, PyObject* args) { + (void)self; PyObject* details = NULL; PyObject* obj = NULL; - if (!PyArg_ParseTuple(args, arg_parse("OO:", __FUNCTION__), &obj, &details)) { + if (!PyArg_ParseTuple(args, arg_parse("OO:", __FUNCTION__), &obj, &details)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } Py_buffer details_buffer = {}; - PyObject_GetBuffer(details, &details_buffer, PyBUF_C_CONTIGUOUS | PyBUF_WRITABLE); - ice::Function icsneoRequestDiskFormat(lib, "icsneoRequestDiskFormat"); + PyObject_GetBuffer(details, &details_buffer, PyBUF_CONTIG); + ice::Function icsneoRequestDiskFormat(lib, "icsneoRequestDiskFormat"); - Py_BEGIN_ALLOW_THREADS + auto gil = PyAllowThreads(); if (!icsneoRequestDiskFormat(handle, (SDiskDetails*)details_buffer.buf)) { - Py_BLOCK_THREADS + gil.restore(); PyBuffer_Release(&details_buffer); return set_ics_exception(exception_runtime_error(), "icsneoRequestDiskFormat() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); PyBuffer_Release(&details_buffer); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_disk_format_cancel(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; - if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { + if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoRequestDiskFormatCancel(lib, "icsneoRequestDiskFormatCancel"); + ice::Function icsneoRequestDiskFormatCancel(lib, "icsneoRequestDiskFormatCancel"); - Py_BEGIN_ALLOW_THREADS + auto gil = PyAllowThreads(); if (!icsneoRequestDiskFormatCancel(handle)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoRequestDiskFormatCancel() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_disk_format_progress(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; - if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { + if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoRequestDiskFormatProgress(lib, "icsneoRequestDiskFormatProgress"); + ice::Function icsneoRequestDiskFormatProgress( + lib, "icsneoRequestDiskFormatProgress"); PyObject* progress = _getPythonModuleObject("ics.structures.s_disk_format_progress", "s_disk_format_progress"); - if (!progress) - { + if (!progress) { return NULL; } Py_buffer progress_buffer = {}; - PyObject_GetBuffer(progress, &progress_buffer, PyBUF_SIMPLE); + PyObject_GetBuffer(progress, &progress_buffer, PyBUF_CONTIG); - Py_BEGIN_ALLOW_THREADS + auto gil = PyAllowThreads(); if (!icsneoRequestDiskFormatProgress(handle, (SDiskFormatProgress*)progress_buffer.buf)) { - Py_BLOCK_THREADS + gil.restore(); PyBuffer_Release(&progress_buffer); Py_DECREF(progress); return set_ics_exception(exception_runtime_error(), "icsneoRequestDiskFormatProgress() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); PyBuffer_Release(&progress_buffer); return progress; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_enable_doip_line(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; bool enable = false; if (!PyArg_ParseTuple(args, arg_parse("O|b:", __FUNCTION__), &obj, &enable)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } - ice::Function icsneoEnableDOIPLine(lib, "icsneoEnableDOIPLine"); - Py_BEGIN_ALLOW_THREADS + ice::Function icsneoEnableDOIPLine(lib, "icsneoEnableDOIPLine"); + auto gil = PyAllowThreads(); if (!icsneoEnableDOIPLine(handle, enable)) { - Py_BLOCK_THREADS + gil.restore(); return set_ics_exception(exception_runtime_error(), "icsneoEnableDOIPLine() Failed"); } - Py_END_ALLOW_THREADS + gil.restore(); Py_RETURN_NONE; - } - catch (ice::Exception& ex) - { + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } -#if 0 PyObject* meth_is_device_feature_supported(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; - unsigned int feature = NULL; - bool enable = false; + unsigned int feature = 0; if (!PyArg_ParseTuple(args, arg_parse("OI:", __FUNCTION__), &obj, &feature)) { return NULL; } - if (!PyNeoDevice_CheckExact(obj)) { - return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME "." NEO_DEVICE_OBJECT_NAME); + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); } - ICS_HANDLE handle = PyNeoDevice_GetHandle(obj); - try - { + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { ice::Library* lib = dll_get_library(); if (!lib) { char buffer[512]; return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } unsigned int supported = 0; - ice::Function icsneoIsDeviceFeatureSupported(lib, "icsneoIsDeviceFeatureSupported"); - Py_BEGIN_ALLOW_THREADS - if (!icsneoIsDeviceFeatureSupported(handle, (DeviceFeature)feature, &supported)) { - Py_BLOCK_THREADS - return set_ics_exception(exception_runtime_error(), "icsneoIsDeviceFeatureSupported() Failed"); - } - Py_END_ALLOW_THREADS + ice::Function icsneoIsDeviceFeatureSupported( + lib, "icsneoIsDeviceFeatureSupported"); + auto gil = PyAllowThreads(); + if (!icsneoIsDeviceFeatureSupported(handle, (DeviceFeature)feature, &supported)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoIsDeviceFeatureSupported() Failed"); + } + gil.restore(); return Py_BuildValue("I", supported); + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - catch (ice::Exception& ex) - { +} + +PyObject* meth_get_pcb_serial_number(PyObject* self, PyObject* args) +{ + (void)self; + PyObject* obj = NULL; + if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { + return NULL; + } + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + char pcbsn[32] = { 0 }; + size_t length = sizeof pcbsn / sizeof pcbsn[0]; + ice::Function icsneoGetPCBSerialNumber(lib, "icsneoGetPCBSerialNumber"); + auto gil = PyAllowThreads(); + if (!icsneoGetPCBSerialNumber(handle, pcbsn, &length)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoGetPCBSerialNumber() Failed"); + } + gil.restore(); + return Py_BuildValue("s", pcbsn); + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_set_led_property(PyObject* self, PyObject* args) +{ + (void)self; + PyObject* obj = NULL; + unsigned int led = 0; + unsigned int prop = 0; + unsigned int value = 0; + if (!PyArg_ParseTuple(args, arg_parse("OIII:", __FUNCTION__), &obj, &led, &prop, &value)) { + return NULL; + } + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + ice::Function icsneoSetLedProperty( + lib, "icsneoSetLedProperty"); + auto gil = PyAllowThreads(); + if (!icsneoSetLedProperty(handle, led, prop, value)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoSetLedProperty() Failed"); + } + gil.restore(); + Py_RETURN_NONE; + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_start_dhcp_server(PyObject* self, PyObject* args) +{ + (void)self; + PyObject* obj = NULL; + unsigned int NetworkID = 0; + const char* pDeviceIPAddress = NULL; + const char* pSubnetmask = NULL; + const char* pGateway = NULL; + const char* pStartaddress = NULL; + const char* pEndaddress = NULL; + bool bOverwriteDHCPSettings = false; + uint32_t leaseTime; + uint8_t reserved = 0; + if (!PyArg_ParseTuple(args, + arg_parse("OIsssssbI|b:", __FUNCTION__), + &obj, + &NetworkID, + &pDeviceIPAddress, + &pSubnetmask, + &pGateway, + &pStartaddress, + &pEndaddress, + &bOverwriteDHCPSettings, + &leaseTime, + &reserved)) { + return NULL; + } + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + // int _stdcall icsneoStartDHCPServer(void* hObject, unsigned int NetworkID, const char* pDeviceIPAddress,const + // char* pSubnetmask, + // const char* pGateway,const char* pStartaddress, + // const char* pEndaddress,bool bOverwriteDHCPSettings,uint32_t leaseTime,uint8_t reserved) + ice::Function + icsneoStartDHCPServer(lib, "icsneoStartDHCPServer"); + auto gil = PyAllowThreads(); + if (!icsneoStartDHCPServer(handle, + NetworkID, + pDeviceIPAddress, + pSubnetmask, + pGateway, + pStartaddress, + pEndaddress, + bOverwriteDHCPSettings, + leaseTime, + reserved)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoStartDHCPServer() Failed"); + } + gil.restore(); + Py_RETURN_NONE; + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_stop_dhcp_server(PyObject* self, PyObject* args) +{ + (void)self; + PyObject* obj = NULL; + unsigned int NetworkID = 0; + if (!PyArg_ParseTuple(args, arg_parse("OI:", __FUNCTION__), &obj, &NetworkID)) { + return NULL; + } + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + ice::Function icsneoStopDHCPServer(lib, "icsneoStopDHCPServer"); + auto gil = PyAllowThreads(); + if (!icsneoStopDHCPServer(handle, NetworkID)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoStopDHCPServer() Failed"); + } + gil.restore(); + Py_RETURN_NONE; + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_wbms_manager_write_lock(PyObject* self, PyObject* args) +{ + (void)self; + PyObject* obj = NULL; + EwBMSManagerPort_t manager = eManagerPortA; + EwBMSManagerLockState_t lock_state = eLockManager; + if (!PyArg_ParseTuple(args, arg_parse("OII:", __FUNCTION__), &obj, &manager, &lock_state)) { + return NULL; + } + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + ice::Function + icsneowBMSManagerWriteLock(lib, "icsneowBMSManagerWriteLock"); + auto gil = PyAllowThreads(); + if (!icsneowBMSManagerWriteLock(handle, manager, lock_state)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneowBMSManagerWriteLock() Failed"); + } + gil.restore(); + Py_RETURN_NONE; + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_wbms_manager_reset(PyObject* self, PyObject* args) +{ + (void)self; + PyObject* obj = NULL; + EwBMSManagerPort_t manager = eManagerPortA; + if (!PyArg_ParseTuple(args, arg_parse("OI:", __FUNCTION__), &obj, &manager)) { + return NULL; + } + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + ice::Function icsneowBMSManagerReset(lib, + "icsneowBMSManagerReset"); + auto gil = PyAllowThreads(); + if (!icsneowBMSManagerReset(handle, manager)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneowBMSManagerReset() Failed"); + } + gil.restore(); + Py_RETURN_NONE; + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_uart_write(PyObject* self, PyObject* args) +{ + (void)self; + PyObject* obj = NULL; + EUartPort_t port = eUART0; + Py_buffer data = {}; + uint8_t flags = 0; + // 'p' writes a full int, so the target must be int sized + int check_size = 1; + if (!PyArg_ParseTuple(args, arg_parse("OIy*|Bp:", __FUNCTION__), &obj, &port, &data, &flags, &check_size)) { + return NULL; + } + + // Get the device handle + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + // int _stdcall icsneoUartWrite(void* hObject, const EUartPort_t uart, const void* bData, const size_t + // bytesToSend, size_t* bytesActuallySent, uint8_t* flags) + size_t bytesActuallySent = 0; + ice::Function + icsneoUartWrite(lib, "icsneoUartWrite"); + auto gil = PyAllowThreads(); + if (!icsneoUartWrite(handle, port, data.buf, static_cast(data.len), &bytesActuallySent, &flags)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoUartWrite() Failed"); + } + gil.restore(); + if (check_size && (size_t)data.len != bytesActuallySent) { + return set_ics_exception(exception_runtime_error(), + "Bytes actually sent didn't match bytes to send length"); + } + return Py_BuildValue("n", (Py_ssize_t)bytesActuallySent); + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_uart_read(PyObject* self, PyObject* args) +{ + (void)self; + PyObject* obj = NULL; + EUartPort_t port = eUART0; + unsigned int bytesToRead = 256; + uint8_t flags = 0; + if (!PyArg_ParseTuple(args, arg_parse("OI|IB:", __FUNCTION__), &obj, &port, &bytesToRead, &flags)) { + return NULL; + } + // Get the device handle + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + uint8_t* buffer = (uint8_t*)malloc(bytesToRead * sizeof(uint8_t)); + if (!buffer) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + free(buffer); + buffer = NULL; + char _buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(_buffer)); + } + size_t bytesActuallyRead = 0; + // int _stdcall icsneoUartRead(void* hObject, const EUartPort_t uart, void* bData, const size_t bytesToRead, + // size_t* bytesActuallyRead, uint8_t* flags) + ice::Function icsneoUartRead( + lib, "icsneoUartRead"); + auto gil = PyAllowThreads(); + if (!icsneoUartRead(handle, port, buffer, bytesToRead, &bytesActuallyRead, &flags)) { + gil.restore(); + free(buffer); + buffer = NULL; + return set_ics_exception(exception_runtime_error(), "icsneoUartRead() Failed"); + } + gil.restore(); + PyObject* ba_result = + PyByteArray_FromStringAndSize((const char*)buffer, static_cast(bytesActuallyRead)); + // PyObject* value = Py_BuildValue("O", ba_result); + free(buffer); + buffer = NULL; + return ba_result; + } catch (ice::Exception& ex) { + free(buffer); + buffer = NULL; + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_uart_set_baudrate(PyObject* self, PyObject* args) +{ + (void)self; + PyObject* obj = NULL; + EUartPort_t port = eUART0; + unsigned int baudrate = 0; + if (!PyArg_ParseTuple(args, arg_parse("OII:", __FUNCTION__), &obj, &port, &baudrate)) { + return NULL; + } + // Get the device handle + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + // int _stdcall icsneoUartSetBaudrate(void* hObject, const EUartPort_t uart, const uint32_t baudrate) + ice::Function icsneoUartSetBaudrate( + lib, "icsneoUartSetBaudrate"); + auto gil = PyAllowThreads(); + if (!icsneoUartSetBaudrate(handle, port, baudrate)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoUartSetBaudrate() Failed"); + } + gil.restore(); + Py_RETURN_NONE; + + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_uart_get_baudrate(PyObject* self, PyObject* args) +{ + (void)self; + PyObject* obj = NULL; + EUartPort_t port = eUART0; + if (!PyArg_ParseTuple(args, arg_parse("OI:", __FUNCTION__), &obj, &port)) { + return NULL; + } + // Get the device handle + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + uint32_t baudrate = 0; + // int _stdcall icsneoUartGetBaudrate(void* hObject, const EUartPort_t uart, uint32_t* baudrate) + ice::Function icsneoUartGetBaudrate( + lib, "icsneoUartGetBaudrate"); + auto gil = PyAllowThreads(); + if (!icsneoUartGetBaudrate(handle, port, &baudrate)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoUartGetBaudrate() Failed"); + } + gil.restore(); + return Py_BuildValue("I", baudrate); + + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_generic_api_send_command(PyObject* self, PyObject* args) +{ + (void)self; + PyObject* obj = NULL; + unsigned char apiIndex = 0; + unsigned char instanceIndex = 0; + unsigned char functionIndex = 0; + Py_buffer data = {}; + if (!PyArg_ParseTuple( + args, arg_parse("Obbby*:", __FUNCTION__), &obj, &apiIndex, &instanceIndex, &functionIndex, &data)) { + return NULL; + } + // Get the device handle + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + /* + int _stdcall icsneoGenericAPISendCommand(void* hObject, + unsigned char apiIndex, + unsigned char instanceIndex, + unsigned char functionIndex, + void* bData, + unsigned int length, + unsigned char* functionError) + */ + ice::Function + icsneoGenericAPISendCommand(lib, "icsneoGenericAPISendCommand"); + unsigned char functionError = 0; + auto gil = PyAllowThreads(); + if (!icsneoGenericAPISendCommand(handle, + apiIndex, + instanceIndex, + functionIndex, + (void*)data.buf, + static_cast(data.len), + &functionError)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoGenericAPISendCommand() Failed"); + } + gil.restore(); + return Py_BuildValue("i", functionError); + + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_generic_api_read_data(PyObject* self, PyObject* args) +{ + (void)self; + PyObject* obj = NULL; + unsigned char apiIndex = 0; + unsigned char instanceIndex = 0; + unsigned int length = GENERIC_API_DATA_BUFFER_SIZE; + if (!PyArg_ParseTuple(args, arg_parse("Obb|I:", __FUNCTION__), &obj, &apiIndex, &instanceIndex, &length)) { + return NULL; + } + // Get the device handle + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + unsigned char* buffer = (unsigned char*)malloc(length * sizeof(unsigned char)); + if (!buffer) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + free(buffer); + buffer = NULL; + char _buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(_buffer)); + } + /* + int _stdcall icsneoGenericAPIReadData(void* hObject, + unsigned char apiIndex, + unsigned char instanceIndex, + unsigned char* functionIndex, + unsigned char* bData, + unsigned int* length) + */ + ice::Function + icsneoGenericAPIReadData(lib, "icsneoGenericAPIReadData"); + unsigned char functionIndex = 0; + auto gil = PyAllowThreads(); + if (!icsneoGenericAPIReadData(handle, apiIndex, instanceIndex, &functionIndex, buffer, &length)) { + gil.restore(); + free(buffer); + buffer = NULL; + return set_ics_exception(exception_runtime_error(), "icsneoGenericAPIReadData() Failed"); + } + gil.restore(); + + PyObject* ba = PyByteArray_FromStringAndSize((const char*)buffer, length); + PyObject* value = Py_BuildValue("IO", functionIndex, ba); + Py_DecRef(ba); + free(buffer); + buffer = NULL; + return value; + } catch (ice::Exception& ex) { + free(buffer); + buffer = NULL; + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_generic_api_get_status(PyObject* self, PyObject* args) +{ + (void)self; + PyObject* obj = NULL; + unsigned char apiIndex = 0; + unsigned char instanceIndex = 0; + + if (!PyArg_ParseTuple(args, arg_parse("Obb:", __FUNCTION__), &obj, &apiIndex, &instanceIndex)) { + return NULL; + } + // Get the device handle + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + /* + int _stdcall icsneoGenericAPIGetStatus(void* hObject, + unsigned char apiIndex, + unsigned char instanceIndex, + unsigned char* functionIndex, + unsigned char* callbackError, + unsigned char* finishedProcessing) + */ + ice::Function + icsneoGenericAPIGetStatus(lib, "icsneoGenericAPIGetStatus"); + unsigned char functionIndex = 0; + unsigned char callbackError = 0; + unsigned char finishedProcessing = 0; + auto gil = PyAllowThreads(); + if (!icsneoGenericAPIGetStatus( + handle, apiIndex, instanceIndex, &functionIndex, &callbackError, &finishedProcessing)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoGenericAPIGetStatus() Failed"); + } + gil.restore(); + + PyObject* value = Py_BuildValue("III", functionIndex, callbackError, finishedProcessing); + return value; + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_get_gptp_status(PyObject* self, PyObject* args) +{ + (void)self; + PyObject* obj = NULL; + if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { + return NULL; + } + // Before we do anything, we need to grab the python gptp_status ctype.Structure. + PyObject* status = _getPythonModuleObject("ics.structures.gptp_status", "gptp_status"); + if (!status) { + return NULL; + } + // Grab the buffer out of the newly created object - make sure to call PyBuffer_Release(&status_buffer) when done. + Py_buffer status_buffer = {}; + PyObject_GetBuffer(status, &status_buffer, PyBUF_CONTIG); + // Verify we have a valid NeoDevice Object - This comes after gptp_status allocation for testing purposes + if (!PyNeoDeviceEx_CheckExact(obj)) { + PyBuffer_Release(&status_buffer); + Py_DECREF(status); + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + PyBuffer_Release(&status_buffer); + Py_DECREF(status); + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + // Get the gptp_status + auto gil = PyAllowThreads(); + // int _stdcall icsneoGetGPTPStatus(void* hObject, GPTPStatus* gptpStatus) + ice::Function icsneoGetGPTPStatus(lib, "icsneoGetGPTPStatus"); + if (!icsneoGetGPTPStatus(handle, (GPTPStatus*)status_buffer.buf)) { + gil.restore(); + PyBuffer_Release(&status_buffer); + Py_DECREF(status); + return set_ics_exception(exception_runtime_error(), "icsneoGetGPTPStatus() Failed"); + } + gil.restore(); + PyBuffer_Release(&status_buffer); + return status; + } catch (ice::Exception& ex) { + PyBuffer_Release(&status_buffer); + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +// int _stdcall icsneoGetAllChipVersions(void* hObject, stChipVersions* pInfo, int ipInfoSize) +PyObject* meth_get_all_chip_versions(PyObject* self, PyObject* args) +{ + (void)self; + PyObject* obj = NULL; + if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { + return NULL; + } + // Before we do anything, we need to grab the python ctype.Structure. + PyObject* py_struct = _getPythonModuleObject("ics.structures.st_chip_versions", "st_chip_versions"); + if (!py_struct) { + return NULL; + } + // Grab the buffer out of the newly created object - make sure to call PyBuffer_Release(&py_struct_buffer) when + // done. + Py_buffer py_struct_buffer = {}; + PyObject_GetBuffer(py_struct, &py_struct_buffer, PyBUF_CONTIG); + // Verify we have a valid NeoDevice Object - This comes after ctypes struct allocation for testing purposes + if (!PyNeoDeviceEx_CheckExact(obj)) { + PyBuffer_Release(&py_struct_buffer); + Py_DECREF(py_struct); + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + PyBuffer_Release(&py_struct_buffer); + Py_DECREF(py_struct); + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + // Get the struct + auto gil = PyAllowThreads(); + // int _stdcall icsneoGetAllChipVersions(void* hObject, stChipVersions* pInfo, int ipInfoSize) + ice::Function icsneoGetAllChipVersions(lib, + "icsneoGetAllChipVersions"); + if (!icsneoGetAllChipVersions( + handle, (stChipVersions*)py_struct_buffer.buf, static_cast(py_struct_buffer.len))) { + gil.restore(); + PyBuffer_Release(&py_struct_buffer); + Py_DECREF(py_struct); + return set_ics_exception(exception_runtime_error(), "icsneoGetAllChipVersions() Failed"); + } + gil.restore(); + PyBuffer_Release(&py_struct_buffer); + return py_struct; + } catch (ice::Exception& ex) { + PyBuffer_Release(&py_struct_buffer); + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_get_device_name(PyObject* self, PyObject* args) // icsneoGetDeviceName +{ + (void)self; + PyObject* obj = NULL; + EDevNameType dev_name_type = EDevNameTypeDefault; + if (!PyArg_ParseTuple(args, arg_parse("O|I:", __FUNCTION__), &obj, &dev_name_type)) { + return NULL; + } + // Get the NeoDeviceEx from PyNeoDeviceEx + Py_buffer nde_buffer = {}; + NeoDeviceEx* nde = NULL; + if (!PyNeoDeviceEx_GetNeoDeviceEx(obj, &nde_buffer, &nde)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + PyBuffer_Release(&nde_buffer); + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + const size_t NAME_SIZE = 255; + char name[NAME_SIZE] = {}; + // Get the struct + // int _stdcall icsneoGetDeviceName(const NeoDeviceEx* nde, char* name, const size_t length, const enum + // _EDevNameType devNameType) + auto gil = PyAllowThreads(); + ice::Function + icsneoGetDeviceName(lib, "icsneoGetDeviceName"); + if (auto length = icsneoGetDeviceName(const_cast(nde), name, NAME_SIZE, dev_name_type); + length == 0) { + gil.restore(); + PyBuffer_Release(&nde_buffer); + return set_ics_exception(exception_runtime_error(), "icsneoGetDeviceName() Failed"); + } + gil.restore(); + PyBuffer_Release(&nde_buffer); + PyObject* value = Py_BuildValue("s", name); + return value; + } catch (ice::Exception& ex) { + PyBuffer_Release(&nde_buffer); + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_get_imei(PyObject* self, PyObject* args) +{ // icsneoGetIMEI + (void)self; + PyObject* obj = NULL; + if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { + return NULL; + } + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + uint64_t imei = 0; + ice::Function icsneoGetIMEI(lib, "icsneoGetIMEI"); + auto gil = PyAllowThreads(); + if (!icsneoGetIMEI(handle, &imei)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoGetIMEI() Failed"); + } + gil.restore(); + return Py_BuildValue("K", imei); + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_get_component_versions(PyObject* self, PyObject* args) // icsneoGetComponentVersions +{ +#ifndef _USE_INTERNAL_HEADER_ + (void)self; + (void)args; + return set_ics_exception(exception_runtime_error(), "icsneoGetComponentVersions is not available"); +#else + (void)self; + PyObject* obj = NULL; + bool force_update = true; + uint64_t length = 25; + if (!PyArg_ParseTuple(args, arg_parse("O|bK:", __FUNCTION__), &obj, &force_update, &length)) { + return NULL; + } + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + ice::Function icsneoGetComponentVersions( + lib, "icsneoGetComponentVersions"); + auto gil = PyAllowThreads(); + std::vector version_reports; + version_reports.reserve(length); + version_reports.resize(length); + if (!icsneoGetComponentVersions(handle, version_reports.data(), &length, force_update)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoGetComponentVersions() Failed"); + } + gil.restore(); + + PyObject* tuple = PyTuple_New(length); + if (!tuple) { + return NULL; + } + for (uint64_t i = 0; i < length; ++i) { + PyObject* obj = _getPythonModuleObject("ics.structures.version_report", "version_report"); + if (!obj) { + return set_ics_exception(exception_runtime_error(), "Failed to allocate version_report"); + } + + // Get the internal buffer from version_report + Py_buffer buffer = {}; + if (PyObject_GetBuffer(obj, &buffer, PyBUF_CONTIG) != 0) { + return NULL; + } + memcpy(buffer.buf, &version_reports[i], sizeof(version_reports[i])); + PyBuffer_Release(&buffer); + + PyTuple_SetItem(tuple, i, obj); + } + return tuple; + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +#endif +} + +PyObject* meth_request_set_neovi_miscio(PyObject* self, PyObject* args) // icsneoRequestSetNeoVIMiscIO +{ + (void)self; + PyObject* obj = NULL; + uint32_t ddrs = 0; + uint32_t ddrs_mask = 0; + uint32_t states = 0; + uint32_t states_mask = 0; + uint32_t leds = 0; + uint32_t leds_mask = 0; + if (!PyArg_ParseTuple(args, + arg_parse("OIIIIII:", __FUNCTION__), + &obj, + &ddrs, + &ddrs_mask, + &states, + &states_mask, + &leds, + &leds_mask)) { + return NULL; + } + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + // int _stdcall icsneoRequestSetNeoVIMiscIO(void* hObject, + // uint32_t ddrs, + // uint32_t ddrs_mask, + // uint32_t states, + // uint32_t states_mask, + // uint32_t leds, + // uint32_t leds_mask) + ice::Function + icsneoRequestSetNeoVIMiscIO(lib, "icsneoRequestSetNeoVIMiscIO"); + auto gil = PyAllowThreads(); + if (!icsneoRequestSetNeoVIMiscIO(handle, ddrs, ddrs_mask, states, states_mask, leds, leds_mask)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoRequestSetNeoVIMiscIO() Failed"); + } + gil.restore(); + Py_RETURN_NONE; + } catch (ice::Exception& ex) { + return set_ics_exception(exception_runtime_error(), (char*)ex.what()); + } +} + +PyObject* meth_get_firmware_variant(PyObject* self, PyObject* args) // icsneoGetFirmwareVariant +{ + (void)self; + PyObject* obj = NULL; + if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { + return NULL; + } + if (!PyNeoDeviceEx_CheckExact(obj)) { + return set_ics_exception(exception_runtime_error(), "Argument must be of type " MODULE_NAME ".PyNeoDeviceEx"); + } + void* handle = NULL; + if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { + return NULL; + } + try { + ice::Library* lib = dll_get_library(); + if (!lib) { + char buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + } + // int __stdcall icsneoGetFirmwareVariant(void* hObject, uint32_t* variant) + ice::Function icsneoGetFirmwareVariant(lib, "icsneoGetFirmwareVariant"); + auto gil = PyAllowThreads(); + uint32_t variant = 0; + if (!icsneoGetFirmwareVariant(handle, &variant)) { + gil.restore(); + return set_ics_exception(exception_runtime_error(), "icsneoGetFirmwareVariant() Failed"); + } + gil.restore(); + return Py_BuildValue("I", variant); + } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } -#endif \ No newline at end of file diff --git a/src/object_neo_device.cpp b/src/object_neo_device.cpp deleted file mode 100644 index 9824e26cf..000000000 --- a/src/object_neo_device.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include "object_neo_device.h" - -PyTypeObject neo_device_object_type = { - PyVarObject_HEAD_INIT(NULL, 0) - MODULE_NAME "." NEO_DEVICE_OBJECT_NAME, /* tp_name */ - sizeof(neo_device_object), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)neo_device_object_dealloc,/* tp_dealloc */ - 0, /* tp_print */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_reserved */ - neo_device_object_tp_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - neo_device_object_getattr, /* tp_getattro */ - neo_device_object_setattr, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - NEO_DEVICE_OBJECT_NAME" object", /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - neo_device_object_members, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)neo_device_object_alloc, /* tp_init */ -}; - -bool setup_neo_device_object(PyObject* module) -{ - //neo_device_object_type.ob_type = &PyType_Type; - neo_device_object_type.tp_new = PyType_GenericNew; - neo_device_object_type.tp_dictoffset = offsetof(neo_device_object, dict); - if (PyType_Ready(&neo_device_object_type) < 0) { - return false; - } - Py_INCREF(&neo_device_object_type); - PyModule_AddObject(module, NEO_DEVICE_OBJECT_NAME, (PyObject*)&neo_device_object_type); - return true; -} \ No newline at end of file diff --git a/src/object_spy_message.cpp b/src/object_spy_message.cpp index 85e23caa6..0c1c4a7a8 100644 --- a/src/object_spy_message.cpp +++ b/src/object_spy_message.cpp @@ -1,86 +1,475 @@ #include "object_spy_message.h" +static int spy_message_object_alloc(spy_message_object* self, PyObject* args, PyObject* kwds) +{ + (void)args; + (void)kwds; + memset(&self->msg, 0, sizeof(self->msg)); + self->noExtraDataPtrCleanup = false; + return 0; +} + +static void spy_message_object_dealloc(spy_message_object* self) +{ + if ((!self->noExtraDataPtrCleanup && self->msg.ExtraDataPtrEnabled && self->msg.ExtraDataPtr != NULL) || + (!self->noExtraDataPtrCleanup && self->msg.Protocol == SPY_PROTOCOL_ETHERNET && + self->msg.ExtraDataPtr != NULL)) { + // Clean up the ExtraDataPtr if we can + // Ethernet protocol uses the ExtraDataPtrEnabled reversed internally so do a double check here + delete[] (unsigned char*)self->msg.ExtraDataPtr; + self->msg.ExtraDataPtr = NULL; + self->msg.ExtraDataPtrEnabled = 0; + } + Py_TYPE(self)->tp_free((PyObject*)self); +} + +// Validates that value is a tuple of at most max_length ints and copies the +// elements into dest. Returns the tuple length, or -1 with an exception set. +// dest is only written on success. +static Py_ssize_t _copy_byte_tuple(PyObject* value, PyObject* attr_name, unsigned char* dest, Py_ssize_t max_length) +{ + if (!PyTuple_Check(value)) { + PyErr_Format(PyExc_AttributeError, + "'%.50s' object attribute '%U' needs to be a tuple", + MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME, + attr_name); + return -1; + } + Py_ssize_t length = PyTuple_Size(value); + if (length > max_length) { + PyErr_Format( + PyExc_ValueError, "'%U' accepts at most %zd bytes (got %zd)", attr_name, max_length, length); + return -1; + } + unsigned char temp[8] = { 0 }; + for (Py_ssize_t i = 0; i < length; ++i) { + PyObject* item = PyTuple_GetItem(value, i); + if (!item) + return -1; + long byte = PyLong_AsLong(item); + if (byte == -1 && PyErr_Occurred()) + return -1; + temp[i] = (unsigned char)byte; + } + memcpy(dest, temp, (size_t)length); + return length; +} + +static PyObject* spy_message_object_getattr(PyObject* o, PyObject* attr_name) +{ +#if PY_MAJOR_VERSION >= 3 + if (!PyUnicode_Check(attr_name)) { +#else + if (!PyString_Check(attr_name)) { +#endif + PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", attr_name->ob_type->tp_name); + return NULL; + } else { + Py_INCREF(attr_name); + } + if (PyUnicode_CompareWithASCIIString(attr_name, "Data") == 0) { + Py_DECREF(attr_name); + spy_message_object* obj = (spy_message_object*)o; + PyObject* temp = Py_BuildValue("(i,i,i,i,i,i,i,i)", + obj->msg.Data[0], + obj->msg.Data[1], + obj->msg.Data[2], + obj->msg.Data[3], + obj->msg.Data[4], + obj->msg.Data[5], + obj->msg.Data[6], + obj->msg.Data[7]); + PyObject* data = PyTuple_GetSlice(temp, 0, obj->msg.NumberBytesData); + Py_DECREF(temp); + return data; + } else if (PyUnicode_CompareWithASCIIString(attr_name, "AckBytes") == 0) { + Py_DECREF(attr_name); + spy_message_object* obj = (spy_message_object*)o; + return Py_BuildValue("(i,i,i,i,i,i,i,i)", + obj->msg.AckBytes[0], + obj->msg.AckBytes[1], + obj->msg.AckBytes[2], + obj->msg.AckBytes[3], + obj->msg.AckBytes[4], + obj->msg.AckBytes[5], + obj->msg.AckBytes[6], + obj->msg.AckBytes[7]); + } else if (PyUnicode_CompareWithASCIIString(attr_name, "Header") == 0) { + Py_DECREF(attr_name); + spy_message_j1850_object* obj = (spy_message_j1850_object*)o; + PyObject* temp = + Py_BuildValue("(i,i,i,i)", obj->msg.Header[0], obj->msg.Header[1], obj->msg.Header[2], obj->msg.Header[3]); + PyObject* data = PyTuple_GetSlice(temp, 0, obj->msg.NumberBytesHeader); + Py_DECREF(temp); + return data; + } else if (PyUnicode_CompareWithASCIIString(attr_name, "ExtraDataPtr") == 0) { + Py_DECREF(attr_name); + spy_message_j1850_object* obj = (spy_message_j1850_object*)o; + unsigned char* ExtraDataPtr = (unsigned char*)obj->msg.ExtraDataPtr; + bool extra_data_ptr_enabled = obj->msg.ExtraDataPtrEnabled != 0; + // Ethernet protocol uses the ExtraDataPtrEnabled reversed internally + if ((obj->msg.Protocol == SPY_PROTOCOL_ETHERNET || + obj->msg.Protocol == SPY_PROTOCOL_SPI || + obj->msg.Protocol == SPY_PROTOCOL_WBMS) + && obj->msg.ExtraDataPtr != NULL) { + extra_data_ptr_enabled = true; + } + int actual_size = 0; + // Some newer protocols are packing the length into NumberBytesHeader also so lets handle it here... + if (obj->msg.Protocol == SPY_PROTOCOL_A2B || obj->msg.Protocol == SPY_PROTOCOL_ETHERNET || + obj->msg.Protocol == SPY_PROTOCOL_SPI || obj->msg.Protocol == SPY_PROTOCOL_WBMS) { + actual_size = (obj->msg.NumberBytesHeader << 8) | obj->msg.NumberBytesData; + } else { + actual_size = obj->msg.NumberBytesData; + } + if (extra_data_ptr_enabled && actual_size && obj->msg.ExtraDataPtr) { + PyObject* tuple = PyTuple_New(actual_size); + for (int i = 0; i < actual_size; ++i) { + PyTuple_SET_ITEM(tuple, i, PyLong_FromLong(ExtraDataPtr[i])); + } + return tuple; + } else { + Py_RETURN_NONE; + } + } else { + return PyObject_GenericGetAttr(o, attr_name); + } +} + +static int spy_message_object_setattr(PyObject* o, PyObject* name, PyObject* value) +{ + spy_message_object* obj = (spy_message_object*)o; + if (PyUnicode_CompareWithASCIIString(name, "Data") == 0) { + Py_ssize_t length = _copy_byte_tuple(value, name, obj->msg.Data, sizeof(obj->msg.Data)); + if (length < 0) + return -1; + obj->msg.NumberBytesData = static_cast(length); + return 0; + } else if (PyUnicode_CompareWithASCIIString(name, "AckBytes") == 0) { + if (_copy_byte_tuple(value, name, obj->msg.AckBytes, sizeof(obj->msg.AckBytes)) < 0) + return -1; + return 0; + } else if (PyUnicode_CompareWithASCIIString(name, "Header") == 0) { + spy_message_j1850_object* j1850_obj = (spy_message_j1850_object*)obj; + Py_ssize_t length = _copy_byte_tuple(value, name, j1850_obj->msg.Header, sizeof(j1850_obj->msg.Header)); + if (length < 0) + return -1; + obj->msg.NumberBytesHeader = static_cast(length); + return 0; + } else if (PyUnicode_CompareWithASCIIString(name, "Protocol") == 0) { + // Ethernet behavior is backward to CAN and will crash if enabled. + long protocol = PyLong_AsLong(value); + if (protocol == -1 && PyErr_Occurred()) + PyErr_Clear(); // let PyObject_GenericSetAttr report the type error + else if (protocol == SPY_PROTOCOL_ETHERNET) + obj->msg.ExtraDataPtrEnabled = 0; + return PyObject_GenericSetAttr(o, name, value); + } else if (PyUnicode_CompareWithASCIIString(name, "ExtraDataPtr") == 0) { + if (!PyTuple_Check(value)) { + PyErr_Format(PyExc_AttributeError, + "'%.50s' object attribute '%U' needs to be a tuple", + MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME, + name); + return -1; + } + // Some newer protocols are packing the length into NumberBytesHeader also so lets handle it here... + bool packs_length = obj->msg.Protocol == SPY_PROTOCOL_A2B || obj->msg.Protocol == SPY_PROTOCOL_ETHERNET || + obj->msg.Protocol == SPY_PROTOCOL_SPI || obj->msg.Protocol == SPY_PROTOCOL_WBMS; + Py_ssize_t length = PyTuple_Size(value); + Py_ssize_t max_length = packs_length ? 0xFFFF : 0xFF; + if (length > max_length) { + PyErr_Format(PyExc_ValueError, + "'%U' accepts at most %zd bytes for this protocol (got %zd)", + name, + max_length, + length); + return -1; + } + // Validate and copy into a fresh buffer before touching the message. + unsigned char* buffer = new unsigned char[length > 0 ? (size_t)length : 1]; + for (Py_ssize_t i = 0; i < length; ++i) { + PyObject* data = PyTuple_GetItem(value, i); + long byte = data ? PyLong_AsLong(data) : -1; + if (!data || (byte == -1 && PyErr_Occurred())) { + delete[] buffer; + return -1; + } + buffer[i] = (unsigned char)byte; + } + // Never delete[] a buffer this extension didn't allocate (e.g. DLL-owned + // pointers on received messages flagged with noExtraDataPtrCleanup). + if (obj->msg.ExtraDataPtr != NULL && !obj->noExtraDataPtrCleanup) + delete[] (unsigned char*)obj->msg.ExtraDataPtr; + obj->msg.ExtraDataPtr = buffer; + if (packs_length) + obj->msg.NumberBytesHeader = static_cast(length >> 8); + obj->msg.NumberBytesData = static_cast(length & 0xFF); + if (obj->msg.Protocol != SPY_PROTOCOL_ETHERNET) + obj->msg.ExtraDataPtrEnabled = 1; + obj->noExtraDataPtrCleanup = false; + return 0; + } else if (PyUnicode_CompareWithASCIIString(name, "ExtraDataPtrEnabled") == 0) { + long enabled = PyLong_AsLong(value); + if (enabled == -1 && PyErr_Occurred()) { + PyErr_Clear(); // let PyObject_GenericSetAttr report the type error + return PyObject_GenericSetAttr(o, name, value); + } + // Make sure we clean up here so we don't memory leak + if ((!obj->noExtraDataPtrCleanup && enabled != 1 && obj->msg.ExtraDataPtrEnabled == 1) || + (!obj->noExtraDataPtrCleanup && enabled != 1 && obj->msg.Protocol == SPY_PROTOCOL_ETHERNET)) { + if (obj->msg.ExtraDataPtr != NULL) { + delete[] (unsigned char*)obj->msg.ExtraDataPtr; + obj->msg.ExtraDataPtr = NULL; + } + } else if (enabled != 0 && obj->msg.Protocol == SPY_PROTOCOL_ETHERNET) { + // Ethernet always needs to be set to 0 + return 0; + } + return PyObject_GenericSetAttr(o, name, value); + } else { + return PyObject_GenericSetAttr(o, name, value); + } +} + +static PyMemberDef spy_message_object_members[] = { + { "StatusBitField", T_UINT, offsetof(spy_message_object, msg.StatusBitField), 0, "StatusBitField" }, + { "StatusBitField2", T_UINT, offsetof(spy_message_object, msg.StatusBitField2), 0, "StatusBitField2" }, + { "TimeHardware", + T_UINT, + offsetof(spy_message_object, msg.TimeHardware), + 0, + "Hardware time stamp. The TimeStamp is reset on device open" }, + { "TimeHardware2", + T_UINT, + offsetof(spy_message_object, msg.TimeHardware2), + 0, + "Hardware time stamp. The TimeStamp is reset on device open" }, + { "TimeSystem", + T_UINT, + offsetof(spy_message_object, msg.TimeSystem), + 0, + "TimeSystem is loaded with the value received from the timeGetTime call in the WIN32 multimedia API." }, + { "TimeSystem2", + T_UINT, + offsetof(spy_message_object, msg.TimeSystem2), + 0, + "TimeSystem is loaded with the value received from the timeGetTime call in the WIN32 multimedia API." }, + { "TimeStampHardwareID", + T_UBYTE, + offsetof(spy_message_object, msg.TimeStampHardwareID), + 0, + "This is an identifier of what type of hardware timestamp is used. Since neoVI's timestamp is always the same, " + "this doesn't change." }, + { "TimeStampSystemID", + T_UBYTE, + offsetof(spy_message_object, msg.TimeStampSystemID), + 0, + "This is an identifier of what type of system timestamp is used. Since WIN32 neoVI's timestamp is always the " + "same, " + "from the timeGetTime API, this doesn't change." }, + { "NetworkID", + T_UBYTE, + offsetof(spy_message_object, msg.NetworkID), + 0, + "This value is used to identify which network this message was received on." }, + { "NodeID", T_UBYTE, offsetof(spy_message_object, msg.NodeID), 0, "Not Used" }, + { "Protocol", + T_UBYTE, + offsetof(spy_message_object, msg.Protocol), + 0, + "Valid values are SPY_PROTOCOL_CAN, SPY_PROTOCOL_J1850VPW, and SPY_PROTOCOL_ISO9141." }, + { "MessagePieceID", T_UBYTE, offsetof(spy_message_object, msg.MessagePieceID), 0, "Not Used" }, + { "ExtraDataPtrEnabled", T_UBYTE, offsetof(spy_message_object, msg.ExtraDataPtrEnabled), 0, "" }, + { "NumberBytesHeader", + T_UBYTE, + offsetof(spy_message_object, msg.NumberBytesHeader), + 0, + " Used for J1850/ISO messages. It indicates how many bytes are stored in the Header(1 to 4) array." }, + { "NumberBytesData", + T_UBYTE, + offsetof(spy_message_object, msg.NumberBytesData), + 0, + "Holds the number of bytes in the Data(1 to 8) array or the number of bytes in a CAN remote frame (The DLC)." }, + { "NetworkID2", + T_UBYTE, + offsetof(spy_message_object, msg.NetworkID2), + 0, + "This value is used to identify which network this message was received on." }, + { "DescriptionID", T_SHORT, offsetof(spy_message_object, msg.DescriptionID), 0, "Not Used" }, + { "ArbIDOrHeader", T_UINT, offsetof(spy_message_object, msg.ArbIDOrHeader), 0, "" }, + // Data, AckBytes and ExtraDataPtr are handled by tp_getattro/tp_setattro; + // a member entry here would expose a descriptor that reinterprets raw + // struct memory as a PyObject*. + { "StatusBitField3", T_UINT, offsetof(spy_message_object, msg.StatusBitField3), 0, "StatusBitField3" }, + { "StatusBitField4", T_UINT, offsetof(spy_message_object, msg.StatusBitField4), 0, "StatusBitField4" }, + { "MiscData", T_UBYTE, offsetof(spy_message_object, msg.MiscData), 0, "" }, + { "noExtraDataPtrCleanup", + T_BOOL, + offsetof(spy_message_object, noExtraDataPtrCleanup), + 0, + "Tells Python to not clean up ExtraDataPtrMemory, If this is enabled. Ignore, if unsure." }, + { NULL, 0, 0, 0, NULL }, +}; + +static PyMemberDef spy_message_j1850_object_members[] = { + { "StatusBitField", T_UINT, offsetof(spy_message_j1850_object, msg.StatusBitField), 0, "StatusBitField" }, + { "StatusBitField2", T_UINT, offsetof(spy_message_j1850_object, msg.StatusBitField2), 0, "StatusBitField2" }, + { "TimeHardware", + T_UINT, + offsetof(spy_message_j1850_object, msg.TimeHardware), + 0, + "Hardware time stamp. The TimeStamp is reset on device open" }, + { "TimeHardware2", + T_UINT, + offsetof(spy_message_j1850_object, msg.TimeHardware2), + 0, + "Hardware time stamp. The TimeStamp is reset on device open" }, + { "TimeSystem", + T_UINT, + offsetof(spy_message_j1850_object, msg.TimeSystem), + 0, + "TimeSystem is loaded with the value received from the timeGetTime call in the WIN32 multimedia API." }, + { "TimeSystem2", + T_UINT, + offsetof(spy_message_j1850_object, msg.TimeSystem2), + 0, + "TimeSystem is loaded with the value received from the timeGetTime call in the WIN32 multimedia API." }, + { "TimeStampHardwareID", + T_UBYTE, + offsetof(spy_message_j1850_object, msg.TimeStampHardwareID), + 0, + "This is an identifier of what type of hardware timestamp is used. Since neoVI's timestamp is always the same, " + "this doesn't change." }, + { "TimeStampSystemID", + T_UBYTE, + offsetof(spy_message_j1850_object, msg.TimeStampSystemID), + 0, + "This is an identifier of what type of system timestamp is used. Since WIN32 neoVI's timestamp is always the " + "same, " + "from the timeGetTime API, this doesn't change." }, + { "NetworkID", + T_UBYTE, + offsetof(spy_message_j1850_object, msg.NetworkID), + 0, + "This value is used to identify which network this message was received on." }, + { "NodeID", T_UBYTE, offsetof(spy_message_j1850_object, msg.NodeID), 0, "Not Used" }, + { "Protocol", + T_UBYTE, + offsetof(spy_message_j1850_object, msg.Protocol), + 0, + "Valid values are SPY_PROTOCOL_CAN, SPY_PROTOCOL_J1850VPW, and SPY_PROTOCOL_ISO9141." }, + { "MessagePieceID", T_UBYTE, offsetof(spy_message_j1850_object, msg.MessagePieceID), 0, "Not Used" }, + { "ExtraDataPtrEnabled", T_UBYTE, offsetof(spy_message_j1850_object, msg.ExtraDataPtrEnabled), 0, "" }, + { "NumberBytesHeader", + T_UBYTE, + offsetof(spy_message_j1850_object, msg.NumberBytesHeader), + 0, + " Used for J1850/ISO messages. It indicates how many bytes are stored in the Header(1 to 4) array." }, + { "NumberBytesData", + T_UBYTE, + offsetof(spy_message_j1850_object, msg.NumberBytesData), + 0, + "Holds the number of bytes in the Data(1 to 8) array or the number of bytes in a CAN remote frame (The DLC)." }, + { "NetworkID2", + T_UBYTE, + offsetof(spy_message_j1850_object, msg.NetworkID2), + 0, + "This value is used to identify which network this message was received on." }, + { "DescriptionID", T_SHORT, offsetof(spy_message_j1850_object, msg.DescriptionID), 0, "Not Used" }, + // Header, Data, AckBytes and ExtraDataPtr are handled by + // tp_getattro/tp_setattro; a member entry here would expose a descriptor + // that reinterprets raw struct memory as a PyObject*. + { "StatusBitField3", T_UINT, offsetof(spy_message_j1850_object, msg.StatusBitField3), 0, "StatusBitField3" }, + { "StatusBitField4", T_UINT, offsetof(spy_message_j1850_object, msg.StatusBitField4), 0, "StatusBitField4" }, + { "MiscData", T_UBYTE, offsetof(spy_message_j1850_object, msg.MiscData), 0, "" }, + { "noExtraDataPtrCleanup", + T_BOOL, + offsetof(spy_message_j1850_object, noExtraDataPtrCleanup), + 0, + "Tells Python to not clean up ExtraDataPtrMemory, If this is enabled. Ignore, if unsure." }, + { NULL, 0, 0, 0, NULL }, +}; + + PyTypeObject spy_message_object_type = { - PyVarObject_HEAD_INIT(NULL, 0) - MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME, /* tp_name */ - sizeof(spy_message_object), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)spy_message_object_dealloc,/* tp_dealloc */ - 0, /* tp_print */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_reserved */ - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - spy_message_object_getattr, /* tp_getattro */ - spy_message_object_setattr, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - SPY_MESSAGE_OBJECT_NAME" object", /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - spy_message_object_members, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)spy_message_object_alloc, /* tp_init */ + PyVarObject_HEAD_INIT(NULL, 0) MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME, /* tp_name */ + sizeof(spy_message_object), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)spy_message_object_dealloc, /* tp_dealloc */ + 0, /* tp_print */ + 0, /* tp_getattr */ + 0, /* tp_setattr */ + 0, /* tp_reserved */ + 0, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + 0, /* tp_str */ + spy_message_object_getattr, /* tp_getattro */ + spy_message_object_setattr, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + SPY_MESSAGE_OBJECT_NAME " object", /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + spy_message_object_members, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)spy_message_object_alloc, /* tp_init */ }; PyTypeObject spy_message_j1850_object_type = { - PyVarObject_HEAD_INIT(NULL, 0) - MODULE_NAME "." SPY_MESSAGE_J1850_OBJECT_NAME, /* tp_name */ - sizeof(spy_message_j1850_object), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)spy_message_object_dealloc,/* tp_dealloc */ - 0, /* tp_print */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_reserved */ - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - spy_message_object_getattr, /* tp_getattro */ - spy_message_object_setattr, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - SPY_MESSAGE_J1850_OBJECT_NAME" object", /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - spy_message_j1850_object_members, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)spy_message_object_alloc, /* tp_init */ + PyVarObject_HEAD_INIT(NULL, 0) MODULE_NAME "." SPY_MESSAGE_J1850_OBJECT_NAME, /* tp_name */ + sizeof(spy_message_j1850_object), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)spy_message_object_dealloc, /* tp_dealloc */ + 0, /* tp_print */ + 0, /* tp_getattr */ + 0, /* tp_setattr */ + 0, /* tp_reserved */ + 0, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + 0, /* tp_str */ + spy_message_object_getattr, /* tp_getattro */ + spy_message_object_setattr, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ + SPY_MESSAGE_J1850_OBJECT_NAME " object", /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + spy_message_j1850_object_members, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + (initproc)spy_message_object_alloc, /* tp_init */ }; bool setup_spy_message_object(PyObject* module) { - //spy_message_object_type.ob_type = &PyType_Type; + // spy_message_object_type.ob_type = &PyType_Type; spy_message_object_type.tp_new = PyType_GenericNew; if (PyType_Ready(&spy_message_object_type) < 0) { return false; diff --git a/src/setup_module_auto_defines.cpp b/src/setup_module_auto_defines.cpp index a041013c4..ac10d31d1 100644 --- a/src/setup_module_auto_defines.cpp +++ b/src/setup_module_auto_defines.cpp @@ -6,924 +6,1301 @@ #include "setup_module_auto_defines.h" #include +#pragma warning(push, 0) #include "ics/icsnVC40.h" +#pragma warning(pop) int setup_module_auto_defines(PyObject * module) { int result = 0; - result += PyModule_AddIntMacro(module, NEOVI_COMMTYPE_RS232); - result += PyModule_AddIntMacro(module, NEOVI_COMMTYPE_USB_BULK); - result += PyModule_AddIntMacro(module, NEOVI_COMMTYPE_TCPIP); - result += PyModule_AddIntMacro(module, NEOVI_COMMTYPE_FIRE_USB); - result += PyModule_AddIntMacro(module, NETID_DEVICE); - result += PyModule_AddIntMacro(module, NETID_HSCAN); - result += PyModule_AddIntMacro(module, NETID_MSCAN); - result += PyModule_AddIntMacro(module, NETID_SWCAN); - result += PyModule_AddIntMacro(module, NETID_LSFTCAN); - result += PyModule_AddIntMacro(module, NETID_FORDSCP); - result += PyModule_AddIntMacro(module, NETID_J1708); - result += PyModule_AddIntMacro(module, NETID_AUX); - result += PyModule_AddIntMacro(module, NETID_JVPW); - result += PyModule_AddIntMacro(module, NETID_ISO); - result += PyModule_AddIntMacro(module, NETID_ISOPIC); - result += PyModule_AddIntMacro(module, NETID_MAIN51); - result += PyModule_AddIntMacro(module, NETID_RED); - result += PyModule_AddIntMacro(module, NETID_SCI); - result += PyModule_AddIntMacro(module, NETID_ISO2); - result += PyModule_AddIntMacro(module, NETID_ISO14230); - result += PyModule_AddIntMacro(module, NETID_LIN); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET1); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET2); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET3); - result += PyModule_AddIntMacro(module, NETID_ISO3); - result += PyModule_AddIntMacro(module, NETID_HSCAN2); - result += PyModule_AddIntMacro(module, NETID_HSCAN3); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET4); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET5); - result += PyModule_AddIntMacro(module, NETID_ISO4); - result += PyModule_AddIntMacro(module, NETID_LIN2); - result += PyModule_AddIntMacro(module, NETID_LIN3); - result += PyModule_AddIntMacro(module, NETID_LIN4); - result += PyModule_AddIntMacro(module, NETID_MOST); - result += PyModule_AddIntMacro(module, NETID_RED_APP_ERROR); - result += PyModule_AddIntMacro(module, NETID_CGI); - result += PyModule_AddIntMacro(module, NETID_3G_RESET_STATUS); - result += PyModule_AddIntMacro(module, NETID_3G_FB_STATUS); - result += PyModule_AddIntMacro(module, NETID_3G_APP_SIGNAL_STATUS); - result += PyModule_AddIntMacro(module, NETID_3G_READ_DATALINK_CM_TX_MSG); - result += PyModule_AddIntMacro(module, NETID_3G_READ_DATALINK_CM_RX_MSG); - result += PyModule_AddIntMacro(module, NETID_3G_LOGGING_OVERFLOW); - result += PyModule_AddIntMacro(module, NETID_3G_READ_SETTINGS_EX); - result += PyModule_AddIntMacro(module, NETID_HSCAN4); - result += PyModule_AddIntMacro(module, NETID_HSCAN5); - result += PyModule_AddIntMacro(module, NETID_RS232); - result += PyModule_AddIntMacro(module, NETID_UART); - result += PyModule_AddIntMacro(module, NETID_UART2); - result += PyModule_AddIntMacro(module, NETID_UART3); - result += PyModule_AddIntMacro(module, NETID_UART4); - result += PyModule_AddIntMacro(module, NETID_SWCAN2); - result += PyModule_AddIntMacro(module, NETID_ETHERNET_DAQ); - result += PyModule_AddIntMacro(module, NETID_DATA_TO_HOST); - result += PyModule_AddIntMacro(module, NETID_TEXTAPI_TO_HOST); - result += PyModule_AddIntMacro(module, NETID_SPI1); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET6); - result += PyModule_AddIntMacro(module, NETID_RED_VBAT); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET7); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET8); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET9); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET10); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET11); - result += PyModule_AddIntMacro(module, NETID_FLEXRAY1A); - result += PyModule_AddIntMacro(module, NETID_FLEXRAY1B); - result += PyModule_AddIntMacro(module, NETID_FLEXRAY2A); - result += PyModule_AddIntMacro(module, NETID_FLEXRAY2B); - result += PyModule_AddIntMacro(module, NETID_LIN5); - result += PyModule_AddIntMacro(module, NETID_FLEXRAY); - result += PyModule_AddIntMacro(module, NETID_FLEXRAY2); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET12); - result += PyModule_AddIntMacro(module, NETID_I2C1); - result += PyModule_AddIntMacro(module, NETID_MOST25); - result += PyModule_AddIntMacro(module, NETID_MOST50); - result += PyModule_AddIntMacro(module, NETID_MOST150); - result += PyModule_AddIntMacro(module, NETID_ETHERNET); - result += PyModule_AddIntMacro(module, NETID_GMFSA); - result += PyModule_AddIntMacro(module, NETID_TCP); - result += PyModule_AddIntMacro(module, NETID_HSCAN6); - result += PyModule_AddIntMacro(module, NETID_HSCAN7); - result += PyModule_AddIntMacro(module, NETID_LIN6); - result += PyModule_AddIntMacro(module, NETID_LSFTCAN2); - result += PyModule_AddIntMacro(module, NETID_HW_COM_LATENCY_TEST); - result += PyModule_AddIntMacro(module, NETID_DEVICE_STATUS); - result += PyModule_AddIntMacro(module, NETID_UDP); - result += PyModule_AddIntMacro(module, NETID_AUTOSAR); - result += PyModule_AddIntMacro(module, NETID_FORWARDED_MESSAGE); - result += PyModule_AddIntMacro(module, NETID_I2C2); - result += PyModule_AddIntMacro(module, NETID_I2C3); - result += PyModule_AddIntMacro(module, NETID_I2C4); - result += PyModule_AddIntMacro(module, NETID_ETHERNET2); - result += PyModule_AddIntMacro(module, NETID_ETHERNET_TX_WRAP); - result += PyModule_AddIntMacro(module, NETID_A2B_01); - result += PyModule_AddIntMacro(module, NETID_A2B_02); - result += PyModule_AddIntMacro(module, NETID_ETHERNET3); - result += PyModule_AddIntMacro(module, NETID_ISM_LOGGER); - result += PyModule_AddIntMacro(module, NETID_CAN_SWITCH); - result += PyModule_AddIntMacro(module, NETID_MAX); - result += PyModule_AddIntMacro(module, NETID_INVALID); - result += PyModule_AddIntMacro(module, NEODEVICE_UNKNOWN); - result += PyModule_AddIntMacro(module, NEODEVICE_BLUE); - result += PyModule_AddIntMacro(module, NEODEVICE_ECU_AVB); - result += PyModule_AddIntMacro(module, NEODEVICE_RADSUPERMOON); - result += PyModule_AddIntMacro(module, NEODEVICE_DW_VCAN); - result += PyModule_AddIntMacro(module, NEODEVICE_RADMOON2); - result += PyModule_AddIntMacro(module, NEODEVICE_RADGIGALOG); - result += PyModule_AddIntMacro(module, NEODEVICE_VCAN41); - result += PyModule_AddIntMacro(module, NEODEVICE_FIRE); - result += PyModule_AddIntMacro(module, NEODEVICE_RADPLUTO); - result += PyModule_AddIntMacro(module, NEODEVICE_VCAN42_EL); - result += PyModule_AddIntMacro(module, NEODEVICE_RADIO_CANHUB); - result += PyModule_AddIntMacro(module, NEODEVICE_NEOECU12); - result += PyModule_AddIntMacro(module, NEODEVICE_OBD2_LC); - result += PyModule_AddIntMacro(module, NEODEVICE_RAD_MOON_DUO); - result += PyModule_AddIntMacro(module, NEODEVICE_FIRE3); - result += PyModule_AddIntMacro(module, NEODEVICE_VCAN3); - result += PyModule_AddIntMacro(module, NEODEVICE_RADJUPITER); - result += PyModule_AddIntMacro(module, NEODEVICE_VCAN4_IND); - result += PyModule_AddIntMacro(module, NEODEVICE_GIGASTAR); - result += PyModule_AddIntMacro(module, NEODEVICE_RED2); - result += PyModule_AddIntMacro(module, NEODEVICE_FIRE2_REDLINE); - result += PyModule_AddIntMacro(module, NEODEVICE_ETHER_BADGE); - result += PyModule_AddIntMacro(module, NEODEVICE_RAD_A2B); - result += PyModule_AddIntMacro(module, NEODEVICE_RADEPSILON); - result += PyModule_AddIntMacro(module, NEODEVICE_OBD2_SIM_DOIP); - result += PyModule_AddIntMacro(module, NEODEVICE_OBD2_DEV); - result += PyModule_AddIntMacro(module, NEODEVICE_ECU22); - result += PyModule_AddIntMacro(module, NEODEVICE_RADEPSILON_T); - result += PyModule_AddIntMacro(module, NEODEVICE_RADEPSILON_EXPRESS); - result += PyModule_AddIntMacro(module, NEODEVICE_RADPROXIMA); - result += PyModule_AddIntMacro(module, NEODEVICE_NEW_DEVICE_58); - result += PyModule_AddIntMacro(module, NEODEVICE_NEW_DEVICE_59); - result += PyModule_AddIntMacro(module, NEODEVICE_RAD_BMS); - result += PyModule_AddIntMacro(module, NEODEVICE_RED); - result += PyModule_AddIntMacro(module, NEODEVICE_ECU); - result += PyModule_AddIntMacro(module, NEODEVICE_IEVB); - result += PyModule_AddIntMacro(module, NEODEVICE_PENDANT); - result += PyModule_AddIntMacro(module, NEODEVICE_OBD2_PRO); - result += PyModule_AddIntMacro(module, NEODEVICE_ECUCHIP_UART); - result += PyModule_AddIntMacro(module, NEODEVICE_PLASMA); - result += PyModule_AddIntMacro(module, NEODEVICE_DONT_REUSE0); - result += PyModule_AddIntMacro(module, NEODEVICE_NEOANALOG); - result += PyModule_AddIntMacro(module, NEODEVICE_CT_OBD); - result += PyModule_AddIntMacro(module, NEODEVICE_DONT_REUSE1); - result += PyModule_AddIntMacro(module, NEODEVICE_DONT_REUSE2); - result += PyModule_AddIntMacro(module, NEODEVICE_ION); - result += PyModule_AddIntMacro(module, NEODEVICE_RADSTAR); - result += PyModule_AddIntMacro(module, NEODEVICE_DONT_REUSE3); - result += PyModule_AddIntMacro(module, NEODEVICE_VCAN44); - result += PyModule_AddIntMacro(module, NEODEVICE_VCAN42); - result += PyModule_AddIntMacro(module, NEODEVICE_CMPROBE); - result += PyModule_AddIntMacro(module, NEODEVICE_EEVB); - result += PyModule_AddIntMacro(module, NEODEVICE_VCANRF); - result += PyModule_AddIntMacro(module, NEODEVICE_FIRE2); - result += PyModule_AddIntMacro(module, NEODEVICE_FLEX); - result += PyModule_AddIntMacro(module, NEODEVICE_RADGALAXY); - result += PyModule_AddIntMacro(module, NEODEVICE_RADSTAR2); - result += PyModule_AddIntMacro(module, NEODEVICE_VIVIDCAN); - result += PyModule_AddIntMacro(module, NEODEVICE_OBD2_SIM); - result += PyModule_AddIntMacro(module, NEODEVICE_ANY_PLASMA); - result += PyModule_AddIntMacro(module, NEODEVICE_ANY_ION); - result += PyModule_AddIntMacro(module, NEODEVICE_NEOECUCHIP); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_HSCAN); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_MSCAN); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_HSCAN2); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_HSCAN3); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_SWCAN); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_HSCAN4); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_HSCAN5); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_HSCAN6); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_HSCAN7); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_SWCAN2); - result += PyModule_AddIntMacro(module, PLASMA_SLAVE1_OFFSET); - result += PyModule_AddIntMacro(module, PLASMA_SLAVE2_OFFSET); - result += PyModule_AddIntMacro(module, PLASMA_SLAVE_NUM); - result += PyModule_AddIntMacro(module, PLASMA_SLAVE1_OFFSET_RANGE2); - result += PyModule_AddIntMacro(module, PLASMA_SLAVE2_OFFSET_RANGE2); - result += PyModule_AddIntMacro(module, PLASMA_SLAVE3_OFFSET_RANGE2); - result += PyModule_AddIntMacro(module, SCRIPT_STATUS_STOPPED); - result += PyModule_AddIntMacro(module, SCRIPT_STATUS_RUNNING); - result += PyModule_AddIntMacro(module, SCRIPT_LOCATION_FLASH_MEM); - result += PyModule_AddIntMacro(module, SCRIPT_LOCATION_INTERNAL_FLASH); - result += PyModule_AddIntMacro(module, SCRIPT_LOCATION_SDCARD); - result += PyModule_AddIntMacro(module, SCRIPT_LOCATION_VCAN3_MEM); - result += PyModule_AddIntMacro(module, SCRIPT_LOCATION_EMMC); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_CUSTOM); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_CAN); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_GMLAN); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_J1850VPW); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_J1850PWM); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_ISO9141); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_Keyword2000); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_GM_ALDL_UART); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_CHRYSLER_CCD); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_CHRYSLER_SCI); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_FORD_UBP); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_BEAN); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_LIN); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_J1708); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_CHRYSLER_JVPW); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_J1939); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_FLEXRAY); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_MOST); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_CGI); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_GME_CIM_SCL_KLINE); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_SPI); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_I2C); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_GENERIC_UART); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_JTAG); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_UNIO); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_DALLAS_1WIRE); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_GENERIC_MANCHSESTER); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_SENT_PROTOCOL); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_UART); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_ETHERNET); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_CANFD); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_GMFSA); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_TCP); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_UDP); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_AUTOSAR); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_A2B); - result += PyModule_AddIntMacro(module, SPY_STATUS_GLOBAL_ERR); - result += PyModule_AddIntMacro(module, SPY_STATUS_TX_MSG); - result += PyModule_AddIntMacro(module, SPY_STATUS_XTD_FRAME); - result += PyModule_AddIntMacro(module, SPY_STATUS_REMOTE_FRAME); - result += PyModule_AddIntMacro(module, SPY_STATUS_CRC_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS_CAN_ERROR_PASSIVE); - result += PyModule_AddIntMacro(module, SPY_STATUS_HEADERCRC_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS_INCOMPLETE_FRAME); - result += PyModule_AddIntMacro(module, SPY_STATUS_LOST_ARBITRATION); - result += PyModule_AddIntMacro(module, SPY_STATUS_UNDEFINED_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS_CAN_BUS_OFF); - result += PyModule_AddIntMacro(module, SPY_STATUS_BUS_RECOVERED); - result += PyModule_AddIntMacro(module, SPY_STATUS_BUS_SHORTED_PLUS); - result += PyModule_AddIntMacro(module, SPY_STATUS_BUS_SHORTED_GND); - result += PyModule_AddIntMacro(module, SPY_STATUS_CHECKSUM_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS_BAD_MESSAGE_BIT_TIME_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS_TX_NOMATCH); - result += PyModule_AddIntMacro(module, SPY_STATUS_COMM_IN_OVERFLOW); - result += PyModule_AddIntMacro(module, SPY_STATUS_EXPECTED_LEN_MISMATCH); - result += PyModule_AddIntMacro(module, SPY_STATUS_MSG_NO_MATCH); - result += PyModule_AddIntMacro(module, SPY_STATUS_BREAK); - result += PyModule_AddIntMacro(module, SPY_STATUS_AVSI_REC_OVERFLOW); - result += PyModule_AddIntMacro(module, SPY_STATUS_TEST_TRIGGER); - result += PyModule_AddIntMacro(module, SPY_STATUS_AUDIO_COMMENT); - result += PyModule_AddIntMacro(module, SPY_STATUS_GPS_DATA); - result += PyModule_AddIntMacro(module, SPY_STATUS_ANALOG_DIGITAL_INPUT); - result += PyModule_AddIntMacro(module, SPY_STATUS_TEXT_COMMENT); - result += PyModule_AddIntMacro(module, SPY_STATUS_NETWORK_MESSAGE_TYPE); - result += PyModule_AddIntMacro(module, SPY_STATUS_VSI_TX_UNDERRUN); - result += PyModule_AddIntMacro(module, SPY_STATUS_VSI_IFR_CRC_BIT); - result += PyModule_AddIntMacro(module, SPY_STATUS_INIT_MESSAGE); - result += PyModule_AddIntMacro(module, SPY_STATUS_LIN_MASTER); - result += PyModule_AddIntMacro(module, SPY_STATUS_CANFD); - result += PyModule_AddIntMacro(module, SPY_STATUS_A2B_CONTROL); - result += PyModule_AddIntMacro(module, SPY_STATUS_A2B_SCF_VALID_WAITING); - result += PyModule_AddIntMacro(module, SPY_STATUS_A2B_MONITOR); - result += PyModule_AddIntMacro(module, SPY_STATUS_A2B_UPSTREAM); - result += PyModule_AddIntMacro(module, SPY_STATUS_PDU); - result += PyModule_AddIntMacro(module, SPY_STATUS_FLEXRAY_PDU); - result += PyModule_AddIntMacro(module, SPY_STATUS_HIGH_SPEED); - result += PyModule_AddIntMacro(module, SPY_STATUS_EXTENDED); - result += PyModule_AddIntMacro(module, SPY_STATUS_FLEXRAY_PDU_UPDATE_BIT_SET); - result += PyModule_AddIntMacro(module, SPY_STATUS_FLEXRAY_PDU_NO_UPDATE_BIT); - result += PyModule_AddIntMacro(module, SPY_STATUS2_HAS_VALUE); - result += PyModule_AddIntMacro(module, SPY_STATUS2_VALUE_IS_BOOLEAN); - result += PyModule_AddIntMacro(module, SPY_STATUS2_HIGH_VOLTAGE); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LONG_MESSAGE); - result += PyModule_AddIntMacro(module, SPY_STATUS2_GLOBAL_CHANGE); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ERROR_FRAME); - result += PyModule_AddIntMacro(module, SPY_STATUS2_END_OF_LONG_MESSAGE); - result += PyModule_AddIntMacro(module, SPY_STATUS2_I2C_ERR_TIMEOUT); - result += PyModule_AddIntMacro(module, SPY_STATUS2_I2C_ERR_NACK); - result += PyModule_AddIntMacro(module, SPY_STATUS2_I2C_DIR_READ); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_ERR_RX_BREAK_NOT_0); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_ERR_RX_BREAK_TOO_SHORT); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_ERR_RX_SYNC_NOT_55); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_ERR_RX_DATA_GREATER_8); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_ERR_TX_RX_MISMATCH); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_ERR_MSG_ID_PARITY); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ISO_FRAME_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_SYNC_FRAME_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ISO_OVERFLOW_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_ID_FRAME_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ISO_PARITY_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_SLAVE_BYTE_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_RX_TIMEOUT_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_NO_SLAVE_DATA); - result += PyModule_AddIntMacro(module, SPY_STATUS3_LIN_JUST_BREAK_SYNC); - result += PyModule_AddIntMacro(module, SPY_STATUS3_LIN_SLAVE_DATA_TOO_SHORT); - result += PyModule_AddIntMacro(module, SPY_STATUS3_LIN_ONLY_UPDATE_SLAVE_TABLE_ONCE); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_PACKET_DATA); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_STATUS); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_LOW_LEVEL); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_CONTROL_DATA); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_MHP_USER_DATA); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_MHP_CONTROL_DATA); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_I2S_DUMP); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_TOO_SHORT); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_MOST50); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_MOST150); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_CHANGED_PAR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ETHERNET_CRC_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ETHERNET_FRAME_TOO_SHORT); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ETHERNET_NO_PADDING); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ETHERNET_PREEMPTION_ENABLED); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ETHERNET_UPDATE_CHECKSUMS); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ETHERNET_MANUALFCS_ENABLED); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ETHERNET_FCS_VERIFIED); - result += PyModule_AddIntMacro(module, SPY_STATUS2_FLEXRAY_TX_AB); - result += PyModule_AddIntMacro(module, SPY_STATUS2_FLEXRAY_TX_AB_NO_A); - result += PyModule_AddIntMacro(module, SPY_STATUS2_FLEXRAY_TX_AB_NO_B); - result += PyModule_AddIntMacro(module, SPY_STATUS2_FLEXRAY_TX_AB_NO_MATCH); - result += PyModule_AddIntMacro(module, SPY_STATUS2_FLEXRAY_NO_CRC); - result += PyModule_AddIntMacro(module, SPY_STATUS2_FLEXRAY_NO_HEADERCRC); - result += PyModule_AddIntMacro(module, SPY_STATUS2_CAN_ISO15765_LOGICAL_FRAME); - result += PyModule_AddIntMacro(module, SPY_STATUS2_CAN_HAVE_LINK_DATA); - result += PyModule_AddIntMacro(module, SPY_STATUS3_CANFD_ESI); - result += PyModule_AddIntMacro(module, SPY_STATUS3_CANFD_IDE); - result += PyModule_AddIntMacro(module, SPY_STATUS3_CANFD_RTR); - result += PyModule_AddIntMacro(module, SPY_STATUS3_CANFD_FDF); - result += PyModule_AddIntMacro(module, SPY_STATUS3_CANFD_BRS); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_HS_CAN_CNF1); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_HS_CAN_CNF2); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_HS_CAN_CNF3); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_HS_CAN_MODE); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_MS_CAN_CNF1); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_MS_CAN_CNF2); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_MS_CAN_CNF3); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_SW_CAN_CNF1); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_SW_CAN_CNF2); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_SW_CAN_CNF3); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_LSFT_CAN_CNF1); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_LSFT_CAN_CNF2); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_LSFT_CAN_CNF3); - result += PyModule_AddObject(module, "NEOVI_TIMESTAMP_2", PyFloat_FromDouble(NEOVI_TIMESTAMP_2)); - result += PyModule_AddObject(module, "NEOVI_TIMESTAMP_1", PyFloat_FromDouble(NEOVI_TIMESTAMP_1)); - result += PyModule_AddObject(module, "NEOVIPRO_VCAN_TIMESTAMP_2", PyFloat_FromDouble(NEOVIPRO_VCAN_TIMESTAMP_2)); - result += PyModule_AddObject(module, "NEOVIPRO_VCAN_TIMESTAMP_1", PyFloat_FromDouble(NEOVIPRO_VCAN_TIMESTAMP_1)); - result += PyModule_AddObject(module, "NEOVI6_VCAN_TIMESTAMP_2", PyFloat_FromDouble(NEOVI6_VCAN_TIMESTAMP_2)); - result += PyModule_AddObject(module, "NEOVI6_VCAN_TIMESTAMP_1", PyFloat_FromDouble(NEOVI6_VCAN_TIMESTAMP_1)); - result += PyModule_AddObject(module, "NEOVI_RED_TIMESTAMP_2_25NS", PyFloat_FromDouble(NEOVI_RED_TIMESTAMP_2_25NS)); - result += PyModule_AddObject(module, "NEOVI_RED_TIMESTAMP_1_25NS", PyFloat_FromDouble(NEOVI_RED_TIMESTAMP_1_25NS)); - result += PyModule_AddObject(module, "NEOVI_RED_TIMESTAMP_2_10NS", PyFloat_FromDouble(NEOVI_RED_TIMESTAMP_2_10NS)); - result += PyModule_AddObject(module, "NEOVI_RED_TIMESTAMP_1_10NS", PyFloat_FromDouble(NEOVI_RED_TIMESTAMP_1_10NS)); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_NONE); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_VSI); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_AVT_716); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_NI_CAN); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_NEOVI); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_AVT_717); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_NEOv6_VCAN); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_DOUBLE_SEC); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_NEORED_10US); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_NEORED_25NS); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_NEORED_10NS); - result += PyModule_AddIntMacro(module, CANNODE_STATUS_COREMINI_IS_RUNNING); - result += PyModule_AddIntMacro(module, CANNODE_STATUS_IN_BOOTLOADER); - result += PyModule_AddIntMacro(module, MAIN_VNET); - result += PyModule_AddIntMacro(module, SLAVE_VNET_A); - result += PyModule_AddIntMacro(module, SLAVE_VNET_B); - result += PyModule_AddIntMacro(module, WIFI_CONNECTION); - result += PyModule_AddIntMacro(module, REGISTER_BY_SERIAL); - // enum - result += PyModule_AddIntMacro(module, AUTO); - result += PyModule_AddIntMacro(module, USE_TQ); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_RX_TIMEOUT_ERROR", PyLong_FromLongLong(SPY_STATUS2_RX_TIMEOUT_ERROR)); + result += PyModule_AddObjectRef(module, "NEOVI_COMMTYPE_RS232", PyLong_FromUnsignedLongLong(NEOVI_COMMTYPE_RS232)); + result += PyModule_AddObjectRef(module, "NEOVI_COMMTYPE_USB_BULK", PyLong_FromUnsignedLongLong(NEOVI_COMMTYPE_USB_BULK)); + result += PyModule_AddObjectRef(module, "NEOVI_COMMTYPE_TCPIP", PyLong_FromUnsignedLongLong(NEOVI_COMMTYPE_TCPIP)); + result += PyModule_AddObjectRef(module, "NEOVI_COMMTYPE_FIRE_USB", PyLong_FromUnsignedLongLong(NEOVI_COMMTYPE_FIRE_USB)); + result += PyModule_AddObjectRef(module, "NETID_DEVICE", PyLong_FromUnsignedLongLong(NETID_DEVICE)); + result += PyModule_AddObjectRef(module, "NETID_HSCAN", PyLong_FromUnsignedLongLong(NETID_HSCAN)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_01", PyLong_FromLongLong(NETID_DWCAN_01)); + result += PyModule_AddObjectRef(module, "NETID_MSCAN", PyLong_FromUnsignedLongLong(NETID_MSCAN)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_08", PyLong_FromLongLong(NETID_DWCAN_08)); + result += PyModule_AddObjectRef(module, "NETID_SWCAN", PyLong_FromUnsignedLongLong(NETID_SWCAN)); + result += PyModule_AddObjectRef(module, "NETID_LSFTCAN", PyLong_FromUnsignedLongLong(NETID_LSFTCAN)); + result += PyModule_AddObjectRef(module, "NETID_FORDSCP", PyLong_FromUnsignedLongLong(NETID_FORDSCP)); + result += PyModule_AddObjectRef(module, "NETID_J1708", PyLong_FromUnsignedLongLong(NETID_J1708)); + result += PyModule_AddObjectRef(module, "NETID_AUX", PyLong_FromUnsignedLongLong(NETID_AUX)); + result += PyModule_AddObjectRef(module, "NETID_JVPW", PyLong_FromUnsignedLongLong(NETID_JVPW)); + result += PyModule_AddObjectRef(module, "NETID_ISO", PyLong_FromUnsignedLongLong(NETID_ISO)); + result += PyModule_AddObjectRef(module, "NETID_ISOPIC", PyLong_FromUnsignedLongLong(NETID_ISOPIC)); + result += PyModule_AddObjectRef(module, "NETID_MAIN51", PyLong_FromUnsignedLongLong(NETID_MAIN51)); + result += PyModule_AddObjectRef(module, "NETID_RED", PyLong_FromUnsignedLongLong(NETID_RED)); + result += PyModule_AddObjectRef(module, "NETID_SCI", PyLong_FromUnsignedLongLong(NETID_SCI)); + result += PyModule_AddObjectRef(module, "NETID_ISO2", PyLong_FromUnsignedLongLong(NETID_ISO2)); + result += PyModule_AddObjectRef(module, "NETID_ISO14230", PyLong_FromUnsignedLongLong(NETID_ISO14230)); + result += PyModule_AddObjectRef(module, "NETID_LIN", PyLong_FromUnsignedLongLong(NETID_LIN)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET1", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET1)); + result += PyModule_AddObjectRef(module, "NETID_AE_01", PyLong_FromLongLong(NETID_AE_01)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET2", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET2)); + result += PyModule_AddObjectRef(module, "NETID_AE_02", PyLong_FromLongLong(NETID_AE_02)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET3", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET3)); + result += PyModule_AddObjectRef(module, "NETID_AE_03", PyLong_FromLongLong(NETID_AE_03)); + result += PyModule_AddObjectRef(module, "NETID_ISO3", PyLong_FromUnsignedLongLong(NETID_ISO3)); + result += PyModule_AddObjectRef(module, "NETID_HSCAN2", PyLong_FromUnsignedLongLong(NETID_HSCAN2)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_02", PyLong_FromLongLong(NETID_DWCAN_02)); + result += PyModule_AddObjectRef(module, "NETID_HSCAN3", PyLong_FromUnsignedLongLong(NETID_HSCAN3)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_03", PyLong_FromLongLong(NETID_DWCAN_03)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET4", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET4)); + result += PyModule_AddObjectRef(module, "NETID_AE_04", PyLong_FromLongLong(NETID_AE_04)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET5", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET5)); + result += PyModule_AddObjectRef(module, "NETID_AE_05", PyLong_FromLongLong(NETID_AE_05)); + result += PyModule_AddObjectRef(module, "NETID_ISO4", PyLong_FromUnsignedLongLong(NETID_ISO4)); + result += PyModule_AddObjectRef(module, "NETID_LIN2", PyLong_FromUnsignedLongLong(NETID_LIN2)); + result += PyModule_AddObjectRef(module, "NETID_LIN3", PyLong_FromUnsignedLongLong(NETID_LIN3)); + result += PyModule_AddObjectRef(module, "NETID_LIN4", PyLong_FromUnsignedLongLong(NETID_LIN4)); + result += PyModule_AddObjectRef(module, "NETID_MOST", PyLong_FromUnsignedLongLong(NETID_MOST)); + result += PyModule_AddObjectRef(module, "NETID_RED_APP_ERROR", PyLong_FromUnsignedLongLong(NETID_RED_APP_ERROR)); + result += PyModule_AddObjectRef(module, "NETID_CGI", PyLong_FromUnsignedLongLong(NETID_CGI)); + result += PyModule_AddObjectRef(module, "NETID_3G_RESET_STATUS", PyLong_FromUnsignedLongLong(NETID_3G_RESET_STATUS)); + result += PyModule_AddObjectRef(module, "NETID_3G_FB_STATUS", PyLong_FromUnsignedLongLong(NETID_3G_FB_STATUS)); + result += PyModule_AddObjectRef(module, "NETID_3G_APP_SIGNAL_STATUS", PyLong_FromUnsignedLongLong(NETID_3G_APP_SIGNAL_STATUS)); + result += PyModule_AddObjectRef(module, "NETID_3G_READ_DATALINK_CM_TX_MSG", PyLong_FromUnsignedLongLong(NETID_3G_READ_DATALINK_CM_TX_MSG)); + result += PyModule_AddObjectRef(module, "NETID_3G_READ_DATALINK_CM_RX_MSG", PyLong_FromUnsignedLongLong(NETID_3G_READ_DATALINK_CM_RX_MSG)); + result += PyModule_AddObjectRef(module, "NETID_3G_LOGGING_OVERFLOW", PyLong_FromUnsignedLongLong(NETID_3G_LOGGING_OVERFLOW)); + result += PyModule_AddObjectRef(module, "NETID_3G_READ_SETTINGS_EX", PyLong_FromUnsignedLongLong(NETID_3G_READ_SETTINGS_EX)); + result += PyModule_AddObjectRef(module, "NETID_HSCAN4", PyLong_FromUnsignedLongLong(NETID_HSCAN4)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_04", PyLong_FromLongLong(NETID_DWCAN_04)); + result += PyModule_AddObjectRef(module, "NETID_HSCAN5", PyLong_FromUnsignedLongLong(NETID_HSCAN5)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_05", PyLong_FromLongLong(NETID_DWCAN_05)); + result += PyModule_AddObjectRef(module, "NETID_RS232", PyLong_FromUnsignedLongLong(NETID_RS232)); + result += PyModule_AddObjectRef(module, "NETID_UART", PyLong_FromUnsignedLongLong(NETID_UART)); + result += PyModule_AddObjectRef(module, "NETID_UART2", PyLong_FromUnsignedLongLong(NETID_UART2)); + result += PyModule_AddObjectRef(module, "NETID_UART3", PyLong_FromUnsignedLongLong(NETID_UART3)); + result += PyModule_AddObjectRef(module, "NETID_UART4", PyLong_FromUnsignedLongLong(NETID_UART4)); + result += PyModule_AddObjectRef(module, "NETID_SWCAN2", PyLong_FromUnsignedLongLong(NETID_SWCAN2)); + result += PyModule_AddObjectRef(module, "NETID_ETHERNET_DAQ", PyLong_FromUnsignedLongLong(NETID_ETHERNET_DAQ)); + result += PyModule_AddObjectRef(module, "NETID_DATA_TO_HOST", PyLong_FromUnsignedLongLong(NETID_DATA_TO_HOST)); + result += PyModule_AddObjectRef(module, "NETID_TEXTAPI_TO_HOST", PyLong_FromUnsignedLongLong(NETID_TEXTAPI_TO_HOST)); + result += PyModule_AddObjectRef(module, "NETID_SPI1", PyLong_FromUnsignedLongLong(NETID_SPI1)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET6", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET6)); + result += PyModule_AddObjectRef(module, "NETID_AE_06", PyLong_FromLongLong(NETID_AE_06)); + result += PyModule_AddObjectRef(module, "NETID_RED_VBAT", PyLong_FromUnsignedLongLong(NETID_RED_VBAT)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET7", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET7)); + result += PyModule_AddObjectRef(module, "NETID_AE_07", PyLong_FromLongLong(NETID_AE_07)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET8", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET8)); + result += PyModule_AddObjectRef(module, "NETID_AE_08", PyLong_FromLongLong(NETID_AE_08)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET9", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET9)); + result += PyModule_AddObjectRef(module, "NETID_AE_09", PyLong_FromLongLong(NETID_AE_09)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET10", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET10)); + result += PyModule_AddObjectRef(module, "NETID_AE_10", PyLong_FromLongLong(NETID_AE_10)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET11", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET11)); + result += PyModule_AddObjectRef(module, "NETID_AE_11", PyLong_FromLongLong(NETID_AE_11)); + result += PyModule_AddObjectRef(module, "NETID_FLEXRAY1A", PyLong_FromUnsignedLongLong(NETID_FLEXRAY1A)); + result += PyModule_AddObjectRef(module, "NETID_FLEXRAY1B", PyLong_FromUnsignedLongLong(NETID_FLEXRAY1B)); + result += PyModule_AddObjectRef(module, "NETID_FLEXRAY2A", PyLong_FromUnsignedLongLong(NETID_FLEXRAY2A)); + result += PyModule_AddObjectRef(module, "NETID_FLEXRAY2B", PyLong_FromUnsignedLongLong(NETID_FLEXRAY2B)); + result += PyModule_AddObjectRef(module, "NETID_LIN5", PyLong_FromUnsignedLongLong(NETID_LIN5)); + result += PyModule_AddObjectRef(module, "NETID_FLEXRAY", PyLong_FromUnsignedLongLong(NETID_FLEXRAY)); + result += PyModule_AddObjectRef(module, "NETID_FLEXRAY2", PyLong_FromUnsignedLongLong(NETID_FLEXRAY2)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET12", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET12)); + result += PyModule_AddObjectRef(module, "NETID_AE_12", PyLong_FromLongLong(NETID_AE_12)); + result += PyModule_AddObjectRef(module, "NETID_I2C1", PyLong_FromUnsignedLongLong(NETID_I2C1)); + result += PyModule_AddObjectRef(module, "NETID_MOST25", PyLong_FromUnsignedLongLong(NETID_MOST25)); + result += PyModule_AddObjectRef(module, "NETID_MOST50", PyLong_FromUnsignedLongLong(NETID_MOST50)); + result += PyModule_AddObjectRef(module, "NETID_MOST150", PyLong_FromUnsignedLongLong(NETID_MOST150)); + result += PyModule_AddObjectRef(module, "NETID_ETHERNET", PyLong_FromUnsignedLongLong(NETID_ETHERNET)); + result += PyModule_AddObjectRef(module, "NETID_GMFSA", PyLong_FromUnsignedLongLong(NETID_GMFSA)); + result += PyModule_AddObjectRef(module, "NETID_TCP", PyLong_FromUnsignedLongLong(NETID_TCP)); + result += PyModule_AddObjectRef(module, "NETID_HSCAN6", PyLong_FromUnsignedLongLong(NETID_HSCAN6)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_06", PyLong_FromLongLong(NETID_DWCAN_06)); + result += PyModule_AddObjectRef(module, "NETID_HSCAN7", PyLong_FromUnsignedLongLong(NETID_HSCAN7)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_07", PyLong_FromLongLong(NETID_DWCAN_07)); + result += PyModule_AddObjectRef(module, "NETID_LIN6", PyLong_FromUnsignedLongLong(NETID_LIN6)); + result += PyModule_AddObjectRef(module, "NETID_LSFTCAN2", PyLong_FromUnsignedLongLong(NETID_LSFTCAN2)); + result += PyModule_AddObjectRef(module, "NETID_HW_COM_LATENCY_TEST", PyLong_FromUnsignedLongLong(NETID_HW_COM_LATENCY_TEST)); + result += PyModule_AddObjectRef(module, "NETID_DEVICE_STATUS", PyLong_FromUnsignedLongLong(NETID_DEVICE_STATUS)); + result += PyModule_AddObjectRef(module, "NETID_UDP", PyLong_FromUnsignedLongLong(NETID_UDP)); + result += PyModule_AddObjectRef(module, "NETID_AUTOSAR", PyLong_FromUnsignedLongLong(NETID_AUTOSAR)); + result += PyModule_AddObjectRef(module, "NETID_FORWARDED_MESSAGE", PyLong_FromUnsignedLongLong(NETID_FORWARDED_MESSAGE)); + result += PyModule_AddObjectRef(module, "NETID_I2C2", PyLong_FromUnsignedLongLong(NETID_I2C2)); + result += PyModule_AddObjectRef(module, "NETID_I2C3", PyLong_FromUnsignedLongLong(NETID_I2C3)); + result += PyModule_AddObjectRef(module, "NETID_I2C4", PyLong_FromUnsignedLongLong(NETID_I2C4)); + result += PyModule_AddObjectRef(module, "NETID_ETHERNET2", PyLong_FromUnsignedLongLong(NETID_ETHERNET2)); + result += PyModule_AddObjectRef(module, "NETID_ETHERNET_TX_WRAP", PyLong_FromUnsignedLongLong(NETID_ETHERNET_TX_WRAP)); + result += PyModule_AddObjectRef(module, "NETID_A2B_01", PyLong_FromUnsignedLongLong(NETID_A2B_01)); + result += PyModule_AddObjectRef(module, "NETID_A2B_02", PyLong_FromUnsignedLongLong(NETID_A2B_02)); + result += PyModule_AddObjectRef(module, "NETID_ETHERNET3", PyLong_FromUnsignedLongLong(NETID_ETHERNET3)); + result += PyModule_AddObjectRef(module, "NETID_ISM_LOGGER", PyLong_FromUnsignedLongLong(NETID_ISM_LOGGER)); + result += PyModule_AddObjectRef(module, "NETID_CAN_SWITCH", PyLong_FromUnsignedLongLong(NETID_CAN_SWITCH)); + result += PyModule_AddObjectRef(module, "NETID_WBMS", PyLong_FromUnsignedLongLong(NETID_WBMS)); + result += PyModule_AddObjectRef(module, "NETID_WBMS2", PyLong_FromUnsignedLongLong(NETID_WBMS2)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_09", PyLong_FromUnsignedLongLong(NETID_DWCAN_09)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_10", PyLong_FromUnsignedLongLong(NETID_DWCAN_10)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_11", PyLong_FromUnsignedLongLong(NETID_DWCAN_11)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_12", PyLong_FromUnsignedLongLong(NETID_DWCAN_12)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_13", PyLong_FromUnsignedLongLong(NETID_DWCAN_13)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_14", PyLong_FromUnsignedLongLong(NETID_DWCAN_14)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_15", PyLong_FromUnsignedLongLong(NETID_DWCAN_15)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_16", PyLong_FromUnsignedLongLong(NETID_DWCAN_16)); + result += PyModule_AddObjectRef(module, "NETID_LIN_07", PyLong_FromUnsignedLongLong(NETID_LIN_07)); + result += PyModule_AddObjectRef(module, "NETID_LIN_08", PyLong_FromUnsignedLongLong(NETID_LIN_08)); + result += PyModule_AddObjectRef(module, "NETID_SPI2", PyLong_FromUnsignedLongLong(NETID_SPI2)); + result += PyModule_AddObjectRef(module, "NETID_MDIO_01", PyLong_FromUnsignedLongLong(NETID_MDIO_01)); + result += PyModule_AddObjectRef(module, "NETID_MDIO_02", PyLong_FromUnsignedLongLong(NETID_MDIO_02)); + result += PyModule_AddObjectRef(module, "NETID_MDIO_03", PyLong_FromUnsignedLongLong(NETID_MDIO_03)); + result += PyModule_AddObjectRef(module, "NETID_MDIO_04", PyLong_FromUnsignedLongLong(NETID_MDIO_04)); + result += PyModule_AddObjectRef(module, "NETID_MDIO_05", PyLong_FromUnsignedLongLong(NETID_MDIO_05)); + result += PyModule_AddObjectRef(module, "NETID_MDIO_06", PyLong_FromUnsignedLongLong(NETID_MDIO_06)); + result += PyModule_AddObjectRef(module, "NETID_MDIO_07", PyLong_FromUnsignedLongLong(NETID_MDIO_07)); + result += PyModule_AddObjectRef(module, "NETID_MDIO_08", PyLong_FromUnsignedLongLong(NETID_MDIO_08)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET13", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET13)); + result += PyModule_AddObjectRef(module, "NETID_AE_13", PyLong_FromLongLong(NETID_AE_13)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET14", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET14)); + result += PyModule_AddObjectRef(module, "NETID_AE_14", PyLong_FromLongLong(NETID_AE_14)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET15", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET15)); + result += PyModule_AddObjectRef(module, "NETID_AE_15", PyLong_FromLongLong(NETID_AE_15)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET16", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET16)); + result += PyModule_AddObjectRef(module, "NETID_AE_16", PyLong_FromLongLong(NETID_AE_16)); + result += PyModule_AddObjectRef(module, "NETID_SPI3", PyLong_FromUnsignedLongLong(NETID_SPI3)); + result += PyModule_AddObjectRef(module, "NETID_SPI4", PyLong_FromUnsignedLongLong(NETID_SPI4)); + result += PyModule_AddObjectRef(module, "NETID_SPI5", PyLong_FromUnsignedLongLong(NETID_SPI5)); + result += PyModule_AddObjectRef(module, "NETID_SPI6", PyLong_FromUnsignedLongLong(NETID_SPI6)); + result += PyModule_AddObjectRef(module, "NETID_SPI7", PyLong_FromUnsignedLongLong(NETID_SPI7)); + result += PyModule_AddObjectRef(module, "NETID_SPI8", PyLong_FromUnsignedLongLong(NETID_SPI8)); + result += PyModule_AddObjectRef(module, "NETID_LIN_09", PyLong_FromUnsignedLongLong(NETID_LIN_09)); + result += PyModule_AddObjectRef(module, "NETID_LIN_10", PyLong_FromUnsignedLongLong(NETID_LIN_10)); + result += PyModule_AddObjectRef(module, "NETID_LIN_11", PyLong_FromUnsignedLongLong(NETID_LIN_11)); + result += PyModule_AddObjectRef(module, "NETID_LIN_12", PyLong_FromUnsignedLongLong(NETID_LIN_12)); + result += PyModule_AddObjectRef(module, "NETID_LIN_13", PyLong_FromUnsignedLongLong(NETID_LIN_13)); + result += PyModule_AddObjectRef(module, "NETID_LIN_14", PyLong_FromUnsignedLongLong(NETID_LIN_14)); + result += PyModule_AddObjectRef(module, "NETID_LIN_15", PyLong_FromUnsignedLongLong(NETID_LIN_15)); + result += PyModule_AddObjectRef(module, "NETID_LIN_16", PyLong_FromUnsignedLongLong(NETID_LIN_16)); + result += PyModule_AddObjectRef(module, "NETID_MAX", PyLong_FromUnsignedLongLong(NETID_MAX)); + result += PyModule_AddObjectRef(module, "NETID_INVALID", PyLong_FromLongLong(NETID_INVALID)); + result += PyModule_AddObjectRef(module, "NEODEVICE_UNKNOWN", PyLong_FromLongLong(NEODEVICE_UNKNOWN)); + result += PyModule_AddObjectRef(module, "NEODEVICE_BLUE_DEPRECATED", PyLong_FromLongLong(NEODEVICE_BLUE_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_ECU_AVB_DEPRECATED", PyLong_FromLongLong(NEODEVICE_ECU_AVB_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADSUPERMOON_DEPRECATED", PyLong_FromLongLong(NEODEVICE_RADSUPERMOON_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_DW_VCAN_DEPRECATED", PyLong_FromLongLong(NEODEVICE_DW_VCAN_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADMOON2", PyLong_FromLongLong(NEODEVICE_RADMOON2)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADGIGALOG_DEPRECATED", PyLong_FromLongLong(NEODEVICE_RADGIGALOG_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_VCAN41", PyLong_FromLongLong(NEODEVICE_VCAN41)); + result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE_DEPRECATED", PyLong_FromLongLong(NEODEVICE_FIRE_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADPLUTO_DEPRECATED", PyLong_FromLongLong(NEODEVICE_RADPLUTO_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_VCAN42_EL", PyLong_FromLongLong(NEODEVICE_VCAN42_EL)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADIO_CANHUB", PyLong_FromLongLong(NEODEVICE_RADIO_CANHUB)); + result += PyModule_AddObjectRef(module, "NEODEVICE_NEOECU12", PyLong_FromLongLong(NEODEVICE_NEOECU12)); + result += PyModule_AddObjectRef(module, "NEODEVICE_OBD2_LC", PyLong_FromLongLong(NEODEVICE_OBD2_LC)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RAD_MOON_DUO_DEPRECATED", PyLong_FromLongLong(NEODEVICE_RAD_MOON_DUO_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE3", PyLong_FromLongLong(NEODEVICE_FIRE3)); + result += PyModule_AddObjectRef(module, "NEODEVICE_VCAN3_DEPRECATED", PyLong_FromLongLong(NEODEVICE_VCAN3_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADJUPITER", PyLong_FromLongLong(NEODEVICE_RADJUPITER)); + result += PyModule_AddObjectRef(module, "NEODEVICE_VCAN4_IND", PyLong_FromLongLong(NEODEVICE_VCAN4_IND)); + result += PyModule_AddObjectRef(module, "NEODEVICE_GIGASTAR", PyLong_FromLongLong(NEODEVICE_GIGASTAR)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RED2", PyLong_FromLongLong(NEODEVICE_RED2)); + result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE2_REDLINE_DEPRECATED", PyLong_FromLongLong(NEODEVICE_FIRE2_REDLINE_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_ETHER_BADGE_DEPRECATED", PyLong_FromLongLong(NEODEVICE_ETHER_BADGE_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RAD_A2B", PyLong_FromLongLong(NEODEVICE_RAD_A2B)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADEPSILON", PyLong_FromLongLong(NEODEVICE_RADEPSILON)); + result += PyModule_AddObjectRef(module, "NEODEVICE_OBD2_SIM_DOIP_DEPRECATED", PyLong_FromLongLong(NEODEVICE_OBD2_SIM_DOIP_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_OBD2_DEV_DEPRECATED", PyLong_FromLongLong(NEODEVICE_OBD2_DEV_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_ECU22_DEPRECATED", PyLong_FromLongLong(NEODEVICE_ECU22_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADEPSILON_T", PyLong_FromLongLong(NEODEVICE_RADEPSILON_T)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADEPSILON_EXPRESS", PyLong_FromLongLong(NEODEVICE_RADEPSILON_EXPRESS)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADPROXIMA", PyLong_FromLongLong(NEODEVICE_RADPROXIMA)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RAD_GALAXY_2", PyLong_FromLongLong(NEODEVICE_RAD_GALAXY_2)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RAD_BMS", PyLong_FromLongLong(NEODEVICE_RAD_BMS)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADMOON3", PyLong_FromLongLong(NEODEVICE_RADMOON3)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADCOMET", PyLong_FromLongLong(NEODEVICE_RADCOMET)); + result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE3_FLEXRAY", PyLong_FromLongLong(NEODEVICE_FIRE3_FLEXRAY)); + result += PyModule_AddObjectRef(module, "NEODEVICE_NEOVI_CONNECT", PyLong_FromLongLong(NEODEVICE_NEOVI_CONNECT)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADCOMET3", PyLong_FromLongLong(NEODEVICE_RADCOMET3)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADMOONT1S", PyLong_FromLongLong(NEODEVICE_RADMOONT1S)); + result += PyModule_AddObjectRef(module, "NEODEVICE_GIGASTAR2", PyLong_FromLongLong(NEODEVICE_GIGASTAR2)); + result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE3_T1S_LIN", PyLong_FromLongLong(NEODEVICE_FIRE3_T1S_LIN)); + result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE3_T1S_SENT", PyLong_FromLongLong(NEODEVICE_FIRE3_T1S_SENT)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADGEMINI", PyLong_FromLongLong(NEODEVICE_RADGEMINI)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RED_DEPRECATED", PyLong_FromLongLong(NEODEVICE_RED_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_ECU_DEPRECATED", PyLong_FromLongLong(NEODEVICE_ECU_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_IEVB_DEPRECATED", PyLong_FromLongLong(NEODEVICE_IEVB_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_PENDANT_DEPRECATED", PyLong_FromLongLong(NEODEVICE_PENDANT_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_OBD2_PRO_DEPRECATED", PyLong_FromLongLong(NEODEVICE_OBD2_PRO_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_ECUCHIP_UART_DEPRECATED", PyLong_FromLongLong(NEODEVICE_ECUCHIP_UART_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_PLASMA", PyLong_FromLongLong(NEODEVICE_PLASMA)); + result += PyModule_AddObjectRef(module, "NEODEVICE_DONT_REUSE0", PyLong_FromLongLong(NEODEVICE_DONT_REUSE0)); + result += PyModule_AddObjectRef(module, "NEODEVICE_NEOANALOG_DEPRECATED", PyLong_FromLongLong(NEODEVICE_NEOANALOG_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_CT_OBD_DEPRECATED", PyLong_FromLongLong(NEODEVICE_CT_OBD_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_DONT_REUSE1", PyLong_FromLongLong(NEODEVICE_DONT_REUSE1)); + result += PyModule_AddObjectRef(module, "NEODEVICE_DONT_REUSE2", PyLong_FromLongLong(NEODEVICE_DONT_REUSE2)); + result += PyModule_AddObjectRef(module, "NEODEVICE_ION", PyLong_FromLongLong(NEODEVICE_ION)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADSTAR_DEPRECATED", PyLong_FromLongLong(NEODEVICE_RADSTAR_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_DONT_REUSE3", PyLong_FromLongLong(NEODEVICE_DONT_REUSE3)); + result += PyModule_AddObjectRef(module, "NEODEVICE_VCAN44", PyLong_FromLongLong(NEODEVICE_VCAN44)); + result += PyModule_AddObjectRef(module, "NEODEVICE_VCAN42", PyLong_FromLongLong(NEODEVICE_VCAN42)); + result += PyModule_AddObjectRef(module, "NEODEVICE_CMPROBE_DEPRECATED", PyLong_FromLongLong(NEODEVICE_CMPROBE_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_EEVB_DEPRECATED", PyLong_FromLongLong(NEODEVICE_EEVB_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_DONT_REUSE4", PyLong_FromLongLong(NEODEVICE_DONT_REUSE4)); + result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE2", PyLong_FromLongLong(NEODEVICE_FIRE2)); + result += PyModule_AddObjectRef(module, "NEODEVICE_FLEX_DEPRECATED", PyLong_FromLongLong(NEODEVICE_FLEX_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADGALAXY", PyLong_FromLongLong(NEODEVICE_RADGALAXY)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADSTAR2", PyLong_FromLongLong(NEODEVICE_RADSTAR2)); + result += PyModule_AddObjectRef(module, "NEODEVICE_VIVIDCAN", PyLong_FromLongLong(NEODEVICE_VIVIDCAN)); + result += PyModule_AddObjectRef(module, "NEODEVICE_OBD2_SIM_DEPRECATED", PyLong_FromLongLong(NEODEVICE_OBD2_SIM_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_ANY_PLASMA", PyLong_FromLongLong(NEODEVICE_ANY_PLASMA)); + result += PyModule_AddObjectRef(module, "NEODEVICE_ANY_ION", PyLong_FromLongLong(NEODEVICE_ANY_ION)); + result += PyModule_AddObjectRef(module, "NEODEVICE_NEOECUCHIP", PyLong_FromLongLong(NEODEVICE_NEOECUCHIP)); + result += PyModule_AddObjectRef(module, "DEVICECOUNT_FOR_EXPLORER", PyLong_FromLongLong(DEVICECOUNT_FOR_EXPLORER)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_HSCAN", PyLong_FromLongLong(ISO15765_2_NETWORK_HSCAN)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_MSCAN", PyLong_FromLongLong(ISO15765_2_NETWORK_MSCAN)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_HSCAN2", PyLong_FromLongLong(ISO15765_2_NETWORK_HSCAN2)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_HSCAN3", PyLong_FromLongLong(ISO15765_2_NETWORK_HSCAN3)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_SWCAN", PyLong_FromLongLong(ISO15765_2_NETWORK_SWCAN)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_HSCAN4", PyLong_FromLongLong(ISO15765_2_NETWORK_HSCAN4)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_HSCAN5", PyLong_FromLongLong(ISO15765_2_NETWORK_HSCAN5)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_HSCAN6", PyLong_FromLongLong(ISO15765_2_NETWORK_HSCAN6)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_HSCAN7", PyLong_FromLongLong(ISO15765_2_NETWORK_HSCAN7)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_SWCAN2", PyLong_FromLongLong(ISO15765_2_NETWORK_SWCAN2)); + result += PyModule_AddObjectRef(module, "PLASMA_SLAVE1_OFFSET", PyLong_FromUnsignedLongLong(PLASMA_SLAVE1_OFFSET)); + result += PyModule_AddObjectRef(module, "PLASMA_SLAVE2_OFFSET", PyLong_FromUnsignedLongLong(PLASMA_SLAVE2_OFFSET)); + result += PyModule_AddObjectRef(module, "PLASMA_SLAVE_NUM", PyLong_FromUnsignedLongLong(PLASMA_SLAVE_NUM)); + result += PyModule_AddObjectRef(module, "PLASMA_SLAVE1_OFFSET_RANGE2", PyLong_FromUnsignedLongLong(PLASMA_SLAVE1_OFFSET_RANGE2)); + result += PyModule_AddObjectRef(module, "PLASMA_SLAVE2_OFFSET_RANGE2", PyLong_FromUnsignedLongLong(PLASMA_SLAVE2_OFFSET_RANGE2)); + result += PyModule_AddObjectRef(module, "PLASMA_SLAVE3_OFFSET_RANGE2", PyLong_FromUnsignedLongLong(PLASMA_SLAVE3_OFFSET_RANGE2)); + result += PyModule_AddObjectRef(module, "SCRIPT_STATUS_STOPPED", PyLong_FromUnsignedLongLong(SCRIPT_STATUS_STOPPED)); + result += PyModule_AddObjectRef(module, "SCRIPT_STATUS_RUNNING", PyLong_FromUnsignedLongLong(SCRIPT_STATUS_RUNNING)); + result += PyModule_AddObjectRef(module, "SCRIPT_LOCATION_FLASH_MEM", PyLong_FromUnsignedLongLong(SCRIPT_LOCATION_FLASH_MEM)); + result += PyModule_AddObjectRef(module, "SCRIPT_LOCATION_INTERNAL_FLASH", PyLong_FromUnsignedLongLong(SCRIPT_LOCATION_INTERNAL_FLASH)); + result += PyModule_AddObjectRef(module, "SCRIPT_LOCATION_SDCARD", PyLong_FromUnsignedLongLong(SCRIPT_LOCATION_SDCARD)); + result += PyModule_AddObjectRef(module, "SCRIPT_LOCATION_EMMC", PyLong_FromUnsignedLongLong(SCRIPT_LOCATION_EMMC)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_CUSTOM", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_CUSTOM)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_CAN", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_CAN)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_GMLAN", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_GMLAN)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_J1850VPW", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_J1850VPW)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_J1850PWM", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_J1850PWM)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_ISO9141", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_ISO9141)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_Keyword2000", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_Keyword2000)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_GM_ALDL_UART", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_GM_ALDL_UART)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_CHRYSLER_CCD", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_CHRYSLER_CCD)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_CHRYSLER_SCI", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_CHRYSLER_SCI)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_FORD_UBP", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_FORD_UBP)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_BEAN", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_BEAN)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_LIN", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_LIN)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_J1708", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_J1708)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_CHRYSLER_JVPW", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_CHRYSLER_JVPW)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_J1939", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_J1939)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_FLEXRAY", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_FLEXRAY)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_MOST", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_MOST)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_CGI", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_CGI)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_GME_CIM_SCL_KLINE", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_GME_CIM_SCL_KLINE)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_SPI", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_SPI)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_I2C", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_I2C)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_GENERIC_UART", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_GENERIC_UART)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_JTAG", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_JTAG)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_UNIO", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_UNIO)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_DALLAS_1WIRE", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_DALLAS_1WIRE)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_GENERIC_MANCHSESTER", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_GENERIC_MANCHSESTER)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_SENT_PROTOCOL", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_SENT_PROTOCOL)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_UART", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_UART)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_ETHERNET", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_ETHERNET)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_CANFD", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_CANFD)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_GMFSA", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_GMFSA)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_TCP", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_TCP)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_UDP", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_UDP)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_AUTOSAR", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_AUTOSAR)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_A2B", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_A2B)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_WBMS", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_WBMS)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_MDIO", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_MDIO)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_HS_CAN_CNF1", PyLong_FromLongLong(NEO_CFG_MPIC_HS_CAN_CNF1)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_HS_CAN_CNF2", PyLong_FromLongLong(NEO_CFG_MPIC_HS_CAN_CNF2)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_HS_CAN_CNF3", PyLong_FromLongLong(NEO_CFG_MPIC_HS_CAN_CNF3)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_HS_CAN_MODE", PyLong_FromLongLong(NEO_CFG_MPIC_HS_CAN_MODE)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_MS_CAN_CNF1", PyLong_FromLongLong(NEO_CFG_MPIC_MS_CAN_CNF1)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_MS_CAN_CNF2", PyLong_FromLongLong(NEO_CFG_MPIC_MS_CAN_CNF2)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_MS_CAN_CNF3", PyLong_FromLongLong(NEO_CFG_MPIC_MS_CAN_CNF3)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_SW_CAN_CNF1", PyLong_FromLongLong(NEO_CFG_MPIC_SW_CAN_CNF1)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_SW_CAN_CNF2", PyLong_FromLongLong(NEO_CFG_MPIC_SW_CAN_CNF2)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_SW_CAN_CNF3", PyLong_FromLongLong(NEO_CFG_MPIC_SW_CAN_CNF3)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_LSFT_CAN_CNF1", PyLong_FromLongLong(NEO_CFG_MPIC_LSFT_CAN_CNF1)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_LSFT_CAN_CNF2", PyLong_FromLongLong(NEO_CFG_MPIC_LSFT_CAN_CNF2)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_LSFT_CAN_CNF3", PyLong_FromLongLong(NEO_CFG_MPIC_LSFT_CAN_CNF3)); + result += PyModule_AddObjectRef(module, "NEOVI_TIMESTAMP_2", PyFloat_FromDouble(NEOVI_TIMESTAMP_2)); + result += PyModule_AddObjectRef(module, "NEOVI_TIMESTAMP_1", PyFloat_FromDouble(NEOVI_TIMESTAMP_1)); + result += PyModule_AddObjectRef(module, "NEOVIPRO_VCAN_TIMESTAMP_2", PyFloat_FromDouble(NEOVIPRO_VCAN_TIMESTAMP_2)); + result += PyModule_AddObjectRef(module, "NEOVIPRO_VCAN_TIMESTAMP_1", PyFloat_FromDouble(NEOVIPRO_VCAN_TIMESTAMP_1)); + result += PyModule_AddObjectRef(module, "NEOVI6_VCAN_TIMESTAMP_2", PyFloat_FromDouble(NEOVI6_VCAN_TIMESTAMP_2)); + result += PyModule_AddObjectRef(module, "NEOVI6_VCAN_TIMESTAMP_1", PyFloat_FromDouble(NEOVI6_VCAN_TIMESTAMP_1)); + result += PyModule_AddObjectRef(module, "NEOVI_RED_TIMESTAMP_2_25NS", PyFloat_FromDouble(NEOVI_RED_TIMESTAMP_2_25NS)); + result += PyModule_AddObjectRef(module, "NEOVI_RED_TIMESTAMP_1_25NS", PyFloat_FromDouble(NEOVI_RED_TIMESTAMP_1_25NS)); + result += PyModule_AddObjectRef(module, "NEOVI_RED_TIMESTAMP_2_10NS", PyFloat_FromDouble(NEOVI_RED_TIMESTAMP_2_10NS)); + result += PyModule_AddObjectRef(module, "NEOVI_RED_TIMESTAMP_1_10NS", PyFloat_FromDouble(NEOVI_RED_TIMESTAMP_1_10NS)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_NONE", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_NONE)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_VSI", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_VSI)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_AVT_716", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_AVT_716)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_NI_CAN", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_NI_CAN)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_NEOVI", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_NEOVI)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_AVT_717", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_AVT_717)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_NEOv6_VCAN", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_NEOv6_VCAN)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_DOUBLE_SEC", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_DOUBLE_SEC)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_NEORED_10US", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_NEORED_10US)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_NEORED_25NS", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_NEORED_25NS)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_NEORED_10NS", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_NEORED_10NS)); + result += PyModule_AddObjectRef(module, "HADRWARE_TIMESTAMP_ID_FIXED", PyLong_FromLongLong(HADRWARE_TIMESTAMP_ID_FIXED)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_PERIODIC", PyLong_FromLongLong(FIRE2_REPORT_PERIODIC)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_EMISC1_DIGITAL", PyLong_FromLongLong(FIRE2_REPORT_EMISC1_DIGITAL)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_EMISC2_DIGITAL", PyLong_FromLongLong(FIRE2_REPORT_EMISC2_DIGITAL)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_MISC5_DIGITAL", PyLong_FromLongLong(FIRE2_REPORT_MISC5_DIGITAL)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_MISC6_DIGITAL", PyLong_FromLongLong(FIRE2_REPORT_MISC6_DIGITAL)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_EMISC1_ANALOG", PyLong_FromLongLong(FIRE2_REPORT_EMISC1_ANALOG)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_EMISC2_ANALOG", PyLong_FromLongLong(FIRE2_REPORT_EMISC2_ANALOG)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_VBATT_ANALOG", PyLong_FromLongLong(FIRE2_REPORT_VBATT_ANALOG)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_TEMP_ANALOG", PyLong_FromLongLong(FIRE2_REPORT_TEMP_ANALOG)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_PWM_IN", PyLong_FromLongLong(FIRE2_REPORT_PWM_IN)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_GPS", PyLong_FromLongLong(FIRE2_REPORT_GPS)); + result += PyModule_AddObjectRef(module, "FIRE3_REPORT_ORIENTATION", PyLong_FromLongLong(FIRE3_REPORT_ORIENTATION)); + result += PyModule_AddObjectRef(module, "CANNODE_STATUS_COREMINI_IS_RUNNING", PyLong_FromLongLong(CANNODE_STATUS_COREMINI_IS_RUNNING)); + result += PyModule_AddObjectRef(module, "CANNODE_STATUS_IN_BOOTLOADER", PyLong_FromLongLong(CANNODE_STATUS_IN_BOOTLOADER)); + result += PyModule_AddObjectRef(module, "MAIN_VNET", PyLong_FromLongLong(MAIN_VNET)); + result += PyModule_AddObjectRef(module, "SLAVE_VNET_A", PyLong_FromLongLong(SLAVE_VNET_A)); + result += PyModule_AddObjectRef(module, "SLAVE_VNET_B", PyLong_FromLongLong(SLAVE_VNET_B)); + result += PyModule_AddObjectRef(module, "WIFI_CONNECTION", PyLong_FromLongLong(WIFI_CONNECTION)); + result += PyModule_AddObjectRef(module, "REGISTER_BY_SERIAL", PyLong_FromLongLong(REGISTER_BY_SERIAL)); + result += PyModule_AddObjectRef(module, "TCP_SUPPORTED", PyLong_FromLongLong(TCP_SUPPORTED)); + result += PyModule_AddObjectRef(module, "DRIVER_MASK", PyLong_FromLongLong(DRIVER_MASK)); + result += PyModule_AddObjectRef(module, "DRIVER_USB1", PyLong_FromLongLong(DRIVER_USB1)); + result += PyModule_AddObjectRef(module, "DRIVER_USB2", PyLong_FromLongLong(DRIVER_USB2)); + result += PyModule_AddObjectRef(module, "DRIVER_USB3", PyLong_FromLongLong(DRIVER_USB3)); + // enum + result += PyModule_AddObjectRef(module, "PHY_88Q211x_Z1", PyLong_FromLongLong(PHY_88Q211x_Z1)); + result += PyModule_AddObjectRef(module, "PHY_88Q211x_A0", PyLong_FromLongLong(PHY_88Q211x_A0)); + result += PyModule_AddObjectRef(module, "PHY_88Q211x_A1", PyLong_FromLongLong(PHY_88Q211x_A1)); + result += PyModule_AddObjectRef(module, "PHY_88Q211x_A2", PyLong_FromLongLong(PHY_88Q211x_A2)); + result += PyModule_AddObjectRef(module, "PHY_88Q222xM_A0", PyLong_FromLongLong(PHY_88Q222xM_A0)); + result += PyModule_AddObjectRef(module, "PHY_88Q222xM_B0", PyLong_FromLongLong(PHY_88Q222xM_B0)); + result += PyModule_AddObjectRef(module, "PHY_88Q222xM_B1", PyLong_FromLongLong(PHY_88Q222xM_B1)); + result += PyModule_AddObjectRef(module, "PHY_88Q222xM_B2", PyLong_FromLongLong(PHY_88Q222xM_B2)); + result += PyModule_AddObjectRef(module, "PHY_UNKNOWN", PyLong_FromLongLong(PHY_UNKNOWN)); + // end of enum - } PhyId; + + result += PyModule_AddObjectRef(module, "CMP_STREAMS_FIRE3", PyLong_FromLongLong(CMP_STREAMS_FIRE3)); + result += PyModule_AddObjectRef(module, "CMP_STREAMS_FIRE3FR", PyLong_FromLongLong(CMP_STREAMS_FIRE3FR)); + result += PyModule_AddObjectRef(module, "CMP_STREAMS_FIRE3T1SLIN", PyLong_FromLongLong(CMP_STREAMS_FIRE3T1SLIN)); + result += PyModule_AddObjectRef(module, "CMP_STREAMS_RED2", PyLong_FromLongLong(CMP_STREAMS_RED2)); + result += PyModule_AddObjectRef(module, "CMP_STREAMS_A2B", PyLong_FromLongLong(CMP_STREAMS_A2B)); + result += PyModule_AddObjectRef(module, "CMP_STREAMS_GIGASTAR", PyLong_FromLongLong(CMP_STREAMS_GIGASTAR)); + result += PyModule_AddObjectRef(module, "CMP_STREAMS_GIGASTAR2", PyLong_FromLongLong(CMP_STREAMS_GIGASTAR2)); + result += PyModule_AddObjectRef(module, "CMP_STREAMS_COMET", PyLong_FromLongLong(CMP_STREAMS_COMET)); + result += PyModule_AddObjectRef(module, "CMP_STREAMS_COMET3", PyLong_FromLongLong(CMP_STREAMS_COMET3)); + result += PyModule_AddObjectRef(module, "CMP_STREAMS_GALAXY2", PyLong_FromLongLong(CMP_STREAMS_GALAXY2)); + // enum + result += PyModule_AddObjectRef(module, "AUTO", PyLong_FromLongLong(AUTO)); + result += PyModule_AddObjectRef(module, "USE_TQ", PyLong_FromLongLong(USE_TQ)); // end of enum - }; // enum - result += PyModule_AddIntMacro(module, BPS20); - result += PyModule_AddIntMacro(module, BPS33); - result += PyModule_AddIntMacro(module, BPS50); - result += PyModule_AddIntMacro(module, BPS62); - result += PyModule_AddIntMacro(module, BPS83); - result += PyModule_AddIntMacro(module, BPS100); - result += PyModule_AddIntMacro(module, BPS125); - result += PyModule_AddIntMacro(module, BPS250); - result += PyModule_AddIntMacro(module, BPS500); - result += PyModule_AddIntMacro(module, BPS800); - result += PyModule_AddIntMacro(module, BPS1000); - result += PyModule_AddIntMacro(module, BPS666); - result += PyModule_AddIntMacro(module, BPS2000); - result += PyModule_AddIntMacro(module, BPS4000); - result += PyModule_AddIntMacro(module, CAN_BPS5000); - result += PyModule_AddIntMacro(module, CAN_BPS6667); - result += PyModule_AddIntMacro(module, CAN_BPS8000); - result += PyModule_AddIntMacro(module, CAN_BPS10000); + result += PyModule_AddObjectRef(module, "BPS20", PyLong_FromLongLong(BPS20)); + result += PyModule_AddObjectRef(module, "BPS33", PyLong_FromLongLong(BPS33)); + result += PyModule_AddObjectRef(module, "BPS50", PyLong_FromLongLong(BPS50)); + result += PyModule_AddObjectRef(module, "BPS62", PyLong_FromLongLong(BPS62)); + result += PyModule_AddObjectRef(module, "BPS83", PyLong_FromLongLong(BPS83)); + result += PyModule_AddObjectRef(module, "BPS100", PyLong_FromLongLong(BPS100)); + result += PyModule_AddObjectRef(module, "BPS125", PyLong_FromLongLong(BPS125)); + result += PyModule_AddObjectRef(module, "BPS250", PyLong_FromLongLong(BPS250)); + result += PyModule_AddObjectRef(module, "BPS500", PyLong_FromLongLong(BPS500)); + result += PyModule_AddObjectRef(module, "BPS800", PyLong_FromLongLong(BPS800)); + result += PyModule_AddObjectRef(module, "BPS1000", PyLong_FromLongLong(BPS1000)); + result += PyModule_AddObjectRef(module, "BPS666", PyLong_FromLongLong(BPS666)); + result += PyModule_AddObjectRef(module, "BPS2000", PyLong_FromLongLong(BPS2000)); + result += PyModule_AddObjectRef(module, "BPS4000", PyLong_FromLongLong(BPS4000)); + result += PyModule_AddObjectRef(module, "CAN_BPS5000", PyLong_FromLongLong(CAN_BPS5000)); + result += PyModule_AddObjectRef(module, "CAN_BPS6667", PyLong_FromLongLong(CAN_BPS6667)); + result += PyModule_AddObjectRef(module, "CAN_BPS8000", PyLong_FromLongLong(CAN_BPS8000)); + result += PyModule_AddObjectRef(module, "CAN_BPS10000", PyLong_FromLongLong(CAN_BPS10000)); // end of enum - }; // enum - result += PyModule_AddIntMacro(module, NORMAL); - result += PyModule_AddIntMacro(module, DISABLE); - result += PyModule_AddIntMacro(module, LOOPBACK); - result += PyModule_AddIntMacro(module, LISTEN_ONLY); - result += PyModule_AddIntMacro(module, LISTEN_ALL); + result += PyModule_AddObjectRef(module, "NORMAL", PyLong_FromLongLong(NORMAL)); + result += PyModule_AddObjectRef(module, "DISABLE", PyLong_FromLongLong(DISABLE)); + result += PyModule_AddObjectRef(module, "LOOPBACK", PyLong_FromLongLong(LOOPBACK)); + result += PyModule_AddObjectRef(module, "LISTEN_ONLY", PyLong_FromLongLong(LISTEN_ONLY)); + result += PyModule_AddObjectRef(module, "LISTEN_ALL", PyLong_FromLongLong(LISTEN_ALL)); // end of enum - }; - result += PyModule_AddIntMacro(module, CAN_SETTINGS_SIZE); + result += PyModule_AddObjectRef(module, "CAN_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(CAN_SETTINGS_SIZE)); // enum - result += PyModule_AddIntMacro(module, NO_CANFD); - result += PyModule_AddIntMacro(module, CANFD_ENABLED); - result += PyModule_AddIntMacro(module, CANFD_BRS_ENABLED); - result += PyModule_AddIntMacro(module, CANFD_ENABLED_ISO); - result += PyModule_AddIntMacro(module, CANFD_BRS_ENABLED_ISO); + result += PyModule_AddObjectRef(module, "NO_CANFD", PyLong_FromLongLong(NO_CANFD)); + result += PyModule_AddObjectRef(module, "CANFD_ENABLED", PyLong_FromLongLong(CANFD_ENABLED)); + result += PyModule_AddObjectRef(module, "CANFD_BRS_ENABLED", PyLong_FromLongLong(CANFD_BRS_ENABLED)); + result += PyModule_AddObjectRef(module, "CANFD_ENABLED_ISO", PyLong_FromLongLong(CANFD_ENABLED_ISO)); + result += PyModule_AddObjectRef(module, "CANFD_BRS_ENABLED_ISO", PyLong_FromLongLong(CANFD_BRS_ENABLED_ISO)); // end of enum - }; - result += PyModule_AddIntMacro(module, CANFD_SETTINGS_SIZE); + result += PyModule_AddObjectRef(module, "CANFD_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(CANFD_SETTINGS_SIZE)); // enum - result += PyModule_AddIntMacro(module, SWCAN_AUTOSWITCH_DISABLED); - result += PyModule_AddIntMacro(module, SWCAN_AUTOSWITCH_NO_RESISTOR); - result += PyModule_AddIntMacro(module, SWCAN_AUTOSWITCH_WITH_RESISTOR); - result += PyModule_AddIntMacro(module, SWCAN_AUTOSWITCH_DISABLED_RESISTOR_ENABLED); + result += PyModule_AddObjectRef(module, "SWCAN_AUTOSWITCH_DISABLED", PyLong_FromLongLong(SWCAN_AUTOSWITCH_DISABLED)); + result += PyModule_AddObjectRef(module, "SWCAN_AUTOSWITCH_NO_RESISTOR", PyLong_FromLongLong(SWCAN_AUTOSWITCH_NO_RESISTOR)); + result += PyModule_AddObjectRef(module, "SWCAN_AUTOSWITCH_WITH_RESISTOR", PyLong_FromLongLong(SWCAN_AUTOSWITCH_WITH_RESISTOR)); + result += PyModule_AddObjectRef(module, "SWCAN_AUTOSWITCH_DISABLED_RESISTOR_ENABLED", PyLong_FromLongLong(SWCAN_AUTOSWITCH_DISABLED_RESISTOR_ENABLED)); // end of enum - }; - result += PyModule_AddIntMacro(module, SWCAN_SETTINGS_SIZE); - // enum - result += PyModule_AddIntMacro(module, BPS5000); - result += PyModule_AddIntMacro(module, BPS10400); - result += PyModule_AddIntMacro(module, BPS33333); - result += PyModule_AddIntMacro(module, BPS50000); - result += PyModule_AddIntMacro(module, BPS62500); - result += PyModule_AddIntMacro(module, BPS71429); - result += PyModule_AddIntMacro(module, BPS83333); - result += PyModule_AddIntMacro(module, BPS100000); - result += PyModule_AddIntMacro(module, BPS117647); + result += PyModule_AddObjectRef(module, "SWCAN_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(SWCAN_SETTINGS_SIZE)); + // enum + result += PyModule_AddObjectRef(module, "BPS5000", PyLong_FromLongLong(BPS5000)); + result += PyModule_AddObjectRef(module, "BPS10400", PyLong_FromLongLong(BPS10400)); + result += PyModule_AddObjectRef(module, "BPS33333", PyLong_FromLongLong(BPS33333)); + result += PyModule_AddObjectRef(module, "BPS50000", PyLong_FromLongLong(BPS50000)); + result += PyModule_AddObjectRef(module, "BPS62500", PyLong_FromLongLong(BPS62500)); + result += PyModule_AddObjectRef(module, "BPS71429", PyLong_FromLongLong(BPS71429)); + result += PyModule_AddObjectRef(module, "BPS83333", PyLong_FromLongLong(BPS83333)); + result += PyModule_AddObjectRef(module, "BPS100000", PyLong_FromLongLong(BPS100000)); + result += PyModule_AddObjectRef(module, "BPS117647", PyLong_FromLongLong(BPS117647)); // end of enum - }; // enum - result += PyModule_AddIntMacro(module, RESISTOR_ON); - result += PyModule_AddIntMacro(module, RESISTOR_OFF); + result += PyModule_AddObjectRef(module, "RESISTOR_ON", PyLong_FromLongLong(RESISTOR_ON)); + result += PyModule_AddObjectRef(module, "RESISTOR_OFF", PyLong_FromLongLong(RESISTOR_OFF)); // end of enum - }; // enum - result += PyModule_AddIntMacro(module, SLEEP_MODE); - result += PyModule_AddIntMacro(module, SLOW_MODE); - result += PyModule_AddIntMacro(module, NORMAL_MODE); - result += PyModule_AddIntMacro(module, FAST_MODE); + result += PyModule_AddObjectRef(module, "SLEEP_MODE", PyLong_FromLongLong(SLEEP_MODE)); + result += PyModule_AddObjectRef(module, "SLOW_MODE", PyLong_FromLongLong(SLOW_MODE)); + result += PyModule_AddObjectRef(module, "NORMAL_MODE", PyLong_FromLongLong(NORMAL_MODE)); + result += PyModule_AddObjectRef(module, "FAST_MODE", PyLong_FromLongLong(FAST_MODE)); // end of enum - }; - result += PyModule_AddIntMacro(module, LIN_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, ISO9141_KEYWORD2000__INIT_STEP_SIZE); - result += PyModule_AddIntMacro(module, ISO9141_KEYWORD2000_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, UART_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, J1708_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, SRedSettings_SIZE); - result += PyModule_AddIntMacro(module, STextAPISettings_SIZE); - result += PyModule_AddIntMacro(module, stChipVersions_SIZE); - result += PyModule_AddIntMacro(module, SNeoMostGatewaySettings_SIZE); - // enum - result += PyModule_AddIntMacro(module, OPETH_FUNC_TAP); - result += PyModule_AddIntMacro(module, OPETH_FUNC_MEDIACONVERTER); - result += PyModule_AddIntMacro(module, OPETH_FUNC_TAP_LOW_LATENCY); - result += PyModule_AddIntMacro(module, OPETH_FUNC_RAW_MEDIA_CONVERTER); - result += PyModule_AddIntMacro(module, OPETH_FUNC_RAW_MEDIA_CONVERTER2); - result += PyModule_AddIntMacro(module, OPETH_FUNC_RAW_MEDIA_CONVERTER2_LOW_LATENCY); + result += PyModule_AddObjectRef(module, "LIN_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(LIN_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "ISO9141_KEYWORD2000__INIT_STEP_SIZE", PyLong_FromUnsignedLongLong(ISO9141_KEYWORD2000__INIT_STEP_SIZE)); + result += PyModule_AddObjectRef(module, "ISO9141_KEYWORD2000_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(ISO9141_KEYWORD2000_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "UART_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(UART_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "J1708_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(J1708_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "STextAPISettings_SIZE", PyLong_FromUnsignedLongLong(STextAPISettings_SIZE)); + result += PyModule_AddObjectRef(module, "stChipVersions_SIZE", PyLong_FromUnsignedLongLong(stChipVersions_SIZE)); + result += PyModule_AddObjectRef(module, "SNeoMostGatewaySettings_SIZE", PyLong_FromUnsignedLongLong(SNeoMostGatewaySettings_SIZE)); + // enum + result += PyModule_AddObjectRef(module, "OPETH_FUNC_TAP", PyLong_FromLongLong(OPETH_FUNC_TAP)); + result += PyModule_AddObjectRef(module, "OPETH_FUNC_MEDIACONVERTER", PyLong_FromLongLong(OPETH_FUNC_MEDIACONVERTER)); + result += PyModule_AddObjectRef(module, "OPETH_FUNC_TAP_LOW_LATENCY", PyLong_FromLongLong(OPETH_FUNC_TAP_LOW_LATENCY)); + result += PyModule_AddObjectRef(module, "OPETH_FUNC_RAW_MEDIA_CONVERTER", PyLong_FromLongLong(OPETH_FUNC_RAW_MEDIA_CONVERTER)); + result += PyModule_AddObjectRef(module, "OPETH_FUNC_RAW_MEDIA_CONVERTER2", PyLong_FromLongLong(OPETH_FUNC_RAW_MEDIA_CONVERTER2)); + result += PyModule_AddObjectRef(module, "OPETH_FUNC_RAW_MEDIA_CONVERTER2_LOW_LATENCY", PyLong_FromLongLong(OPETH_FUNC_RAW_MEDIA_CONVERTER2_LOW_LATENCY)); // end of enum - }; - result += PyModule_AddIntMacro(module, OP_ETH_GENERAL_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, RAD_GPTP_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, RAD_GPTP_AND_TAP_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, HW_ETH_SETTINGS_SIZE); + result += PyModule_AddObjectRef(module, "OP_ETH_GENERAL_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(OP_ETH_GENERAL_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "RAD_GPTP_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(RAD_GPTP_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "RAD_GPTP_AND_TAP_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(RAD_GPTP_AND_TAP_SETTINGS_SIZE)); // enum - result += PyModule_AddIntMacro(module, OPETH_LINK_AUTO); - result += PyModule_AddIntMacro(module, OPETH_LINK_MASTER); - result += PyModule_AddIntMacro(module, OPETH_LINK_SLAVE); + result += PyModule_AddObjectRef(module, "OPETH_LINK_AUTO", PyLong_FromLongLong(OPETH_LINK_AUTO)); + result += PyModule_AddObjectRef(module, "OPETH_LINK_MASTER", PyLong_FromLongLong(OPETH_LINK_MASTER)); + result += PyModule_AddObjectRef(module, "OPETH_LINK_SLAVE", PyLong_FromLongLong(OPETH_LINK_SLAVE)); // end of enum - } opEthLinkMode; // enum - result += PyModule_AddIntMacro(module, OPETH_MAC_SPOOF_DST_ADDR); - result += PyModule_AddIntMacro(module, OPETH_MAC_SPOOF_SRC_ADDR); + result += PyModule_AddObjectRef(module, "OPETH_MAC_SPOOF_DST_ADDR", PyLong_FromLongLong(OPETH_MAC_SPOOF_DST_ADDR)); + result += PyModule_AddObjectRef(module, "OPETH_MAC_SPOOF_SRC_ADDR", PyLong_FromLongLong(OPETH_MAC_SPOOF_SRC_ADDR)); // end of enum - }; - result += PyModule_AddIntMacro(module, OP_ETH_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG_FULL_DUPLEX); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG_AUTO_NEG); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG_TCPIP_ENABLE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG_RTSP_ENABLE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG_DEVICE_HOSTING_ENABLE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG_CONFIG_NOT_ALLOWED); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG_COMM_IN_USE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_SIZE); - // enum - result += PyModule_AddIntMacro(module, LINK_SPEED_AUTO_NEGOTIATION); - result += PyModule_AddIntMacro(module, LINK_SPEED_1GBPS_FULL_DUPLEX); - result += PyModule_AddIntMacro(module, LINK_SPEED_1GBPS_HALF_DUPLEX); - result += PyModule_AddIntMacro(module, LINK_SPEED_100MBPS_FULL_DUPLEX); - result += PyModule_AddIntMacro(module, LINK_SPEED_100MBPS_HALF_DUPLEX); - result += PyModule_AddIntMacro(module, LINK_SPEED_10MBPS_FULL_DUPLEX); - result += PyModule_AddIntMacro(module, LINK_SPEED_10MBPS_HALF_DUPLEX); - result += PyModule_AddIntMacro(module, LINK_SPEED_COUNT); - // end of enum - }; + result += PyModule_AddObjectRef(module, "OP_ETH_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(OP_ETH_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(ETHERNET_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG_FULL_DUPLEX", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG_FULL_DUPLEX)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG_AUTO_NEG", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG_AUTO_NEG)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG_TCPIP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG_TCPIP_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG_RTSP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG_RTSP_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG_DEVICE_HOSTING_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG_DEVICE_HOSTING_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG_CONFIG_NOT_ALLOWED", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG_CONFIG_NOT_ALLOWED)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG_ICS_SFP", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG_ICS_SFP)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG_COMM_IN_USE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG_COMM_IN_USE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_LINK_MODE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_LINK_MODE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_PHY_MODE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_PHY_MODE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_LINK_MODE_AUTO", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_LINK_MODE_AUTO)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_IP_CONFIG_NOT_ALLOWED", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_IP_CONFIG_NOT_ALLOWED)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_SFP_ID_SHIFT", PyLong_FromUnsignedLongLong(ETHERNET_SETTINGS2_FLAG2_SFP_ID_SHIFT)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_SFP_ID_MASK", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_SFP_ID_MASK)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_CUT_THRU_TAP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_CUT_THRU_TAP_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_SNF_TAP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_SNF_TAP_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_DISABLE_TAP_TO_HOST", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_DISABLE_TAP_TO_HOST)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_SHOW_TAP_TX_RECEIPT", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_SHOW_TAP_TX_RECEIPT)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_TCP_COMM_STATIC_PORT_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_TCP_COMM_STATIC_PORT_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_TAP_DEST_SHIFT", PyLong_FromUnsignedLongLong(ETHERNET_SETTINGS2_FLAG2_TAP_DEST_SHIFT)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_TAP_DEST_MASK", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_TAP_DEST_MASK)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_TC10_FWD_TAP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_TC10_FWD_TAP_ENABLE)); + // enum + result += PyModule_AddObjectRef(module, "SFP_ID_UNKNOWN", PyLong_FromLongLong(SFP_ID_UNKNOWN)); + result += PyModule_AddObjectRef(module, "SFP_ID_FINISAR_FCLF8522P2BTL", PyLong_FromLongLong(SFP_ID_FINISAR_FCLF8522P2BTL)); + result += PyModule_AddObjectRef(module, "SFP_ID_FS_GB_GE_T", PyLong_FromLongLong(SFP_ID_FS_GB_GE_T)); + result += PyModule_AddObjectRef(module, "SFP_ID_ICS_MV2112A2", PyLong_FromLongLong(SFP_ID_ICS_MV2112A2)); + result += PyModule_AddObjectRef(module, "SFP_ID_ICS_MV2221MB1", PyLong_FromLongLong(SFP_ID_ICS_MV2221MB1)); + result += PyModule_AddObjectRef(module, "SFP_ID_ICS_MV3244", PyLong_FromLongLong(SFP_ID_ICS_MV3244)); + result += PyModule_AddObjectRef(module, "SFP_ID_ICS_MC8670", PyLong_FromLongLong(SFP_ID_ICS_MC8670)); + result += PyModule_AddObjectRef(module, "SFP_ID_ICS_EN11100", PyLong_FromLongLong(SFP_ID_ICS_EN11100)); + result += PyModule_AddObjectRef(module, "SFP_ID_ICS_AD1101", PyLong_FromLongLong(SFP_ID_ICS_AD1101)); + result += PyModule_AddObjectRef(module, "SFP_ID_MAX", PyLong_FromLongLong(SFP_ID_MAX)); + // end of enum - } SfpId; + + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_SIZE", PyLong_FromUnsignedLongLong(ETHERNET_SETTINGS2_SIZE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_FULL_DUPLEX", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_FULL_DUPLEX)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_AUTO_NEG", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_AUTO_NEG)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_TCPIP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_TCPIP_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_RTSP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_RTSP_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_DEVICE_HOSTING_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_DEVICE_HOSTING_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_CONFIG_NOT_ALLOWED", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_CONFIG_NOT_ALLOWED)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_ICS_SFP", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_ICS_SFP)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_LINK_MODE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_LINK_MODE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_PHY_MODE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_PHY_MODE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_LINK_MODE_AUTO", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_LINK_MODE_AUTO)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_COMPL_MODE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_COMPL_MODE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_PKT_CHECK", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_PKT_CHECK)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_PKT_GEN", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_PKT_GEN)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_IP_CONFIG_NOT_ALLOWED", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_IP_CONFIG_NOT_ALLOWED)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_CUT_THRU_TAP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_CUT_THRU_TAP_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_SNF_TAP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_SNF_TAP_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_DISABLE_TAP_TO_HOST", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_DISABLE_TAP_TO_HOST)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_MACSEC_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_MACSEC_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_SHOW_TAP_TX_RECEIPT", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_SHOW_TAP_TX_RECEIPT)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_TCP_COMM_STATIC_PORT_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_TCP_COMM_STATIC_PORT_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_COMM_IN_USE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_COMM_IN_USE)); + result += PyModule_AddObjectRef(module, "ETHERNET10G_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(ETHERNET10G_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(ETHERNET10T1S_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_FLAG_ENABLE_PLCA", PyLong_FromLongLong(ETHERNET10T1S_SETTINGS_FLAG_ENABLE_PLCA)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_FLAG_TERMINATION", PyLong_FromLongLong(ETHERNET10T1S_SETTINGS_FLAG_TERMINATION)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_FLAG_BUS_DECODING_BEACONS", PyLong_FromLongLong(ETHERNET10T1S_SETTINGS_FLAG_BUS_DECODING_BEACONS)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_FLAG_BUS_DECODING_ALL", PyLong_FromLongLong(ETHERNET10T1S_SETTINGS_FLAG_BUS_DECODING_ALL)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_FLAG_ENABLE_PLCA_COL_DET", PyLong_FromLongLong(ETHERNET10T1S_SETTINGS_FLAG_ENABLE_PLCA_COL_DET)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_FLAG_ENABLE_CSMA_FALLBACK", PyLong_FromLongLong(ETHERNET10T1S_SETTINGS_FLAG_ENABLE_CSMA_FALLBACK)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_FLAG_DISABLE_ALL_DECODING", PyLong_FromLongLong(ETHERNET10T1S_SETTINGS_FLAG_DISABLE_ALL_DECODING)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_EXT_SIZE", PyLong_FromUnsignedLongLong(ETHERNET10T1S_SETTINGS_EXT_SIZE)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1L_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(ETHERNET10T1L_SETTINGS_SIZE)); + // enum + result += PyModule_AddObjectRef(module, "MACSEC_PACKET_NO_VLAN_OR_MPLS", PyLong_FromLongLong(MACSEC_PACKET_NO_VLAN_OR_MPLS)); + result += PyModule_AddObjectRef(module, "MACSEC_PACKET_SINGLE_VLAN", PyLong_FromLongLong(MACSEC_PACKET_SINGLE_VLAN)); + result += PyModule_AddObjectRef(module, "MACSEC_PACKET_DUAL_VLAN", PyLong_FromLongLong(MACSEC_PACKET_DUAL_VLAN)); + result += PyModule_AddObjectRef(module, "MACSEC_PACKET_MPLS", PyLong_FromLongLong(MACSEC_PACKET_MPLS)); + result += PyModule_AddObjectRef(module, "MACSEC_PACKET_SINGLE_VLAN_FOLLOW_BY_MPLS", PyLong_FromLongLong(MACSEC_PACKET_SINGLE_VLAN_FOLLOW_BY_MPLS)); + result += PyModule_AddObjectRef(module, "MACSEC_PACKET_DUAL_VLAN_FOLLOW_BY_MPLS", PyLong_FromLongLong(MACSEC_PACKET_DUAL_VLAN_FOLLOW_BY_MPLS)); + result += PyModule_AddObjectRef(module, "MACSEC_PACKET_UNSUPPORTED_TYPE", PyLong_FromLongLong(MACSEC_PACKET_UNSUPPORTED_TYPE)); + // end of enum - } MACSEC_PACKET_TYPE; + + result += PyModule_AddObjectRef(module, "MACSEC_SETTINGS_RULE_SIZE", PyLong_FromLongLong(MACSEC_SETTINGS_RULE_SIZE)); + result += PyModule_AddObjectRef(module, "MACSEC_SETTINGS_MAP_SIZE", PyLong_FromLongLong(MACSEC_SETTINGS_MAP_SIZE)); + // enum + result += PyModule_AddObjectRef(module, "MACSEC_VF_DISABLED", PyLong_FromLongLong(MACSEC_VF_DISABLED)); + result += PyModule_AddObjectRef(module, "MACSEC_VF_CHECK", PyLong_FromLongLong(MACSEC_VF_CHECK)); + result += PyModule_AddObjectRef(module, "MACSEC_VF_STRICT", PyLong_FromLongLong(MACSEC_VF_STRICT)); + result += PyModule_AddObjectRef(module, "MACSEC_VF_NA", PyLong_FromLongLong(MACSEC_VF_NA)); + // end of enum - } MACSEC_VALIDATEFRAME; + + // enum + result += PyModule_AddObjectRef(module, "MACSEC_SECTAG_ICV_BOTH_STRIP", PyLong_FromLongLong(MACSEC_SECTAG_ICV_BOTH_STRIP)); + result += PyModule_AddObjectRef(module, "MACSEC_SECTAG_ICV_RESERVED", PyLong_FromLongLong(MACSEC_SECTAG_ICV_RESERVED)); + result += PyModule_AddObjectRef(module, "MACSEC_SECTAG_ICV_STRIP_ICV_ONLY", PyLong_FromLongLong(MACSEC_SECTAG_ICV_STRIP_ICV_ONLY)); + result += PyModule_AddObjectRef(module, "MACSEC_SECTAG_ICV_NO_STRIP", PyLong_FromLongLong(MACSEC_SECTAG_ICV_NO_STRIP)); + // end of enum - } MACSEC_STRIP_SECTAG_ICV; + + // enum + result += PyModule_AddObjectRef(module, "MACSEC_CIPHER_GCM_AES_128", PyLong_FromLongLong(MACSEC_CIPHER_GCM_AES_128)); + result += PyModule_AddObjectRef(module, "MACSEC_CIPHER_GCM_AES_256", PyLong_FromLongLong(MACSEC_CIPHER_GCM_AES_256)); + result += PyModule_AddObjectRef(module, "MACSEC_CIPHER_GCM_AES_128_XPN", PyLong_FromLongLong(MACSEC_CIPHER_GCM_AES_128_XPN)); + result += PyModule_AddObjectRef(module, "MACSEC_CIPHER_GCM_AES_256_XPN", PyLong_FromLongLong(MACSEC_CIPHER_GCM_AES_256_XPN)); + // end of enum - } MACSEC_CIPHER_SUITE; - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_FULL_DUPLEX); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_AUTO_NEG); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_TCPIP_ENABLE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_RTSP_ENABLE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_DEVICE_HOSTING_ENABLE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_COMM_IN_USE); - result += PyModule_AddIntMacro(module, ETHERNET10G_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, LOGGER_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, DISK_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, CANTERM_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, TIMESYNC_ICSHARDWARE_SETTINGS_SIZE); - // enum - result += PyModule_AddIntMacro(module, DiskFormatUnknown); - result += PyModule_AddIntMacro(module, DiskFormatFAT32); - result += PyModule_AddIntMacro(module, DiskFormatexFAT); + result += PyModule_AddObjectRef(module, "MACSEC_SETTINGS_SECY_SIZE", PyLong_FromLongLong(MACSEC_SETTINGS_SECY_SIZE)); + result += PyModule_AddObjectRef(module, "MACSEC_SETTINGS_SC_SIZE", PyLong_FromLongLong(MACSEC_SETTINGS_SC_SIZE)); + result += PyModule_AddObjectRef(module, "MACSEC_SETTINGS_SA_SIZE", PyLong_FromLongLong(MACSEC_SETTINGS_SA_SIZE)); + result += PyModule_AddObjectRef(module, "MACSEC_SETTINGS_FLAGS_SIZE", PyLong_FromLongLong(MACSEC_SETTINGS_FLAGS_SIZE)); + result += PyModule_AddObjectRef(module, "MACSEC_NUM_FLAGS_PER_CONFIG", PyLong_FromLongLong(MACSEC_NUM_FLAGS_PER_CONFIG)); + result += PyModule_AddObjectRef(module, "MACSEC_NUM_RULES_PER_CONFIG", PyLong_FromLongLong(MACSEC_NUM_RULES_PER_CONFIG)); + result += PyModule_AddObjectRef(module, "MACSEC_NUM_MAPS_PER_CONFIG", PyLong_FromLongLong(MACSEC_NUM_MAPS_PER_CONFIG)); + result += PyModule_AddObjectRef(module, "MACSEC_NUM_SECY_PER_CONFIG", PyLong_FromLongLong(MACSEC_NUM_SECY_PER_CONFIG)); + result += PyModule_AddObjectRef(module, "MACSEC_NUM_SC_PER_CONFIG", PyLong_FromLongLong(MACSEC_NUM_SC_PER_CONFIG)); + result += PyModule_AddObjectRef(module, "MACSEC_NUM_SA_PER_CONFIG", PyLong_FromLongLong(MACSEC_NUM_SA_PER_CONFIG)); + result += PyModule_AddObjectRef(module, "MACSEC_SETTINGS_SIZE", PyLong_FromLongLong(MACSEC_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "LOGGER_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(LOGGER_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "DISK_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(DISK_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "CANTERM_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(CANTERM_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "TIMESYNC_ICSHARDWARE_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(TIMESYNC_ICSHARDWARE_SETTINGS_SIZE)); + // enum + result += PyModule_AddObjectRef(module, "DiskFormatUnknown", PyLong_FromLongLong(DiskFormatUnknown)); + result += PyModule_AddObjectRef(module, "DiskFormatFAT32", PyLong_FromLongLong(DiskFormatFAT32)); + result += PyModule_AddObjectRef(module, "DiskFormatexFAT", PyLong_FromLongLong(DiskFormatexFAT)); // end of enum - } EDiskFormat; // enum - result += PyModule_AddIntMacro(module, DiskLayoutSpanned); - result += PyModule_AddIntMacro(module, DiskLayoutRAID0); - result += PyModule_AddIntMacro(module, DiskLayoutRAID1); - result += PyModule_AddIntMacro(module, DiskLayoutRAID5); - result += PyModule_AddIntMacro(module, DiskLayoutIndividual); + result += PyModule_AddObjectRef(module, "DiskLayoutSpanned", PyLong_FromLongLong(DiskLayoutSpanned)); + result += PyModule_AddObjectRef(module, "DiskLayoutRAID0", PyLong_FromLongLong(DiskLayoutRAID0)); + result += PyModule_AddObjectRef(module, "DiskLayoutRAID1", PyLong_FromLongLong(DiskLayoutRAID1)); + result += PyModule_AddObjectRef(module, "DiskLayoutRAID5", PyLong_FromLongLong(DiskLayoutRAID5)); + result += PyModule_AddObjectRef(module, "DiskLayoutIndividual", PyLong_FromLongLong(DiskLayoutIndividual)); // end of enum - } EDiskLayout; - result += PyModule_AddIntMacro(module, DISK_STATUS_FLAG_PRESENT); - result += PyModule_AddIntMacro(module, DISK_STATUS_FLAG_INITIALIZED); - result += PyModule_AddIntMacro(module, SDiskStatus_SIZE); - result += PyModule_AddIntMacro(module, DISK_STRUCTURE_FLAG_FULL_FORMAT); - result += PyModule_AddIntMacro(module, SDiskStructure_SIZE); - result += PyModule_AddIntMacro(module, SDiskDetails_SIZE); - result += PyModule_AddIntMacro(module, SDiskFormatProgress_SIZE); - // enum - result += PyModule_AddIntMacro(module, EXTENDED_RESPONSE_OK); - result += PyModule_AddIntMacro(module, EXTENDED_RESPONSE_INVALID_COMMAND); - result += PyModule_AddIntMacro(module, EXTENDED_RESPONSE_INVALID_STATE); - result += PyModule_AddIntMacro(module, EXTENDED_RESPONSE_OPERATION_FAILED); - result += PyModule_AddIntMacro(module, EXTENDED_RESPONSE_OPERATION_PENDING); - result += PyModule_AddIntMacro(module, EXTENDED_RESPONSE_INVALID_PARAMETER); + result += PyModule_AddObjectRef(module, "DISK_STATUS_FLAG_PRESENT", PyLong_FromLongLong(DISK_STATUS_FLAG_PRESENT)); + result += PyModule_AddObjectRef(module, "DISK_STATUS_FLAG_INITIALIZED", PyLong_FromLongLong(DISK_STATUS_FLAG_INITIALIZED)); + result += PyModule_AddObjectRef(module, "SDiskStatus_SIZE", PyLong_FromUnsignedLongLong(SDiskStatus_SIZE)); + result += PyModule_AddObjectRef(module, "DISK_STRUCTURE_FLAG_FULL_FORMAT", PyLong_FromLongLong(DISK_STRUCTURE_FLAG_FULL_FORMAT)); + result += PyModule_AddObjectRef(module, "SDiskStructure_SIZE", PyLong_FromUnsignedLongLong(SDiskStructure_SIZE)); + result += PyModule_AddObjectRef(module, "SDiskDetails_SIZE", PyLong_FromUnsignedLongLong(SDiskDetails_SIZE)); + result += PyModule_AddObjectRef(module, "SDiskFormatProgress_SIZE", PyLong_FromUnsignedLongLong(SDiskFormatProgress_SIZE)); + // enum + result += PyModule_AddObjectRef(module, "EXTENDED_RESPONSE_OK", PyLong_FromLongLong(EXTENDED_RESPONSE_OK)); + result += PyModule_AddObjectRef(module, "EXTENDED_RESPONSE_INVALID_COMMAND", PyLong_FromLongLong(EXTENDED_RESPONSE_INVALID_COMMAND)); + result += PyModule_AddObjectRef(module, "EXTENDED_RESPONSE_INVALID_STATE", PyLong_FromLongLong(EXTENDED_RESPONSE_INVALID_STATE)); + result += PyModule_AddObjectRef(module, "EXTENDED_RESPONSE_OPERATION_FAILED", PyLong_FromLongLong(EXTENDED_RESPONSE_OPERATION_FAILED)); + result += PyModule_AddObjectRef(module, "EXTENDED_RESPONSE_OPERATION_PENDING", PyLong_FromLongLong(EXTENDED_RESPONSE_OPERATION_PENDING)); + result += PyModule_AddObjectRef(module, "EXTENDED_RESPONSE_INVALID_PARAMETER", PyLong_FromLongLong(EXTENDED_RESPONSE_INVALID_PARAMETER)); // end of enum - } ExtendedResponseCode; - result += PyModule_AddIntMacro(module, GET_SUPPORTED_FEATURES_COMMAND_VERSION); - result += PyModule_AddIntMacro(module, MAX_REPORTED_VERSIONS); + result += PyModule_AddObjectRef(module, "GENERIC_API_DATA_BUFFER_SIZE", PyLong_FromUnsignedLongLong(GENERIC_API_DATA_BUFFER_SIZE)); + result += PyModule_AddObjectRef(module, "UART_DATA_BUFFER_SIZE", PyLong_FromUnsignedLongLong(UART_DATA_BUFFER_SIZE)); + result += PyModule_AddObjectRef(module, "MACADDR_LEN", PyLong_FromUnsignedLongLong(MACADDR_LEN)); + result += PyModule_AddObjectRef(module, "MULTI_MACADDR_CNT", PyLong_FromUnsignedLongLong(MULTI_MACADDR_CNT)); + result += PyModule_AddObjectRef(module, "GENERIC_BINARY_STATUS_ERROR_UNKNOWN_BINARY", PyLong_FromLongLong(GENERIC_BINARY_STATUS_ERROR_UNKNOWN_BINARY)); + result += PyModule_AddObjectRef(module, "GENERIC_BINARY_STATUS_ERROR_OVERSIZE", PyLong_FromLongLong(GENERIC_BINARY_STATUS_ERROR_OVERSIZE)); + result += PyModule_AddObjectRef(module, "GENERIC_BINARY_STATUS_ERROR_BINARY_EMPTY", PyLong_FromLongLong(GENERIC_BINARY_STATUS_ERROR_BINARY_EMPTY)); + result += PyModule_AddObjectRef(module, "GENERIC_BINARY_STATUS_ERROR_ANY_MASK", PyLong_FromLongLong(GENERIC_BINARY_STATUS_ERROR_ANY_MASK)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_RTSP_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_RTSP_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_AUTO_DET_RES_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_AUTO_DET_RES_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_CONFIG_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_CONFIG_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_LOGGING_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_LOGGING_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_TX0_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_TX0_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_TX1_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_TX1_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_TX2_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_TX2_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_TX3_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_TX3_ENABLE)); // enum - result += PyModule_AddIntMacro(module, swUpdateWrite); - result += PyModule_AddIntMacro(module, swUpdateErase); - result += PyModule_AddIntMacro(module, swUpdateGetProgress); - result += PyModule_AddIntMacro(module, swUpdateValidateAll); - result += PyModule_AddIntMacro(module, swUpdateGetBufferSize); - result += PyModule_AddIntMacro(module, swUpdateCheckVersion); + result += PyModule_AddObjectRef(module, "SERDESCAM_MODE_TAP_REPEATER", PyLong_FromLongLong(SERDESCAM_MODE_TAP_REPEATER)); + result += PyModule_AddObjectRef(module, "SERDESCAM_MODE_SPLITTER", PyLong_FromLongLong(SERDESCAM_MODE_SPLITTER)); + result += PyModule_AddObjectRef(module, "SERDESCAM_MODE_LOG_ONLY", PyLong_FromLongLong(SERDESCAM_MODE_LOG_ONLY)); + result += PyModule_AddObjectRef(module, "SERDESCAM_MODE_CUSTOM", PyLong_FromLongLong(SERDESCAM_MODE_CUSTOM)); + result += PyModule_AddObjectRef(module, "SERDESCAM_MODE_COUNT", PyLong_FromLongLong(SERDESCAM_MODE_COUNT)); // end of enum - }; - result += PyModule_AddIntMacro(module, SExtSubCmdHdr_SIZE); - result += PyModule_AddIntMacro(module, SExtSubCmdComm_SIZE); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_ENABLE); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_RTSP_ENABLE); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_AUTO_DET_RES_ENABLE); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_CONFIG_ENABLE); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_LOGGING_ENABLE); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_TX0_ENABLE); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_TX1_ENABLE); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_TX2_ENABLE); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_TX3_ENABLE); - // enum - result += PyModule_AddIntMacro(module, SERDESCAM_MODE_TAP_REPEATER); - result += PyModule_AddIntMacro(module, SERDESCAM_MODE_SPLITTER); - result += PyModule_AddIntMacro(module, SERDESCAM_MODE_LOG_ONLY); - result += PyModule_AddIntMacro(module, SERDESCAM_MODE_CUSTOM); - result += PyModule_AddIntMacro(module, SERDESCAM_MODE_COUNT); + // enum + result += PyModule_AddObjectRef(module, "SERDESCAM_PIXEL_BIT_POS_0", PyLong_FromLongLong(SERDESCAM_PIXEL_BIT_POS_0)); + result += PyModule_AddObjectRef(module, "SERDESCAM_PIXEL_BIT_POS_1", PyLong_FromLongLong(SERDESCAM_PIXEL_BIT_POS_1)); + result += PyModule_AddObjectRef(module, "SERDESCAM_PIXEL_BIT_POS_2", PyLong_FromLongLong(SERDESCAM_PIXEL_BIT_POS_2)); + result += PyModule_AddObjectRef(module, "SERDESCAM_PIXEL_BIT_POS_3", PyLong_FromLongLong(SERDESCAM_PIXEL_BIT_POS_3)); // end of enum - }; // enum - result += PyModule_AddIntMacro(module, SERDESCAM_PIXEL_BIT_POS_0); - result += PyModule_AddIntMacro(module, SERDESCAM_PIXEL_BIT_POS_1); - result += PyModule_AddIntMacro(module, SERDESCAM_PIXEL_BIT_POS_2); - result += PyModule_AddIntMacro(module, SERDESCAM_PIXEL_BIT_POS_3); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_NONE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_NONE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_UYVY_422_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_UYVY_422_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_YUYV_422_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_YUYV_422_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_YVYU_422_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_YVYU_422_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_VYUY_422_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_VYUY_422_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_10", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_10)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_12", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_12)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_16", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_16)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_20", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_20)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_24", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_24)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_30", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_30)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_32", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_32)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_36", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_36)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RGB888", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RGB888)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_UYVY_422_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_UYVY_422_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_YUYV_422_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_YUYV_422_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_YVYU_422_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_YVYU_422_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_VYUY_422_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_VYUY_422_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16LE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16LE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16BE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16BE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_JPEG", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_JPEG)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_UYVY_422_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_UYVY_422_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_YUYV_422_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_YUYV_422_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_YVYU_422_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_YVYU_422_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_VYUY_422_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_VYUY_422_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_YUV422_10LE_PLANAR", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_YUV422_10LE_PLANAR)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_YUV422_16LE_PLANAR", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_YUV422_16LE_PLANAR)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RGB565", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RGB565)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RGB666", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RGB666)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_11x2", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_11x2)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_12x2", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_12x2)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_14", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_14)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RGB565", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RGB565)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RGB666", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RGB666)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RGB888", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RGB888)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_10", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_10)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_11x2", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_11x2)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_12", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_12)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_12x2", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_12x2)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_14", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_14)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_16", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_16)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_20", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_20)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_24", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_24)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_30", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_30)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_32", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_32)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_36", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_36)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16LE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16LE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16BE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16BE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16LE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16LE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16BE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16BE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16LE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16LE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16BE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16BE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_COUNT", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_COUNT)); // end of enum - }; + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(SERDESCAM_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "SERDESPOC_SETTINGS_MODE_DISABLED", PyLong_FromLongLong(SERDESPOC_SETTINGS_MODE_DISABLED)); + result += PyModule_AddObjectRef(module, "SERDESPOC_SETTINGS_MODE_SUPPLY", PyLong_FromLongLong(SERDESPOC_SETTINGS_MODE_SUPPLY)); + result += PyModule_AddObjectRef(module, "SERDESPOC_SETTINGS_MODE_SERIALIZER", PyLong_FromLongLong(SERDESPOC_SETTINGS_MODE_SERIALIZER)); + result += PyModule_AddObjectRef(module, "SERDESPOC_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(SERDESPOC_SETTINGS_SIZE)); // enum - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_NONE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_UYVY_422_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_YUYV_422_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_YVYU_422_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_VYUY_422_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_10); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_12); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_16); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_20); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_24); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_30); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_32); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_36); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RGB888); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_UYVY_422_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_YUYV_422_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_YVYU_422_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_VYUY_422_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16LE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16BE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_JPEG); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_UYVY_422_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_YUYV_422_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_YVYU_422_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_VYUY_422_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_YUV422_10LE_PLANAR); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_YUV422_16LE_PLANAR); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RGB565); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RGB666); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_11x2); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_12x2); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_14); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RGB565); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RGB666); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RGB888); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_10); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_11x2); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_12); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_12x2); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_14); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_16); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_20); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_24); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_30); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_32); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_36); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16LE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16BE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16LE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16BE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16LE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16BE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_COUNT); + result += PyModule_AddObjectRef(module, "SERDESGEN_MOD_ID_NONE", PyLong_FromLongLong(SERDESGEN_MOD_ID_NONE)); + result += PyModule_AddObjectRef(module, "SERDESGEN_MOD_ID_FPD3_2x2", PyLong_FromLongLong(SERDESGEN_MOD_ID_FPD3_2x2)); + result += PyModule_AddObjectRef(module, "SERDESGEN_MOD_ID_GMSL2_2x2", PyLong_FromLongLong(SERDESGEN_MOD_ID_GMSL2_2x2)); + result += PyModule_AddObjectRef(module, "SERDESGEN_MOD_ID_GMSL1_4x4", PyLong_FromLongLong(SERDESGEN_MOD_ID_GMSL1_4x4)); + result += PyModule_AddObjectRef(module, "SERDESGEN_MOD_ID_FPD3_TO_GMSL2_2x2", PyLong_FromLongLong(SERDESGEN_MOD_ID_FPD3_TO_GMSL2_2x2)); + result += PyModule_AddObjectRef(module, "SERDESGEN_MOD_ID_UNKNOWN", PyLong_FromLongLong(SERDESGEN_MOD_ID_UNKNOWN)); // end of enum - }; - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, SERDESPOC_SETTINGS_MODE_DISABLED); - result += PyModule_AddIntMacro(module, SERDESPOC_SETTINGS_MODE_SUPPLY); - result += PyModule_AddIntMacro(module, SERDESPOC_SETTINGS_MODE_SERIALIZER); - result += PyModule_AddIntMacro(module, SERDESPOC_SETTINGS_SIZE); - // enum - result += PyModule_AddIntMacro(module, SERDESGEN_MOD_ID_NONE); - result += PyModule_AddIntMacro(module, SERDESGEN_MOD_ID_FPD3_2x2); - result += PyModule_AddIntMacro(module, SERDESGEN_MOD_ID_GMSL2_2x2); - result += PyModule_AddIntMacro(module, SERDESGEN_MOD_ID_GMSL1_4x4); - result += PyModule_AddIntMacro(module, SERDESGEN_MOD_ID_FPD3_TO_GMSL2_2x2); - result += PyModule_AddIntMacro(module, SERDESGEN_MOD_ID_UNKNOWN); + result += PyModule_AddObjectRef(module, "SERDESGEN_SETTINGS_FLAG_TX_PATGEN_ENABLE", PyLong_FromLongLong(SERDESGEN_SETTINGS_FLAG_TX_PATGEN_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESGEN_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(SERDESGEN_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_TEMP_ENABLE", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_TEMP_ENABLE)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_MIC2_GPS_ENABLE", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_MIC2_GPS_ENABLE)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_INT_GPS_ENABLE", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_INT_GPS_ENABLE)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_MIC2_GPS_ENABLE2", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_MIC2_GPS_ENABLE2)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_MISC1_DIN", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_MISC1_DIN)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_MISC2_DIN", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_MISC2_DIN)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_MISC1_PWMIN", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_MISC1_PWMIN)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_MISC2_PWMIN", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_MISC2_PWMIN)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_AIN1", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_AIN1)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_SERDES_ENABLE", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_SERDES_ENABLE)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_FAN_SPEED_ENABLE", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_FAN_SPEED_ENABLE)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_REPORT_ORIENTATION_ENABLE", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_REPORT_ORIENTATION_ENABLE)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(RAD_REPORTING_SETTINGS_SIZE)); + // enum + result += PyModule_AddObjectRef(module, "REPORT_ON_PERIODIC", PyLong_FromLongLong(REPORT_ON_PERIODIC)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC1", PyLong_FromLongLong(REPORT_ON_MISC1)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC2", PyLong_FromLongLong(REPORT_ON_MISC2)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC3", PyLong_FromLongLong(REPORT_ON_MISC3)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC4", PyLong_FromLongLong(REPORT_ON_MISC4)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC5", PyLong_FromLongLong(REPORT_ON_MISC5)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC6", PyLong_FromLongLong(REPORT_ON_MISC6)); + result += PyModule_AddObjectRef(module, "REPORT_ON_LED1", PyLong_FromLongLong(REPORT_ON_LED1)); + result += PyModule_AddObjectRef(module, "REPORT_ON_LED2", PyLong_FromLongLong(REPORT_ON_LED2)); + result += PyModule_AddObjectRef(module, "REPORT_ON_KLINE", PyLong_FromLongLong(REPORT_ON_KLINE)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC3_AIN", PyLong_FromLongLong(REPORT_ON_MISC3_AIN)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC4_AIN", PyLong_FromLongLong(REPORT_ON_MISC4_AIN)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC5_AIN", PyLong_FromLongLong(REPORT_ON_MISC5_AIN)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC6_AIN", PyLong_FromLongLong(REPORT_ON_MISC6_AIN)); + result += PyModule_AddObjectRef(module, "REPORT_ON_GPS", PyLong_FromLongLong(REPORT_ON_GPS)); // end of enum - }; - result += PyModule_AddIntMacro(module, SERDESGEN_SETTINGS_FLAG_TX_PATGEN_ENABLE); - result += PyModule_AddIntMacro(module, SERDESGEN_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, RADMOONDUO_CONVERTER_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_TEMP_ENABLE); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_MIC2_GPS_ENABLE); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_INT_GPS_ENABLE); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_MIC2_GPS_ENABLE2); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_MISC1_DIN); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_MISC2_DIN); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_MISC1_PWMIN); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_MISC2_PWMIN); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_AIN1); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_SERDES_ENABLE); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_FAN_SPEED_ENABLE); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_SIZE); - // enum - result += PyModule_AddIntMacro(module, REPORT_ON_PERIODIC); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC1); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC2); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC3); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC4); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC5); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC6); - result += PyModule_AddIntMacro(module, REPORT_ON_LED1); - result += PyModule_AddIntMacro(module, REPORT_ON_LED2); - result += PyModule_AddIntMacro(module, REPORT_ON_KLINE); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC3_AIN); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC4_AIN); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC5_AIN); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC6_AIN); - result += PyModule_AddIntMacro(module, REPORT_ON_GPS); + result += PyModule_AddObjectRef(module, "VNETBITS_FEATURE_ANDROID_MSGS", PyLong_FromLongLong(VNETBITS_FEATURE_ANDROID_MSGS)); + result += PyModule_AddObjectRef(module, "VNETBITS_FEATURE_DISABLE_USB_CHECK", PyLong_FromLongLong(VNETBITS_FEATURE_DISABLE_USB_CHECK)); + result += PyModule_AddObjectRef(module, "SFireVnetSettings_SIZE", PyLong_FromUnsignedLongLong(SFireVnetSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SCyanSettings_SIZE", PyLong_FromUnsignedLongLong(SCyanSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SVCAN4Settings_SIZE", PyLong_FromUnsignedLongLong(SVCAN4Settings_SIZE)); + // enum + result += PyModule_AddObjectRef(module, "ePortDisabled", PyLong_FromLongLong(ePortDisabled)); + result += PyModule_AddObjectRef(module, "ePortOpEth1", PyLong_FromLongLong(ePortOpEth1)); + result += PyModule_AddObjectRef(module, "ePortOpEth2", PyLong_FromLongLong(ePortOpEth2)); + result += PyModule_AddObjectRef(module, "ePortOpEth3", PyLong_FromLongLong(ePortOpEth3)); + result += PyModule_AddObjectRef(module, "ePortOpEth4", PyLong_FromLongLong(ePortOpEth4)); + result += PyModule_AddObjectRef(module, "ePortOpEth5", PyLong_FromLongLong(ePortOpEth5)); + result += PyModule_AddObjectRef(module, "ePortOpEth6", PyLong_FromLongLong(ePortOpEth6)); + result += PyModule_AddObjectRef(module, "ePortOpEth7", PyLong_FromLongLong(ePortOpEth7)); + result += PyModule_AddObjectRef(module, "ePortOpEth8", PyLong_FromLongLong(ePortOpEth8)); + result += PyModule_AddObjectRef(module, "ePortOpEth9", PyLong_FromLongLong(ePortOpEth9)); + result += PyModule_AddObjectRef(module, "ePortOpEth10", PyLong_FromLongLong(ePortOpEth10)); + result += PyModule_AddObjectRef(module, "ePortOpEth11", PyLong_FromLongLong(ePortOpEth11)); + result += PyModule_AddObjectRef(module, "ePortOpEth12", PyLong_FromLongLong(ePortOpEth12)); + result += PyModule_AddObjectRef(module, "ePortStdEth1", PyLong_FromLongLong(ePortStdEth1)); + result += PyModule_AddObjectRef(module, "ePortStdEth2", PyLong_FromLongLong(ePortStdEth2)); + result += PyModule_AddObjectRef(module, "ePortStdEth3", PyLong_FromLongLong(ePortStdEth3)); + result += PyModule_AddObjectRef(module, "ePortOpEth13", PyLong_FromLongLong(ePortOpEth13)); + result += PyModule_AddObjectRef(module, "ePortOpEth14", PyLong_FromLongLong(ePortOpEth14)); + result += PyModule_AddObjectRef(module, "ePortOpEth15", PyLong_FromLongLong(ePortOpEth15)); + result += PyModule_AddObjectRef(module, "ePortOpEth16", PyLong_FromLongLong(ePortOpEth16)); // end of enum - }; - result += PyModule_AddIntMacro(module, VNETBITS_FEATURE_ANDROID_MSGS); - result += PyModule_AddIntMacro(module, SFireSettings_SIZE); - result += PyModule_AddIntMacro(module, VNETBITS_FEATURE_ANDROID_MSGS); - result += PyModule_AddIntMacro(module, VNETBITS_FEATURE_DISABLE_USB_CHECK); - result += PyModule_AddIntMacro(module, SFireVnetSettings_SIZE); - result += PyModule_AddIntMacro(module, SCyanSettings_SIZE); - result += PyModule_AddIntMacro(module, SVCAN3Settings_SIZE); - result += PyModule_AddIntMacro(module, SVCAN4Settings_SIZE); - result += PyModule_AddIntMacro(module, SVCANRFSettings_SIZE); - result += PyModule_AddIntMacro(module, SECUSettings_SIZE); - result += PyModule_AddIntMacro(module, SPendantSettings_SIZE); - result += PyModule_AddIntMacro(module, SIEVBSettings_SIZE); - result += PyModule_AddIntMacro(module, SEEVBSettings_SIZE); - // enum - result += PyModule_AddIntMacro(module, ePortDisabled); - result += PyModule_AddIntMacro(module, ePortOpEth1); - result += PyModule_AddIntMacro(module, ePortOpEth2); - result += PyModule_AddIntMacro(module, ePortOpEth3); - result += PyModule_AddIntMacro(module, ePortOpEth4); - result += PyModule_AddIntMacro(module, ePortOpEth5); - result += PyModule_AddIntMacro(module, ePortOpEth6); - result += PyModule_AddIntMacro(module, ePortOpEth7); - result += PyModule_AddIntMacro(module, ePortOpEth8); - result += PyModule_AddIntMacro(module, ePortOpEth9); - result += PyModule_AddIntMacro(module, ePortOpEth10); - result += PyModule_AddIntMacro(module, ePortOpEth11); - result += PyModule_AddIntMacro(module, ePortOpEth12); - result += PyModule_AddIntMacro(module, ePortStdEth1); - result += PyModule_AddIntMacro(module, ePortStdEth2); + // enum + result += PyModule_AddObjectRef(module, "eRoleDisabled", PyLong_FromLongLong(eRoleDisabled)); + result += PyModule_AddObjectRef(module, "eRolePassive", PyLong_FromLongLong(eRolePassive)); + result += PyModule_AddObjectRef(module, "eRoleMaster", PyLong_FromLongLong(eRoleMaster)); + result += PyModule_AddObjectRef(module, "eRoleSlave", PyLong_FromLongLong(eRoleSlave)); // end of enum - }; // enum - result += PyModule_AddIntMacro(module, eRoleDisabled); - result += PyModule_AddIntMacro(module, eRolePassive); - result += PyModule_AddIntMacro(module, eRoleMaster); - result += PyModule_AddIntMacro(module, eRoleSlave); + result += PyModule_AddObjectRef(module, "eGPTP_PROFILE_STANDARD", PyLong_FromLongLong(eGPTP_PROFILE_STANDARD)); + result += PyModule_AddObjectRef(module, "eGPTP_PROFILE_AUTOMOTIVE", PyLong_FromLongLong(eGPTP_PROFILE_AUTOMOTIVE)); // end of enum - }; - result += PyModule_AddIntMacro(module, SRADGalaxySettings_SIZE); - result += PyModule_AddIntMacro(module, SRADStar2Settings_SIZE); - result += PyModule_AddIntMacro(module, SRADSuperMoonSettings_SIZE); - // enum - result += PyModule_AddIntMacro(module, tdmModeTDM2); - result += PyModule_AddIntMacro(module, tdmModeTDM4); - result += PyModule_AddIntMacro(module, tdmModeTDM8); - result += PyModule_AddIntMacro(module, tdmModeTDM12); - result += PyModule_AddIntMacro(module, tdmModeTDM16); - result += PyModule_AddIntMacro(module, tdmModeTDM20); - result += PyModule_AddIntMacro(module, tdmModeTDM24); - result += PyModule_AddIntMacro(module, tdmModeTDM32); + result += PyModule_AddObjectRef(module, "SRADGalaxySettings_SIZE", PyLong_FromUnsignedLongLong(SRADGalaxySettings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADStar2Settings_SIZE", PyLong_FromUnsignedLongLong(SRADStar2Settings_SIZE)); + // enum + result += PyModule_AddObjectRef(module, "tdmModeTDM2", PyLong_FromLongLong(tdmModeTDM2)); + result += PyModule_AddObjectRef(module, "tdmModeTDM4", PyLong_FromLongLong(tdmModeTDM4)); + result += PyModule_AddObjectRef(module, "tdmModeTDM8", PyLong_FromLongLong(tdmModeTDM8)); + result += PyModule_AddObjectRef(module, "tdmModeTDM12", PyLong_FromLongLong(tdmModeTDM12)); + result += PyModule_AddObjectRef(module, "tdmModeTDM16", PyLong_FromLongLong(tdmModeTDM16)); + result += PyModule_AddObjectRef(module, "tdmModeTDM20", PyLong_FromLongLong(tdmModeTDM20)); + result += PyModule_AddObjectRef(module, "tdmModeTDM24", PyLong_FromLongLong(tdmModeTDM24)); + result += PyModule_AddObjectRef(module, "tdmModeTDM32", PyLong_FromLongLong(tdmModeTDM32)); // end of enum - } A2BTDMMode; // enum - result += PyModule_AddIntMacro(module, a2bNodeTypeMonitor); - result += PyModule_AddIntMacro(module, a2bNodeTypeMaster); - result += PyModule_AddIntMacro(module, a2bNodeTypeSlave); + result += PyModule_AddObjectRef(module, "a2bNodeTypeMonitor", PyLong_FromLongLong(a2bNodeTypeMonitor)); + result += PyModule_AddObjectRef(module, "a2bNodeTypeMaster", PyLong_FromLongLong(a2bNodeTypeMaster)); + result += PyModule_AddObjectRef(module, "a2bNodeTypeSlave", PyLong_FromLongLong(a2bNodeTypeSlave)); // end of enum - } A2BNodeType; - result += PyModule_AddIntMacro(module, A2B_SETTINGS_FLAG_16BIT); - result += PyModule_AddIntMacro(module, A2BMonitorSettings_SIZE); - result += PyModule_AddIntMacro(module, SRADA2BSettings_SIZE); - result += PyModule_AddIntMacro(module, SRADMoon2Settings_SIZE); - result += PyModule_AddIntMacro(module, SRADGigalogSettings_SIZE); - result += PyModule_AddIntMacro(module, SRADGigastarSettings_SIZE); - result += PyModule_AddIntMacro(module, SVividCANSettings_SIZE); - result += PyModule_AddIntMacro(module, SOBD2SimSettings_SIZE); - result += PyModule_AddIntMacro(module, CmProbeSettings_SIZE); - result += PyModule_AddIntMacro(module, OBD2ProSettings_SIZE); - result += PyModule_AddIntMacro(module, VCAN412Settings_SIZE); - result += PyModule_AddIntMacro(module, SVCAN412Settings_SIZE); - result += PyModule_AddIntMacro(module, ECU_AVBSettings_SIZE); - result += PyModule_AddIntMacro(module, PLUTO_NUM_PORTS); - result += PyModule_AddIntMacro(module, PLUTO_NUM_PRIORITY); - result += PyModule_AddIntMacro(module, PLUTO_MAX_L2_POLICING); - result += PyModule_AddIntMacro(module, PLUTO_MAX_L2_ADDRESS_LOOKUP); - result += PyModule_AddIntMacro(module, PLUTO_MAX_VLAN_LOOKUP); - result += PyModule_AddIntMacro(module, PLUTO_MAX_FORWARDING_ENTRIES); - result += PyModule_AddIntMacro(module, PLUTO_MAX_MAC_CONFIG_ENTRIES); - result += PyModule_AddIntMacro(module, PLUTO_MAX_RETAGGING_ENTRIES); - result += PyModule_AddIntMacro(module, MAX_VL_POLICING_ENTRIES); - result += PyModule_AddIntMacro(module, MAX_VL_FORWARDING_ENTRIES); - result += PyModule_AddIntMacro(module, gPTP_ROLE_DISABLED); - result += PyModule_AddIntMacro(module, gPTP_ROLE_PASSIVE); - result += PyModule_AddIntMacro(module, gPTP_ROLE_MASTER); - result += PyModule_AddIntMacro(module, gPTP_ROLE_SLAVE); - result += PyModule_AddIntMacro(module, gPTP_PROFILE_STANDARD); - result += PyModule_AddIntMacro(module, gPTP_PROFILE_AUTOMOTIVE); - result += PyModule_AddIntMacro(module, gPTP_PORT_DISABLED); - result += PyModule_AddIntMacro(module, gPTP_PORT_ENABLED); - result += PyModule_AddIntMacro(module, SPlutoSwitchSettings_SIZE); - result += PyModule_AddIntMacro(module, SRADPlutoSettings_SIZE); - result += PyModule_AddIntMacro(module, CANHubSettings_SIZE); - result += PyModule_AddIntMacro(module, SFlexVnetzSettings_Size); - // enum - result += PyModule_AddIntMacro(module, flexVnetModeDisabled); - result += PyModule_AddIntMacro(module, flexVnetModeOneSingle); - result += PyModule_AddIntMacro(module, flexVnetModeOneDual); - result += PyModule_AddIntMacro(module, flexVnetModeTwoSingle); - result += PyModule_AddIntMacro(module, flexVnetModeColdStart); + result += PyModule_AddObjectRef(module, "A2B_SETTINGS_FLAG_16BIT", PyLong_FromLongLong(A2B_SETTINGS_FLAG_16BIT)); + result += PyModule_AddObjectRef(module, "A2BMonitorSettings_SIZE", PyLong_FromUnsignedLongLong(A2BMonitorSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADA2BSettings_SIZE", PyLong_FromUnsignedLongLong(SRADA2BSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADMoon2Settings_SIZE", PyLong_FromUnsignedLongLong(SRADMoon2Settings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADMoon3Settings_SIZE", PyLong_FromUnsignedLongLong(SRADMoon3Settings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADGeminiSettings_SIZE", PyLong_FromUnsignedLongLong(SRADGeminiSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADGigastarSettings_SIZE", PyLong_FromUnsignedLongLong(SRADGigastarSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADGalaxy2Settings_SIZE", PyLong_FromUnsignedLongLong(SRADGalaxy2Settings_SIZE)); + result += PyModule_AddObjectRef(module, "SVividCANSettings_SIZE", PyLong_FromUnsignedLongLong(SVividCANSettings_SIZE)); + result += PyModule_AddObjectRef(module, "VCAN412Settings_SIZE", PyLong_FromUnsignedLongLong(VCAN412Settings_SIZE)); + result += PyModule_AddObjectRef(module, "SVCAN412Settings_SIZE", PyLong_FromLongLong(SVCAN412Settings_SIZE)); + result += PyModule_AddObjectRef(module, "gPTP_ROLE_DISABLED", PyLong_FromUnsignedLongLong(gPTP_ROLE_DISABLED)); + result += PyModule_AddObjectRef(module, "gPTP_ROLE_PASSIVE", PyLong_FromUnsignedLongLong(gPTP_ROLE_PASSIVE)); + result += PyModule_AddObjectRef(module, "gPTP_ROLE_MASTER", PyLong_FromUnsignedLongLong(gPTP_ROLE_MASTER)); + result += PyModule_AddObjectRef(module, "gPTP_ROLE_SLAVE", PyLong_FromUnsignedLongLong(gPTP_ROLE_SLAVE)); + result += PyModule_AddObjectRef(module, "gPTP_PROFILE_STANDARD", PyLong_FromUnsignedLongLong(gPTP_PROFILE_STANDARD)); + result += PyModule_AddObjectRef(module, "gPTP_PROFILE_AUTOMOTIVE", PyLong_FromUnsignedLongLong(gPTP_PROFILE_AUTOMOTIVE)); + result += PyModule_AddObjectRef(module, "gPTP_PORT_DISABLED", PyLong_FromUnsignedLongLong(gPTP_PORT_DISABLED)); + result += PyModule_AddObjectRef(module, "gPTP_PORT_ENABLED", PyLong_FromUnsignedLongLong(gPTP_PORT_ENABLED)); + result += PyModule_AddObjectRef(module, "CANHubSettings_SIZE", PyLong_FromUnsignedLongLong(CANHubSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SFlexVnetzSettings_Size", PyLong_FromLongLong(SFlexVnetzSettings_Size)); + // enum + result += PyModule_AddObjectRef(module, "flexVnetModeDisabled", PyLong_FromLongLong(flexVnetModeDisabled)); + result += PyModule_AddObjectRef(module, "flexVnetModeOneSingle", PyLong_FromLongLong(flexVnetModeOneSingle)); + result += PyModule_AddObjectRef(module, "flexVnetModeOneDual", PyLong_FromLongLong(flexVnetModeOneDual)); + result += PyModule_AddObjectRef(module, "flexVnetModeTwoSingle", PyLong_FromLongLong(flexVnetModeTwoSingle)); + result += PyModule_AddObjectRef(module, "flexVnetModeColdStart", PyLong_FromLongLong(flexVnetModeColdStart)); // end of enum - } flexVnetMode; - result += PyModule_AddIntMacro(module, SNeoECU12Settings_SIZE); - result += PyModule_AddIntMacro(module, VCAN4IndSettings_SIZE); - result += PyModule_AddIntMacro(module, OBD2LCSettings_SIZE); - result += PyModule_AddIntMacro(module, RADJUPITER_NUM_PORTS); - result += PyModule_AddIntMacro(module, JUPITER_PTP_ROLE_DISABLED); - result += PyModule_AddIntMacro(module, JUPITER_PTP_ROLE_MASTER); - result += PyModule_AddIntMacro(module, JUPITER_PTP_ROLE_SLAVE); - result += PyModule_AddIntMacro(module, SRADJupiterSettings_SIZE); - result += PyModule_AddIntMacro(module, SFire3Settings_SIZE); - result += PyModule_AddIntMacro(module, RadMoonDuoSettings_SIZE); - result += PyModule_AddIntMacro(module, SEtherBadgeSettings_SIZE); - result += PyModule_AddIntMacro(module, RADEPSILON_MAX_PHY); - result += PyModule_AddIntMacro(module, SRADEpsilonSettings_SIZE); - result += PyModule_AddIntMacro(module, SRADBMSSettings_SIZE); - result += PyModule_AddIntMacro(module, GS_VERSION); - result += PyModule_AddIntMacro(module, GLOBAL_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, NEOVI_3G_MAX_SETTINGS_SIZE); - // enum - result += PyModule_AddIntMacro(module, DeviceFireSettingsType); - result += PyModule_AddIntMacro(module, DeviceFireVnetSettingsType); - result += PyModule_AddIntMacro(module, DeviceFire2SettingsType); - result += PyModule_AddIntMacro(module, DeviceVCAN3SettingsType); - result += PyModule_AddIntMacro(module, DeviceRADGalaxySettingsType); - result += PyModule_AddIntMacro(module, DeviceRADStar2SettingsType); - result += PyModule_AddIntMacro(module, DeviceVCAN4SettingsType); - result += PyModule_AddIntMacro(module, DeviceVCAN412SettingsType); - result += PyModule_AddIntMacro(module, DeviceVividCANSettingsType); - result += PyModule_AddIntMacro(module, DeviceECU_AVBSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADSuperMoonSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADMoon2SettingsType); - result += PyModule_AddIntMacro(module, DeviceRADPlutoSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADGigalogSettingsType); - result += PyModule_AddIntMacro(module, DeviceVCANRFSettingsType); - result += PyModule_AddIntMacro(module, DeviceEEVBSettingsType); - result += PyModule_AddIntMacro(module, DeviceVCAN4IndSettingsType); - result += PyModule_AddIntMacro(module, DeviceNeoECU12SettingsType); - result += PyModule_AddIntMacro(module, DeviceFlexVnetzSettingsType); - result += PyModule_AddIntMacro(module, DeviceCANHUBSettingsType); - result += PyModule_AddIntMacro(module, DeviceIEVBSettingsType); - result += PyModule_AddIntMacro(module, DeviceOBD2SimSettingsType); - result += PyModule_AddIntMacro(module, DeviceCMProbeSettingsType); - result += PyModule_AddIntMacro(module, DeviceOBD2ProSettingsType); - result += PyModule_AddIntMacro(module, DeviceRedSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADPlutoSwitchSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADGigastarSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADJupiterSettingsType); - result += PyModule_AddIntMacro(module, DeviceFire3SettingsType); - result += PyModule_AddIntMacro(module, DeviceRadMoonDuoSettingsType); - result += PyModule_AddIntMacro(module, DeviceEtherBadgeSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADA2BSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADEpsilonSettingsType); - result += PyModule_AddIntMacro(module, DeviceOBD2LCSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADBMSSettingsType); - result += PyModule_AddIntMacro(module, DeviceSettingsTypeMax); - result += PyModule_AddIntMacro(module, DeviceSettingsNone); + result += PyModule_AddObjectRef(module, "SNeoECU12Settings_SIZE", PyLong_FromUnsignedLongLong(SNeoECU12Settings_SIZE)); + result += PyModule_AddObjectRef(module, "VCAN4IndSettings_SIZE", PyLong_FromLongLong(VCAN4IndSettings_SIZE)); + result += PyModule_AddObjectRef(module, "OBD2LCSettings_SIZE", PyLong_FromUnsignedLongLong(OBD2LCSettings_SIZE)); + result += PyModule_AddObjectRef(module, "RADJUPITER_NUM_PORTS", PyLong_FromUnsignedLongLong(RADJUPITER_NUM_PORTS)); + result += PyModule_AddObjectRef(module, "SRADJupiterSettings_SIZE", PyLong_FromUnsignedLongLong(SRADJupiterSettings_SIZE)); + result += PyModule_AddObjectRef(module, "LINUX_BOOT_ALLOWED", PyLong_FromLongLong(LINUX_BOOT_ALLOWED)); + result += PyModule_AddObjectRef(module, "WIFI_ANTENNA_INTERNAL", PyLong_FromLongLong(WIFI_ANTENNA_INTERNAL)); + result += PyModule_AddObjectRef(module, "WIFI_ANTENNA_EXTERNAL", PyLong_FromLongLong(WIFI_ANTENNA_EXTERNAL)); + result += PyModule_AddObjectRef(module, "LINUX_CONFIG_PORT_NONE", PyLong_FromLongLong(LINUX_CONFIG_PORT_NONE)); + result += PyModule_AddObjectRef(module, "LINUX_CONFIG_PORT_ETH_01", PyLong_FromLongLong(LINUX_CONFIG_PORT_ETH_01)); + result += PyModule_AddObjectRef(module, "LINUX_CONFIG_PORT_ETH_02", PyLong_FromLongLong(LINUX_CONFIG_PORT_ETH_02)); + // enum + result += PyModule_AddObjectRef(module, "NETWORK_TIMESYNC_OFF", PyLong_FromLongLong(NETWORK_TIMESYNC_OFF)); + result += PyModule_AddObjectRef(module, "NETWORK_TIMESYNC_AUTO", PyLong_FromLongLong(NETWORK_TIMESYNC_AUTO)); + result += PyModule_AddObjectRef(module, "NETWORK_TIMESYNC_NTP_ONLY", PyLong_FromLongLong(NETWORK_TIMESYNC_NTP_ONLY)); + result += PyModule_AddObjectRef(module, "NETWORK_TIMESYNC_GPS_ONLY", PyLong_FromLongLong(NETWORK_TIMESYNC_GPS_ONLY)); + // end of enum - }; + + result += PyModule_AddObjectRef(module, "SRed2Settings_SIZE", PyLong_FromLongLong(SRed2Settings_SIZE)); + result += PyModule_AddObjectRef(module, "SFire3Settings_SIZE", PyLong_FromLongLong(SFire3Settings_SIZE)); + result += PyModule_AddObjectRef(module, "SFire3FlexraySettings_SIZE", PyLong_FromLongLong(SFire3FlexraySettings_SIZE)); + result += PyModule_AddObjectRef(module, "SFire3T1sLinSettings_SIZE", PyLong_FromLongLong(SFire3T1sLinSettings_SIZE)); + result += PyModule_AddObjectRef(module, "RADEPSILON_NUM_PORTS", PyLong_FromUnsignedLongLong(RADEPSILON_NUM_PORTS)); + result += PyModule_AddObjectRef(module, "RADEPSILON_MAX_PHY", PyLong_FromUnsignedLongLong(RADEPSILON_MAX_PHY)); + result += PyModule_AddObjectRef(module, "EPSILON_88Q6113_SWITCH_A", PyLong_FromUnsignedLongLong(EPSILON_88Q6113_SWITCH_A)); + result += PyModule_AddObjectRef(module, "EPSILON_88Q6113_SWITCH_B", PyLong_FromUnsignedLongLong(EPSILON_88Q6113_SWITCH_B)); + result += PyModule_AddObjectRef(module, "EPSILON_88Q6113_SWITCH_AB", PyLong_FromUnsignedLongLong(EPSILON_88Q6113_SWITCH_AB)); + // enum + result += PyModule_AddObjectRef(module, "EPSILON_10G_PHY1", PyLong_FromLongLong(EPSILON_10G_PHY1)); + result += PyModule_AddObjectRef(module, "EPSILON_10G_PHY2", PyLong_FromLongLong(EPSILON_10G_PHY2)); + // end of enum - } Epsilon_10G_PHY_select; + + result += PyModule_AddObjectRef(module, "SRADEpsilonSettings_SIZE", PyLong_FromUnsignedLongLong(SRADEpsilonSettings_SIZE)); + // enum + result += PyModule_AddObjectRef(module, "enumWILPortConfig_Single_Port_A", PyLong_FromLongLong(enumWILPortConfig_Single_Port_A)); + result += PyModule_AddObjectRef(module, "enumWILPortConfig_Single_Port_B", PyLong_FromLongLong(enumWILPortConfig_Single_Port_B)); + result += PyModule_AddObjectRef(module, "enumWILPortConfig_Dual_Port_A_And_B", PyLong_FromLongLong(enumWILPortConfig_Dual_Port_A_And_B)); + result += PyModule_AddObjectRef(module, "enumWILPortConfig_Single_Port_A_And_B", PyLong_FromLongLong(enumWILPortConfig_Single_Port_A_And_B)); + result += PyModule_AddObjectRef(module, "_enumWILPortConfig_Total", PyLong_FromLongLong(_enumWILPortConfig_Total)); + // end of enum - }; + + // enum + result += PyModule_AddObjectRef(module, "SPI_PORT_ONBOARD", PyLong_FromLongLong(SPI_PORT_ONBOARD)); + result += PyModule_AddObjectRef(module, "SPI_PORT_EXTERNAL", PyLong_FromLongLong(SPI_PORT_EXTERNAL)); + // end of enum - }; + + // enum + result += PyModule_AddObjectRef(module, "SPI_TYPE_WIL", PyLong_FromLongLong(SPI_TYPE_WIL)); + result += PyModule_AddObjectRef(module, "SPI_TYPE_RAW", PyLong_FromLongLong(SPI_TYPE_RAW)); + // end of enum - }; + + // enum + result += PyModule_AddObjectRef(module, "SPI_MODE_MASTER", PyLong_FromLongLong(SPI_MODE_MASTER)); + result += PyModule_AddObjectRef(module, "SPI_MODE_SLAVE", PyLong_FromLongLong(SPI_MODE_SLAVE)); + result += PyModule_AddObjectRef(module, "SPI_MODE_PMS_EMULATION", PyLong_FromLongLong(SPI_MODE_PMS_EMULATION)); + // end of enum - }; + + result += PyModule_AddObjectRef(module, "WBMS_GATEWAY_NETWORK_NONE", PyLong_FromLongLong(WBMS_GATEWAY_NETWORK_NONE)); + result += PyModule_AddObjectRef(module, "WBMS_GATEWAY_NETWORK_DWCAN_01", PyLong_FromLongLong(WBMS_GATEWAY_NETWORK_DWCAN_01)); + result += PyModule_AddObjectRef(module, "WBMS_GATEWAY_NETWORK_DWCAN_02", PyLong_FromLongLong(WBMS_GATEWAY_NETWORK_DWCAN_02)); + result += PyModule_AddObjectRef(module, "WBMS_GATEWAY_NETWORK_UDP_MULTICAST", PyLong_FromLongLong(WBMS_GATEWAY_NETWORK_UDP_MULTICAST)); + result += PyModule_AddObjectRef(module, "SRADBMSSettings_SIZE", PyLong_FromUnsignedLongLong(SRADBMSSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADCometSettings_SIZE", PyLong_FromUnsignedLongLong(SRADCometSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADComet3Settings_SIZE", PyLong_FromUnsignedLongLong(SRADComet3Settings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADGigastar2Settings_SIZE", PyLong_FromUnsignedLongLong(SRADGigastar2Settings_SIZE)); + // enum + result += PyModule_AddObjectRef(module, "GIGASTAR2_FW_VARIANT_6T1S_1CAN_16LIN", PyLong_FromLongLong(GIGASTAR2_FW_VARIANT_6T1S_1CAN_16LIN)); + result += PyModule_AddObjectRef(module, "GIGASTAR2_FW_VARIANT_8T1S_4CAN_6LIN", PyLong_FromLongLong(GIGASTAR2_FW_VARIANT_8T1S_4CAN_6LIN)); + result += PyModule_AddObjectRef(module, "GIGASTAR2_FW_VARIANT_COUNT", PyLong_FromLongLong(GIGASTAR2_FW_VARIANT_COUNT)); + // end of enum - }; + + result += PyModule_AddObjectRef(module, "SRADMoonT1SSettings_SIZE", PyLong_FromUnsignedLongLong(SRADMoonT1SSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SNeoVIConnectSettings_SIZE", PyLong_FromLongLong(SNeoVIConnectSettings_SIZE)); + result += PyModule_AddObjectRef(module, "GS_VERSION", PyLong_FromUnsignedLongLong(GS_VERSION)); + result += PyModule_AddObjectRef(module, "GLOBAL_SETTINGS_SIZE", PyLong_FromLongLong(GLOBAL_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "NEOVI_3G_MAX_SETTINGS_SIZE", PyLong_FromLongLong(NEOVI_3G_MAX_SETTINGS_SIZE)); + // enum + result += PyModule_AddObjectRef(module, "DeviceFireSettingsType", PyLong_FromLongLong(DeviceFireSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceFireVnetSettingsType", PyLong_FromLongLong(DeviceFireVnetSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceFire2SettingsType", PyLong_FromLongLong(DeviceFire2SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceVCAN3SettingsTypeDeprecated", PyLong_FromLongLong(DeviceVCAN3SettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceRADGalaxySettingsType", PyLong_FromLongLong(DeviceRADGalaxySettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADStar2SettingsType", PyLong_FromLongLong(DeviceRADStar2SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceVCAN4SettingsType", PyLong_FromLongLong(DeviceVCAN4SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceVCAN412SettingsType", PyLong_FromLongLong(DeviceVCAN412SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceVividCANSettingsType", PyLong_FromLongLong(DeviceVividCANSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceECU_AVBSettingsTypeDeprecated", PyLong_FromLongLong(DeviceECU_AVBSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceRADSuperMoonSettingsTypeDeprecated", PyLong_FromLongLong(DeviceRADSuperMoonSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceRADMoon2SettingsType", PyLong_FromLongLong(DeviceRADMoon2SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADPlutoSettingsTypeDeprecated", PyLong_FromLongLong(DeviceRADPlutoSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceRADGigalogSettingsTypeDeprecated", PyLong_FromLongLong(DeviceRADGigalogSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceDeprecatedType", PyLong_FromLongLong(DeviceDeprecatedType)); + result += PyModule_AddObjectRef(module, "DeviceEEVBSettingsTypeDeprecated", PyLong_FromLongLong(DeviceEEVBSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceVCAN4IndSettingsType", PyLong_FromLongLong(DeviceVCAN4IndSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceNeoECU12SettingsType", PyLong_FromLongLong(DeviceNeoECU12SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceFlexVnetzSettingsType", PyLong_FromLongLong(DeviceFlexVnetzSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceCANHUBSettingsType", PyLong_FromLongLong(DeviceCANHUBSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceIEVBSettingsTypeDeprecated", PyLong_FromLongLong(DeviceIEVBSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceOBD2SimSettingsTypeDeprecated", PyLong_FromLongLong(DeviceOBD2SimSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceCMProbeSettingsTypeDeprecated", PyLong_FromLongLong(DeviceCMProbeSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceOBD2ProSettingsTypeDeprecated", PyLong_FromLongLong(DeviceOBD2ProSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceRedSettingsTypeDeprecated", PyLong_FromLongLong(DeviceRedSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceRADPlutoSwitchSettingsTypeDeprecated", PyLong_FromLongLong(DeviceRADPlutoSwitchSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceRADGigastarSettingsType", PyLong_FromLongLong(DeviceRADGigastarSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADJupiterSettingsType", PyLong_FromLongLong(DeviceRADJupiterSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRed2SettingsType", PyLong_FromLongLong(DeviceRed2SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRadMoonDuoSettingsTypeDeprecated", PyLong_FromLongLong(DeviceRadMoonDuoSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceEtherBadgeSettingsTypeDeprecated", PyLong_FromLongLong(DeviceEtherBadgeSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceRADA2BSettingsType", PyLong_FromLongLong(DeviceRADA2BSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADEpsilonSettingsType", PyLong_FromLongLong(DeviceRADEpsilonSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceOBD2LCSettingsType", PyLong_FromLongLong(DeviceOBD2LCSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADBMSSettingsType", PyLong_FromLongLong(DeviceRADBMSSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADMoon3SettingsType", PyLong_FromLongLong(DeviceRADMoon3SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceFire3SettingsType", PyLong_FromLongLong(DeviceFire3SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceFire3FlexraySettingsType", PyLong_FromLongLong(DeviceFire3FlexraySettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADCometSettingsType", PyLong_FromLongLong(DeviceRADCometSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceNeoVIConnectSettingsType", PyLong_FromLongLong(DeviceNeoVIConnectSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADComet3SettingsType", PyLong_FromLongLong(DeviceRADComet3SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADGalaxy2SettingsType", PyLong_FromLongLong(DeviceRADGalaxy2SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADGigastar2SettingsType", PyLong_FromLongLong(DeviceRADGigastar2SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADMoonT1SSettingsType", PyLong_FromLongLong(DeviceRADMoonT1SSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADGeminiSettingsType", PyLong_FromLongLong(DeviceRADGeminiSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceFire3T1sLinSettingsType", PyLong_FromLongLong(DeviceFire3T1sLinSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceSettingsTypeMax", PyLong_FromLongLong(DeviceSettingsTypeMax)); + result += PyModule_AddObjectRef(module, "DeviceSettingsNone", PyLong_FromUnsignedLongLong(static_cast(DeviceSettingsNone))); // end of enum - } EDeviceSettingsType; // enum - result += PyModule_AddIntMacro(module, PlasmaIonVnetChannelMain); - result += PyModule_AddIntMacro(module, PlasmaIonVnetChannelA); - result += PyModule_AddIntMacro(module, PlasmaIonVnetChannelB); - result += PyModule_AddIntMacro(module, eSoftCore); - result += PyModule_AddIntMacro(module, eFpgaStatusResp); + result += PyModule_AddObjectRef(module, "PlasmaIonVnetChannelMain", PyLong_FromLongLong(PlasmaIonVnetChannelMain)); + result += PyModule_AddObjectRef(module, "PlasmaIonVnetChannelA", PyLong_FromLongLong(PlasmaIonVnetChannelA)); + result += PyModule_AddObjectRef(module, "PlasmaIonVnetChannelB", PyLong_FromLongLong(PlasmaIonVnetChannelB)); + result += PyModule_AddObjectRef(module, "eSoftCore", PyLong_FromLongLong(eSoftCore)); + result += PyModule_AddObjectRef(module, "eFpgaStatusResp", PyLong_FromLongLong(eFpgaStatusResp)); // end of enum - } EPlasmaIonVnetChannel_t; - result += PyModule_AddIntMacro(module, stCM_ISO157652_TxMessage_SIZE); - result += PyModule_AddIntMacro(module, ISO15765_2015_TxMessage_SIZE); - result += PyModule_AddIntMacro(module, stCM_ISO157652_RxMessage_SIZE); - result += PyModule_AddIntMacro(module, spyFilterLong_SIZE); - result += PyModule_AddIntMacro(module, icsSpyMessage_SIZE); - result += PyModule_AddIntMacro(module, icsSpyMessage_SIZE); - result += PyModule_AddIntMacro(module, icsSpyMessage_SIZE); - result += PyModule_AddIntMacro(module, icsSpyMessage_SIZE); - result += PyModule_AddIntMacro(module, icsSpyMessageLong_SIZE); - result += PyModule_AddIntMacro(module, icsSpyMessageJ1850_SIZE); - result += PyModule_AddIntMacro(module, icsSpyMessageVSB_SIZE); - result += PyModule_AddIntMacro(module, MAX_PHY_REG_PKT_ENTRIES); - result += PyModule_AddIntMacro(module, PHY_REG_PKT_VERSION); - result += PyModule_AddIntMacro(module, MAX_PHY_SETTINGS_STRUCT); - result += PyModule_AddIntMacro(module, MAX_NUMBYTES_PHYSETTINGS); - // enum - result += PyModule_AddIntMacro(module, PHYREG_SUCCESS); - result += PyModule_AddIntMacro(module, PHYREG_FAILURE); - result += PyModule_AddIntMacro(module, PHYREG_INVALID_MDIO_BUS_INDEX); - result += PyModule_AddIntMacro(module, PHYREG_INVALID_PHY_ADDR); - result += PyModule_AddIntMacro(module, PHYREG_RESERVED0); - result += PyModule_AddIntMacro(module, PHYREG_RESERVED1); - result += PyModule_AddIntMacro(module, PHYREG_RESERVED2); - result += PyModule_AddIntMacro(module, PHYREG_RESERVED3); + // enum + result += PyModule_AddObjectRef(module, "eManagerPortA", PyLong_FromLongLong(eManagerPortA)); + result += PyModule_AddObjectRef(module, "eManagerPortB", PyLong_FromLongLong(eManagerPortB)); + // end of enum - } EwBMSManagerPort_t; + + // enum + result += PyModule_AddObjectRef(module, "eLockManager", PyLong_FromLongLong(eLockManager)); + result += PyModule_AddObjectRef(module, "eUnlockManager", PyLong_FromLongLong(eUnlockManager)); + // end of enum - } EwBMSManagerLockState_t; + + // enum + result += PyModule_AddObjectRef(module, "eUART0", PyLong_FromLongLong(eUART0)); + result += PyModule_AddObjectRef(module, "eUART1", PyLong_FromLongLong(eUART1)); + // end of enum - } EUartPort_t; + + // enum + result += PyModule_AddObjectRef(module, "eGENERIC_API", PyLong_FromLongLong(eGENERIC_API)); + result += PyModule_AddObjectRef(module, "eADI_WIL_API", PyLong_FromLongLong(eADI_WIL_API)); + // end of enum - } eGenericAPIOptions; + + // enum + result += PyModule_AddObjectRef(module, "ewBMSInstance0", PyLong_FromLongLong(ewBMSInstance0)); + result += PyModule_AddObjectRef(module, "ewBMSInstance1", PyLong_FromLongLong(ewBMSInstance1)); + // end of enum - } EwBMSInstance_t; + + result += PyModule_AddObjectRef(module, "stCM_ISO157652_TxMessage_SIZE", PyLong_FromUnsignedLongLong(stCM_ISO157652_TxMessage_SIZE)); + result += PyModule_AddObjectRef(module, "ISO15765_2015_TxMessage_SIZE", PyLong_FromLongLong(ISO15765_2015_TxMessage_SIZE)); + result += PyModule_AddObjectRef(module, "stCM_ISO157652_RxMessage_SIZE", PyLong_FromUnsignedLongLong(stCM_ISO157652_RxMessage_SIZE)); + result += PyModule_AddObjectRef(module, "spyFilterLong_SIZE", PyLong_FromUnsignedLongLong(spyFilterLong_SIZE)); + result += PyModule_AddObjectRef(module, "icsSpyMessage_SIZE", PyLong_FromUnsignedLongLong(icsSpyMessage_SIZE)); + result += PyModule_AddObjectRef(module, "icsSpyMessage_SIZE", PyLong_FromUnsignedLongLong(icsSpyMessage_SIZE)); + result += PyModule_AddObjectRef(module, "icsSpyMessage_SIZE", PyLong_FromUnsignedLongLong(icsSpyMessage_SIZE)); + result += PyModule_AddObjectRef(module, "icsSpyMessage_SIZE", PyLong_FromUnsignedLongLong(icsSpyMessage_SIZE)); + result += PyModule_AddObjectRef(module, "icsSpyMessageLong_SIZE", PyLong_FromLongLong(icsSpyMessageLong_SIZE)); + result += PyModule_AddObjectRef(module, "icsSpyMessageJ1850_SIZE", PyLong_FromLongLong(icsSpyMessageJ1850_SIZE)); + result += PyModule_AddObjectRef(module, "icsSpyMessageVSB_SIZE", PyLong_FromUnsignedLongLong(icsSpyMessageVSB_SIZE)); + result += PyModule_AddObjectRef(module, "MAX_PHY_REG_PKT_ENTRIES", PyLong_FromUnsignedLongLong(MAX_PHY_REG_PKT_ENTRIES)); + result += PyModule_AddObjectRef(module, "PHY_REG_PKT_VERSION", PyLong_FromUnsignedLongLong(PHY_REG_PKT_VERSION)); + result += PyModule_AddObjectRef(module, "MAX_PHY_SETTINGS_STRUCT", PyLong_FromUnsignedLongLong(MAX_PHY_SETTINGS_STRUCT)); + result += PyModule_AddObjectRef(module, "MAX_NUMBYTES_PHYSETTINGS", PyLong_FromLongLong(MAX_NUMBYTES_PHYSETTINGS)); + // enum + result += PyModule_AddObjectRef(module, "PHYREG_SUCCESS", PyLong_FromLongLong(PHYREG_SUCCESS)); + result += PyModule_AddObjectRef(module, "PHYREG_FAILURE", PyLong_FromLongLong(PHYREG_FAILURE)); + result += PyModule_AddObjectRef(module, "PHYREG_INVALID_MDIO_BUS_INDEX", PyLong_FromLongLong(PHYREG_INVALID_MDIO_BUS_INDEX)); + result += PyModule_AddObjectRef(module, "PHYREG_INVALID_PHY_ADDR", PyLong_FromLongLong(PHYREG_INVALID_PHY_ADDR)); + result += PyModule_AddObjectRef(module, "PHYREG_UNSUPPORTED_MDIO_CLAUSE", PyLong_FromLongLong(PHYREG_UNSUPPORTED_MDIO_CLAUSE)); + result += PyModule_AddObjectRef(module, "PHYREG_RESERVED1", PyLong_FromLongLong(PHYREG_RESERVED1)); + result += PyModule_AddObjectRef(module, "PHYREG_RESERVED2", PyLong_FromLongLong(PHYREG_RESERVED2)); + result += PyModule_AddObjectRef(module, "PHYREG_RESERVED3", PyLong_FromLongLong(PHYREG_RESERVED3)); // end of enum - } PhyRegPktStatus_t; // enum - result += PyModule_AddIntMacro(module, PHYREG_READ); - result += PyModule_AddIntMacro(module, PHYREG_WRITE); - result += PyModule_AddIntMacro(module, PHYREG_BOTH); + result += PyModule_AddObjectRef(module, "PHYREG_READ", PyLong_FromLongLong(PHYREG_READ)); + result += PyModule_AddObjectRef(module, "PHYREG_WRITE", PyLong_FromLongLong(PHYREG_WRITE)); + result += PyModule_AddObjectRef(module, "PHYREG_BOTH", PyLong_FromLongLong(PHYREG_BOTH)); // end of enum - } PhyRegPktRw_t; // enum - // end of enum - } + result += PyModule_AddObjectRef(module, "networkDWCAN01", PyLong_FromLongLong(networkDWCAN01)); + result += PyModule_AddObjectRef(module, "networkDWCAN02", PyLong_FromLongLong(networkDWCAN02)); + result += PyModule_AddObjectRef(module, "networkDWCAN03", PyLong_FromLongLong(networkDWCAN03)); + result += PyModule_AddObjectRef(module, "networkDWCAN04", PyLong_FromLongLong(networkDWCAN04)); + result += PyModule_AddObjectRef(module, "networkDWCAN05", PyLong_FromLongLong(networkDWCAN05)); + result += PyModule_AddObjectRef(module, "networkDWCAN06", PyLong_FromLongLong(networkDWCAN06)); + result += PyModule_AddObjectRef(module, "networkDWCAN07", PyLong_FromLongLong(networkDWCAN07)); + result += PyModule_AddObjectRef(module, "networkDWCAN08", PyLong_FromLongLong(networkDWCAN08)); + result += PyModule_AddObjectRef(module, "networkTerminationDWCAN01", PyLong_FromLongLong(networkTerminationDWCAN01)); + result += PyModule_AddObjectRef(module, "networkTerminationDWCAN02", PyLong_FromLongLong(networkTerminationDWCAN02)); + result += PyModule_AddObjectRef(module, "networkTerminationDWCAN03", PyLong_FromLongLong(networkTerminationDWCAN03)); + result += PyModule_AddObjectRef(module, "networkTerminationDWCAN04", PyLong_FromLongLong(networkTerminationDWCAN04)); + result += PyModule_AddObjectRef(module, "networkTerminationDWCAN05", PyLong_FromLongLong(networkTerminationDWCAN05)); + result += PyModule_AddObjectRef(module, "networkTerminationDWCAN06", PyLong_FromLongLong(networkTerminationDWCAN06)); + result += PyModule_AddObjectRef(module, "networkTerminationDWCAN07", PyLong_FromLongLong(networkTerminationDWCAN07)); + result += PyModule_AddObjectRef(module, "networkTerminationDWCAN08", PyLong_FromLongLong(networkTerminationDWCAN08)); + result += PyModule_AddObjectRef(module, "enhancedFlashDriver", PyLong_FromLongLong(enhancedFlashDriver)); + result += PyModule_AddObjectRef(module, "rtcCalibration", PyLong_FromLongLong(rtcCalibration)); + result += PyModule_AddObjectRef(module, "rtcClosedLoopCalibration", PyLong_FromLongLong(rtcClosedLoopCalibration)); + result += PyModule_AddObjectRef(module, "cmp", PyLong_FromLongLong(cmp)); + result += PyModule_AddObjectRef(module, "NUM_VALID_DEVICE_FEATURES", PyLong_FromLongLong(NUM_VALID_DEVICE_FEATURES)); + result += PyModule_AddObjectRef(module, "supportedFeatureMax", PyLong_FromLongLong(supportedFeatureMax)); + // end of enum - } DeviceFeature; + + // enum + result += PyModule_AddObjectRef(module, "AccessoryOperationError", PyLong_FromLongLong(AccessoryOperationError)); + result += PyModule_AddObjectRef(module, "AccessoryOperationSuccess", PyLong_FromLongLong(AccessoryOperationSuccess)); + result += PyModule_AddObjectRef(module, "AccessoryFlashingInitError", PyLong_FromLongLong(AccessoryFlashingInitError)); + result += PyModule_AddObjectRef(module, "AccessoryFlashingEraseError", PyLong_FromLongLong(AccessoryFlashingEraseError)); + result += PyModule_AddObjectRef(module, "AccessoryFlashingWriteError", PyLong_FromLongLong(AccessoryFlashingWriteError)); + result += PyModule_AddObjectRef(module, "AccessoryFlashingReadError", PyLong_FromLongLong(AccessoryFlashingReadError)); + result += PyModule_AddObjectRef(module, "AccessoryFlashingVerifyError", PyLong_FromLongLong(AccessoryFlashingVerifyError)); + result += PyModule_AddObjectRef(module, "AccessoryFlashingDeinitError", PyLong_FromLongLong(AccessoryFlashingDeinitError)); + result += PyModule_AddObjectRef(module, "AccessoryFlashingInvalidHardware", PyLong_FromLongLong(AccessoryFlashingInvalidHardware)); + result += PyModule_AddObjectRef(module, "AccessoryFlashingInvalidDataFile", PyLong_FromLongLong(AccessoryFlashingInvalidDataFile)); + result += PyModule_AddObjectRef(module, "AccessoryGetVersionError", PyLong_FromLongLong(AccessoryGetVersionError)); + result += PyModule_AddObjectRef(module, "AccessoryIndexError", PyLong_FromLongLong(AccessoryIndexError)); + result += PyModule_AddObjectRef(module, "AccessoryParamApiVersionError", PyLong_FromLongLong(AccessoryParamApiVersionError)); + result += PyModule_AddObjectRef(module, "AccessoryParamSizeMismatchError", PyLong_FromLongLong(AccessoryParamSizeMismatchError)); + result += PyModule_AddObjectRef(module, "AccessoryParameterNull", PyLong_FromLongLong(AccessoryParameterNull)); + // end of enum - } AccessoryOperationErrorType; + + // enum + result += PyModule_AddObjectRef(module, "EDevNameTypeDefault", PyLong_FromLongLong(EDevNameTypeDefault)); + result += PyModule_AddObjectRef(module, "EDevNameTypeNoSerial", PyLong_FromLongLong(EDevNameTypeNoSerial)); + result += PyModule_AddObjectRef(module, "EDevNameTypeTCP", PyLong_FromLongLong(EDevNameTypeTCP)); + result += PyModule_AddObjectRef(module, "EDevNameTypeTCPShort", PyLong_FromLongLong(EDevNameTypeTCPShort)); + // end of enum - } EDevNameType; + + result += PyModule_AddObjectRef(module, "FlashAccessoryFirmwareParams_SIZE", PyLong_FromLongLong(FlashAccessoryFirmwareParams_SIZE)); + result += PyModule_AddObjectRef(module, "FlashAccessoryFirmwareParams_SIZE", PyLong_FromLongLong(FlashAccessoryFirmwareParams_SIZE)); + // enum + result += PyModule_AddObjectRef(module, "FLASH_ACCESSORY_EPSILON_10G_PHY1", PyLong_FromLongLong(FLASH_ACCESSORY_EPSILON_10G_PHY1)); + result += PyModule_AddObjectRef(module, "FLASH_ACCESSORY_EPSILON_10G_PHY2", PyLong_FromLongLong(FLASH_ACCESSORY_EPSILON_10G_PHY2)); + result += PyModule_AddObjectRef(module, "FLASH_ACCESSORY_EPSILON_SWITCH_A", PyLong_FromLongLong(FLASH_ACCESSORY_EPSILON_SWITCH_A)); + result += PyModule_AddObjectRef(module, "FLASH_ACCESSORY_EPSILON_SWITCH_B", PyLong_FromLongLong(FLASH_ACCESSORY_EPSILON_SWITCH_B)); + // end of enum - } flashAccessoryIndex; + + // enum + result += PyModule_AddObjectRef(module, "FLASH_ACCESSORY_EPSILON_10G_PHY_FW_0_3_7_0", PyLong_FromLongLong(FLASH_ACCESSORY_EPSILON_10G_PHY_FW_0_3_7_0)); + // end of enum - } epsilon10GPHYFW; + result += PyModule_AddObjectRef(module, "NUM_DEVICE_FEATURE_BITFIELDS", PyLong_FromLongLong(NUM_DEVICE_FEATURE_BITFIELDS)); + result += PyModule_AddObjectRef(module, "CICSSPYSTATUSBITS_H_", PyLong_FromUnsignedLongLong(CICSSPYSTATUSBITS_H_)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_GLOBAL_ERR", PyLong_FromLongLong(SPY_STATUS_GLOBAL_ERR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_TX_MSG", PyLong_FromLongLong(SPY_STATUS_TX_MSG)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_XTD_FRAME", PyLong_FromLongLong(SPY_STATUS_XTD_FRAME)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_REMOTE_FRAME", PyLong_FromLongLong(SPY_STATUS_REMOTE_FRAME)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_CRC_ERROR", PyLong_FromLongLong(SPY_STATUS_CRC_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_INCOMPLETE_FRAME", PyLong_FromLongLong(SPY_STATUS_INCOMPLETE_FRAME)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_LOST_ARBITRATION", PyLong_FromLongLong(SPY_STATUS_LOST_ARBITRATION)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_UNDEFINED_ERROR", PyLong_FromLongLong(SPY_STATUS_UNDEFINED_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_BUS_RECOVERED", PyLong_FromLongLong(SPY_STATUS_BUS_RECOVERED)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_BUS_SHORTED_PLUS", PyLong_FromLongLong(SPY_STATUS_BUS_SHORTED_PLUS)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_BUS_SHORTED_GND", PyLong_FromLongLong(SPY_STATUS_BUS_SHORTED_GND)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_CHECKSUM_ERROR", PyLong_FromLongLong(SPY_STATUS_CHECKSUM_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_BAD_MESSAGE_BIT_TIME_ERROR", PyLong_FromLongLong(SPY_STATUS_BAD_MESSAGE_BIT_TIME_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_TX_NOMATCH", PyLong_FromLongLong(SPY_STATUS_TX_NOMATCH)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_COMM_IN_OVERFLOW", PyLong_FromLongLong(SPY_STATUS_COMM_IN_OVERFLOW)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_EXPECTED_LEN_MISMATCH", PyLong_FromLongLong(SPY_STATUS_EXPECTED_LEN_MISMATCH)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_MSG_NO_MATCH", PyLong_FromLongLong(SPY_STATUS_MSG_NO_MATCH)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_BREAK", PyLong_FromLongLong(SPY_STATUS_BREAK)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_AVSI_REC_OVERFLOW", PyLong_FromLongLong(SPY_STATUS_AVSI_REC_OVERFLOW)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_TEST_TRIGGER", PyLong_FromLongLong(SPY_STATUS_TEST_TRIGGER)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_AUDIO_COMMENT", PyLong_FromLongLong(SPY_STATUS_AUDIO_COMMENT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_GPS_DATA", PyLong_FromLongLong(SPY_STATUS_GPS_DATA)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_ANALOG_DIGITAL_INPUT", PyLong_FromLongLong(SPY_STATUS_ANALOG_DIGITAL_INPUT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_TEXT_COMMENT", PyLong_FromLongLong(SPY_STATUS_TEXT_COMMENT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_NETWORK_MESSAGE_TYPE", PyLong_FromLongLong(SPY_STATUS_NETWORK_MESSAGE_TYPE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_VSI_TX_UNDERRUN", PyLong_FromLongLong(SPY_STATUS_VSI_TX_UNDERRUN)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_PDU", PyLong_FromLongLong(SPY_STATUS_PDU)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_HIGH_SPEED", PyLong_FromLongLong(SPY_STATUS_HIGH_SPEED)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_EXTENDED", PyLong_FromLongLong(SPY_STATUS_EXTENDED)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_A2B_SCF_VALID_WAITING", PyLong_FromLongLong(SPY_STATUS_A2B_SCF_VALID_WAITING)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_A2B_CONTROL", PyLong_FromLongLong(SPY_STATUS_A2B_CONTROL)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_A2B_MONITOR", PyLong_FromLongLong(SPY_STATUS_A2B_MONITOR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_A2B_UPSTREAM", PyLong_FromLongLong(SPY_STATUS_A2B_UPSTREAM)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_CAN_ERROR_PASSIVE", PyLong_FromLongLong(SPY_STATUS_CAN_ERROR_PASSIVE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_CAN_BUS_OFF", PyLong_FromLongLong(SPY_STATUS_CAN_BUS_OFF)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_CANFD", PyLong_FromLongLong(SPY_STATUS_CANFD)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_HEADERCRC_ERROR", PyLong_FromLongLong(SPY_STATUS_HEADERCRC_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_FLEXRAY_PDU_NO_UPDATE_BIT", PyLong_FromLongLong(SPY_STATUS_FLEXRAY_PDU_NO_UPDATE_BIT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_FLEXRAY_PDU", PyLong_FromLongLong(SPY_STATUS_FLEXRAY_PDU)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_FLEXRAY_PDU_UPDATE_BIT_SET", PyLong_FromLongLong(SPY_STATUS_FLEXRAY_PDU_UPDATE_BIT_SET)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_LIN_MASTER", PyLong_FromLongLong(SPY_STATUS_LIN_MASTER)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_VSI_IFR_CRC_BIT", PyLong_FromLongLong(SPY_STATUS_VSI_IFR_CRC_BIT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_INIT_MESSAGE", PyLong_FromLongLong(SPY_STATUS_INIT_MESSAGE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_HAS_VALUE", PyLong_FromLongLong(SPY_STATUS2_HAS_VALUE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_VALUE_IS_BOOLEAN", PyLong_FromLongLong(SPY_STATUS2_VALUE_IS_BOOLEAN)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_HIGH_VOLTAGE", PyLong_FromLongLong(SPY_STATUS2_HIGH_VOLTAGE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LONG_MESSAGE", PyLong_FromLongLong(SPY_STATUS2_LONG_MESSAGE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_GLOBAL_CHANGE", PyLong_FromLongLong(SPY_STATUS2_GLOBAL_CHANGE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ERROR_FRAME", PyLong_FromLongLong(SPY_STATUS2_ERROR_FRAME)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_END_OF_LONG_MESSAGE", PyLong_FromLongLong(SPY_STATUS2_END_OF_LONG_MESSAGE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_CAN_ISO15765_LOGICAL_FRAME", PyLong_FromLongLong(SPY_STATUS2_CAN_ISO15765_LOGICAL_FRAME)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_CAN_HAVE_LINK_DATA", PyLong_FromLongLong(SPY_STATUS2_CAN_HAVE_LINK_DATA)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_CRC_ERROR", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_CRC_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_FRAME_TOO_SHORT", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_FRAME_TOO_SHORT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_FCS_AVAILABLE", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_FCS_AVAILABLE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_NO_PADDING", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_NO_PADDING)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_PREEMPTION_ENABLED", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_PREEMPTION_ENABLED)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_UPDATE_CHECKSUMS", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_UPDATE_CHECKSUMS)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_MANUALFCS_ENABLED", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_MANUALFCS_ENABLED)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_FCS_VERIFIED", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_FCS_VERIFIED)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_T1S_SYMBOL", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_T1S_SYMBOL)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_T1S_BURST", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_T1S_BURST)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_T1S_ETHERNET", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_T1S_ETHERNET)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_FLEXRAY_TX_AB", PyLong_FromLongLong(SPY_STATUS2_FLEXRAY_TX_AB)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_FLEXRAY_TX_AB_NO_A", PyLong_FromLongLong(SPY_STATUS2_FLEXRAY_TX_AB_NO_A)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_FLEXRAY_TX_AB_NO_B", PyLong_FromLongLong(SPY_STATUS2_FLEXRAY_TX_AB_NO_B)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_FLEXRAY_TX_AB_NO_MATCH", PyLong_FromLongLong(SPY_STATUS2_FLEXRAY_TX_AB_NO_MATCH)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_FLEXRAY_NO_CRC", PyLong_FromLongLong(SPY_STATUS2_FLEXRAY_NO_CRC)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_FLEXRAY_NO_HEADERCRC", PyLong_FromLongLong(SPY_STATUS2_FLEXRAY_NO_HEADERCRC)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_I2C_ERR_TIMEOUT", PyLong_FromLongLong(SPY_STATUS2_I2C_ERR_TIMEOUT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_I2C_ERR_NACK", PyLong_FromLongLong(SPY_STATUS2_I2C_ERR_NACK)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_I2C_DIR_READ", PyLong_FromLongLong(SPY_STATUS2_I2C_DIR_READ)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ISO_FRAME_ERROR", PyLong_FromLongLong(SPY_STATUS2_ISO_FRAME_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ISO_OVERFLOW_ERROR", PyLong_FromLongLong(SPY_STATUS2_ISO_OVERFLOW_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ISO_PARITY_ERROR", PyLong_FromLongLong(SPY_STATUS2_ISO_PARITY_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ISO_RX_TIMEOUT_ERROR", PyLong_FromLongLong(SPY_STATUS2_ISO_RX_TIMEOUT_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_ERR_RX_BREAK_NOT_0", PyLong_FromLongLong(SPY_STATUS2_LIN_ERR_RX_BREAK_NOT_0)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_ERR_RX_BREAK_TOO_SHORT", PyLong_FromLongLong(SPY_STATUS2_LIN_ERR_RX_BREAK_TOO_SHORT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_ERR_RX_SYNC_NOT_55", PyLong_FromLongLong(SPY_STATUS2_LIN_ERR_RX_SYNC_NOT_55)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_ERR_RX_DATA_GREATER_8", PyLong_FromLongLong(SPY_STATUS2_LIN_ERR_RX_DATA_GREATER_8)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_ERR_TX_RX_MISMATCH", PyLong_FromLongLong(SPY_STATUS2_LIN_ERR_TX_RX_MISMATCH)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_ERR_MSG_ID_PARITY", PyLong_FromLongLong(SPY_STATUS2_LIN_ERR_MSG_ID_PARITY)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_SYNC_FRAME_ERROR", PyLong_FromLongLong(SPY_STATUS2_LIN_SYNC_FRAME_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_ID_FRAME_ERROR", PyLong_FromLongLong(SPY_STATUS2_LIN_ID_FRAME_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_SLAVE_BYTE_ERROR", PyLong_FromLongLong(SPY_STATUS2_LIN_SLAVE_BYTE_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_RX_TIMEOUT_ERROR", PyLong_FromLongLong(SPY_STATUS2_LIN_RX_TIMEOUT_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_NO_SLAVE_DATA", PyLong_FromLongLong(SPY_STATUS2_LIN_NO_SLAVE_DATA)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_ERR_TIMEOUT", PyLong_FromLongLong(SPY_STATUS2_MDIO_ERR_TIMEOUT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_JOB_CANCELLED", PyLong_FromLongLong(SPY_STATUS2_MDIO_JOB_CANCELLED)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_INVALID_BUS", PyLong_FromLongLong(SPY_STATUS2_MDIO_INVALID_BUS)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_INVALID_PHYADDR", PyLong_FromLongLong(SPY_STATUS2_MDIO_INVALID_PHYADDR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_INVALID_REGADDR", PyLong_FromLongLong(SPY_STATUS2_MDIO_INVALID_REGADDR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_UNSUPPORTED_CLAUSE", PyLong_FromLongLong(SPY_STATUS2_MDIO_UNSUPPORTED_CLAUSE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_UNSUPPORTED_OPCODE", PyLong_FromLongLong(SPY_STATUS2_MDIO_UNSUPPORTED_OPCODE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_OVERFLOW", PyLong_FromLongLong(SPY_STATUS2_MDIO_OVERFLOW)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_CLAUSE45", PyLong_FromLongLong(SPY_STATUS2_MDIO_CLAUSE45)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_READ", PyLong_FromLongLong(SPY_STATUS2_MDIO_READ)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_PACKET_DATA", PyLong_FromLongLong(SPY_STATUS2_MOST_PACKET_DATA)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_STATUS", PyLong_FromLongLong(SPY_STATUS2_MOST_STATUS)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_LOW_LEVEL", PyLong_FromLongLong(SPY_STATUS2_MOST_LOW_LEVEL)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_CONTROL_DATA", PyLong_FromLongLong(SPY_STATUS2_MOST_CONTROL_DATA)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_MHP_USER_DATA", PyLong_FromLongLong(SPY_STATUS2_MOST_MHP_USER_DATA)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_MHP_CONTROL_DATA", PyLong_FromLongLong(SPY_STATUS2_MOST_MHP_CONTROL_DATA)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_I2S_DUMP", PyLong_FromLongLong(SPY_STATUS2_MOST_I2S_DUMP)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_TOO_SHORT", PyLong_FromLongLong(SPY_STATUS2_MOST_TOO_SHORT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_MOST50", PyLong_FromLongLong(SPY_STATUS2_MOST_MOST50)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_MOST150", PyLong_FromLongLong(SPY_STATUS2_MOST_MOST150)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_CHANGED_PAR", PyLong_FromLongLong(SPY_STATUS2_MOST_CHANGED_PAR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_WBMS_API_IS_CALLBACK", PyLong_FromLongLong(SPY_STATUS2_WBMS_API_IS_CALLBACK)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_ERR_PASSIVE", PyLong_FromLongLong(SPY_STATUS3_CAN_ERR_PASSIVE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_BUS_OFF", PyLong_FromLongLong(SPY_STATUS3_CAN_BUS_OFF)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_ERR_WARNING", PyLong_FromLongLong(SPY_STATUS3_CAN_ERR_WARNING)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_DATAERR_STUFF_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_DATAERR_STUFF_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_DATAERR_FORM_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_DATAERR_FORM_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_DATAERR_ACK_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_DATAERR_ACK_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_DATAERR_BIT1_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_DATAERR_BIT1_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_DATAERR_BIT0_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_DATAERR_BIT0_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_DATAERR_CRC_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_DATAERR_CRC_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_DATAERR_NOCHANGE", PyLong_FromLongLong(SPY_STATUS3_CAN_DATAERR_NOCHANGE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_GENERR_STUFF_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_GENERR_STUFF_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_GENERR_FORM_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_GENERR_FORM_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_GENERR_ACK_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_GENERR_ACK_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_GENERR_BIT1_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_GENERR_BIT1_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_GENERR_BIT0_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_GENERR_BIT0_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_GENERR_CRC_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_GENERR_CRC_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_GENERR_NOCHANGE", PyLong_FromLongLong(SPY_STATUS3_CAN_GENERR_NOCHANGE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CANFD_ESI", PyLong_FromLongLong(SPY_STATUS3_CANFD_ESI)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CANFD_IDE", PyLong_FromLongLong(SPY_STATUS3_CANFD_IDE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CANFD_RTR", PyLong_FromLongLong(SPY_STATUS3_CANFD_RTR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CANFD_FDF", PyLong_FromLongLong(SPY_STATUS3_CANFD_FDF)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CANFD_BRS", PyLong_FromLongLong(SPY_STATUS3_CANFD_BRS)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_ETHERNET_TX_COLLISION", PyLong_FromLongLong(SPY_STATUS3_ETHERNET_TX_COLLISION)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_ETHERNET_T1S_WAKE", PyLong_FromLongLong(SPY_STATUS3_ETHERNET_T1S_WAKE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_LIN_JUST_BREAK_SYNC", PyLong_FromLongLong(SPY_STATUS3_LIN_JUST_BREAK_SYNC)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_LIN_SLAVE_DATA_TOO_SHORT", PyLong_FromLongLong(SPY_STATUS3_LIN_SLAVE_DATA_TOO_SHORT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_LIN_ONLY_UPDATE_SLAVE_TABLE_ONCE", PyLong_FromLongLong(SPY_STATUS3_LIN_ONLY_UPDATE_SLAVE_TABLE_ONCE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS4_ETH_CRC_ERROR", PyLong_FromLongLong(SPY_STATUS4_ETH_CRC_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS4_ETH_FRAME_TOO_LONG", PyLong_FromLongLong(SPY_STATUS4_ETH_FRAME_TOO_LONG)); return result == 0 ? 1 : 0; } diff --git a/test/obsolete/cmvspy.h b/test/obsolete/cmvspy.h deleted file mode 100644 index 3717beb11..000000000 --- a/test/obsolete/cmvspy.h +++ /dev/null @@ -1,517 +0,0 @@ -// neoVI3 CoreMini Compressed Execution File -#define CM_EXE_SIZE 512 -unsigned char const ucharConfigurationArrayPM[CM_EXE_SIZE] = { -0x07, -0x09, -0x13, -0x00, -0x00, -0x02, -0x2B, -0x20, -0x04, -0xD2, -0xBA, -0xB4, -0x3F, -0x43, -0xFF, -0xF4, -0xBD, -0x2A, -0x75, -0xE4, -0x47, -0xFA, -0xE1, -0xE4, -0xA8, -0x82, -0xCE, -0x87, -0x0E, -0xB3, -0xEA, -0x7A, -0xD5, -0xF1, -0x6B, -0x2E, -0x1B, -0x8F, -0x0B, -0x82, -0x17, -0xE8, -0x09, -0x4D, -0x88, -0x78, -0xED, -0xA4, -0xC1, -0x40, -0x67, -0x73, -0xE3, -0xB0, -0xB6, -0xAD, -0xC6, -0x7C, -0x9D, -0x0C, -0x64, -0x71, -0xF9, -0xEF, -0xD0, -0xFF, -0xD1, -0x62, -0x3A, -0x7D, -0x6D, -0x31, -0x59, -0xA6, -0x9D, -0x2D, -0xB1, -0x2E, -0x3B, -0x84, -0xD3, -0x53, -0x56, -0xC8, -0x18, -0x45, -0x81, -0xDB, -0x0A, -0x3D, -0x6D, -0xAB, -0x06, -0x4F, -0x2D, -0x38, -0x0A, -0x3D, -0x6D, -0xAB, -0x06, -0x4F, -0x2D, -0x38, -0x0A, -0x3D, -0x6D, -0xAB, -0x06, -0x4F, -0x2D, -0x38, -0x0A, -0x3D, -0x6D, -0xAB, -0x06, -0x4F, -0x2D, -0x38, -0x7B, -0xE6, -0x3C, -0x8F, -0x4F, -0x6D, -0xB6, -0xE5, -0x05, -0x6F, -0x8C, -0xCE, -0xA4, -0x0A, -0xDC, -0x31, -0xDA, -0x52, -0x6F, -0xE6, -0xE2, -0xC2, -0x3A, -0xF3, -0xA7, -0xF5, -0x30, -0x48, -0xD7, -0x91, -0x22, -0x0E, -0x6E, -0x18, -0xF1, -0x05, -0xF1, -0xEB, -0xF9, -0xEF, -0x93, -0x7F, -0x60, -0x67, -0x94, -0x13, -0xCF, -0x9D, -0x78, -0x8B, -0xD5, -0x18, -0x06, -0xEE, -0xA4, -0xE5, -0x8D, -0xBA, -0x17, -0x22, -0x0C, -0x72, -0x19, -0xD2, -0xE8, -0xC9, -0x11, -0x03, -0xEE, -0x0D, -0x3B, -0x9A, -0xBD, -0x0C, -0x16, -0x28, -0x51, -0x47, -0x1A, -0x42, -0x0D, -0xEA, -0xD3, -0x56, -0x72, -0x00, -0xD4, -0x55, -0xB8, -0x69, -0x4C, -0xCD, -0xB9, -0x7F, -0xDB, -0x50, -0xE4, -0x67, -0xB5, -0xFC, -0x7F, -0x10, -0x63, -0xF2, -0x33, -0xA1, -0xD8, -0x00, -0x4D, -0xEE, -0xE8, -0x7A, -0xE0, -0xC4, -0x40, -0x0C, -0x90, -0x9A, -0xC8, -0x28, -0x43, -0x86, -0x06, -0xA8, -0xC7, -0xE8, -0x38, -0xE7, -0xC4, -0x9B, -0x7D, -0xC0, -0x50, -0x82, -0x27, -0x91, -0x67, -0xFF, -0x14, -0xDF, -0x62, -0x49, -0x0C, -0x0F, -0x9E, -0x1A, -0xC2, -0xA7, -0xF5, -0x03, -0x63, -0x15, -0x63, -0xB0, -0x10, -0x33, -0x14, -0xF9, -0xEC, -0x6A, -0xAA, -0x7C, -0xB3, -0x91, -0x79, -0x5C, -0x09, -0x79, -0xDC, -0x6C, -0xED, -0x97, -0x66, -0xB7, -0x49, -0xD7, -0xB5, -0x64, -0xAD, -0xCB, -0x3F, -0x30, -0x8B, -0x69, -0x5F, -0xF1, -0xB5, -0x23, -0x2D, -0x14, -0xE8, -0x9A, -0x2E, -0xC7, -0xFE, -0xEA, -0xBA, -0x3F, -0x4E, -0x27, -0x9E, -0xDA, -0xC1, -0x57, -0xEE, -0x9B, -0x88, -0x77, -0x8D, -0xB0, -0x8C, -0x55, -0x3F, -0x9C, -0xC3, -0x3F, -0xF9, -0x97, -0x59, -0xDA, -0x15, -0xAA, -0xFB, -0xF6, -0xAF, -0xA4, -0x4B, -0x50, -0xC1, -0xB0, -0x0A, -0x93, -0x1B, -0xF7, -0x1F, -0x44, -0xB7, -0xFD, -0x4E, -0x2B, -0x54, -0xDD, -0xF2, -0x55, -0xB5, -0xC7, -0xA9, -0xF1, -0x30, -0x0B, -0xAF, -0x29, -0xF8, -0xB3, -0xB0, -0x99, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -}; - diff --git a/test/obsolete/cmvspy.py b/test/obsolete/cmvspy.py deleted file mode 100644 index 58a03d390..000000000 --- a/test/obsolete/cmvspy.py +++ /dev/null @@ -1,58 +0,0 @@ -#This file was automatically generated by 'cmvspyconvert.py' -#from a cmvspy.h file. -#Example usage: -# from cmvspy import data as coremini_data - -data = ( \ - 0x07, 0x09, 0x13, 0x00, 0x00, 0x02, 0x2B, 0x20, 0x04, 0xD2, \ - 0xBA, 0xB4, 0x3F, 0x43, 0xFF, 0xF4, 0xBD, 0x2A, 0x75, 0xE4, \ - 0x47, 0xFA, 0xE1, 0xE4, 0xA8, 0x82, 0xCE, 0x87, 0x0E, 0xB3, \ - 0xEA, 0x7A, 0xD5, 0xF1, 0x6B, 0x2E, 0x1B, 0x8F, 0x0B, 0x82, \ - 0x17, 0xE8, 0x09, 0x4D, 0x88, 0x78, 0xED, 0xA4, 0xC1, 0x40, \ - 0x67, 0x73, 0xE3, 0xB0, 0xB6, 0xAD, 0xC6, 0x7C, 0x9D, 0x0C, \ - 0x64, 0x71, 0xF9, 0xEF, 0xD0, 0xFF, 0xD1, 0x62, 0x3A, 0x7D, \ - 0x6D, 0x31, 0x59, 0xA6, 0x9D, 0x2D, 0xB1, 0x2E, 0x3B, 0x84, \ - 0xD3, 0x53, 0x56, 0xC8, 0x18, 0x45, 0x81, 0xDB, 0x0A, 0x3D, \ - 0x6D, 0xAB, 0x06, 0x4F, 0x2D, 0x38, 0x0A, 0x3D, 0x6D, 0xAB, \ - 0x06, 0x4F, 0x2D, 0x38, 0x0A, 0x3D, 0x6D, 0xAB, 0x06, 0x4F, \ - 0x2D, 0x38, 0x0A, 0x3D, 0x6D, 0xAB, 0x06, 0x4F, 0x2D, 0x38, \ - 0x7B, 0xE6, 0x3C, 0x8F, 0x4F, 0x6D, 0xB6, 0xE5, 0x05, 0x6F, \ - 0x8C, 0xCE, 0xA4, 0x0A, 0xDC, 0x31, 0xDA, 0x52, 0x6F, 0xE6, \ - 0xE2, 0xC2, 0x3A, 0xF3, 0xA7, 0xF5, 0x30, 0x48, 0xD7, 0x91, \ - 0x22, 0x0E, 0x6E, 0x18, 0xF1, 0x05, 0xF1, 0xEB, 0xF9, 0xEF, \ - 0x93, 0x7F, 0x60, 0x67, 0x94, 0x13, 0xCF, 0x9D, 0x78, 0x8B, \ - 0xD5, 0x18, 0x06, 0xEE, 0xA4, 0xE5, 0x8D, 0xBA, 0x17, 0x22, \ - 0x0C, 0x72, 0x19, 0xD2, 0xE8, 0xC9, 0x11, 0x03, 0xEE, 0x0D, \ - 0x3B, 0x9A, 0xBD, 0x0C, 0x16, 0x28, 0x51, 0x47, 0x1A, 0x42, \ - 0x0D, 0xEA, 0xD3, 0x56, 0x72, 0x00, 0xD4, 0x55, 0xB8, 0x69, \ - 0x4C, 0xCD, 0xB9, 0x7F, 0xDB, 0x50, 0xE4, 0x67, 0xB5, 0xFC, \ - 0x7F, 0x10, 0x63, 0xF2, 0x33, 0xA1, 0xD8, 0x00, 0x4D, 0xEE, \ - 0xE8, 0x7A, 0xE0, 0xC4, 0x40, 0x0C, 0x90, 0x9A, 0xC8, 0x28, \ - 0x43, 0x86, 0x06, 0xA8, 0xC7, 0xE8, 0x38, 0xE7, 0xC4, 0x9B, \ - 0x7D, 0xC0, 0x50, 0x82, 0x27, 0x91, 0x67, 0xFF, 0x14, 0xDF, \ - 0x62, 0x49, 0x0C, 0x0F, 0x9E, 0x1A, 0xC2, 0xA7, 0xF5, 0x03, \ - 0x63, 0x15, 0x63, 0xB0, 0x10, 0x33, 0x14, 0xF9, 0xEC, 0x6A, \ - 0xAA, 0x7C, 0xB3, 0x91, 0x79, 0x5C, 0x09, 0x79, 0xDC, 0x6C, \ - 0xED, 0x97, 0x66, 0xB7, 0x49, 0xD7, 0xB5, 0x64, 0xAD, 0xCB, \ - 0x3F, 0x30, 0x8B, 0x69, 0x5F, 0xF1, 0xB5, 0x23, 0x2D, 0x14, \ - 0xE8, 0x9A, 0x2E, 0xC7, 0xFE, 0xEA, 0xBA, 0x3F, 0x4E, 0x27, \ - 0x9E, 0xDA, 0xC1, 0x57, 0xEE, 0x9B, 0x88, 0x77, 0x8D, 0xB0, \ - 0x8C, 0x55, 0x3F, 0x9C, 0xC3, 0x3F, 0xF9, 0x97, 0x59, 0xDA, \ - 0x15, 0xAA, 0xFB, 0xF6, 0xAF, 0xA4, 0x4B, 0x50, 0xC1, 0xB0, \ - 0x0A, 0x93, 0x1B, 0xF7, 0x1F, 0x44, 0xB7, 0xFD, 0x4E, 0x2B, \ - 0x54, 0xDD, 0xF2, 0x55, 0xB5, 0xC7, 0xA9, 0xF1, 0x30, 0x0B, \ - 0xAF, 0x29, 0xF8, 0xB3, 0xB0, 0x99, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, ) diff --git a/test/obsolete/cmvspyconvert.py b/test/obsolete/cmvspyconvert.py deleted file mode 100644 index fefcae071..000000000 --- a/test/obsolete/cmvspyconvert.py +++ /dev/null @@ -1,41 +0,0 @@ -# Converts a cmvspy.h file to a cmvspy.py file for use in python -# usage: cmvspyconvert.py cmvspy.h cmvspy_python.py -# arguments can be omitted -import sys -import re - -file_boiler_plate = \ -"""#This file was automatically generated by '%s' -#from a cmvspy.h file. -#Example usage: -# from cmvspy import data as coremini_data\n\n""" % sys.argv[0] - -if __name__ == "__main__": - try: - cmvspy_filename = sys.argv[1] - except IndexError: - cmvspy_filename = "cmvspy.h" - try: - cmvspy_py_filename = sys.argv[2] - except IndexError: - cmvspy_py_filename = "cmvspy.py" - print("'%s' Will be converted in '%s'" % (cmvspy_filename, cmvspy_py_filename)) - cmvspy_py_file = open(cmvspy_py_filename, "w+") - cmvspy_py_file.write(file_boiler_plate) - cmvspy_py_file.write("data = ( \\\n\t") - hex_regex = re.compile("^\s*0[xX][0-9a-fA-F]+") - BYTES_PER_LINE = 10 - bytes_current = 0 - with open(cmvspy_filename) as cmvspy_file: - for line in cmvspy_file: - matches = hex_regex.match(line) - if not matches: - continue - cmvspy_py_file.write(matches.group() + ", ") - bytes_current += 1 - if bytes_current >= 10: - bytes_current = 0 - cmvspy_py_file.write(" \\\n\t") - cmvspy_py_file.write(")\n") - cmvspy_py_file.close() - print("Done.") \ No newline at end of file diff --git a/test/obsolete/test_coremini.py b/test/obsolete/test_coremini.py deleted file mode 100644 index dcd17ece1..000000000 --- a/test/obsolete/test_coremini.py +++ /dev/null @@ -1,73 +0,0 @@ -import ics -import unittest -import random -import time -import os - -from cmvspy import data - -class testCoreMini(unittest.TestCase): - def _clear_coremini(self): - if self.dev1.DeviceType == ics.NEODEVICE_VCAN3: - ics.coremini_clear(self.dev1, ics.SCRIPT_LOCATION_VCAN3_MEM) - else: - ics.coremini_clear(self.dev1, ics.SCRIPT_LOCATION_FLASH_MEM) - ics.coremini_clear(self.dev1, ics.SCRIPT_LOCATION_SDCARD) - - @classmethod - def setUpClass(self): - #input() # for debugging purposes - self.dev1 = ics.open_device() - self._clear_coremini(self) - - @classmethod - def tearDownClass(self): - # For some reason tp_dealloc doesn't get called on - # ics.NeoDevice when initialzed in setUpClass(). - # Lets force it here. - self._clear_coremini(self) - del self.dev1 - - def testStartStop(self): - def load_coremini(self, contents, location): - self.assertFalse(ics.coremini_get_status(self.dev1)) - ics.coremini_load(self.dev1, contents, location) - ics.coremini_start(self.dev1, location) - self.assertTrue(ics.coremini_get_status(self.dev1)) - time.sleep(2) - ics.coremini_clear(self.dev1, location) - time.sleep(0.1) - self.assertFalse(ics.coremini_get_status(self.dev1)) - # This allows us to work in other directories and leave the vs3cmb file - # inside same directory as the script. - vs3file = os.path.dirname(os.path.realpath(__file__)) + '/cmvspy.vs3cmb' - if self.dev1.DeviceType == ics.NEODEVICE_VCAN3: - load_coremini(self, data, ics.SCRIPT_LOCATION_VCAN3_MEM) - load_coremini(self, vs3file, ics.SCRIPT_LOCATION_VCAN3_MEM) - elif self.dev1.DeviceType == ics.NEODEVICE_FIRE2: - load_coremini(self, data, ics.SCRIPT_LOCATION_SDCARD) - load_coremini(self, vs3file, ics.SCRIPT_LOCATION_SDCARD) - else: - load_coremini(self, data, ics.SCRIPT_LOCATION_FLASH_MEM) - load_coremini(self, data, ics.SCRIPT_LOCATION_SDCARD) - load_coremini(self, vs3file, ics.SCRIPT_LOCATION_FLASH_MEM) - load_coremini(self, vs3file, ics.SCRIPT_LOCATION_SDCARD) - - def testFblock(self): - if self.dev1.DeviceType == ics.NEODEVICE_VCAN3: - ics.coremini_load(self.dev1, data, ics.SCRIPT_LOCATION_VCAN3_MEM) - elif self.dev1.DeviceType == ics.NEODEVICE_FIRE2: - ics.coremini_load(self.dev1, data, ics.SCRIPT_LOCATION_SDCARD) - else: - ics.coremini_load(self.dev1, data, ics.SCRIPT_LOCATION_FLASH_MEM) - self.assertTrue(ics.coremini_get_fblock_status(self.dev1, 0)) - self.assertIsNone(ics.coremini_stop_fblock(self.dev1, 0)) - self.assertFalse(ics.coremini_get_fblock_status(self.dev1, 0)) - time.sleep(2) - self.assertIsNone(ics.coremini_start_fblock(self.dev1, 0)) - self.assertTrue(ics.coremini_get_fblock_status(self.dev1, 0)) - self._clear_coremini(self) - - -if __name__ == "__main__": - unittest.main() diff --git a/test/obsolete/test_get_device_status.py b/test/obsolete/test_get_device_status.py deleted file mode 100644 index bd66ccc75..000000000 --- a/test/obsolete/test_get_device_status.py +++ /dev/null @@ -1,17 +0,0 @@ -import ics -import time - -def print_device_status(s): - for attr_name in dir(s): - if attr_name.startswith('_'): - continue - print(attr_name, " "*(35-len(attr_name)), getattr(s, attr_name)) - if attr_name.upper() in ('FIRE2STATUS', 'VCAN4STATUS'): - print() - print_device_status(getattr(s, attr_name)) - print() - -d = ics.open_device() -time.sleep(0.250) # Give the device time to send the frame -s = ics.get_device_status(d) -print_device_status(s) diff --git a/test/obsolete/test_network_fire.py b/test/obsolete/test_network_fire.py deleted file mode 100644 index f517688ce..000000000 --- a/test/obsolete/test_network_fire.py +++ /dev/null @@ -1,126 +0,0 @@ -import ics -import unittest -import time -import random - -class testneoVIFIRENetworks(unittest.TestCase): - @classmethod - def setUpClass(self): - devices = ics.find_devices(ics.NEODEVICE_FIRE) - ics.open_device(devices[0]) - ics.open_device(devices[1]) - self.dev1 = devices[0] - self.dev2 = devices[1] - - @classmethod - def setUp(self): - ics.load_default_settings(self.dev1) - ics.load_default_settings(self.dev2) - - # Make sure we start with a "clean" network - ics.get_error_messages(self.dev1) - ics.get_error_messages(self.dev2) - ics.get_messages(self.dev1, False, 0.1) - ics.get_messages(self.dev2, False, 0.1) - - - @classmethod - def tearDownClass(self): - # For some reason tp_dealloc doesn't get called on - # ics.NeoDevice when initialzed in setUpClass(). - # Lets force it here. - del self.dev1 - del self.dev2 - - def testCAN(self): - message = ics.SpyMessage() - message.ArbIDOrHeader = 0xFF - message.Data = (1,2,3,4,5,6,7,8) - for network in (ics.NETID_HSCAN, ics.NETID_MSCAN, ics.NETID_HSCAN2, \ - ics.NETID_HSCAN3, ics.NETID_LSFTCAN, ics.NETID_SWCAN): - message.NetworkID = network - try: - self.assertTrue(ics.transmit_messages(self.dev1, message) == None, network) - except ics.RuntimeError as ex: - print(ex, network) - raise ex - self.assertFalse(ics.get_error_messages(self.dev1)) - self.assertFalse(ics.get_error_messages(self.dev2)) - messages, error_count = ics.get_messages(self.dev1, False, 0.1) - self.assertEqual(error_count, 0) - self.assertEqual(len(messages), 1) - self.assertEqual(message.ArbIDOrHeader, messages[0].ArbIDOrHeader) - self.assertEqual(message.NetworkID, messages[0].NetworkID) - self.assertEqual(message.Data, messages[0].Data) - self.assertFalse(ics.get_error_messages(self.dev1)) - self.assertFalse(ics.get_error_messages(self.dev2)) - - def testLIN(self): - message = ics.SpyMessageJ1850() - message.Header = (0x3C, 1, 2) - message.StatusBitField = ics.SPY_STATUS_NETWORK_MESSAGE_TYPE | \ - ics.SPY_STATUS_LIN_MASTER - message.Protocol = ics.SPY_PROTOCOL_LIN - - for network in (ics.NETID_LIN, ics.NETID_LIN2, ics.NETID_LIN3, \ - ics.NETID_LIN4): - message.NetworkID = network - message.Data = tuple([random.randint(x, 0xFF) for x in range(6)]) - # Generate the checksum - checksum = 0 - for byte in message.Data+message.Header[1:3]: - checksum += byte - if (checksum > 255): - checksum -= 255 - message.Data += ((~checksum & 0xFF),) - self.assertTrue(ics.transmit_messages(self.dev1, message) == None) - self.assertFalse(ics.get_error_messages(self.dev1)) - self.assertFalse(ics.get_error_messages(self.dev2)) - messages, error_count = ics.get_messages(self.dev1, False, 0.1) - self.assertEqual(error_count, 0) - self.assertEqual(len(messages), 1) - self.assertEqual(message.Header, messages[0].Header) - self.assertEqual(message.NetworkID, messages[0].NetworkID) - self.assertEqual(message.Data[0:-1], messages[0].Data) - self.assertFalse(ics.get_error_messages(self.dev1)) - self.assertFalse(ics.get_error_messages(self.dev2)) - - def testMISC(self): - #dev1 = output, dev2 = input - def _test_misc(self, state): - arbs = (0x203, 0x204, 0x205, 0x206, 0x201, 0x202) - for arb in arbs: - message = ics.SpyMessage() - message.ArbIDOrHeader = arb - message.NetworkID = ics.NETID_DEVICE - message.Data = (state,) - self.assertEqual(ics.transmit_messages(self.dev1, message), None) - # Wait for the report message to get sent - time.sleep(0.2) - self.assertFalse(ics.get_error_messages(self.dev1)) - self.assertFalse(ics.get_error_messages(self.dev2)) - messages, error_count = ics.get_messages(self.dev2, False, 0.5) - self.assertEqual(error_count, 0) - self.assertNotEqual(len(messages), 0) - self.assertEqual(messages[-1].ArbIDOrHeader, 0x100) - for i, arb in enumerate(arbs): - #print(messages[-1].Data, messages[-1].Data[1]>>i & 1) - self.assertEqual(messages[-1].Data[1]>>i & 1, state, \ - "MISC%d PIN state is wrong" % (arb-0x200)) - self.assertFalse(ics.get_error_messages(self.dev1)) - self.assertFalse(ics.get_error_messages(self.dev2)) - - # Change the device settings - #dev1 = output, dev2 = input - settings = ics.get_device_settings(self.dev1) - settings.misc_io_initial_ddr = 0x3F - settings.misc_io_initial_latch = 0x3F - ics.set_device_settings(self.dev1, settings) - settings = ics.get_device_settings(self.dev2) - settings.misc_io_initial_ddr = 0x0 - settings.misc_io_initial_latch = 0x0 - settings.misc_io_on_report_events = 0x7F - settings.misc_io_report_period = 100 - ics.set_device_settings(self.dev2, settings) - _test_misc(self, 1) - _test_misc(self, 0) diff --git a/test/obsolete/test_open_close.py b/test/obsolete/test_open_close.py deleted file mode 100644 index 9e124bcd3..000000000 --- a/test/obsolete/test_open_close.py +++ /dev/null @@ -1,54 +0,0 @@ -import ics -import unittest -import time - -class testneoVIFIRENetworks(unittest.TestCase): - @classmethod - def setUpClass(self): - self.devices = ics.find_devices() - - @classmethod - def setUp(self): - pass #time.sleep(2) - - @classmethod - def tearDownClass(self): - # For some reason tp_dealloc doesn't get called on - # ics.NeoDevice when initialzed in setUpClass(). - # Lets force it here. - del self.devices - - def testAutoClose(self): - devices = ics.find_devices() - for device in devices: - ics.open_device(device) - del devices # emulate NeoDevice list going out of scope - devices = ics.find_devices() - for device in devices: - ics.open_device(device) - - def testOpenCloseByFind(self): - # Open by ics.NeoDevice - for device in self.devices: - ics.open_device(device) - ics.close_device(device) - - def testOpenCloseBySerial(self): - # Open by serial number - for device in self.devices: - d = ics.open_device(device.SerialNumber) - ics.close_device(d) - - def testOpenCloseByFirstFound(self): - # Open by first found - first_devices = [] - for x in range(len(self.devices)): - first_devices.append(ics.open_device()) - # Close by API - for device in first_devices: - ics.close_device(device) - - def testOpenClose100Times(self): - for x in range(100): - ics.open_device(self.devices[0]) - ics.close_device(self.devices[0]) diff --git a/test/test_find_devices.py b/test/test_find_devices.py deleted file mode 100644 index bbff56f8b..000000000 --- a/test/test_find_devices.py +++ /dev/null @@ -1,97 +0,0 @@ -import timeit -import unittest -import ics -# This test requries 2 devices attached, one neoVI FIRE2s and one ValueCAN3 - -_DEBUG = False - -class TestFindDevicesLegacy(unittest.TestCase): - @classmethod - def setUpClass(self): - ics.override_library_name(r"icsneo40-legacy.dll") - if _DEBUG: - import os - input("Pause... " + str(os.getpid())) - - def test_default_parameters(self): - devices = ics.find_devices() - self.assertTrue(len(devices) == 2) - - def test_default_parameters_time(self): - if not _DEBUG: - self.assertTrue((timeit.timeit("ics.find_devices()", setup="import ics", number=1000)) <= 5.0) - - def test_find_fire2(self): - devices = ics.find_devices(ics.NEODEVICE_FIRE2) - self.assertTrue(len(devices) == 1) - - def test_find_vcan3(self): - devices = ics.find_devices(ics.NEODEVICE_VCAN3) - self.assertTrue(len(devices) == 1) - - def test_find_fire2_and_vcan3(self): - devices = ics.find_devices(ics.NEODEVICE_FIRE2 | ics.NEODEVICE_VCAN3) - self.assertTrue(len(devices) == 2) - -class TestFindDevicesNewStyle(unittest.TestCase): - @classmethod - def setUpClass(self): - ics.override_library_name(r"icsneo40.dll") - if _DEBUG: - import os - input("Pause... " + str(os.getpid())) - - def test_default_parameters(self): - devices = ics.find_devices() - self.assertTrue(len(devices) == 2) - - def test_default_parameters_time(self): - if not _DEBUG: - self.assertTrue((timeit.timeit("ics.find_devices()", setup="import ics", number=1000)) <= 5.0) - - def test_find_fire2(self): - devices = ics.find_devices([ics.NEODEVICE_FIRE2,]) - self.assertTrue(len(devices) == 1) - - def test_find_vcan3(self): - devices = ics.find_devices([ics.NEODEVICE_VCAN3,]) - self.assertTrue(len(devices) == 1) - - def test_find_fire2_and_vcan3(self): - devices = ics.find_devices([ics.NEODEVICE_FIRE2, ics.NEODEVICE_VCAN3]) - self.assertTrue(len(devices) == 2) - - -class TestFindDevicesNewStyleWithLegacyDLL(unittest.TestCase): - @classmethod - def setUpClass(self): - ics.override_library_name(r"icsneo40-legacy.dll") - if _DEBUG: - import os - input("Pause... " + str(os.getpid())) - - def test_default_parameters(self): - devices = ics.find_devices() - self.assertTrue(len(devices) == 2) - - def test_default_parameters_time(self): - self.assertTrue((timeit.timeit("ics.find_devices()", setup="import ics", number=1000)) <= 5.0) - - def test_find_fire2(self): - devices = ics.find_devices([ics.NEODEVICE_FIRE2,]) - self.assertTrue(len(devices) == 2) - - def test_find_vcan3(self): - devices = ics.find_devices([ics.NEODEVICE_VCAN3,]) - self.assertTrue(len(devices) == 2) - - def test_find_fire2_and_vcan3(self): - devices = ics.find_devices([ics.NEODEVICE_FIRE2, ics.NEODEVICE_VCAN3]) - self.assertTrue(len(devices) == 2) - - -if __name__ == "__main__": - if _DEBUG: - import os - input("Pause... " + str(os.getpid())) - unittest.main() \ No newline at end of file diff --git a/test/test_structs.py b/test/test_structs.py deleted file mode 100644 index dbc61d004..000000000 --- a/test/test_structs.py +++ /dev/null @@ -1,246 +0,0 @@ -import unittest -import sys -import os -#print(os.getcwd()) -print(os.path.abspath('../')) -sys.path.append('../') - -from ics.structures.inner_structure import * -from ics.structures.test_structure import * -from ics.structures.test import * - -class TestTestEnum(unittest.TestCase): - def test_all(self): - self.assertEqual(test.TestNone, 0) - self.assertEqual(test.TestA, 1) - self.assertEqual(test.TestB, 2) - self.assertEqual(test.TestC, 3) - self.assertEqual(test.TestD, 4) - self.assertEqual(test.TestE, 5) - -class TestInnerStructure(unittest.TestCase): - def test_all(self): - t = inner_structure() - self.assertTrue(isinstance(t, ctypes.Structure)) - - # default init - self.assertEqual(t.a, b'\x00') - self.assertEqual(t.b, 0) - self.assertEqual(t.t, 0) - t.a = b'Z' - self.assertEqual(t.a, b'Z') - self.assertEqual(t.b, 0) - self.assertEqual(t.t, 0) - t.a = b'\x00' - t.b = 10 - self.assertEqual(t.a, b'\x00') - self.assertEqual(t.b, 10) - self.assertEqual(t.t, 0) - t.b = 0 - t.t = test.TestD - self.assertEqual(t.a, b'\x00') - self.assertEqual(t.b, 0) - self.assertEqual(t.t, test.TestD) - - -class TestTestStructure(unittest.TestCase): - def test_a(self): - t = A() - self.assertTrue(isinstance(t, ctypes.Structure)) - # default init - self.assertEqual(t.a, 0) - self.assertEqual(t.b, 0) - self.assertEqual(t.c, 0) - t.a = 10 - self.assertEqual(t.a, 10) - self.assertEqual(t.b, 0) - self.assertEqual(t.c, 0) - t.a = 0 - t.b = 10 - self.assertEqual(t.a, 0) - self.assertEqual(t.b, 10) - self.assertEqual(t.c, 0) - t.b = 0 - t.c = 10 - self.assertEqual(t.a, 0) - self.assertEqual(t.b, 0) - self.assertEqual(t.c, 10) - - def test_b(self): - t = B() - self.assertTrue(isinstance(t, ctypes.Structure)) - # default init - self.assertEqual(t.d, 0) - self.assertEqual(t.e, 0) - self.assertEqual(t.f, 0) - t.d = 1 - self.assertEqual(t.d, 1) - self.assertEqual(t.e, 0) - self.assertEqual(t.f, 0) - t.d = 0 - t.e = 1 - self.assertEqual(t.d, 0) - self.assertEqual(t.e, 1) - self.assertEqual(t.f, 0) - t.e = 0 - t.f = 1 - self.assertEqual(t.d, 0) - self.assertEqual(t.e, 0) - self.assertEqual(t.f, 1) - - def test_c(self): - t = C() - self.assertTrue(isinstance(t, ctypes.Union)) - # default init - self.assertEqual(t.ghi, 0) - self.assertEqual(t.g, 0) - self.assertEqual(t.h, 0) - self.assertEqual(t.i, 0) - t.g = 1 - self.assertEqual(t.ghi, 0x1) - self.assertEqual(t.g, 1) - self.assertEqual(t.h, 0) - self.assertEqual(t.i, 0) - t.g = 0 - t.h = 1 - self.assertEqual(t.ghi, 0x10000) - self.assertEqual(t.g, 0) - self.assertEqual(t.h, 1) - self.assertEqual(t.i, 0) - t.h = 0 - t.i = 1 - self.assertEqual(t.ghi, 0x100000000) - self.assertEqual(t.g, 0) - self.assertEqual(t.h, 0) - self.assertEqual(t.i, 1) - t.i = 0 - t.ghi = 0x100010001 - self.assertEqual(t.ghi, 0x100010001) - self.assertEqual(t.g, 1) - self.assertEqual(t.h, 1) - self.assertEqual(t.i, 1) - - def test_d(self): - t = D() - self.assertTrue(isinstance(t, ctypes.Union)) - # default init - self.assertEqual(t.jkm, 0) - self.assertEqual(t.j, 0) - self.assertEqual(t.k, 0) - self.assertEqual(t.m, 0) - t.j = 1 - self.assertEqual(t.jkm, 0x1) - self.assertEqual(t.j, 1) - self.assertEqual(t.k, 0) - self.assertEqual(t.m, 0) - t.j = 0 - t.k = 1 - self.assertEqual(t.jkm, 0x10000) - self.assertEqual(t.j, 0) - self.assertEqual(t.k, 1) - self.assertEqual(t.m, 0) - t.k = 0 - t.m = 1 - self.assertEqual(t.jkm, 0x100000000) - self.assertEqual(t.j, 0) - self.assertEqual(t.k, 0) - self.assertEqual(t.m, 1) - t.m = 0 - t.jkm = 0x100010001 - self.assertEqual(t.jkm, 0x100010001) - self.assertEqual(t.j, 1) - self.assertEqual(t.k, 1) - self.assertEqual(t.m, 1) - - def test_e(self): - t = E() - self.assertTrue(isinstance(t, ctypes.Structure)) - # default init - self.assertEqual(t.n, 0) - self.assertEqual(t.p, 0) - self.assertEqual(t.q, 0) - t.n = 1 - self.assertEqual(t.n, 1) - self.assertEqual(t.p, 0) - self.assertEqual(t.q, 0) - t.n = 0 - t.p = 1 - self.assertEqual(t.n, 0) - self.assertEqual(t.p, 1) - self.assertEqual(t.q, 0) - t.p = 0 - t.q = 1 - self.assertEqual(t.n, 0) - self.assertEqual(t.p, 0) - self.assertEqual(t.q, 1) - t.q = 0 - self.assertEqual(t.n, 0) - self.assertEqual(t.p, 0) - self.assertEqual(t.q, 0) - - def test_f(self): - t = F() - self.assertTrue(isinstance(t, ctypes.Structure)) - # default init - self.assertEqual(t.r, 0) - self.assertEqual(t.s, 0) - self.assertEqual(t.t, 0) - t.r = 1 - self.assertEqual(t.r, 1) - self.assertEqual(t.s, 0) - self.assertEqual(t.t, 0) - t.r = 0 - t.s = 1 - self.assertEqual(t.r, 0) - self.assertEqual(t.s, 1) - self.assertEqual(t.t, 0) - t.s = 0 - t.t = 1 - self.assertEqual(t.r, 0) - self.assertEqual(t.s, 0) - self.assertEqual(t.t, 1) - t.t = 0 - self.assertEqual(t.r, 0) - self.assertEqual(t.s, 0) - self.assertEqual(t.t, 0) - - def test_anonymous(self): - t = test_structure() - self.assertTrue(isinstance(t, ctypes.Structure)) - - # test B - self.assertTrue(isinstance(t.B, ctypes.Structure)) - # default init - self.assertEqual(t._def, 0) - self.assertEqual(t.B.d, 0) - self.assertEqual(t.B.e, 0) - self.assertEqual(t.B.f, 0) - t.B.d = 1 - self.assertEqual(t._def, 0x1) - self.assertEqual(t.B.d, 1) - self.assertEqual(t.B.e, 0) - self.assertEqual(t.B.f, 0) - t.B.d = 0 - t.B.e = 1 - self.assertEqual(t._def, 0x2) - self.assertEqual(t.B.d, 0) - self.assertEqual(t.B.e, 1) - self.assertEqual(t.B.f, 0) - t.B.e = 0 - t.B.f = 1 - self.assertEqual(t._def, 0x4) - self.assertEqual(t.B.d, 0) - self.assertEqual(t.B.e, 0) - self.assertEqual(t.B.f, 1) - t._def = 0x7 - self.assertEqual(t._def, 0x7) - self.assertEqual(t.B.d, 1) - self.assertEqual(t.B.e, 1) - self.assertEqual(t.B.f, 1) - - -if __name__ == "__main__": - try: - unittest.main() - except SystemExit as ex: - print(f'Return code: {int(ex.code)}') diff --git a/icsnVC40_processed.h.json b/tests/__init__.py similarity index 100% rename from icsnVC40_processed.h.json rename to tests/__init__.py diff --git a/tests/test_defines.py b/tests/test_defines.py new file mode 100644 index 000000000..71d756433 --- /dev/null +++ b/tests/test_defines.py @@ -0,0 +1,34 @@ +import pytest +import ics + +def test_unsigned_overflow(): + """Test that certain defines are correctly set to large unsigned values.""" + # These values are defined in icsnVC40.h/cicsSpyStatusBits.h and should be + # interpreted as unsigned. No hasattr() guard: a missing name is a + # regression in the define generation and must fail loudly. + values = ( + "SPY_STATUS_EXTENDED", + "SPY_STATUS2_ETHERNET_T1S_ETHERNET", + "SPY_STATUS2_LIN_NO_SLAVE_DATA", + "SPY_STATUS2_MOST_CHANGED_PAR", + "NEODEVICE_OBD2_SIM_DEPRECATED", + "ETHERNET_SETTINGS10G_FLAG_COMM_IN_USE", + ) + for value in values: + assert getattr(ics, value) == 0x80000000, value + + +def test_serial_range_defines(): + assert ics.MIN_BASE36_SERIAL == int("A0000", 36) + assert ics.MAX_SERIAL == int("ZZZZZZ", 36) + +if __name__ == "__main__": + import pytest + + pytest.main( + args=[ + __file__, + "--verbose", + "-s", + ] + ) diff --git a/tests/test_header_3_26.py b/tests/test_header_3_26.py new file mode 100644 index 000000000..c18d2deaf --- /dev/null +++ b/tests/test_header_3_26.py @@ -0,0 +1,30 @@ +"""Pins that the module is generated from the vspy 3.26.3.9 header.""" +import pytest +import ics + + +def test_deprecated_device_constants_renamed(): + # 3.26.3.9 renamed the legacy device defines; old names must be gone. + assert ics.NEODEVICE_BLUE_DEPRECATED == 0x00000001 + assert ics.NEODEVICE_FIRE_DEPRECATED == 0x00000008 + assert ics.NEODEVICE_VCAN3_DEPRECATED == 0x00000010 + assert not hasattr(ics, "NEODEVICE_BLUE") + assert not hasattr(ics, "NEODEVICE_FIRE") + assert not hasattr(ics, "NEODEVICE_VCAN3") + + +def test_grown_settings_structs(): + # Struct growth pinned from the 3.26.3.9 header's _SIZE macros. + assert ics.SRADGalaxy2Settings_SIZE == 1204 + assert ics.SRADComet3Settings_SIZE == 918 + assert ics.SRADGigastar2Settings_SIZE == 2400 + + +def test_legacy_settings_structs_removed(): + import ics.structures + with pytest.raises(ImportError): + from ics.structures import s_red_settings # noqa: F401 + + +if __name__ == "__main__": + pytest.main(args=[__file__, "--verbose", "-s"]) diff --git a/tests/test_neo_device_ex.py b/tests/test_neo_device_ex.py new file mode 100644 index 000000000..bd969250d --- /dev/null +++ b/tests/test_neo_device_ex.py @@ -0,0 +1,43 @@ +import pytest +import ics + + +def _make_device(serial: int) -> ics.PyNeoDeviceEx: + device = ics.PyNeoDeviceEx() + # No handle was opened; don't try to close one on GC. + device._auto_handle_close = False + # SerialNumber is an int32_t in the NeoDevice struct, so values with the + # high bit set are stored as negative. + device.neoDevice.SerialNumber = serial - 0x100000000 if serial > 0x7FFFFFFF else serial + return device + + +def test_serial_number_decimal(): + assert _make_device(53123).serial_number == "53123" + + +def test_serial_number_first_base36(): + # MIN_BASE36_SERIAL is exactly "A0000" and must render as base36. + assert int("A0000", 36) == ics.MIN_BASE36_SERIAL + assert _make_device(ics.MIN_BASE36_SERIAL).serial_number == "A0000" + + +def test_serial_number_last_decimal(): + assert _make_device(ics.MIN_BASE36_SERIAL - 1).serial_number == str(ics.MIN_BASE36_SERIAL - 1) + + +def test_serial_number_high_bit_serial(): + # Serials ZIK0ZK..ZZZZZZ exceed 0x7FFFFFFF and read back negative from + # the int32 struct field; the property must still render them correctly. + assert int("ZZZZZZ", 36) == ics.MAX_SERIAL + assert _make_device(ics.MAX_SERIAL).serial_number == "ZZZZZZ" + assert _make_device(int("ZIK0ZK", 36)).serial_number == "ZIK0ZK" + + +def test_serial_number_out_of_range_raises(): + with pytest.raises(ValueError): + _make_device(ics.MAX_SERIAL + 1).serial_number + + +if __name__ == "__main__": + pytest.main(args=[__file__, "--verbose", "-s"]) diff --git a/tests/test_spy_message.py b/tests/test_spy_message.py new file mode 100644 index 000000000..f25371da5 --- /dev/null +++ b/tests/test_spy_message.py @@ -0,0 +1,122 @@ +import pytest +import ics + + +def test_data_roundtrip(): + msg = ics.SpyMessage() + msg.Data = (1, 2, 3, 4, 5, 6, 7, 8) + assert msg.Data == (1, 2, 3, 4, 5, 6, 7, 8) + assert msg.NumberBytesData == 8 + + +def test_data_partial_roundtrip(): + msg = ics.SpyMessage() + msg.Data = (0xAA, 0xBB) + assert msg.Data == (0xAA, 0xBB) + assert msg.NumberBytesData == 2 + + +def test_data_rejects_more_than_8_bytes(): + msg = ics.SpyMessage() + with pytest.raises(ValueError): + msg.Data = tuple(range(9)) + + +def test_data_rejects_non_int_elements(): + msg = ics.SpyMessage() + with pytest.raises(TypeError): + msg.Data = (1, "x", 3) + # No exception may be left pending after the failed assignment. + assert msg.NumberBytesData == 0 + + +def test_ack_bytes_rejects_more_than_8_bytes(): + msg = ics.SpyMessage() + with pytest.raises(ValueError): + msg.AckBytes = tuple(range(9)) + + +def test_ack_bytes_rejects_non_int_elements(): + msg = ics.SpyMessage() + with pytest.raises(TypeError): + msg.AckBytes = (None,) + + +def test_header_does_not_overflow_into_data(): + # icsSpyMessageJ1850.Header is only 4 bytes; a longer tuple used to + # spill into Data[0..3]. + msg = ics.SpyMessageJ1850() + msg.Data = (1, 2, 3, 4, 5, 6, 7, 8) + with pytest.raises(ValueError): + msg.Header = (0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x11, 0x22) + assert msg.Data == (1, 2, 3, 4, 5, 6, 7, 8) + + +def test_header_roundtrip(): + msg = ics.SpyMessageJ1850() + msg.Header = (0xAA, 0xBB, 0xCC, 0xDD) + assert msg.Header == (0xAA, 0xBB, 0xCC, 0xDD) + assert msg.NumberBytesHeader == 4 + + +def test_header_rejects_non_int_elements(): + msg = ics.SpyMessageJ1850() + with pytest.raises(TypeError): + msg.Header = ("a",) + + +def test_extra_data_ptr_roundtrip(): + msg = ics.SpyMessage() + msg.Protocol = ics.SPY_PROTOCOL_CANFD + payload = tuple(x & 0xFF for x in range(64)) + msg.ExtraDataPtr = payload + assert msg.ExtraDataPtr == payload + + +def test_extra_data_ptr_large_roundtrip_packing_protocol(): + # A2B/Ethernet/SPI/WBMS pack a 16-bit length into + # NumberBytesHeader:NumberBytesData. + msg = ics.SpyMessage() + msg.Protocol = ics.SPY_PROTOCOL_ETHERNET + payload = tuple(x & 0xFF for x in range(1500)) + msg.ExtraDataPtr = payload + assert msg.ExtraDataPtr == payload + + +def test_extra_data_ptr_rejects_unrepresentable_length(): + # Length is carried in 16 bits at most; longer payloads used to be + # silently truncated to (len & 0xFFFF) bytes. + msg = ics.SpyMessage() + msg.Protocol = ics.SPY_PROTOCOL_ETHERNET + with pytest.raises(ValueError): + msg.ExtraDataPtr = tuple(x & 0xFF for x in range(0x10000)) + + +def test_extra_data_ptr_rejects_unrepresentable_length_non_packing_protocol(): + # Non length-packing protocols only have the 8-bit NumberBytesData. + msg = ics.SpyMessage() + msg.Protocol = ics.SPY_PROTOCOL_CANFD + with pytest.raises(ValueError): + msg.ExtraDataPtr = tuple(x & 0xFF for x in range(0x100)) + + +def test_extra_data_ptr_rejects_non_int_elements(): + msg = ics.SpyMessage() + msg.Protocol = ics.SPY_PROTOCOL_CANFD + with pytest.raises(TypeError): + msg.ExtraDataPtr = (1, 2, "x") + + +def test_extra_data_ptr_none_when_unset(): + msg = ics.SpyMessage() + assert msg.ExtraDataPtr is None + + +def test_status_bit_field_high_bit_roundtrip(): + msg = ics.SpyMessage() + msg.StatusBitField = ics.SPY_STATUS_EXTENDED + assert msg.StatusBitField == 0x80000000 + + +if __name__ == "__main__": + pytest.main(args=[__file__, "--verbose", "-s"]) diff --git a/tests/test_struct_sizes.py b/tests/test_struct_sizes.py new file mode 100644 index 000000000..e9aa70a25 --- /dev/null +++ b/tests/test_struct_sizes.py @@ -0,0 +1,69 @@ +"""Validate generated ctypes struct sizes against the header's *_SIZE macros. + +Every `#define _SIZE (N)` in icsnVC40.h is exported as a module +constant; the matching generated ctypes struct must have the same +ctypes.sizeof. Catches header/generator layout drift on header updates. +""" +import ctypes +import importlib +import inspect +import pkgutil + +import pytest +import ics +import ics.structures + +# Upstream header bugs: macro value disagrees with the actual struct. +# Keep entries here only with a comment explaining the discrepancy. +KNOWN_STALE_MACROS = { + # Upstream never updated the macro after the struct grew to 56 bytes + # (still 40 in vspy 3.26.3.9). Reported to header owners. + "RAD_GPTP_AND_TAP_SETTINGS_SIZE", +} + +# Macros whose name doesn't map to a generated struct class (nested/typedef +# variants). Count is asserted so silent growth gets investigated. +EXPECTED_UNMATCHED = 11 + + +def _struct_registry(): + registry = {} + for info in pkgutil.iter_modules(ics.structures.__path__): + mod = importlib.import_module(f"ics.structures.{info.name}") + for name, obj in inspect.getmembers(mod, inspect.isclass): + if ( + issubclass(obj, (ctypes.Structure, ctypes.Union)) + and obj.__module__ == mod.__name__ + ): + registry["".join(c for c in name.lower() if c.isalnum())] = obj + return registry + + +def test_generated_struct_sizes_match_header_macros(): + registry = _struct_registry() + mismatches = [] + unmatched = [] + matched = 0 + for macro in (n for n in dir(ics) if n.endswith("_SIZE")): + key = "".join(c for c in macro[:-5].lower() if c.isalnum()) + cls = registry.get(key) + if cls is None: + unmatched.append(macro) + continue + expected = getattr(ics, macro) + actual = ctypes.sizeof(cls) + if actual == expected: + matched += 1 + elif macro not in KNOWN_STALE_MACROS: + mismatches.append(f"{macro}: header says {expected}, ctypes says {actual}") + assert not mismatches, "\n".join(mismatches) + # 3.26.3.9 removed 5 legacy settings structs (SRedSettings, SFireSettings, + # SVCAN3Settings, SECUSettings, SPendantSettings) and their *_SIZE macros + # together, dropping the matched baseline from 77 to 72. That is a clean + # removal, not a mapping regression: both sides disappeared in lockstep. + assert matched >= 72, f"only {matched} macros matched a struct; mapping regressed" + assert len(unmatched) <= EXPECTED_UNMATCHED, f"unmatched grew: {sorted(unmatched)}" + + +if __name__ == "__main__": + pytest.main(args=[__file__, "--verbose", "-s"]) diff --git a/tests/test_structures.py b/tests/test_structures.py new file mode 100644 index 000000000..2d4ca369a --- /dev/null +++ b/tests/test_structures.py @@ -0,0 +1,35 @@ +import ctypes + +import pytest +import ics +from ics.structures.e_device_settings_type import e_device_settings_type +from ics.structures.s_device_settings import s_device_settings +from ics.structures.ics_spy_message_flex_ray import ics_spy_message_flex_ray +from ics.structures.ics_spy_message_vsb import ics_spy_message_vsb + + +def test_device_settings_none_consistent(): + # The module constant, the generated enum, and the struct field must all + # agree on 0xFFFFFFFF on every platform. MSVC used to wrap the module + # constant to -1. + assert ics.DeviceSettingsNone == 0xFFFFFFFF + assert e_device_settings_type.DeviceSettingsNone.value == 0xFFFFFFFF + + +def test_device_setting_type_field_roundtrip(): + settings = s_device_settings() + settings.DeviceSettingType = 0xFFFFFFFF + assert settings.DeviceSettingType == ics.DeviceSettingsNone + + +def test_description_id_is_signed_int16(): + # descIdType is int16_t in icsnVC40.h (EXTERNAL_PROJECT build). + for struct in (ics_spy_message_flex_ray, ics_spy_message_vsb): + instance = struct() + instance.DescriptionID = -1 + assert instance.DescriptionID == -1, struct.__name__ + assert type(instance).DescriptionID.size == 2, struct.__name__ + + +if __name__ == "__main__": + pytest.main(args=[__file__, "--verbose", "-s"]) diff --git a/travis/build-wheels.sh b/travis/build-wheels.sh new file mode 100644 index 000000000..b1a59fe61 --- /dev/null +++ b/travis/build-wheels.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -e -u -x + +function repair_wheel { + wheel="$1" + if ! auditwheel show "$wheel"; then + echo "Skipping non-platform wheel $wheel" + else + auditwheel repair "$wheel" --plat "$PLAT" -w /io/wheelhouse/ + fi +} + + +# Install a system package required by our library +dnf install -y clang clang-tools-extra flex bison + +# Compile wheels +for PYBIN in /opt/python/*/bin; do + "${PYBIN}/pip" install -r /io/dev-requirements.txt + "${PYBIN}/pip" wheel /io/ --no-deps -w wheelhouse/ +done + +# Bundle external shared libraries into the wheels +for whl in wheelhouse/*.whl; do + repair_wheel "$whl" +done + +# Install packages and test +for PYBIN in /opt/python/*/bin/; do + "${PYBIN}/pip" install python_ics --no-index -f /io/wheelhouse + (cd "$HOME"; "${PYBIN}/nosetests" python_ics) +done \ No newline at end of file diff --git a/uv.lock b/uv.lock new file mode 100644 index 000000000..ae0894e87 --- /dev/null +++ b/uv.lock @@ -0,0 +1,155 @@ +version = 1 +revision = 3 +requires-python = ">=3.10" + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + +[[package]] +name = "exceptiongroup" +version = "1.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" }, +] + +[[package]] +name = "iniconfig" +version = "2.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" }, +] + +[[package]] +name = "packaging" +version = "26.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/65/ee/299d360cdc32edc7d2cf530f3accf79c4fca01e96ffc950d8a52213bd8e4/packaging-26.0.tar.gz", hash = "sha256:00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4", size = 143416, upload-time = "2026-01-21T20:50:39.064Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/b9/c538f279a4e237a006a2c98387d081e9eb060d203d8ed34467cc0f0b9b53/packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529", size = 74366, upload-time = "2026-01-21T20:50:37.788Z" }, +] + +[[package]] +name = "pluggy" +version = "1.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, +] + +[[package]] +name = "pygments" +version = "2.19.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", size = 4968631, upload-time = "2025-06-21T13:39:12.283Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c7/21/705964c7812476f378728bdf590ca4b771ec72385c533964653c68e86bdc/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b", size = 1225217, upload-time = "2025-06-21T13:39:07.939Z" }, +] + +[[package]] +name = "pytest" +version = "9.0.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, + { name = "pygments" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d1/db/7ef3487e0fb0049ddb5ce41d3a49c235bf9ad299b6a25d5780a89f19230f/pytest-9.0.2.tar.gz", hash = "sha256:75186651a92bd89611d1d9fc20f0b4345fd827c41ccd5c299a868a05d70edf11", size = 1568901, upload-time = "2025-12-06T21:30:51.014Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3b/ab/b3226f0bd7cdcf710fbede2b3548584366da3b19b5021e74f5bde2a8fa3f/pytest-9.0.2-py3-none-any.whl", hash = "sha256:711ffd45bf766d5264d487b917733b453d917afd2b0ad65223959f59089f875b", size = 374801, upload-time = "2025-12-06T21:30:49.154Z" }, +] + +[[package]] +name = "python-ics" +source = { editable = "." } + +[package.dev-dependencies] +test = [ + { name = "pytest" }, +] + +[package.metadata] + +[package.metadata.requires-dev] +test = [{ name = "pytest", specifier = ">=8.4.2" }] + +[[package]] +name = "tomli" +version = "2.4.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/82/30/31573e9457673ab10aa432461bee537ce6cef177667deca369efb79df071/tomli-2.4.0.tar.gz", hash = "sha256:aa89c3f6c277dd275d8e243ad24f3b5e701491a860d5121f2cdd399fbb31fc9c", size = 17477, upload-time = "2026-01-11T11:22:38.165Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3c/d9/3dc2289e1f3b32eb19b9785b6a006b28ee99acb37d1d47f78d4c10e28bf8/tomli-2.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b5ef256a3fd497d4973c11bf142e9ed78b150d36f5773f1ca6088c230ffc5867", size = 153663, upload-time = "2026-01-11T11:21:45.27Z" }, + { url = "https://files.pythonhosted.org/packages/51/32/ef9f6845e6b9ca392cd3f64f9ec185cc6f09f0a2df3db08cbe8809d1d435/tomli-2.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5572e41282d5268eb09a697c89a7bee84fae66511f87533a6f88bd2f7b652da9", size = 148469, upload-time = "2026-01-11T11:21:46.873Z" }, + { url = "https://files.pythonhosted.org/packages/d6/c2/506e44cce89a8b1b1e047d64bd495c22c9f71f21e05f380f1a950dd9c217/tomli-2.4.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:551e321c6ba03b55676970b47cb1b73f14a0a4dce6a3e1a9458fd6d921d72e95", size = 236039, upload-time = "2026-01-11T11:21:48.503Z" }, + { url = "https://files.pythonhosted.org/packages/b3/40/e1b65986dbc861b7e986e8ec394598187fa8aee85b1650b01dd925ca0be8/tomli-2.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5e3f639a7a8f10069d0e15408c0b96a2a828cfdec6fca05296ebcdcc28ca7c76", size = 243007, upload-time = "2026-01-11T11:21:49.456Z" }, + { url = "https://files.pythonhosted.org/packages/9c/6f/6e39ce66b58a5b7ae572a0f4352ff40c71e8573633deda43f6a379d56b3e/tomli-2.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1b168f2731796b045128c45982d3a4874057626da0e2ef1fdd722848b741361d", size = 240875, upload-time = "2026-01-11T11:21:50.755Z" }, + { url = "https://files.pythonhosted.org/packages/aa/ad/cb089cb190487caa80204d503c7fd0f4d443f90b95cf4ef5cf5aa0f439b0/tomli-2.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:133e93646ec4300d651839d382d63edff11d8978be23da4cc106f5a18b7d0576", size = 246271, upload-time = "2026-01-11T11:21:51.81Z" }, + { url = "https://files.pythonhosted.org/packages/0b/63/69125220e47fd7a3a27fd0de0c6398c89432fec41bc739823bcc66506af6/tomli-2.4.0-cp311-cp311-win32.whl", hash = "sha256:b6c78bdf37764092d369722d9946cb65b8767bfa4110f902a1b2542d8d173c8a", size = 96770, upload-time = "2026-01-11T11:21:52.647Z" }, + { url = "https://files.pythonhosted.org/packages/1e/0d/a22bb6c83f83386b0008425a6cd1fa1c14b5f3dd4bad05e98cf3dbbf4a64/tomli-2.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:d3d1654e11d724760cdb37a3d7691f0be9db5fbdaef59c9f532aabf87006dbaa", size = 107626, upload-time = "2026-01-11T11:21:53.459Z" }, + { url = "https://files.pythonhosted.org/packages/2f/6d/77be674a3485e75cacbf2ddba2b146911477bd887dda9d8c9dfb2f15e871/tomli-2.4.0-cp311-cp311-win_arm64.whl", hash = "sha256:cae9c19ed12d4e8f3ebf46d1a75090e4c0dc16271c5bce1c833ac168f08fb614", size = 94842, upload-time = "2026-01-11T11:21:54.831Z" }, + { url = "https://files.pythonhosted.org/packages/3c/43/7389a1869f2f26dba52404e1ef13b4784b6b37dac93bac53457e3ff24ca3/tomli-2.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:920b1de295e72887bafa3ad9f7a792f811847d57ea6b1215154030cf131f16b1", size = 154894, upload-time = "2026-01-11T11:21:56.07Z" }, + { url = "https://files.pythonhosted.org/packages/e9/05/2f9bf110b5294132b2edf13fe6ca6ae456204f3d749f623307cbb7a946f2/tomli-2.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d6d9a4aee98fac3eab4952ad1d73aee87359452d1c086b5ceb43ed02ddb16b8", size = 149053, upload-time = "2026-01-11T11:21:57.467Z" }, + { url = "https://files.pythonhosted.org/packages/e8/41/1eda3ca1abc6f6154a8db4d714a4d35c4ad90adc0bcf700657291593fbf3/tomli-2.4.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:36b9d05b51e65b254ea6c2585b59d2c4cb91c8a3d91d0ed0f17591a29aaea54a", size = 243481, upload-time = "2026-01-11T11:21:58.661Z" }, + { url = "https://files.pythonhosted.org/packages/d2/6d/02ff5ab6c8868b41e7d4b987ce2b5f6a51d3335a70aa144edd999e055a01/tomli-2.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1c8a885b370751837c029ef9bc014f27d80840e48bac415f3412e6593bbc18c1", size = 251720, upload-time = "2026-01-11T11:22:00.178Z" }, + { url = "https://files.pythonhosted.org/packages/7b/57/0405c59a909c45d5b6f146107c6d997825aa87568b042042f7a9c0afed34/tomli-2.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8768715ffc41f0008abe25d808c20c3d990f42b6e2e58305d5da280ae7d1fa3b", size = 247014, upload-time = "2026-01-11T11:22:01.238Z" }, + { url = "https://files.pythonhosted.org/packages/2c/0e/2e37568edd944b4165735687cbaf2fe3648129e440c26d02223672ee0630/tomli-2.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b438885858efd5be02a9a133caf5812b8776ee0c969fea02c45e8e3f296ba51", size = 251820, upload-time = "2026-01-11T11:22:02.727Z" }, + { url = "https://files.pythonhosted.org/packages/5a/1c/ee3b707fdac82aeeb92d1a113f803cf6d0f37bdca0849cb489553e1f417a/tomli-2.4.0-cp312-cp312-win32.whl", hash = "sha256:0408e3de5ec77cc7f81960c362543cbbd91ef883e3138e81b729fc3eea5b9729", size = 97712, upload-time = "2026-01-11T11:22:03.777Z" }, + { url = "https://files.pythonhosted.org/packages/69/13/c07a9177d0b3bab7913299b9278845fc6eaaca14a02667c6be0b0a2270c8/tomli-2.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:685306e2cc7da35be4ee914fd34ab801a6acacb061b6a7abca922aaf9ad368da", size = 108296, upload-time = "2026-01-11T11:22:04.86Z" }, + { url = "https://files.pythonhosted.org/packages/18/27/e267a60bbeeee343bcc279bb9e8fbed0cbe224bc7b2a3dc2975f22809a09/tomli-2.4.0-cp312-cp312-win_arm64.whl", hash = "sha256:5aa48d7c2356055feef06a43611fc401a07337d5b006be13a30f6c58f869e3c3", size = 94553, upload-time = "2026-01-11T11:22:05.854Z" }, + { url = "https://files.pythonhosted.org/packages/34/91/7f65f9809f2936e1f4ce6268ae1903074563603b2a2bd969ebbda802744f/tomli-2.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:84d081fbc252d1b6a982e1870660e7330fb8f90f676f6e78b052ad4e64714bf0", size = 154915, upload-time = "2026-01-11T11:22:06.703Z" }, + { url = "https://files.pythonhosted.org/packages/20/aa/64dd73a5a849c2e8f216b755599c511badde80e91e9bc2271baa7b2cdbb1/tomli-2.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9a08144fa4cba33db5255f9b74f0b89888622109bd2776148f2597447f92a94e", size = 149038, upload-time = "2026-01-11T11:22:07.56Z" }, + { url = "https://files.pythonhosted.org/packages/9e/8a/6d38870bd3d52c8d1505ce054469a73f73a0fe62c0eaf5dddf61447e32fa/tomli-2.4.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c73add4bb52a206fd0c0723432db123c0c75c280cbd67174dd9d2db228ebb1b4", size = 242245, upload-time = "2026-01-11T11:22:08.344Z" }, + { url = "https://files.pythonhosted.org/packages/59/bb/8002fadefb64ab2669e5b977df3f5e444febea60e717e755b38bb7c41029/tomli-2.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1fb2945cbe303b1419e2706e711b7113da57b7db31ee378d08712d678a34e51e", size = 250335, upload-time = "2026-01-11T11:22:09.951Z" }, + { url = "https://files.pythonhosted.org/packages/a5/3d/4cdb6f791682b2ea916af2de96121b3cb1284d7c203d97d92d6003e91c8d/tomli-2.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bbb1b10aa643d973366dc2cb1ad94f99c1726a02343d43cbc011edbfac579e7c", size = 245962, upload-time = "2026-01-11T11:22:11.27Z" }, + { url = "https://files.pythonhosted.org/packages/f2/4a/5f25789f9a460bd858ba9756ff52d0830d825b458e13f754952dd15fb7bb/tomli-2.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4cbcb367d44a1f0c2be408758b43e1ffb5308abe0ea222897d6bfc8e8281ef2f", size = 250396, upload-time = "2026-01-11T11:22:12.325Z" }, + { url = "https://files.pythonhosted.org/packages/aa/2f/b73a36fea58dfa08e8b3a268750e6853a6aac2a349241a905ebd86f3047a/tomli-2.4.0-cp313-cp313-win32.whl", hash = "sha256:7d49c66a7d5e56ac959cb6fc583aff0651094ec071ba9ad43df785abc2320d86", size = 97530, upload-time = "2026-01-11T11:22:13.865Z" }, + { url = "https://files.pythonhosted.org/packages/3b/af/ca18c134b5d75de7e8dc551c5234eaba2e8e951f6b30139599b53de9c187/tomli-2.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:3cf226acb51d8f1c394c1b310e0e0e61fecdd7adcb78d01e294ac297dd2e7f87", size = 108227, upload-time = "2026-01-11T11:22:15.224Z" }, + { url = "https://files.pythonhosted.org/packages/22/c3/b386b832f209fee8073c8138ec50f27b4460db2fdae9ffe022df89a57f9b/tomli-2.4.0-cp313-cp313-win_arm64.whl", hash = "sha256:d20b797a5c1ad80c516e41bc1fb0443ddb5006e9aaa7bda2d71978346aeb9132", size = 94748, upload-time = "2026-01-11T11:22:16.009Z" }, + { url = "https://files.pythonhosted.org/packages/f3/c4/84047a97eb1004418bc10bdbcfebda209fca6338002eba2dc27cc6d13563/tomli-2.4.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:26ab906a1eb794cd4e103691daa23d95c6919cc2fa9160000ac02370cc9dd3f6", size = 154725, upload-time = "2026-01-11T11:22:17.269Z" }, + { url = "https://files.pythonhosted.org/packages/a8/5d/d39038e646060b9d76274078cddf146ced86dc2b9e8bbf737ad5983609a0/tomli-2.4.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:20cedb4ee43278bc4f2fee6cb50daec836959aadaf948db5172e776dd3d993fc", size = 148901, upload-time = "2026-01-11T11:22:18.287Z" }, + { url = "https://files.pythonhosted.org/packages/73/e5/383be1724cb30f4ce44983d249645684a48c435e1cd4f8b5cded8a816d3c/tomli-2.4.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:39b0b5d1b6dd03684b3fb276407ebed7090bbec989fa55838c98560c01113b66", size = 243375, upload-time = "2026-01-11T11:22:19.154Z" }, + { url = "https://files.pythonhosted.org/packages/31/f0/bea80c17971c8d16d3cc109dc3585b0f2ce1036b5f4a8a183789023574f2/tomli-2.4.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a26d7ff68dfdb9f87a016ecfd1e1c2bacbe3108f4e0f8bcd2228ef9a766c787d", size = 250639, upload-time = "2026-01-11T11:22:20.168Z" }, + { url = "https://files.pythonhosted.org/packages/2c/8f/2853c36abbb7608e3f945d8a74e32ed3a74ee3a1f468f1ffc7d1cb3abba6/tomli-2.4.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:20ffd184fb1df76a66e34bd1b36b4a4641bd2b82954befa32fe8163e79f1a702", size = 246897, upload-time = "2026-01-11T11:22:21.544Z" }, + { url = "https://files.pythonhosted.org/packages/49/f0/6c05e3196ed5337b9fe7ea003e95fd3819a840b7a0f2bf5a408ef1dad8ed/tomli-2.4.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:75c2f8bbddf170e8effc98f5e9084a8751f8174ea6ccf4fca5398436e0320bc8", size = 254697, upload-time = "2026-01-11T11:22:23.058Z" }, + { url = "https://files.pythonhosted.org/packages/f3/f5/2922ef29c9f2951883525def7429967fc4d8208494e5ab524234f06b688b/tomli-2.4.0-cp314-cp314-win32.whl", hash = "sha256:31d556d079d72db7c584c0627ff3a24c5d3fb4f730221d3444f3efb1b2514776", size = 98567, upload-time = "2026-01-11T11:22:24.033Z" }, + { url = "https://files.pythonhosted.org/packages/7b/31/22b52e2e06dd2a5fdbc3ee73226d763b184ff21fc24e20316a44ccc4d96b/tomli-2.4.0-cp314-cp314-win_amd64.whl", hash = "sha256:43e685b9b2341681907759cf3a04e14d7104b3580f808cfde1dfdb60ada85475", size = 108556, upload-time = "2026-01-11T11:22:25.378Z" }, + { url = "https://files.pythonhosted.org/packages/48/3d/5058dff3255a3d01b705413f64f4306a141a8fd7a251e5a495e3f192a998/tomli-2.4.0-cp314-cp314-win_arm64.whl", hash = "sha256:3d895d56bd3f82ddd6faaff993c275efc2ff38e52322ea264122d72729dca2b2", size = 96014, upload-time = "2026-01-11T11:22:26.138Z" }, + { url = "https://files.pythonhosted.org/packages/b8/4e/75dab8586e268424202d3a1997ef6014919c941b50642a1682df43204c22/tomli-2.4.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:5b5807f3999fb66776dbce568cc9a828544244a8eb84b84b9bafc080c99597b9", size = 163339, upload-time = "2026-01-11T11:22:27.143Z" }, + { url = "https://files.pythonhosted.org/packages/06/e3/b904d9ab1016829a776d97f163f183a48be6a4deb87304d1e0116a349519/tomli-2.4.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c084ad935abe686bd9c898e62a02a19abfc9760b5a79bc29644463eaf2840cb0", size = 159490, upload-time = "2026-01-11T11:22:28.399Z" }, + { url = "https://files.pythonhosted.org/packages/e3/5a/fc3622c8b1ad823e8ea98a35e3c632ee316d48f66f80f9708ceb4f2a0322/tomli-2.4.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f2e3955efea4d1cfbcb87bc321e00dc08d2bcb737fd1d5e398af111d86db5df", size = 269398, upload-time = "2026-01-11T11:22:29.345Z" }, + { url = "https://files.pythonhosted.org/packages/fd/33/62bd6152c8bdd4c305ad9faca48f51d3acb2df1f8791b1477d46ff86e7f8/tomli-2.4.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e0fe8a0b8312acf3a88077a0802565cb09ee34107813bba1c7cd591fa6cfc8d", size = 276515, upload-time = "2026-01-11T11:22:30.327Z" }, + { url = "https://files.pythonhosted.org/packages/4b/ff/ae53619499f5235ee4211e62a8d7982ba9e439a0fb4f2f351a93d67c1dd2/tomli-2.4.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:413540dce94673591859c4c6f794dfeaa845e98bf35d72ed59636f869ef9f86f", size = 273806, upload-time = "2026-01-11T11:22:32.56Z" }, + { url = "https://files.pythonhosted.org/packages/47/71/cbca7787fa68d4d0a9f7072821980b39fbb1b6faeb5f5cf02f4a5559fa28/tomli-2.4.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:0dc56fef0e2c1c470aeac5b6ca8cc7b640bb93e92d9803ddaf9ea03e198f5b0b", size = 281340, upload-time = "2026-01-11T11:22:33.505Z" }, + { url = "https://files.pythonhosted.org/packages/f5/00/d595c120963ad42474cf6ee7771ad0d0e8a49d0f01e29576ee9195d9ecdf/tomli-2.4.0-cp314-cp314t-win32.whl", hash = "sha256:d878f2a6707cc9d53a1be1414bbb419e629c3d6e67f69230217bb663e76b5087", size = 108106, upload-time = "2026-01-11T11:22:34.451Z" }, + { url = "https://files.pythonhosted.org/packages/de/69/9aa0c6a505c2f80e519b43764f8b4ba93b5a0bbd2d9a9de6e2b24271b9a5/tomli-2.4.0-cp314-cp314t-win_amd64.whl", hash = "sha256:2add28aacc7425117ff6364fe9e06a183bb0251b03f986df0e78e974047571fd", size = 120504, upload-time = "2026-01-11T11:22:35.764Z" }, + { url = "https://files.pythonhosted.org/packages/b3/9f/f1668c281c58cfae01482f7114a4b88d345e4c140386241a1a24dcc9e7bc/tomli-2.4.0-cp314-cp314t-win_arm64.whl", hash = "sha256:2b1e3b80e1d5e52e40e9b924ec43d81570f0e7d09d11081b797bc4692765a3d4", size = 99561, upload-time = "2026-01-11T11:22:36.624Z" }, + { url = "https://files.pythonhosted.org/packages/23/d1/136eb2cb77520a31e1f64cbae9d33ec6df0d78bdf4160398e86eec8a8754/tomli-2.4.0-py3-none-any.whl", hash = "sha256:1f776e7d669ebceb01dee46484485f43a4048746235e683bcdffacdf1fb4785a", size = 14477, upload-time = "2026-01-11T11:22:37.446Z" }, +] + +[[package]] +name = "typing-extensions" +version = "4.15.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" }, +]