diff --git a/README.md b/README.md index ec0cf1f7a..7705f9454 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,24 @@ Python wrapper for interfacing to IntrepidCS Hardware. - Mac builds use [libicsneo](https://github.com/intrepidcs/libicsneo) and are built using cibuildwheel - libicsneolegacy.dylib is bundled with the wheel and python_ics will automatically use it. +## Versioning + +Starting with **1!26.3.9**, python_ics versions track the Vehicle Spy +version they were generated from (Vspy 3.26.3.9 → python_ics 26.3.9). + +The `1!` prefix is a [PEP 440 epoch](https://peps.python.org/pep-0440/#version-epochs). +Earlier releases used the icsneo40 DLL version (e.g. 923.11), which sorts +*above* 26.x, so the epoch tells pip the scheme changed: + +- `pip install python_ics` and `pip install -U python_ics` correctly + resolve `1!26.3.9` as newer than `923.11`. +- Exact pins must include the epoch: `python_ics==1!26.3.9`. +- Range pins work with or without it: `python_ics>=1!26.3`. + +**Release tagging:** tags are `v1!` (e.g. `v1!26.3.9`). Every +future tag keeps the `1!` prefix — a bare `v26.x` tag would sort below +the historical 923.x releases and pip would ignore it. + # Basic usage ```python diff --git a/build_libicsneo.py b/build_libicsneo.py index cc74617e5..13b1fc6f2 100644 --- a/build_libicsneo.py +++ b/build_libicsneo.py @@ -14,6 +14,12 @@ LIBUSB_BUILD = f"{LIBUSB_ROOT}/build" LIBUSB_INSTALL = f"{LIBUSB_ROOT}/install" +# NOTE: this pin's vendored icsnVC40.h predates Vspy 3.26.3.9 +# (SRADGalaxy2Settings 840 vs 1204, no Comet3/Gigastar2), so Linux/macOS +# wheels lag the Windows ABI. Newer upstream doesn't help yet: master +# (4ed29b4, 2026-07-07) still has the old header AND adds a mandatory +# icspb protobuf dependency whose codegen fails on clean CI runners. +# Bump once upstream syncs the header and icspb builds. LIBICSNEO_VERSION = "830fe1a" LIBICSNEO_ROOT = f"{ROOT}/libicsneo/{LIBICSNEO_VERSION}" LIBICSNEO_SOURCE = f"{LIBICSNEO_ROOT}/source" diff --git a/doc/source/index.rst b/doc/source/index.rst index 69b8e701d..846bfdd66 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -60,6 +60,8 @@ Module Functions ics.get_backup_power_enabled ics.get_backup_power_ready ics.get_bus_voltage + ics.get_component_versions + ics.get_device_name ics.get_device_settings ics.get_device_status ics.get_disk_details @@ -67,8 +69,10 @@ Module Functions ics.get_dll_firmware_info ics.get_dll_version ics.get_error_messages + ics.get_firmware_variant ics.get_gptp_status ics.get_hw_firmware_info + ics.get_imei ics.get_last_api_error ics.get_library_path ics.get_messages @@ -89,6 +93,7 @@ Module Functions ics.read_jupiter_firmware ics.read_sdcard ics.request_enter_sleep_mode + ics.request_set_neovi_miscio ics.set_active_vnet_channel ics.set_backup_power_enabled ics.set_bit_rate @@ -129,13 +134,17 @@ Module Functions ics.GetBackupPowerEnabled ics.GetBackupPowerReady ics.GetBusVoltage + ics.GetComponentVersions ics.GetDLLFirmwareInfo ics.GetDLLVersion + ics.GetDeviceName ics.GetDeviceSettings ics.GetDeviceStatus ics.GetErrorMessages + ics.GetFirmwareVariant ics.GetGPTPStatus ics.GetHWFirmwareInfo + ics.GetIMEI ics.GetLastAPIError ics.GetMessages ics.GetPCBSerialNumber @@ -153,6 +162,7 @@ Module Functions ics.RequestDiskFormatCancel ics.RequestDiskFormatProgress ics.RequestEnterSleepMode + ics.RequestSetNeoVIMiscIO ics.ScriptClear ics.ScriptGetFBlockStatus ics.ScriptGetScriptStatus @@ -209,13 +219,17 @@ Module Functions ics.icsneoGetBackupPowerEnabled ics.icsneoGetBackupPowerReady ics.icsneoGetBusVoltage + ics.icsneoGetComponentVersions ics.icsneoGetDLLFirmwareInfo ics.icsneoGetDLLVersion + ics.icsneoGetDeviceName ics.icsneoGetDeviceSettings ics.icsneoGetDeviceStatus ics.icsneoGetErrorMessages + ics.icsneoGetFirmwareVariant ics.icsneoGetGPTPStatus ics.icsneoGetHWFirmwareInfo + ics.icsneoGetIMEI ics.icsneoGetLastAPIError ics.icsneoGetMessages ics.icsneoGetPCBSerialNumber @@ -237,6 +251,7 @@ Module Functions ics.icsneoRequestDiskFormatCancel ics.icsneoRequestDiskFormatProgress ics.icsneoRequestEnterSleepMode + ics.icsneoRequestSetNeoVIMiscIO ics.icsneoScriptClear ics.icsneoScriptGetFBlockStatus ics.icsneoScriptGetScriptStatus @@ -313,6 +328,18 @@ Module Structures :members: :undoc-members: + .. autoclass:: ics.structures.cmp_global_data.cmp_global_data + :members: + :undoc-members: + + .. autoclass:: ics.structures.cmp_network_data.cmp_network_data + :members: + :undoc-members: + + .. autoclass:: ics.structures.current_ds_.current_ds_ + :members: + :undoc-members: + .. autoclass:: ics.structures.device_feature.device_feature :members: :undoc-members: @@ -321,6 +348,10 @@ Module Structures :members: :undoc-members: + .. autoclass:: ics.structures.e_dev_name_type.e_dev_name_type + :members: + :undoc-members: + .. autoclass:: ics.structures.e_device_settings_type.e_device_settings_type :members: :undoc-members: @@ -341,6 +372,10 @@ Module Structures :members: :undoc-members: + .. autoclass:: ics.structures.e_gptp_profile.e_gptp_profile + :members: + :undoc-members: + .. autoclass:: ics.structures.e_gptp_role.e_gptp_role :members: :undoc-members: @@ -365,10 +400,18 @@ Module Structures :members: :undoc-members: + .. autoclass:: ics.structures.ethernet10_t1_l_settings.ethernet10_t1_l_settings + :members: + :undoc-members: + .. autoclass:: ics.structures.ethernet10_t1_s_settings.ethernet10_t1_s_settings :members: :undoc-members: + .. autoclass:: ics.structures.ethernet10_t1_s_settings_ext.ethernet10_t1_s_settings_ext + :members: + :undoc-members: + .. autoclass:: ics.structures.ethernet_network_status_t.ethernet_network_status_t :members: :undoc-members: @@ -437,15 +480,7 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.get_component_versions.get_component_versions - :members: - :undoc-members: - - .. autoclass:: ics.structures.get_component_versions_response.get_component_versions_response - :members: - :undoc-members: - - .. autoclass:: ics.structures.get_supported_features_response.get_supported_features_response + .. autoclass:: ics.structures.gigastar2_fw_variants.gigastar2_fw_variants :members: :undoc-members: @@ -457,10 +492,6 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.hw_eth_settings.hw_eth_settings - :members: - :undoc-members: - .. autoclass:: ics.structures.ics_device_status.ics_device_status :members: :undoc-members: @@ -481,10 +512,6 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.ics_obd2_pro_device_status.ics_obd2_pro_device_status - :members: - :undoc-members: - .. autoclass:: ics.structures.ics_rad_bms_device_status.ics_rad_bms_device_status :members: :undoc-members: @@ -497,14 +524,6 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.ics_rad_moon_duo_device_status.ics_rad_moon_duo_device_status - :members: - :undoc-members: - - .. autoclass:: ics.structures.ics_rad_pluto_device_status.ics_rad_pluto_device_status - :members: - :undoc-members: - .. autoclass:: ics.structures.ics_spy_message_flex_ray.ics_spy_message_flex_ray :members: :undoc-members: @@ -557,6 +576,10 @@ Module Structures :members: :undoc-members: + .. autoclass:: ics.structures.mac_addr_entry.mac_addr_entry + :members: + :undoc-members: + .. autoclass:: ics.structures.mac_sec_flags_t.mac_sec_flags_t :members: :undoc-members: @@ -617,6 +640,10 @@ Module Structures :members: :undoc-members: + .. autoclass:: ics.structures.multi_mac_addr_info.multi_mac_addr_info + :members: + :undoc-members: + .. autoclass:: ics.structures.neo_device.neo_device :members: :undoc-members: @@ -637,23 +664,23 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.port_identity.port_identity + .. autoclass:: ics.structures.parent_ds_.parent_ds_ :members: :undoc-members: - .. autoclass:: ics.structures.priority_vector.priority_vector + .. autoclass:: ics.structures.phy_id.phy_id :members: :undoc-members: - .. autoclass:: ics.structures.rad_moon_duo_converter_settings.rad_moon_duo_converter_settings + .. autoclass:: ics.structures.port_identity.port_identity :members: :undoc-members: - .. autoclass:: ics.structures.rad_reporting_settings.rad_reporting_settings + .. autoclass:: ics.structures.priority_vector.priority_vector :members: :undoc-members: - .. autoclass:: ics.structures.s_cm_probe_settings.s_cm_probe_settings + .. autoclass:: ics.structures.rad_reporting_settings.rad_reporting_settings :members: :undoc-members: @@ -681,14 +708,6 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.s_ether_badge_settings.s_ether_badge_settings - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_ext_sub_cmd_hdr.s_ext_sub_cmd_hdr - :members: - :undoc-members: - .. autoclass:: ics.structures.s_extended_data_flash_header.s_extended_data_flash_header :members: :undoc-members: @@ -701,7 +720,7 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.s_fire_settings.s_fire_settings + .. autoclass:: ics.structures.s_fire3_t1s_lin_settings.s_fire3_t1s_lin_settings :members: :undoc-members: @@ -725,7 +744,7 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.s_pendant_settings.s_pendant_settings + .. autoclass:: ics.structures.s_neo_vi_connect_settings.s_neo_vi_connect_settings :members: :undoc-members: @@ -753,90 +772,10 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.s_pluto_avb_params_s.s_pluto_avb_params_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_pluto_clock_sync_params_s.s_pluto_clock_sync_params_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_pluto_custom_params_s.s_pluto_custom_params_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_pluto_general_params_s.s_pluto_general_params_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_pluto_l2_address_lookup_entry_s.s_pluto_l2_address_lookup_entry_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_pluto_l2_address_lookup_params_s.s_pluto_l2_address_lookup_params_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_pluto_l2_forwarding_entry_s.s_pluto_l2_forwarding_entry_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_pluto_l2_forwarding_params_s.s_pluto_l2_forwarding_params_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_pluto_l2_policing_s.s_pluto_l2_policing_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_pluto_mac_config_s.s_pluto_mac_config_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_pluto_ptp_params_s.s_pluto_ptp_params_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_pluto_retagging_entry_s.s_pluto_retagging_entry_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_pluto_switch_settings_s.s_pluto_switch_settings_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_pluto_vl_forwarding_entry_s.s_pluto_vl_forwarding_entry_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_pluto_vl_forwarding_params_s.s_pluto_vl_forwarding_params_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_pluto_vl_lookup_entry_s.s_pluto_vl_lookup_entry_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_pluto_vl_policing_entry_s.s_pluto_vl_policing_entry_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_pluto_vlan_lookup_s.s_pluto_vlan_lookup_s - :members: - :undoc-members: - - .. autoclass:: ics.structures.s_rad_moon_duo_settings.s_rad_moon_duo_settings - :members: - :undoc-members: - .. autoclass:: ics.structures.s_red2_settings.s_red2_settings :members: :undoc-members: - .. autoclass:: ics.structures.s_red_settings.s_red_settings - :members: - :undoc-members: - .. autoclass:: ics.structures.s_spi_port_setting.s_spi_port_setting :members: :undoc-members: @@ -869,23 +808,15 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.scan_hub_settings.scan_hub_settings - :members: - :undoc-members: - - .. autoclass:: ics.structures.scan_sleep_id.scan_sleep_id + .. autoclass:: ics.structures.scaled_ns_.scaled_ns_ :members: :undoc-members: - .. autoclass:: ics.structures.secu_avb_settings.secu_avb_settings - :members: - :undoc-members: - - .. autoclass:: ics.structures.secu_settings.secu_settings + .. autoclass:: ics.structures.scan_hub_settings.scan_hub_settings :members: :undoc-members: - .. autoclass:: ics.structures.seevb_settings.seevb_settings + .. autoclass:: ics.structures.scan_sleep_id.scan_sleep_id :members: :undoc-members: @@ -905,47 +836,43 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.sievb_settings.sievb_settings - :members: - :undoc-members: - .. autoclass:: ics.structures.sobd2_lc_settings.sobd2_lc_settings :members: :undoc-members: - .. autoclass:: ics.structures.sobd2_pro_settings.sobd2_pro_settings + .. autoclass:: ics.structures.spy_filter_long.spy_filter_long :members: :undoc-members: - .. autoclass:: ics.structures.sobd2_sim_settings.sobd2_sim_settings + .. autoclass:: ics.structures.srad_comet3_settings.srad_comet3_settings :members: :undoc-members: - .. autoclass:: ics.structures.software_update_command.software_update_command + .. autoclass:: ics.structures.srad_comet_settings.srad_comet_settings :members: :undoc-members: - .. autoclass:: ics.structures.spy_filter_long.spy_filter_long + .. autoclass:: ics.structures.srad_epsilon_settings.srad_epsilon_settings :members: :undoc-members: - .. autoclass:: ics.structures.srad_comet_settings.srad_comet_settings + .. autoclass:: ics.structures.srad_epsilon_switch_settings.srad_epsilon_switch_settings :members: :undoc-members: - .. autoclass:: ics.structures.srad_epsilon_settings.srad_epsilon_settings + .. autoclass:: ics.structures.srad_galaxy2_settings.srad_galaxy2_settings :members: :undoc-members: - .. autoclass:: ics.structures.srad_epsilon_switch_settings.srad_epsilon_switch_settings + .. autoclass:: ics.structures.srad_galaxy_settings.srad_galaxy_settings :members: :undoc-members: - .. autoclass:: ics.structures.srad_galaxy_settings.srad_galaxy_settings + .. autoclass:: ics.structures.srad_gemini_settings.srad_gemini_settings :members: :undoc-members: - .. autoclass:: ics.structures.srad_gigalog_settings.srad_gigalog_settings + .. autoclass:: ics.structures.srad_gigastar2_settings.srad_gigastar2_settings :members: :undoc-members: @@ -977,7 +904,7 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.srad_pluto_settings.srad_pluto_settings + .. autoclass:: ics.structures.srad_moon_t1_s_settings.srad_moon_t1_s_settings :members: :undoc-members: @@ -985,10 +912,6 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.srad_super_moon_settings.srad_super_moon_settings - :members: - :undoc-members: - .. autoclass:: ics.structures.srada2_b_settings.srada2_b_settings :members: :undoc-members: @@ -1021,10 +944,6 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.svcan3_settings.svcan3_settings - :members: - :undoc-members: - .. autoclass:: ics.structures.svcan412_settings.svcan412_settings :members: :undoc-members: @@ -1037,10 +956,6 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.svcanrf_settings.svcanrf_settings - :members: - :undoc-members: - .. autoclass:: ics.structures.swcan_settings.swcan_settings :members: :undoc-members: @@ -1085,10 +1000,6 @@ Module Structures :members: :undoc-members: - .. autoclass:: ics.structures.version_report.version_report - :members: - :undoc-members: - .. autoclass:: ics.structures.w_bms_manager_reset.w_bms_manager_reset :members: :undoc-members: @@ -1183,7 +1094,7 @@ Module Variables :annotation: = 6 .. py:data:: BUILD_DATETIME - :annotation: = Jun 3 2024 15:08:23 + :annotation: = Jul 7 2026 12:54:38 .. py:data:: CANFD_BRS_ENABLED :annotation: = 2 @@ -1224,8 +1135,41 @@ Module Variables .. py:data:: CAN_SETTINGS_SIZE :annotation: = 12 + .. py:data:: CICSSPYSTATUSBITS_H_ + :annotation: = 1 + + .. py:data:: CMP_STREAMS_A2B + :annotation: = 3 + + .. py:data:: CMP_STREAMS_COMET + :annotation: = 10 + + .. py:data:: CMP_STREAMS_COMET3 + :annotation: = 10 + + .. py:data:: CMP_STREAMS_FIRE3 + :annotation: = 10 + + .. py:data:: CMP_STREAMS_FIRE3FR + :annotation: = 10 + + .. py:data:: CMP_STREAMS_FIRE3T1SLIN + :annotation: = 10 + + .. py:data:: CMP_STREAMS_GALAXY2 + :annotation: = 10 + + .. py:data:: CMP_STREAMS_GIGASTAR + :annotation: = 10 + + .. py:data:: CMP_STREAMS_GIGASTAR2 + :annotation: = 10 + + .. py:data:: CMP_STREAMS_RED2 + :annotation: = 10 + .. py:data:: DEVICECOUNT_FOR_EXPLORER - :annotation: = 46 + :annotation: = 32 .. py:data:: DISABLE :annotation: = 1 @@ -1263,21 +1207,39 @@ Module Variables .. py:data:: EPSILON_88Q6113_SWITCH_A :annotation: = 1 + .. py:data:: EPSILON_88Q6113_SWITCH_AB + :annotation: = 3 + .. py:data:: EPSILON_88Q6113_SWITCH_B :annotation: = 2 .. py:data:: ETHERNET10G_SETTINGS_SIZE :annotation: = 24 + .. py:data:: ETHERNET10T1L_SETTINGS_SIZE + :annotation: = 8 + + .. py:data:: ETHERNET10T1S_SETTINGS_EXT_SIZE + :annotation: = 16 + .. py:data:: ETHERNET10T1S_SETTINGS_FLAG_BUS_DECODING_ALL :annotation: = 8 .. py:data:: ETHERNET10T1S_SETTINGS_FLAG_BUS_DECODING_BEACONS :annotation: = 4 + .. py:data:: ETHERNET10T1S_SETTINGS_FLAG_DISABLE_ALL_DECODING + :annotation: = 64 + + .. py:data:: ETHERNET10T1S_SETTINGS_FLAG_ENABLE_CSMA_FALLBACK + :annotation: = 32 + .. py:data:: ETHERNET10T1S_SETTINGS_FLAG_ENABLE_PLCA :annotation: = 1 + .. py:data:: ETHERNET10T1S_SETTINGS_FLAG_ENABLE_PLCA_COL_DET + :annotation: = 16 + .. py:data:: ETHERNET10T1S_SETTINGS_FLAG_TERMINATION :annotation: = 2 @@ -1290,33 +1252,72 @@ Module Variables .. py:data:: ETHERNET_SETTINGS10G_FLAG_COMM_IN_USE :annotation: = 2147483648 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_COMPL_MODE + :annotation: = 1024 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_CONFIG_NOT_ALLOWED :annotation: = 32 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_CUT_THRU_TAP_ENABLE + :annotation: = 16384 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_DEVICE_HOSTING_ENABLE :annotation: = 16 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_DISABLE_TAP_TO_HOST + :annotation: = 65536 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_FULL_DUPLEX :annotation: = 1 .. py:data:: ETHERNET_SETTINGS10G_FLAG_ICS_SFP :annotation: = 64 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_IP_CONFIG_NOT_ALLOWED + :annotation: = 8192 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_LINK_MODE :annotation: = 128 .. py:data:: ETHERNET_SETTINGS10G_FLAG_LINK_MODE_AUTO :annotation: = 512 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_MACSEC_ENABLE + :annotation: = 131072 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_PHY_MODE :annotation: = 256 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_PKT_CHECK + :annotation: = 2048 + + .. py:data:: ETHERNET_SETTINGS10G_FLAG_PKT_GEN + :annotation: = 4096 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_RTSP_ENABLE :annotation: = 8 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_SHOW_TAP_TX_RECEIPT + :annotation: = 262144 + + .. py:data:: ETHERNET_SETTINGS10G_FLAG_SNF_TAP_ENABLE + :annotation: = 32768 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_TCPIP_ENABLE :annotation: = 4 + .. py:data:: ETHERNET_SETTINGS10G_FLAG_TCP_COMM_STATIC_PORT_ENABLE + :annotation: = 524288 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_CUT_THRU_TAP_ENABLE + :annotation: = 256 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_DISABLE_TAP_TO_HOST + :annotation: = 1024 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_IP_CONFIG_NOT_ALLOWED + :annotation: = 8 + .. py:data:: ETHERNET_SETTINGS2_FLAG2_LINK_MODE :annotation: = 1 @@ -1332,6 +1333,24 @@ Module Variables .. py:data:: ETHERNET_SETTINGS2_FLAG2_SFP_ID_SHIFT :annotation: = 4 + .. py:data:: ETHERNET_SETTINGS2_FLAG2_SHOW_TAP_TX_RECEIPT + :annotation: = 2048 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_SNF_TAP_ENABLE + :annotation: = 512 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_TAP_DEST_MASK + :annotation: = 3 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_TAP_DEST_SHIFT + :annotation: = 13 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_TC10_FWD_TAP_ENABLE + :annotation: = 32768 + + .. py:data:: ETHERNET_SETTINGS2_FLAG2_TCP_COMM_STATIC_PORT_ENABLE + :annotation: = 4096 + .. py:data:: ETHERNET_SETTINGS2_FLAG_AUTO_NEG :annotation: = 2 @@ -1420,22 +1439,19 @@ Module Variables :annotation: = 2048 .. py:data:: FLASH_ACCESSORY_EPSILON_10G_PHY1 - :annotation: = 2 - - .. py:data:: FLASH_ACCESSORY_EPSILON_10G_PHY1_PHY2 - :annotation: = 4 + :annotation: = 0 .. py:data:: FLASH_ACCESSORY_EPSILON_10G_PHY2 - :annotation: = 3 + :annotation: = 1 .. py:data:: FLASH_ACCESSORY_EPSILON_10G_PHY_FW_0_3_7_0 :annotation: = 0 .. py:data:: FLASH_ACCESSORY_EPSILON_SWITCH_A - :annotation: = 0 + :annotation: = 2 .. py:data:: FLASH_ACCESSORY_EPSILON_SWITCH_B - :annotation: = 1 + :annotation: = 3 .. py:data:: GENERIC_API_DATA_BUFFER_SIZE :annotation: = 513 @@ -1452,11 +1468,17 @@ Module Variables .. py:data:: GENERIC_BINARY_STATUS_ERROR_UNKNOWN_BINARY :annotation: = 1 - .. py:data:: GET_SUPPORTED_FEATURES_COMMAND_VERSION + .. py:data:: GIGASTAR2_FW_VARIANT_6T1S_1CAN_16LIN + :annotation: = 0 + + .. py:data:: GIGASTAR2_FW_VARIANT_8T1S_4CAN_6LIN :annotation: = 1 + .. py:data:: GIGASTAR2_FW_VARIANT_COUNT + :annotation: = 2 + .. py:data:: GLOBAL_SETTINGS_SIZE - :annotation: = 1480 + :annotation: = 2406 .. py:data:: GS_VERSION :annotation: = 5 @@ -1494,9 +1516,6 @@ Module Variables .. py:data:: HARDWARE_TIMESTAMP_ID_VSI :annotation: = 1 - .. py:data:: HW_ETH_SETTINGS_SIZE - :annotation: = 20 - .. py:data:: ISO15765_2_NETWORK_HSCAN :annotation: = 1 @@ -1563,6 +1582,9 @@ Module Variables .. py:data:: LOOPBACK :annotation: = 2 + .. py:data:: MACADDR_LEN + :annotation: = 6 + .. py:data:: MACSEC_CIPHER_GCM_AES_128 :annotation: = 0 @@ -1671,34 +1693,28 @@ Module Variables .. py:data:: MAX_PHY_SETTINGS_STRUCT :annotation: = 128 - .. py:data:: MAX_REPORTED_VERSIONS - :annotation: = 16 - .. py:data:: MAX_SERIAL :annotation: = 2176782335 - .. py:data:: MAX_VL_FORWARDING_ENTRIES - :annotation: = 1024 - - .. py:data:: MAX_VL_POLICING_ENTRIES - :annotation: = 1024 - .. py:data:: MIN_BASE36_SERIAL :annotation: = 16796160 + .. py:data:: MULTI_MACADDR_CNT + :annotation: = 32 + .. py:data:: NEODEVICE_ANY_ION :annotation: = 262144 .. py:data:: NEODEVICE_ANY_PLASMA :annotation: = 4096 - .. py:data:: NEODEVICE_BLUE + .. py:data:: NEODEVICE_BLUE_DEPRECATED :annotation: = 1 - .. py:data:: NEODEVICE_CMPROBE + .. py:data:: NEODEVICE_CMPROBE_DEPRECATED :annotation: = 8388608 - .. py:data:: NEODEVICE_CT_OBD + .. py:data:: NEODEVICE_CT_OBD_DEPRECATED :annotation: = 32768 .. py:data:: NEODEVICE_DONT_REUSE0 @@ -1713,34 +1729,34 @@ Module Variables .. py:data:: NEODEVICE_DONT_REUSE3 :annotation: = 1048576 - .. py:data:: NEODEVICE_DW_VCAN - :annotation: = 4 + .. py:data:: NEODEVICE_DONT_REUSE4 + :annotation: = 33554432 - .. py:data:: NEODEVICE_ECU - :annotation: = 128 + .. py:data:: NEODEVICE_DW_VCAN_DEPRECATED + :annotation: = 4 - .. py:data:: NEODEVICE_ECU22 + .. py:data:: NEODEVICE_ECU22_DEPRECATED :annotation: = 27 - .. py:data:: NEODEVICE_ECUCHIP_UART + .. py:data:: NEODEVICE_ECUCHIP_UART_DEPRECATED :annotation: = 2048 - .. py:data:: NEODEVICE_ECU_AVB + .. py:data:: NEODEVICE_ECU_AVB_DEPRECATED :annotation: = 2 - .. py:data:: NEODEVICE_EEVB + .. py:data:: NEODEVICE_ECU_DEPRECATED + :annotation: = 128 + + .. py:data:: NEODEVICE_EEVB_DEPRECATED :annotation: = 16777216 - .. py:data:: NEODEVICE_ETHER_BADGE + .. py:data:: NEODEVICE_ETHER_BADGE_DEPRECATED :annotation: = 22 - .. py:data:: NEODEVICE_FIRE - :annotation: = 8 - .. py:data:: NEODEVICE_FIRE2 :annotation: = 67108864 - .. py:data:: NEODEVICE_FIRE2_REDLINE + .. py:data:: NEODEVICE_FIRE2_REDLINE_DEPRECATED :annotation: = 21 .. py:data:: NEODEVICE_FIRE3 @@ -1749,19 +1765,31 @@ Module Variables .. py:data:: NEODEVICE_FIRE3_FLEXRAY :annotation: = 37 - .. py:data:: NEODEVICE_FLEX + .. py:data:: NEODEVICE_FIRE3_T1S_LIN + :annotation: = 42 + + .. py:data:: NEODEVICE_FIRE3_T1S_SENT + :annotation: = 43 + + .. py:data:: NEODEVICE_FIRE_DEPRECATED + :annotation: = 8 + + .. py:data:: NEODEVICE_FLEX_DEPRECATED :annotation: = 134217728 .. py:data:: NEODEVICE_GIGASTAR :annotation: = 19 - .. py:data:: NEODEVICE_IEVB + .. py:data:: NEODEVICE_GIGASTAR2 + :annotation: = 41 + + .. py:data:: NEODEVICE_IEVB_DEPRECATED :annotation: = 256 .. py:data:: NEODEVICE_ION :annotation: = 262144 - .. py:data:: NEODEVICE_NEOANALOG + .. py:data:: NEODEVICE_NEOANALOG_DEPRECATED :annotation: = 16384 .. py:data:: NEODEVICE_NEOECU12 @@ -1770,31 +1798,25 @@ Module Variables .. py:data:: NEODEVICE_NEOECUCHIP :annotation: = 256 - .. py:data:: NEODEVICE_NEW_DEVICE_27 - :annotation: = 39 - - .. py:data:: NEODEVICE_NEW_DEVICE_58 - :annotation: = 31 - - .. py:data:: NEODEVICE_NEW_DEVICE_59 - :annotation: = 33 + .. py:data:: NEODEVICE_NEOVI_CONNECT + :annotation: = 38 - .. py:data:: NEODEVICE_OBD2_DEV + .. py:data:: NEODEVICE_OBD2_DEV_DEPRECATED :annotation: = 26 .. py:data:: NEODEVICE_OBD2_LC :annotation: = 13 - .. py:data:: NEODEVICE_OBD2_PRO + .. py:data:: NEODEVICE_OBD2_PRO_DEPRECATED :annotation: = 1024 - .. py:data:: NEODEVICE_OBD2_SIM + .. py:data:: NEODEVICE_OBD2_SIM_DEPRECATED :annotation: = 2147483648 - .. py:data:: NEODEVICE_OBD2_SIM_DOIP + .. py:data:: NEODEVICE_OBD2_SIM_DOIP_DEPRECATED :annotation: = 25 - .. py:data:: NEODEVICE_PENDANT + .. py:data:: NEODEVICE_PENDANT_DEPRECATED :annotation: = 512 .. py:data:: NEODEVICE_PLASMA @@ -1803,6 +1825,9 @@ Module Variables .. py:data:: NEODEVICE_RADCOMET :annotation: = 36 + .. py:data:: NEODEVICE_RADCOMET3 + :annotation: = 39 + .. py:data:: NEODEVICE_RADEPSILON :annotation: = 24 @@ -1815,7 +1840,10 @@ Module Variables .. py:data:: NEODEVICE_RADGALAXY :annotation: = 268435456 - .. py:data:: NEODEVICE_RADGIGALOG + .. py:data:: NEODEVICE_RADGEMINI + :annotation: = 44 + + .. py:data:: NEODEVICE_RADGIGALOG_DEPRECATED :annotation: = 6 .. py:data:: NEODEVICE_RADIO_CANHUB @@ -1830,19 +1858,22 @@ Module Variables .. py:data:: NEODEVICE_RADMOON3 :annotation: = 35 - .. py:data:: NEODEVICE_RADPLUTO + .. py:data:: NEODEVICE_RADMOONT1S + :annotation: = 40 + + .. py:data:: NEODEVICE_RADPLUTO_DEPRECATED :annotation: = 9 .. py:data:: NEODEVICE_RADPROXIMA :annotation: = 30 - .. py:data:: NEODEVICE_RADSTAR - :annotation: = 524288 - .. py:data:: NEODEVICE_RADSTAR2 :annotation: = 536870912 - .. py:data:: NEODEVICE_RADSUPERMOON + .. py:data:: NEODEVICE_RADSTAR_DEPRECATED + :annotation: = 524288 + + .. py:data:: NEODEVICE_RADSUPERMOON_DEPRECATED :annotation: = 3 .. py:data:: NEODEVICE_RAD_A2B @@ -1851,22 +1882,22 @@ Module Variables .. py:data:: NEODEVICE_RAD_BMS :annotation: = 34 - .. py:data:: NEODEVICE_RAD_MOON_DUO - :annotation: = 14 + .. py:data:: NEODEVICE_RAD_GALAXY_2 + :annotation: = 33 - .. py:data:: NEODEVICE_RED - :annotation: = 64 + .. py:data:: NEODEVICE_RAD_MOON_DUO_DEPRECATED + :annotation: = 14 .. py:data:: NEODEVICE_RED2 :annotation: = 20 - .. py:data:: NEODEVICE_RED2_OEM - :annotation: = 38 + .. py:data:: NEODEVICE_RED_DEPRECATED + :annotation: = 64 .. py:data:: NEODEVICE_UNKNOWN :annotation: = 0 - .. py:data:: NEODEVICE_VCAN3 + .. py:data:: NEODEVICE_VCAN3_DEPRECATED :annotation: = 16 .. py:data:: NEODEVICE_VCAN41 @@ -1884,9 +1915,6 @@ Module Variables .. py:data:: NEODEVICE_VCAN4_IND :annotation: = 18 - .. py:data:: NEODEVICE_VCANRF - :annotation: = 33554432 - .. py:data:: NEODEVICE_VIVIDCAN :annotation: = 1073741824 @@ -1903,7 +1931,7 @@ Module Variables :annotation: = 0.065536 .. py:data:: NEOVI_3G_MAX_SETTINGS_SIZE - :annotation: = 1480 + :annotation: = 2406 .. py:data:: NEOVI_COMMTYPE_FIRE_USB :annotation: = 5 @@ -2001,6 +2029,54 @@ Module Variables .. py:data:: NETID_A2B_02 :annotation: = 523 + .. py:data:: NETID_AE_01 + :annotation: = 17 + + .. py:data:: NETID_AE_02 + :annotation: = 18 + + .. py:data:: NETID_AE_03 + :annotation: = 19 + + .. py:data:: NETID_AE_04 + :annotation: = 45 + + .. py:data:: NETID_AE_05 + :annotation: = 46 + + .. py:data:: NETID_AE_06 + :annotation: = 73 + + .. py:data:: NETID_AE_07 + :annotation: = 75 + + .. py:data:: NETID_AE_08 + :annotation: = 76 + + .. py:data:: NETID_AE_09 + :annotation: = 77 + + .. py:data:: NETID_AE_10 + :annotation: = 78 + + .. py:data:: NETID_AE_11 + :annotation: = 79 + + .. py:data:: NETID_AE_12 + :annotation: = 87 + + .. py:data:: NETID_AE_13 + :annotation: = 553 + + .. py:data:: NETID_AE_14 + :annotation: = 554 + + .. py:data:: NETID_AE_15 + :annotation: = 555 + + .. py:data:: NETID_AE_16 + :annotation: = 556 + .. py:data:: NETID_AUTOSAR :annotation: = 515 @@ -2022,6 +2098,30 @@ Module Variables .. py:data:: NETID_DEVICE_STATUS :annotation: = 513 + .. py:data:: NETID_DWCAN_01 + :annotation: = 1 + + .. py:data:: NETID_DWCAN_02 + :annotation: = 42 + + .. py:data:: NETID_DWCAN_03 + :annotation: = 44 + + .. py:data:: NETID_DWCAN_04 + :annotation: = 61 + + .. py:data:: NETID_DWCAN_05 + :annotation: = 62 + + .. py:data:: NETID_DWCAN_06 + :annotation: = 96 + + .. py:data:: NETID_DWCAN_07 + :annotation: = 97 + + .. py:data:: NETID_DWCAN_08 + :annotation: = 2 + .. py:data:: NETID_DWCAN_09 :annotation: = 534 @@ -2178,6 +2278,30 @@ Module Variables .. py:data:: NETID_LIN_08 :annotation: = 543 + .. py:data:: NETID_LIN_09 + :annotation: = 563 + + .. py:data:: NETID_LIN_10 + :annotation: = 564 + + .. py:data:: NETID_LIN_11 + :annotation: = 565 + + .. py:data:: NETID_LIN_12 + :annotation: = 566 + + .. py:data:: NETID_LIN_13 + :annotation: = 567 + + .. py:data:: NETID_LIN_14 + :annotation: = 568 + + .. py:data:: NETID_LIN_15 + :annotation: = 569 + + .. py:data:: NETID_LIN_16 + :annotation: = 570 + .. py:data:: NETID_LSFTCAN :annotation: = 4 @@ -2298,6 +2422,24 @@ Module Variables .. py:data:: NETID_SPI2 :annotation: = 544 + .. py:data:: NETID_SPI3 + :annotation: = 557 + + .. py:data:: NETID_SPI4 + :annotation: = 558 + + .. py:data:: NETID_SPI5 + :annotation: = 559 + + .. py:data:: NETID_SPI6 + :annotation: = 560 + + .. py:data:: NETID_SPI7 + :annotation: = 561 + + .. py:data:: NETID_SPI8 + :annotation: = 562 + .. py:data:: NETID_SWCAN :annotation: = 3 @@ -2331,6 +2473,18 @@ Module Variables .. py:data:: NETID_WBMS2 :annotation: = 533 + .. py:data:: NETWORK_TIMESYNC_AUTO + :annotation: = 1 + + .. py:data:: NETWORK_TIMESYNC_GPS_ONLY + :annotation: = 3 + + .. py:data:: NETWORK_TIMESYNC_NTP_ONLY + :annotation: = 2 + + .. py:data:: NETWORK_TIMESYNC_OFF + :annotation: = 0 + .. py:data:: NORMAL :annotation: = 0 @@ -2344,7 +2498,7 @@ Module Variables :annotation: = 1 .. py:data:: NUM_VALID_DEVICE_FEATURES - :annotation: = 17 + :annotation: = 20 .. py:data:: OPETH_FUNC_MEDIACONVERTER :annotation: = 1 @@ -2421,6 +2575,9 @@ Module Variables .. py:data:: PHY_REG_PKT_VERSION :annotation: = 1 + .. py:data:: PHY_UNKNOWN + :annotation: = 255 + .. py:data:: PLASMA_SLAVE1_OFFSET :annotation: = 100 @@ -2439,45 +2596,15 @@ Module Variables .. py:data:: PLASMA_SLAVE_NUM :annotation: = 51 - .. py:data:: PLUTO_MAX_FORWARDING_ENTRIES - :annotation: = 13 - - .. py:data:: PLUTO_MAX_L2_ADDRESS_LOOKUP - :annotation: = 1024 - - .. py:data:: PLUTO_MAX_L2_POLICING - :annotation: = 45 - - .. py:data:: PLUTO_MAX_MAC_CONFIG_ENTRIES - :annotation: = 5 - - .. py:data:: PLUTO_MAX_RETAGGING_ENTRIES - :annotation: = 32 - - .. py:data:: PLUTO_MAX_VLAN_LOOKUP - :annotation: = 4096 - - .. py:data:: PLUTO_NUM_PORTS - :annotation: = 5 - - .. py:data:: PLUTO_NUM_PRIORITY - :annotation: = 8 - - .. py:data:: PROXIMA_NUM_PORTS - :annotation: = 19 - .. py:data:: RADEPSILON_MAX_PHY :annotation: = 18 .. py:data:: RADEPSILON_NUM_PORTS - :annotation: = 9 + :annotation: = 18 .. py:data:: RADJUPITER_NUM_PORTS :annotation: = 8 - .. py:data:: RADMOONDUO_CONVERTER_SETTINGS_SIZE - :annotation: = 16 - .. py:data:: RAD_GPTP_AND_TAP_SETTINGS_SIZE :annotation: = 40 @@ -2511,6 +2638,9 @@ Module Variables .. py:data:: RAD_REPORTING_SETTINGS_FLAG_MISC2_PWMIN :annotation: = 128 + .. py:data:: RAD_REPORTING_SETTINGS_FLAG_REPORT_ORIENTATION_ENABLE + :annotation: = 2048 + .. py:data:: RAD_REPORTING_SETTINGS_FLAG_SERDES_ENABLE :annotation: = 512 @@ -2586,9 +2716,6 @@ Module Variables .. py:data:: SCRIPT_LOCATION_SDCARD :annotation: = 1 - .. py:data:: SCRIPT_LOCATION_VCAN3_MEM - :annotation: = 4 - .. py:data:: SCRIPT_STATUS_RUNNING :annotation: = 1 @@ -2943,6 +3070,15 @@ Module Variables .. py:data:: SFP_ID_FS_GB_GE_T :annotation: = 2 + .. py:data:: SFP_ID_ICS_AD1101 + :annotation: = 8 + + .. py:data:: SFP_ID_ICS_EN11100 + :annotation: = 7 + + .. py:data:: SFP_ID_ICS_MC8670 + :annotation: = 6 + .. py:data:: SFP_ID_ICS_MV2112A2 :annotation: = 3 @@ -2953,7 +3089,7 @@ Module Variables :annotation: = 5 .. py:data:: SFP_ID_MAX - :annotation: = 6 + :annotation: = 9 .. py:data:: SFP_ID_UNKNOWN :annotation: = 0 @@ -3117,6 +3253,9 @@ Module Variables .. py:data:: SPY_STATUS2_ETHERNET_CRC_ERROR :annotation: = 2097152 + .. py:data:: SPY_STATUS2_ETHERNET_FCS_AVAILABLE + :annotation: = 8388608 + .. py:data:: SPY_STATUS2_ETHERNET_FCS_VERIFIED :annotation: = 268435456 @@ -3189,6 +3328,9 @@ Module Variables .. py:data:: SPY_STATUS2_ISO_PARITY_ERROR :annotation: = 536870912 + .. py:data:: SPY_STATUS2_ISO_RX_TIMEOUT_ERROR + :annotation: = 1073741824 + .. py:data:: SPY_STATUS2_LIN_ERR_MSG_ID_PARITY :annotation: = 67108864 @@ -3213,6 +3355,9 @@ Module Variables .. py:data:: SPY_STATUS2_LIN_NO_SLAVE_DATA :annotation: = 2147483648 + .. py:data:: SPY_STATUS2_LIN_RX_TIMEOUT_ERROR + :annotation: = 1073741824 + .. py:data:: SPY_STATUS2_LIN_SLAVE_BYTE_ERROR :annotation: = 536870912 @@ -3279,6 +3424,9 @@ Module Variables .. py:data:: SPY_STATUS2_MOST_PACKET_DATA :annotation: = 2097152 + .. py:data:: SPY_STATUS2_MOST_STATUS + :annotation: = 4194304 + .. py:data:: SPY_STATUS2_MOST_TOO_SHORT :annotation: = 268435456 @@ -3306,6 +3454,63 @@ Module Variables .. py:data:: SPY_STATUS3_CANFD_RTR :annotation: = 4 + .. py:data:: SPY_STATUS3_CAN_BUS_OFF + :annotation: = 2 + + .. py:data:: SPY_STATUS3_CAN_DATAERR_ACK_ERROR + :annotation: = 1024 + + .. py:data:: SPY_STATUS3_CAN_DATAERR_BIT0_ERROR + :annotation: = 4096 + + .. py:data:: SPY_STATUS3_CAN_DATAERR_BIT1_ERROR + :annotation: = 2048 + + .. py:data:: SPY_STATUS3_CAN_DATAERR_CRC_ERROR + :annotation: = 8192 + + .. py:data:: SPY_STATUS3_CAN_DATAERR_FORM_ERROR + :annotation: = 512 + + .. py:data:: SPY_STATUS3_CAN_DATAERR_NOCHANGE + :annotation: = 16384 + + .. py:data:: SPY_STATUS3_CAN_DATAERR_STUFF_ERROR + :annotation: = 256 + + .. py:data:: SPY_STATUS3_CAN_ERR_PASSIVE + :annotation: = 1 + + .. py:data:: SPY_STATUS3_CAN_ERR_WARNING + :annotation: = 4 + + .. py:data:: SPY_STATUS3_CAN_GENERR_ACK_ERROR + :annotation: = 262144 + + .. py:data:: SPY_STATUS3_CAN_GENERR_BIT0_ERROR + :annotation: = 1048576 + + .. py:data:: SPY_STATUS3_CAN_GENERR_BIT1_ERROR + :annotation: = 524288 + + .. py:data:: SPY_STATUS3_CAN_GENERR_CRC_ERROR + :annotation: = 2097152 + + .. py:data:: SPY_STATUS3_CAN_GENERR_FORM_ERROR + :annotation: = 131072 + + .. py:data:: SPY_STATUS3_CAN_GENERR_NOCHANGE + :annotation: = 4194304 + + .. py:data:: SPY_STATUS3_CAN_GENERR_STUFF_ERROR + :annotation: = 65536 + + .. py:data:: SPY_STATUS3_ETHERNET_T1S_WAKE + :annotation: = 2 + + .. py:data:: SPY_STATUS3_ETHERNET_TX_COLLISION + :annotation: = 1 + .. py:data:: SPY_STATUS3_LIN_JUST_BREAK_SYNC :annotation: = 1 @@ -3315,6 +3520,12 @@ Module Variables .. py:data:: SPY_STATUS3_LIN_SLAVE_DATA_TOO_SHORT :annotation: = 2 + .. py:data:: SPY_STATUS4_ETH_CRC_ERROR + :annotation: = 1 + + .. py:data:: SPY_STATUS4_ETH_FRAME_TOO_LONG + :annotation: = 2 + .. py:data:: SPY_STATUS_A2B_CONTROL :annotation: = 268435456 @@ -3465,6 +3676,9 @@ Module Variables .. py:data:: TIMESYNC_ICSHARDWARE_SETTINGS_SIZE :annotation: = 4 + .. py:data:: UART_DATA_BUFFER_SIZE + :annotation: = 256 + .. py:data:: UART_SETTINGS_SIZE :annotation: = 16 diff --git a/docs/superpowers/plans/2026-07-07-header-3.26.3.9-epoch-versioning.md b/docs/superpowers/plans/2026-07-07-header-3.26.3.9-epoch-versioning.md new file mode 100644 index 000000000..f918c5269 --- /dev/null +++ b/docs/superpowers/plans/2026-07-07-header-3.26.3.9-epoch-versioning.md @@ -0,0 +1,426 @@ +# icsnVC40.h 3.26.3.9 Update + Epoch Versioning Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Update python_ics to the Vehicle Spy 3.26.3.9 headers and adopt PEP 440 epoch versioning (`1!26.3.9`) so pip orders new releases above the old 923.x scheme. + +**Architecture:** Headers are copied verbatim from `C:\dev\vspy3\Core\Hardware\`; all Python-visible constants and ctypes structs regenerate automatically during the build (setup.py runs `generate_icsneo40_structs.generate_all_files()` on import and `extract_icsneo40_defines.extract()` in build_py). Versions come from git tags via dunamai, which already parses epoch tags — the versioning change is a tagging convention plus documentation, zero code. + +**Tech Stack:** CPython 3.14.5 venv at `.venv`, uv, setuptools, clang/clang-format (required on PATH), pytest, MSVC. + +## Global Constraints + +- Branch: `feature/header-3.26.3.9` (already exists, based on master at d6e0abf which includes the PR #233 generator fixes). +- Build command: `uv pip install -e . --reinstall` from `C:\dev\python_ics`. If it fails with `could not delete 'gen\ics\ics.cp314-win_amd64.pyd': Access is denied`, delete that file first and retry (known transient lock). +- Test command: `.venv/Scripts/python -m pytest tests/ -v` — all tests must pass before every commit. +- Version scheme: PEP 440 epoch `1!26.3.9`; release tags are `v1!`. Never tag a bare `v26.x` — it sorts below 923.11. +- Tracked generated files that WILL change and MUST be committed with the header update: `src/setup_module_auto_defines.cpp`, `cicsSpyStatusBits_processed.h`. Untracked build artifacts that will also change (do NOT commit): `icsnVC40_processed.h`, `icsnVC40.h.json`, `icsnVC40.h.enums.json`, everything under `gen/`. +- Known-stale upstream macro (still wrong in 3.26.3.9, verified): `RAD_GPTP_AND_TAP_SETTINGS_SIZE` is 40 but the real struct is 56 bytes. It stays allowlisted in the size test; flag to the header owners separately. +- Scope exclusion: no new 3.26 DLL API bindings; header, regen, versioning, docs only. + +--- + +### Task 1: Struct-size regression test (baseline against current headers) + +**Files:** +- Test: `tests/test_struct_sizes.py` (create) + +**Interfaces:** +- Consumes: `ics` module `*_SIZE` constants (89 of them, e.g. `ics.SFire3Settings_SIZE == 1722`) and `ics.structures.*` generated ctypes classes. +- Produces: `tests/test_struct_sizes.py::test_generated_struct_sizes_match_header_macros` — Task 2 relies on this test staying green after regeneration. + +- [ ] **Step 1: Write the test** + +```python +"""Validate generated ctypes struct sizes against the header's *_SIZE macros. + +Every `#define _SIZE (N)` in icsnVC40.h is exported as a module +constant; the matching generated ctypes struct must have the same +ctypes.sizeof. Catches header/generator layout drift on header updates. +""" +import ctypes +import importlib +import inspect +import pkgutil + +import pytest +import ics +import ics.structures + +# Upstream header bugs: macro value disagrees with the actual struct. +# Keep entries here only with a comment explaining the discrepancy. +KNOWN_STALE_MACROS = { + # Upstream never updated the macro after the struct grew to 56 bytes + # (still 40 in vspy 3.26.3.9). Reported to header owners. + "RAD_GPTP_AND_TAP_SETTINGS_SIZE", +} + +# Macros whose name doesn't map to a generated struct class (nested/typedef +# variants). Count is asserted so silent growth gets investigated. +EXPECTED_UNMATCHED = 11 + + +def _struct_registry(): + registry = {} + for info in pkgutil.iter_modules(ics.structures.__path__): + mod = importlib.import_module(f"ics.structures.{info.name}") + for name, obj in inspect.getmembers(mod, inspect.isclass): + if ( + issubclass(obj, (ctypes.Structure, ctypes.Union)) + and obj.__module__ == mod.__name__ + ): + registry["".join(c for c in name.lower() if c.isalnum())] = obj + return registry + + +def test_generated_struct_sizes_match_header_macros(): + registry = _struct_registry() + mismatches = [] + unmatched = [] + matched = 0 + for macro in (n for n in dir(ics) if n.endswith("_SIZE")): + key = "".join(c for c in macro[:-5].lower() if c.isalnum()) + cls = registry.get(key) + if cls is None: + unmatched.append(macro) + continue + expected = getattr(ics, macro) + actual = ctypes.sizeof(cls) + if actual == expected: + matched += 1 + elif macro not in KNOWN_STALE_MACROS: + mismatches.append(f"{macro}: header says {expected}, ctypes says {actual}") + assert not mismatches, "\n".join(mismatches) + assert matched >= 77, f"only {matched} macros matched a struct; mapping regressed" + assert len(unmatched) <= EXPECTED_UNMATCHED, f"unmatched grew: {sorted(unmatched)}" +``` + +- [ ] **Step 2: Run the test, verify it passes against the current build** + +Run: `.venv/Scripts/python -m pytest tests/test_struct_sizes.py -v` +Expected: PASS (77+ matched, only the allowlisted macro mismatching, ≤11 unmatched). +If it fails, the current build is stale — rebuild (`uv pip install -e . --reinstall`) and rerun before proceeding. + +- [ ] **Step 3: Commit** + +```bash +git add tests/test_struct_sizes.py +git commit -m "Add struct-size regression test against header _SIZE macros + +Co-Authored-By: Claude Fable 5 " +``` + +--- + +### Task 2: Import 3.26.3.9 headers, fix renames, regenerate + +**Files:** +- Modify: `include/ics/icsnVC40.h` (replace, from `C:\dev\vspy3\Core\Hardware\icsnVC40.h`) +- Modify: `include/ics/cicsSpyStatusBits.h` (replace, from `C:\dev\vspy3\Core\Hardware\cicsSpyStatusBits.h`) +- Delete: `include/ics/icsnVC40.h.patch` +- Modify: `src/methods.cpp:675-741` (9 renamed `case NEODEVICE_*:` labels) +- Modify (regenerated by build, commit results): `src/setup_module_auto_defines.cpp`, `cicsSpyStatusBits_processed.h` +- Test: `tests/test_header_3_26.py` (create) + +**Interfaces:** +- Consumes: `tests/test_struct_sizes.py::test_generated_struct_sizes_match_header_macros` from Task 1. +- Produces: an `ics` module built from the 3.26.3.9 header — Tasks 3 and 4 build and verify against it. New constants of note: `NEODEVICE_BLUE_DEPRECATED` (0x1), `SRADGalaxy2Settings_SIZE == 1204`; removed names: `NEODEVICE_BLUE`, `NEODEVICE_FIRE`, `SRedSettings`/`SFireSettings` structs. + +- [ ] **Step 1: Write the failing header-version test** + +```python +"""Pins that the module is generated from the vspy 3.26.3.9 header.""" +import pytest +import ics + + +def test_deprecated_device_constants_renamed(): + # 3.26.3.9 renamed the legacy device defines; old names must be gone. + assert ics.NEODEVICE_BLUE_DEPRECATED == 0x00000001 + assert ics.NEODEVICE_FIRE_DEPRECATED == 0x00000008 + assert ics.NEODEVICE_VCAN3_DEPRECATED == 0x00000010 + assert not hasattr(ics, "NEODEVICE_BLUE") + assert not hasattr(ics, "NEODEVICE_FIRE") + assert not hasattr(ics, "NEODEVICE_VCAN3") + + +def test_grown_settings_structs(): + # Struct growth pinned from the 3.26.3.9 header's _SIZE macros. + assert ics.SRADGalaxy2Settings_SIZE == 1204 + assert ics.SRADComet3Settings_SIZE == 918 + assert ics.SRADGigastar2Settings_SIZE == 2400 + + +def test_legacy_settings_structs_removed(): + import ics.structures + with pytest.raises(ImportError): + from ics.structures import s_red_settings # noqa: F401 + + +if __name__ == "__main__": + pytest.main(args=[__file__, "--verbose", "-s"]) +``` + +Note: if the legacy struct module is named differently (check `gen/ics/structures/` for `s_red_settings.py` before the header swap), adjust the import in `test_legacy_settings_structs_removed` to the actual module name that exists pre-update. + +- [ ] **Step 2: Run it, verify it fails on the current build** + +Run: `.venv/Scripts/python -m pytest tests/test_header_3_26.py -v` +Expected: FAIL — `AttributeError: module 'ics' has no attribute 'NEODEVICE_BLUE_DEPRECATED'`. + +- [ ] **Step 3: Copy the new headers and drop the patch** + +```bash +cp C:/dev/vspy3/Core/Hardware/icsnVC40.h include/ics/icsnVC40.h +cp C:/dev/vspy3/Core/Hardware/cicsSpyStatusBits.h include/ics/cicsSpyStatusBits.h +git rm include/ics/icsnVC40.h.patch +``` + +Then sanity-review: `git diff --stat include/ics/` and skim `git diff include/ics/icsnVC40.h` for anything beyond the expected changes (deprecated renames, removed legacy settings structs, new RADComet3/RADGigastar2/CMP structures, `pack(4)` now around only the `icsDeviceStatus` union, grown structs). + +- [ ] **Step 4: Rename the 9 deprecated case labels in src/methods.cpp** + +In the legacy device-name fallback switch (only reached when `icsneoGetDeviceName` is unavailable in the DLL), apply exactly these renames — line numbers from the current file: + +| Line | Old | New | +|---|---|---| +| 675 | `case NEODEVICE_BLUE:` | `case NEODEVICE_BLUE_DEPRECATED:` | +| 677 | `case NEODEVICE_DW_VCAN:` | `case NEODEVICE_DW_VCAN_DEPRECATED:` | +| 683 | `case NEODEVICE_FIRE:` | `case NEODEVICE_FIRE_DEPRECATED:` | +| 693 | `case NEODEVICE_VCAN3:` | `case NEODEVICE_VCAN3_DEPRECATED:` | +| 731 | `case NEODEVICE_RED:` | `case NEODEVICE_RED_DEPRECATED:` | +| 733 | `case NEODEVICE_ECU:` | `case NEODEVICE_ECU_DEPRECATED:` | +| 735 | `case NEODEVICE_PENDANT:` | `case NEODEVICE_PENDANT_DEPRECATED:` | +| 739 | `case NEODEVICE_NEOANALOG:` | `case NEODEVICE_NEOANALOG_DEPRECATED:` | +| 741 | `case NEODEVICE_CT_OBD:` | `case NEODEVICE_CT_OBD_DEPRECATED:` | + +(`NEODEVICE_RED2` at line 703 is NOT renamed — only the nine above.) The returned display strings stay unchanged. + +- [ ] **Step 5: Rebuild (this regenerates all constants and structs)** + +Run: `uv pip install -e . --reinstall` +Expected: success. If the compiler flags any other renamed/removed identifier in `src/*.cpp`, fix it the same way (use the new header's name) and rerun. If the clang preprocess step in `extract_icsneo40_defines.extract()` errors on a new header construct, stop and investigate — do not hand-edit generated files. + +- [ ] **Step 6: Run the new test and the full suite** + +Run: `.venv/Scripts/python -m pytest tests/ -v` +Expected: ALL pass, including `test_header_3_26.py` (now green) and `test_struct_sizes.py` (any new mismatch beyond the allowlisted macro means a generator/layout bug — investigate before proceeding, do not extend the allowlist without a root cause). + +- [ ] **Step 7: Commit** + +```bash +git add include/ics/icsnVC40.h include/ics/cicsSpyStatusBits.h src/methods.cpp \ + src/setup_module_auto_defines.cpp cicsSpyStatusBits_processed.h \ + tests/test_header_3_26.py +git rm --cached include/ics/icsnVC40.h.patch 2>/dev/null || true +git commit -m "Update headers to Vehicle Spy 3.26.3.9 + +- icsnVC40.h / cicsSpyStatusBits.h copied verbatim from vspy3 Core/Hardware +- drop local icsnVC40.h.patch: upstream now carries its own pack(4) + around icsDeviceStatus, matching what the 3.26.3.9 DLL was built against +- legacy device constants renamed *_DEPRECATED upstream; legacy settings + structs removed (breaking; signaled by the 1!26.3.9 epoch release) +- regenerate module defines and processed headers + +Co-Authored-By: Claude Fable 5 " +``` + +--- + +### Task 3: Epoch versioning — README, release doc, dry run + +**Files:** +- Modify: `README.md` (add a Versioning section after the install instructions) +- No code changes (dunamai already parses `v1!26.3.9` → `1!26.3.9`; verified). + +**Interfaces:** +- Consumes: the built module from Task 2. +- Produces: documented tagging convention; a locally verified wheel proving pip resolves `1!26.3.9` over `923.11`. + +- [ ] **Step 1: Add the Versioning section to README.md** + +```markdown +## Versioning + +Starting with **1!26.3.9**, python_ics versions track the Vehicle Spy +version they were generated from (Vspy 3.26.3.9 → python_ics 26.3.9). + +The `1!` prefix is a [PEP 440 epoch](https://peps.python.org/pep-0440/#version-epochs). +Earlier releases used the icsneo40 DLL version (e.g. 923.11), which sorts +*above* 26.x, so the epoch tells pip the scheme changed: + +- `pip install python_ics` and `pip install -U python_ics` correctly + resolve `1!26.3.9` as newer than `923.11`. +- Exact pins must include the epoch: `python_ics==1!26.3.9`. +- Range pins work with or without it: `python_ics>=1!26.3` . + +**Release tagging:** tags are `v1!` (e.g. `v1!26.3.9`). Every +future tag keeps the `1!` prefix — a bare `v26.x` tag would sort below +the historical 923.x releases and pip would ignore it. +``` + +- [ ] **Step 2: Dry-run the epoch version end to end with a local tag** + +```bash +git tag -a "v1!26.3.9" -m "dry run" # local only, deleted below +.venv/Scripts/python -c "import dunamai; print(dunamai.Version.from_git().serialize(metadata=False))" +``` + +Expected output: `1!26.3.9`. + +```bash +uv build +ls dist/ +``` + +Expected: an sdist and wheel whose METADATA says `Version: 1!26.3.9` (verify: `unzip -p dist/*.whl */METADATA | grep ^Version`). The `!` may be encoded in the filename — the METADATA field is what matters. + +- [ ] **Step 3: Prove pip resolves the epoch version above 923.11** + +```bash +mkdir -p /tmp/links && cp dist/*.whl /tmp/links/ +.venv/Scripts/python -m pip download python_ics==923.11 --no-deps -d /tmp/links +.venv/Scripts/python -m pip install --dry-run --no-index --find-links /tmp/links -U python_ics +``` + +Expected: the dry-run resolves `python_ics 1!26.3.9` (not 923.11). + +- [ ] **Step 4: Clean up the dry-run tag and artifacts** + +```bash +git tag -d "v1!26.3.9" +rm -rf dist/ /tmp/links +``` + +The real `v1!26.3.9` tag is applied to the merge commit at release time, and the release workflow publishes from that tag. + +- [ ] **Step 5: Run full suite, commit** + +Run: `.venv/Scripts/python -m pytest tests/ -v` — all pass. + +```bash +git add README.md +git commit -m "Document 1!26.3.9 epoch versioning and tagging convention + +Co-Authored-By: Claude Fable 5 " +``` + +--- + +### Task 4: FIRE3 hardware verification + +**Files:** +- Create (scratchpad, not committed): `/verify_326_fire3.py` + +**Interfaces:** +- Consumes: the built module from Task 2; the FIRE3 on the bench (serial ON0569). +- Produces: verification results for the PR description (Task 5). No repo changes. + +- [ ] **Step 1: Write and run the verification script** + +```python +"""3.26.3.9 header hardware verification against the bench FIRE3.""" +import time + +import ics + +print("DLL/API info:") +try: + print(" dll version:", ics.get_dll_version()) +except Exception as ex: + print(" get_dll_version unavailable:", ex) + +devs = ics.find_devices([ics.NEODEVICE_FIRE3]) +assert devs, "No FIRE3 found" +dev = devs[0] +print("device:", dev, "serial:", dev.serial_number) + +ics.open_device(dev) +try: + print("get_serial_number:", ics.get_serial_number(dev)) + + # get_device_status failed with the old (patched) header; the matched + # 3.26.3.9 layout may fix it. Either outcome is recorded, not asserted. + try: + status = ics.get_device_status(dev) + print("get_device_status: OK,", type(status).__name__) + except Exception as ex: + print("get_device_status still failing:", ex) + + settings = ics.get_device_settings(dev) + f3 = settings.Settings.fire3 + orig_ne, orig_ne2 = f3.network_enables, f3.network_enables_2 + f3.network_enables = 0xFFFFFFFFFFFFFFFF + f3.network_enables_2 = 0xFFFFFFFFFFFFFFFF + ics.set_device_settings(dev, settings, 0) # RAM only, restored below + try: + netid = ics.NETID_ETHERNET2 + time.sleep(3) + ics.get_messages(dev) # flush + + msg = ics.SpyMessage() + msg.NetworkID = netid & 0xFF + msg.NetworkID2 = (netid >> 8) & 0xFF + msg.Protocol = ics.SPY_PROTOCOL_ETHERNET + payload = [0xFF] * 6 + [0x00, 0xFC, 0x70, 0x11, 0x22, 0x33, 0x08, 0x06] + list(range(50)) + msg.ExtraDataPtr = tuple(payload) + ics.transmit_messages(dev, msg) + time.sleep(1.0) + + msgs, errors = ics.get_messages(dev) + tx_ok = any( + (m.NetworkID | (m.NetworkID2 << 8)) == netid + and m.StatusBitField & ics.SPY_STATUS_TX_MSG + and tuple(m.ExtraDataPtr or ()) == tuple(payload) + for m in msgs + ) + print(f"{len(msgs)} messages, {errors} errors; ethernet tx roundtrip ok: {tx_ok}") + assert tx_ok, "no byte-exact TX report on NETID_ETHERNET2" + finally: + f3.network_enables, f3.network_enables_2 = orig_ne, orig_ne2 + ics.set_device_settings(dev, settings, 0) + print("settings restored (RAM only)") +finally: + ics.close_device(dev) +print("PASS") +``` + +Run: `.venv/Scripts/python /verify_326_fire3.py` +Expected: `PASS`, with the Ethernet tx roundtrip byte-exact. Record the `get_device_status` outcome either way. If `ics.get_dll_version` reports a driver older than 3.26.3.9, note that `get_device_status` verification is inconclusive rather than blocking. + +- [ ] **Step 2: Record results** + +Save the script output — it goes verbatim into the PR description in Task 5. No commit. + +--- + +### Task 5: Push and open the PR + +**Files:** none (git operations only). + +**Interfaces:** +- Consumes: all prior commits on `feature/header-3.26.3.9`; hardware results from Task 4. + +- [ ] **Step 1: Final full-suite run** + +Run: `.venv/Scripts/python -m pytest tests/ -v` +Expected: all tests pass. + +- [ ] **Step 2: Push and create the PR** + +```bash +git push -u origin feature/header-3.26.3.9 +gh pr create --title "Update headers to Vehicle Spy 3.26.3.9; adopt 1!26.3.9 epoch versioning" --body "" +``` + +PR body must include: summary of the header changes (deprecated renames, removed legacy structs, new/grown structs, patch drop rationale), the versioning migration explanation (epoch, tagging convention, pip resolution proof from Task 3 step 3), the Task 4 hardware verification output, and the breaking-change callout. End the body with: + +``` +🤖 Generated with [Claude Code](https://claude.com/claude-code) +``` + +- [ ] **Step 3: Post-merge release checklist (for the maintainer, in PR body)** + +- Merge the PR. +- Tag the merge commit: `git tag -a "v1!26.3.9" -m "Vehicle Spy 3.26.3.9" && git push origin "v1!26.3.9"`. +- Publish; verify PyPI shows `1!26.3.9` as latest. diff --git a/docs/superpowers/specs/2026-07-07-header-update-epoch-versioning-design.md b/docs/superpowers/specs/2026-07-07-header-update-epoch-versioning-design.md new file mode 100644 index 000000000..3240ddd4f --- /dev/null +++ b/docs/superpowers/specs/2026-07-07-header-update-epoch-versioning-design.md @@ -0,0 +1,92 @@ +# Design: icsnVC40.h 3.26.3.9 update + PEP 440 epoch versioning + +Date: 2026-07-07 +Status: approved + +## Problem + +1. python_ics headers are at the v923-era icsnVC40.h; Vehicle Spy 3.26.3.9 + (`C:\dev\vspy3\Core\Hardware\`) ships a newer header with renamed + deprecated devices, removed legacy settings structs, and new/grown + structures. +2. The project's versioning scheme changed from `923.11` (icsneo40 DLL + era) to `26.3.9` (Vspy-aligned). PEP 440 orders `923.11 > 26.3.9`, so a + plain `26.3.9` upload would never be selected by pip: fresh installs + would keep resolving 923.11 and existing users would never see + upgrades. Nothing 26.x has been published to PyPI (verified 2026-07-07; + latest is 923.11), so the fix can land before anything breaks. + +## Decisions (made with maintainer) + +- **Version scheme:** PEP 440 epoch — release as `1!26.3.9`. +- **Legacy names:** mirror the new header as-is; no Python-side compat + aliases for `NEODEVICE_BLUE`/`_FIRE`/`_VCAN3`/... (now `*_DEPRECATED`) + or the deleted `SRedSettings`/`SFireSettings`/... structs. The epoch + bump is the breaking-change signal; legacy-device users stay on 923.11. +- **Local header patch:** drop `include/ics/icsnVC40.h.patch`. Upstream + 3.26.3.9 carries its own `pack(4)` (around the `icsDeviceStatus` union + only). Matching the exact header the 3.26.3.9 icsneo40.dll was built + against is the ABI-safe choice. + +## 1. Versioning migration + +Versions come from git tags via dunamai (`ics_utility.get_pkg_version`). +dunamai's default tag pattern already parses epochs (verified: +`v1!26.3.9` → `1!26.3.9`), so no version-machinery code changes. + +- Tag releases `v1!`: first one is `v1!26.3.9`. +- Dry-run before tagging: build sdist+wheel locally, confirm wheel + filename and METADATA carry `1!26.3.9`, and confirm pip resolves the + local wheel as an upgrade over an installed 923.11. +- README: short section explaining the epoch — why `1!` exists, that + `pip install -U python_ics` moves 923.11 users to `1!26.3.9`, and that + exact pins must be `==1!26.3.9`. +- Release-process note: all future tags keep the `1!` prefix + (`v1!26.4.0`, ...). A bare `v26.4.0` tag would silently sort below + 923.11 again. +- No PyPI yanking required. + +## 2. Header import + +- Copy `C:\dev\vspy3\Core\Hardware\icsnVC40.h` and `cicsSpyStatusBits.h` + verbatim into `include/ics/`. +- Delete `include/ics/icsnVC40.h.patch`. +- Sanity-diff old vs new header; expected changes: deprecated renames, + legacy settings structs removed, RADComet3 / RADGigastar2 / CMP + structures added, grown structs (SRADGalaxy2Settings 960→1204, + SRADComet3Settings 918, SRADGigastar2Settings 2400). +- Verify `descIdType` is still `int16_t` (generator carries a hand-coded + override in generate_icsneo40_structs.py). + +## 3. Regeneration and build + +- Work off `master` (PR #233 is merged as d6e0abf) — its generator fixes + (unsigned 32-bit enum handling, descIdType) are prerequisites for a + clean regen. +- Rerun extract_icsneo40_defines.py / generate_icsneo40_structs.py + pipeline; regenerate setup_module_auto_defines.cpp and ctypes structs. +- Rebuild the extension; fix any C++ references to renamed NEODEVICE_* + constants surfaced by the compiler. +- Validate generated ctypes struct sizes against the header's `*_SIZE` + macros (same method as the June 2026 audit), with attention to the + grown/new structs. +- Out of scope: binding any new 3.26 DLL APIs. Header, regen, and + versioning only. + +## 4. Testing and hardware verification + +- Full pytest suite passes (26 tests; test_defines constants still exist + under the new header). +- FIRE3 bench: find/open, Ethernet tx/rx roundtrip (procedure from the + PR #233 verification), and get_device_status() — currently failing, + may be fixed by the matched header layout. Check the installed + icsneo40.dll version first; if older than 3.26.3.9, note the + limitation instead of blocking. + +## Risks + +- Extractor's clang preprocess step may trip on new header constructs — + caught at regen time. +- Bench DLL older than 3.26.3.9 leaves get_device_status unverified. +- Removed legacy names break old scripts by design; communicated via the + epoch bump and README note. diff --git a/include/ics/icsnVC40.h b/include/ics/icsnVC40.h index 593503312..99fe25d43 100644 --- a/include/ics/icsnVC40.h +++ b/include/ics/icsnVC40.h @@ -65,7 +65,9 @@ typedef unsigned __int64 uint64_t; /* Network IDs -- value of NetworkID member of icsSpyMessage */ #define NETID_DEVICE 0 #define NETID_HSCAN 1 +#define NETID_DWCAN_01 (NETID_HSCAN) #define NETID_MSCAN 2 +#define NETID_DWCAN_08 (NETID_MSCAN) #define NETID_SWCAN 3 #define NETID_LSFTCAN 4 #define NETID_FORDSCP 5 @@ -81,13 +83,20 @@ typedef unsigned __int64 uint64_t; #define NETID_ISO14230 15 #define NETID_LIN 16 #define NETID_OP_ETHERNET1 17 +#define NETID_AE_01 (NETID_OP_ETHERNET1) #define NETID_OP_ETHERNET2 18 +#define NETID_AE_02 (NETID_OP_ETHERNET2) #define NETID_OP_ETHERNET3 19 +#define NETID_AE_03 (NETID_OP_ETHERNET3) #define NETID_ISO3 41 #define NETID_HSCAN2 42 +#define NETID_DWCAN_02 (NETID_HSCAN2) #define NETID_HSCAN3 44 +#define NETID_DWCAN_03 (NETID_HSCAN3) #define NETID_OP_ETHERNET4 45 +#define NETID_AE_04 (NETID_OP_ETHERNET4) #define NETID_OP_ETHERNET5 46 +#define NETID_AE_05 (NETID_OP_ETHERNET5) #define NETID_ISO4 47 #define NETID_LIN2 48 #define NETID_LIN3 49 @@ -103,7 +112,9 @@ typedef unsigned __int64 uint64_t; #define NETID_3G_LOGGING_OVERFLOW 59 #define NETID_3G_READ_SETTINGS_EX 60 #define NETID_HSCAN4 61 +#define NETID_DWCAN_04 (NETID_HSCAN4) #define NETID_HSCAN5 62 +#define NETID_DWCAN_05 (NETID_HSCAN5) #define NETID_RS232 63 #define NETID_UART 64 #define NETID_UART2 65 @@ -115,12 +126,18 @@ typedef unsigned __int64 uint64_t; #define NETID_TEXTAPI_TO_HOST 71 #define NETID_SPI1 72 #define NETID_OP_ETHERNET6 73 +#define NETID_AE_06 (NETID_OP_ETHERNET6) #define NETID_RED_VBAT 74 #define NETID_OP_ETHERNET7 75 +#define NETID_AE_07 (NETID_OP_ETHERNET7) #define NETID_OP_ETHERNET8 76 +#define NETID_AE_08 (NETID_OP_ETHERNET8) #define NETID_OP_ETHERNET9 77 +#define NETID_AE_09 (NETID_OP_ETHERNET9) #define NETID_OP_ETHERNET10 78 +#define NETID_AE_10 (NETID_OP_ETHERNET10) #define NETID_OP_ETHERNET11 79 +#define NETID_AE_11 (NETID_OP_ETHERNET11) #define NETID_FLEXRAY1A 80 #define NETID_FLEXRAY1B 81 #define NETID_FLEXRAY2A 82 @@ -129,6 +146,7 @@ typedef unsigned __int64 uint64_t; #define NETID_FLEXRAY 85 #define NETID_FLEXRAY2 86 #define NETID_OP_ETHERNET12 87 +#define NETID_AE_12 (NETID_OP_ETHERNET12) #define NETID_I2C1 88 #define NETID_MOST25 90 #define NETID_MOST50 91 @@ -137,7 +155,9 @@ typedef unsigned __int64 uint64_t; #define NETID_GMFSA 94 #define NETID_TCP 95 #define NETID_HSCAN6 96 +#define NETID_DWCAN_06 (NETID_HSCAN6) #define NETID_HSCAN7 97 +#define NETID_DWCAN_07 (NETID_HSCAN7) #define NETID_LIN6 98 #define NETID_LSFTCAN2 99 /** @@ -181,9 +201,13 @@ typedef unsigned __int64 uint64_t; #define NETID_MDIO_07 551 #define NETID_MDIO_08 552 #define NETID_OP_ETHERNET13 553 +#define NETID_AE_13 (NETID_OP_ETHERNET13) #define NETID_OP_ETHERNET14 554 +#define NETID_AE_14 (NETID_OP_ETHERNET14) #define NETID_OP_ETHERNET15 555 +#define NETID_AE_15 (NETID_OP_ETHERNET15) #define NETID_OP_ETHERNET16 556 +#define NETID_AE_16 (NETID_OP_ETHERNET16) #define NETID_SPI3 557 #define NETID_SPI4 558 #define NETID_SPI5 559 @@ -210,14 +234,14 @@ typedef unsigned __int64 uint64_t; */ //clang-format off #define NEODEVICE_UNKNOWN (0x00000000) -#define NEODEVICE_BLUE (0x00000001) +#define NEODEVICE_BLUE_DEPRECATED (0x00000001) #define NEODEVICE_ECU_AVB_DEPRECATED (0x00000002) #define NEODEVICE_RADSUPERMOON_DEPRECATED (0x00000003) -#define NEODEVICE_DW_VCAN (0x00000004) +#define NEODEVICE_DW_VCAN_DEPRECATED (0x00000004) #define NEODEVICE_RADMOON2 (0x00000005) #define NEODEVICE_RADGIGALOG_DEPRECATED (0x00000006) /* AKA RADMARS */ #define NEODEVICE_VCAN41 (0x00000007) -#define NEODEVICE_FIRE (0x00000008) +#define NEODEVICE_FIRE_DEPRECATED (0x00000008) #define NEODEVICE_RADPLUTO_DEPRECATED (0x00000009) #define NEODEVICE_VCAN42_EL (0x0000000a) #define NEODEVICE_RADIO_CANHUB (0x0000000b) @@ -225,7 +249,7 @@ typedef unsigned __int64 uint64_t; #define NEODEVICE_OBD2_LC (0x0000000d) #define NEODEVICE_RAD_MOON_DUO_DEPRECATED (0x0000000e) #define NEODEVICE_FIRE3 (0x0000000f) -#define NEODEVICE_VCAN3 (0x00000010) +#define NEODEVICE_VCAN3_DEPRECATED (0x00000010) #define NEODEVICE_RADJUPITER (0x00000011) #define NEODEVICE_VCAN4_IND (0x00000012) #define NEODEVICE_GIGASTAR (0x00000013) @@ -255,16 +279,16 @@ typedef unsigned __int64 uint64_t; #define NEODEVICE_FIRE3_T1S_SENT (0x0000002B) #define NEODEVICE_RADGEMINI (0x0000002C) -#define NEODEVICE_RED (0x00000040) -#define NEODEVICE_ECU (0x00000080) +#define NEODEVICE_RED_DEPRECATED (0x00000040) +#define NEODEVICE_ECU_DEPRECATED (0x00000080) #define NEODEVICE_IEVB_DEPRECATED (0x00000100) -#define NEODEVICE_PENDANT (0x00000200) +#define NEODEVICE_PENDANT_DEPRECATED (0x00000200) #define NEODEVICE_OBD2_PRO_DEPRECATED (0x00000400) #define NEODEVICE_ECUCHIP_UART_DEPRECATED (0x00000800) #define NEODEVICE_PLASMA (0x00001000) #define NEODEVICE_DONT_REUSE0 (0x00002000) //NEODEVICE_FIRE_VNET -#define NEODEVICE_NEOANALOG (0x00004000) -#define NEODEVICE_CT_OBD (0x00008000) +#define NEODEVICE_NEOANALOG_DEPRECATED (0x00004000) +#define NEODEVICE_CT_OBD_DEPRECATED (0x00008000) #define NEODEVICE_DONT_REUSE1 (0x00010000) //NEODEVICE_PLASMA_1_12 #define NEODEVICE_DONT_REUSE2 (0x00020000) //NEODEVICE_PLASMA_1_13 #define NEODEVICE_ION (0x00040000) @@ -286,7 +310,7 @@ typedef unsigned __int64 uint64_t; #define NEODEVICE_NEOECUCHIP NEODEVICE_IEVB_DEPRECATED //clang-format on -#define DEVICECOUNT_FOR_EXPLORER (36) //this value will be checked by the NeoViExplorer after #6453! +#define DEVICECOUNT_FOR_EXPLORER (32) //this value will be checked by the NeoViExplorer after #6453! #define ISO15765_2_NETWORK_HSCAN 0x01 #define ISO15765_2_NETWORK_MSCAN 0x02 @@ -313,7 +337,6 @@ typedef unsigned __int64 uint64_t; #define SCRIPT_LOCATION_FLASH_MEM 0 #define SCRIPT_LOCATION_INTERNAL_FLASH 2 #define SCRIPT_LOCATION_SDCARD 1 -#define SCRIPT_LOCATION_VCAN3_MEM 4 #define SCRIPT_LOCATION_EMMC 6 /* Protocols -- value of Protocol member of icsSpyMessage */ @@ -568,14 +591,26 @@ typedef struct _stAPIFirmwareInfo #define CMP_STREAMS_RED2 (10) #define CMP_STREAMS_A2B (3) #define CMP_STREAMS_GIGASTAR (10) +#define CMP_STREAMS_GIGASTAR2 (10) +#define CMP_STREAMS_COMET (10) +#define CMP_STREAMS_COMET3 (10) +#define CMP_STREAMS_GALAXY2 (10) /* CMP Network Enables */ typedef struct { - uint8_t bStreamEnabled : 1; - uint8_t EthModule : 2; - uint8_t bControlEnabled : 1; - uint8_t spare : 4; + union + { + uint8_t byte0; + struct + { + uint8_t bStreamEnabled : 1; + uint8_t EthModule : 2; + uint8_t bControlEnabled : 1; + uint8_t EthModule2 : 3; + uint8_t spare : 1; + }; + }; uint8_t streamId; uint8_t dstMac[6]; union @@ -803,15 +838,6 @@ typedef struct } J1708_SETTINGS; #define J1708_SETTINGS_SIZE 2 -typedef struct _SRedSettings -{ - CAN_SETTINGS can1; - CAN_SETTINGS can2; - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; -} SRedSettings; -#define SRedSettings_SIZE 44 - typedef struct _STextAPISettings { uint32_t can1_tx_id; @@ -894,12 +920,6 @@ typedef union _stChipVersions uint8_t hid_min; } plasma_fire_vnet; - struct - { - uint8_t mpic_maj; - uint8_t mpic_min; - } vcan3_versions; - struct { uint8_t zynq_core_major; @@ -1396,7 +1416,13 @@ typedef struct ETHERNET10T1S_SETTINGS_t uint8_t to_timer; uint8_t flags; uint8_t local_id_alternate; - uint8_t rsvd[5]; + struct + { + uint8_t pcp_thresh : 3; // >= pcp_thresh means high priority + uint8_t enable_high_priority : 1; + uint8_t : 4; + } vlan_cos; + uint8_t rsvd[4]; } ETHERNET10T1S_SETTINGS; #define ETHERNET10T1S_SETTINGS_SIZE 12 @@ -2229,94 +2255,6 @@ enum REPORT_ON_GPS, /* send GPS 0x110-0x116 on change */ }; -typedef struct _SFireSettings -{ - CAN_SETTINGS can1; - CAN_SETTINGS can2; - CAN_SETTINGS can3; - CAN_SETTINGS can4; - - SWCAN_SETTINGS swcan; - CAN_SETTINGS lsftcan; - - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; - LIN_SETTINGS lin3; - LIN_SETTINGS lin4; - - uint16_t cgi_enable_reserved; - uint16_t cgi_baud; - uint16_t cgi_tx_ifs_bit_times; - uint16_t cgi_rx_ifs_bit_times; - uint16_t cgi_chksum_enable; - - uint16_t network_enables; - uint16_t network_enabled_on_boot; - - uint32_t pwm_man_timeout; - uint16_t pwr_man_enable; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - - uint16_t misc_io_analog_enable; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t ain_sample_period; - uint16_t ain_threshold; - - uint16_t iso15765_separation_time_offset; - - uint16_t iso9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - - uint16_t perf_en; - - /* ISO9141: iso_parity 0 - no parity, 1 - event, 2 - odd; iso_msg_termination 0 - use inner frame time, 1 - GME CIM-SCL */ - - uint16_t iso_parity; - uint16_t iso_msg_termination; - uint16_t iso_tester_pullup_enable; - - uint16_t network_enables_2; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_3; - uint16_t iso_parity_3; - uint16_t iso_msg_termination_3; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_4; - uint16_t iso_parity_4; - uint16_t iso_msg_termination_4; - - uint16_t fast_init_network_enables_1; - uint16_t fast_init_network_enables_2; - - UART_SETTINGS uart; - UART_SETTINGS uart2; - - STextAPISettings text_api; - - SNeoMostGatewaySettings neoMostGateway; - -#define VNETBITS_FEATURE_ANDROID_MSGS (1) - /** - * Unfortuntely I haven't gone thru the trouble - * of splitting the FIRE VNET and FIRE settings - * structures. So until I can do so and reserve - * some time to test it, add a member that only - * VNET looks at for VNET features (like - * Android CoreMiniMsg pump). - * Defaults to zero. - * @see VNETBITS_FEATURE_ANDROID_MSGS - */ - uint16_t vnetBits; -} SFireSettings; -#define SFireSettings_SIZE 744 - typedef struct _SFireVnetSettings { CAN_SETTINGS can1; @@ -2507,25 +2445,6 @@ typedef struct _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; -#define SVCAN3Settings_SIZE 40 - typedef struct _SVCAN4Settings { uint16_t perf_en; @@ -2562,110 +2481,6 @@ typedef struct _SVCAN4Settings } SVCAN4Settings; #define SVCAN4Settings_SIZE 342 -typedef struct _SECUSettings -{ - /* ECU ID used in CAN communications. - * TX ID = ECU ID with bit28 cleared, - * RX ID = ECUID with bit28 set, - * ECU ID = 0 implies ECU ID = serial no with bit 27 set\ - */ - uint32_t ecu_id; - - uint16_t selected_network; // not supported yet - default to HSCAN - - CAN_SETTINGS can1; - CAN_SETTINGS can2; - - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; - - uint16_t iso15765_separation_time_offset; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - uint16_t iso_parity; - uint16_t iso_msg_termination; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; - - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enabled_on_boot; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_analog_enable; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t ain_sample_period; - uint16_t ain_threshold; - - SWCAN_SETTINGS swcan; - SWCAN_SETTINGS swcan2; - CAN_SETTINGS lsftcan; - CAN_SETTINGS lsftcan2; - - UART_SETTINGS uart; - UART_SETTINGS uart2; - - STextAPISettings text_api; -} SECUSettings; -#define SECUSettings_SIZE 470 - -typedef struct _SPendantSettings -{ - /* see SECUSettings */ - uint32_t ecu_id; - - uint16_t selected_network; /* not supported yet - default to HSCAN */ - - CAN_SETTINGS can1; - CAN_SETTINGS can2; - - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; - - uint16_t iso15765_separation_time_offset; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - uint16_t iso_parity; - uint16_t iso_msg_termination; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; - - uint16_t network_enables; - uint16_t network_enables_2; - uint16_t network_enabled_on_boot; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_analog_enable; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - uint16_t ain_sample_period; - uint16_t ain_threshold; - - SWCAN_SETTINGS swcan; - SWCAN_SETTINGS swcan2; - CAN_SETTINGS lsftcan; - CAN_SETTINGS lsftcan2; - - UART_SETTINGS uart; - UART_SETTINGS uart2; - - STextAPISettings text_api; -} SPendantSettings; -#define SPendantSettings_SIZE 470 - /* GPTP portEnable options */ enum eGPTPPort { @@ -3185,9 +3000,10 @@ typedef struct _SRADGalaxy2Settings ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; uint16_t iso_parity_2; uint16_t iso_msg_termination_2; - + CMP_GLOBAL_DATA cmp_global_data; + CMP_NETWORK_DATA cmp_stream_data[CMP_STREAMS_GALAXY2]; } SRADGalaxy2Settings; -#define SRADGalaxy2Settings_SIZE 960 +#define SRADGalaxy2Settings_SIZE 1204 typedef struct _SVividCANSettings { @@ -4281,8 +4097,10 @@ typedef struct _SRADCometSettings // 10T1S Extended settings ETHERNET10T1S_SETTINGS_EXT t1s1Ext; ETHERNET10T1S_SETTINGS_EXT t1s2Ext; + CMP_GLOBAL_DATA cmp_global_data; + CMP_NETWORK_DATA cmp_stream_data[CMP_STREAMS_COMET]; } SRADCometSettings; -#define SRADCometSettings_SIZE 498 +#define SRADCometSettings_SIZE 742 typedef struct _SRADComet3Settings { @@ -4349,8 +4167,10 @@ typedef struct _SRADComet3Settings ETHERNET10T1S_SETTINGS_EXT t1s4Ext; ETHERNET10T1S_SETTINGS_EXT t1s5Ext; ETHERNET10T1S_SETTINGS_EXT t1s6Ext; + CMP_GLOBAL_DATA cmp_global_data; + CMP_NETWORK_DATA cmp_stream_data[CMP_STREAMS_COMET3]; } SRADComet3Settings; -#define SRADComet3Settings_SIZE 674 +#define SRADComet3Settings_SIZE 918 typedef struct _SRADGigaStar2Settings { @@ -4485,8 +4305,10 @@ typedef struct _SRADGigaStar2Settings // SFP T1L ETHERNET10T1L_SETTINGS sfp_t1l_1; ETHERNET10T1L_SETTINGS sfp_t1l_2; + CMP_GLOBAL_DATA cmp_global_data; + CMP_NETWORK_DATA cmp_stream_data[CMP_STREAMS_GIGASTAR2]; } SRADGigastar2Settings; -#define SRADGigastar2Settings_SIZE 2156 +#define SRADGigastar2Settings_SIZE 2400 // variants to be used with icsneoSetFirmwareVariant enum Gigastar2FwVariants @@ -4600,14 +4422,9 @@ typedef struct _GLOBAL_SETTINGS uint16_t chksum; union { - SRedSettings red; - SFireSettings fire; SFireVnetSettings firevnet; SCyanSettings cyan; - SVCAN3Settings vcan3; SVCAN4Settings vcan4; - SECUSettings ecu; - SPendantSettings pendant; SRADGalaxySettings radgalaxy; SRADStar2Settings radstar2; SVCAN412Settings vcan412; @@ -4648,7 +4465,7 @@ typedef enum _EDeviceSettingsType DeviceFireSettingsType, DeviceFireVnetSettingsType, DeviceFire2SettingsType, - DeviceVCAN3SettingsType, + DeviceVCAN3SettingsTypeDeprecated, DeviceRADGalaxySettingsType, DeviceRADStar2SettingsType, DeviceVCAN4SettingsType, @@ -4669,7 +4486,7 @@ typedef enum _EDeviceSettingsType DeviceOBD2SimSettingsTypeDeprecated, DeviceCMProbeSettingsTypeDeprecated, DeviceOBD2ProSettingsTypeDeprecated, - DeviceRedSettingsType, + DeviceRedSettingsTypeDeprecated, DeviceRADPlutoSwitchSettingsTypeDeprecated, DeviceRADGigastarSettingsType, DeviceRADJupiterSettingsType, @@ -4702,14 +4519,9 @@ typedef struct _SDeviceSettings EDeviceSettingsType DeviceSettingType; union { - SRedSettings red; - SFireSettings fire; SFireVnetSettings firevnet; SCyanSettings cyan; - SVCAN3Settings vcan3; SVCAN4Settings vcan4; - SECUSettings ecu; - SPendantSettings pendant; SRADGalaxySettings radgalaxy; SRADStar2Settings radstar2; SVCAN412Settings vcan412; @@ -5563,7 +5375,6 @@ CHECK_STRUCT_SIZE(ISO9141_KEYWORD2000__INIT_STEP); CHECK_STRUCT_SIZE(ISO9141_KEYWORD2000_SETTINGS); CHECK_STRUCT_SIZE(UART_SETTINGS); CHECK_STRUCT_SIZE(J1708_SETTINGS); -CHECK_STRUCT_SIZE(SRedSettings); CHECK_STRUCT_SIZE(STextAPISettings); CHECK_STRUCT_SIZE(stChipVersions); CHECK_STRUCT_SIZE(SNeoMostGatewaySettings); @@ -5583,13 +5394,9 @@ CHECK_STRUCT_SIZE(SERDESPOC_SETTINGS); CHECK_STRUCT_SIZE(SERDESGEN_SETTINGS); CHECK_STRUCT_SIZE(RAD_REPORTING_SETTINGS); CHECK_STRUCT_SIZE(CANTERM_SETTINGS); -CHECK_STRUCT_SIZE(SFireSettings); CHECK_STRUCT_SIZE(SFireVnetSettings); CHECK_STRUCT_SIZE(SCyanSettings); -CHECK_STRUCT_SIZE(SVCAN3Settings); CHECK_STRUCT_SIZE(SVCAN4Settings); -CHECK_STRUCT_SIZE(SECUSettings); -CHECK_STRUCT_SIZE(SPendantSettings); CHECK_STRUCT_SIZE(SRADGalaxySettings); CHECK_STRUCT_SIZE(SRADStar2Settings); CHECK_STRUCT_SIZE(GLOBAL_SETTINGS); diff --git a/include/ics/icsnVC40.h.patch b/include/ics/icsnVC40.h.patch deleted file mode 100644 index 73292dc83..000000000 --- a/include/ics/icsnVC40.h.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/include/ics/icsnVC40.h b/include/ics/icsnVC40.h -index 5a5bc27..279ae0d 100644 ---- a/include/ics/icsnVC40.h -+++ b/include/ics/icsnVC40.h -@@ -4046,6 +4046,9 @@ typedef struct _ethernetNetworkStatus_t - } ethernetNetworkStatus_t; - #pragma pack(pop) - -+#pragma pack(push) -+#pragma pack(4) -+ - typedef struct - { - uint8_t backupPowerGood; -@@ -4119,7 +4122,7 @@ typedef union { - icsRadPlutoDeviceStatus plutoStatus; - icsVcan4IndustrialDeviceStatus vcan4indStatus; - } icsDeviceStatus; -- -+#pragma pack(pop) - - typedef struct - { diff --git a/setup.py b/setup.py index 105e93ae8..d1ace4650 100644 --- a/setup.py +++ b/setup.py @@ -27,8 +27,10 @@ raise RuntimeError("clang-format is required for building python_ics.") def get_version(): - major = int(get_pkg_version().split(".")[0]) - minor = int(get_pkg_version().split(".")[1]) + # Strip a PEP 440 epoch ("1!26.3.9" -> "26.3.9") before numeric parsing. + version = get_pkg_version().split("!", 1)[-1] + major = int(version.split(".")[0]) + minor = int(version.split(".")[1]) return major, minor class _build_libicsneo(build_clib): diff --git a/src/methods.cpp b/src/methods.cpp index ce42adaa8..1fde87fd8 100644 --- a/src/methods.cpp +++ b/src/methods.cpp @@ -672,15 +672,15 @@ auto device_name_from_nde(NeoDeviceEx* nde) -> std::string switch (nde->neoDevice.DeviceType) { case NEODEVICE_UNKNOWN: return "Unknown"; - case NEODEVICE_BLUE: + case NEODEVICE_BLUE_DEPRECATED: return "neoVI BLUE"; - case NEODEVICE_DW_VCAN: + case NEODEVICE_DW_VCAN_DEPRECATED: return "ValueCAN DW"; case NEODEVICE_RADMOON2: return "RAD-Moon 2"; case NEODEVICE_VCAN41: return "ValueCAN 4-1"; - case NEODEVICE_FIRE: + case NEODEVICE_FIRE_DEPRECATED: return "neoVI FIRE"; case NEODEVICE_VCAN42_EL: return "ValueCAN 4-2EL"; @@ -690,7 +690,7 @@ auto device_name_from_nde(NeoDeviceEx* nde) -> std::string return "neoECU12"; case NEODEVICE_OBD2_LC: return "neoOBD2-LC"; - case NEODEVICE_VCAN3: + case NEODEVICE_VCAN3_DEPRECATED: return "ValueCAN 3"; case NEODEVICE_FIRE3: return "neoVI FIRE 3"; @@ -728,17 +728,17 @@ auto device_name_from_nde(NeoDeviceEx* nde) -> std::string return "RAD-MOON-T1S"; case NEODEVICE_GIGASTAR2: return "RAD-GigaStar2"; - case NEODEVICE_RED: + case NEODEVICE_RED_DEPRECATED: return "neoVI RED"; - case NEODEVICE_ECU: + case NEODEVICE_ECU_DEPRECATED: return "neoECU"; - case NEODEVICE_PENDANT: + case NEODEVICE_PENDANT_DEPRECATED: return "Pendant"; case NEODEVICE_PLASMA: // also NEODEVICE_ANY_PLASMA return "neoVI PLASMA"; - case NEODEVICE_NEOANALOG: + case NEODEVICE_NEOANALOG_DEPRECATED: return "neoAnalog"; - case NEODEVICE_CT_OBD: + case NEODEVICE_CT_OBD_DEPRECATED: return "neoOBD CT"; case NEODEVICE_ION: // also NEODEVICE_ANY_ION return "neoVI ION"; diff --git a/src/setup_module_auto_defines.cpp b/src/setup_module_auto_defines.cpp index d53d7a605..ac10d31d1 100644 --- a/src/setup_module_auto_defines.cpp +++ b/src/setup_module_auto_defines.cpp @@ -21,7 +21,9 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddObjectRef(module, "NEOVI_COMMTYPE_FIRE_USB", PyLong_FromUnsignedLongLong(NEOVI_COMMTYPE_FIRE_USB)); result += PyModule_AddObjectRef(module, "NETID_DEVICE", PyLong_FromUnsignedLongLong(NETID_DEVICE)); result += PyModule_AddObjectRef(module, "NETID_HSCAN", PyLong_FromUnsignedLongLong(NETID_HSCAN)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_01", PyLong_FromLongLong(NETID_DWCAN_01)); result += PyModule_AddObjectRef(module, "NETID_MSCAN", PyLong_FromUnsignedLongLong(NETID_MSCAN)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_08", PyLong_FromLongLong(NETID_DWCAN_08)); result += PyModule_AddObjectRef(module, "NETID_SWCAN", PyLong_FromUnsignedLongLong(NETID_SWCAN)); result += PyModule_AddObjectRef(module, "NETID_LSFTCAN", PyLong_FromUnsignedLongLong(NETID_LSFTCAN)); result += PyModule_AddObjectRef(module, "NETID_FORDSCP", PyLong_FromUnsignedLongLong(NETID_FORDSCP)); @@ -37,13 +39,20 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddObjectRef(module, "NETID_ISO14230", PyLong_FromUnsignedLongLong(NETID_ISO14230)); result += PyModule_AddObjectRef(module, "NETID_LIN", PyLong_FromUnsignedLongLong(NETID_LIN)); result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET1", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET1)); + result += PyModule_AddObjectRef(module, "NETID_AE_01", PyLong_FromLongLong(NETID_AE_01)); result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET2", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET2)); + result += PyModule_AddObjectRef(module, "NETID_AE_02", PyLong_FromLongLong(NETID_AE_02)); result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET3", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET3)); + result += PyModule_AddObjectRef(module, "NETID_AE_03", PyLong_FromLongLong(NETID_AE_03)); result += PyModule_AddObjectRef(module, "NETID_ISO3", PyLong_FromUnsignedLongLong(NETID_ISO3)); result += PyModule_AddObjectRef(module, "NETID_HSCAN2", PyLong_FromUnsignedLongLong(NETID_HSCAN2)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_02", PyLong_FromLongLong(NETID_DWCAN_02)); result += PyModule_AddObjectRef(module, "NETID_HSCAN3", PyLong_FromUnsignedLongLong(NETID_HSCAN3)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_03", PyLong_FromLongLong(NETID_DWCAN_03)); result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET4", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET4)); + result += PyModule_AddObjectRef(module, "NETID_AE_04", PyLong_FromLongLong(NETID_AE_04)); result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET5", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET5)); + result += PyModule_AddObjectRef(module, "NETID_AE_05", PyLong_FromLongLong(NETID_AE_05)); result += PyModule_AddObjectRef(module, "NETID_ISO4", PyLong_FromUnsignedLongLong(NETID_ISO4)); result += PyModule_AddObjectRef(module, "NETID_LIN2", PyLong_FromUnsignedLongLong(NETID_LIN2)); result += PyModule_AddObjectRef(module, "NETID_LIN3", PyLong_FromUnsignedLongLong(NETID_LIN3)); @@ -59,7 +68,9 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddObjectRef(module, "NETID_3G_LOGGING_OVERFLOW", PyLong_FromUnsignedLongLong(NETID_3G_LOGGING_OVERFLOW)); result += PyModule_AddObjectRef(module, "NETID_3G_READ_SETTINGS_EX", PyLong_FromUnsignedLongLong(NETID_3G_READ_SETTINGS_EX)); result += PyModule_AddObjectRef(module, "NETID_HSCAN4", PyLong_FromUnsignedLongLong(NETID_HSCAN4)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_04", PyLong_FromLongLong(NETID_DWCAN_04)); result += PyModule_AddObjectRef(module, "NETID_HSCAN5", PyLong_FromUnsignedLongLong(NETID_HSCAN5)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_05", PyLong_FromLongLong(NETID_DWCAN_05)); result += PyModule_AddObjectRef(module, "NETID_RS232", PyLong_FromUnsignedLongLong(NETID_RS232)); result += PyModule_AddObjectRef(module, "NETID_UART", PyLong_FromUnsignedLongLong(NETID_UART)); result += PyModule_AddObjectRef(module, "NETID_UART2", PyLong_FromUnsignedLongLong(NETID_UART2)); @@ -71,12 +82,18 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddObjectRef(module, "NETID_TEXTAPI_TO_HOST", PyLong_FromUnsignedLongLong(NETID_TEXTAPI_TO_HOST)); result += PyModule_AddObjectRef(module, "NETID_SPI1", PyLong_FromUnsignedLongLong(NETID_SPI1)); result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET6", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET6)); + result += PyModule_AddObjectRef(module, "NETID_AE_06", PyLong_FromLongLong(NETID_AE_06)); result += PyModule_AddObjectRef(module, "NETID_RED_VBAT", PyLong_FromUnsignedLongLong(NETID_RED_VBAT)); result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET7", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET7)); + result += PyModule_AddObjectRef(module, "NETID_AE_07", PyLong_FromLongLong(NETID_AE_07)); result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET8", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET8)); + result += PyModule_AddObjectRef(module, "NETID_AE_08", PyLong_FromLongLong(NETID_AE_08)); result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET9", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET9)); + result += PyModule_AddObjectRef(module, "NETID_AE_09", PyLong_FromLongLong(NETID_AE_09)); result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET10", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET10)); + result += PyModule_AddObjectRef(module, "NETID_AE_10", PyLong_FromLongLong(NETID_AE_10)); result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET11", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET11)); + result += PyModule_AddObjectRef(module, "NETID_AE_11", PyLong_FromLongLong(NETID_AE_11)); result += PyModule_AddObjectRef(module, "NETID_FLEXRAY1A", PyLong_FromUnsignedLongLong(NETID_FLEXRAY1A)); result += PyModule_AddObjectRef(module, "NETID_FLEXRAY1B", PyLong_FromUnsignedLongLong(NETID_FLEXRAY1B)); result += PyModule_AddObjectRef(module, "NETID_FLEXRAY2A", PyLong_FromUnsignedLongLong(NETID_FLEXRAY2A)); @@ -85,6 +102,7 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddObjectRef(module, "NETID_FLEXRAY", PyLong_FromUnsignedLongLong(NETID_FLEXRAY)); result += PyModule_AddObjectRef(module, "NETID_FLEXRAY2", PyLong_FromUnsignedLongLong(NETID_FLEXRAY2)); result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET12", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET12)); + result += PyModule_AddObjectRef(module, "NETID_AE_12", PyLong_FromLongLong(NETID_AE_12)); result += PyModule_AddObjectRef(module, "NETID_I2C1", PyLong_FromUnsignedLongLong(NETID_I2C1)); result += PyModule_AddObjectRef(module, "NETID_MOST25", PyLong_FromUnsignedLongLong(NETID_MOST25)); result += PyModule_AddObjectRef(module, "NETID_MOST50", PyLong_FromUnsignedLongLong(NETID_MOST50)); @@ -93,7 +111,9 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddObjectRef(module, "NETID_GMFSA", PyLong_FromUnsignedLongLong(NETID_GMFSA)); result += PyModule_AddObjectRef(module, "NETID_TCP", PyLong_FromUnsignedLongLong(NETID_TCP)); result += PyModule_AddObjectRef(module, "NETID_HSCAN6", PyLong_FromUnsignedLongLong(NETID_HSCAN6)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_06", PyLong_FromLongLong(NETID_DWCAN_06)); result += PyModule_AddObjectRef(module, "NETID_HSCAN7", PyLong_FromUnsignedLongLong(NETID_HSCAN7)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_07", PyLong_FromLongLong(NETID_DWCAN_07)); result += PyModule_AddObjectRef(module, "NETID_LIN6", PyLong_FromUnsignedLongLong(NETID_LIN6)); result += PyModule_AddObjectRef(module, "NETID_LSFTCAN2", PyLong_FromUnsignedLongLong(NETID_LSFTCAN2)); result += PyModule_AddObjectRef(module, "NETID_HW_COM_LATENCY_TEST", PyLong_FromUnsignedLongLong(NETID_HW_COM_LATENCY_TEST)); @@ -133,9 +153,13 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddObjectRef(module, "NETID_MDIO_07", PyLong_FromUnsignedLongLong(NETID_MDIO_07)); result += PyModule_AddObjectRef(module, "NETID_MDIO_08", PyLong_FromUnsignedLongLong(NETID_MDIO_08)); result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET13", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET13)); + result += PyModule_AddObjectRef(module, "NETID_AE_13", PyLong_FromLongLong(NETID_AE_13)); result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET14", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET14)); + result += PyModule_AddObjectRef(module, "NETID_AE_14", PyLong_FromLongLong(NETID_AE_14)); result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET15", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET15)); + result += PyModule_AddObjectRef(module, "NETID_AE_15", PyLong_FromLongLong(NETID_AE_15)); result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET16", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET16)); + result += PyModule_AddObjectRef(module, "NETID_AE_16", PyLong_FromLongLong(NETID_AE_16)); result += PyModule_AddObjectRef(module, "NETID_SPI3", PyLong_FromUnsignedLongLong(NETID_SPI3)); result += PyModule_AddObjectRef(module, "NETID_SPI4", PyLong_FromUnsignedLongLong(NETID_SPI4)); result += PyModule_AddObjectRef(module, "NETID_SPI5", PyLong_FromUnsignedLongLong(NETID_SPI5)); @@ -153,14 +177,14 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddObjectRef(module, "NETID_MAX", PyLong_FromUnsignedLongLong(NETID_MAX)); result += PyModule_AddObjectRef(module, "NETID_INVALID", PyLong_FromLongLong(NETID_INVALID)); result += PyModule_AddObjectRef(module, "NEODEVICE_UNKNOWN", PyLong_FromLongLong(NEODEVICE_UNKNOWN)); - result += PyModule_AddObjectRef(module, "NEODEVICE_BLUE", PyLong_FromLongLong(NEODEVICE_BLUE)); + result += PyModule_AddObjectRef(module, "NEODEVICE_BLUE_DEPRECATED", PyLong_FromLongLong(NEODEVICE_BLUE_DEPRECATED)); result += PyModule_AddObjectRef(module, "NEODEVICE_ECU_AVB_DEPRECATED", PyLong_FromLongLong(NEODEVICE_ECU_AVB_DEPRECATED)); result += PyModule_AddObjectRef(module, "NEODEVICE_RADSUPERMOON_DEPRECATED", PyLong_FromLongLong(NEODEVICE_RADSUPERMOON_DEPRECATED)); - result += PyModule_AddObjectRef(module, "NEODEVICE_DW_VCAN", PyLong_FromLongLong(NEODEVICE_DW_VCAN)); + result += PyModule_AddObjectRef(module, "NEODEVICE_DW_VCAN_DEPRECATED", PyLong_FromLongLong(NEODEVICE_DW_VCAN_DEPRECATED)); result += PyModule_AddObjectRef(module, "NEODEVICE_RADMOON2", PyLong_FromLongLong(NEODEVICE_RADMOON2)); result += PyModule_AddObjectRef(module, "NEODEVICE_RADGIGALOG_DEPRECATED", PyLong_FromLongLong(NEODEVICE_RADGIGALOG_DEPRECATED)); result += PyModule_AddObjectRef(module, "NEODEVICE_VCAN41", PyLong_FromLongLong(NEODEVICE_VCAN41)); - result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE", PyLong_FromLongLong(NEODEVICE_FIRE)); + result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE_DEPRECATED", PyLong_FromLongLong(NEODEVICE_FIRE_DEPRECATED)); result += PyModule_AddObjectRef(module, "NEODEVICE_RADPLUTO_DEPRECATED", PyLong_FromLongLong(NEODEVICE_RADPLUTO_DEPRECATED)); result += PyModule_AddObjectRef(module, "NEODEVICE_VCAN42_EL", PyLong_FromLongLong(NEODEVICE_VCAN42_EL)); result += PyModule_AddObjectRef(module, "NEODEVICE_RADIO_CANHUB", PyLong_FromLongLong(NEODEVICE_RADIO_CANHUB)); @@ -168,7 +192,7 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddObjectRef(module, "NEODEVICE_OBD2_LC", PyLong_FromLongLong(NEODEVICE_OBD2_LC)); result += PyModule_AddObjectRef(module, "NEODEVICE_RAD_MOON_DUO_DEPRECATED", PyLong_FromLongLong(NEODEVICE_RAD_MOON_DUO_DEPRECATED)); result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE3", PyLong_FromLongLong(NEODEVICE_FIRE3)); - result += PyModule_AddObjectRef(module, "NEODEVICE_VCAN3", PyLong_FromLongLong(NEODEVICE_VCAN3)); + result += PyModule_AddObjectRef(module, "NEODEVICE_VCAN3_DEPRECATED", PyLong_FromLongLong(NEODEVICE_VCAN3_DEPRECATED)); result += PyModule_AddObjectRef(module, "NEODEVICE_RADJUPITER", PyLong_FromLongLong(NEODEVICE_RADJUPITER)); result += PyModule_AddObjectRef(module, "NEODEVICE_VCAN4_IND", PyLong_FromLongLong(NEODEVICE_VCAN4_IND)); result += PyModule_AddObjectRef(module, "NEODEVICE_GIGASTAR", PyLong_FromLongLong(NEODEVICE_GIGASTAR)); @@ -195,16 +219,16 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE3_T1S_LIN", PyLong_FromLongLong(NEODEVICE_FIRE3_T1S_LIN)); result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE3_T1S_SENT", PyLong_FromLongLong(NEODEVICE_FIRE3_T1S_SENT)); result += PyModule_AddObjectRef(module, "NEODEVICE_RADGEMINI", PyLong_FromLongLong(NEODEVICE_RADGEMINI)); - result += PyModule_AddObjectRef(module, "NEODEVICE_RED", PyLong_FromLongLong(NEODEVICE_RED)); - result += PyModule_AddObjectRef(module, "NEODEVICE_ECU", PyLong_FromLongLong(NEODEVICE_ECU)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RED_DEPRECATED", PyLong_FromLongLong(NEODEVICE_RED_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_ECU_DEPRECATED", PyLong_FromLongLong(NEODEVICE_ECU_DEPRECATED)); result += PyModule_AddObjectRef(module, "NEODEVICE_IEVB_DEPRECATED", PyLong_FromLongLong(NEODEVICE_IEVB_DEPRECATED)); - result += PyModule_AddObjectRef(module, "NEODEVICE_PENDANT", PyLong_FromLongLong(NEODEVICE_PENDANT)); + result += PyModule_AddObjectRef(module, "NEODEVICE_PENDANT_DEPRECATED", PyLong_FromLongLong(NEODEVICE_PENDANT_DEPRECATED)); result += PyModule_AddObjectRef(module, "NEODEVICE_OBD2_PRO_DEPRECATED", PyLong_FromLongLong(NEODEVICE_OBD2_PRO_DEPRECATED)); result += PyModule_AddObjectRef(module, "NEODEVICE_ECUCHIP_UART_DEPRECATED", PyLong_FromLongLong(NEODEVICE_ECUCHIP_UART_DEPRECATED)); result += PyModule_AddObjectRef(module, "NEODEVICE_PLASMA", PyLong_FromLongLong(NEODEVICE_PLASMA)); result += PyModule_AddObjectRef(module, "NEODEVICE_DONT_REUSE0", PyLong_FromLongLong(NEODEVICE_DONT_REUSE0)); - result += PyModule_AddObjectRef(module, "NEODEVICE_NEOANALOG", PyLong_FromLongLong(NEODEVICE_NEOANALOG)); - result += PyModule_AddObjectRef(module, "NEODEVICE_CT_OBD", PyLong_FromLongLong(NEODEVICE_CT_OBD)); + result += PyModule_AddObjectRef(module, "NEODEVICE_NEOANALOG_DEPRECATED", PyLong_FromLongLong(NEODEVICE_NEOANALOG_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_CT_OBD_DEPRECATED", PyLong_FromLongLong(NEODEVICE_CT_OBD_DEPRECATED)); result += PyModule_AddObjectRef(module, "NEODEVICE_DONT_REUSE1", PyLong_FromLongLong(NEODEVICE_DONT_REUSE1)); result += PyModule_AddObjectRef(module, "NEODEVICE_DONT_REUSE2", PyLong_FromLongLong(NEODEVICE_DONT_REUSE2)); result += PyModule_AddObjectRef(module, "NEODEVICE_ION", PyLong_FromLongLong(NEODEVICE_ION)); @@ -246,7 +270,6 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddObjectRef(module, "SCRIPT_LOCATION_FLASH_MEM", PyLong_FromUnsignedLongLong(SCRIPT_LOCATION_FLASH_MEM)); result += PyModule_AddObjectRef(module, "SCRIPT_LOCATION_INTERNAL_FLASH", PyLong_FromUnsignedLongLong(SCRIPT_LOCATION_INTERNAL_FLASH)); result += PyModule_AddObjectRef(module, "SCRIPT_LOCATION_SDCARD", PyLong_FromUnsignedLongLong(SCRIPT_LOCATION_SDCARD)); - result += PyModule_AddObjectRef(module, "SCRIPT_LOCATION_VCAN3_MEM", PyLong_FromUnsignedLongLong(SCRIPT_LOCATION_VCAN3_MEM)); result += PyModule_AddObjectRef(module, "SCRIPT_LOCATION_EMMC", PyLong_FromUnsignedLongLong(SCRIPT_LOCATION_EMMC)); result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_CUSTOM", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_CUSTOM)); result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_CAN", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_CAN)); @@ -363,6 +386,10 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddObjectRef(module, "CMP_STREAMS_RED2", PyLong_FromLongLong(CMP_STREAMS_RED2)); result += PyModule_AddObjectRef(module, "CMP_STREAMS_A2B", PyLong_FromLongLong(CMP_STREAMS_A2B)); result += PyModule_AddObjectRef(module, "CMP_STREAMS_GIGASTAR", PyLong_FromLongLong(CMP_STREAMS_GIGASTAR)); + result += PyModule_AddObjectRef(module, "CMP_STREAMS_GIGASTAR2", PyLong_FromLongLong(CMP_STREAMS_GIGASTAR2)); + result += PyModule_AddObjectRef(module, "CMP_STREAMS_COMET", PyLong_FromLongLong(CMP_STREAMS_COMET)); + result += PyModule_AddObjectRef(module, "CMP_STREAMS_COMET3", PyLong_FromLongLong(CMP_STREAMS_COMET3)); + result += PyModule_AddObjectRef(module, "CMP_STREAMS_GALAXY2", PyLong_FromLongLong(CMP_STREAMS_GALAXY2)); // enum result += PyModule_AddObjectRef(module, "AUTO", PyLong_FromLongLong(AUTO)); result += PyModule_AddObjectRef(module, "USE_TQ", PyLong_FromLongLong(USE_TQ)); @@ -444,7 +471,6 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddObjectRef(module, "ISO9141_KEYWORD2000_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(ISO9141_KEYWORD2000_SETTINGS_SIZE)); result += PyModule_AddObjectRef(module, "UART_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(UART_SETTINGS_SIZE)); result += PyModule_AddObjectRef(module, "J1708_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(J1708_SETTINGS_SIZE)); - result += PyModule_AddObjectRef(module, "SRedSettings_SIZE", PyLong_FromUnsignedLongLong(SRedSettings_SIZE)); result += PyModule_AddObjectRef(module, "STextAPISettings_SIZE", PyLong_FromUnsignedLongLong(STextAPISettings_SIZE)); result += PyModule_AddObjectRef(module, "stChipVersions_SIZE", PyLong_FromUnsignedLongLong(stChipVersions_SIZE)); result += PyModule_AddObjectRef(module, "SNeoMostGatewaySettings_SIZE", PyLong_FromUnsignedLongLong(SNeoMostGatewaySettings_SIZE)); @@ -792,16 +818,11 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddObjectRef(module, "REPORT_ON_GPS", PyLong_FromLongLong(REPORT_ON_GPS)); // end of enum - }; - result += PyModule_AddObjectRef(module, "VNETBITS_FEATURE_ANDROID_MSGS", PyLong_FromLongLong(VNETBITS_FEATURE_ANDROID_MSGS)); - result += PyModule_AddObjectRef(module, "SFireSettings_SIZE", PyLong_FromUnsignedLongLong(SFireSettings_SIZE)); result += PyModule_AddObjectRef(module, "VNETBITS_FEATURE_ANDROID_MSGS", PyLong_FromLongLong(VNETBITS_FEATURE_ANDROID_MSGS)); result += PyModule_AddObjectRef(module, "VNETBITS_FEATURE_DISABLE_USB_CHECK", PyLong_FromLongLong(VNETBITS_FEATURE_DISABLE_USB_CHECK)); result += PyModule_AddObjectRef(module, "SFireVnetSettings_SIZE", PyLong_FromUnsignedLongLong(SFireVnetSettings_SIZE)); result += PyModule_AddObjectRef(module, "SCyanSettings_SIZE", PyLong_FromUnsignedLongLong(SCyanSettings_SIZE)); - result += PyModule_AddObjectRef(module, "SVCAN3Settings_SIZE", PyLong_FromUnsignedLongLong(SVCAN3Settings_SIZE)); result += PyModule_AddObjectRef(module, "SVCAN4Settings_SIZE", PyLong_FromUnsignedLongLong(SVCAN4Settings_SIZE)); - result += PyModule_AddObjectRef(module, "SECUSettings_SIZE", PyLong_FromUnsignedLongLong(SECUSettings_SIZE)); - result += PyModule_AddObjectRef(module, "SPendantSettings_SIZE", PyLong_FromUnsignedLongLong(SPendantSettings_SIZE)); // enum result += PyModule_AddObjectRef(module, "ePortDisabled", PyLong_FromLongLong(ePortDisabled)); result += PyModule_AddObjectRef(module, "ePortOpEth1", PyLong_FromLongLong(ePortOpEth1)); @@ -965,7 +986,7 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddObjectRef(module, "DeviceFireSettingsType", PyLong_FromLongLong(DeviceFireSettingsType)); result += PyModule_AddObjectRef(module, "DeviceFireVnetSettingsType", PyLong_FromLongLong(DeviceFireVnetSettingsType)); result += PyModule_AddObjectRef(module, "DeviceFire2SettingsType", PyLong_FromLongLong(DeviceFire2SettingsType)); - result += PyModule_AddObjectRef(module, "DeviceVCAN3SettingsType", PyLong_FromLongLong(DeviceVCAN3SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceVCAN3SettingsTypeDeprecated", PyLong_FromLongLong(DeviceVCAN3SettingsTypeDeprecated)); result += PyModule_AddObjectRef(module, "DeviceRADGalaxySettingsType", PyLong_FromLongLong(DeviceRADGalaxySettingsType)); result += PyModule_AddObjectRef(module, "DeviceRADStar2SettingsType", PyLong_FromLongLong(DeviceRADStar2SettingsType)); result += PyModule_AddObjectRef(module, "DeviceVCAN4SettingsType", PyLong_FromLongLong(DeviceVCAN4SettingsType)); @@ -986,7 +1007,7 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddObjectRef(module, "DeviceOBD2SimSettingsTypeDeprecated", PyLong_FromLongLong(DeviceOBD2SimSettingsTypeDeprecated)); result += PyModule_AddObjectRef(module, "DeviceCMProbeSettingsTypeDeprecated", PyLong_FromLongLong(DeviceCMProbeSettingsTypeDeprecated)); result += PyModule_AddObjectRef(module, "DeviceOBD2ProSettingsTypeDeprecated", PyLong_FromLongLong(DeviceOBD2ProSettingsTypeDeprecated)); - result += PyModule_AddObjectRef(module, "DeviceRedSettingsType", PyLong_FromLongLong(DeviceRedSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRedSettingsTypeDeprecated", PyLong_FromLongLong(DeviceRedSettingsTypeDeprecated)); result += PyModule_AddObjectRef(module, "DeviceRADPlutoSwitchSettingsTypeDeprecated", PyLong_FromLongLong(DeviceRADPlutoSwitchSettingsTypeDeprecated)); result += PyModule_AddObjectRef(module, "DeviceRADGigastarSettingsType", PyLong_FromLongLong(DeviceRADGigastarSettingsType)); result += PyModule_AddObjectRef(module, "DeviceRADJupiterSettingsType", PyLong_FromLongLong(DeviceRADJupiterSettingsType)); diff --git a/tests/test_header_3_26.py b/tests/test_header_3_26.py new file mode 100644 index 000000000..c18d2deaf --- /dev/null +++ b/tests/test_header_3_26.py @@ -0,0 +1,30 @@ +"""Pins that the module is generated from the vspy 3.26.3.9 header.""" +import pytest +import ics + + +def test_deprecated_device_constants_renamed(): + # 3.26.3.9 renamed the legacy device defines; old names must be gone. + assert ics.NEODEVICE_BLUE_DEPRECATED == 0x00000001 + assert ics.NEODEVICE_FIRE_DEPRECATED == 0x00000008 + assert ics.NEODEVICE_VCAN3_DEPRECATED == 0x00000010 + assert not hasattr(ics, "NEODEVICE_BLUE") + assert not hasattr(ics, "NEODEVICE_FIRE") + assert not hasattr(ics, "NEODEVICE_VCAN3") + + +def test_grown_settings_structs(): + # Struct growth pinned from the 3.26.3.9 header's _SIZE macros. + assert ics.SRADGalaxy2Settings_SIZE == 1204 + assert ics.SRADComet3Settings_SIZE == 918 + assert ics.SRADGigastar2Settings_SIZE == 2400 + + +def test_legacy_settings_structs_removed(): + import ics.structures + with pytest.raises(ImportError): + from ics.structures import s_red_settings # noqa: F401 + + +if __name__ == "__main__": + pytest.main(args=[__file__, "--verbose", "-s"]) diff --git a/tests/test_struct_sizes.py b/tests/test_struct_sizes.py new file mode 100644 index 000000000..e9aa70a25 --- /dev/null +++ b/tests/test_struct_sizes.py @@ -0,0 +1,69 @@ +"""Validate generated ctypes struct sizes against the header's *_SIZE macros. + +Every `#define _SIZE (N)` in icsnVC40.h is exported as a module +constant; the matching generated ctypes struct must have the same +ctypes.sizeof. Catches header/generator layout drift on header updates. +""" +import ctypes +import importlib +import inspect +import pkgutil + +import pytest +import ics +import ics.structures + +# Upstream header bugs: macro value disagrees with the actual struct. +# Keep entries here only with a comment explaining the discrepancy. +KNOWN_STALE_MACROS = { + # Upstream never updated the macro after the struct grew to 56 bytes + # (still 40 in vspy 3.26.3.9). Reported to header owners. + "RAD_GPTP_AND_TAP_SETTINGS_SIZE", +} + +# Macros whose name doesn't map to a generated struct class (nested/typedef +# variants). Count is asserted so silent growth gets investigated. +EXPECTED_UNMATCHED = 11 + + +def _struct_registry(): + registry = {} + for info in pkgutil.iter_modules(ics.structures.__path__): + mod = importlib.import_module(f"ics.structures.{info.name}") + for name, obj in inspect.getmembers(mod, inspect.isclass): + if ( + issubclass(obj, (ctypes.Structure, ctypes.Union)) + and obj.__module__ == mod.__name__ + ): + registry["".join(c for c in name.lower() if c.isalnum())] = obj + return registry + + +def test_generated_struct_sizes_match_header_macros(): + registry = _struct_registry() + mismatches = [] + unmatched = [] + matched = 0 + for macro in (n for n in dir(ics) if n.endswith("_SIZE")): + key = "".join(c for c in macro[:-5].lower() if c.isalnum()) + cls = registry.get(key) + if cls is None: + unmatched.append(macro) + continue + expected = getattr(ics, macro) + actual = ctypes.sizeof(cls) + if actual == expected: + matched += 1 + elif macro not in KNOWN_STALE_MACROS: + mismatches.append(f"{macro}: header says {expected}, ctypes says {actual}") + assert not mismatches, "\n".join(mismatches) + # 3.26.3.9 removed 5 legacy settings structs (SRedSettings, SFireSettings, + # SVCAN3Settings, SECUSettings, SPendantSettings) and their *_SIZE macros + # together, dropping the matched baseline from 77 to 72. That is a clean + # removal, not a mapping regression: both sides disappeared in lockstep. + assert matched >= 72, f"only {matched} macros matched a struct; mapping regressed" + assert len(unmatched) <= EXPECTED_UNMATCHED, f"unmatched grew: {sorted(unmatched)}" + + +if __name__ == "__main__": + pytest.main(args=[__file__, "--verbose", "-s"])