diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 745caa98..808c7fa3 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -11,20 +11,41 @@ jobs: os: [ubuntu-20.04, windows-2019, macOS-13] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 # needed for history/tags # Used to host cibuildwheel - - uses: actions/setup-python@v3 + - 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==2.16.2 + run: python -m pip install cibuildwheel - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse - - uses: actions/upload-artifact@v3 + - 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 \ No newline at end of file + if-no-files-found: error + + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + pattern: python_ics-* + merge-multiple: true + path: ./wheelhouse/ diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..b7a5698f --- /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/build_libicsneo.py b/build_libicsneo.py index 1a8080fb..fd61fc9f 100644 --- a/build_libicsneo.py +++ b/build_libicsneo.py @@ -142,9 +142,9 @@ def build(): def copy(): if sys.platform == "darwin": - shutil.copyfile(f"{LIBICSNEO_BUILD}/libicsneolegacy.dylib", "ics/libicsneolegacy.dylib") + shutil.copyfile(f"{LIBICSNEO_BUILD}/libicsneolegacy.dylib", "gen/ics/libicsneolegacy.dylib") elif sys.platform == "linux": - shutil.copyfile(f"{LIBICSNEO_BUILD}/libicsneolegacy.so", "ics/libicsneolegacy.so") + shutil.copyfile(f"{LIBICSNEO_BUILD}/libicsneolegacy.so", "gen/ics/libicsneolegacy.so") def clean(): diff --git a/create_version.py b/create_version.py new file mode 100644 index 00000000..8f1e685b --- /dev/null +++ b/create_version.py @@ -0,0 +1,41 @@ +import os +import dunamai +import pathlib + + +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) + 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() + full_version = dunamai.Version.from_git().serialize(format="v{base}-{commit}-{timestamp}") + print(f"Creating '{path}' with version {pkg_version} and full version {full_version}...") + # 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""") + + +if __name__ == "__main__": + create_version_py() diff --git a/extract_icsneo40_defines.py b/extract_icsneo40_defines.py index 5163abe1..7c4cc210 100644 --- a/extract_icsneo40_defines.py +++ b/extract_icsneo40_defines.py @@ -133,7 +133,7 @@ def extract(): # 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( diff --git a/gen/ics/__init__.py b/gen/ics/__init__.py new file mode 100644 index 00000000..c8fd30ef --- /dev/null +++ b/gen/ics/__init__.py @@ -0,0 +1,20 @@ +try: + import ics.__version + __version__ = ics.__version.__version__ + __full_version__ = ics.__version.__full_version__ +except Exception as ex: + print(ex) + +try: + # Release environment + #print("Release") + from ics.ics import * + from ics.structures import * + from ics.hiddenimports import hidden_imports +except Exception as ex: + # Build environment + #print("Debug", ex) + from ics import * + from ics.structures import * + from ics.hiddenimports import hidden_imports + diff --git a/gen/ics/__version.py b/gen/ics/__version.py new file mode 100644 index 00000000..cd90ea22 --- /dev/null +++ b/gen/ics/__version.py @@ -0,0 +1,2 @@ +__version__ = "914.14" +__full_version__ = "v914.14-3ac87bb-20240219195124" diff --git a/ics/hiddenimports.py b/gen/ics/hiddenimports.py similarity index 100% rename from ics/hiddenimports.py rename to gen/ics/hiddenimports.py diff --git a/ics/structures/__init__.py b/gen/ics/structures/__init__.py similarity index 100% rename from ics/structures/__init__.py rename to gen/ics/structures/__init__.py diff --git a/ics/structures/a2_b_monitor_settings.py b/gen/ics/structures/a2_b_monitor_settings.py similarity index 100% rename from ics/structures/a2_b_monitor_settings.py rename to gen/ics/structures/a2_b_monitor_settings.py diff --git a/ics/structures/a2_b_node_type.py b/gen/ics/structures/a2_b_node_type.py similarity index 100% rename from ics/structures/a2_b_node_type.py rename to gen/ics/structures/a2_b_node_type.py diff --git a/ics/structures/a2_btdm_mode.py b/gen/ics/structures/a2_btdm_mode.py similarity index 100% rename from ics/structures/a2_btdm_mode.py rename to gen/ics/structures/a2_btdm_mode.py diff --git a/ics/structures/can_settings.py b/gen/ics/structures/can_settings.py similarity index 100% rename from ics/structures/can_settings.py rename to gen/ics/structures/can_settings.py diff --git a/ics/structures/canfd_settings.py b/gen/ics/structures/canfd_settings.py similarity index 100% rename from ics/structures/canfd_settings.py rename to gen/ics/structures/canfd_settings.py diff --git a/ics/structures/canterm_settings.py b/gen/ics/structures/canterm_settings.py similarity index 100% rename from ics/structures/canterm_settings.py rename to gen/ics/structures/canterm_settings.py diff --git a/ics/structures/clock_quality_.py b/gen/ics/structures/clock_quality_.py similarity index 100% rename from ics/structures/clock_quality_.py rename to gen/ics/structures/clock_quality_.py diff --git a/ics/structures/device_feature.py b/gen/ics/structures/device_feature.py similarity index 100% rename from ics/structures/device_feature.py rename to gen/ics/structures/device_feature.py diff --git a/ics/structures/disk_settings.py b/gen/ics/structures/disk_settings.py similarity index 100% rename from ics/structures/disk_settings.py rename to gen/ics/structures/disk_settings.py diff --git a/ics/structures/e_device_settings_type.py b/gen/ics/structures/e_device_settings_type.py similarity index 100% rename from ics/structures/e_device_settings_type.py rename to gen/ics/structures/e_device_settings_type.py diff --git a/ics/structures/e_disk_format.py b/gen/ics/structures/e_disk_format.py similarity index 100% rename from ics/structures/e_disk_format.py rename to gen/ics/structures/e_disk_format.py diff --git a/ics/structures/e_disk_layout.py b/gen/ics/structures/e_disk_layout.py similarity index 100% rename from ics/structures/e_disk_layout.py rename to gen/ics/structures/e_disk_layout.py diff --git a/ics/structures/e_generic_api_options.py b/gen/ics/structures/e_generic_api_options.py similarity index 100% rename from ics/structures/e_generic_api_options.py rename to gen/ics/structures/e_generic_api_options.py diff --git a/ics/structures/e_gptp_port.py b/gen/ics/structures/e_gptp_port.py similarity index 100% rename from ics/structures/e_gptp_port.py rename to gen/ics/structures/e_gptp_port.py diff --git a/ics/structures/e_gptp_role.py b/gen/ics/structures/e_gptp_role.py similarity index 100% rename from ics/structures/e_gptp_role.py rename to gen/ics/structures/e_gptp_role.py diff --git a/ics/structures/e_plasma_ion_vnet_channel_t.py b/gen/ics/structures/e_plasma_ion_vnet_channel_t.py similarity index 100% rename from ics/structures/e_plasma_ion_vnet_channel_t.py rename to gen/ics/structures/e_plasma_ion_vnet_channel_t.py diff --git a/ics/structures/e_uart_port_t.py b/gen/ics/structures/e_uart_port_t.py similarity index 100% rename from ics/structures/e_uart_port_t.py rename to gen/ics/structures/e_uart_port_t.py diff --git a/ics/structures/ethernet10_g_settings.py b/gen/ics/structures/ethernet10_g_settings.py similarity index 100% rename from ics/structures/ethernet10_g_settings.py rename to gen/ics/structures/ethernet10_g_settings.py diff --git a/ics/structures/ethernet10_t1_s_settings.py b/gen/ics/structures/ethernet10_t1_s_settings.py similarity index 100% rename from ics/structures/ethernet10_t1_s_settings.py rename to gen/ics/structures/ethernet10_t1_s_settings.py diff --git a/ics/structures/ethernet_network_status_t.py b/gen/ics/structures/ethernet_network_status_t.py similarity index 100% rename from ics/structures/ethernet_network_status_t.py rename to gen/ics/structures/ethernet_network_status_t.py diff --git a/ics/structures/ethernet_settings.py b/gen/ics/structures/ethernet_settings.py similarity index 100% rename from ics/structures/ethernet_settings.py rename to gen/ics/structures/ethernet_settings.py diff --git a/ics/structures/ethernet_settings2.py b/gen/ics/structures/ethernet_settings2.py similarity index 100% rename from ics/structures/ethernet_settings2.py rename to gen/ics/structures/ethernet_settings2.py diff --git a/ics/structures/ew_bms_instance_t.py b/gen/ics/structures/ew_bms_instance_t.py similarity index 100% rename from ics/structures/ew_bms_instance_t.py rename to gen/ics/structures/ew_bms_instance_t.py diff --git a/ics/structures/ew_bms_manager_lock_state_t.py b/gen/ics/structures/ew_bms_manager_lock_state_t.py similarity index 100% rename from ics/structures/ew_bms_manager_lock_state_t.py rename to gen/ics/structures/ew_bms_manager_lock_state_t.py diff --git a/ics/structures/ew_bms_manager_port_t.py b/gen/ics/structures/ew_bms_manager_port_t.py similarity index 100% rename from ics/structures/ew_bms_manager_port_t.py rename to gen/ics/structures/ew_bms_manager_port_t.py diff --git a/ics/structures/extended_response_code.py b/gen/ics/structures/extended_response_code.py similarity index 100% rename from ics/structures/extended_response_code.py rename to gen/ics/structures/extended_response_code.py diff --git a/ics/structures/extended_response_generic.py b/gen/ics/structures/extended_response_generic.py similarity index 100% rename from ics/structures/extended_response_generic.py rename to gen/ics/structures/extended_response_generic.py diff --git a/ics/structures/fire3_linux_settings.py b/gen/ics/structures/fire3_linux_settings.py similarity index 100% rename from ics/structures/fire3_linux_settings.py rename to gen/ics/structures/fire3_linux_settings.py diff --git a/ics/structures/flex_vnet_mode.py b/gen/ics/structures/flex_vnet_mode.py similarity index 100% rename from ics/structures/flex_vnet_mode.py rename to gen/ics/structures/flex_vnet_mode.py diff --git a/ics/structures/generic_api_data.py b/gen/ics/structures/generic_api_data.py similarity index 100% rename from ics/structures/generic_api_data.py rename to gen/ics/structures/generic_api_data.py diff --git a/ics/structures/generic_api_data_old.py b/gen/ics/structures/generic_api_data_old.py similarity index 100% rename from ics/structures/generic_api_data_old.py rename to gen/ics/structures/generic_api_data_old.py diff --git a/ics/structures/generic_api_selector.py b/gen/ics/structures/generic_api_selector.py similarity index 100% rename from ics/structures/generic_api_selector.py rename to gen/ics/structures/generic_api_selector.py diff --git a/ics/structures/generic_api_status.py b/gen/ics/structures/generic_api_status.py similarity index 100% rename from ics/structures/generic_api_status.py rename to gen/ics/structures/generic_api_status.py diff --git a/ics/structures/generic_binary_status.py b/gen/ics/structures/generic_binary_status.py similarity index 100% rename from ics/structures/generic_binary_status.py rename to gen/ics/structures/generic_binary_status.py diff --git a/ics/structures/get_component_versions.py b/gen/ics/structures/get_component_versions.py similarity index 100% rename from ics/structures/get_component_versions.py rename to gen/ics/structures/get_component_versions.py diff --git a/ics/structures/get_component_versions_response.py b/gen/ics/structures/get_component_versions_response.py similarity index 100% rename from ics/structures/get_component_versions_response.py rename to gen/ics/structures/get_component_versions_response.py diff --git a/ics/structures/get_supported_features_response.py b/gen/ics/structures/get_supported_features_response.py similarity index 100% rename from ics/structures/get_supported_features_response.py rename to gen/ics/structures/get_supported_features_response.py diff --git a/ics/structures/global_settings.py b/gen/ics/structures/global_settings.py similarity index 100% rename from ics/structures/global_settings.py rename to gen/ics/structures/global_settings.py diff --git a/ics/structures/gptp_status.py b/gen/ics/structures/gptp_status.py similarity index 100% rename from ics/structures/gptp_status.py rename to gen/ics/structures/gptp_status.py diff --git a/ics/structures/hw_eth_settings.py b/gen/ics/structures/hw_eth_settings.py similarity index 100% rename from ics/structures/hw_eth_settings.py rename to gen/ics/structures/hw_eth_settings.py diff --git a/ics/structures/ics_device_status.py b/gen/ics/structures/ics_device_status.py similarity index 100% rename from ics/structures/ics_device_status.py rename to gen/ics/structures/ics_device_status.py diff --git a/ics/structures/ics_fire2_device_status.py b/gen/ics/structures/ics_fire2_device_status.py similarity index 100% rename from ics/structures/ics_fire2_device_status.py rename to gen/ics/structures/ics_fire2_device_status.py diff --git a/ics/structures/ics_fire2_vnet_device_status.py b/gen/ics/structures/ics_fire2_vnet_device_status.py similarity index 100% rename from ics/structures/ics_fire2_vnet_device_status.py rename to gen/ics/structures/ics_fire2_vnet_device_status.py diff --git a/ics/structures/ics_fire3_device_status.py b/gen/ics/structures/ics_fire3_device_status.py similarity index 100% rename from ics/structures/ics_fire3_device_status.py rename to gen/ics/structures/ics_fire3_device_status.py diff --git a/ics/structures/ics_flex_vnetz_device_status.py b/gen/ics/structures/ics_flex_vnetz_device_status.py similarity index 100% rename from ics/structures/ics_flex_vnetz_device_status.py rename to gen/ics/structures/ics_flex_vnetz_device_status.py diff --git a/ics/structures/ics_obd2_pro_device_status.py b/gen/ics/structures/ics_obd2_pro_device_status.py similarity index 100% rename from ics/structures/ics_obd2_pro_device_status.py rename to gen/ics/structures/ics_obd2_pro_device_status.py diff --git a/ics/structures/ics_rad_bms_device_status.py b/gen/ics/structures/ics_rad_bms_device_status.py similarity index 100% rename from ics/structures/ics_rad_bms_device_status.py rename to gen/ics/structures/ics_rad_bms_device_status.py diff --git a/ics/structures/ics_rad_epsilon_device_status.py b/gen/ics/structures/ics_rad_epsilon_device_status.py similarity index 100% rename from ics/structures/ics_rad_epsilon_device_status.py rename to gen/ics/structures/ics_rad_epsilon_device_status.py diff --git a/ics/structures/ics_rad_jupiter_device_status.py b/gen/ics/structures/ics_rad_jupiter_device_status.py similarity index 100% rename from ics/structures/ics_rad_jupiter_device_status.py rename to gen/ics/structures/ics_rad_jupiter_device_status.py diff --git a/ics/structures/ics_rad_moon_duo_device_status.py b/gen/ics/structures/ics_rad_moon_duo_device_status.py similarity index 100% rename from ics/structures/ics_rad_moon_duo_device_status.py rename to gen/ics/structures/ics_rad_moon_duo_device_status.py diff --git a/ics/structures/ics_rad_pluto_device_status.py b/gen/ics/structures/ics_rad_pluto_device_status.py similarity index 100% rename from ics/structures/ics_rad_pluto_device_status.py rename to gen/ics/structures/ics_rad_pluto_device_status.py diff --git a/ics/structures/ics_spy_message_flex_ray.py b/gen/ics/structures/ics_spy_message_flex_ray.py similarity index 100% rename from ics/structures/ics_spy_message_flex_ray.py rename to gen/ics/structures/ics_spy_message_flex_ray.py diff --git a/ics/structures/ics_spy_message_long.py b/gen/ics/structures/ics_spy_message_long.py similarity index 100% rename from ics/structures/ics_spy_message_long.py rename to gen/ics/structures/ics_spy_message_long.py diff --git a/ics/structures/ics_spy_message_mdio.py b/gen/ics/structures/ics_spy_message_mdio.py similarity index 100% rename from ics/structures/ics_spy_message_mdio.py rename to gen/ics/structures/ics_spy_message_mdio.py diff --git a/ics/structures/ics_spy_message_vsb.py b/gen/ics/structures/ics_spy_message_vsb.py similarity index 100% rename from ics/structures/ics_spy_message_vsb.py rename to gen/ics/structures/ics_spy_message_vsb.py diff --git a/ics/structures/ics_spy_messagew_bms.py b/gen/ics/structures/ics_spy_messagew_bms.py similarity index 100% rename from ics/structures/ics_spy_messagew_bms.py rename to gen/ics/structures/ics_spy_messagew_bms.py diff --git a/ics/structures/ics_vcan4_device_status.py b/gen/ics/structures/ics_vcan4_device_status.py similarity index 100% rename from ics/structures/ics_vcan4_device_status.py rename to gen/ics/structures/ics_vcan4_device_status.py diff --git a/ics/structures/ics_vcan4_industrial_device_status.py b/gen/ics/structures/ics_vcan4_industrial_device_status.py similarity index 100% rename from ics/structures/ics_vcan4_industrial_device_status.py rename to gen/ics/structures/ics_vcan4_industrial_device_status.py diff --git a/ics/structures/iso15765_2015_tx_message.py b/gen/ics/structures/iso15765_2015_tx_message.py similarity index 100% rename from ics/structures/iso15765_2015_tx_message.py rename to gen/ics/structures/iso15765_2015_tx_message.py diff --git a/ics/structures/iso9141_keyword2000_init_step.py b/gen/ics/structures/iso9141_keyword2000_init_step.py similarity index 100% rename from ics/structures/iso9141_keyword2000_init_step.py rename to gen/ics/structures/iso9141_keyword2000_init_step.py diff --git a/ics/structures/iso9141_keyword2000_settings.py b/gen/ics/structures/iso9141_keyword2000_settings.py similarity index 100% rename from ics/structures/iso9141_keyword2000_settings.py rename to gen/ics/structures/iso9141_keyword2000_settings.py diff --git a/ics/structures/j1708_settings.py b/gen/ics/structures/j1708_settings.py similarity index 100% rename from ics/structures/j1708_settings.py rename to gen/ics/structures/j1708_settings.py diff --git a/ics/structures/lin_settings.py b/gen/ics/structures/lin_settings.py similarity index 100% rename from ics/structures/lin_settings.py rename to gen/ics/structures/lin_settings.py diff --git a/ics/structures/logger_settings.py b/gen/ics/structures/logger_settings.py similarity index 100% rename from ics/structures/logger_settings.py rename to gen/ics/structures/logger_settings.py diff --git a/ics/structures/mac_sec_flags.py b/gen/ics/structures/mac_sec_flags.py similarity index 100% rename from ics/structures/mac_sec_flags.py rename to gen/ics/structures/mac_sec_flags.py diff --git a/ics/structures/mac_sec_map.py b/gen/ics/structures/mac_sec_map.py similarity index 100% rename from ics/structures/mac_sec_map.py rename to gen/ics/structures/mac_sec_map.py diff --git a/ics/structures/mac_sec_rule.py b/gen/ics/structures/mac_sec_rule.py similarity index 100% rename from ics/structures/mac_sec_rule.py rename to gen/ics/structures/mac_sec_rule.py diff --git a/ics/structures/mac_sec_sa.py b/gen/ics/structures/mac_sec_sa.py similarity index 100% rename from ics/structures/mac_sec_sa.py rename to gen/ics/structures/mac_sec_sa.py diff --git a/ics/structures/mac_sec_sc.py b/gen/ics/structures/mac_sec_sc.py similarity index 100% rename from ics/structures/mac_sec_sc.py rename to gen/ics/structures/mac_sec_sc.py diff --git a/ics/structures/mac_sec_sec_y.py b/gen/ics/structures/mac_sec_sec_y.py similarity index 100% rename from ics/structures/mac_sec_sec_y.py rename to gen/ics/structures/mac_sec_sec_y.py diff --git a/ics/structures/macsec_cipher_suite.py b/gen/ics/structures/macsec_cipher_suite.py similarity index 100% rename from ics/structures/macsec_cipher_suite.py rename to gen/ics/structures/macsec_cipher_suite.py diff --git a/ics/structures/macsec_config.py b/gen/ics/structures/macsec_config.py similarity index 100% rename from ics/structures/macsec_config.py rename to gen/ics/structures/macsec_config.py diff --git a/ics/structures/macsec_mpls_outer.py b/gen/ics/structures/macsec_mpls_outer.py similarity index 100% rename from ics/structures/macsec_mpls_outer.py rename to gen/ics/structures/macsec_mpls_outer.py diff --git a/ics/structures/macsec_packet_type.py b/gen/ics/structures/macsec_packet_type.py similarity index 100% rename from ics/structures/macsec_packet_type.py rename to gen/ics/structures/macsec_packet_type.py diff --git a/ics/structures/macsec_settings.py b/gen/ics/structures/macsec_settings.py similarity index 100% rename from ics/structures/macsec_settings.py rename to gen/ics/structures/macsec_settings.py diff --git a/ics/structures/macsec_strip_sectag_icv.py b/gen/ics/structures/macsec_strip_sectag_icv.py similarity index 100% rename from ics/structures/macsec_strip_sectag_icv.py rename to gen/ics/structures/macsec_strip_sectag_icv.py diff --git a/ics/structures/macsec_validateframe.py b/gen/ics/structures/macsec_validateframe.py similarity index 100% rename from ics/structures/macsec_validateframe.py rename to gen/ics/structures/macsec_validateframe.py diff --git a/ics/structures/macsec_vlantag.py b/gen/ics/structures/macsec_vlantag.py similarity index 100% rename from ics/structures/macsec_vlantag.py rename to gen/ics/structures/macsec_vlantag.py diff --git a/ics/structures/op_eth_general_settings.py b/gen/ics/structures/op_eth_general_settings.py similarity index 100% rename from ics/structures/op_eth_general_settings.py rename to gen/ics/structures/op_eth_general_settings.py diff --git a/ics/structures/op_eth_link_mode.py b/gen/ics/structures/op_eth_link_mode.py similarity index 100% rename from ics/structures/op_eth_link_mode.py rename to gen/ics/structures/op_eth_link_mode.py diff --git a/ics/structures/op_eth_settings.py b/gen/ics/structures/op_eth_settings.py similarity index 100% rename from ics/structures/op_eth_settings.py rename to gen/ics/structures/op_eth_settings.py diff --git a/ics/structures/phy_error_type.py b/gen/ics/structures/phy_error_type.py similarity index 100% rename from ics/structures/phy_error_type.py rename to gen/ics/structures/phy_error_type.py diff --git a/ics/structures/port_identity.py b/gen/ics/structures/port_identity.py similarity index 100% rename from ics/structures/port_identity.py rename to gen/ics/structures/port_identity.py diff --git a/ics/structures/priority_vector.py b/gen/ics/structures/priority_vector.py similarity index 100% rename from ics/structures/priority_vector.py rename to gen/ics/structures/priority_vector.py diff --git a/ics/structures/rad_moon_duo_converter_settings.py b/gen/ics/structures/rad_moon_duo_converter_settings.py similarity index 100% rename from ics/structures/rad_moon_duo_converter_settings.py rename to gen/ics/structures/rad_moon_duo_converter_settings.py diff --git a/ics/structures/rad_reporting_settings.py b/gen/ics/structures/rad_reporting_settings.py similarity index 100% rename from ics/structures/rad_reporting_settings.py rename to gen/ics/structures/rad_reporting_settings.py diff --git a/ics/structures/s_cm_probe_settings.py b/gen/ics/structures/s_cm_probe_settings.py similarity index 100% rename from ics/structures/s_cm_probe_settings.py rename to gen/ics/structures/s_cm_probe_settings.py diff --git a/ics/structures/s_cyan_settings.py b/gen/ics/structures/s_cyan_settings.py similarity index 100% rename from ics/structures/s_cyan_settings.py rename to gen/ics/structures/s_cyan_settings.py diff --git a/ics/structures/s_device_settings.py b/gen/ics/structures/s_device_settings.py similarity index 100% rename from ics/structures/s_device_settings.py rename to gen/ics/structures/s_device_settings.py diff --git a/ics/structures/s_disk_details.py b/gen/ics/structures/s_disk_details.py similarity index 100% rename from ics/structures/s_disk_details.py rename to gen/ics/structures/s_disk_details.py diff --git a/ics/structures/s_disk_format_progress.py b/gen/ics/structures/s_disk_format_progress.py similarity index 100% rename from ics/structures/s_disk_format_progress.py rename to gen/ics/structures/s_disk_format_progress.py diff --git a/ics/structures/s_disk_status.py b/gen/ics/structures/s_disk_status.py similarity index 100% rename from ics/structures/s_disk_status.py rename to gen/ics/structures/s_disk_status.py diff --git a/ics/structures/s_disk_structure.py b/gen/ics/structures/s_disk_structure.py similarity index 100% rename from ics/structures/s_disk_structure.py rename to gen/ics/structures/s_disk_structure.py diff --git a/ics/structures/s_ether_badge_settings.py b/gen/ics/structures/s_ether_badge_settings.py similarity index 100% rename from ics/structures/s_ether_badge_settings.py rename to gen/ics/structures/s_ether_badge_settings.py diff --git a/ics/structures/s_ext_sub_cmd_hdr.py b/gen/ics/structures/s_ext_sub_cmd_hdr.py similarity index 100% rename from ics/structures/s_ext_sub_cmd_hdr.py rename to gen/ics/structures/s_ext_sub_cmd_hdr.py diff --git a/ics/structures/s_extended_data_flash_header.py b/gen/ics/structures/s_extended_data_flash_header.py similarity index 100% rename from ics/structures/s_extended_data_flash_header.py rename to gen/ics/structures/s_extended_data_flash_header.py diff --git a/ics/structures/s_fire3_flexray_settings.py b/gen/ics/structures/s_fire3_flexray_settings.py similarity index 100% rename from ics/structures/s_fire3_flexray_settings.py rename to gen/ics/structures/s_fire3_flexray_settings.py diff --git a/ics/structures/s_fire3_settings.py b/gen/ics/structures/s_fire3_settings.py similarity index 100% rename from ics/structures/s_fire3_settings.py rename to gen/ics/structures/s_fire3_settings.py diff --git a/ics/structures/s_fire_settings.py b/gen/ics/structures/s_fire_settings.py similarity index 100% rename from ics/structures/s_fire_settings.py rename to gen/ics/structures/s_fire_settings.py diff --git a/ics/structures/s_fire_vnet_settings.py b/gen/ics/structures/s_fire_vnet_settings.py similarity index 100% rename from ics/structures/s_fire_vnet_settings.py rename to gen/ics/structures/s_fire_vnet_settings.py diff --git a/ics/structures/s_flex_vnetz_settings.py b/gen/ics/structures/s_flex_vnetz_settings.py similarity index 100% rename from ics/structures/s_flex_vnetz_settings.py rename to gen/ics/structures/s_flex_vnetz_settings.py diff --git a/ics/structures/s_jupiter_ptp_params_s.py b/gen/ics/structures/s_jupiter_ptp_params_s.py similarity index 100% rename from ics/structures/s_jupiter_ptp_params_s.py rename to gen/ics/structures/s_jupiter_ptp_params_s.py diff --git a/ics/structures/s_neo_ecu12_settings.py b/gen/ics/structures/s_neo_ecu12_settings.py similarity index 100% rename from ics/structures/s_neo_ecu12_settings.py rename to gen/ics/structures/s_neo_ecu12_settings.py diff --git a/ics/structures/s_neo_most_gateway_settings.py b/gen/ics/structures/s_neo_most_gateway_settings.py similarity index 100% rename from ics/structures/s_neo_most_gateway_settings.py rename to gen/ics/structures/s_neo_most_gateway_settings.py diff --git a/ics/structures/s_pendant_settings.py b/gen/ics/structures/s_pendant_settings.py similarity index 100% rename from ics/structures/s_pendant_settings.py rename to gen/ics/structures/s_pendant_settings.py diff --git a/ics/structures/s_phy_reg_pkt.py b/gen/ics/structures/s_phy_reg_pkt.py similarity index 100% rename from ics/structures/s_phy_reg_pkt.py rename to gen/ics/structures/s_phy_reg_pkt.py diff --git a/ics/structures/s_phy_reg_pkt_clause22_mess.py b/gen/ics/structures/s_phy_reg_pkt_clause22_mess.py similarity index 100% rename from ics/structures/s_phy_reg_pkt_clause22_mess.py rename to gen/ics/structures/s_phy_reg_pkt_clause22_mess.py diff --git a/ics/structures/s_phy_reg_pkt_clause45_mess.py b/gen/ics/structures/s_phy_reg_pkt_clause45_mess.py similarity index 100% rename from ics/structures/s_phy_reg_pkt_clause45_mess.py rename to gen/ics/structures/s_phy_reg_pkt_clause45_mess.py diff --git a/ics/structures/s_phy_reg_pkt_hdr.py b/gen/ics/structures/s_phy_reg_pkt_hdr.py similarity index 100% rename from ics/structures/s_phy_reg_pkt_hdr.py rename to gen/ics/structures/s_phy_reg_pkt_hdr.py diff --git a/ics/structures/s_phy_reg_pkt_rw.py b/gen/ics/structures/s_phy_reg_pkt_rw.py similarity index 100% rename from ics/structures/s_phy_reg_pkt_rw.py rename to gen/ics/structures/s_phy_reg_pkt_rw.py diff --git a/ics/structures/s_phy_reg_pkt_status.py b/gen/ics/structures/s_phy_reg_pkt_status.py similarity index 100% rename from ics/structures/s_phy_reg_pkt_status.py rename to gen/ics/structures/s_phy_reg_pkt_status.py diff --git a/ics/structures/s_pluto_avb_params_s.py b/gen/ics/structures/s_pluto_avb_params_s.py similarity index 100% rename from ics/structures/s_pluto_avb_params_s.py rename to gen/ics/structures/s_pluto_avb_params_s.py diff --git a/ics/structures/s_pluto_clock_sync_params_s.py b/gen/ics/structures/s_pluto_clock_sync_params_s.py similarity index 100% rename from ics/structures/s_pluto_clock_sync_params_s.py rename to gen/ics/structures/s_pluto_clock_sync_params_s.py diff --git a/ics/structures/s_pluto_custom_params_s.py b/gen/ics/structures/s_pluto_custom_params_s.py similarity index 100% rename from ics/structures/s_pluto_custom_params_s.py rename to gen/ics/structures/s_pluto_custom_params_s.py diff --git a/ics/structures/s_pluto_general_params_s.py b/gen/ics/structures/s_pluto_general_params_s.py similarity index 100% rename from ics/structures/s_pluto_general_params_s.py rename to gen/ics/structures/s_pluto_general_params_s.py diff --git a/ics/structures/s_pluto_l2_address_lookup_entry_s.py b/gen/ics/structures/s_pluto_l2_address_lookup_entry_s.py similarity index 100% rename from ics/structures/s_pluto_l2_address_lookup_entry_s.py rename to gen/ics/structures/s_pluto_l2_address_lookup_entry_s.py diff --git a/ics/structures/s_pluto_l2_address_lookup_params_s.py b/gen/ics/structures/s_pluto_l2_address_lookup_params_s.py similarity index 100% rename from ics/structures/s_pluto_l2_address_lookup_params_s.py rename to gen/ics/structures/s_pluto_l2_address_lookup_params_s.py diff --git a/ics/structures/s_pluto_l2_forwarding_entry_s.py b/gen/ics/structures/s_pluto_l2_forwarding_entry_s.py similarity index 100% rename from ics/structures/s_pluto_l2_forwarding_entry_s.py rename to gen/ics/structures/s_pluto_l2_forwarding_entry_s.py diff --git a/ics/structures/s_pluto_l2_forwarding_params_s.py b/gen/ics/structures/s_pluto_l2_forwarding_params_s.py similarity index 100% rename from ics/structures/s_pluto_l2_forwarding_params_s.py rename to gen/ics/structures/s_pluto_l2_forwarding_params_s.py diff --git a/ics/structures/s_pluto_l2_policing_s.py b/gen/ics/structures/s_pluto_l2_policing_s.py similarity index 100% rename from ics/structures/s_pluto_l2_policing_s.py rename to gen/ics/structures/s_pluto_l2_policing_s.py diff --git a/ics/structures/s_pluto_mac_config_s.py b/gen/ics/structures/s_pluto_mac_config_s.py similarity index 100% rename from ics/structures/s_pluto_mac_config_s.py rename to gen/ics/structures/s_pluto_mac_config_s.py diff --git a/ics/structures/s_pluto_ptp_params_s.py b/gen/ics/structures/s_pluto_ptp_params_s.py similarity index 100% rename from ics/structures/s_pluto_ptp_params_s.py rename to gen/ics/structures/s_pluto_ptp_params_s.py diff --git a/ics/structures/s_pluto_retagging_entry_s.py b/gen/ics/structures/s_pluto_retagging_entry_s.py similarity index 100% rename from ics/structures/s_pluto_retagging_entry_s.py rename to gen/ics/structures/s_pluto_retagging_entry_s.py diff --git a/ics/structures/s_pluto_switch_settings_s.py b/gen/ics/structures/s_pluto_switch_settings_s.py similarity index 100% rename from ics/structures/s_pluto_switch_settings_s.py rename to gen/ics/structures/s_pluto_switch_settings_s.py diff --git a/ics/structures/s_pluto_vl_forwarding_entry_s.py b/gen/ics/structures/s_pluto_vl_forwarding_entry_s.py similarity index 100% rename from ics/structures/s_pluto_vl_forwarding_entry_s.py rename to gen/ics/structures/s_pluto_vl_forwarding_entry_s.py diff --git a/ics/structures/s_pluto_vl_forwarding_params_s.py b/gen/ics/structures/s_pluto_vl_forwarding_params_s.py similarity index 100% rename from ics/structures/s_pluto_vl_forwarding_params_s.py rename to gen/ics/structures/s_pluto_vl_forwarding_params_s.py diff --git a/ics/structures/s_pluto_vl_lookup_entry_s.py b/gen/ics/structures/s_pluto_vl_lookup_entry_s.py similarity index 100% rename from ics/structures/s_pluto_vl_lookup_entry_s.py rename to gen/ics/structures/s_pluto_vl_lookup_entry_s.py diff --git a/ics/structures/s_pluto_vl_policing_entry_s.py b/gen/ics/structures/s_pluto_vl_policing_entry_s.py similarity index 100% rename from ics/structures/s_pluto_vl_policing_entry_s.py rename to gen/ics/structures/s_pluto_vl_policing_entry_s.py diff --git a/ics/structures/s_pluto_vlan_lookup_s.py b/gen/ics/structures/s_pluto_vlan_lookup_s.py similarity index 100% rename from ics/structures/s_pluto_vlan_lookup_s.py rename to gen/ics/structures/s_pluto_vlan_lookup_s.py diff --git a/ics/structures/s_rad_moon_duo_settings.py b/gen/ics/structures/s_rad_moon_duo_settings.py similarity index 100% rename from ics/structures/s_rad_moon_duo_settings.py rename to gen/ics/structures/s_rad_moon_duo_settings.py diff --git a/ics/structures/s_red2_settings.py b/gen/ics/structures/s_red2_settings.py similarity index 100% rename from ics/structures/s_red2_settings.py rename to gen/ics/structures/s_red2_settings.py diff --git a/ics/structures/s_red_settings.py b/gen/ics/structures/s_red_settings.py similarity index 100% rename from ics/structures/s_red_settings.py rename to gen/ics/structures/s_red_settings.py diff --git a/ics/structures/s_spi_port_setting.py b/gen/ics/structures/s_spi_port_setting.py similarity index 100% rename from ics/structures/s_spi_port_setting.py rename to gen/ics/structures/s_spi_port_setting.py diff --git a/ics/structures/s_spi_port_settings.py b/gen/ics/structures/s_spi_port_settings.py similarity index 100% rename from ics/structures/s_spi_port_settings.py rename to gen/ics/structures/s_spi_port_settings.py diff --git a/ics/structures/s_text_api_settings.py b/gen/ics/structures/s_text_api_settings.py similarity index 100% rename from ics/structures/s_text_api_settings.py rename to gen/ics/structures/s_text_api_settings.py diff --git a/ics/structures/s_vivid_can_settings.py b/gen/ics/structures/s_vivid_can_settings.py similarity index 100% rename from ics/structures/s_vivid_can_settings.py rename to gen/ics/structures/s_vivid_can_settings.py diff --git a/ics/structures/s_wil_bridge_config.py b/gen/ics/structures/s_wil_bridge_config.py similarity index 100% rename from ics/structures/s_wil_bridge_config.py rename to gen/ics/structures/s_wil_bridge_config.py diff --git a/ics/structures/s_wil_connection_settings.py b/gen/ics/structures/s_wil_connection_settings.py similarity index 100% rename from ics/structures/s_wil_connection_settings.py rename to gen/ics/structures/s_wil_connection_settings.py diff --git a/ics/structures/s_wil_fault_servicing_settings.py b/gen/ics/structures/s_wil_fault_servicing_settings.py similarity index 100% rename from ics/structures/s_wil_fault_servicing_settings.py rename to gen/ics/structures/s_wil_fault_servicing_settings.py diff --git a/ics/structures/s_wil_network_data_capture_settings.py b/gen/ics/structures/s_wil_network_data_capture_settings.py similarity index 100% rename from ics/structures/s_wil_network_data_capture_settings.py rename to gen/ics/structures/s_wil_network_data_capture_settings.py diff --git a/ics/structures/scan_hub_settings.py b/gen/ics/structures/scan_hub_settings.py similarity index 100% rename from ics/structures/scan_hub_settings.py rename to gen/ics/structures/scan_hub_settings.py diff --git a/ics/structures/scan_sleep_id.py b/gen/ics/structures/scan_sleep_id.py similarity index 100% rename from ics/structures/scan_sleep_id.py rename to gen/ics/structures/scan_sleep_id.py diff --git a/ics/structures/secu_avb_settings.py b/gen/ics/structures/secu_avb_settings.py similarity index 100% rename from ics/structures/secu_avb_settings.py rename to gen/ics/structures/secu_avb_settings.py diff --git a/ics/structures/secu_settings.py b/gen/ics/structures/secu_settings.py similarity index 100% rename from ics/structures/secu_settings.py rename to gen/ics/structures/secu_settings.py diff --git a/ics/structures/seevb_settings.py b/gen/ics/structures/seevb_settings.py similarity index 100% rename from ics/structures/seevb_settings.py rename to gen/ics/structures/seevb_settings.py diff --git a/ics/structures/serdescam_settings.py b/gen/ics/structures/serdescam_settings.py similarity index 100% rename from ics/structures/serdescam_settings.py rename to gen/ics/structures/serdescam_settings.py diff --git a/ics/structures/serdesgen_settings.py b/gen/ics/structures/serdesgen_settings.py similarity index 100% rename from ics/structures/serdesgen_settings.py rename to gen/ics/structures/serdesgen_settings.py diff --git a/ics/structures/serdespoc_settings.py b/gen/ics/structures/serdespoc_settings.py similarity index 100% rename from ics/structures/serdespoc_settings.py rename to gen/ics/structures/serdespoc_settings.py diff --git a/ics/structures/sfp_id.py b/gen/ics/structures/sfp_id.py similarity index 100% rename from ics/structures/sfp_id.py rename to gen/ics/structures/sfp_id.py diff --git a/ics/structures/sievb_settings.py b/gen/ics/structures/sievb_settings.py similarity index 100% rename from ics/structures/sievb_settings.py rename to gen/ics/structures/sievb_settings.py diff --git a/ics/structures/sobd2_lc_settings.py b/gen/ics/structures/sobd2_lc_settings.py similarity index 100% rename from ics/structures/sobd2_lc_settings.py rename to gen/ics/structures/sobd2_lc_settings.py diff --git a/ics/structures/sobd2_pro_settings.py b/gen/ics/structures/sobd2_pro_settings.py similarity index 100% rename from ics/structures/sobd2_pro_settings.py rename to gen/ics/structures/sobd2_pro_settings.py diff --git a/ics/structures/sobd2_sim_settings.py b/gen/ics/structures/sobd2_sim_settings.py similarity index 100% rename from ics/structures/sobd2_sim_settings.py rename to gen/ics/structures/sobd2_sim_settings.py diff --git a/ics/structures/software_update_command.py b/gen/ics/structures/software_update_command.py similarity index 100% rename from ics/structures/software_update_command.py rename to gen/ics/structures/software_update_command.py diff --git a/ics/structures/spy_filter_long.py b/gen/ics/structures/spy_filter_long.py similarity index 100% rename from ics/structures/spy_filter_long.py rename to gen/ics/structures/spy_filter_long.py diff --git a/ics/structures/srad_comet_settings.py b/gen/ics/structures/srad_comet_settings.py similarity index 100% rename from ics/structures/srad_comet_settings.py rename to gen/ics/structures/srad_comet_settings.py diff --git a/ics/structures/srad_epsilon_settings.py b/gen/ics/structures/srad_epsilon_settings.py similarity index 100% rename from ics/structures/srad_epsilon_settings.py rename to gen/ics/structures/srad_epsilon_settings.py diff --git a/ics/structures/srad_epsilon_switch_settings.py b/gen/ics/structures/srad_epsilon_switch_settings.py similarity index 100% rename from ics/structures/srad_epsilon_switch_settings.py rename to gen/ics/structures/srad_epsilon_switch_settings.py diff --git a/ics/structures/srad_galaxy_settings.py b/gen/ics/structures/srad_galaxy_settings.py similarity index 100% rename from ics/structures/srad_galaxy_settings.py rename to gen/ics/structures/srad_galaxy_settings.py diff --git a/ics/structures/srad_gigalog_settings.py b/gen/ics/structures/srad_gigalog_settings.py similarity index 100% rename from ics/structures/srad_gigalog_settings.py rename to gen/ics/structures/srad_gigalog_settings.py diff --git a/ics/structures/srad_gigastar_settings.py b/gen/ics/structures/srad_gigastar_settings.py similarity index 100% rename from ics/structures/srad_gigastar_settings.py rename to gen/ics/structures/srad_gigastar_settings.py diff --git a/ics/structures/srad_gptp_and_tap_settings_s.py b/gen/ics/structures/srad_gptp_and_tap_settings_s.py similarity index 100% rename from ics/structures/srad_gptp_and_tap_settings_s.py rename to gen/ics/structures/srad_gptp_and_tap_settings_s.py diff --git a/ics/structures/srad_gptp_settings_s.py b/gen/ics/structures/srad_gptp_settings_s.py similarity index 100% rename from ics/structures/srad_gptp_settings_s.py rename to gen/ics/structures/srad_gptp_settings_s.py diff --git a/ics/structures/srad_jupiter_settings.py b/gen/ics/structures/srad_jupiter_settings.py similarity index 100% rename from ics/structures/srad_jupiter_settings.py rename to gen/ics/structures/srad_jupiter_settings.py diff --git a/ics/structures/srad_jupiter_switch_settings.py b/gen/ics/structures/srad_jupiter_switch_settings.py similarity index 100% rename from ics/structures/srad_jupiter_switch_settings.py rename to gen/ics/structures/srad_jupiter_switch_settings.py diff --git a/ics/structures/srad_moon2_settings.py b/gen/ics/structures/srad_moon2_settings.py similarity index 100% rename from ics/structures/srad_moon2_settings.py rename to gen/ics/structures/srad_moon2_settings.py diff --git a/ics/structures/srad_moon3_settings.py b/gen/ics/structures/srad_moon3_settings.py similarity index 100% rename from ics/structures/srad_moon3_settings.py rename to gen/ics/structures/srad_moon3_settings.py diff --git a/ics/structures/srad_pluto_settings.py b/gen/ics/structures/srad_pluto_settings.py similarity index 100% rename from ics/structures/srad_pluto_settings.py rename to gen/ics/structures/srad_pluto_settings.py diff --git a/ics/structures/srad_star2_settings.py b/gen/ics/structures/srad_star2_settings.py similarity index 100% rename from ics/structures/srad_star2_settings.py rename to gen/ics/structures/srad_star2_settings.py diff --git a/ics/structures/srad_super_moon_settings.py b/gen/ics/structures/srad_super_moon_settings.py similarity index 100% rename from ics/structures/srad_super_moon_settings.py rename to gen/ics/structures/srad_super_moon_settings.py diff --git a/ics/structures/srada2_b_settings.py b/gen/ics/structures/srada2_b_settings.py similarity index 100% rename from ics/structures/srada2_b_settings.py rename to gen/ics/structures/srada2_b_settings.py diff --git a/ics/structures/sradbms_settings.py b/gen/ics/structures/sradbms_settings.py similarity index 100% rename from ics/structures/sradbms_settings.py rename to gen/ics/structures/sradbms_settings.py diff --git a/ics/structures/st_api_firmware_info.py b/gen/ics/structures/st_api_firmware_info.py similarity index 100% rename from ics/structures/st_api_firmware_info.py rename to gen/ics/structures/st_api_firmware_info.py diff --git a/ics/structures/st_chip_versions.py b/gen/ics/structures/st_chip_versions.py similarity index 100% rename from ics/structures/st_chip_versions.py rename to gen/ics/structures/st_chip_versions.py diff --git a/ics/structures/st_cm_iso157652_rx_message.py b/gen/ics/structures/st_cm_iso157652_rx_message.py similarity index 100% rename from ics/structures/st_cm_iso157652_rx_message.py rename to gen/ics/structures/st_cm_iso157652_rx_message.py diff --git a/ics/structures/st_cm_iso157652_tx_message.py b/gen/ics/structures/st_cm_iso157652_tx_message.py similarity index 100% rename from ics/structures/st_cm_iso157652_tx_message.py rename to gen/ics/structures/st_cm_iso157652_tx_message.py diff --git a/ics/structures/start_dhcp_server_command.py b/gen/ics/structures/start_dhcp_server_command.py similarity index 100% rename from ics/structures/start_dhcp_server_command.py rename to gen/ics/structures/start_dhcp_server_command.py diff --git a/ics/structures/stop_dhcp_server_command.py b/gen/ics/structures/stop_dhcp_server_command.py similarity index 100% rename from ics/structures/stop_dhcp_server_command.py rename to gen/ics/structures/stop_dhcp_server_command.py diff --git a/ics/structures/svcan3_settings.py b/gen/ics/structures/svcan3_settings.py similarity index 100% rename from ics/structures/svcan3_settings.py rename to gen/ics/structures/svcan3_settings.py diff --git a/ics/structures/svcan412_settings.py b/gen/ics/structures/svcan412_settings.py similarity index 100% rename from ics/structures/svcan412_settings.py rename to gen/ics/structures/svcan412_settings.py diff --git a/ics/structures/svcan4_ind_settings.py b/gen/ics/structures/svcan4_ind_settings.py similarity index 100% rename from ics/structures/svcan4_ind_settings.py rename to gen/ics/structures/svcan4_ind_settings.py diff --git a/ics/structures/svcan4_settings.py b/gen/ics/structures/svcan4_settings.py similarity index 100% rename from ics/structures/svcan4_settings.py rename to gen/ics/structures/svcan4_settings.py diff --git a/ics/structures/svcanrf_settings.py b/gen/ics/structures/svcanrf_settings.py similarity index 100% rename from ics/structures/svcanrf_settings.py rename to gen/ics/structures/svcanrf_settings.py diff --git a/ics/structures/swcan_settings.py b/gen/ics/structures/swcan_settings.py similarity index 100% rename from ics/structures/swcan_settings.py rename to gen/ics/structures/swcan_settings.py diff --git a/ics/structures/system_identity.py b/gen/ics/structures/system_identity.py similarity index 100% rename from ics/structures/system_identity.py rename to gen/ics/structures/system_identity.py diff --git a/ics/structures/tag_options_find_neo_ex.py b/gen/ics/structures/tag_options_find_neo_ex.py similarity index 100% rename from ics/structures/tag_options_find_neo_ex.py rename to gen/ics/structures/tag_options_find_neo_ex.py diff --git a/ics/structures/tag_options_open_neo_ex.py b/gen/ics/structures/tag_options_open_neo_ex.py similarity index 100% rename from ics/structures/tag_options_open_neo_ex.py rename to gen/ics/structures/tag_options_open_neo_ex.py diff --git a/ics/structures/tagicsneo_vi_command.py b/gen/ics/structures/tagicsneo_vi_command.py similarity index 100% rename from ics/structures/tagicsneo_vi_command.py rename to gen/ics/structures/tagicsneo_vi_command.py diff --git a/ics/structures/timestamp_.py b/gen/ics/structures/timestamp_.py similarity index 100% rename from ics/structures/timestamp_.py rename to gen/ics/structures/timestamp_.py diff --git a/ics/structures/timesync_icshardware_settings.py b/gen/ics/structures/timesync_icshardware_settings.py similarity index 100% rename from ics/structures/timesync_icshardware_settings.py rename to gen/ics/structures/timesync_icshardware_settings.py diff --git a/ics/structures/uart_port_config.py b/gen/ics/structures/uart_port_config.py similarity index 100% rename from ics/structures/uart_port_config.py rename to gen/ics/structures/uart_port_config.py diff --git a/ics/structures/uart_port_data.py b/gen/ics/structures/uart_port_data.py similarity index 100% rename from ics/structures/uart_port_data.py rename to gen/ics/structures/uart_port_data.py diff --git a/ics/structures/uart_port_port_bytes.py b/gen/ics/structures/uart_port_port_bytes.py similarity index 100% rename from ics/structures/uart_port_port_bytes.py rename to gen/ics/structures/uart_port_port_bytes.py diff --git a/ics/structures/uart_settings.py b/gen/ics/structures/uart_settings.py similarity index 100% rename from ics/structures/uart_settings.py rename to gen/ics/structures/uart_settings.py diff --git a/ics/structures/version_report.py b/gen/ics/structures/version_report.py similarity index 100% rename from ics/structures/version_report.py rename to gen/ics/structures/version_report.py diff --git a/ics/structures/w_bms_manager_reset.py b/gen/ics/structures/w_bms_manager_reset.py similarity index 100% rename from ics/structures/w_bms_manager_reset.py rename to gen/ics/structures/w_bms_manager_reset.py diff --git a/ics/structures/w_bms_manager_set_lock.py b/gen/ics/structures/w_bms_manager_set_lock.py similarity index 100% rename from ics/structures/w_bms_manager_set_lock.py rename to gen/ics/structures/w_bms_manager_set_lock.py diff --git a/ics/structures/wbms_gateway_settings.py b/gen/ics/structures/wbms_gateway_settings.py similarity index 100% rename from ics/structures/wbms_gateway_settings.py rename to gen/ics/structures/wbms_gateway_settings.py diff --git a/generate_icsneo40_structs.py b/generate_icsneo40_structs.py index 128ff0ef..8e836593 100644 --- a/generate_icsneo40_structs.py +++ b/generate_icsneo40_structs.py @@ -2,14 +2,18 @@ import re import os.path from collections import OrderedDict -import sys 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... debug_print = False + +OUTPUT_DIR = Path("./gen/ics") + __unique_numbers = [] @@ -136,7 +140,7 @@ def is_line_start_of_object(line): for regex in _start_of_obj_blacklist: if bool(regex.search(line)): return False - return bool(re.search("\btypedef struct$|struct$|struct \S*$|enum$|enum |union$|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 @@ -173,7 +177,7 @@ 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) @@ -206,7 +210,7 @@ def parse_object(f, pos=-1, pack_size=None, is_embedded=False): 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): + if opening_bracket_count == 0 and re.match(r"}.*;", line): extra_names = "".join(line.split()).strip("};").split(",") try: # Remove dangling empty string @@ -219,7 +223,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: @@ -275,18 +279,18 @@ def parse_struct_member(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())) + 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("[]"))) 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): @@ -294,7 +298,7 @@ def parse_struct_member(buffered_line): 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) @@ -320,15 +324,15 @@ def parse_struct_member(buffered_line): # 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 = "" # 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): 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): @@ -336,12 +340,12 @@ 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) + value = re.sub(r"{|{|}|,|\s*", "", value) try: value = int(value) except ValueError as ex: @@ -350,14 +354,14 @@ def parse_enum_member(buffered_line): 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" @@ -389,9 +393,9 @@ def get_struct_names(data): 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])$") # 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): @@ -415,8 +419,8 @@ 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() + 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) @@ -535,16 +539,16 @@ def parse_header_file(filename): # 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): + 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: @@ -554,7 +558,7 @@ def parse_header_file(filename): if debug_print: print("PACK SIZE:", pack_size) elif ( - re.match("#define.*", line) + re.match(r"#define.*", line) and len(line.split(" ")) == 3 and not "\\" in line and not "sizeof" in line @@ -624,13 +628,14 @@ def generate(filename="include/ics/icsnVC40.h"): with open(f"{basename}.enums.json", "w+") as f: f.write(j) # generate the python files - output_dir = "./ics/structures" + output_dir = OUTPUT_DIR / "structures" print(f"Removing {output_dir}...") try: shutil.rmtree(output_dir) except FileNotFoundError: pass ignore_names = [ + "fsid_t__", "__fsid_t", "__darwin_pthread_handler_rec", "_mbstate_t", @@ -709,8 +714,8 @@ def generate(filename="include/ics/icsnVC40.h"): 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) continue @@ -719,11 +724,12 @@ def generate(filename="include/ics/icsnVC40.h"): f.write('",\n') f.write("]\n") # write a hidden_import python file for pyinstaller - with open("./ics/hiddenimports.py", "w+") as f: + hidden_imports_path = OUTPUT_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) continue @@ -731,18 +737,20 @@ def generate(filename="include/ics/icsnVC40.h"): 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 = OUTPUT_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}...") exec(import_line) except Exception as ex: - print("ERROR: ", ex, 'IMPORT LINE:', import_line) - """ + print(f"""ERROR: {ex} IMPORT LINE: '{import_line}'""") + raise ex print("Done.") @@ -835,7 +843,7 @@ def _write_member(f, member, is_struct_or_union=False): # 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".format(re.sub(r"^\*", "", name), c_object.preferred_name)) f.write("\n") @@ -900,12 +908,42 @@ def _generate_inner_objects(f, c_object): _write_c_object(f, c_object) return fname, fname_with_path +def create_ics_init(): + fdata = \ +"""try: + import ics.__version + __version__ = ics.__version.__version__ + __full_version__ = ics.__version.__full_version__ +except Exception as ex: + print(ex) + +try: + # Release environment + #print("Release") + from ics.ics import * + from ics.structures import * + from ics.hiddenimports import hidden_imports +except Exception as ex: + # Build environment + #print("Debug", ex) + from ics import * + from ics.structures import * + from ics.hiddenimports import hidden_imports + +""" + init_path = OUTPUT_DIR / "__init__.py" + print(f"Creating '{init_path}'...") + with open(init_path, "w+") as f: + f.write(fdata) def generate_all_files(): import sys import os import pathlib + print(f"Creating directory '{OUTPUT_DIR}'...") + OUTPUT_DIR.mkdir(parents=True, exist_ok=True) + create_ics_init() filenames = ("icsnVC40.h", "icsnVC40Internal.h") for filename in filenames: path = pathlib.Path("include/ics/") @@ -916,6 +954,5 @@ def generate_all_files(): 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 d7797467..00000000 --- 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/icsnVC40_processed.h b/icsnVC40_processed.h index 1a4ab210..1ea9a38f 100644 --- a/icsnVC40_processed.h +++ b/icsnVC40_processed.h @@ -18,11 +18,16 @@ 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; @@ -31,6 +36,7 @@ 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; @@ -39,6 +45,7 @@ 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; @@ -47,9 +54,11 @@ 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) + #pragma warning(disable : 4200) typedef struct SExtendedDataFlashHeader { @@ -57,6 +66,7 @@ typedef struct SExtendedDataFlashHeader uint16_t chksum; uint32_t len; } ExtendedDataFlashHeader_t; + typedef struct { uint32_t DeviceType; @@ -64,17 +74,24 @@ typedef struct 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; @@ -82,15 +99,19 @@ typedef struct _NeoDeviceEx uint16_t tcpPort; uint16_t Reserved0; uint32_t Reserved1; + } NeoDeviceEx; + typedef union tagOptionsOpenNeoEx { struct { int32_t iNetworkID; } CANOptions; + uint32_t Reserved[16]; } OptionsOpenNeoEx, *POptionsOpenNeoEx; + typedef union tagOptionsFindNeoEx { struct @@ -98,17 +119,22 @@ typedef union tagOptionsFindNeoEx 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; @@ -116,27 +142,36 @@ typedef struct _stAPIFirmwareInfo 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, @@ -158,6 +193,7 @@ enum CAN_BPS8000, CAN_BPS10000, }; + enum { NORMAL = 0, @@ -166,6 +202,7 @@ enum LISTEN_ONLY = 3, LISTEN_ALL = 7 }; + typedef struct { uint8_t Mode; @@ -180,6 +217,7 @@ typedef struct uint8_t auto_baud; uint8_t innerFrameDelay25us; } CAN_SETTINGS; + enum { NO_CANFD, @@ -188,6 +226,7 @@ enum CANFD_ENABLED_ISO, CANFD_BRS_ENABLED_ISO }; + typedef struct _CANFD_SETTINGS { uint8_t FDMode; @@ -200,6 +239,7 @@ typedef struct _CANFD_SETTINGS uint8_t FDTDC; uint8_t reserved; } CANFD_SETTINGS; + enum { SWCAN_AUTOSWITCH_DISABLED, @@ -207,6 +247,7 @@ enum SWCAN_AUTOSWITCH_WITH_RESISTOR, SWCAN_AUTOSWITCH_DISABLED_RESISTOR_ENABLED }; + typedef struct { uint8_t Mode; @@ -222,6 +263,7 @@ typedef struct uint8_t auto_baud; uint8_t RESERVED; } SWCAN_SETTINGS; + enum { BPS5000, @@ -234,11 +276,13 @@ enum BPS100000, BPS117647 }; + enum { RESISTOR_ON, RESISTOR_OFF }; + enum { SLEEP_MODE, @@ -246,6 +290,7 @@ enum NORMAL_MODE, FAST_MODE }; + typedef struct _LIN_SETTINGS { uint32_t Baudrate; @@ -255,12 +300,14 @@ typedef struct _LIN_SETTINGS 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; @@ -273,6 +320,7 @@ typedef struct uint16_t p4_500us; uint16_t chksum_enabled; } ISO9141_KEYWORD2000_SETTINGS; + typedef struct _UART_SETTINGS { uint16_t Baudrate; @@ -295,10 +343,12 @@ typedef struct _UART_SETTINGS }; }; } UART_SETTINGS; + typedef struct { uint16_t enable_convert_mode; } J1708_SETTINGS; + typedef struct _SRedSettings { CAN_SETTINGS can1; @@ -306,6 +356,7 @@ typedef struct _SRedSettings LIN_SETTINGS lin1; LIN_SETTINGS lin2; } SRedSettings; + typedef struct _STextAPISettings { uint32_t can1_tx_id; @@ -330,7 +381,9 @@ typedef struct _STextAPISettings }; uint32_t DWord; } can2_options; + uint32_t network_enables; + uint32_t can3_tx_id; uint32_t can3_rx_id; union @@ -342,6 +395,7 @@ typedef struct _STextAPISettings }; uint32_t DWord; } can3_options; + uint32_t can4_tx_id; uint32_t can4_rx_id; union @@ -353,8 +407,11 @@ typedef struct _STextAPISettings }; uint32_t DWord; } can4_options; + uint32_t reserved[5]; + } STextAPISettings; + typedef union _stChipVersions { struct @@ -368,6 +425,7 @@ typedef union _stChipVersions uint8_t jpic_maj; uint8_t jpic_min; } fire_versions; + struct { uint8_t mpic_maj; @@ -379,26 +437,31 @@ typedef union _stChipVersions 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; @@ -408,11 +471,13 @@ typedef union _stChipVersions 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; @@ -422,11 +487,13 @@ typedef union _stChipVersions 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; @@ -467,21 +534,25 @@ typedef union _stChipVersions 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; @@ -494,6 +565,7 @@ typedef union _stChipVersions uint8_t mchip_major; uint8_t mchip_minor; } jupiter_versions; + struct { uint8_t zchip_major; @@ -521,11 +593,13 @@ typedef union _stChipVersions 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; + struct { uint8_t mchip_major; @@ -533,21 +607,25 @@ typedef union _stChipVersions 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; + struct { uint8_t mchip_major; @@ -555,18 +633,22 @@ typedef union _stChipVersions uint8_t wil_major; uint8_t wil_minor; } rad_wbms_versions; + struct { uint8_t zynq_core_major; uint8_t zynq_core_minor; } rad_comet_versions; + } stChipVersions; + typedef struct _SNeoMostGatewaySettings { uint16_t netId; uint8_t zero0; uint8_t Config; } SNeoMostGatewaySettings; + enum { OPETH_FUNC_TAP = 0, @@ -576,6 +658,7 @@ enum OPETH_FUNC_RAW_MEDIA_CONVERTER2, OPETH_FUNC_RAW_MEDIA_CONVERTER2_LOW_LATENCY, }; + typedef struct OP_ETH_GENERAL_SETTINGS_t { uint8_t ucInterfaceType; @@ -599,6 +682,7 @@ typedef struct OP_ETH_GENERAL_SETTINGS_t uint32_t uFlags; }; } OP_ETH_GENERAL_SETTINGS; + typedef struct SRAD_GPTP_SETTINGS_s { uint32_t neighborPropDelayThresh; @@ -617,26 +701,31 @@ typedef struct SRAD_GPTP_SETTINGS_s 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; @@ -645,6 +734,7 @@ typedef struct OP_ETH_SETTINGS_t { struct { + unsigned char mac_addr1[6]; unsigned char mac_addr2[6]; unsigned short mac_spoofing_en : 1; @@ -656,6 +746,7 @@ typedef struct OP_ETH_SETTINGS_t unsigned char reserved0[14]; }; } OP_ETH_SETTINGS; + typedef struct ETHERNET_SETTINGS_t { uint8_t duplex; @@ -672,8 +763,10 @@ typedef enum SFP_ID_ICS_MV2112A2, SFP_ID_ICS_MV2221MB1, SFP_ID_ICS_MV3244, + SFP_ID_MAX, } SfpId; + typedef struct ETHERNET_SETTINGS2_t { uint8_t flags; @@ -693,6 +786,7 @@ typedef struct ETHERNET10G_SETTINGS_t uint8_t link_speed; uint8_t rsvd2[7]; } ETHERNET10G_SETTINGS; + typedef struct ETHERNET10T1S_SETTINGS_t { uint8_t max_burst_count; @@ -709,11 +803,13 @@ typedef struct MACSEC_VLANTAG_t uint16_t VID; uint8_t PRI_CFI; } MACSEC_VLANTAG; + typedef struct MACSEC_MPLS_OUTER_t { uint32_t MPLS_label; uint8_t exp; } MACSEC_MPLS_OUTER; + typedef enum MACSEC_PACKET_TYPE_t { MACSEC_PACKET_NO_VLAN_OR_MPLS = 0, @@ -724,6 +820,7 @@ typedef enum MACSEC_PACKET_TYPE_t MACSEC_PACKET_DUAL_VLAN_FOLLOW_BY_MPLS = 5, MACSEC_PACKET_UNSUPPORTED_TYPE = 6 } MACSEC_PACKET_TYPE; + typedef struct MACSecRule_t { uint8_t index; @@ -759,6 +856,7 @@ typedef struct MACSecRule_t uint8_t rsvd[5]; uint8_t enable; } MACSecRule; + typedef struct MACSecMap_t { uint8_t index; @@ -771,6 +869,7 @@ typedef struct MACSecMap_t uint8_t rsvd[5]; uint8_t enable; } MACSecMap; + typedef enum MACSEC_VALIDATEFRAME_t { MACSEC_VF_DISABLED = 0, @@ -778,6 +877,7 @@ typedef enum MACSEC_VALIDATEFRAME_t MACSEC_VF_STRICT = 2, MACSEC_VF_NA = 3 } MACSEC_VALIDATEFRAME; + typedef enum MACSEC_STRIP_SECTAG_ICV_t { MACSEC_SECTAG_ICV_BOTH_STRIP = 0, @@ -785,6 +885,7 @@ typedef enum MACSEC_STRIP_SECTAG_ICV_t MACSEC_SECTAG_ICV_STRIP_ICV_ONLY = 2, MACSEC_SECTAG_ICV_NO_STRIP = 3 } MACSEC_STRIP_SECTAG_ICV; + typedef enum MACSEC_CIPHER_SUITE_t { MACSEC_CIPHER_GCM_AES_128 = 0, @@ -792,6 +893,7 @@ typedef enum MACSEC_CIPHER_SUITE_t MACSEC_CIPHER_GCM_AES_128_XPN = 2, MACSEC_CIPHER_GCM_AES_256_XPN = 3 } MACSEC_CIPHER_SUITE; + typedef struct MACSecSecY_t { uint8_t index; @@ -810,6 +912,7 @@ typedef struct MACSecSecY_t uint8_t rsvd[6]; uint8_t enable; } MACSecSecY; + typedef struct MACSecSc_t { uint8_t index; @@ -824,6 +927,7 @@ typedef struct MACSecSc_t uint8_t rsvd[7]; uint8_t enable; } MACSecSc; + typedef struct MACSecSa_t { uint8_t index; @@ -836,11 +940,13 @@ typedef struct MACSecSa_t uint8_t rsvd[5]; uint8_t enable; } MACSecSa; + typedef struct MACSecFlags_t { uint32_t en : 1; uint32_t reserved : 31; } MACSecFlags; + typedef struct MACSEC_CONFIG_t { MACSecFlags flags; @@ -850,16 +956,20 @@ typedef struct MACSEC_CONFIG_t MACSecSc sc[(2)]; MACSecSa sa[(4)]; } MACSEC_CONFIG; + typedef struct MACSEC_SETTINGS_t { MACSEC_CONFIG rx; MACSEC_CONFIG tx; } MACSEC_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; @@ -867,12 +977,14 @@ typedef struct DISK_SETTINGS_t 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; @@ -880,12 +992,14 @@ typedef struct uint8_t MasterNetwork; uint8_t SlaveNetwork; } TIMESYNC_ICSHARDWARE_SETTINGS; + typedef enum _EDiskFormat { DiskFormatUnknown = 0, DiskFormatFAT32, DiskFormatexFAT, } EDiskFormat; + typedef enum _EDiskLayout { DiskLayoutSpanned = 0, @@ -894,27 +1008,32 @@ typedef enum _EDiskLayout 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; @@ -926,30 +1045,40 @@ typedef struct _StartDHCPServerCommand 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 _GenericAPISelector { uint8_t apiIndex; uint8_t instance; uint8_t functionID; } GenericAPISelector; + typedef struct _GenericAPIStatus { GenericAPISelector api; @@ -957,51 +1086,60 @@ typedef struct _GenericAPIStatus uint8_t calbackError; uint8_t finishedProcessing; } GenericAPIStatus; + typedef struct _GenericAPIData { uint16_t length; GenericAPISelector api; uint8_t bData[513]; } GenericAPIData; + typedef struct _GenericAPIData_OLD { GenericAPISelector api; uint8_t bData[513]; uint16_t length; } GenericAPIData_OLD; + typedef struct _wBMSManagerSetLock { uint8_t managerIndex; uint8_t setLock; } wBMSManagerSetLock; + typedef struct _wBMSManagerReset { uint8_t managerIndex; } wBMSManagerReset; + typedef struct _UartPortData { uint16_t len; uint8_t port; uint8_t bData[256]; } 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; + typedef struct { uint16_t cmdVersion; uint16_t numValidBits; uint32_t featureBitfields[0]; } GetSupportedFeaturesResponse; + typedef struct _VersionReport { uint8_t valid; @@ -1012,15 +1150,18 @@ typedef struct _VersionReport 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 = 0, @@ -1033,6 +1174,7 @@ enum swUpdateFinalize = 7, swUpdateGetCommunicationVersion = 8, }; + typedef struct { uint32_t componentIdentifier; @@ -1041,19 +1183,24 @@ typedef struct 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; @@ -1079,16 +1226,19 @@ struct priority_vector 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; @@ -1099,6 +1249,7 @@ typedef struct _GenericBinaryStatus uint16_t status; uint8_t reserved[8]; } GenericBinaryStatus; + #pragma pack(pop) enum { @@ -1106,8 +1257,10 @@ enum SERDESCAM_MODE_SPLITTER, SERDESCAM_MODE_LOG_ONLY, SERDESCAM_MODE_CUSTOM, + SERDESCAM_MODE_COUNT, }; + enum { SERDESCAM_PIXEL_BIT_POS_0 = 0, @@ -1115,6 +1268,7 @@ enum SERDESCAM_PIXEL_BIT_POS_2, SERDESCAM_PIXEL_BIT_POS_3, }; + enum { SERDESCAM_VIDEO_FORMAT_NONE = -1, @@ -1153,6 +1307,7 @@ enum 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, @@ -1183,6 +1338,7 @@ enum 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, @@ -1191,6 +1347,7 @@ enum 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, @@ -1199,6 +1356,7 @@ enum 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, @@ -1207,8 +1365,10 @@ enum 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; @@ -1221,6 +1381,7 @@ typedef struct SERDESCAM_SETTINGS_t uint8_t frameSkip; uint8_t rsvd2[19]; } SERDESCAM_SETTINGS; + typedef struct SERDESPOC_SETTINGS_t { uint8_t mode; @@ -1228,6 +1389,7 @@ typedef struct SERDESPOC_SETTINGS_t uint8_t voltage; uint16_t chksum; } SERDESPOC_SETTINGS; + enum { SERDESGEN_MOD_ID_NONE = 0, @@ -1235,22 +1397,30 @@ enum 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; @@ -1265,6 +1435,7 @@ typedef struct RAD_REPORTING_SETTINGS_t uint16_t fan_speed_interval_ms; uint8_t rsvd[2]; } RAD_REPORTING_SETTINGS; + enum { REPORT_ON_PERIODIC, @@ -1284,80 +1455,107 @@ enum 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; @@ -1365,38 +1563,53 @@ typedef struct _SFireVnetSettings 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; @@ -1413,12 +1626,15 @@ typedef struct _SCyanSettings 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; @@ -1431,27 +1647,38 @@ typedef struct _SCyanSettings 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; @@ -1475,20 +1702,27 @@ typedef struct _SCyanSettings 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; @@ -1523,59 +1757,82 @@ typedef struct _SVCAN4Settings 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; @@ -1583,34 +1840,48 @@ typedef struct _SECUSettings 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; @@ -1618,23 +1889,32 @@ typedef struct _SPendantSettings 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; @@ -1642,39 +1922,58 @@ typedef struct _SIEVBSettings 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, @@ -1693,6 +1992,7 @@ enum eGPTPPort ePortStdEth1 = 13, ePortStdEth2 = 14, }; + enum eGPTPRole { eRoleDisabled = 0, @@ -1700,9 +2000,11 @@ enum eGPTPRole eRoleMaster = 2, eRoleSlave = 3, }; + typedef struct _SRADGalaxySettings { uint16_t perf_en; + OP_ETH_GENERAL_SETTINGS opEthGen; OP_ETH_SETTINGS opEth1; OP_ETH_SETTINGS opEth2; @@ -1716,6 +2018,7 @@ typedef struct _SRADGalaxySettings OP_ETH_SETTINGS opEth10; OP_ETH_SETTINGS opEth11; OP_ETH_SETTINGS opEth12; + CAN_SETTINGS can1; CANFD_SETTINGS canfd1; CAN_SETTINGS can2; @@ -1732,10 +2035,12 @@ typedef struct _SRADGalaxySettings 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; @@ -1744,18 +2049,26 @@ typedef struct _SRADGalaxySettings 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; @@ -1763,24 +2076,31 @@ typedef struct _SRADGalaxySettings 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; uint64_t network_enables_5; } 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; @@ -1789,18 +2109,26 @@ typedef struct _SRADStar2Settings 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; @@ -1808,26 +2136,35 @@ typedef struct _SRADStar2Settings uint16_t hwComLatencyTestEn; RAD_REPORTING_SETTINGS reporting; ETHERNET_SETTINGS2 ethernet; + RAD_GPTP_SETTINGS gPTP; uint64_t network_enables_5; } 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; uint64_t network_enables_5; } SRADSuperMoonSettings; + typedef enum { tdmModeTDM2 = 0, @@ -1839,21 +2176,25 @@ typedef enum 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; @@ -1887,31 +2228,41 @@ typedef struct _SRADA2BSettings RAD_GPTP_SETTINGS gPTP; uint64_t network_enables_5; } 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; uint64_t network_enables_5; } SRADMoon2Settings; + typedef struct _SRADMoon3Settings { uint16_t perf_en; + ETHERNET10G_SETTINGS autoEth10g; ETHERNET10G_SETTINGS eth10g; + uint16_t network_enables; uint16_t network_enables_2; uint16_t network_enabled_on_boot; uint16_t network_enables_3; + struct { uint16_t enableLatencyTest : 1; @@ -1919,10 +2270,13 @@ typedef struct _SRADMoon3Settings } flags; uint64_t network_enables_5; } SRADMoon3Settings; + typedef struct _SRADGigalogSettings { uint32_t ecu_id; + uint16_t perf_en; + CAN_SETTINGS can1; CANFD_SETTINGS canfd1; CAN_SETTINGS can2; @@ -1939,25 +2293,36 @@ typedef struct _SRADGigalogSettings 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 { @@ -1966,24 +2331,31 @@ typedef struct _SRADGigalogSettings 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; uint64_t network_enables_5; } SRADGigalogSettings; + typedef struct _SRADGigastarSettings { uint32_t ecu_id; + uint16_t perf_en; + CAN_SETTINGS can1; CANFD_SETTINGS canfd1; CAN_SETTINGS can2; @@ -1996,23 +2368,34 @@ typedef struct _SRADGigastarSettings 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 { @@ -2022,10 +2405,13 @@ typedef struct _SRADGigastarSettings } 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; @@ -2035,23 +2421,32 @@ typedef struct _SRADGigastarSettings RAD_REPORTING_SETTINGS reporting; uint16_t network_enables_4; SERDESGEN_SETTINGS serdesgen; + RAD_GPTP_SETTINGS gPTP; uint64_t network_enables_5; } 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; @@ -2059,16 +2454,21 @@ typedef struct _SVividCANSettings 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; @@ -2076,22 +2476,30 @@ typedef struct _SOBD2SimSettings 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; @@ -2100,21 +2508,31 @@ typedef struct _OBD2ProSettings 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 { @@ -2123,22 +2541,31 @@ typedef struct _OBD2ProSettings 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 { @@ -2147,19 +2574,27 @@ typedef struct _VCAN412Settings 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 { @@ -2180,6 +2615,7 @@ typedef struct SPluto_L2AddressLookupEntry_s uint8_t pad2; uint8_t pad3; } SPluto_L2AddressLookupEntry; + typedef struct SPluto_L2AddressLookupParams_s { uint16_t maxage; @@ -2190,12 +2626,14 @@ typedef struct SPluto_L2AddressLookupParams_s 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]; @@ -2204,6 +2642,7 @@ typedef struct SPluto_L2ForwardingEntry_s uint8_t fl_domain; uint8_t pad; } SPluto_L2ForwardingEntry; + typedef struct SPluto_L2Policing_s { uint16_t smax; @@ -2212,6 +2651,7 @@ typedef struct SPluto_L2Policing_s uint8_t sharindx; uint8_t partition; } SPluto_L2Policing; + typedef struct SPluto_VlanLookup_s { uint16_t vlanid; @@ -2222,6 +2662,7 @@ typedef struct SPluto_VlanLookup_s uint8_t tag_port; uint8_t pad; } SPluto_VlanLookup; + typedef struct SPluto_MacConfig_s { uint16_t top[8]; @@ -2245,6 +2686,7 @@ typedef struct SPluto_MacConfig_s uint8_t ingress; uint8_t pad; } SPluto_MacConfig; + typedef struct SPluto_RetaggingEntry_s { uint16_t vlan_egr; @@ -2256,6 +2698,7 @@ typedef struct SPluto_RetaggingEntry_s uint8_t destports; uint8_t pad; } SPluto_RetaggingEntry; + typedef struct SPluto_GeneralParams_s { uint64_t mac_fltres1; @@ -2279,10 +2722,12 @@ typedef struct SPluto_GeneralParams_s uint8_t mirr_port; uint8_t ignore2stf; } SPluto_GeneralParams; + typedef struct SPluto_VlLookupEntry_s { union { + struct { uint64_t macaddr; @@ -2292,6 +2737,7 @@ typedef struct SPluto_VlLookupEntry_s uint8_t port; uint8_t vlanprior; } vllupformat0; + struct { uint16_t vlid; @@ -2301,6 +2747,7 @@ typedef struct SPluto_VlLookupEntry_s } vllupformat1; }; } SPluto_VlLookupEntry; + typedef struct SPluto_VlPolicingEntry_s { uint64_t type; @@ -2309,12 +2756,14 @@ typedef struct SPluto_VlPolicingEntry_s 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; @@ -2322,11 +2771,13 @@ typedef struct SPluto_VlForwardingEntry_s 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; @@ -2391,6 +2842,7 @@ typedef struct SPlutoPtpParams_s uint8_t gPTPportRole[5 - 1]; uint8_t portEnable[5 - 1]; } PlutoPtpParams_t; + typedef struct SPluto_CustomParams_s { uint8_t mode[5]; @@ -2401,6 +2853,7 @@ typedef struct SPluto_CustomParams_s uint8_t pad; PlutoPtpParams_t ptpParams; } SPluto_CustomParams; + typedef struct SPlutoSwitchSettings_s { ExtendedDataFlashHeader_t flashHeader; @@ -2413,23 +2866,31 @@ typedef struct SPlutoSwitchSettings_s 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; @@ -2437,6 +2898,7 @@ typedef struct _RADPlutoSettings uint16_t iso_msg_termination; ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; ETHERNET_SETTINGS ethernet; + STextAPISettings text_api; struct { @@ -2445,9 +2907,11 @@ typedef struct _RADPlutoSettings uint32_t enablePcEthernetComm : 1; uint32_t reserved : 29; } flags; + SPluto_CustomParams custom; ETHERNET_SETTINGS2 ethernet2; } SRADPlutoSettings; + typedef union { uint32_t word; @@ -2471,6 +2935,7 @@ typedef struct uint32_t ecu_id; SCANSleepID sleep_id; } CANHubSettings, SCANHubSettings; + typedef struct _SFlexVnetzSettings { uint16_t perf_en; @@ -2524,6 +2989,7 @@ typedef struct _SFlexVnetzSettings DISK_SETTINGS disk; ETHERNET_SETTINGS2 ethernet2; } SFlexVnetzSettings; + typedef enum _flexVnetMode { flexVnetModeDisabled, @@ -2532,6 +2998,7 @@ typedef enum _flexVnetMode flexVnetModeTwoSingle, flexVnetModeColdStart } flexVnetMode; + typedef struct _NeoECU12Settings { uint32_t ecu_id; @@ -2544,14 +3011,18 @@ typedef struct _NeoECU12Settings 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; @@ -2572,6 +3043,7 @@ typedef struct _NeoECU12Settings } flags; uint32_t reserved_field[2]; } SNeoECU12Settings; + typedef struct _VCAN4IndSettings { CAN_SETTINGS can1; @@ -2583,11 +3055,13 @@ typedef struct _VCAN4IndSettings 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; @@ -2609,8 +3083,10 @@ typedef struct _VCAN4IndSettings } flags; ETHERNET_SETTINGS2 ethernet2; } VCAN4IndSettings, SVCAN4IndSettings; + typedef struct _SOBD2LCSettings { + uint16_t perf_en; CAN_SETTINGS can1; CANFD_SETTINGS canfd1; @@ -2622,6 +3098,7 @@ typedef struct _SOBD2LCSettings CANFD_SETTINGS canfd4; SWCAN_SETTINGS swcan1; LIN_SETTINGS lin1; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; uint16_t iso_parity; uint16_t iso_msg_termination; @@ -2638,6 +3115,7 @@ typedef struct _SOBD2LCSettings 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 @@ -2657,6 +3135,7 @@ typedef struct _SOBD2LCSettings ETHERNET_SETTINGS2 ethernet2; uint16_t iso_tester_pullup_enable; } OBD2LCSettings, SOBD2LCSettings; + typedef struct SJupiterPtpParams_s { uint32_t neighborPropDelay; @@ -2666,6 +3145,7 @@ typedef struct SJupiterPtpParams_s int8_t operationLogSyncInterval; uint8_t gPTPportRole[8]; } JupiterPtpParams_t; + typedef struct _SRADJupiterSwitchSettings { uint8_t phyMode[8]; @@ -2679,22 +3159,29 @@ typedef struct _SRADJupiterSwitchSettings uint8_t pad; JupiterPtpParams_t ptpParams_unused; } 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; @@ -2702,7 +3189,9 @@ typedef struct _SRADJupiterSettings uint16_t iso_msg_termination; ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; ETHERNET_SETTINGS ethernet; + STextAPISettings text_api; + struct { uint32_t disableUsbCheckOnBoot : 1; @@ -2710,6 +3199,7 @@ typedef struct _SRADJupiterSettings uint32_t enablePcEthernetComm : 1; uint32_t reserved : 29; } flags; + SRADJupiterSwitchSettings switchSettings; ETHERNET_SETTINGS2 ethernet2; } SRADJupiterSettings; @@ -2720,6 +3210,7 @@ typedef struct uint8_t ethConfigurationPort; uint8_t reserved[5]; } Fire3LinuxSettings; + typedef struct _SRed2Settings { uint16_t perf_en; @@ -2794,6 +3285,7 @@ typedef struct _SRed2Settings RAD_GPTP_SETTINGS gPTP; uint16_t iso_tester_pullup_enable; } SRed2Settings; + typedef struct _SFire3Settings { uint16_t perf_en; @@ -2902,6 +3394,7 @@ typedef struct _SFire3Settings uint64_t termination_enables_2; uint16_t iso_tester_pullup_enable; } SFire3Settings; + typedef struct _SFire3FlexraySettings { uint16_t perf_en; @@ -2994,6 +3487,7 @@ typedef struct _SFire3FlexraySettings uint16_t flex_termination; uint16_t iso_tester_pullup_enable; } SFire3FlexraySettings; + typedef struct { uint16_t perf_en; @@ -3009,21 +3503,28 @@ typedef struct 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; @@ -3031,6 +3532,7 @@ typedef struct _SEtherBadgeSettings 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; @@ -3038,7 +3540,9 @@ typedef struct _SEtherBadgeSettings uint16_t misc_io_analog_enable; uint16_t ain_sample_period; uint16_t ain_threshold; + STextAPISettings text_api; + struct { uint32_t disableUsbCheckOnBoot : 1; @@ -3046,8 +3550,10 @@ typedef struct _SEtherBadgeSettings uint32_t enablePcEthernetComm : 1; uint32_t reserved : 29; } flags; + ETHERNET_SETTINGS2 ethernet2; } SEtherBadgeSettings; + typedef struct _SRADEpsilonSwitchSettings { uint8_t phyMode[18]; @@ -3058,22 +3564,29 @@ typedef struct _SRADEpsilonSwitchSettings 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; @@ -3081,7 +3594,9 @@ typedef struct _SRADEpsilonSettings uint16_t iso_msg_termination; ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; ETHERNET_SETTINGS ethernet; + STextAPISettings text_api; + struct { uint32_t disableUsbCheckOnBoot : 1; @@ -3089,19 +3604,23 @@ typedef struct _SRADEpsilonSettings uint32_t enablePcEthernetComm : 1; uint32_t reserved : 29; } flags; + SRADEpsilonSwitchSettings switchSettings; ETHERNET_SETTINGS2 ethernet2; uint16_t misc_io_on_report_events; } SRADEpsilonSettings; + typedef struct { uint8_t wBMSDeviceID; uint8_t enabled; } sWIL_FAULT_SERVICING_SETTINGS; + typedef struct { uint8_t enabled; } sWIL_NETWORK_DATA_CAPTURE_SETTINGS; + typedef struct _sWIL_CONNECTION_SETTINGS { uint8_t using_port_a; @@ -3111,6 +3630,7 @@ typedef struct _sWIL_CONNECTION_SETTINGS sWIL_NETWORK_DATA_CAPTURE_SETTINGS network_data_capture_config; uint16_t sensor_buffer_size; } sWIL_CONNECTION_SETTINGS; + enum { enumWILPortConfig_Single_Port_A = 0, @@ -3119,22 +3639,26 @@ enum 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; @@ -3146,6 +3670,7 @@ typedef union uint64_t reserved : 18; } config; } sWILBridgeConfig; + typedef union { uint8_t byte; @@ -3157,6 +3682,7 @@ typedef union uint8_t reserved : 3; } config; } sSPI_PORT_SETTING; + typedef struct { sSPI_PORT_SETTING port_a; @@ -3170,18 +3696,26 @@ typedef struct uint8_t wbms2_canfd_enable; uint16_t reserved[6]; } WBMSGatewaySettings; + 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; @@ -3189,23 +3723,33 @@ typedef struct _SRADBMSSettings 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; + uint8_t rsvd[10]; + sSPI_PORT_SETTINGS spi_config; + sWIL_CONNECTION_SETTINGS wbms_wil_1; sWIL_CONNECTION_SETTINGS wbms_wil_2; + uint16_t wil1_nwk_metadata_buff_count; uint16_t wil2_nwk_metadata_buff_count; + WBMSGatewaySettings gateway; + uint16_t network_enables_4; uint64_t network_enables_5; } SRADBMSSettings; + typedef struct _SRADCometSettings { + uint32_t ecu_id; uint16_t perf_en; struct @@ -3241,17 +3785,23 @@ typedef struct _SRADCometSettings uint16_t pwr_man_enable; RAD_GPTP_SETTINGS gPTP; STextAPISettings text_api; + ETHERNET_SETTINGS2 ethernet; + OP_ETH_GENERAL_SETTINGS opEthGen; + ETHERNET_SETTINGS2 ethT1; OP_ETH_SETTINGS opEth1; + ETHERNET_SETTINGS2 ethT1s1; ETHERNET10T1S_SETTINGS t1s1; + ETHERNET_SETTINGS2 ethT1s2; ETHERNET10T1S_SETTINGS t1s2; uint64_t network_enables_5; LIN_SETTINGS lin1; } SRADCometSettings; + typedef struct _GLOBAL_SETTINGS { uint16_t version; @@ -3302,6 +3852,7 @@ typedef struct _GLOBAL_SETTINGS SRADCometSettings radcomet; }; } GLOBAL_SETTINGS; + typedef enum _EDeviceSettingsType { DeviceFireSettingsType, @@ -3344,9 +3895,11 @@ typedef enum _EDeviceSettingsType DeviceFire3FlexraySettingsType, DeviceRADCometSettingsType, DeviceRed2OemSettingsType, + DeviceSettingsTypeMax, DeviceSettingsNone = 0xFFFFFFFF } EDeviceSettingsType; + typedef struct _SDeviceSettings { EDeviceSettingsType DeviceSettingType; @@ -3394,8 +3947,10 @@ typedef struct _SDeviceSettings SRADMoon3Settings radmoon3; SFire3FlexraySettings fire3Flexray; SRADCometSettings radcomet; + } Settings; } SDeviceSettings; + typedef enum _EPlasmaIonVnetChannel_t { PlasmaIonVnetChannelMain, @@ -3404,47 +3959,61 @@ typedef enum _EPlasmaIonVnetChannel_t 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; + 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 @@ -3453,6 +4022,7 @@ typedef struct _stCM_ISO157652_TxMessage 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; @@ -3464,23 +4034,32 @@ typedef struct _stCM_ISO157652_TxMessage 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 @@ -3499,18 +4078,25 @@ typedef struct 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 @@ -3528,7 +4114,9 @@ typedef struct _stCM_ISO157652_RxMessage }; uint8_t reserved[16]; } stCM_ISO157652_RxMessage; + #pragma pack(pop) + typedef struct { uint32_t StatusValue; @@ -3552,7 +4140,9 @@ typedef struct uint32_t ExpectedLength; uint32_t NodeID; } spyFilterLong; + typedef int16_t descIdType; + typedef struct _icsSpyMessage { uint32_t StatusBitField; @@ -3587,6 +4177,7 @@ typedef struct _icsSpyMessage uint8_t MiscData; uint8_t Reserved[3]; } icsSpyMessage; + typedef struct _icsSpyMessageFlexRay { uint32_t StatusBitField; @@ -3649,6 +4240,7 @@ typedef struct _icsSpyMessageFlexRay uint8_t MiscData; uint8_t Reserved[3]; } icsSpyMessageFlexRay; + typedef struct _icsSpyMessageMdio { uint32_t StatusBitField; @@ -3693,6 +4285,7 @@ typedef struct _icsSpyMessageMdio uint8_t MiscData; uint8_t Reserved[3]; } icsSpyMessageMdio; + typedef struct _icsSpyMessagewBMS { uint32_t StatusBitField; @@ -3780,6 +4373,7 @@ typedef struct _icsSpyMessageLong uint8_t MiscData; uint8_t Reserved[3]; } icsSpyMessageLong; + typedef struct _icsSpyMessageJ1850 { uint32_t StatusBitField; @@ -3814,6 +4408,7 @@ typedef struct _icsSpyMessageJ1850 uint8_t MiscData; uint8_t Reserved[3]; } icsSpyMessageJ1850; + typedef struct _icsSpyMessageVSB { uint32_t StatusBitField; @@ -3859,6 +4454,7 @@ typedef struct _ethernetNetworkStatus_t uint8_t linkMode; } ethernetNetworkStatus_t; #pragma pack(pop) + typedef struct { uint8_t backupPowerGood; @@ -3867,60 +4463,73 @@ typedef struct 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[3]; uint8_t ethernetActivationLineEnabled_2; } 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[9]; } icsRadEpsilonDeviceStatus; + typedef struct { ethernetNetworkStatus_t ethernetStatus; } icsRadBMSDeviceStatus; + #pragma pack(push) #pragma pack(4) + typedef union { icsFire2DeviceStatus fire2Status; @@ -3935,7 +4544,9 @@ typedef union icsVcan4IndustrialDeviceStatus vcan4indStatus; icsRadBMSDeviceStatus radBMSStatus; } icsDeviceStatus; + #pragma pack(pop) + typedef struct { char szName[128]; @@ -3946,12 +4557,14 @@ typedef struct 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; @@ -3959,6 +4572,7 @@ typedef struct SPhyRegPktClause22Mess uint16_t regAddr; uint16_t regVal; } PhyRegPktClause22Mess_t; + typedef struct SPhyRegPktClause45Mess { uint8_t port; @@ -3966,6 +4580,7 @@ typedef struct SPhyRegPktClause45Mess uint16_t regAddr; uint16_t regVal; } PhyRegPktClause45Mess_t; + typedef enum SPhyRegPktStatus { PHYREG_SUCCESS = 0, @@ -3977,12 +4592,14 @@ typedef enum SPhyRegPktStatus PHYREG_RESERVED2, PHYREG_RESERVED3 } PhyRegPktStatus_t; + typedef enum SPhyRegPktRw { PHYREG_READ = 0, PHYREG_WRITE, PHYREG_BOTH } PhyRegPktRw_t; + typedef struct SPhyRegPkt { union @@ -3999,12 +4616,14 @@ typedef struct SPhyRegPkt }; uint16_t flags; }; + union { PhyRegPktClause22Mess_t clause22; PhyRegPktClause45Mess_t clause45; }; } PhyRegPkt_t; + typedef enum { networkDWCAN01, @@ -4027,6 +4646,7 @@ typedef enum NUM_VALID_DEVICE_FEATURES, supportedFeatureMax = 0xFFFF, } DeviceFeature; + typedef enum PhyErrorType { PhyOperationError = 0, diff --git a/pyproject.toml b/pyproject.toml index e899ff5d..41e30024 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,47 @@ +[project] +name = "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.8" +classifiers=[ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Topic :: Software Development :: Libraries :: Python Modules", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + ] +license = {file = "LICENSE"} + +[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" + +[tool.setuptools.dynamic] +version = {attr = "ics.__version__"} + +[build-system] +requires = [ + "setuptools", + "wheel", + "dunamai", +] [tool.cibuildwheel] build = "{*-win32,*-win_amd64,*-macosx_universal2,*-manylinux_x86_64,*-manylinux_aarch64}" skip = "cp36-* pp* *-manylinux_i686 *-musllinux_*" diff --git a/requirements.txt b/requirements.txt index e69de29b..f275a192 100644 --- a/requirements.txt +++ b/requirements.txt @@ -0,0 +1,2 @@ +setuptools >= 69 +dunamai >= 1.19.2 \ No newline at end of file diff --git a/setup.py b/setup.py index ae4b56c7..cd85333f 100644 --- a/setup.py +++ b/setup.py @@ -7,15 +7,22 @@ import sys import unittest import shutil +from pathlib import Path +import codecs +import os.path +import extract_icsneo40_defines +import generate_icsneo40_structs +from create_version import get_pkg_version, create_version_py -MAJOR_VERSION = 914 -MINOR_VERSION = 14 -POST_VERSION = 1 +# force this to happen every single time, fixes sync issues. +extract_icsneo40_defines.extract() +generate_icsneo40_structs.generate_all_files() -if POST_VERSION: - VERSION_STRING = "%d.%d-%d" % (MAJOR_VERSION, MINOR_VERSION, POST_VERSION) -else: - VERSION_STRING = "%d.%d" % (MAJOR_VERSION, MINOR_VERSION) + +create_version_py() + +MAJOR_VERSION = int(get_pkg_version().split(".")[0]) +MINOR_VERSION = int(get_pkg_version().split(".")[1]) def _run_tests(): @@ -54,13 +61,9 @@ def run(self): _run_tests() + class build(build_module.build): def run(self): - import extract_icsneo40_defines - import generate_icsneo40_structs - - extract_icsneo40_defines.extract() - generate_icsneo40_structs.generate_all_files() if platform.system().upper() in ("DARWIN", "LINUX"): import build_libicsneo @@ -137,33 +140,15 @@ def read(fname): setup( name="python_ics", - version=VERSION_STRING, - description="Library for interfacing with Intrepid devices in Python", - long_description=read("README.md"), - long_description_content_type="text/markdown", - 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/", + version=get_pkg_version(), cmdclass={ "build": build, "test": UnitTests, }, 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], - 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", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - ], )