diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e38aae6d2..ed36548d5 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -38,7 +38,7 @@ jobs: run: echo $PYTHON_ICS_VERSION - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.18.1 + run: python -m pip install cibuildwheel==2.22.0 - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse diff --git a/build_libicsneo.py b/build_libicsneo.py index c2501f0cc..50eb4b26e 100644 --- a/build_libicsneo.py +++ b/build_libicsneo.py @@ -14,7 +14,7 @@ LIBUSB_BUILD = f"{LIBUSB_ROOT}/build" LIBUSB_INSTALL = f"{LIBUSB_ROOT}/install" -LIBICSNEO_VERSION = "06f6861" +LIBICSNEO_VERSION = "02b5daf" LIBICSNEO_ROOT = f"{ROOT}/libicsneo/{LIBICSNEO_VERSION}" LIBICSNEO_SOURCE = f"{LIBICSNEO_ROOT}/source" LIBICSNEO_BUILD = f"{LIBICSNEO_ROOT}/build" diff --git a/doc/source/conf.py b/doc/source/conf.py index 2ec683a12..1ba003306 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -57,7 +57,7 @@ # built documents. # # The short X.Y version. -version = "917.18" +version = "918.14" # The full version, including alpha/beta/rc tags. release = version diff --git a/extract_icsneo40_defines.py b/extract_icsneo40_defines.py index 7c4cc210f..8baf76af7 100644 --- a/extract_icsneo40_defines.py +++ b/extract_icsneo40_defines.py @@ -78,9 +78,10 @@ def extract(): with open("src/setup_module_auto_defines.cpp", "w") as f: print(boiler_plate, file=f) # Include the header files needed for the defines - print('#include "setup_module_auto_defines.h"\n#include \n#include "ics/icsnVC40.h"', file=f) + + print('#include "setup_module_auto_defines.h"\n#include \n#pragma warning(push, 0)\n#include "ics/icsnVC40.h"\n#pragma warning(pop)', file=f) if use_internal: - print('#include "ics/icsnVC40Internal.h"', file=f) + print('#pragma warning(push, 0)\n#include "ics/icsnVC40Internal.h"\n#pragma warning(pop)', file=f) print("\nint setup_module_auto_defines(PyObject * module)\n{", file=f) print("\tint result = 0;\n", file=f) diff --git a/icsnVC40.h.enums.json b/icsnVC40.h.enums.json index 890081169..a0097ade4 100644 --- a/icsnVC40.h.enums.json +++ b/icsnVC40.h.enums.json @@ -2658,7 +2658,7 @@ "enum_value": null }, { - "name": "DeviceVCANRFSettingsType", + "name": "DeviceDeprecatedType", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -2858,7 +2858,7 @@ "enum_value": null }, { - "name": "DeviceRed2OemSettingsType", + "name": "DeviceNeoVIConnectSettingsType", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -2881,6 +2881,22 @@ "is_enum": false, "enum_value": null }, + { + "name": "DeviceRADGigastar2SettingsType", + "data_type": "int", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "DeviceRADMoonT1SSettingsType", + "data_type": "int", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, { "name": "DeviceSettingsTypeMax", "data_type": "int", @@ -3495,7 +3511,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5969 ", + "name": "assert_line_6192 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3511,7 +3527,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5970 ", + "name": "assert_line_6193 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3527,7 +3543,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5971 ", + "name": "assert_line_6194 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3543,7 +3559,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5972 ", + "name": "assert_line_6195 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3559,7 +3575,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5973 ", + "name": "assert_line_6196 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3575,7 +3591,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5974 ", + "name": "assert_line_6197 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3591,7 +3607,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5975 ", + "name": "assert_line_6198 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3607,7 +3623,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5976 ", + "name": "assert_line_6199 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3623,7 +3639,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5977 ", + "name": "assert_line_6200 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3639,7 +3655,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5978 ", + "name": "assert_line_6201 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3655,7 +3671,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5979 ", + "name": "assert_line_6202 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3671,7 +3687,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5980 ", + "name": "assert_line_6203 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3687,7 +3703,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5981 ", + "name": "assert_line_6204 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3703,7 +3719,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5982 ", + "name": "assert_line_6205 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3719,7 +3735,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5983 ", + "name": "assert_line_6206 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3735,7 +3751,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5984 ", + "name": "assert_line_6207 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3751,7 +3767,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5985 ", + "name": "assert_line_6208 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3767,7 +3783,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5986 ", + "name": "assert_line_6209 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3783,7 +3799,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5987 ", + "name": "assert_line_6210 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3799,7 +3815,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5988 ", + "name": "assert_line_6211 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3815,7 +3831,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5989 ", + "name": "assert_line_6212 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3831,7 +3847,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5990 ", + "name": "assert_line_6213 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3847,7 +3863,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5991 ", + "name": "assert_line_6214 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3863,7 +3879,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5992 ", + "name": "assert_line_6215 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3879,7 +3895,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5993 ", + "name": "assert_line_6216 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3895,7 +3911,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5994 ", + "name": "assert_line_6217 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3911,7 +3927,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5995 ", + "name": "assert_line_6218 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3927,7 +3943,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5996 ", + "name": "assert_line_6219 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3943,7 +3959,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5997 ", + "name": "assert_line_6220 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3959,7 +3975,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5998 ", + "name": "assert_line_6221 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3975,7 +3991,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_5999 ", + "name": "assert_line_6222 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -3991,7 +4007,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6000 ", + "name": "assert_line_6223 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4007,23 +4023,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6001 ", - "data_type": "int", - "array_length": 0, - "bitfield_size": 0, - "is_enum": true, - "enum_value": "1/(int)(!!(sizeof(SVCANRFSettings)" - } - ] - }, - { - "names": [], - "data_type": "Enum", - "packing": 0, - "is_anonymous": true, - "members": [ - { - "name": "assert_line_6002 ", + "name": "assert_line_6224 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4039,7 +4039,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6003 ", + "name": "assert_line_6225 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4055,7 +4055,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6004 ", + "name": "assert_line_6226 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4071,7 +4071,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6005 ", + "name": "assert_line_6227 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4087,7 +4087,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6006 ", + "name": "assert_line_6228 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4103,7 +4103,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6007 ", + "name": "assert_line_6229 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4119,7 +4119,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6008 ", + "name": "assert_line_6230 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4135,7 +4135,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6009 ", + "name": "assert_line_6231 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4151,7 +4151,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6010 ", + "name": "assert_line_6232 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4167,7 +4167,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6011 ", + "name": "assert_line_6233 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4183,7 +4183,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6012 ", + "name": "assert_line_6234 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4199,7 +4199,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6013 ", + "name": "assert_line_6235 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4215,7 +4215,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6014 ", + "name": "assert_line_6236 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4231,7 +4231,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6015 ", + "name": "assert_line_6237 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4247,7 +4247,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6016 ", + "name": "assert_line_6238 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4263,7 +4263,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6017 ", + "name": "assert_line_6239 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4279,7 +4279,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6018 ", + "name": "assert_line_6240 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4295,7 +4295,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6019 ", + "name": "assert_line_6241 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4311,7 +4311,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6020 ", + "name": "assert_line_6242 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4327,7 +4327,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6021 ", + "name": "assert_line_6243 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4343,7 +4343,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6022 ", + "name": "assert_line_6244 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4359,7 +4359,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6023 ", + "name": "assert_line_6245 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4375,7 +4375,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6024 ", + "name": "assert_line_6246 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4391,7 +4391,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6025 ", + "name": "assert_line_6247 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4407,7 +4407,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6026 ", + "name": "assert_line_6248 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4423,7 +4423,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6027 ", + "name": "assert_line_6249 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4439,7 +4439,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6028 ", + "name": "assert_line_6250 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4455,7 +4455,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6029 ", + "name": "assert_line_6251 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4471,7 +4471,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6030 ", + "name": "assert_line_6252 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4487,7 +4487,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6031 ", + "name": "assert_line_6253 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4503,7 +4503,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6032 ", + "name": "assert_line_6254 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4519,7 +4519,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6033 ", + "name": "assert_line_6255 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4535,7 +4535,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6034 ", + "name": "assert_line_6256 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4551,7 +4551,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6035 ", + "name": "assert_line_6257 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4567,7 +4567,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6036 ", + "name": "assert_line_6258 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4583,7 +4583,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6037 ", + "name": "assert_line_6259 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4599,7 +4599,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6038 ", + "name": "assert_line_6260 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4615,7 +4615,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6039 ", + "name": "assert_line_6261 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4631,7 +4631,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6040 ", + "name": "assert_line_6262 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4647,7 +4647,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6041 ", + "name": "assert_line_6263 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4663,7 +4663,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6042 ", + "name": "assert_line_6264 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4679,7 +4679,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6043 ", + "name": "assert_line_6265 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4695,7 +4695,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6044 ", + "name": "assert_line_6266 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4711,7 +4711,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6045 ", + "name": "assert_line_6267 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4727,7 +4727,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6046 ", + "name": "assert_line_6268 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4743,7 +4743,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6047 ", + "name": "assert_line_6269 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4759,7 +4759,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6048 ", + "name": "assert_line_6270 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4775,7 +4775,7 @@ "is_anonymous": true, "members": [ { - "name": "assert_line_6049 ", + "name": "assert_line_6271 ", "data_type": "int", "array_length": 0, "bitfield_size": 0, @@ -4783,5 +4783,53 @@ "enum_value": "1/(int)(!!(sizeof(SRADComet3Settings)" } ] + }, + { + "names": [], + "data_type": "Enum", + "packing": 0, + "is_anonymous": true, + "members": [ + { + "name": "assert_line_6272 ", + "data_type": "int", + "array_length": 0, + "bitfield_size": 0, + "is_enum": true, + "enum_value": "1/(int)(!!(sizeof(SRADGigastar2Settings)" + } + ] + }, + { + "names": [], + "data_type": "Enum", + "packing": 0, + "is_anonymous": true, + "members": [ + { + "name": "assert_line_6273 ", + "data_type": "int", + "array_length": 0, + "bitfield_size": 0, + "is_enum": true, + "enum_value": "1/(int)(!!(sizeof(SRADMoonT1SSettings)" + } + ] + }, + { + "names": [], + "data_type": "Enum", + "packing": 0, + "is_anonymous": true, + "members": [ + { + "name": "assert_line_6274 ", + "data_type": "int", + "array_length": 0, + "bitfield_size": 0, + "is_enum": true, + "enum_value": "1/(int)(!!(sizeof(SNeoVIConnectSettings)" + } + ] } ] \ No newline at end of file diff --git a/icsnVC40.h.json b/icsnVC40.h.json index ae37a443a..ec713bc4f 100644 --- a/icsnVC40.h.json +++ b/icsnVC40.h.json @@ -1601,32 +1601,6 @@ } ] }, - { - "names": [ - "vcanrf_versions" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "mpic_maj", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "mpic_min", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, { "names": [ "radgalaxy_versions" @@ -2640,6 +2614,84 @@ "enum_value": null } ] + }, + { + "names": [ + "radgigastar2_versions" + ], + "data_type": "Struct", + "packing": 2, + "is_anonymous": false, + "members": [ + { + "name": "zynq_core_major", + "data_type": "uint8_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "zynq_core_minor", + "data_type": "uint8_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + } + ] + }, + { + "names": [ + "rad_moont1s_versions" + ], + "data_type": "Struct", + "packing": 2, + "is_anonymous": false, + "members": [ + { + "name": "zynq_core_major", + "data_type": "uint8_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "zynq_core_minor", + "data_type": "uint8_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + } + ] + }, + { + "names": [ + "neovi_connect_versions" + ], + "data_type": "Struct", + "packing": 2, + "is_anonymous": false, + "members": [ + { + "name": "zchip_major", + "data_type": "uint8_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "zchip_minor", + "data_type": "uint8_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + } + ] } ] }, @@ -3065,25 +3117,6 @@ } ] }, - { - "names": [ - "HW_ETH_SETTINGS_t", - "HW_ETH_SETTINGS" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "General_Settings", - "data_type": "OP_ETH_GENERAL_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - } - ] - }, { "names": [ "OP_ETH_SETTINGS_t", @@ -3103,7 +3136,7 @@ }, { "name": "preemption_en", - "data_type": "unsigned char", + "data_type": "uint8_t", "array_length": 0, "bitfield_size": 0, "is_enum": false, @@ -3123,7 +3156,7 @@ "members": [ { "name": "mac_addr1", - "data_type": "unsigned char", + "data_type": "uint8_t", "array_length": 6, "bitfield_size": 0, "is_enum": false, @@ -3131,7 +3164,7 @@ }, { "name": "mac_addr2", - "data_type": "unsigned char", + "data_type": "uint8_t", "array_length": 6, "bitfield_size": 0, "is_enum": false, @@ -3139,7 +3172,7 @@ }, { "name": "mac_spoofing_en", - "data_type": "unsigned short", + "data_type": "uint16_t", "array_length": 0, "bitfield_size": 1, "is_enum": false, @@ -3147,7 +3180,7 @@ }, { "name": "mac_spoofing_isDstOrSrc", - "data_type": "unsigned short", + "data_type": "uint16_t", "array_length": 0, "bitfield_size": 1, "is_enum": false, @@ -3155,7 +3188,7 @@ }, { "name": "link_spd", - "data_type": "unsigned short", + "data_type": "uint16_t", "array_length": 0, "bitfield_size": 2, "is_enum": false, @@ -3163,7 +3196,55 @@ }, { "name": "q2112_phy_mode", - "data_type": "unsigned short", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 1, + "is_enum": false, + "enum_value": null + }, + { + "name": "macsec_en", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 1, + "is_enum": false, + "enum_value": null + }, + { + "name": "compliance_mode_en", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 1, + "is_enum": false, + "enum_value": null + }, + { + "name": "cut_thru_tap", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 1, + "is_enum": false, + "enum_value": null + }, + { + "name": "snf_tap", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 1, + "is_enum": false, + "enum_value": null + }, + { + "name": "disable_tap_to_host", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 1, + "is_enum": false, + "enum_value": null + }, + { + "name": "show_tap_tx_receipt", + "data_type": "uint16_t", "array_length": 0, "bitfield_size": 1, "is_enum": false, @@ -3171,9 +3252,9 @@ }, { "name": "reserved", - "data_type": "unsigned short", + "data_type": "uint16_t", "array_length": 0, - "bitfield_size": 11, + "bitfield_size": 5, "is_enum": false, "enum_value": null } @@ -3181,7 +3262,7 @@ }, { "name": "reserved0", - "data_type": "unsigned char", + "data_type": "uint8_t", "array_length": 14, "bitfield_size": 0, "is_enum": false, @@ -3293,15 +3374,7 @@ }, { "name": "flags2", - "data_type": "uint8_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "rsvd", - "data_type": "uint8_t", + "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, "is_enum": false, @@ -7829,31 +7902,31 @@ }, { "names": [ - "_SVCANRFSettings", - "SVCANRFSettings" + "_SECUSettings", + "SECUSettings" ], "data_type": "Struct", "packing": 2, "is_anonymous": false, "members": [ { - "name": "can1", - "data_type": "CAN_SETTINGS", + "name": "ecu_id", + "data_type": "uint32_t", "array_length": 0, "bitfield_size": 0, "is_enum": false, "enum_value": null }, { - "name": "can2", - "data_type": "CAN_SETTINGS", + "name": "selected_network", + "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, "is_enum": false, "enum_value": null }, { - "name": "can3", + "name": "can1", "data_type": "CAN_SETTINGS", "array_length": 0, "bitfield_size": 0, @@ -7861,7 +7934,7 @@ "enum_value": null }, { - "name": "can4", + "name": "can2", "data_type": "CAN_SETTINGS", "array_length": 0, "bitfield_size": 0, @@ -7885,7 +7958,7 @@ "enum_value": null }, { - "name": "network_enables", + "name": "iso15765_separation_time_offset", "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, @@ -7893,23 +7966,23 @@ "enum_value": null }, { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", + "name": "iso9141_kwp_settings", + "data_type": "ISO9141_KEYWORD2000_SETTINGS", "array_length": 0, "bitfield_size": 0, "is_enum": false, "enum_value": null }, { - "name": "pwr_man_timeout", - "data_type": "uint32_t", + "name": "iso_parity", + "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, "is_enum": false, "enum_value": null }, { - "name": "pwr_man_enable", + "name": "iso_msg_termination", "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, @@ -7917,15 +7990,15 @@ "enum_value": null }, { - "name": "misc_io_initial_ddr", - "data_type": "uint16_t", + "name": "iso9141_kwp_settings_2", + "data_type": "ISO9141_KEYWORD2000_SETTINGS", "array_length": 0, "bitfield_size": 0, "is_enum": false, "enum_value": null }, { - "name": "misc_io_initial_latch", + "name": "iso_parity_2", "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, @@ -7933,7 +8006,7 @@ "enum_value": null }, { - "name": "misc_io_analog_enable", + "name": "iso_msg_termination_2", "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, @@ -7941,7 +8014,7 @@ "enum_value": null }, { - "name": "misc_io_report_period", + "name": "network_enables", "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, @@ -7949,7 +8022,7 @@ "enum_value": null }, { - "name": "misc_io_on_report_events", + "name": "network_enables_2", "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, @@ -7957,7 +8030,7 @@ "enum_value": null }, { - "name": "iso15765_separation_time_offset", + "name": "network_enabled_on_boot", "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, @@ -7965,23 +8038,23 @@ "enum_value": null }, { - "name": "iso9141_kwp_enable_reserved", - "data_type": "uint16_t", + "name": "pwr_man_timeout", + "data_type": "uint32_t", "array_length": 0, "bitfield_size": 0, "is_enum": false, "enum_value": null }, { - "name": "iso9141_kwp_settings", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", + "name": "pwr_man_enable", + "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, "is_enum": false, "enum_value": null }, { - "name": "perf_en", + "name": "misc_io_initial_ddr", "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, @@ -7989,7 +8062,7 @@ "enum_value": null }, { - "name": "iso_parity", + "name": "misc_io_initial_latch", "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, @@ -7997,7 +8070,7 @@ "enum_value": null }, { - "name": "iso_msg_termination", + "name": "misc_io_analog_enable", "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, @@ -8005,7 +8078,7 @@ "enum_value": null }, { - "name": "iso_tester_pullup_enable", + "name": "misc_io_report_period", "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, @@ -8013,7 +8086,7 @@ "enum_value": null }, { - "name": "network_enables_2", + "name": "misc_io_on_report_events", "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, @@ -8021,15 +8094,15 @@ "enum_value": null }, { - "name": "iso9141_kwp_settings_2", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", + "name": "ain_sample_period", + "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, "is_enum": false, "enum_value": null }, { - "name": "iso_parity_2", + "name": "ain_threshold", "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, @@ -8037,275 +8110,24 @@ "enum_value": null }, { - "name": "iso_msg_termination_2", - "data_type": "uint16_t", + "name": "swcan", + "data_type": "SWCAN_SETTINGS", "array_length": 0, "bitfield_size": 0, "is_enum": false, "enum_value": null }, { - "name": "idle_wakeup_network_enables_1", - "data_type": "uint16_t", + "name": "swcan2", + "data_type": "SWCAN_SETTINGS", "array_length": 0, "bitfield_size": 0, "is_enum": false, "enum_value": null }, { - "name": "idle_wakeup_network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "disableFwLEDs", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 1, - "is_enum": false, - "enum_value": null - }, - { - "name": "reservedZero", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 15, - "is_enum": false, - "enum_value": null - } - ] - }, - { - "names": [ - "_SECUSettings", - "SECUSettings" - ], - "data_type": "Struct", - "packing": 2, - "is_anonymous": false, - "members": [ - { - "name": "ecu_id", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "selected_network", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can1", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "can2", - "data_type": "CAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin1", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lin2", - "data_type": "LIN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso15765_separation_time_offset", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso9141_kwp_settings_2", - "data_type": "ISO9141_KEYWORD2000_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_parity_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "iso_msg_termination_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enables_2", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "network_enabled_on_boot", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_timeout", - "data_type": "uint32_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pwr_man_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_ddr", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_initial_latch", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_analog_enable", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_report_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "misc_io_on_report_events", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_sample_period", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ain_threshold", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "swcan2", - "data_type": "SWCAN_SETTINGS", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "lsftcan", - "data_type": "CAN_SETTINGS", + "name": "lsftcan", + "data_type": "CAN_SETTINGS", "array_length": 0, "bitfield_size": 0, "is_enum": false, @@ -11858,7 +11680,7 @@ "enum_value": null }, { - "name": "ethernet10g", + "name": "ethernet10g_3", "data_type": "ETHERNET10G_SETTINGS", "array_length": 0, "bitfield_size": 0, @@ -11866,7 +11688,7 @@ "enum_value": null }, { - "name": "ethernet10g_2", + "name": "ethernet10g", "data_type": "ETHERNET10G_SETTINGS", "array_length": 0, "bitfield_size": 0, @@ -11874,7 +11696,7 @@ "enum_value": null }, { - "name": "ethernet10g_3", + "name": "ethernet10g_2", "data_type": "ETHERNET10G_SETTINGS", "array_length": 0, "bitfield_size": 0, @@ -11904,9 +11726,57 @@ "bitfield_size": 0, "is_enum": false, "enum_value": null - } - ] - }, + }, + { + "name": "network_enables_5", + "data_type": "uint64_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "lin2", + "data_type": "LIN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_9141_kwp_enable_reserved_2", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso9141_kwp_settings_2", + "data_type": "ISO9141_KEYWORD2000_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_parity_2", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_msg_termination_2", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + } + ] + }, { "names": [ "_SVividCANSettings", @@ -20817,31 +20687,23 @@ }, { "names": [ - "_GLOBAL_SETTINGS", - "GLOBAL_SETTINGS" + "_SRADGigaStar2Settings", + "SRADGigastar2Settings" ], "data_type": "Struct", "packing": 2, "is_anonymous": false, "members": [ { - "name": "version", - "data_type": "uint16_t", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "len", - "data_type": "uint16_t", + "name": "ecu_id", + "data_type": "uint32_t", "array_length": 0, "bitfield_size": 0, "is_enum": false, "enum_value": null }, { - "name": "chksum", + "name": "perf_en", "data_type": "uint16_t", "array_length": 0, "bitfield_size": 0, @@ -20849,200 +20711,1609 @@ "enum_value": null }, { - "names": [], - "data_type": "Union", + "names": [ + "flags" + ], + "data_type": "Struct", "packing": 2, - "is_anonymous": true, + "is_anonymous": false, "members": [ { - "name": "red", - "data_type": "SRedSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "fire", - "data_type": "SFireSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "firevnet", - "data_type": "SFireVnetSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "cyan", - "data_type": "SCyanSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcan3", - "data_type": "SVCAN3Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcan4", - "data_type": "SVCAN4Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ecu", - "data_type": "SECUSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "ievb", - "data_type": "SIEVBSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pendant", - "data_type": "SPendantSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radgalaxy", - "data_type": "SRADGalaxySettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radstar2", - "data_type": "SRADStar2Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "neoobd2_sim", - "data_type": "SOBD2SimSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "cmprobe", - "data_type": "SCmProbeSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "obd2pro", - "data_type": "SOBD2ProSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcan412", - "data_type": "SVCAN412Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "vcan4_12", - "data_type": "SVCAN412Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "neoecu_avb", - "data_type": "SECU_AVBSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radsupermoon", - "data_type": "SRADSuperMoonSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radmoon2", - "data_type": "SRADMoon2Settings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "pluto", - "data_type": "SRADPlutoSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, - { - "name": "radgigalog", - "data_type": "SRADGigalogSettings", + "name": "hwComLatencyTestEn", + "data_type": "uint16_t", "array_length": 0, - "bitfield_size": 0, + "bitfield_size": 1, "is_enum": false, "enum_value": null }, { - "name": "canhub", - "data_type": "SCANHubSettings", + "name": "disableUsbCheckOnBoot", + "data_type": "uint16_t", "array_length": 0, - "bitfield_size": 0, + "bitfield_size": 1, "is_enum": false, "enum_value": null }, { - "name": "neoecu12", - "data_type": "SNeoECU12Settings", + "name": "reserved", + "data_type": "uint16_t", "array_length": 0, - "bitfield_size": 0, + "bitfield_size": 14, "is_enum": false, "enum_value": null - }, - { - "name": "vcanrf", - "data_type": "SVCANRFSettings", - "array_length": 0, - "bitfield_size": 0, + } + ] + }, + { + "name": "network_enabled_on_boot", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "can1", + "data_type": "CAN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "canfd1", + "data_type": "CANFD_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "can2", + "data_type": "CAN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "canfd2", + "data_type": "CANFD_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "can3", + "data_type": "CAN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "canfd3", + "data_type": "CANFD_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "can4", + "data_type": "CAN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "canfd4", + "data_type": "CANFD_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso9141_kwp_settings_1", + "data_type": "ISO9141_KEYWORD2000_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_parity_1", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_msg_termination_1", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso9141_kwp_settings_2", + "data_type": "ISO9141_KEYWORD2000_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_parity_2", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_msg_termination_2", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso9141_kwp_settings_3", + "data_type": "ISO9141_KEYWORD2000_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_parity_3", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_msg_termination_3", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso9141_kwp_settings_4", + "data_type": "ISO9141_KEYWORD2000_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_parity_4", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_msg_termination_4", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso9141_kwp_settings_5", + "data_type": "ISO9141_KEYWORD2000_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_parity_5", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_msg_termination_5", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso9141_kwp_settings_6", + "data_type": "ISO9141_KEYWORD2000_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_parity_6", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_msg_termination_6", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso9141_kwp_settings_7", + "data_type": "ISO9141_KEYWORD2000_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_parity_7", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_msg_termination_7", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso9141_kwp_settings_8", + "data_type": "ISO9141_KEYWORD2000_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_parity_8", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_msg_termination_8", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso9141_kwp_settings_9", + "data_type": "ISO9141_KEYWORD2000_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_parity_9", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_msg_termination_9", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso9141_kwp_settings_10", + "data_type": "ISO9141_KEYWORD2000_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_parity_10", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_msg_termination_10", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "network_enables", + "data_type": "uint64_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "network_enables_2", + "data_type": "uint64_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "termination_enables", + "data_type": "uint64_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "timeSyncSettings", + "data_type": "TIMESYNC_ICSHARDWARE_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "reporting", + "data_type": "RAD_REPORTING_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso15765_separation_time_offset", + "data_type": "int16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "pwr_man_timeout", + "data_type": "uint32_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "pwr_man_enable", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "gPTP", + "data_type": "RAD_GPTP_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "text_api", + "data_type": "STextAPISettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "disk", + "data_type": "DISK_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "logger", + "data_type": "LOGGER_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "lin1", + "data_type": "LIN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "lin2", + "data_type": "LIN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "lin3", + "data_type": "LIN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "lin4", + "data_type": "LIN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "lin5", + "data_type": "LIN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "lin6", + "data_type": "LIN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "lin7", + "data_type": "LIN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "lin8", + "data_type": "LIN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "lin9", + "data_type": "LIN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "lin10", + "data_type": "LIN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ethernet1", + "data_type": "ETHERNET_SETTINGS2", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ethernet2", + "data_type": "ETHERNET_SETTINGS2", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "opEthGen", + "data_type": "OP_ETH_GENERAL_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ethT1", + "data_type": "ETHERNET_SETTINGS2", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "opEth1", + "data_type": "OP_ETH_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ethT12", + "data_type": "ETHERNET_SETTINGS2", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "opEth2", + "data_type": "OP_ETH_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ethT1s1", + "data_type": "ETHERNET_SETTINGS2", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1s1", + "data_type": "ETHERNET10T1S_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1s1Ext", + "data_type": "ETHERNET10T1S_SETTINGS_EXT", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ethT1s2", + "data_type": "ETHERNET_SETTINGS2", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1s2", + "data_type": "ETHERNET10T1S_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1s2Ext", + "data_type": "ETHERNET10T1S_SETTINGS_EXT", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ethT1s3", + "data_type": "ETHERNET_SETTINGS2", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1s3", + "data_type": "ETHERNET10T1S_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1s3Ext", + "data_type": "ETHERNET10T1S_SETTINGS_EXT", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ethT1s4", + "data_type": "ETHERNET_SETTINGS2", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1s4", + "data_type": "ETHERNET10T1S_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1s4Ext", + "data_type": "ETHERNET10T1S_SETTINGS_EXT", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ethT1s5", + "data_type": "ETHERNET_SETTINGS2", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1s5", + "data_type": "ETHERNET10T1S_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1s5Ext", + "data_type": "ETHERNET10T1S_SETTINGS_EXT", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ethT1s6", + "data_type": "ETHERNET_SETTINGS2", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1s6", + "data_type": "ETHERNET10T1S_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1s6Ext", + "data_type": "ETHERNET10T1S_SETTINGS_EXT", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ethT1s7", + "data_type": "ETHERNET_SETTINGS2", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1s7", + "data_type": "ETHERNET10T1S_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1s7Ext", + "data_type": "ETHERNET10T1S_SETTINGS_EXT", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ethT1s8", + "data_type": "ETHERNET_SETTINGS2", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1s8", + "data_type": "ETHERNET10T1S_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1s8Ext", + "data_type": "ETHERNET10T1S_SETTINGS_EXT", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + } + ] + }, + { + "names": [ + "_SRADMoonT1SSettings", + "SRADMoonT1SSettings" + ], + "data_type": "Struct", + "packing": 2, + "is_anonymous": false, + "members": [ + { + "name": "perf_en", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "names": [ + "flags" + ], + "data_type": "Struct", + "packing": 2, + "is_anonymous": false, + "members": [ + { + "name": "hwComLatencyTestEn", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 1, + "is_enum": false, + "enum_value": null + }, + { + "name": "disableUsbCheckOnBoot", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 1, + "is_enum": false, + "enum_value": null + }, + { + "name": "reserved", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 14, + "is_enum": false, + "enum_value": null + } + ] + }, + { + "name": "network_enabled_on_boot", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "network_enables", + "data_type": "uint64_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "network_enables_2", + "data_type": "uint64_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "reporting", + "data_type": "RAD_REPORTING_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "pwr_man_timeout", + "data_type": "uint32_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "pwr_man_enable", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ethernet", + "data_type": "ETHERNET_SETTINGS2", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "opEthGen", + "data_type": "OP_ETH_GENERAL_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ethT1s", + "data_type": "ETHERNET_SETTINGS2", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1s", + "data_type": "ETHERNET10T1S_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "t1sExt", + "data_type": "ETHERNET10T1S_SETTINGS_EXT", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + } + ] + }, + { + "names": [ + "_SNeoVIConnectSettings", + "SNeoVIConnectSettings" + ], + "data_type": "Struct", + "packing": 2, + "is_anonymous": false, + "members": [ + { + "name": "perf_en", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "network_enabled_on_boot", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "misc_io_on_report_events", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "pwr_man_enable", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso15765_separation_time_offset", + "data_type": "int16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "reservedA", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "pwr_man_timeout", + "data_type": "uint32_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "names": [ + "network_enables" + ], + "data_type": "Union", + "packing": 2, + "is_anonymous": false, + "members": [ + { + "name": "word", + "data_type": "uint64_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "names": [], + "data_type": "Struct", + "packing": 2, + "is_anonymous": true, + "members": [ + { + "name": "network_enables", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "network_enables_2", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "network_enables_3", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "network_enables_4", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + } + ] + } + ] + }, + { + "name": "can1", + "data_type": "CAN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "canfd1", + "data_type": "CANFD_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "can2", + "data_type": "CAN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "canfd2", + "data_type": "CANFD_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "can3", + "data_type": "CAN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "canfd3", + "data_type": "CANFD_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "can4", + "data_type": "CAN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "canfd4", + "data_type": "CANFD_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "can5", + "data_type": "CAN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "canfd5", + "data_type": "CANFD_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "can6", + "data_type": "CAN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "canfd6", + "data_type": "CANFD_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "can7", + "data_type": "CAN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "canfd7", + "data_type": "CANFD_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "can8", + "data_type": "CAN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "canfd8", + "data_type": "CANFD_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "lin1", + "data_type": "LIN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "lin2", + "data_type": "LIN_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso9141_kwp_settings_1", + "data_type": "ISO9141_KEYWORD2000_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_parity_1", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_msg_termination_1", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso9141_kwp_settings_2", + "data_type": "ISO9141_KEYWORD2000_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_parity_2", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "iso_msg_termination_2", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ethernet_1", + "data_type": "ETHERNET_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ethernet2_1", + "data_type": "ETHERNET_SETTINGS2", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "text_api", + "data_type": "STextAPISettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "disk", + "data_type": "DISK_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "misc_io_report_period", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ain_threshold", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "misc_io_analog_enable", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "digitalIoThresholdTicks", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "digitalIoThresholdEnable", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "misc_io_initial_ddr", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "misc_io_initial_latch", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "os_settings", + "data_type": "Fire3LinuxSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "gPTP", + "data_type": "RAD_GPTP_SETTINGS", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "names": [ + "flags" + ], + "data_type": "Struct", + "packing": 2, + "is_anonymous": false, + "members": [ + { + "name": "disableUsbCheckOnBoot", + "data_type": "uint32_t", + "array_length": 0, + "bitfield_size": 1, + "is_enum": false, + "enum_value": null + }, + { + "name": "enableLatencyTest", + "data_type": "uint32_t", + "array_length": 0, + "bitfield_size": 1, + "is_enum": false, + "enum_value": null + }, + { + "name": "enableDefaultLogger", + "data_type": "uint32_t", + "array_length": 0, + "bitfield_size": 1, + "is_enum": false, + "enum_value": null + }, + { + "name": "enableDefaultUpload", + "data_type": "uint32_t", + "array_length": 0, + "bitfield_size": 1, + "is_enum": false, + "enum_value": null + }, + { + "name": "reserved3", + "data_type": "uint32_t", + "array_length": 0, + "bitfield_size": 28, + "is_enum": false, + "enum_value": null + } + ] + } + ] + }, + { + "names": [ + "_GLOBAL_SETTINGS", + "GLOBAL_SETTINGS" + ], + "data_type": "Struct", + "packing": 2, + "is_anonymous": false, + "members": [ + { + "name": "version", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "len", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "chksum", + "data_type": "uint16_t", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "names": [], + "data_type": "Union", + "packing": 2, + "is_anonymous": true, + "members": [ + { + "name": "red", + "data_type": "SRedSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "fire", + "data_type": "SFireSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "firevnet", + "data_type": "SFireVnetSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "cyan", + "data_type": "SCyanSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "vcan3", + "data_type": "SVCAN3Settings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "vcan4", + "data_type": "SVCAN4Settings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ecu", + "data_type": "SECUSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "ievb", + "data_type": "SIEVBSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "pendant", + "data_type": "SPendantSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "radgalaxy", + "data_type": "SRADGalaxySettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "radstar2", + "data_type": "SRADStar2Settings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "neoobd2_sim", + "data_type": "SOBD2SimSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "cmprobe", + "data_type": "SCmProbeSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "obd2pro", + "data_type": "SOBD2ProSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "vcan412", + "data_type": "SVCAN412Settings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "vcan4_12", + "data_type": "SVCAN412Settings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "neoecu_avb", + "data_type": "SECU_AVBSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "radsupermoon", + "data_type": "SRADSuperMoonSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "radmoon2", + "data_type": "SRADMoon2Settings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "pluto", + "data_type": "SRADPlutoSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "radgigalog", + "data_type": "SRADGigalogSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "canhub", + "data_type": "SCANHubSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "neoecu12", + "data_type": "SNeoECU12Settings", + "array_length": 0, + "bitfield_size": 0, "is_enum": false, "enum_value": null }, @@ -21197,6 +22468,30 @@ "bitfield_size": 0, "is_enum": false, "enum_value": null + }, + { + "name": "radgigastar2", + "data_type": "SRADGigastar2Settings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "radmoont1s", + "data_type": "SRADMoonT1SSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "neovi_connect", + "data_type": "SNeoVIConnectSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null } ] } @@ -21419,14 +22714,6 @@ "is_enum": false, "enum_value": null }, - { - "name": "vcanrf", - "data_type": "SVCANRFSettings", - "array_length": 0, - "bitfield_size": 0, - "is_enum": false, - "enum_value": null - }, { "name": "eevb", "data_type": "SEEVBSettings", @@ -21578,6 +22865,30 @@ "bitfield_size": 0, "is_enum": false, "enum_value": null + }, + { + "name": "radgigastar2", + "data_type": "SRADGigastar2Settings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "radmoont1s", + "data_type": "SRADMoonT1SSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null + }, + { + "name": "neovi_connect", + "data_type": "SNeoVIConnectSettings", + "array_length": 0, + "bitfield_size": 0, + "is_enum": false, + "enum_value": null } ] } diff --git a/icsnVC40_processed.h b/icsnVC40_processed.h index cf4d4672a..72c9e7cb3 100644 --- a/icsnVC40_processed.h +++ b/icsnVC40_processed.h @@ -182,6 +182,16 @@ typedef unsigned __int64 uint64_t; #define NETID_SPI4 558 #define NETID_SPI5 559 #define NETID_SPI6 560 +#define NETID_SPI7 561 +#define NETID_SPI8 562 +#define NETID_LIN_09 563 +#define NETID_LIN_10 564 +#define NETID_LIN_11 565 +#define NETID_LIN_12 566 +#define NETID_LIN_13 567 +#define NETID_LIN_14 568 +#define NETID_LIN_15 569 +#define NETID_LIN_16 570 /* Upper boundry of Network IDs */ #define NETID_MAX 100 @@ -231,8 +241,11 @@ typedef unsigned __int64 uint64_t; #define NEODEVICE_RADMOON3 (0x00000023) #define NEODEVICE_RADCOMET (0x00000024) #define NEODEVICE_FIRE3_FLEXRAY (0x00000025) -#define NEODEVICE_RED2_OEM (0x00000026) +#define NEODEVICE_NEOVI_CONNECT (0x00000026) #define NEODEVICE_RADCOMET3 (0x00000027) +#define NEODEVICE_RADMOONT1S (0x00000028) +#define NEODEVICE_GIGASTAR2 (0x00000029) + #define NEODEVICE_RED (0x00000040) #define NEODEVICE_ECU (0x00000080) #define NEODEVICE_IEVB (0x00000100) @@ -252,7 +265,7 @@ typedef unsigned __int64 uint64_t; #define NEODEVICE_VCAN42 (0x00400000) #define NEODEVICE_CMPROBE (0x00800000) #define NEODEVICE_EEVB (0x01000000) -#define NEODEVICE_VCANRF (0x02000000) +#define NEODEVICE_DONT_REUSE4 (0x02000000) #define NEODEVICE_FIRE2 (0x04000000) #define NEODEVICE_FLEX (0x08000000) #define NEODEVICE_RADGALAXY (0x10000000) @@ -961,12 +974,6 @@ typedef union _stChipVersions uint8_t mpic_min; } vcan3_versions; - struct - { - uint8_t mpic_maj; - uint8_t mpic_min; - } vcanrf_versions; - struct { uint8_t zynq_core_major; @@ -1169,6 +1176,24 @@ typedef union _stChipVersions uint8_t zynq_core_minor; } rad_comet3_versions; + struct + { + uint8_t zynq_core_major; + uint8_t zynq_core_minor; + } radgigastar2_versions; + + struct + { + uint8_t zynq_core_major; + uint8_t zynq_core_minor; + } rad_moont1s_versions; + + struct + { + uint8_t zchip_major; + uint8_t zchip_minor; + } neovi_connect_versions; + } stChipVersions; #define stChipVersions_SIZE 8 @@ -1259,12 +1284,6 @@ typedef struct SRAD_GPTP_AND_TAP_SETTINGS_s } RAD_GPTP_AND_TAP_SETTINGS; #define RAD_GPTP_AND_TAP_SETTINGS_SIZE 40 -typedef struct HW_ETH_SETTINGS_t -{ - OP_ETH_GENERAL_SETTINGS General_Settings; -} HW_ETH_SETTINGS; -#define HW_ETH_SETTINGS_SIZE 20 - /* ucConfigMode in OP_ETH_SETTINGS */ typedef enum _opEthLinkMode { @@ -1282,21 +1301,27 @@ enum typedef struct OP_ETH_SETTINGS_t { uint8_t ucConfigMode; - unsigned char preemption_en; + uint8_t preemption_en; union { struct { // Reuse the mac_addr for switch mode if required! - unsigned char mac_addr1[6]; // Original Addr for spoofing - unsigned char mac_addr2[6]; // Target Addr for spoofing - unsigned short mac_spoofing_en : 1; - unsigned short mac_spoofing_isDstOrSrc : 1; - unsigned short link_spd : 2; - unsigned short q2112_phy_mode : 1; - unsigned short reserved : 11; + uint8_t mac_addr1[6]; // Original Addr for spoofing + uint8_t mac_addr2[6]; // Target Addr for spoofing + uint16_t mac_spoofing_en : 1; + uint16_t mac_spoofing_isDstOrSrc : 1; + uint16_t link_spd : 2; + uint16_t q2112_phy_mode : 1; + uint16_t macsec_en : 1; // enable loading MACsec config on boot + uint16_t compliance_mode_en : 1; + uint16_t cut_thru_tap : 1; + uint16_t snf_tap : 1; // store and forward + uint16_t disable_tap_to_host : 1; + uint16_t show_tap_tx_receipt : 1; + uint16_t reserved : 5; }; - unsigned char reserved0[14]; + uint8_t reserved0[14]; }; } OP_ETH_SETTINGS; #define OP_ETH_SETTINGS_SIZE 16 @@ -1324,9 +1349,12 @@ typedef struct ETHERNET_SETTINGS_t #define ETHERNET_SETTINGS2_FLAG2_PHY_MODE 0x02 #define ETHERNET_SETTINGS2_FLAG2_LINK_MODE_AUTO 0x04 #define ETHERNET_SETTINGS2_FLAG2_IP_CONFIG_NOT_ALLOWED 0x08 - #define ETHERNET_SETTINGS2_FLAG2_SFP_ID_SHIFT 4 #define ETHERNET_SETTINGS2_FLAG2_SFP_ID_MASK 0xF0 +#define ETHERNET_SETTINGS2_FLAG2_CUT_THRU_TAP_ENABLE 0x0100 +#define ETHERNET_SETTINGS2_FLAG2_SNF_TAP_ENABLE 0x0200 // store and forward +#define ETHERNET_SETTINGS2_FLAG2_DISABLE_TAP_TO_HOST 0x0400 +#define ETHERNET_SETTINGS2_FLAG2_SHOW_TAP_TX_RECEIPT 0x0800 typedef enum { @@ -1366,9 +1394,12 @@ typedef struct ETHERNET_SETTINGS2_t * bit5: SFP module ID1 * bit6: SFP module ID2 * bit7: SFP module ID3 + * bit8: cut through tap enabled (only TX forwarded from tap partner) + * bit9: store and forward tap enabled (forward RX to tap partner) + * bit10: disable tap frames to host + * bit11: show TX receipt for tap frames */ - uint8_t flags2; - uint8_t rsvd; + uint16_t flags2; } ETHERNET_SETTINGS2; #define ETHERNET_SETTINGS2_SIZE 16 @@ -1386,6 +1417,11 @@ typedef struct ETHERNET_SETTINGS2_t #define ETHERNET_SETTINGS10G_FLAG_PKT_CHECK 0x00000800 #define ETHERNET_SETTINGS10G_FLAG_PKT_GEN 0x00001000 #define ETHERNET_SETTINGS10G_FLAG_IP_CONFIG_NOT_ALLOWED 0x00002000 +#define ETHERNET_SETTINGS10G_FLAG_CUT_THRU_TAP_ENABLE 0x00004000 +#define ETHERNET_SETTINGS10G_FLAG_SNF_TAP_ENABLE 0x00008000 // store and forward +#define ETHERNET_SETTINGS10G_FLAG_DISABLE_TAP_TO_HOST 0x00010000 +#define ETHERNET_SETTINGS10G_FLAG_MACSEC_ENABLE 0x00020000 +#define ETHERNET_SETTINGS10G_FLAG_SHOW_TAP_TX_RECEIPT 0x00040000 #define ETHERNET_SETTINGS10G_FLAG_COMM_IN_USE 0x80000000 typedef struct ETHERNET10G_SETTINGS_t @@ -1405,6 +1441,11 @@ typedef struct ETHERNET10G_SETTINGS_t * bit11: enable packet checker * bit12: enable packet generator * bit13: IP config not allowed + * bit14: cut through tap enabled (only TX forwarded from tap partner) + * bit15: store and forward tap enabled (forward RX to tap partner) + * bit16: disable tap frames to host + * bit17: macsec enable + * bit18: show TX receipt for tap frames * bit31: comm in use */ uint32_t flags; @@ -1443,8 +1484,6 @@ typedef struct ETHERNET10T1S_SETTINGS_EXT_t } ETHERNET10T1S_SETTINGS_EXT; #define ETHERNET10T1S_SETTINGS_EXT_SIZE 16 -#define ETHERNET10T1S_SETTINGS_EXT_FLAG_ENABLE_MULTI_ID 0x01 - /* * START - MACsec Definitions */ @@ -2601,52 +2640,6 @@ typedef struct _SVCAN4Settings } SVCAN4Settings; #define SVCAN4Settings_SIZE 342 -typedef struct _SVCANRFSettings -{ - CAN_SETTINGS can1; - CAN_SETTINGS can2; - CAN_SETTINGS can3; - CAN_SETTINGS can4; - - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; - - uint16_t network_enables; - uint16_t network_enabled_on_boot; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_analog_enable; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - - uint16_t iso15765_separation_time_offset; - - uint16_t iso9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - - uint16_t perf_en; - - uint16_t iso_parity; - uint16_t iso_msg_termination; - uint16_t iso_tester_pullup_enable; - uint16_t network_enables_2; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; - - uint16_t idle_wakeup_network_enables_1; - uint16_t idle_wakeup_network_enables_2; - - uint16_t disableFwLEDs : 1; - uint16_t reservedZero : 15; -} SVCANRFSettings; -#define SVCANRFSettings_SIZE 340 - typedef struct _SECUSettings { /* ECU ID used in CAN communications. @@ -3347,7 +3340,6 @@ typedef struct _SRADGalaxy2Settings uint16_t iso_9141_kwp_enable_reserved; ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; uint16_t iso_parity_1; - uint16_t iso_msg_termination_1; uint16_t idle_wakeup_network_enables_1; @@ -3388,15 +3380,23 @@ typedef struct _SRADGalaxy2Settings OP_ETH_SETTINGS opEth15; OP_ETH_SETTINGS opEth16; + ETHERNET10G_SETTINGS ethernet10g_3; ETHERNET10G_SETTINGS ethernet10g; ETHERNET10G_SETTINGS ethernet10g_2; - ETHERNET10G_SETTINGS ethernet10g_3; uint16_t network_enables_4; RAD_REPORTING_SETTINGS reporting; RAD_GPTP_SETTINGS gPTP; + uint64_t network_enables_5; + + LIN_SETTINGS lin2; + uint16_t iso_9141_kwp_enable_reserved_2; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; + uint16_t iso_parity_2; + uint16_t iso_msg_termination_2; + } SRADGalaxy2Settings; -#define SRADGalaxy2Settings_SIZE 822 +#define SRADGalaxy2Settings_SIZE 960 typedef struct _SVividCANSettings { @@ -4993,6 +4993,223 @@ typedef struct _SRADComet3Settings } SRADComet3Settings; #define SRADComet3Settings_SIZE 674 +typedef struct _SRADGigaStar2Settings +{ + // ECU ID used in CAN communications. + // TX ID = ECU ID with bit28 cleared, + // RX ID = ECUID with bit28 set, + // ECU ID = 0 implies ECU ID = serial no with bit 27 set + uint32_t ecu_id; + uint16_t perf_en; + struct + { + uint16_t hwComLatencyTestEn : 1; + uint16_t disableUsbCheckOnBoot : 1; + uint16_t reserved : 14; + } flags; + uint16_t network_enabled_on_boot; + CAN_SETTINGS can1; + CANFD_SETTINGS canfd1; + CAN_SETTINGS can2; + CANFD_SETTINGS canfd2; + CAN_SETTINGS can3; + CANFD_SETTINGS canfd3; + CAN_SETTINGS can4; + CANFD_SETTINGS canfd4; + + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; + uint16_t iso_parity_1; + uint16_t iso_msg_termination_1; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; + uint16_t iso_parity_2; + uint16_t iso_msg_termination_2; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_3; + uint16_t iso_parity_3; + uint16_t iso_msg_termination_3; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_4; + uint16_t iso_parity_4; + uint16_t iso_msg_termination_4; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_5; + uint16_t iso_parity_5; + uint16_t iso_msg_termination_5; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_6; + uint16_t iso_parity_6; + uint16_t iso_msg_termination_6; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_7; + uint16_t iso_parity_7; + uint16_t iso_msg_termination_7; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_8; + uint16_t iso_parity_8; + uint16_t iso_msg_termination_8; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_9; + uint16_t iso_parity_9; + uint16_t iso_msg_termination_9; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_10; + uint16_t iso_parity_10; + uint16_t iso_msg_termination_10; + uint64_t network_enables; + uint64_t network_enables_2; + uint64_t termination_enables; + TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; + RAD_REPORTING_SETTINGS reporting; + int16_t iso15765_separation_time_offset; + uint32_t pwr_man_timeout; + uint16_t pwr_man_enable; + RAD_GPTP_SETTINGS gPTP; + STextAPISettings text_api; + DISK_SETTINGS disk; + LOGGER_SETTINGS logger; + LIN_SETTINGS lin1; + LIN_SETTINGS lin2; + LIN_SETTINGS lin3; + LIN_SETTINGS lin4; + LIN_SETTINGS lin5; + LIN_SETTINGS lin6; + LIN_SETTINGS lin7; + LIN_SETTINGS lin8; + LIN_SETTINGS lin9; + LIN_SETTINGS lin10; + // TODO more LIN + // Ethernet SFP + ETHERNET_SETTINGS2 ethernet1; + ETHERNET_SETTINGS2 ethernet2; + // Ethernet General + OP_ETH_GENERAL_SETTINGS opEthGen; + // 100/1000T1 + ETHERNET_SETTINGS2 ethT1; + OP_ETH_SETTINGS opEth1; + ETHERNET_SETTINGS2 ethT12; + OP_ETH_SETTINGS opEth2; + // 10T1S + ETHERNET_SETTINGS2 ethT1s1; + ETHERNET10T1S_SETTINGS t1s1; + ETHERNET10T1S_SETTINGS_EXT t1s1Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s2; + ETHERNET10T1S_SETTINGS t1s2; + ETHERNET10T1S_SETTINGS_EXT t1s2Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s3; + ETHERNET10T1S_SETTINGS t1s3; + ETHERNET10T1S_SETTINGS_EXT t1s3Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s4; + ETHERNET10T1S_SETTINGS t1s4; + ETHERNET10T1S_SETTINGS_EXT t1s4Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s5; + ETHERNET10T1S_SETTINGS t1s5; + ETHERNET10T1S_SETTINGS_EXT t1s5Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s6; + ETHERNET10T1S_SETTINGS t1s6; + ETHERNET10T1S_SETTINGS_EXT t1s6Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s7; + ETHERNET10T1S_SETTINGS t1s7; + ETHERNET10T1S_SETTINGS_EXT t1s7Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s8; + ETHERNET10T1S_SETTINGS t1s8; + ETHERNET10T1S_SETTINGS_EXT t1s8Ext; +} SRADGigastar2Settings; +#define SRADGigastar2Settings_SIZE 2024 + +typedef struct _SRADMoonT1SSettings +{ + uint16_t perf_en; + struct + { + uint16_t hwComLatencyTestEn : 1; + uint16_t disableUsbCheckOnBoot : 1; + uint16_t reserved : 14; + } flags; + uint16_t network_enabled_on_boot; + uint64_t network_enables; + uint64_t network_enables_2; + RAD_REPORTING_SETTINGS reporting; + uint32_t pwr_man_timeout; + uint16_t pwr_man_enable; + // Ethernet 10/100/1000 + ETHERNET_SETTINGS2 ethernet; + // Ethernet General + OP_ETH_GENERAL_SETTINGS opEthGen; + // 10T1S + ETHERNET_SETTINGS2 ethT1s; + ETHERNET10T1S_SETTINGS t1s; + // 10T1S Extended Settings + ETHERNET10T1S_SETTINGS_EXT t1sExt; +} SRADMoonT1SSettings; +#define SRADMoonT1SSettings_SIZE 124 + +typedef struct _SNeoVIConnectSettings +{ + uint16_t perf_en; + uint16_t network_enabled_on_boot; + uint16_t misc_io_on_report_events; + uint16_t pwr_man_enable; + int16_t iso15765_separation_time_offset; + uint16_t reservedA; + uint32_t pwr_man_timeout; + union + { + uint64_t word; + struct + { + uint16_t network_enables; + uint16_t network_enables_2; + uint16_t network_enables_3; + uint16_t network_enables_4; + }; + } network_enables; + CAN_SETTINGS can1; + CANFD_SETTINGS canfd1; + CAN_SETTINGS can2; + CANFD_SETTINGS canfd2; + CAN_SETTINGS can3; + CANFD_SETTINGS canfd3; + CAN_SETTINGS can4; + CANFD_SETTINGS canfd4; + CAN_SETTINGS can5; + CANFD_SETTINGS canfd5; + CAN_SETTINGS can6; + CANFD_SETTINGS canfd6; + CAN_SETTINGS can7; + CANFD_SETTINGS canfd7; + CAN_SETTINGS can8; + CANFD_SETTINGS canfd8; + LIN_SETTINGS lin1; + LIN_SETTINGS lin2; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; + uint16_t iso_parity_1; + uint16_t iso_msg_termination_1; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; + uint16_t iso_parity_2; + uint16_t iso_msg_termination_2; + ETHERNET_SETTINGS ethernet_1; + ETHERNET_SETTINGS2 ethernet2_1; + STextAPISettings text_api; + DISK_SETTINGS disk; + uint16_t misc_io_report_period; + uint16_t ain_threshold; + uint16_t misc_io_analog_enable; + uint16_t digitalIoThresholdTicks; + uint16_t digitalIoThresholdEnable; + uint16_t misc_io_initial_ddr; + uint16_t misc_io_initial_latch; + Fire3LinuxSettings os_settings; + RAD_GPTP_SETTINGS gPTP; + struct + { + uint32_t disableUsbCheckOnBoot : 1; + uint32_t enableLatencyTest : 1; + uint32_t enableDefaultLogger : 1; + uint32_t enableDefaultUpload : 1; + uint32_t reserved3 : 28; + } flags; +} SNeoVIConnectSettings; +#define SNeoVIConnectSettings_SIZE (628) + #define GS_VERSION 5 typedef struct _GLOBAL_SETTINGS { @@ -5024,7 +5241,6 @@ typedef struct _GLOBAL_SETTINGS SRADGigalogSettings radgigalog; SCANHubSettings canhub; SNeoECU12Settings neoecu12; - SVCANRFSettings vcanrf; SEEVBSettings eevb; SFlexVnetzSettings flexvnetz; SVividCANSettings vividcan; @@ -5044,10 +5260,13 @@ typedef struct _GLOBAL_SETTINGS SRADMoon3Settings radmoon3; SRADCometSettings radcomet; SRADComet3Settings radcomet3; + SRADGigastar2Settings radgigastar2; + SRADMoonT1SSettings radmoont1s; + SNeoVIConnectSettings neovi_connect; // Make sure SDeviceSettings matches this }; } GLOBAL_SETTINGS; -#define GLOBAL_SETTINGS_SIZE (SFire3Settings_SIZE + 6) +#define GLOBAL_SETTINGS_SIZE (SRADGigastar2Settings_SIZE + 6) #define NEOVI_3G_MAX_SETTINGS_SIZE sizeof(GLOBAL_SETTINGS) @@ -5067,7 +5286,7 @@ typedef enum _EDeviceSettingsType DeviceRADMoon2SettingsType, DeviceRADPlutoSettingsType, DeviceRADGigalogSettingsType, - DeviceVCANRFSettingsType, + DeviceDeprecatedType, DeviceEEVBSettingsType, DeviceVCAN4IndSettingsType, DeviceNeoECU12SettingsType, @@ -5092,9 +5311,11 @@ typedef enum _EDeviceSettingsType DeviceFire3SettingsType, DeviceFire3FlexraySettingsType, DeviceRADCometSettingsType, - DeviceRed2OemSettingsType, + DeviceNeoVIConnectSettingsType, DeviceRADComet3SettingsType, DeviceRADGalaxy2SettingsType, + DeviceRADGigastar2SettingsType, + DeviceRADMoonT1SSettingsType, // add new settings type here // Also add to map inside cicsneoVI::Init() DeviceSettingsTypeMax, @@ -5130,7 +5351,6 @@ typedef struct _SDeviceSettings SRADGigalogSettings radgigalog; SCANHubSettings canhub; SNeoECU12Settings neoecu12; - SVCANRFSettings vcanrf; SEEVBSettings eevb; SFlexVnetzSettings flexvnetz; SVividCANSettings vividcan; @@ -5150,6 +5370,9 @@ typedef struct _SDeviceSettings SFire3FlexraySettings fire3Flexray; SRADCometSettings radcomet; SRADComet3Settings radcomet3; + SRADGigastar2Settings radgigastar2; + SRADMoonT1SSettings radmoont1s; + SNeoVIConnectSettings neovi_connect; // Make sure GLOBAL_SETTINGS matches this // NOTE: When adding new structures here implement inside icsneoGetDeviceSettings and icsneoSetDeviceSettings also. } Settings; } Settings; @@ -5970,7 +6193,6 @@ CHECK_STRUCT_SIZE(SFireVnetSettings); CHECK_STRUCT_SIZE(SCyanSettings); CHECK_STRUCT_SIZE(SVCAN3Settings); CHECK_STRUCT_SIZE(SVCAN4Settings); -CHECK_STRUCT_SIZE(SVCANRFSettings); CHECK_STRUCT_SIZE(SECUSettings); CHECK_STRUCT_SIZE(SPendantSettings); CHECK_STRUCT_SIZE(SIEVBSettings); @@ -6019,6 +6241,9 @@ CHECK_STRUCT_SIZE(SFire3FlexraySettings); CHECK_STRUCT_SIZE(CANHubSettings); CHECK_STRUCT_SIZE(SRADCometSettings); CHECK_STRUCT_SIZE(SRADComet3Settings); +CHECK_STRUCT_SIZE(SRADGigastar2Settings); +CHECK_STRUCT_SIZE(SRADMoonT1SSettings); +CHECK_STRUCT_SIZE(SNeoVIConnectSettings); #endif /* INTREPID_NO_CHECK_STRUCT_SIZE */ #endif /* _ICSNVC40_H */ diff --git a/include/exceptions.h b/include/exceptions.h index 2a917545b..cacf98e16 100644 --- a/include/exceptions.h +++ b/include/exceptions.h @@ -8,7 +8,7 @@ extern "C" #endif int initialize_exceptions(PyObject* module); - PyObject* _set_ics_exception(PyObject* exception, char* msg, const char* func_name); + PyObject* _set_ics_exception(PyObject* exception, const char* msg, const char* func_name); #define set_ics_exception(exception, msg) _set_ics_exception(exception, msg, __FUNCTION__); PyObject* exception_argument_error(void); diff --git a/include/ics/icsnVC40.h b/include/ics/icsnVC40.h index 34f262b9b..57ac37d8b 100644 --- a/include/ics/icsnVC40.h +++ b/include/ics/icsnVC40.h @@ -183,6 +183,16 @@ typedef unsigned __int64 uint64_t; #define NETID_SPI4 558 #define NETID_SPI5 559 #define NETID_SPI6 560 +#define NETID_SPI7 561 +#define NETID_SPI8 562 +#define NETID_LIN_09 563 +#define NETID_LIN_10 564 +#define NETID_LIN_11 565 +#define NETID_LIN_12 566 +#define NETID_LIN_13 567 +#define NETID_LIN_14 568 +#define NETID_LIN_15 569 +#define NETID_LIN_16 570 /* Upper boundry of Network IDs */ #define NETID_MAX 100 @@ -232,8 +242,11 @@ typedef unsigned __int64 uint64_t; #define NEODEVICE_RADMOON3 (0x00000023) #define NEODEVICE_RADCOMET (0x00000024) #define NEODEVICE_FIRE3_FLEXRAY (0x00000025) -#define NEODEVICE_RED2_OEM (0x00000026) +#define NEODEVICE_NEOVI_CONNECT (0x00000026) #define NEODEVICE_RADCOMET3 (0x00000027) +#define NEODEVICE_RADMOONT1S (0x00000028) +#define NEODEVICE_GIGASTAR2 (0x00000029) + #define NEODEVICE_RED (0x00000040) #define NEODEVICE_ECU (0x00000080) #define NEODEVICE_IEVB (0x00000100) @@ -253,7 +266,7 @@ typedef unsigned __int64 uint64_t; #define NEODEVICE_VCAN42 (0x00400000) #define NEODEVICE_CMPROBE (0x00800000) #define NEODEVICE_EEVB (0x01000000) -#define NEODEVICE_VCANRF (0x02000000) +#define NEODEVICE_DONT_REUSE4 (0x02000000) #define NEODEVICE_FIRE2 (0x04000000) #define NEODEVICE_FLEX (0x08000000) #define NEODEVICE_RADGALAXY (0x10000000) @@ -964,12 +977,6 @@ typedef union _stChipVersions uint8_t mpic_min; } vcan3_versions; - struct - { - uint8_t mpic_maj; - uint8_t mpic_min; - } vcanrf_versions; - struct { uint8_t zynq_core_major; @@ -1172,6 +1179,24 @@ typedef union _stChipVersions uint8_t zynq_core_minor; } rad_comet3_versions; + struct + { + uint8_t zynq_core_major; + uint8_t zynq_core_minor; + } radgigastar2_versions; + + struct + { + uint8_t zynq_core_major; + uint8_t zynq_core_minor; + } rad_moont1s_versions; + + struct + { + uint8_t zchip_major; + uint8_t zchip_minor; + } neovi_connect_versions; + } stChipVersions; #define stChipVersions_SIZE 8 @@ -1262,12 +1287,6 @@ typedef struct SRAD_GPTP_AND_TAP_SETTINGS_s } RAD_GPTP_AND_TAP_SETTINGS; #define RAD_GPTP_AND_TAP_SETTINGS_SIZE 40 -typedef struct HW_ETH_SETTINGS_t -{ - OP_ETH_GENERAL_SETTINGS General_Settings; -} HW_ETH_SETTINGS; -#define HW_ETH_SETTINGS_SIZE 20 - /* ucConfigMode in OP_ETH_SETTINGS */ typedef enum _opEthLinkMode { @@ -1285,21 +1304,27 @@ enum typedef struct OP_ETH_SETTINGS_t { uint8_t ucConfigMode; - unsigned char preemption_en; + uint8_t preemption_en; union { struct { // Reuse the mac_addr for switch mode if required! - unsigned char mac_addr1[6]; // Original Addr for spoofing - unsigned char mac_addr2[6]; // Target Addr for spoofing - unsigned short mac_spoofing_en : 1; - unsigned short mac_spoofing_isDstOrSrc : 1; - unsigned short link_spd : 2; - unsigned short q2112_phy_mode : 1; - unsigned short reserved : 11; + uint8_t mac_addr1[6]; // Original Addr for spoofing + uint8_t mac_addr2[6]; // Target Addr for spoofing + uint16_t mac_spoofing_en : 1; + uint16_t mac_spoofing_isDstOrSrc : 1; + uint16_t link_spd : 2; + uint16_t q2112_phy_mode : 1; + uint16_t macsec_en : 1; // enable loading MACsec config on boot + uint16_t compliance_mode_en : 1; + uint16_t cut_thru_tap : 1; + uint16_t snf_tap : 1; // store and forward + uint16_t disable_tap_to_host : 1; + uint16_t show_tap_tx_receipt : 1; + uint16_t reserved : 5; }; - unsigned char reserved0[14]; + uint8_t reserved0[14]; }; } OP_ETH_SETTINGS; #define OP_ETH_SETTINGS_SIZE 16 @@ -1328,9 +1353,12 @@ typedef struct ETHERNET_SETTINGS_t #define ETHERNET_SETTINGS2_FLAG2_PHY_MODE 0x02 #define ETHERNET_SETTINGS2_FLAG2_LINK_MODE_AUTO 0x04 #define ETHERNET_SETTINGS2_FLAG2_IP_CONFIG_NOT_ALLOWED 0x08 - #define ETHERNET_SETTINGS2_FLAG2_SFP_ID_SHIFT 4 #define ETHERNET_SETTINGS2_FLAG2_SFP_ID_MASK 0xF0 +#define ETHERNET_SETTINGS2_FLAG2_CUT_THRU_TAP_ENABLE 0x0100 +#define ETHERNET_SETTINGS2_FLAG2_SNF_TAP_ENABLE 0x0200 // store and forward +#define ETHERNET_SETTINGS2_FLAG2_DISABLE_TAP_TO_HOST 0x0400 +#define ETHERNET_SETTINGS2_FLAG2_SHOW_TAP_TX_RECEIPT 0x0800 typedef enum { @@ -1370,9 +1398,12 @@ typedef struct ETHERNET_SETTINGS2_t * bit5: SFP module ID1 * bit6: SFP module ID2 * bit7: SFP module ID3 + * bit8: cut through tap enabled (only TX forwarded from tap partner) + * bit9: store and forward tap enabled (forward RX to tap partner) + * bit10: disable tap frames to host + * bit11: show TX receipt for tap frames */ - uint8_t flags2; - uint8_t rsvd; + uint16_t flags2; } ETHERNET_SETTINGS2; #define ETHERNET_SETTINGS2_SIZE 16 @@ -1390,6 +1421,11 @@ typedef struct ETHERNET_SETTINGS2_t #define ETHERNET_SETTINGS10G_FLAG_PKT_CHECK 0x00000800 #define ETHERNET_SETTINGS10G_FLAG_PKT_GEN 0x00001000 #define ETHERNET_SETTINGS10G_FLAG_IP_CONFIG_NOT_ALLOWED 0x00002000 +#define ETHERNET_SETTINGS10G_FLAG_CUT_THRU_TAP_ENABLE 0x00004000 +#define ETHERNET_SETTINGS10G_FLAG_SNF_TAP_ENABLE 0x00008000 // store and forward +#define ETHERNET_SETTINGS10G_FLAG_DISABLE_TAP_TO_HOST 0x00010000 +#define ETHERNET_SETTINGS10G_FLAG_MACSEC_ENABLE 0x00020000 +#define ETHERNET_SETTINGS10G_FLAG_SHOW_TAP_TX_RECEIPT 0x00040000 #define ETHERNET_SETTINGS10G_FLAG_COMM_IN_USE 0x80000000 typedef struct ETHERNET10G_SETTINGS_t @@ -1409,6 +1445,11 @@ typedef struct ETHERNET10G_SETTINGS_t * bit11: enable packet checker * bit12: enable packet generator * bit13: IP config not allowed + * bit14: cut through tap enabled (only TX forwarded from tap partner) + * bit15: store and forward tap enabled (forward RX to tap partner) + * bit16: disable tap frames to host + * bit17: macsec enable + * bit18: show TX receipt for tap frames * bit31: comm in use */ uint32_t flags; @@ -1447,8 +1488,6 @@ typedef struct ETHERNET10T1S_SETTINGS_EXT_t } ETHERNET10T1S_SETTINGS_EXT; #define ETHERNET10T1S_SETTINGS_EXT_SIZE 16 -#define ETHERNET10T1S_SETTINGS_EXT_FLAG_ENABLE_MULTI_ID 0x01 - /* * START - MACsec Definitions */ @@ -2612,52 +2651,6 @@ typedef struct _SVCAN4Settings } SVCAN4Settings; #define SVCAN4Settings_SIZE 342 -typedef struct _SVCANRFSettings -{ - CAN_SETTINGS can1; - CAN_SETTINGS can2; - CAN_SETTINGS can3; - CAN_SETTINGS can4; - - LIN_SETTINGS lin1; - LIN_SETTINGS lin2; - - uint16_t network_enables; - uint16_t network_enabled_on_boot; - - uint32_t pwr_man_timeout; - uint16_t pwr_man_enable; - - uint16_t misc_io_initial_ddr; - uint16_t misc_io_initial_latch; - uint16_t misc_io_analog_enable; - uint16_t misc_io_report_period; - uint16_t misc_io_on_report_events; - - uint16_t iso15765_separation_time_offset; - - uint16_t iso9141_kwp_enable_reserved; - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings; - - uint16_t perf_en; - - uint16_t iso_parity; - uint16_t iso_msg_termination; - uint16_t iso_tester_pullup_enable; - uint16_t network_enables_2; - - ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; - uint16_t iso_parity_2; - uint16_t iso_msg_termination_2; - - uint16_t idle_wakeup_network_enables_1; - uint16_t idle_wakeup_network_enables_2; - - uint16_t disableFwLEDs : 1; - uint16_t reservedZero : 15; -} SVCANRFSettings; -#define SVCANRFSettings_SIZE 340 - typedef struct _SECUSettings { /* ECU ID used in CAN communications. @@ -3358,7 +3351,6 @@ typedef struct _SRADGalaxy2Settings uint16_t iso_9141_kwp_enable_reserved; ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; uint16_t iso_parity_1; - uint16_t iso_msg_termination_1; uint16_t idle_wakeup_network_enables_1; @@ -3399,15 +3391,23 @@ typedef struct _SRADGalaxy2Settings OP_ETH_SETTINGS opEth15; OP_ETH_SETTINGS opEth16; + ETHERNET10G_SETTINGS ethernet10g_3; ETHERNET10G_SETTINGS ethernet10g; ETHERNET10G_SETTINGS ethernet10g_2; - ETHERNET10G_SETTINGS ethernet10g_3; uint16_t network_enables_4; RAD_REPORTING_SETTINGS reporting; RAD_GPTP_SETTINGS gPTP; + uint64_t network_enables_5; + + LIN_SETTINGS lin2; + uint16_t iso_9141_kwp_enable_reserved_2; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; + uint16_t iso_parity_2; + uint16_t iso_msg_termination_2; + } SRADGalaxy2Settings; -#define SRADGalaxy2Settings_SIZE 822 +#define SRADGalaxy2Settings_SIZE 960 typedef struct _SVividCANSettings { @@ -5007,6 +5007,223 @@ typedef struct _SRADComet3Settings } SRADComet3Settings; #define SRADComet3Settings_SIZE 674 +typedef struct _SRADGigaStar2Settings +{ + // ECU ID used in CAN communications. + // TX ID = ECU ID with bit28 cleared, + // RX ID = ECUID with bit28 set, + // ECU ID = 0 implies ECU ID = serial no with bit 27 set + uint32_t ecu_id; + uint16_t perf_en; + struct + { + uint16_t hwComLatencyTestEn : 1; + uint16_t disableUsbCheckOnBoot : 1; + uint16_t reserved : 14; + } flags; + uint16_t network_enabled_on_boot; + CAN_SETTINGS can1; + CANFD_SETTINGS canfd1; + CAN_SETTINGS can2; + CANFD_SETTINGS canfd2; + CAN_SETTINGS can3; + CANFD_SETTINGS canfd3; + CAN_SETTINGS can4; + CANFD_SETTINGS canfd4; + + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; + uint16_t iso_parity_1; + uint16_t iso_msg_termination_1; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; + uint16_t iso_parity_2; + uint16_t iso_msg_termination_2; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_3; + uint16_t iso_parity_3; + uint16_t iso_msg_termination_3; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_4; + uint16_t iso_parity_4; + uint16_t iso_msg_termination_4; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_5; + uint16_t iso_parity_5; + uint16_t iso_msg_termination_5; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_6; + uint16_t iso_parity_6; + uint16_t iso_msg_termination_6; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_7; + uint16_t iso_parity_7; + uint16_t iso_msg_termination_7; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_8; + uint16_t iso_parity_8; + uint16_t iso_msg_termination_8; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_9; + uint16_t iso_parity_9; + uint16_t iso_msg_termination_9; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_10; + uint16_t iso_parity_10; + uint16_t iso_msg_termination_10; + uint64_t network_enables; + uint64_t network_enables_2; + uint64_t termination_enables; + TIMESYNC_ICSHARDWARE_SETTINGS timeSyncSettings; + RAD_REPORTING_SETTINGS reporting; + int16_t iso15765_separation_time_offset; + uint32_t pwr_man_timeout; + uint16_t pwr_man_enable; + RAD_GPTP_SETTINGS gPTP; + STextAPISettings text_api; + DISK_SETTINGS disk; + LOGGER_SETTINGS logger; + LIN_SETTINGS lin1; + LIN_SETTINGS lin2; + LIN_SETTINGS lin3; + LIN_SETTINGS lin4; + LIN_SETTINGS lin5; + LIN_SETTINGS lin6; + LIN_SETTINGS lin7; + LIN_SETTINGS lin8; + LIN_SETTINGS lin9; + LIN_SETTINGS lin10; + // TODO more LIN + // Ethernet SFP + ETHERNET_SETTINGS2 ethernet1; + ETHERNET_SETTINGS2 ethernet2; + // Ethernet General + OP_ETH_GENERAL_SETTINGS opEthGen; + // 100/1000T1 + ETHERNET_SETTINGS2 ethT1; + OP_ETH_SETTINGS opEth1; + ETHERNET_SETTINGS2 ethT12; + OP_ETH_SETTINGS opEth2; + // 10T1S + ETHERNET_SETTINGS2 ethT1s1; + ETHERNET10T1S_SETTINGS t1s1; + ETHERNET10T1S_SETTINGS_EXT t1s1Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s2; + ETHERNET10T1S_SETTINGS t1s2; + ETHERNET10T1S_SETTINGS_EXT t1s2Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s3; + ETHERNET10T1S_SETTINGS t1s3; + ETHERNET10T1S_SETTINGS_EXT t1s3Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s4; + ETHERNET10T1S_SETTINGS t1s4; + ETHERNET10T1S_SETTINGS_EXT t1s4Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s5; + ETHERNET10T1S_SETTINGS t1s5; + ETHERNET10T1S_SETTINGS_EXT t1s5Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s6; + ETHERNET10T1S_SETTINGS t1s6; + ETHERNET10T1S_SETTINGS_EXT t1s6Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s7; + ETHERNET10T1S_SETTINGS t1s7; + ETHERNET10T1S_SETTINGS_EXT t1s7Ext; + // 10T1S + ETHERNET_SETTINGS2 ethT1s8; + ETHERNET10T1S_SETTINGS t1s8; + ETHERNET10T1S_SETTINGS_EXT t1s8Ext; +} SRADGigastar2Settings; +#define SRADGigastar2Settings_SIZE 2024 + +typedef struct _SRADMoonT1SSettings +{ + uint16_t perf_en; + struct + { + uint16_t hwComLatencyTestEn : 1; + uint16_t disableUsbCheckOnBoot : 1; + uint16_t reserved : 14; + } flags; + uint16_t network_enabled_on_boot; + uint64_t network_enables; + uint64_t network_enables_2; + RAD_REPORTING_SETTINGS reporting; + uint32_t pwr_man_timeout; + uint16_t pwr_man_enable; + // Ethernet 10/100/1000 + ETHERNET_SETTINGS2 ethernet; + // Ethernet General + OP_ETH_GENERAL_SETTINGS opEthGen; + // 10T1S + ETHERNET_SETTINGS2 ethT1s; + ETHERNET10T1S_SETTINGS t1s; + // 10T1S Extended Settings + ETHERNET10T1S_SETTINGS_EXT t1sExt; +} SRADMoonT1SSettings; +#define SRADMoonT1SSettings_SIZE 124 + +typedef struct _SNeoVIConnectSettings +{ + uint16_t perf_en; + uint16_t network_enabled_on_boot; + uint16_t misc_io_on_report_events; + uint16_t pwr_man_enable; + int16_t iso15765_separation_time_offset; + uint16_t reservedA; + uint32_t pwr_man_timeout; + union + { + uint64_t word; + struct + { + uint16_t network_enables; + uint16_t network_enables_2; + uint16_t network_enables_3; + uint16_t network_enables_4; + }; + } network_enables; + CAN_SETTINGS can1; + CANFD_SETTINGS canfd1; + CAN_SETTINGS can2; + CANFD_SETTINGS canfd2; + CAN_SETTINGS can3; + CANFD_SETTINGS canfd3; + CAN_SETTINGS can4; + CANFD_SETTINGS canfd4; + CAN_SETTINGS can5; + CANFD_SETTINGS canfd5; + CAN_SETTINGS can6; + CANFD_SETTINGS canfd6; + CAN_SETTINGS can7; + CANFD_SETTINGS canfd7; + CAN_SETTINGS can8; + CANFD_SETTINGS canfd8; + LIN_SETTINGS lin1; + LIN_SETTINGS lin2; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1; + uint16_t iso_parity_1; + uint16_t iso_msg_termination_1; + ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2; + uint16_t iso_parity_2; + uint16_t iso_msg_termination_2; + ETHERNET_SETTINGS ethernet_1; + ETHERNET_SETTINGS2 ethernet2_1; + STextAPISettings text_api; + DISK_SETTINGS disk; + uint16_t misc_io_report_period; + uint16_t ain_threshold; + uint16_t misc_io_analog_enable; + uint16_t digitalIoThresholdTicks; + uint16_t digitalIoThresholdEnable; + uint16_t misc_io_initial_ddr; + uint16_t misc_io_initial_latch; + Fire3LinuxSettings os_settings; + RAD_GPTP_SETTINGS gPTP; + struct + { + uint32_t disableUsbCheckOnBoot : 1; + uint32_t enableLatencyTest : 1; + uint32_t enableDefaultLogger : 1; + uint32_t enableDefaultUpload : 1; + uint32_t reserved3 : 28; + } flags; +} SNeoVIConnectSettings; +#define SNeoVIConnectSettings_SIZE (628) + #define GS_VERSION 5 typedef struct _GLOBAL_SETTINGS { @@ -5038,7 +5255,6 @@ typedef struct _GLOBAL_SETTINGS SRADGigalogSettings radgigalog; SCANHubSettings canhub; SNeoECU12Settings neoecu12; - SVCANRFSettings vcanrf; SEEVBSettings eevb; SFlexVnetzSettings flexvnetz; SVividCANSettings vividcan; @@ -5058,10 +5274,13 @@ typedef struct _GLOBAL_SETTINGS SRADMoon3Settings radmoon3; SRADCometSettings radcomet; SRADComet3Settings radcomet3; + SRADGigastar2Settings radgigastar2; + SRADMoonT1SSettings radmoont1s; + SNeoVIConnectSettings neovi_connect; // Make sure SDeviceSettings matches this }; } GLOBAL_SETTINGS; -#define GLOBAL_SETTINGS_SIZE (SFire3Settings_SIZE + 6) +#define GLOBAL_SETTINGS_SIZE (SRADGigastar2Settings_SIZE + 6) #define NEOVI_3G_MAX_SETTINGS_SIZE sizeof(GLOBAL_SETTINGS) @@ -5081,7 +5300,7 @@ typedef enum _EDeviceSettingsType DeviceRADMoon2SettingsType, DeviceRADPlutoSettingsType, DeviceRADGigalogSettingsType, - DeviceVCANRFSettingsType, + DeviceDeprecatedType, DeviceEEVBSettingsType, DeviceVCAN4IndSettingsType, DeviceNeoECU12SettingsType, @@ -5106,9 +5325,11 @@ typedef enum _EDeviceSettingsType DeviceFire3SettingsType, DeviceFire3FlexraySettingsType, DeviceRADCometSettingsType, - DeviceRed2OemSettingsType, + DeviceNeoVIConnectSettingsType, DeviceRADComet3SettingsType, DeviceRADGalaxy2SettingsType, + DeviceRADGigastar2SettingsType, + DeviceRADMoonT1SSettingsType, // add new settings type here // Also add to map inside cicsneoVI::Init() DeviceSettingsTypeMax, @@ -5144,7 +5365,6 @@ typedef struct _SDeviceSettings SRADGigalogSettings radgigalog; SCANHubSettings canhub; SNeoECU12Settings neoecu12; - SVCANRFSettings vcanrf; SEEVBSettings eevb; SFlexVnetzSettings flexvnetz; SVividCANSettings vividcan; @@ -5164,6 +5384,9 @@ typedef struct _SDeviceSettings SFire3FlexraySettings fire3Flexray; SRADCometSettings radcomet; SRADComet3Settings radcomet3; + SRADGigastar2Settings radgigastar2; + SRADMoonT1SSettings radmoont1s; + SNeoVIConnectSettings neovi_connect; // Make sure GLOBAL_SETTINGS matches this // NOTE: When adding new structures here implement inside icsneoGetDeviceSettings and icsneoSetDeviceSettings also. } Settings; } Settings; @@ -5998,7 +6221,6 @@ CHECK_STRUCT_SIZE(SFireVnetSettings); CHECK_STRUCT_SIZE(SCyanSettings); CHECK_STRUCT_SIZE(SVCAN3Settings); CHECK_STRUCT_SIZE(SVCAN4Settings); -CHECK_STRUCT_SIZE(SVCANRFSettings); CHECK_STRUCT_SIZE(SECUSettings); CHECK_STRUCT_SIZE(SPendantSettings); CHECK_STRUCT_SIZE(SIEVBSettings); @@ -6047,6 +6269,9 @@ CHECK_STRUCT_SIZE(SFire3FlexraySettings); CHECK_STRUCT_SIZE(CANHubSettings); CHECK_STRUCT_SIZE(SRADCometSettings); CHECK_STRUCT_SIZE(SRADComet3Settings); +CHECK_STRUCT_SIZE(SRADGigastar2Settings); +CHECK_STRUCT_SIZE(SRADMoonT1SSettings); +CHECK_STRUCT_SIZE(SNeoVIConnectSettings); #endif /* INTREPID_NO_CHECK_STRUCT_SIZE */ #endif /* _ICSNVC40_H */ diff --git a/include/methods.h b/include/methods.h index 0a4b179ea..54b9135b2 100644 --- a/include/methods.h +++ b/include/methods.h @@ -119,18 +119,6 @@ extern "C" "` method.\n\n" \ } -#define _EZ_ICS_STRUCT_METHOD_MULTIPLE(name, icsname, icsname_no_icsneo, meth, flags, doc) \ - { icsname, \ - (PyCFunction)meth, \ - flags, \ - "\n.. note:: Compatibility Function: Identical to PEP8 compliant :func:`" MODULE_NAME "." name \ - "` method.\n\n" }, \ - { \ - icsname_no_icsneo, (PyCFunction)meth, flags, \ - "\n.. note:: Compatibility Function: Identical to PEP8 compliant :func:`" MODULE_NAME "." name \ - "` method.\n\n" \ - } - #define _DOC_FIND_DEVICES \ MODULE_NAME ".find_devices(device_type=" MODULE_NAME ".NEODEVICE_ALL)\n" \ "\n" \ @@ -1933,526 +1921,7 @@ extern "C" "\tNone\n" \ "\n" -static PyMethodDef IcsMethods[] = { - _EZ_ICS_STRUCT_METHOD("find_devices", - "icsneoFindNeoDevices", - "FindNeoDevices", - (PyCFunction)meth_find_devices, - METH_VARARGS | METH_KEYWORDS, - _DOC_FIND_DEVICES), - _EZ_ICS_STRUCT_METHOD("open_device", - "icsneoOpenNeoDevice", - "OpenNeoDevice", - (PyCFunction)meth_open_device, - METH_VARARGS | METH_KEYWORDS, - _DOC_OPEN_DEVICES), - _EZ_ICS_STRUCT_METHOD("close_device", - "icsneoClosePort", - "ClosePort", - meth_close_device, - METH_VARARGS, - _DOC_CLOSE_DEVICES), - _EZ_ICS_STRUCT_METHOD("get_rtc", "icsneoGetRTC", "GetRTC", meth_get_rtc, METH_VARARGS, _DOC_GET_RTC), - _EZ_ICS_STRUCT_METHOD("set_rtc", "icsneoSetRTC", "SetRTC", meth_set_rtc, METH_VARARGS, _DOC_SET_RTC), - _EZ_ICS_STRUCT_METHOD("coremini_load", - "icsneoScriptLoad", - "ScriptLoad", - meth_coremini_load, - METH_VARARGS, - _DOC_COREMINI_LOAD), - _EZ_ICS_STRUCT_METHOD("coremini_start", - "icsneoScriptStart", - "ScriptStart", - meth_coremini_start, - METH_VARARGS, - _DOC_COREMINI_START), - _EZ_ICS_STRUCT_METHOD("coremini_stop", - "icsneoScriptStop", - "ScriptStop", - meth_coremini_stop, - METH_VARARGS, - _DOC_COREMINI_STOP), - _EZ_ICS_STRUCT_METHOD("coremini_clear", - "icsneoScriptClear", - "ScriptClear", - meth_coremini_clear, - METH_VARARGS, - _DOC_COREMINI_CLEAR), - _EZ_ICS_STRUCT_METHOD("coremini_get_status", - "icsneoScriptGetScriptStatus", - "ScriptGetScriptStatus", - meth_coremini_get_status, - METH_VARARGS, - _DOC_COREMINI_GET_STATUS), - _EZ_ICS_STRUCT_METHOD("transmit_messages", - "icsneoTxMessages", - "TxMessages", - meth_transmit_messages, - METH_VARARGS, - _DOC_TRANSMIT_MESSAGES), - _EZ_ICS_STRUCT_METHOD("get_messages", - "icsneoGetMessages", - "GetMessages", - meth_get_messages, - METH_VARARGS, - _DOC_GET_MESSAGES), - _EZ_ICS_STRUCT_METHOD("get_script_status", - "icsneoScriptGetScriptStatusEx", - "ScriptGetScriptStatusEx", - meth_get_script_status, - METH_VARARGS, - "Accepts a PyNeoDeviceEx" - ", exception on error. Returns a list of values of what ulParameters would hold"), - _EZ_ICS_STRUCT_METHOD("get_error_messages", - "icsneoGetErrorMessages", - "GetErrorMessages", - meth_get_error_messages, - METH_VARARGS, - _DOC_GET_ERROR_MESSAGES), -#ifdef _USE_INTERNAL_HEADER_ - _EZ_ICS_STRUCT_METHOD("flash_devices", - "FlashDevice2", - "FlashDevice2", - meth_flash_devices, - METH_VARARGS, - "int _stdcall FlashDevice2()"), -#endif - _EZ_ICS_STRUCT_METHOD("set_reflash_callback", - "icsneoSetReflashDisplayCallbacks", - "SetReflashDisplayCallback", - meth_set_reflash_callback, - METH_VARARGS, - _DOC_SET_REFLASH_CALLBACK), - _EZ_ICS_STRUCT_METHOD("get_device_settings", - "icsneoGetDeviceSettings", - "GetDeviceSettings", - meth_get_device_settings, - METH_VARARGS, - _DOC_GET_DEVICE_SETTINGS), - _EZ_ICS_STRUCT_METHOD("set_device_settings", - "icsneoSetDeviceSettings", - "SetDeviceSettings", - meth_set_device_settings, - METH_VARARGS, - _DOC_SET_DEVICE_SETTINGS), - _EZ_ICS_STRUCT_METHOD("load_default_settings", - "icsneoLoadDefaultSettings", - "LoadDefaultSettings", - meth_load_default_settings, - METH_VARARGS, - _DOC_LOAD_DEFAULT_SETTINGS), - //_EZ_ICS_STRUCT_METHOD("spy_message_to_j1850", METH_spy_message_to_j1850, METH_VARARGS, "Accepts a " - // MODULE_NAME - //"." - // SPY_MESSAGE_OBJECT_NAME ", and returns a " MODULE_NAME "." SPY_MESSAGE_J1850_OBJECT_NAME ". Exception on - // error."), - _EZ_ICS_STRUCT_METHOD("read_sdcard", - "icsneoReadSDCard", - "ReadSDCard", - meth_read_sdcard, - METH_VARARGS, - "icsneoReadSDCard(), Accepts a PyNeoDeviceEx" - " and sector index. Returns a bytearray of 512 bytes max. Exception on error."), - _EZ_ICS_STRUCT_METHOD("write_sdcard", - "icsneoWriteSDCard", - "WriteSDCard", - meth_write_sdcard, - METH_VARARGS, - "icsneoReadSDCard(), Accepts a PyNeoDeviceEx" - ", sector index, and a bytearray of 512 bytes. Exception on error."), - { "create_neovi_radio_message", - (PyCFunction)meth_create_neovi_radio_message, - METH_VARARGS | METH_KEYWORDS, - _DOC_CREATE_NEOVI_RADIO_MESSAGE }, - _EZ_ICS_STRUCT_METHOD("coremini_start_fblock", - "icsneoScriptStartFBlock", - "ScriptStartFBlock", - meth_coremini_start_fblock, - METH_VARARGS, - _DOC_COREMINI_START_FBLOCK), - _EZ_ICS_STRUCT_METHOD("coremini_stop_fblock", - "icsneoScriptStopFBlock", - "ScriptStopFBlock", - meth_coremini_stop_fblock, - METH_VARARGS, - _DOC_COREMINI_STOP_FBLOCK), - _EZ_ICS_STRUCT_METHOD("coremini_get_fblock_status", - "icsneoScriptGetFBlockStatus", - "ScriptGetFBlockStatus", - meth_coremini_get_fblock_status, - METH_VARARGS, - _DOC_COREMINI_GET_FBLOCK_STATUS), - _EZ_ICS_STRUCT_METHOD("coremini_read_app_signal", - "icsneoScriptReadAppSignal", - "ScriptReadAppSignal", - meth_coremini_read_app_signal, - METH_VARARGS, - _DOC_COREMINI_READ_APP_SIGNAL), - _EZ_ICS_STRUCT_METHOD("coremini_write_app_signal", - "icsneoScriptWriteAppSignal", - "ScriptWriteAppSignal", - meth_coremini_write_app_signal, - METH_VARARGS, - _DOC_COREMINI_WRITE_APP_SIGNAL), - _EZ_ICS_STRUCT_METHOD("coremini_read_tx_message", - "icsneoScriptReadTxMessage", - "ScriptReadTxMessage", - meth_coremini_read_tx_message, - METH_VARARGS, - _DOC_COREMINI_READ_TX_MESSAGE), - _EZ_ICS_STRUCT_METHOD("coremini_read_rx_message", - "icsneoScriptReadRxMessage", - "ScriptReadRxMessage", - meth_coremini_read_rx_message, - METH_VARARGS, - _DOC_COREMINI_READ_RX_MESSAGE), - _EZ_ICS_STRUCT_METHOD("coremini_write_tx_message", - "icsneoScriptWriteTxMessage", - "ScriptWriteTxMessage", - meth_coremini_write_tx_message, - METH_VARARGS, - _DOC_COREMINI_WRITE_TX_MESSAGE), - _EZ_ICS_STRUCT_METHOD("coremini_write_rx_message", - "icsneoScriptWriteRxMessage", - "ScriptWriteRxMessage", - meth_coremini_write_rx_message, - METH_VARARGS, - _DOC_COREMINI_WRITE_RX_MESSAGE), - _EZ_ICS_STRUCT_METHOD("get_performance_parameters", - "icsneoGetPerformanceParameters", - "GetPerformanceParameters", - meth_get_performance_parameters, - METH_VARARGS, - _DOC_GET_PERFORMANCE_PARAMETERS), - _EZ_ICS_STRUCT_METHOD("validate_hobject", - "icsneoValidateHObject", - "ValidateHObject", - meth_validate_hobject, - METH_VARARGS, - _DOC_VALIDATE_HOBJECT), - _EZ_ICS_STRUCT_METHOD("get_last_api_error", - "icsneoGetLastAPIError", - "GetLastAPIError", - meth_get_last_api_error, - METH_VARARGS, - _DOC_GET_LAST_API_ERROR), - _EZ_ICS_STRUCT_METHOD("get_dll_version", - "icsneoGetDLLVersion", - "GetDLLVersion", - meth_get_dll_version, - METH_NOARGS, - _DOC_GET_DLL_VERSION), - _EZ_ICS_STRUCT_METHOD("get_serial_number", - "icsneoGetSerialNumber", - "GetSerialNumber", - meth_get_serial_number, - METH_VARARGS, - _DOC_GET_SERIAL_NUMBER), - _EZ_ICS_STRUCT_METHOD("get_hw_firmware_info", - "icsneoGetHWFirmwareInfo", - "GetHWFirmwareInfo", - meth_get_hw_firmware_info, - METH_VARARGS, - _DOC_GET_HW_FIRMWARE_INFO), - _EZ_ICS_STRUCT_METHOD("request_enter_sleep_mode", - "icsneoRequestEnterSleepMode", - "RequestEnterSleepMode", - meth_request_enter_sleep_mode, - METH_VARARGS, - _DOC_REQUEST_ENTER_SLEEP_MODE), - { "base36enc", (PyCFunction)meth_base36enc, METH_VARARGS | METH_KEYWORDS, _DOC_BASE36ENC }, - _EZ_ICS_STRUCT_METHOD("set_context", - "icsneoSetContext", - "SetContext", - meth_set_context, - METH_VARARGS, - _DOC_SET_CONTEXT), - _EZ_ICS_STRUCT_METHOD("force_firmware_update", - "icsneoForceFirmwareUpdate", - "ForceFirmwareUpdate", - meth_force_firmware_update, - METH_VARARGS, - _DOC_FORCE_FIRMWARE_UPDATE), - _EZ_ICS_STRUCT_METHOD("firmware_update_required", - "icsneoFirmwareUpdateRequired", - "FirmwareUpdateRequired", - meth_firmware_update_required, - METH_VARARGS, - _DOC_FIRMWARE_UPDATE_REQUIRED), - _EZ_ICS_STRUCT_METHOD("get_dll_firmware_info", - "icsneoGetDLLFirmwareInfo", - "GetDLLFirmwareInfo", - meth_get_dll_firmware_info, - METH_VARARGS, - _DOC_GET_DLL_FIRMWARE_INFO), - _EZ_ICS_STRUCT_METHOD("get_backup_power_enabled", - "icsneoGetBackupPowerEnabled", - "GetBackupPowerEnabled", - meth_get_backup_power_enabled, - METH_VARARGS, - _DOC_GET_BACKUP_POWER_ENABLED), - _EZ_ICS_STRUCT_METHOD("set_backup_power_enabled", - "icsneoSetBackupPowerEnabled", - "SetBackupPowerEnabled", - meth_set_backup_power_enabled, - METH_VARARGS, - _DOC_SET_BACKUP_POWER_ENABLED), - _EZ_ICS_STRUCT_METHOD("get_backup_power_ready", - "icsneoGetBackupPowerReady", - "GetBackupPowerReady", - meth_get_backup_power_ready, - METH_VARARGS, - _DOC_GET_BACKUP_POWER_READY), -#ifdef _USE_INTERNAL_HEADER_ - _EZ_ICS_STRUCT_METHOD("load_readbin", - "icsneoScriptLoadReadBin", - "ScriptLoadReadBin", - meth_load_readbin, - METH_VARARGS, - _DOC_LOAD_READBIN), -#endif - _EZ_ICS_STRUCT_METHOD("iso15765_transmit_message", - "icsneoISO15765_TransmitMessage", - "ISO15765_TransmitMessage", - meth_iso15765_transmit_message, - METH_VARARGS, - _DOC_ISO15765_TRANSMIT_MESSAGE), - _EZ_ICS_STRUCT_METHOD("iso15765_receive_message", - "icsneoISO15765_ReceiveMessage", - "ISO15765_ReceiveMessage", - meth_iso15765_receive_message, - METH_VARARGS, - _DOC_ISO15765_RECEIVE_MESSAGE), - _EZ_ICS_STRUCT_METHOD("iso15765_enable_networks", - "icsneoISO15765_EnableNetworks", - "ISO15765_EnableNetworks", - meth_iso15765_enable_networks, - METH_VARARGS, - _DOC_ISO15765_ENABLE_NETWORKS), - _EZ_ICS_STRUCT_METHOD("iso15765_disable_networks", - "icsneoISO15765_DisableNetworks", - "ISO15765_DisableNetworks", - meth_iso15765_disable_networks, - METH_VARARGS, - _DOC_ISO15765_DISABLE_NETWORKS), - - _EZ_ICS_STRUCT_METHOD("get_active_vnet_channel", - "icsneoGetActiveVNETChannel", - "GetActiveVNETChannel", - meth_get_active_vnet_channel, - METH_VARARGS, - _DOC_GET_ACTIVE_VNET_CHANNEL), - _EZ_ICS_STRUCT_METHOD("set_active_vnet_channel", - "icsneoSetActiveVNETChannel", - "SetActiveVNETChannel", - meth_set_active_vnet_channel, - METH_VARARGS, - _DOC_SET_ACTIVE_VNET_CHANNEL), - _EZ_ICS_STRUCT_METHOD("set_bit_rate", - "icsneoSetBitRate", - "SetBitRate", - meth_set_bit_rate, - METH_VARARGS, - _DOC_SET_BIT_RATE), - _EZ_ICS_STRUCT_METHOD("set_fd_bit_rate", - "icsneoSetFDBitRate", - "SetFDBitRate", - meth_set_fd_bit_rate, - METH_VARARGS, - _DOC_SET_FD_BIT_RATE), - _EZ_ICS_STRUCT_METHOD("set_bit_rate_ex", - "icsneoSetBitRateEx", - "SetBitRateEx", - meth_set_bit_rate_ex, - METH_VARARGS, - _DOC_SET_BIT_RATE_EX), - _EZ_ICS_STRUCT_METHOD("get_timestamp_for_msg", - "icsneoGetTimeStampForMsg", - "GetTimeStampForMsg", - meth_get_timestamp_for_msg, - METH_VARARGS, - _DOC_GET_TIMESTAMP_FOR_MSG), - _EZ_ICS_STRUCT_METHOD("get_device_status", - "icsneoGetDeviceStatus", - "GetDeviceStatus", - meth_get_device_status, - METH_VARARGS, - _DOC_GET_DEVICE_STATUS), - - _EZ_ICS_STRUCT_METHOD("enable_network_com", - "icsneoEnableNetworkCom", - "EnableNetworkCom", - meth_enable_network_com, - METH_VARARGS, - _DOC_ENABLE_NETWORK_COM), - - _EZ_ICS_STRUCT_METHOD("enable_bus_voltage_monitor", - "icsneoEnableBusVoltageMonitor", - "EnableBusVoltageMonitor", - meth_enable_bus_voltage_monitor, - METH_VARARGS, - _DOC_ENABLE_BUS_VOLTAGE_MONITOR), - _EZ_ICS_STRUCT_METHOD("get_bus_voltage", - "icsneoGetBusVoltage", - "GetBusVoltage", - meth_get_bus_voltage, - METH_VARARGS, - _DOC_GET_BUS_VOLTAGE), - - _EZ_ICS_STRUCT_METHOD("read_jupiter_firmware", - "icsneoReadJupiterFirmware", - "ReadJupiterFirmware", - meth_read_jupiter_firmware, - METH_VARARGS, - _DOC_READ_JUPITER_FIRMWARE), - _EZ_ICS_STRUCT_METHOD("write_jupiter_firmware", - "icsneoWriteJupiterFirmware", - "WriteJupiterFirmware", - meth_write_jupiter_firmware, - METH_VARARGS, - _DOC_WRITE_JUPITER_FIRMWARE), - - _EZ_ICS_STRUCT_METHOD("get_disk_details", - "icsneoRequestDiskDetails", - "RequestDiskDetails", - meth_get_disk_details, - METH_VARARGS, - _DOC_GET_DISK_DETAILS), - _EZ_ICS_STRUCT_METHOD("disk_format", - "icsneoRequestDiskFormat", - "RequestDiskFormat", - meth_disk_format, - METH_VARARGS, - _DOC_DISK_FORMAT), - _EZ_ICS_STRUCT_METHOD("disk_format_cancel", - "icsneoRequestDiskFormatCancel", - "RequestDiskFormatCancel", - meth_disk_format_cancel, - METH_VARARGS, - _DOC_DISK_FORMAT_CANCEL), - _EZ_ICS_STRUCT_METHOD("get_disk_format_progress", - "icsneoRequestDiskFormatProgress", - "RequestDiskFormatProgress", - meth_get_disk_format_progress, - METH_VARARGS, - _DOC_DISK_FORMAT_PROGRESS), - _EZ_ICS_STRUCT_METHOD("enable_doip_line", - "icsneoEnableDOIPLine", - "EnableDOIPLine", - meth_enable_doip_line, - METH_VARARGS, - _DOC_ENABLE_DOIP_LINE), - _EZ_ICS_STRUCT_METHOD("is_device_feature_supported", - "icsneoIsDeviceFeatureSupported", - "IsDeviceFeatureSupported", - meth_is_device_feature_supported, - METH_VARARGS, - _DOC_IS_DEVICE_FEATURE_SUPPORTED), - _EZ_ICS_STRUCT_METHOD("get_pcb_serial_number", - "icsneoGetPCBSerialNumber", - "GetPCBSerialNumber", - meth_get_pcb_serial_number, - METH_VARARGS, - _DOC_GET_PCB_SERIAL_NUMBER), - _EZ_ICS_STRUCT_METHOD("set_led_property", - "icsneoSetLedProperty", - "SetLedProperty", - meth_set_led_property, - METH_VARARGS, - _DOC_SET_LED_PROPERTY), - _EZ_ICS_STRUCT_METHOD("start_dhcp_server", - "icsneoStartDHCPServer", - "StartDHCPServer", - meth_start_dhcp_server, - METH_VARARGS, - _DOC_START_DHCP_SERVER), - _EZ_ICS_STRUCT_METHOD("stop_dhcp_server", - "icsneoStopDHCPServer", - "StopDHCPServer", - meth_stop_dhcp_server, - METH_VARARGS, - _DOC_STOP_DHCP_SERVER), - - _EZ_ICS_STRUCT_METHOD("wbms_manager_write_lock", - "icsneowBMSManagerWriteLock", - "wBMSManagerWriteLock", - meth_wbms_manager_write_lock, - METH_VARARGS, - _DOC_WBMS_MANAGER_WRITE_LOCK), - _EZ_ICS_STRUCT_METHOD("wbms_manager_reset", - "icsneowBMSManagerReset", - "wBMSManagerReset", - meth_wbms_manager_reset, - METH_VARARGS, - _DOC_WBMS_MANAGER_RESET), - _EZ_ICS_STRUCT_METHOD("uart_write", "icsneoUartWrite", "UartWrite", meth_uart_write, METH_VARARGS, _DOC_UART_WRITE), - _EZ_ICS_STRUCT_METHOD("uart_read", "icsneoUartRead", "UartRead", meth_uart_read, METH_VARARGS, _DOC_UART_READ), - _EZ_ICS_STRUCT_METHOD("uart_set_baudrate", - "icsneoUartSetBaudrate", - "UartSetBaudrate", - meth_uart_set_baudrate, - METH_VARARGS, - _DOC_UART_SET_BAUDRATE), - _EZ_ICS_STRUCT_METHOD("uart_get_baudrate", - "icsneoUartGetBaudrate", - "UartGetBaudrate", - meth_uart_get_baudrate, - METH_VARARGS, - _DOC_UART_GET_BAUDRATE), - _EZ_ICS_STRUCT_METHOD("generic_api_send_command", - "icsneoGenericAPISendCommand", - "GenericAPISendCommand", - meth_generic_api_send_command, - METH_VARARGS, - _DOC_GENERIC_API_SEND_COMMAND), - _EZ_ICS_STRUCT_METHOD("generic_api_read_data", - "icsneoGenericAPIReadData", - "GenericAPIReadData", - meth_generic_api_read_data, - METH_VARARGS, - _DOC_GENERIC_API_READ_DATA), - _EZ_ICS_STRUCT_METHOD("generic_api_get_status", - "icsneoGenericAPIGetStatus", - "GenericAPIGetStatus", - meth_generic_api_get_status, - METH_VARARGS, - _DOC_GENERIC_API_GET_STATUS), - _EZ_ICS_STRUCT_METHOD("get_gptp_status", - "icsneoGetGPTPStatus", - "GetGPTPStatus", - meth_get_gptp_status, - METH_VARARGS, - _DOC_GET_GPTP_STATUS), - _EZ_ICS_STRUCT_METHOD("get_all_chip_versions", - "icsneoGetAllChipVersions", - "GetAllChipVersions", - meth_get_all_chip_versions, - METH_VARARGS, - _DOC_GET_ALL_CHIP_VERSIONS), - - _EZ_ICS_STRUCT_METHOD("flash_accessory_firmware", - "icsneoFlashAccessoryFirmware", - "FlashAccessoryFirmware", - meth_flash_accessory_firmware, - METH_VARARGS, - _DOC_FLASH_ACCESSORY_FIRMWARE), - _EZ_ICS_STRUCT_METHOD("get_accessory_firmware_version", - "icsneoGetAccessoryFwVersion", - "GetAccessoryFwVersion", - meth_get_accessory_firmware_version, - METH_VARARGS, - _DOC_GET_ACCESSORY_FIRMWARE_VERSION), - _EZ_ICS_STRUCT_METHOD("set_safe_boot_mode", - "icsneoSetSafeBootMode", - "SetSafeBootMode", - meth_set_safe_boot_mode, - METH_VARARGS, - _DOC_SET_SAFE_BOOT_MODE), - - { "override_library_name", (PyCFunction)meth_override_library_name, METH_VARARGS, _DOC_OVERRIDE_LIBRARY_NAME }, - { "get_library_path", (PyCFunction)meth_get_library_path, METH_NOARGS, "" }, - - { NULL, NULL, 0, NULL } -}; + +extern PyMethodDef IcsMethods[]; #endif // _METHODS_H_ diff --git a/include/object_spy_message.h b/include/object_spy_message.h index 251002da0..44778a34a 100644 --- a/include/object_spy_message.h +++ b/include/object_spy_message.h @@ -34,394 +34,22 @@ int PyUnicode_CompareWithASCIIString(PyObject *uni, const char *string) */ #endif +#pragma pack(push, 1) typedef struct { PyObject_HEAD icsSpyMessage msg; bool noExtraDataPtrCleanup; } spy_message_object; +#pragma pack(pop) +#pragma pack(push, 1) typedef struct { PyObject_HEAD icsSpyMessageJ1850 msg; bool noExtraDataPtrCleanup; } spy_message_j1850_object; +#pragma pack(pop) -static PyMemberDef spy_message_object_members[] = { - { "StatusBitField", T_UINT, offsetof(spy_message_object, msg.StatusBitField), 0, "StatusBitField" }, - { "StatusBitField2", T_UINT, offsetof(spy_message_object, msg.StatusBitField2), 0, "StatusBitField2" }, - { "TimeHardware", - T_UINT, - offsetof(spy_message_object, msg.TimeHardware), - 0, - "Hardware time stamp. The TimeStamp is reset on device open" }, - { "TimeHardware2", - T_UINT, - offsetof(spy_message_object, msg.TimeHardware2), - 0, - "Hardware time stamp. The TimeStamp is reset on device open" }, - { "TimeSystem", - T_UINT, - offsetof(spy_message_object, msg.TimeSystem), - 0, - "TimeSystem is loaded with the value received from the timeGetTime call in the WIN32 multimedia API." }, - { "TimeSystem2", - T_UINT, - offsetof(spy_message_object, msg.TimeSystem2), - 0, - "TimeSystem is loaded with the value received from the timeGetTime call in the WIN32 multimedia API." }, - { "TimeStampHardwareID", - T_UBYTE, - offsetof(spy_message_object, msg.TimeStampHardwareID), - 0, - "This is an identifier of what type of hardware timestamp is used. Since neoVI's timestamp is always the same, " - "this doesn't change." }, - { "TimeStampSystemID", - T_UBYTE, - offsetof(spy_message_object, msg.TimeStampSystemID), - 0, - "This is an identifier of what type of system timestamp is used. Since WIN32 neoVI's timestamp is always the " - "same, " - "from the timeGetTime API, this doesn't change." }, - { "NetworkID", - T_UBYTE, - offsetof(spy_message_object, msg.NetworkID), - 0, - "This value is used to identify which network this message was received on." }, - { "NodeID", T_UBYTE, offsetof(spy_message_object, msg.NodeID), 0, "Not Used" }, - { "Protocol", - T_UBYTE, - offsetof(spy_message_object, msg.Protocol), - 0, - "Valid values are SPY_PROTOCOL_CAN, SPY_PROTOCOL_J1850VPW, and SPY_PROTOCOL_ISO9141." }, - { "MessagePieceID", T_UBYTE, offsetof(spy_message_object, msg.MessagePieceID), 0, "Not Used" }, - { "ExtraDataPtrEnabled", T_UBYTE, offsetof(spy_message_object, msg.ExtraDataPtrEnabled), 0, "" }, - { "NumberBytesHeader", - T_UBYTE, - offsetof(spy_message_object, msg.NumberBytesHeader), - 0, - " Used for J1850/ISO messages. It indicates how many bytes are stored in the Header(1 to 4) array." }, - { "NumberBytesData", - T_UBYTE, - offsetof(spy_message_object, msg.NumberBytesData), - 0, - "Holds the number of bytes in the Data(1 to 8) array or the number of bytes in a CAN remote frame (The DLC)." }, - { "NetworkID2", - T_UBYTE, - offsetof(spy_message_object, msg.NetworkID2), - 0, - "This value is used to identify which network this message was received on." }, - { "DescriptionID", T_SHORT, offsetof(spy_message_object, msg.DescriptionID), 0, "Not Used" }, - { "ArbIDOrHeader", T_UINT, offsetof(spy_message_object, msg.ArbIDOrHeader), 0, "" }, - { "Data", T_OBJECT_EX, 0, 0, "" }, - { "StatusBitField3", T_UINT, offsetof(spy_message_object, msg.StatusBitField3), 0, "StatusBitField3" }, - { "StatusBitField4", T_UINT, offsetof(spy_message_object, msg.StatusBitField4), 0, "StatusBitField4" }, - { "AckBytes", T_OBJECT_EX, 0, 0, "" }, - { "ExtraDataPtr", T_OBJECT_EX, offsetof(spy_message_object, msg.ExtraDataPtr), 0, "" }, - { "MiscData", T_UBYTE, offsetof(spy_message_object, msg.MiscData), 0, "" }, - { "noExtraDataPtrCleanup", - T_BOOL, - offsetof(spy_message_object, noExtraDataPtrCleanup), - 0, - "Tells Python to not clean up ExtraDataPtrMemory, If this is enabled. Ignore, if unsure." }, - { NULL, 0, 0, 0, NULL }, -}; - -static PyMemberDef spy_message_j1850_object_members[] = { - { "StatusBitField", T_UINT, offsetof(spy_message_j1850_object, msg.StatusBitField), 0, "StatusBitField" }, - { "StatusBitField2", T_UINT, offsetof(spy_message_j1850_object, msg.StatusBitField2), 0, "StatusBitField2" }, - { "TimeHardware", - T_UINT, - offsetof(spy_message_j1850_object, msg.TimeHardware), - 0, - "Hardware time stamp. The TimeStamp is reset on device open" }, - { "TimeHardware2", - T_UINT, - offsetof(spy_message_j1850_object, msg.TimeHardware2), - 0, - "Hardware time stamp. The TimeStamp is reset on device open" }, - { "TimeSystem", - T_UINT, - offsetof(spy_message_j1850_object, msg.TimeSystem), - 0, - "TimeSystem is loaded with the value received from the timeGetTime call in the WIN32 multimedia API." }, - { "TimeSystem2", - T_UINT, - offsetof(spy_message_j1850_object, msg.TimeSystem2), - 0, - "TimeSystem is loaded with the value received from the timeGetTime call in the WIN32 multimedia API." }, - { "TimeStampHardwareID", - T_UBYTE, - offsetof(spy_message_j1850_object, msg.TimeStampHardwareID), - 0, - "This is an identifier of what type of hardware timestamp is used. Since neoVI's timestamp is always the same, " - "this doesn't change." }, - { "TimeStampSystemID", - T_UBYTE, - offsetof(spy_message_j1850_object, msg.TimeStampSystemID), - 0, - "This is an identifier of what type of system timestamp is used. Since WIN32 neoVI's timestamp is always the " - "same, " - "from the timeGetTime API, this doesn't change." }, - { "NetworkID", - T_UBYTE, - offsetof(spy_message_j1850_object, msg.NetworkID), - 0, - "This value is used to identify which network this message was received on." }, - { "NodeID", T_UBYTE, offsetof(spy_message_j1850_object, msg.NodeID), 0, "Not Used" }, - { "Protocol", - T_UBYTE, - offsetof(spy_message_j1850_object, msg.Protocol), - 0, - "Valid values are SPY_PROTOCOL_CAN, SPY_PROTOCOL_J1850VPW, and SPY_PROTOCOL_ISO9141." }, - { "MessagePieceID", T_UBYTE, offsetof(spy_message_j1850_object, msg.MessagePieceID), 0, "Not Used" }, - { "ExtraDataPtrEnabled", T_UBYTE, offsetof(spy_message_j1850_object, msg.ExtraDataPtrEnabled), 0, "" }, - { "NumberBytesHeader", - T_UBYTE, - offsetof(spy_message_j1850_object, msg.NumberBytesHeader), - 0, - " Used for J1850/ISO messages. It indicates how many bytes are stored in the Header(1 to 4) array." }, - { "NumberBytesData", - T_UBYTE, - offsetof(spy_message_j1850_object, msg.NumberBytesData), - 0, - "Holds the number of bytes in the Data(1 to 8) array or the number of bytes in a CAN remote frame (The DLC)." }, - { "NetworkID2", - T_UBYTE, - offsetof(spy_message_object, msg.NetworkID2), - 0, - "This value is used to identify which network this message was received on." }, - { "DescriptionID", T_SHORT, offsetof(spy_message_j1850_object, msg.DescriptionID), 0, "Not Used" }, - { "Header", T_OBJECT_EX, 0, 0, "" }, - { "Data", T_OBJECT_EX, 0, 0, "" }, - { "StatusBitField3", T_UINT, offsetof(spy_message_j1850_object, msg.StatusBitField3), 0, "StatusBitField3" }, - { "StatusBitField4", T_UINT, offsetof(spy_message_j1850_object, msg.StatusBitField4), 0, "StatusBitField4" }, - { "AckBytes", T_OBJECT_EX, 0, 0, "" }, - { "ExtraDataPtr", T_OBJECT_EX, offsetof(spy_message_j1850_object, msg.ExtraDataPtr), 0, "" }, - { "MiscData", T_UBYTE, offsetof(spy_message_j1850_object, msg.MiscData), 0, "" }, - { "noExtraDataPtrCleanup", - T_BOOL, - offsetof(spy_message_object, noExtraDataPtrCleanup), - 0, - "Tells Python to not clean up ExtraDataPtrMemory, If this is enabled. Ignore, if unsure." }, - { NULL, 0, 0, 0, NULL }, -}; - -static int spy_message_object_alloc(spy_message_object* self, PyObject* args, PyObject* kwds) -{ - memset(&self->msg, 0, sizeof(self->msg)); - self->noExtraDataPtrCleanup = false; - return 0; -} - -static void spy_message_object_dealloc(spy_message_object* self) -{ - if ((!self->noExtraDataPtrCleanup && self->msg.ExtraDataPtrEnabled && self->msg.ExtraDataPtr != NULL) || - (!self->noExtraDataPtrCleanup && self->msg.Protocol == SPY_PROTOCOL_ETHERNET && - self->msg.ExtraDataPtr != NULL)) { - // Clean up the ExtraDataPtr if we can - // Ethernet protocol uses the ExtraDataPtrEnabled reversed internally so do a double check here - delete[] (unsigned char*)self->msg.ExtraDataPtr; - self->msg.ExtraDataPtr = NULL; - self->msg.ExtraDataPtrEnabled = 0; - } - Py_TYPE(self)->tp_free((PyObject*)self); -} - -static PyObject* spy_message_object_getattr(PyObject* o, PyObject* attr_name) -{ -#if PY_MAJOR_VERSION >= 3 - if (!PyUnicode_Check(attr_name)) { -#else - if (!PyString_Check(attr_name)) { -#endif - PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", attr_name->ob_type->tp_name); - return NULL; - } else { - Py_INCREF(attr_name); - } - if (PyUnicode_CompareWithASCIIString(attr_name, "Data") == 0) { - Py_DECREF(attr_name); - spy_message_object* obj = (spy_message_object*)o; - PyObject* temp = Py_BuildValue("(i,i,i,i,i,i,i,i)", - obj->msg.Data[0], - obj->msg.Data[1], - obj->msg.Data[2], - obj->msg.Data[3], - obj->msg.Data[4], - obj->msg.Data[5], - obj->msg.Data[6], - obj->msg.Data[7]); - PyObject* data = PyTuple_GetSlice(temp, 0, obj->msg.NumberBytesData); - Py_DECREF(temp); - return data; - } else if (PyUnicode_CompareWithASCIIString(attr_name, "AckBytes") == 0) { - Py_DECREF(attr_name); - spy_message_object* obj = (spy_message_object*)o; - return Py_BuildValue("(i,i,i,i,i,i,i,i)", - obj->msg.AckBytes[0], - obj->msg.AckBytes[1], - obj->msg.AckBytes[2], - obj->msg.AckBytes[3], - obj->msg.AckBytes[4], - obj->msg.AckBytes[5], - obj->msg.AckBytes[6], - obj->msg.AckBytes[7]); - } else if (PyUnicode_CompareWithASCIIString(attr_name, "Header") == 0) { - Py_DECREF(attr_name); - spy_message_j1850_object* obj = (spy_message_j1850_object*)o; - PyObject* temp = - Py_BuildValue("(i,i,i,i)", obj->msg.Header[0], obj->msg.Header[1], obj->msg.Header[2], obj->msg.Header[3]); - PyObject* data = PyTuple_GetSlice(temp, 0, obj->msg.NumberBytesHeader); - Py_DECREF(temp); - return data; - } else if (PyUnicode_CompareWithASCIIString(attr_name, "ExtraDataPtr") == 0) { - Py_DECREF(attr_name); - spy_message_j1850_object* obj = (spy_message_j1850_object*)o; - unsigned char* ExtraDataPtr = (unsigned char*)obj->msg.ExtraDataPtr; - bool extra_data_ptr_enabled = obj->msg.ExtraDataPtrEnabled != 0; - // Ethernet protocol uses the ExtraDataPtrEnabled reversed internally - if ((obj->msg.Protocol == SPY_PROTOCOL_ETHERNET || - obj->msg.Protocol == SPY_PROTOCOL_SPI || - obj->msg.Protocol == SPY_PROTOCOL_WBMS) - && obj->msg.ExtraDataPtr != NULL) { - extra_data_ptr_enabled = true; - } - int actual_size = 0; - // Some newer protocols are packing the length into NumberBytesHeader also so lets handle it here... - if (obj->msg.Protocol == SPY_PROTOCOL_A2B || obj->msg.Protocol == SPY_PROTOCOL_ETHERNET || - obj->msg.Protocol == SPY_PROTOCOL_SPI || obj->msg.Protocol == SPY_PROTOCOL_WBMS) { - actual_size = (obj->msg.NumberBytesHeader << 8) | obj->msg.NumberBytesData; - } else { - actual_size = obj->msg.NumberBytesData; - } - if (extra_data_ptr_enabled && actual_size && obj->msg.ExtraDataPtr) { - PyObject* tuple = PyTuple_New(actual_size); - for (int i = 0; i < actual_size; ++i) { - PyTuple_SET_ITEM(tuple, i, PyLong_FromLong(ExtraDataPtr[i])); - } - return tuple; - } else { - return Py_None; - } - } else { - return PyObject_GenericGetAttr(o, attr_name); - } -} - -static int spy_message_object_setattr(PyObject* o, PyObject* name, PyObject* value) -{ - spy_message_object* obj = (spy_message_object*)o; - if (PyUnicode_CompareWithASCIIString(name, "Data") == 0) { - // Make sure we are a tuple and len() == 8 - if (!PyTuple_Check(value)) { - PyErr_Format(PyExc_AttributeError, - "'%.50s' object attribute '%.400s' needs to be a tuple", - MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME, - name); - return -1; - } - // Get tuple items and place them in array, set as 0 if error. - for (int i = 0; i < 8 && i < PyObject_Length(value); ++i) { - PyObject* data = PyTuple_GetItem(value, i); - if (!data && !PyLong_Check(data)) { - obj->msg.Data[i] = 0; - } else { - obj->msg.Data[i] = (unsigned char)PyLong_AsLong(data); - } - } - obj->msg.NumberBytesData = static_cast(PyObject_Length(value)); - return 0; - } else if (PyUnicode_CompareWithASCIIString(name, "AckBytes") == 0) { - // Make sure we are a tuple and len() == 8 - if (!PyTuple_Check(value)) { - PyErr_Format(PyExc_AttributeError, - "'%.50s' object attribute '%.400s' needs to be a tuple", - MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME, - name); - return -1; - } - // Get tuple items and place them in array, set as 0 if error. - for (int i = 0; i < 8 && i < PyObject_Length(value); ++i) { - PyObject* data = PyTuple_GetItem(value, i); - if (!data && !PyLong_Check(data)) { - obj->msg.AckBytes[i] = 0; - } else { - obj->msg.AckBytes[i] = (unsigned char)PyLong_AsLong(data); - } - } - return 0; - } else if (PyUnicode_CompareWithASCIIString(name, "Header") == 0) { - // Make sure we are a tuple and len() == 8 - if (!PyTuple_Check(value)) { - PyErr_Format(PyExc_AttributeError, - "'%.50s' object attribute '%.400s' needs to be a tuple", - MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME, - name); - return -1; - } - // Get tuple items and place them in array, set as 0 if error. - for (int i = 0; i < 8 && i < PyObject_Length(value); ++i) { - PyObject* data = PyTuple_GetItem(value, i); - if (!data && !PyLong_Check(data)) { - ((spy_message_j1850_object*)obj)->msg.Header[i] = 0; - } else { - ((spy_message_j1850_object*)obj)->msg.Header[i] = (unsigned char)PyLong_AsLong(data); - } - obj->msg.NumberBytesHeader = static_cast(PyObject_Length(value)); - } - return 0; - } else if (PyUnicode_CompareWithASCIIString(name, "Protocol") == 0) { - // Ethernet behavior is backward to CAN and will crash if enabled. - if (PyLong_AsLong(value) == SPY_PROTOCOL_ETHERNET) - obj->msg.ExtraDataPtrEnabled = 0; - return PyObject_GenericSetAttr(o, name, value); - } else if (PyUnicode_CompareWithASCIIString(name, "ExtraDataPtr") == 0) { - // Make sure we are a tuple and len() == 8 - if (!PyTuple_Check(value)) { - PyErr_Format(PyExc_AttributeError, - "'%.50s' object attribute '%.400s' needs to be a tuple", - MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME, - name); - return -1; - } - // Get tuple items and place them in array, set as 0 if error. - Py_ssize_t length = PyObject_Length(value); - if (obj->msg.ExtraDataPtr != NULL) - delete[] (unsigned char*)obj->msg.ExtraDataPtr; - obj->msg.ExtraDataPtr = new unsigned char[length]; - // Some newer protocols are packing the length into NumberBytesHeader also so lets handle it here... - if (obj->msg.Protocol == SPY_PROTOCOL_A2B || obj->msg.Protocol == SPY_PROTOCOL_ETHERNET || - obj->msg.Protocol == SPY_PROTOCOL_SPI || obj->msg.Protocol == SPY_PROTOCOL_WBMS) { - obj->msg.NumberBytesHeader = static_cast(length >> 8); - } - obj->msg.NumberBytesData = length & 0xFF; - if (obj->msg.Protocol != SPY_PROTOCOL_ETHERNET) - obj->msg.ExtraDataPtrEnabled = 1; - unsigned char* ExtraDataPtr = (unsigned char*)(obj->msg.ExtraDataPtr); - for (int i = 0; i < length; ++i) { - PyObject* data = PyTuple_GetItem(value, i); - if (!data && !PyLong_Check(data)) { - ExtraDataPtr[i] = (unsigned char)0; - } else { - ExtraDataPtr[i] = (unsigned char)PyLong_AsLong(data); - } - } - return 0; - } else if (PyUnicode_CompareWithASCIIString(name, "ExtraDataPtrEnabled") == 0) { - // Make sure we clean up here so we don't memory leak - if ((!obj->noExtraDataPtrCleanup && PyLong_AsLong(value) != 1 && obj->msg.ExtraDataPtrEnabled == 1) || - (!obj->noExtraDataPtrCleanup && PyLong_AsLong(value) != 1 && obj->msg.Protocol == SPY_PROTOCOL_ETHERNET)) { - if (obj->msg.ExtraDataPtr != NULL) - delete[] (unsigned char*)obj->msg.ExtraDataPtr; - } else if (PyLong_AsLong(value) != 0 && obj->msg.Protocol == SPY_PROTOCOL_ETHERNET) { - // Ethernet always needs to be set to 0 - return 0; - } - return PyObject_GenericSetAttr(o, name, value); - } else { - return PyObject_GenericSetAttr(o, name, value); - } -} extern PyTypeObject spy_message_object_type; extern PyTypeObject spy_message_j1850_object_type; diff --git a/pyproject.toml b/pyproject.toml index de3605fb8..768f68c58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ classifiers=[ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] [project.urls] @@ -43,11 +44,12 @@ requires = [ ] [tool.cibuildwheel] build = "{*-win32,*-win_amd64,*-macosx_universal2,*-manylinux_x86_64,*-manylinux_aarch64}" -skip = "cp36-* pp* *-manylinux_i686 *-musllinux_*" +skip = "cp36-* cp37-* pp* *-manylinux_i686 *-musllinux_*" environment = {DISTUTILS_DEBUG=1, MACOSX_DEPLOYMENT_TARGET="10.13", CIBW_ARCHS_LINUX="auto aarch64"} before-build = "python -m pip install wheel" manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64" manylinux-aarch64-image = "quay.io/pypa/manylinux_2_28_aarch64" +free-threaded-support = true [tool.cibuildwheel.linux] before-build = "dnf install -y cmake clang clang-tools-extra flex bison" diff --git a/setup.py b/setup.py index 5b368800f..745d3a1ed 100644 --- a/setup.py +++ b/setup.py @@ -70,14 +70,20 @@ def get_ics_extension_compiler_arguments() -> List[str]: """Return a list of compiler arguments to append for compiling the ics extension module""" # gcc and clang arguments GCC_COMPILE_ARGS = [ - "-fpermissive", - "-Wno-unused-variable", - "-Wno-unused-function", - "-Wno-write-strings", + "-Wno-unknown-pragmas", ] # Set compiler flags here if "WINDOWS" in platform.system().upper(): - compile_args = [] + compile_args = [ + "/W4", + "/Wall", # Displays all warnings displayed by /W4 and all other warnings that /W4 doesn't include + #"/WX", # Treats all compiler warnings as errors. + "/external:anglebrackets", + "/external:W0", + "/wd4710", + "/wd4711", + "/wd5045" + ] # mingw and clang python builds won't have MSC in the version string if "MSC" not in sys.version: compile_args = GCC_COMPILE_ARGS diff --git a/src/dll.cpp b/src/dll.cpp index c0e71f1ed..eeaa0f448 100644 --- a/src/dll.cpp +++ b/src/dll.cpp @@ -2,6 +2,10 @@ #include #include +#pragma warning(push) +#pragma warning(disable : 4996) // warning C4996: 'strcpy': This function or variable may be unsafe. + + bool dll_reinitialize(char* name) { @@ -30,3 +34,5 @@ ice::Library* dll_get_library(void) } return mgr["ics"]; } + +#pragma warning(pop) \ No newline at end of file diff --git a/src/exceptions.cpp b/src/exceptions.cpp index f81d7a7a3..92ae888a6 100644 --- a/src/exceptions.cpp +++ b/src/exceptions.cpp @@ -5,34 +5,6 @@ static PyObject* IcsArgumentError = NULL; static PyObject* IcsRuntimeError = NULL; -char* pyics_base36enc(int sn) -{ - char* result = NULL; -#if PY_MAJOR_VERSION >= 3 - PyObject* name = PyUnicode_FromString("ics.ics"); -#else - PyObject* name = PyString_FromString("ics.ics"); -#endif - PyObject* module = PyImport_Import(name); - PyObject* dict = PyModule_GetDict(module); - PyObject* base36enc = PyDict_GetItemString(dict, "base36enc"); - if (PyCallable_Check(base36enc)) { - PyObject* return_value = PyObject_CallFunction(base36enc, "i", sn); - if (return_value == NULL) { - // We failed for some reason... - PyErr_Print(); - Py_DECREF(module); - Py_DECREF(name); - return NULL; - } else { - return PyUniStr_AsStrOrUTF8(return_value); - } - } - Py_DECREF(module); - Py_DECREF(name); - return ""; -} - int initialize_exceptions(PyObject* module) { if (!module && IcsArgumentError && IcsRuntimeError) { @@ -55,7 +27,7 @@ int initialize_exceptions(PyObject* module) return 1; } -PyObject* _set_ics_exception(PyObject* exception, char* msg, const char* func_name) +PyObject* _set_ics_exception(PyObject* exception, const char* msg, const char* func_name) { std::stringstream ss; std::string function = std::string(func_name); diff --git a/src/ice b/src/ice index 8297cfe21..8c2b0c505 160000 --- a/src/ice +++ b/src/ice @@ -1 +1 @@ -Subproject commit 8297cfe21439525b1ccf6ffac9e7527f75d1b4f5 +Subproject commit 8c2b0c505a6ddc9cc9dbe6b9a2313cfe7b9e4063 diff --git a/src/main.cpp b/src/main.cpp index c2e29f335..649b50075 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -78,6 +78,10 @@ extern "C" } PyDateTime_IMPORT; +#ifdef Py_GIL_DISABLED + // Enable the experimental free threaded introduced in 3.13 + PyUnstable_Module_SetGIL(module, Py_MOD_GIL_NOT_USED); +#endif // Add build constant variables setup_module_defines(module); setup_module_auto_defines(module); diff --git a/src/methods.cpp b/src/methods.cpp index f75458528..2082a0502 100644 --- a/src/methods.cpp +++ b/src/methods.cpp @@ -5,10 +5,12 @@ #ifndef USING_STUDIO_8 #define USING_STUDIO_8 1 #endif +#pragma warning(push, 0) #include #ifdef _USE_INTERNAL_HEADER_ #include #endif +#pragma warning(pop) #include #include "object_spy_message.h" #include "setup_module_auto_defines.h" @@ -57,8 +59,537 @@ typedef struct #endif #endif + +#pragma warning(push) +// warning C4191: 'type cast': unsafe conversion from 'PyObject *(__cdecl *)(PyObject *,PyObject *,PyObject *)' +// to 'PyCFunction' Making a function call using the resulting pointer may cause your program to fail +#pragma warning(disable: 4191) +PyMethodDef IcsMethods[] = { + _EZ_ICS_STRUCT_METHOD("find_devices", + "icsneoFindNeoDevices", + "FindNeoDevices", + meth_find_devices, + METH_VARARGS | METH_KEYWORDS, + _DOC_FIND_DEVICES), + _EZ_ICS_STRUCT_METHOD("open_device", + "icsneoOpenNeoDevice", + "OpenNeoDevice", + meth_open_device, + METH_VARARGS | METH_KEYWORDS, + _DOC_OPEN_DEVICES), + _EZ_ICS_STRUCT_METHOD("close_device", + "icsneoClosePort", + "ClosePort", + meth_close_device, + METH_VARARGS, + _DOC_CLOSE_DEVICES), + _EZ_ICS_STRUCT_METHOD("get_rtc", "icsneoGetRTC", "GetRTC", meth_get_rtc, METH_VARARGS, _DOC_GET_RTC), + _EZ_ICS_STRUCT_METHOD("set_rtc", "icsneoSetRTC", "SetRTC", meth_set_rtc, METH_VARARGS, _DOC_SET_RTC), + _EZ_ICS_STRUCT_METHOD("coremini_load", + "icsneoScriptLoad", + "ScriptLoad", + meth_coremini_load, + METH_VARARGS, + _DOC_COREMINI_LOAD), + _EZ_ICS_STRUCT_METHOD("coremini_start", + "icsneoScriptStart", + "ScriptStart", + meth_coremini_start, + METH_VARARGS, + _DOC_COREMINI_START), + _EZ_ICS_STRUCT_METHOD("coremini_stop", + "icsneoScriptStop", + "ScriptStop", + meth_coremini_stop, + METH_VARARGS, + _DOC_COREMINI_STOP), + _EZ_ICS_STRUCT_METHOD("coremini_clear", + "icsneoScriptClear", + "ScriptClear", + meth_coremini_clear, + METH_VARARGS, + _DOC_COREMINI_CLEAR), + _EZ_ICS_STRUCT_METHOD("coremini_get_status", + "icsneoScriptGetScriptStatus", + "ScriptGetScriptStatus", + meth_coremini_get_status, + METH_VARARGS, + _DOC_COREMINI_GET_STATUS), + _EZ_ICS_STRUCT_METHOD("transmit_messages", + "icsneoTxMessages", + "TxMessages", + meth_transmit_messages, + METH_VARARGS, + _DOC_TRANSMIT_MESSAGES), + _EZ_ICS_STRUCT_METHOD("get_messages", + "icsneoGetMessages", + "GetMessages", + meth_get_messages, + METH_VARARGS, + _DOC_GET_MESSAGES), + _EZ_ICS_STRUCT_METHOD("get_script_status", + "icsneoScriptGetScriptStatusEx", + "ScriptGetScriptStatusEx", + meth_get_script_status, + METH_VARARGS, + "Accepts a PyNeoDeviceEx" + ", exception on error. Returns a list of values of what ulParameters would hold"), + _EZ_ICS_STRUCT_METHOD("get_error_messages", + "icsneoGetErrorMessages", + "GetErrorMessages", + meth_get_error_messages, + METH_VARARGS, + _DOC_GET_ERROR_MESSAGES), +#ifdef _USE_INTERNAL_HEADER_ + _EZ_ICS_STRUCT_METHOD("flash_devices", + "FlashDevice2", + "FlashDevice2", + meth_flash_devices, + METH_VARARGS, + "int _stdcall FlashDevice2()"), +#endif + _EZ_ICS_STRUCT_METHOD("set_reflash_callback", + "icsneoSetReflashDisplayCallbacks", + "SetReflashDisplayCallback", + meth_set_reflash_callback, + METH_VARARGS, + _DOC_SET_REFLASH_CALLBACK), + _EZ_ICS_STRUCT_METHOD("get_device_settings", + "icsneoGetDeviceSettings", + "GetDeviceSettings", + meth_get_device_settings, + METH_VARARGS, + _DOC_GET_DEVICE_SETTINGS), + _EZ_ICS_STRUCT_METHOD("set_device_settings", + "icsneoSetDeviceSettings", + "SetDeviceSettings", + meth_set_device_settings, + METH_VARARGS, + _DOC_SET_DEVICE_SETTINGS), + _EZ_ICS_STRUCT_METHOD("load_default_settings", + "icsneoLoadDefaultSettings", + "LoadDefaultSettings", + meth_load_default_settings, + METH_VARARGS, + _DOC_LOAD_DEFAULT_SETTINGS), + //_EZ_ICS_STRUCT_METHOD("spy_message_to_j1850", METH_spy_message_to_j1850, METH_VARARGS, "Accepts a " + // MODULE_NAME + //"." + // SPY_MESSAGE_OBJECT_NAME ", and returns a " MODULE_NAME "." SPY_MESSAGE_J1850_OBJECT_NAME ". Exception on + // error."), + _EZ_ICS_STRUCT_METHOD("read_sdcard", + "icsneoReadSDCard", + "ReadSDCard", + meth_read_sdcard, + METH_VARARGS, + "icsneoReadSDCard(), Accepts a PyNeoDeviceEx" + " and sector index. Returns a bytearray of 512 bytes max. Exception on error."), + _EZ_ICS_STRUCT_METHOD("write_sdcard", + "icsneoWriteSDCard", + "WriteSDCard", + meth_write_sdcard, + METH_VARARGS, + "icsneoReadSDCard(), Accepts a PyNeoDeviceEx" + ", sector index, and a bytearray of 512 bytes. Exception on error."), + { "create_neovi_radio_message", + (PyCFunction)meth_create_neovi_radio_message, + METH_VARARGS | METH_KEYWORDS, + _DOC_CREATE_NEOVI_RADIO_MESSAGE }, + _EZ_ICS_STRUCT_METHOD("coremini_start_fblock", + "icsneoScriptStartFBlock", + "ScriptStartFBlock", + meth_coremini_start_fblock, + METH_VARARGS, + _DOC_COREMINI_START_FBLOCK), + _EZ_ICS_STRUCT_METHOD("coremini_stop_fblock", + "icsneoScriptStopFBlock", + "ScriptStopFBlock", + meth_coremini_stop_fblock, + METH_VARARGS, + _DOC_COREMINI_STOP_FBLOCK), + _EZ_ICS_STRUCT_METHOD("coremini_get_fblock_status", + "icsneoScriptGetFBlockStatus", + "ScriptGetFBlockStatus", + meth_coremini_get_fblock_status, + METH_VARARGS, + _DOC_COREMINI_GET_FBLOCK_STATUS), + _EZ_ICS_STRUCT_METHOD("coremini_read_app_signal", + "icsneoScriptReadAppSignal", + "ScriptReadAppSignal", + meth_coremini_read_app_signal, + METH_VARARGS, + _DOC_COREMINI_READ_APP_SIGNAL), + _EZ_ICS_STRUCT_METHOD("coremini_write_app_signal", + "icsneoScriptWriteAppSignal", + "ScriptWriteAppSignal", + meth_coremini_write_app_signal, + METH_VARARGS, + _DOC_COREMINI_WRITE_APP_SIGNAL), + _EZ_ICS_STRUCT_METHOD("coremini_read_tx_message", + "icsneoScriptReadTxMessage", + "ScriptReadTxMessage", + meth_coremini_read_tx_message, + METH_VARARGS, + _DOC_COREMINI_READ_TX_MESSAGE), + _EZ_ICS_STRUCT_METHOD("coremini_read_rx_message", + "icsneoScriptReadRxMessage", + "ScriptReadRxMessage", + meth_coremini_read_rx_message, + METH_VARARGS, + _DOC_COREMINI_READ_RX_MESSAGE), + _EZ_ICS_STRUCT_METHOD("coremini_write_tx_message", + "icsneoScriptWriteTxMessage", + "ScriptWriteTxMessage", + meth_coremini_write_tx_message, + METH_VARARGS, + _DOC_COREMINI_WRITE_TX_MESSAGE), + _EZ_ICS_STRUCT_METHOD("coremini_write_rx_message", + "icsneoScriptWriteRxMessage", + "ScriptWriteRxMessage", + meth_coremini_write_rx_message, + METH_VARARGS, + _DOC_COREMINI_WRITE_RX_MESSAGE), + _EZ_ICS_STRUCT_METHOD("get_performance_parameters", + "icsneoGetPerformanceParameters", + "GetPerformanceParameters", + meth_get_performance_parameters, + METH_VARARGS, + _DOC_GET_PERFORMANCE_PARAMETERS), + _EZ_ICS_STRUCT_METHOD("validate_hobject", + "icsneoValidateHObject", + "ValidateHObject", + meth_validate_hobject, + METH_VARARGS, + _DOC_VALIDATE_HOBJECT), + _EZ_ICS_STRUCT_METHOD("get_last_api_error", + "icsneoGetLastAPIError", + "GetLastAPIError", + meth_get_last_api_error, + METH_VARARGS, + _DOC_GET_LAST_API_ERROR), + _EZ_ICS_STRUCT_METHOD("get_dll_version", + "icsneoGetDLLVersion", + "GetDLLVersion", + meth_get_dll_version, + METH_NOARGS, + _DOC_GET_DLL_VERSION), + _EZ_ICS_STRUCT_METHOD("get_serial_number", + "icsneoGetSerialNumber", + "GetSerialNumber", + meth_get_serial_number, + METH_VARARGS, + _DOC_GET_SERIAL_NUMBER), + _EZ_ICS_STRUCT_METHOD("get_hw_firmware_info", + "icsneoGetHWFirmwareInfo", + "GetHWFirmwareInfo", + meth_get_hw_firmware_info, + METH_VARARGS, + _DOC_GET_HW_FIRMWARE_INFO), + _EZ_ICS_STRUCT_METHOD("request_enter_sleep_mode", + "icsneoRequestEnterSleepMode", + "RequestEnterSleepMode", + meth_request_enter_sleep_mode, + METH_VARARGS, + _DOC_REQUEST_ENTER_SLEEP_MODE), + { "base36enc", (PyCFunction)meth_base36enc, METH_VARARGS | METH_KEYWORDS, _DOC_BASE36ENC }, + _EZ_ICS_STRUCT_METHOD("set_context", + "icsneoSetContext", + "SetContext", + meth_set_context, + METH_VARARGS, + _DOC_SET_CONTEXT), + _EZ_ICS_STRUCT_METHOD("force_firmware_update", + "icsneoForceFirmwareUpdate", + "ForceFirmwareUpdate", + meth_force_firmware_update, + METH_VARARGS, + _DOC_FORCE_FIRMWARE_UPDATE), + _EZ_ICS_STRUCT_METHOD("firmware_update_required", + "icsneoFirmwareUpdateRequired", + "FirmwareUpdateRequired", + meth_firmware_update_required, + METH_VARARGS, + _DOC_FIRMWARE_UPDATE_REQUIRED), + _EZ_ICS_STRUCT_METHOD("get_dll_firmware_info", + "icsneoGetDLLFirmwareInfo", + "GetDLLFirmwareInfo", + meth_get_dll_firmware_info, + METH_VARARGS, + _DOC_GET_DLL_FIRMWARE_INFO), + _EZ_ICS_STRUCT_METHOD("get_backup_power_enabled", + "icsneoGetBackupPowerEnabled", + "GetBackupPowerEnabled", + meth_get_backup_power_enabled, + METH_VARARGS, + _DOC_GET_BACKUP_POWER_ENABLED), + _EZ_ICS_STRUCT_METHOD("set_backup_power_enabled", + "icsneoSetBackupPowerEnabled", + "SetBackupPowerEnabled", + meth_set_backup_power_enabled, + METH_VARARGS, + _DOC_SET_BACKUP_POWER_ENABLED), + _EZ_ICS_STRUCT_METHOD("get_backup_power_ready", + "icsneoGetBackupPowerReady", + "GetBackupPowerReady", + meth_get_backup_power_ready, + METH_VARARGS, + _DOC_GET_BACKUP_POWER_READY), +#ifdef _USE_INTERNAL_HEADER_ + _EZ_ICS_STRUCT_METHOD("load_readbin", + "icsneoScriptLoadReadBin", + "ScriptLoadReadBin", + meth_load_readbin, + METH_VARARGS, + _DOC_LOAD_READBIN), +#endif + _EZ_ICS_STRUCT_METHOD("iso15765_transmit_message", + "icsneoISO15765_TransmitMessage", + "ISO15765_TransmitMessage", + meth_iso15765_transmit_message, + METH_VARARGS, + _DOC_ISO15765_TRANSMIT_MESSAGE), + _EZ_ICS_STRUCT_METHOD("iso15765_receive_message", + "icsneoISO15765_ReceiveMessage", + "ISO15765_ReceiveMessage", + meth_iso15765_receive_message, + METH_VARARGS, + _DOC_ISO15765_RECEIVE_MESSAGE), + _EZ_ICS_STRUCT_METHOD("iso15765_enable_networks", + "icsneoISO15765_EnableNetworks", + "ISO15765_EnableNetworks", + meth_iso15765_enable_networks, + METH_VARARGS, + _DOC_ISO15765_ENABLE_NETWORKS), + _EZ_ICS_STRUCT_METHOD("iso15765_disable_networks", + "icsneoISO15765_DisableNetworks", + "ISO15765_DisableNetworks", + meth_iso15765_disable_networks, + METH_VARARGS, + _DOC_ISO15765_DISABLE_NETWORKS), + + _EZ_ICS_STRUCT_METHOD("get_active_vnet_channel", + "icsneoGetActiveVNETChannel", + "GetActiveVNETChannel", + meth_get_active_vnet_channel, + METH_VARARGS, + _DOC_GET_ACTIVE_VNET_CHANNEL), + _EZ_ICS_STRUCT_METHOD("set_active_vnet_channel", + "icsneoSetActiveVNETChannel", + "SetActiveVNETChannel", + meth_set_active_vnet_channel, + METH_VARARGS, + _DOC_SET_ACTIVE_VNET_CHANNEL), + _EZ_ICS_STRUCT_METHOD("set_bit_rate", + "icsneoSetBitRate", + "SetBitRate", + meth_set_bit_rate, + METH_VARARGS, + _DOC_SET_BIT_RATE), + _EZ_ICS_STRUCT_METHOD("set_fd_bit_rate", + "icsneoSetFDBitRate", + "SetFDBitRate", + meth_set_fd_bit_rate, + METH_VARARGS, + _DOC_SET_FD_BIT_RATE), + _EZ_ICS_STRUCT_METHOD("set_bit_rate_ex", + "icsneoSetBitRateEx", + "SetBitRateEx", + meth_set_bit_rate_ex, + METH_VARARGS, + _DOC_SET_BIT_RATE_EX), + _EZ_ICS_STRUCT_METHOD("get_timestamp_for_msg", + "icsneoGetTimeStampForMsg", + "GetTimeStampForMsg", + meth_get_timestamp_for_msg, + METH_VARARGS, + _DOC_GET_TIMESTAMP_FOR_MSG), + _EZ_ICS_STRUCT_METHOD("get_device_status", + "icsneoGetDeviceStatus", + "GetDeviceStatus", + meth_get_device_status, + METH_VARARGS, + _DOC_GET_DEVICE_STATUS), + + _EZ_ICS_STRUCT_METHOD("enable_network_com", + "icsneoEnableNetworkCom", + "EnableNetworkCom", + meth_enable_network_com, + METH_VARARGS, + _DOC_ENABLE_NETWORK_COM), + + _EZ_ICS_STRUCT_METHOD("enable_bus_voltage_monitor", + "icsneoEnableBusVoltageMonitor", + "EnableBusVoltageMonitor", + meth_enable_bus_voltage_monitor, + METH_VARARGS, + _DOC_ENABLE_BUS_VOLTAGE_MONITOR), + _EZ_ICS_STRUCT_METHOD("get_bus_voltage", + "icsneoGetBusVoltage", + "GetBusVoltage", + meth_get_bus_voltage, + METH_VARARGS, + _DOC_GET_BUS_VOLTAGE), + + _EZ_ICS_STRUCT_METHOD("read_jupiter_firmware", + "icsneoReadJupiterFirmware", + "ReadJupiterFirmware", + meth_read_jupiter_firmware, + METH_VARARGS, + _DOC_READ_JUPITER_FIRMWARE), + _EZ_ICS_STRUCT_METHOD("write_jupiter_firmware", + "icsneoWriteJupiterFirmware", + "WriteJupiterFirmware", + meth_write_jupiter_firmware, + METH_VARARGS, + _DOC_WRITE_JUPITER_FIRMWARE), + + _EZ_ICS_STRUCT_METHOD("get_disk_details", + "icsneoRequestDiskDetails", + "RequestDiskDetails", + meth_get_disk_details, + METH_VARARGS, + _DOC_GET_DISK_DETAILS), + _EZ_ICS_STRUCT_METHOD("disk_format", + "icsneoRequestDiskFormat", + "RequestDiskFormat", + meth_disk_format, + METH_VARARGS, + _DOC_DISK_FORMAT), + _EZ_ICS_STRUCT_METHOD("disk_format_cancel", + "icsneoRequestDiskFormatCancel", + "RequestDiskFormatCancel", + meth_disk_format_cancel, + METH_VARARGS, + _DOC_DISK_FORMAT_CANCEL), + _EZ_ICS_STRUCT_METHOD("get_disk_format_progress", + "icsneoRequestDiskFormatProgress", + "RequestDiskFormatProgress", + meth_get_disk_format_progress, + METH_VARARGS, + _DOC_DISK_FORMAT_PROGRESS), + _EZ_ICS_STRUCT_METHOD("enable_doip_line", + "icsneoEnableDOIPLine", + "EnableDOIPLine", + meth_enable_doip_line, + METH_VARARGS, + _DOC_ENABLE_DOIP_LINE), + _EZ_ICS_STRUCT_METHOD("is_device_feature_supported", + "icsneoIsDeviceFeatureSupported", + "IsDeviceFeatureSupported", + meth_is_device_feature_supported, + METH_VARARGS, + _DOC_IS_DEVICE_FEATURE_SUPPORTED), + _EZ_ICS_STRUCT_METHOD("get_pcb_serial_number", + "icsneoGetPCBSerialNumber", + "GetPCBSerialNumber", + meth_get_pcb_serial_number, + METH_VARARGS, + _DOC_GET_PCB_SERIAL_NUMBER), + _EZ_ICS_STRUCT_METHOD("set_led_property", + "icsneoSetLedProperty", + "SetLedProperty", + meth_set_led_property, + METH_VARARGS, + _DOC_SET_LED_PROPERTY), + _EZ_ICS_STRUCT_METHOD("start_dhcp_server", + "icsneoStartDHCPServer", + "StartDHCPServer", + meth_start_dhcp_server, + METH_VARARGS, + _DOC_START_DHCP_SERVER), + _EZ_ICS_STRUCT_METHOD("stop_dhcp_server", + "icsneoStopDHCPServer", + "StopDHCPServer", + meth_stop_dhcp_server, + METH_VARARGS, + _DOC_STOP_DHCP_SERVER), + + _EZ_ICS_STRUCT_METHOD("wbms_manager_write_lock", + "icsneowBMSManagerWriteLock", + "wBMSManagerWriteLock", + meth_wbms_manager_write_lock, + METH_VARARGS, + _DOC_WBMS_MANAGER_WRITE_LOCK), + _EZ_ICS_STRUCT_METHOD("wbms_manager_reset", + "icsneowBMSManagerReset", + "wBMSManagerReset", + meth_wbms_manager_reset, + METH_VARARGS, + _DOC_WBMS_MANAGER_RESET), + _EZ_ICS_STRUCT_METHOD("uart_write", "icsneoUartWrite", "UartWrite", meth_uart_write, METH_VARARGS, _DOC_UART_WRITE), + _EZ_ICS_STRUCT_METHOD("uart_read", "icsneoUartRead", "UartRead", meth_uart_read, METH_VARARGS, _DOC_UART_READ), + _EZ_ICS_STRUCT_METHOD("uart_set_baudrate", + "icsneoUartSetBaudrate", + "UartSetBaudrate", + meth_uart_set_baudrate, + METH_VARARGS, + _DOC_UART_SET_BAUDRATE), + _EZ_ICS_STRUCT_METHOD("uart_get_baudrate", + "icsneoUartGetBaudrate", + "UartGetBaudrate", + meth_uart_get_baudrate, + METH_VARARGS, + _DOC_UART_GET_BAUDRATE), + _EZ_ICS_STRUCT_METHOD("generic_api_send_command", + "icsneoGenericAPISendCommand", + "GenericAPISendCommand", + meth_generic_api_send_command, + METH_VARARGS, + _DOC_GENERIC_API_SEND_COMMAND), + _EZ_ICS_STRUCT_METHOD("generic_api_read_data", + "icsneoGenericAPIReadData", + "GenericAPIReadData", + meth_generic_api_read_data, + METH_VARARGS, + _DOC_GENERIC_API_READ_DATA), + _EZ_ICS_STRUCT_METHOD("generic_api_get_status", + "icsneoGenericAPIGetStatus", + "GenericAPIGetStatus", + meth_generic_api_get_status, + METH_VARARGS, + _DOC_GENERIC_API_GET_STATUS), + _EZ_ICS_STRUCT_METHOD("get_gptp_status", + "icsneoGetGPTPStatus", + "GetGPTPStatus", + meth_get_gptp_status, + METH_VARARGS, + _DOC_GET_GPTP_STATUS), + _EZ_ICS_STRUCT_METHOD("get_all_chip_versions", + "icsneoGetAllChipVersions", + "GetAllChipVersions", + meth_get_all_chip_versions, + METH_VARARGS, + _DOC_GET_ALL_CHIP_VERSIONS), + + _EZ_ICS_STRUCT_METHOD("flash_accessory_firmware", + "icsneoFlashAccessoryFirmware", + "FlashAccessoryFirmware", + meth_flash_accessory_firmware, + METH_VARARGS, + _DOC_FLASH_ACCESSORY_FIRMWARE), + _EZ_ICS_STRUCT_METHOD("get_accessory_firmware_version", + "icsneoGetAccessoryFwVersion", + "GetAccessoryFwVersion", + meth_get_accessory_firmware_version, + METH_VARARGS, + _DOC_GET_ACCESSORY_FIRMWARE_VERSION), + _EZ_ICS_STRUCT_METHOD("set_safe_boot_mode", + "icsneoSetSafeBootMode", + "SetSafeBootMode", + meth_set_safe_boot_mode, + METH_VARARGS, + _DOC_SET_SAFE_BOOT_MODE), + + { "override_library_name", (PyCFunction)meth_override_library_name, METH_VARARGS, _DOC_OVERRIDE_LIBRARY_NAME }, + { "get_library_path", (PyCFunction)meth_get_library_path, METH_NOARGS, "" }, + + { NULL, NULL, 0, NULL } +}; + +#pragma warning(pop) + // Internal function -char* neodevice_to_string(unsigned long type) +const char* neodevice_to_string(unsigned long type) { switch (type) { case NEODEVICE_UNKNOWN: @@ -132,6 +663,14 @@ char* neodevice_to_string(unsigned long type) return "RAD-Comet"; case NEODEVICE_FIRE3_FLEXRAY: return "neoVI FIRE 3 Flexray"; + case NEODEVICE_NEOVI_CONNECT: + return "neoVI CONNECT"; + case NEODEVICE_RADCOMET3: + return "RAD-COMET3"; + case NEODEVICE_RADMOONT1S: + return "RAD-MOON-T1S"; + case NEODEVICE_GIGASTAR2: + return "RAD-GigaStar2"; case NEODEVICE_RED: return "neoVI RED"; case NEODEVICE_ECU: @@ -176,10 +715,10 @@ char* neodevice_to_string(unsigned long type) case NEODEVICE_DONT_REUSE1: case NEODEVICE_DONT_REUSE2: case NEODEVICE_DONT_REUSE3: + case NEODEVICE_DONT_REUSE4: default: return "Unknown"; }; - return "Intrepid Device"; } bool _convertListOrTupleToArray(PyObject* obj, std::vector* results) @@ -325,15 +864,17 @@ bool PyNeoDeviceEx_SetNeoDeviceEx(PyObject* object, NeoDeviceEx* src_nde) } // Get the NeoDeviceEx from PyNeoDeviceEx Py_buffer buffer = {}; - NeoDeviceEx* nde = NULL; - int res = PyObject_GetBuffer(object, &buffer, PyBUF_CONTIG); + if (PyObject_GetBuffer(object, &buffer, PyBUF_CONTIG) != 0) { + return false; + } memcpy(buffer.buf, src_nde, sizeof(*src_nde)); PyBuffer_Release(&buffer); return true; } -void __destroy_PyNeoDeviceEx_Handle(PyObject* handle) +extern "C" void __destroy_PyNeoDeviceEx_Handle(PyObject* handle) { + (void)handle; /* if (handle) { delete handle; @@ -352,7 +893,8 @@ bool PyNeoDeviceEx_GetHandle(PyObject* object, void** handle) } *handle = NULL; if (!PyNeoDeviceEx_CheckExact(object)) { - return set_ics_exception(exception_runtime_error(), "Object is not of type PyNeoDeviceEx"); + set_ics_exception(exception_runtime_error(), "Object is not of type PyNeoDeviceEx"); + return false; } PyObject* _handle = PyObject_GetAttrString(object, "_handle"); if (!_handle) { @@ -442,8 +984,12 @@ bool PyNeoDeviceEx_SetName(PyObject* object, PyObject* name) PyObject* meth_find_devices(PyObject* self, PyObject* args, PyObject* keywords) { + (void)self; PyObject* device_types = NULL; int network_id = -1; +#if (PY_MAJOR_VERSION) >= 3 && (PY_MINOR_VERSION >= 13) + const +#endif char* kwords[] = { "device_types", "network_id", NULL }; if (!PyArg_ParseTupleAndKeywords( args, keywords, arg_parse("|Oi:", __FUNCTION__), kwords, &device_types, &network_id)) { @@ -481,11 +1027,10 @@ PyObject* meth_find_devices(PyObject* self, PyObject* args, PyObject* keywords) */ ice::Function icsneoFindDevices(lib, "icsneoFindDevices"); - NeoDeviceEx devices[255] = { 0 }; + NeoDeviceEx devices[255] = {}; int count = 255; - // - OptionsFindNeoEx opts = { 0 }; + OptionsFindNeoEx opts = {}; opts.CANOptions.iNetworkID = network_id; POptionsFindNeoEx popts = NULL; if (network_id != -1) @@ -526,11 +1071,11 @@ PyObject* meth_find_devices(PyObject* self, PyObject* args, PyObject* keywords) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_open_device(PyObject* self, PyObject* args, PyObject* keywords) { + (void)self; unsigned long serial_number = 0; PyObject* device = NULL; PyObject* network_ids = NULL; @@ -539,6 +1084,9 @@ PyObject* meth_open_device(PyObject* self, PyObject* args, PyObject* keywords) int network_id = -1; bool use_neovi_server = false; bool device_need_ref_inc = false; +#if (PY_MAJOR_VERSION) >= 3 && (PY_MINOR_VERSION >= 13) + const +#endif char* kwords[] = { "device", "network_ids", "config_read", "options", "network_id", "use_server", NULL }; if (!PyArg_ParseTupleAndKeywords(args, keywords, @@ -569,7 +1117,7 @@ PyObject* meth_open_device(PyObject* self, PyObject* args, PyObject* keywords) if (!_convertListOrTupleToArray(network_ids, &network_ids_vector)) return NULL; network_ids_list_size = static_cast(network_ids_vector.size()); - network_ids_list.reset((new unsigned char(network_ids_list_size))); + network_ids_list.reset(new unsigned char[network_ids_list_size]); for (unsigned int i = 0; i < network_ids_list_size; ++i) network_ids_list[i] = (unsigned char)PyLong_AsLong(network_ids_vector[i]); use_network_ids = true; @@ -578,7 +1126,7 @@ PyObject* meth_open_device(PyObject* self, PyObject* args, PyObject* keywords) // Verify device type if (device && PyLong_CheckExact(device)) { // Device is a serial number in integer format - serial_number = PyLong_AsLong(device); + serial_number = PyLong_AsUnsignedLong(device); } else if (device && PyUnicode_CheckExact(device)) { // Lets convert the base36 string into an integer PyObject* module_name = PyUnicode_FromString("builtins"); @@ -596,7 +1144,7 @@ PyObject* meth_open_device(PyObject* self, PyObject* args, PyObject* keywords) PyErr_Print(); return NULL; } else { - serial_number = PyLong_AsLong(return_value); + serial_number = PyLong_AsUnsignedLong(return_value); } } else { return set_ics_exception(exception_runtime_error(), "Failed to convert serial number string to integer."); @@ -623,7 +1171,7 @@ PyObject* meth_open_device(PyObject* self, PyObject* args, PyObject* keywords) NeoDeviceEx devices[255]; int count = 255; - OptionsFindNeoEx opts = { 0 }; + OptionsFindNeoEx opts = {}; opts.CANOptions.iNetworkID = network_id; POptionsFindNeoEx popts = NULL; if (network_id != -1) @@ -680,7 +1228,7 @@ PyObject* meth_open_device(PyObject* self, PyObject* args, PyObject* keywords) */ ice::Function icsneoOpenDevice(lib, "icsneoOpenDevice"); - OptionsFindNeoEx opts = { 0 }; + OptionsFindNeoEx opts = {}; opts.CANOptions.iNetworkID = network_id; POptionsFindNeoEx popts = NULL; if (network_id != -1) @@ -721,11 +1269,11 @@ PyObject* meth_open_device(PyObject* self, PyObject* args, PyObject* keywords) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_close_device(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -767,7 +1315,6 @@ PyObject* meth_close_device(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } /* @@ -810,6 +1357,7 @@ __int64 _tm_secs_offset(tm* t1, tm* t2) PyObject* meth_get_rtc(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -864,11 +1412,11 @@ PyObject* meth_get_rtc(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_set_rtc(PyObject* self, PyObject* args) { + (void)self; PyObject* datetime_object = NULL; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O|O:", __FUNCTION__), &obj, &datetime_object)) { @@ -904,7 +1452,7 @@ PyObject* meth_set_rtc(PyObject* self, PyObject* args) ics_time.hour = PyDateTime_DATE_GET_HOUR(datetime_object); ics_time.day = PyDateTime_GET_DAY(datetime_object); ics_time.month = PyDateTime_GET_MONTH(datetime_object); - ics_time.year = PyDateTime_GET_YEAR(datetime_object) % 100; + ics_time.year = static_cast(PyDateTime_GET_YEAR(datetime_object) % 100); try { ice::Library* lib = dll_get_library(); if (!lib) { @@ -922,15 +1470,14 @@ PyObject* meth_set_rtc(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_load(PyObject* self, PyObject* args) { + (void)self; PyObject* arg_data = NULL; int location; PyObject* obj = NULL; - bool isFileData = false; if (!PyArg_ParseTuple(args, arg_parse("OOi:", __FUNCTION__), &obj, &arg_data, &location)) { return NULL; } @@ -965,7 +1512,7 @@ PyObject* meth_coremini_load(PyObject* self, PyObject* args) fsize = ftell(f); rewind(f); data = (unsigned char*)malloc(sizeof(char) * fsize); - data_size = (int)fread(data, 1, fsize, f); + data_size = (int)fread(data, 1, static_cast(fsize), f); fclose(f); if (fsize != data_size) { return set_ics_exception(exception_runtime_error(), "CoreMini binary file size mismatch"); @@ -996,7 +1543,7 @@ PyObject* meth_coremini_load(PyObject* self, PyObject* args) ice::Function icsneoScriptLoad( lib, "icsneoScriptLoad"); Py_BEGIN_ALLOW_THREADS; - if (!icsneoScriptLoad(handle, data, data_size, location)) { + if (!icsneoScriptLoad(handle, data, static_cast(data_size), location)) { Py_BLOCK_THREADS; return set_ics_exception(exception_runtime_error(), "icsneoScriptLoad() Failed"); } @@ -1005,11 +1552,11 @@ PyObject* meth_coremini_load(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_start(PyObject* self, PyObject* args) { + (void)self; int location; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("Oi:", __FUNCTION__), &obj, &location)) { @@ -1039,11 +1586,11 @@ PyObject* meth_coremini_start(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_stop(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -1072,11 +1619,11 @@ PyObject* meth_coremini_stop(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_clear(PyObject* self, PyObject* args) { + (void)self; int location; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("Oi:", __FUNCTION__), &obj, &location)) { @@ -1107,11 +1654,11 @@ PyObject* meth_coremini_clear(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_get_status(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -1142,11 +1689,11 @@ PyObject* meth_coremini_get_status(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_transmit_messages(PyObject* self, PyObject* args) { + (void)self; PyObject* temp; bool created_tuple = false; PyObject* obj = NULL; @@ -1179,10 +1726,10 @@ PyObject* meth_transmit_messages(PyObject* self, PyObject* args) } ice::Function icsneoTxMessages(lib, "icsneoTxMessages"); const Py_ssize_t TUPLE_COUNT = PyTuple_Size(tuple); - icsSpyMessage** msgs = new icsSpyMessage*[TUPLE_COUNT](); + icsSpyMessage** msgs = new icsSpyMessage*[static_cast(TUPLE_COUNT)](); for (int i = 0; i < TUPLE_COUNT; ++i) { - spy_message_object* obj = (spy_message_object*)PyTuple_GetItem(tuple, i); - if (!obj) { + spy_message_object* _obj = (spy_message_object*)PyTuple_GetItem(tuple, static_cast(i)); + if (!_obj) { if (created_tuple) { Py_XDECREF(tuple); } @@ -1190,7 +1737,7 @@ PyObject* meth_transmit_messages(PyObject* self, PyObject* args) return set_ics_exception(exception_runtime_error(), "Tuple item must be of " MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME); } - msgs[i] = &(obj->msg); + msgs[i] = &(_obj->msg); } Py_BEGIN_ALLOW_THREADS; for (int i = 0; i < TUPLE_COUNT; ++i) { @@ -1202,13 +1749,6 @@ PyObject* meth_transmit_messages(PyObject* self, PyObject* args) delete[] msgs; return set_ics_exception(exception_runtime_error(), "icsneoTxMessages() Failed"); } - /* - if (msgs[i]->ExtraDataPtrEnabled && msgs[i]->ExtraDataPtr != NULL) { - delete msgs[i]->ExtraDataPtr; - msgs[i]->ExtraDataPtr = NULL; - msgs[i]->ExtraDataPtrEnabled = 0; - } - */ } Py_END_ALLOW_THREADS; if (created_tuple) { @@ -1219,12 +1759,11 @@ PyObject* meth_transmit_messages(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_messages(PyObject* self, PyObject* args) { - // Py_RETURN_NONE; + (void)self; double timeout = 0.1; int use_j1850 = 0; PyObject* obj = NULL; @@ -1275,29 +1814,29 @@ PyObject* meth_get_messages(PyObject* self, PyObject* args) Py_END_ALLOW_THREADS; PyObject* tuple = PyTuple_New(count); for (int i = 0; i < count; ++i) { - PyObject* obj = NULL; + PyObject* _obj = NULL; if (use_j1850) { - obj = PyObject_CallObject((PyObject*)&spy_message_j1850_object_type, NULL); + _obj = PyObject_CallObject((PyObject*)&spy_message_j1850_object_type, NULL); } else { - obj = PyObject_CallObject((PyObject*)&spy_message_object_type, NULL); + _obj = PyObject_CallObject((PyObject*)&spy_message_object_type, NULL); } - if (!obj) { + if (!_obj) { // This should only happen if we run out of memory (malloc failure)? PyErr_Print(); return set_ics_exception(exception_runtime_error(), "Failed to allocate " SPY_MESSAGE_OBJECT_NAME); } if (use_j1850) { - spy_message_j1850_object* msg = (spy_message_j1850_object*)obj; + spy_message_j1850_object* msg = (spy_message_j1850_object*)_obj; memcpy(&msg->msg, &msgs[i].msg_j1850, sizeof(msgs[i].msg_j1850)); // Looks like icsneo40 does its own memory management so don't delete when we dealloc msg->noExtraDataPtrCleanup = true; } else { - spy_message_object* msg = (spy_message_object*)obj; + spy_message_object* msg = (spy_message_object*)_obj; memcpy(&msg->msg, &msgs[i].msg, sizeof(msgs[i].msg)); // Looks like icsneo40 does its own memory management so don't delete when we dealloc msg->noExtraDataPtrCleanup = true; } - PyTuple_SetItem(tuple, i, obj); + PyTuple_SetItem(tuple, i, _obj); } PyObject* result = Py_BuildValue("(O,i)", tuple, errors); // We have to decrement the ref counter here because BuildValue increases it and @@ -1308,11 +1847,11 @@ PyObject* meth_get_messages(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_script_status(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -1347,15 +1886,15 @@ PyObject* meth_get_script_status(PyObject* self, PyObject* args) } PyObject* list_object = PyList_New(0); for (unsigned long i = 0; i < parameters_count; ++i) { - PyObject* obj = Py_BuildValue("i", parameters[i]); - PyList_Append(list_object, obj); + PyObject* _obj = Py_BuildValue("i", parameters[i]); + PyList_Append(list_object, _obj); } return list_object; } PyObject* meth_get_error_messages(PyObject* self, PyObject* args) { - // return PyList_New(0); + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -1414,9 +1953,9 @@ PyObject* meth_get_error_messages(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } +#ifdef _USE_INTERNAL_HEADER_ PyObject* msg_callback = NULL; static void message_callback(const char* message, bool success) { @@ -1433,9 +1972,9 @@ static void message_callback(const char* message, bool success) PyGILState_Release(state); } -#ifdef _USE_INTERNAL_HEADER_ PyObject* meth_flash_devices(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; PyObject* callback = NULL; PyObject* dict; @@ -1522,7 +2061,6 @@ PyObject* meth_flash_devices(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } #endif // _USE_INTERNAL_HEADER_ @@ -1545,6 +2083,7 @@ static void message_reflash_callback(const wchar_t* message, unsigned long progr // void _stdcall icsneoSetReflashCallback( void(*OnReflashUpdate)(const wchar_t*,unsigned long) ) PyObject* meth_set_reflash_callback(PyObject* self, PyObject* args) { + (void)self; PyObject* callback = NULL; if (!PyArg_ParseTuple(args, arg_parse("|O:", __FUNCTION__), &callback)) { return NULL; @@ -1579,11 +2118,11 @@ PyObject* meth_set_reflash_callback(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_device_settings(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; long device_type_override = -1; EPlasmaIonVnetChannel_t vnet_slot = (EPlasmaIonVnetChannel_t)PlasmaIonVnetChannelMain; @@ -1651,11 +2190,11 @@ PyObject* meth_get_device_settings(PyObject* self, PyObject* args) PyBuffer_Release(&settings_buffer); return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_set_device_settings(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; PyObject* settings = NULL; int save_to_eeprom = 1; @@ -1700,11 +2239,11 @@ PyObject* meth_set_device_settings(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_load_default_settings(PyObject* self, PyObject* args) // icsneoLoadDefaultSettings { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -1716,9 +2255,6 @@ PyObject* meth_load_default_settings(PyObject* self, PyObject* args) // icsneoLo if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { return NULL; } - int errors[600] = { 0 }; - int error_count = 600; - PyObject* list = PyList_New(0); try { ice::Library* lib = dll_get_library(); if (!lib) { @@ -1726,10 +2262,6 @@ PyObject* meth_load_default_settings(PyObject* self, PyObject* args) // icsneoLo return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); } ice::Function icsneoLoadDefaultSettings(lib, "icsneoLoadDefaultSettings"); - void* handle = NULL; - if (!PyNeoDeviceEx_GetHandle(obj, &handle)) { - return NULL; - } Py_BEGIN_ALLOW_THREADS; if (!icsneoLoadDefaultSettings(handle)) { Py_BLOCK_THREADS; @@ -1740,13 +2272,13 @@ PyObject* meth_load_default_settings(PyObject* self, PyObject* args) // icsneoLo } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_read_sdcard(PyObject* self, PyObject* args) // icsneoReadSDCard(int hObject,unsigned long iSectorIndex,unsigned char // *data, unsigned long *bytesRead) { + (void)self; PyObject* obj = NULL; unsigned long index = 0; unsigned long size = 0; @@ -1789,13 +2321,13 @@ PyObject* meth_read_sdcard(PyObject* self, } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_write_sdcard( PyObject* self, PyObject* args) // icsneoWriteSDCard(int hObject,unsigned long iSectorIndex,const unsigned char *data) { + (void)self; PyObject* obj = NULL; unsigned long index = 0; PyObject* ba_obj = NULL; @@ -1833,13 +2365,11 @@ PyObject* meth_write_sdcard( } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_create_neovi_radio_message(PyObject* self, PyObject* args, PyObject* keywords) { - // int PyArg_ParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, char *keywords[], ...) - PyObject* obj = NULL; + (void)self; int relay1 = 0; int relay2 = 0; int relay3 = 0; @@ -1851,6 +2381,9 @@ PyObject* meth_create_neovi_radio_message(PyObject* self, PyObject* args, PyObje int lsb = 0; int analog = 0; int relay_timeout = 0; +#if (PY_MAJOR_VERSION) >= 3 && (PY_MINOR_VERSION >= 13) + const +#endif char* kwords[] = { "Relay1", "Relay2", "Relay3", "Relay4", "Relay5", "LED5", "LED6", "MSB_report_rate", "LSB_report_rate", "analog_change_report_rate", "relay_timeout" }; @@ -1890,9 +2423,10 @@ PyObject* meth_create_neovi_radio_message(PyObject* self, PyObject* args, PyObje PyObject* meth_coremini_start_fblock(PyObject* self, PyObject* args) { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; - if (!PyArg_ParseTuple(args, arg_parse("Oi:", __FUNCTION__), &obj, &index)) { + if (!PyArg_ParseTuple(args, arg_parse("OI:", __FUNCTION__), &obj, &index)) { return NULL; } if (!PyNeoDeviceEx_CheckExact(obj)) { @@ -1919,14 +2453,14 @@ PyObject* meth_coremini_start_fblock(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_stop_fblock(PyObject* self, PyObject* args) { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; - if (!PyArg_ParseTuple(args, arg_parse("Oi:", __FUNCTION__), &obj, &index)) { + if (!PyArg_ParseTuple(args, arg_parse("OI:", __FUNCTION__), &obj, &index)) { return NULL; } if (!PyNeoDeviceEx_CheckExact(obj)) { @@ -1953,14 +2487,14 @@ PyObject* meth_coremini_stop_fblock(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_get_fblock_status(PyObject* self, PyObject* args) { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; - if (!PyArg_ParseTuple(args, arg_parse("Oi:", __FUNCTION__), &obj, &index)) { + if (!PyArg_ParseTuple(args, arg_parse("OI:", __FUNCTION__), &obj, &index)) { return NULL; } if (!PyNeoDeviceEx_CheckExact(obj)) { @@ -1989,14 +2523,14 @@ PyObject* meth_coremini_get_fblock_status(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_read_app_signal(PyObject* self, PyObject* args) // ScriptReadAppSignal { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; - if (!PyArg_ParseTuple(args, arg_parse("Oi:", __FUNCTION__), &obj, &index)) { + if (!PyArg_ParseTuple(args, arg_parse("OI:", __FUNCTION__), &obj, &index)) { return NULL; } if (!PyNeoDeviceEx_CheckExact(obj)) { @@ -2025,15 +2559,15 @@ PyObject* meth_coremini_read_app_signal(PyObject* self, PyObject* args) // Scrip } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_write_app_signal(PyObject* self, PyObject* args) // ScriptWriteAppSignal { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; double value = 0; - if (!PyArg_ParseTuple(args, arg_parse("Oid:", __FUNCTION__), &obj, &index, &value)) { + if (!PyArg_ParseTuple(args, arg_parse("OId:", __FUNCTION__), &obj, &index, &value)) { return NULL; } if (!PyNeoDeviceEx_CheckExact(obj)) { @@ -2061,15 +2595,15 @@ PyObject* meth_coremini_write_app_signal(PyObject* self, PyObject* args) // Scri } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_read_tx_message(PyObject* self, PyObject* args) // ScriptReadTxMessage { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; int j1850 = 0; - if (!PyArg_ParseTuple(args, arg_parse("Oi|b:", __FUNCTION__), &obj, &index, &j1850)) { + if (!PyArg_ParseTuple(args, arg_parse("OI|b:", __FUNCTION__), &obj, &index, &j1850)) { return NULL; } if (!PyNeoDeviceEx_CheckExact(obj)) { @@ -2103,7 +2637,7 @@ PyObject* meth_coremini_read_tx_message(PyObject* self, PyObject* args) // Scrip } Py_END_ALLOW_THREADS; } else { - PyObject* msg = PyObject_CallObject((PyObject*)&spy_message_object_type, NULL); + msg = PyObject_CallObject((PyObject*)&spy_message_object_type, NULL); if (!msg) { // This should only happen if we run out of memory (malloc failure)? PyErr_Print(); @@ -2120,15 +2654,15 @@ PyObject* meth_coremini_read_tx_message(PyObject* self, PyObject* args) // Scrip } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_read_rx_message(PyObject* self, PyObject* args) // ScriptReadRxMessage { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; int j1850 = 0; - if (!PyArg_ParseTuple(args, arg_parse("Oi|b:", __FUNCTION__), &obj, &index, &j1850)) { + if (!PyArg_ParseTuple(args, arg_parse("OI|b:", __FUNCTION__), &obj, &index, &j1850)) { return NULL; } if (!PyNeoDeviceEx_CheckExact(obj)) { @@ -2173,13 +2707,13 @@ PyObject* meth_coremini_read_rx_message(PyObject* self, PyObject* args) // Scrip } Py_END_ALLOW_THREADS; } else { - PyObject* msg = PyObject_CallObject((PyObject*)&spy_message_object_type, NULL); + msg = PyObject_CallObject((PyObject*)&spy_message_object_type, NULL); if (!msg) { // This should only happen if we run out of memory (malloc failure)? PyErr_Print(); return set_ics_exception(exception_runtime_error(), "Failed to allocate " SPY_MESSAGE_OBJECT_NAME); } - PyObject* msg_mask = PyObject_CallObject((PyObject*)&spy_message_object_type, NULL); + msg_mask = PyObject_CallObject((PyObject*)&spy_message_object_type, NULL); if (!msg_mask) { // This should only happen if we run out of memory (malloc failure)? PyErr_Print(); @@ -2197,16 +2731,16 @@ PyObject* meth_coremini_read_rx_message(PyObject* self, PyObject* args) // Scrip } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_write_tx_message(PyObject* self, PyObject* args) // icsneoScriptWriteTxMessage { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; PyObject* msg_obj = NULL; int j1850 = 0; - if (!PyArg_ParseTuple(args, arg_parse("OiO|b:", __FUNCTION__), &obj, &index, &msg_obj, &j1850)) { + if (!PyArg_ParseTuple(args, arg_parse("OIO|b:", __FUNCTION__), &obj, &index, &msg_obj, &j1850)) { return NULL; } if (!PyNeoDeviceEx_CheckExact(obj)) { @@ -2217,7 +2751,6 @@ PyObject* meth_coremini_write_tx_message(PyObject* self, PyObject* args) // icsn return NULL; } void* msg = NULL; - void* msg_mask = NULL; if (j1850) { // We are going to use icsSpyMessageJ1850 objects here. if (!PySpyMessageJ1850_CheckExact(msg_obj)) { @@ -2251,17 +2784,17 @@ PyObject* meth_coremini_write_tx_message(PyObject* self, PyObject* args) // icsn } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_coremini_write_rx_message(PyObject* self, PyObject* args) // icsneoScriptWriteRxMessage { - int index; + (void)self; + unsigned int index; PyObject* obj = NULL; PyObject* msg_obj = NULL; PyObject* msg_mask_obj = NULL; int j1850 = 0; - if (!PyArg_ParseTuple(args, arg_parse("OiOO|b:", __FUNCTION__), &obj, &index, &msg_obj, &msg_mask_obj, &j1850)) { + if (!PyArg_ParseTuple(args, arg_parse("OIOO|b:", __FUNCTION__), &obj, &index, &msg_obj, &msg_mask_obj, &j1850)) { return NULL; } if (!PyNeoDeviceEx_CheckExact(obj)) { @@ -2315,11 +2848,11 @@ PyObject* meth_coremini_write_rx_message(PyObject* self, PyObject* args) // icsn } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_performance_parameters(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -2373,11 +2906,11 @@ PyObject* meth_get_performance_parameters(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_validate_hobject(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -2408,11 +2941,11 @@ PyObject* meth_validate_hobject(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_last_api_error(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -2458,11 +2991,12 @@ PyObject* meth_get_last_api_error(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_dll_version(PyObject* self, PyObject* args) { + (void)self; + (void)args; try { ice::Library* lib = dll_get_library(); if (!lib) { @@ -2478,11 +3012,11 @@ PyObject* meth_get_dll_version(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_serial_number(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -2512,11 +3046,11 @@ PyObject* meth_get_serial_number(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_hw_firmware_info(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -2553,11 +3087,11 @@ PyObject* meth_get_hw_firmware_info(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_base36enc(PyObject* self, PyObject* args) { + (void)self; unsigned long long value = 0; if (!PyArg_ParseTuple(args, arg_parse("K:", __FUNCTION__), &value)) { return NULL; @@ -2576,6 +3110,7 @@ PyObject* meth_base36enc(PyObject* self, PyObject* args) PyObject* meth_request_enter_sleep_mode(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned int timeout_ms = 0; unsigned int mode = 0; @@ -2608,11 +3143,11 @@ PyObject* meth_request_enter_sleep_mode(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_set_context(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -2650,11 +3185,11 @@ PyObject* meth_set_context(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_force_firmware_update(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -2683,11 +3218,11 @@ PyObject* meth_force_firmware_update(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_firmware_update_required(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -2716,11 +3251,11 @@ PyObject* meth_firmware_update_required(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_dll_firmware_info(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -2756,11 +3291,11 @@ PyObject* meth_get_dll_firmware_info(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_backup_power_enabled(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned int enabled = 0; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { @@ -2791,11 +3326,11 @@ PyObject* meth_get_backup_power_enabled(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_set_backup_power_enabled(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned int enabled = 1; if (!PyArg_ParseTuple(args, arg_parse("O|b:", __FUNCTION__), &obj, &enabled)) { @@ -2826,11 +3361,12 @@ PyObject* meth_set_backup_power_enabled(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); + } PyObject* meth_get_backup_power_ready(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned int enabled = 0; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { @@ -2860,16 +3396,15 @@ PyObject* meth_get_backup_power_ready(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } // icsneoScriptLoadReadBin PyObject* meth_load_readbin(PyObject* self, PyObject* args) { + (void)self; PyObject* arg_data = NULL; int location; PyObject* obj = NULL; - bool isFileData = false; if (!PyArg_ParseTuple(args, arg_parse("OOi:", __FUNCTION__), &obj, &arg_data, &location)) { return NULL; } @@ -2904,7 +3439,7 @@ PyObject* meth_load_readbin(PyObject* self, PyObject* args) fsize = ftell(f); rewind(f); data = (unsigned char*)malloc(sizeof(char) * fsize); - data_size = (int)fread(data, 1, fsize, f); + data_size = (int)fread(data, 1, static_cast(fsize), f); fclose(f); if (fsize != data_size) { return set_ics_exception(exception_runtime_error(), "Readbin file size mismatch"); @@ -2935,7 +3470,7 @@ PyObject* meth_load_readbin(PyObject* self, PyObject* args) ice::Function icsneoScriptLoadReadBin( lib, "icsneoScriptLoadReadBin"); Py_BEGIN_ALLOW_THREADS; - if (!icsneoScriptLoadReadBin(handle, data, data_size, location)) { + if (!icsneoScriptLoadReadBin(handle, data, static_cast(data_size), location)) { Py_BLOCK_THREADS; return set_ics_exception(exception_runtime_error(), "icsneoScriptLoadReadBin() Failed"); } @@ -2944,12 +3479,12 @@ PyObject* meth_load_readbin(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } // void* hObject, unsigned long ulNetworkID, stCM_ISO157652_TxMessage *pMsg, unsigned long ulBlockingTimeout) PyObject* meth_iso15765_transmit_message(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned long ulNetworkID = 0; PyObject* obj_tx_msg = NULL; @@ -2993,11 +3528,11 @@ PyObject* meth_iso15765_transmit_message(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_iso15765_receive_message(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; PyObject* obj_rx_msg = NULL; unsigned int iIndex = 0; @@ -3043,11 +3578,11 @@ PyObject* meth_iso15765_receive_message(PyObject* self, PyObject* args) PyBuffer_Release(&obj_rx_msg_buffer); return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_iso15765_enable_networks(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned long networks = 0; if (!PyArg_ParseTuple(args, arg_parse("Oi:", __FUNCTION__), &obj, &networks)) { @@ -3078,11 +3613,11 @@ PyObject* meth_iso15765_enable_networks(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_iso15765_disable_networks(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -3111,11 +3646,11 @@ PyObject* meth_iso15765_disable_networks(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_active_vnet_channel(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned long channel = 0; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { @@ -3146,11 +3681,11 @@ PyObject* meth_get_active_vnet_channel(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_set_active_vnet_channel(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned long channel = 0; if (!PyArg_ParseTuple(args, arg_parse("Oi:", __FUNCTION__), &obj, &channel)) { @@ -3181,11 +3716,11 @@ PyObject* meth_set_active_vnet_channel(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_set_bit_rate(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; int bitrate = 0; int net_id = 0; @@ -3216,11 +3751,11 @@ PyObject* meth_set_bit_rate(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_set_fd_bit_rate(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; int bitrate = 0; int net_id = 0; @@ -3251,11 +3786,11 @@ PyObject* meth_set_fd_bit_rate(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_set_bit_rate_ex(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; int bitrate = 0; int net_id = 0; @@ -3287,11 +3822,11 @@ PyObject* meth_set_bit_rate_ex(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_timestamp_for_msg(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; PyObject* obj_msg = NULL; if (!PyArg_ParseTuple(args, arg_parse("OO:", __FUNCTION__), &obj, &obj_msg)) { @@ -3328,11 +3863,11 @@ PyObject* meth_get_timestamp_for_msg(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_device_status(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; int throw_exception_on_size_mismatch = 0; if (!PyArg_ParseTuple(args, arg_parse("O|b:", __FUNCTION__), &obj, &throw_exception_on_size_mismatch)) { @@ -3358,10 +3893,9 @@ PyObject* meth_get_device_status(PyObject* self, PyObject* args) Py_buffer device_status_buffer = {}; PyObject_GetBuffer(device_status, &device_status_buffer, PyBUF_CONTIG); - size_t device_status_size = device_status_buffer.len; + size_t device_status_size = static_cast(device_status_buffer.len); ice::Function icsneoGetDeviceStatus(lib, "icsneoGetDeviceStatus"); - double timestamp = 0; Py_BEGIN_ALLOW_THREADS; if (!icsneoGetDeviceStatus(handle, (icsDeviceStatus*)device_status_buffer.buf, &device_status_size)) { Py_BLOCK_THREADS; @@ -3380,11 +3914,11 @@ PyObject* meth_get_device_status(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_enable_network_com(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; bool enable = true; long net_id = -1; @@ -3425,11 +3959,11 @@ PyObject* meth_enable_network_com(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_enable_bus_voltage_monitor(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned int enable = 1; unsigned int reserved = 0; @@ -3462,11 +3996,11 @@ PyObject* meth_enable_bus_voltage_monitor(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_bus_voltage(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned int reserved = 0; if (!PyArg_ParseTuple(args, arg_parse("O|i:", __FUNCTION__), &obj, &reserved)) { @@ -3499,11 +4033,11 @@ PyObject* meth_get_bus_voltage(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_read_jupiter_firmware(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; size_t fileSize = 0; EPlasmaIonVnetChannel_t channel = PlasmaIonVnetChannelMain; @@ -3517,7 +4051,8 @@ PyObject* meth_read_jupiter_firmware(PyObject* self, PyObject* args) return NULL; } // Resize the ByteArray - int ret_val = PyByteArray_Resize(ba, fileSize); + int ret_val = PyByteArray_Resize(ba, static_cast(fileSize)); + (void)ret_val; // TODO: Documentation doesn't say what return value is. if (!PyNeoDeviceEx_CheckExact(obj)) { @@ -3555,11 +4090,11 @@ PyObject* meth_read_jupiter_firmware(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_write_jupiter_firmware(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; PyObject* bytes_obj = NULL; EPlasmaIonVnetChannel_t channel = PlasmaIonVnetChannelMain; @@ -3599,7 +4134,7 @@ PyObject* meth_write_jupiter_firmware(PyObject* self, PyObject* args) Py_BEGIN_ALLOW_THREADS; // if (!icsneoWriteJupiterFirmware(handle, (char*)bytes_buffer.buf, bytes_buffer.len, channel)) { - if (!icsneoWriteJupiterFirmware(handle, bytes_str, bsize, channel)) { + if (!icsneoWriteJupiterFirmware(handle, bytes_str, static_cast(bsize), channel)) { Py_BLOCK_THREADS; Py_DECREF(bytes); // PyBuffer_Release(&bytes_buffer); @@ -3612,11 +4147,11 @@ PyObject* meth_write_jupiter_firmware(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_flash_accessory_firmware(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; PyObject* parms = NULL; bool check_success = true; @@ -3724,6 +4259,7 @@ PyObject* meth_flash_accessory_firmware(PyObject* self, PyObject* args) PyObject* meth_get_accessory_firmware_version(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; char accessory_indx = 0; bool check_success = true; @@ -3826,6 +4362,7 @@ PyObject* meth_get_accessory_firmware_version(PyObject* self, PyObject* args) PyObject* meth_set_safe_boot_mode(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; bool enable = true; if (!PyArg_ParseTuple(args, arg_parse("Ob:", __FUNCTION__), &obj, &enable)) { @@ -3849,8 +4386,6 @@ PyObject* meth_set_safe_boot_mode(PyObject* self, PyObject* args) // int _stdcall icsneoSetSafeBootMode(void* hObject, const uint8_t enable) ice::Function icsneoSetSafeBootMode(lib, "icsneoSetSafeBootMode"); - unsigned int accessory_version = 0; - int function_error = 0; Py_BEGIN_ALLOW_THREADS; if (!icsneoSetSafeBootMode(handle, enable)) { Py_BLOCK_THREADS return set_ics_exception(exception_runtime_error(), "icsneoSetSafeBootMode() Failed"); @@ -3864,6 +4399,7 @@ PyObject* meth_set_safe_boot_mode(PyObject* self, PyObject* args) PyObject* meth_override_library_name(PyObject* self, PyObject* args) { + (void)self; const char* name = NULL; if (!PyArg_ParseTuple(args, arg_parse("s:", __FUNCTION__), &name)) { return NULL; @@ -3882,11 +4418,11 @@ PyObject* meth_override_library_name(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_library_path(PyObject* self) { + (void)self; try { ice::Library* lib = dll_get_library(); if (!lib) { @@ -3900,11 +4436,11 @@ PyObject* meth_get_library_path(PyObject* self) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_disk_details(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -3944,11 +4480,11 @@ PyObject* meth_get_disk_details(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_disk_format(PyObject* self, PyObject* args) { + (void)self; PyObject* details = NULL; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("OO:", __FUNCTION__), &obj, &details)) { @@ -3983,11 +4519,11 @@ PyObject* meth_disk_format(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_disk_format_cancel(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -4017,11 +4553,11 @@ PyObject* meth_disk_format_cancel(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_disk_format_progress(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -4062,11 +4598,11 @@ PyObject* meth_get_disk_format_progress(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_enable_doip_line(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; bool enable = false; if (!PyArg_ParseTuple(args, arg_parse("O|b:", __FUNCTION__), &obj, &enable)) { @@ -4096,14 +4632,13 @@ PyObject* meth_enable_doip_line(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_is_device_feature_supported(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned int feature = 0; - bool enable = false; if (!PyArg_ParseTuple(args, arg_parse("OI:", __FUNCTION__), &obj, &feature)) { return NULL; } @@ -4133,11 +4668,11 @@ PyObject* meth_is_device_feature_supported(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_pcb_serial_number(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -4168,11 +4703,11 @@ PyObject* meth_get_pcb_serial_number(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_set_led_property(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned int led = 0; unsigned int prop = 0; @@ -4205,11 +4740,11 @@ PyObject* meth_set_led_property(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_start_dhcp_server(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned int NetworkID = 0; const char* pDeviceIPAddress = NULL; @@ -4281,11 +4816,11 @@ PyObject* meth_start_dhcp_server(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_stop_dhcp_server(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned int NetworkID = 0; if (!PyArg_ParseTuple(args, arg_parse("OI:", __FUNCTION__), &obj, &NetworkID)) { @@ -4315,11 +4850,11 @@ PyObject* meth_stop_dhcp_server(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_wbms_manager_write_lock(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; EwBMSManagerPort_t manager = eManagerPortA; EwBMSManagerLockState_t lock_state = eLockManager; @@ -4351,11 +4886,11 @@ PyObject* meth_wbms_manager_write_lock(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_wbms_manager_reset(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; EwBMSManagerPort_t manager = eManagerPortA; if (!PyArg_ParseTuple(args, arg_parse("OI:", __FUNCTION__), &obj, &manager)) { @@ -4386,11 +4921,11 @@ PyObject* meth_wbms_manager_reset(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_uart_write(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; EUartPort_t port = eUART0; Py_buffer data = {}; @@ -4420,7 +4955,7 @@ PyObject* meth_uart_write(PyObject* self, PyObject* args) ice::Function icsneoUartWrite(lib, "icsneoUartWrite"); Py_BEGIN_ALLOW_THREADS; - if (!icsneoUartWrite(handle, port, data.buf, data.len, &bytesActuallySent, &flags)) { + if (!icsneoUartWrite(handle, port, data.buf, static_cast(data.len), &bytesActuallySent, &flags)) { Py_BLOCK_THREADS; return set_ics_exception(exception_runtime_error(), "icsneoUartWrite() Failed"); } @@ -4433,11 +4968,11 @@ PyObject* meth_uart_write(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_uart_read(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; EUartPort_t port = eUART0; unsigned int bytesToRead = 256; @@ -4462,8 +4997,8 @@ PyObject* meth_uart_read(PyObject* self, PyObject* args) if (!lib) { free(buffer); buffer = NULL; - char buffer[512]; - return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + char _buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(_buffer)); } size_t bytesActuallyRead = 0; // int _stdcall icsneoUartRead(void* hObject, const EUartPort_t uart, void* bData, const size_t bytesToRead, @@ -4478,7 +5013,7 @@ PyObject* meth_uart_read(PyObject* self, PyObject* args) return set_ics_exception(exception_runtime_error(), "icsneoUartRead() Failed"); } Py_END_ALLOW_THREADS; - PyObject* ba_result = PyByteArray_FromStringAndSize((const char*)buffer, bytesActuallyRead); + PyObject* ba_result = PyByteArray_FromStringAndSize((const char*)buffer, static_cast(bytesActuallyRead)); // PyObject* value = Py_BuildValue("O", ba_result); free(buffer); buffer = NULL; @@ -4488,11 +5023,11 @@ PyObject* meth_uart_read(PyObject* self, PyObject* args) buffer = NULL; return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_uart_set_baudrate(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; EUartPort_t port = eUART0; unsigned int baudrate = 0; @@ -4527,11 +5062,11 @@ PyObject* meth_uart_set_baudrate(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_uart_get_baudrate(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; EUartPort_t port = eUART0; if (!PyArg_ParseTuple(args, arg_parse("OII:", __FUNCTION__), &obj, &port)) { @@ -4566,11 +5101,11 @@ PyObject* meth_uart_get_baudrate(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_generic_api_send_command(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned char apiIndex = 0; unsigned char instanceIndex = 0; @@ -4624,11 +5159,11 @@ PyObject* meth_generic_api_send_command(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_generic_api_read_data(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned char apiIndex = 0; unsigned char instanceIndex = 0; @@ -4653,8 +5188,8 @@ PyObject* meth_generic_api_read_data(PyObject* self, PyObject* args) if (!lib) { free(buffer); buffer = NULL; - char buffer[512]; - return set_ics_exception(exception_runtime_error(), dll_get_error(buffer)); + char _buffer[512]; + return set_ics_exception(exception_runtime_error(), dll_get_error(_buffer)); } /* int _stdcall icsneoGenericAPIReadData(void* hObject, @@ -4687,11 +5222,11 @@ PyObject* meth_generic_api_read_data(PyObject* self, PyObject* args) buffer = NULL; return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_generic_api_get_status(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; unsigned char apiIndex = 0; unsigned char instanceIndex = 0; @@ -4740,11 +5275,11 @@ PyObject* meth_generic_api_get_status(PyObject* self, PyObject* args) } catch (ice::Exception& ex) { return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } PyObject* meth_get_gptp_status(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -4792,12 +5327,12 @@ PyObject* meth_get_gptp_status(PyObject* self, PyObject* args) PyBuffer_Release(&status_buffer); return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } // int _stdcall icsneoGetAllChipVersions(void* hObject, stChipVersions* pInfo, int ipInfoSize) PyObject* meth_get_all_chip_versions(PyObject* self, PyObject* args) { + (void)self; PyObject* obj = NULL; if (!PyArg_ParseTuple(args, arg_parse("O:", __FUNCTION__), &obj)) { return NULL; @@ -4848,5 +5383,4 @@ PyObject* meth_get_all_chip_versions(PyObject* self, PyObject* args) PyBuffer_Release(&py_struct_buffer); return set_ics_exception(exception_runtime_error(), (char*)ex.what()); } - return set_ics_exception(exception_runtime_error(), "This is a bug!"); } diff --git a/src/object_spy_message.cpp b/src/object_spy_message.cpp index df556b913..da82097b9 100644 --- a/src/object_spy_message.cpp +++ b/src/object_spy_message.cpp @@ -1,5 +1,385 @@ #include "object_spy_message.h" +static int spy_message_object_alloc(spy_message_object* self, PyObject* args, PyObject* kwds) +{ + (void)args; + (void)kwds; + memset(&self->msg, 0, sizeof(self->msg)); + self->noExtraDataPtrCleanup = false; + return 0; +} + +static void spy_message_object_dealloc(spy_message_object* self) +{ + if ((!self->noExtraDataPtrCleanup && self->msg.ExtraDataPtrEnabled && self->msg.ExtraDataPtr != NULL) || + (!self->noExtraDataPtrCleanup && self->msg.Protocol == SPY_PROTOCOL_ETHERNET && + self->msg.ExtraDataPtr != NULL)) { + // Clean up the ExtraDataPtr if we can + // Ethernet protocol uses the ExtraDataPtrEnabled reversed internally so do a double check here + delete[] (unsigned char*)self->msg.ExtraDataPtr; + self->msg.ExtraDataPtr = NULL; + self->msg.ExtraDataPtrEnabled = 0; + } + Py_TYPE(self)->tp_free((PyObject*)self); +} + +static PyObject* spy_message_object_getattr(PyObject* o, PyObject* attr_name) +{ +#if PY_MAJOR_VERSION >= 3 + if (!PyUnicode_Check(attr_name)) { +#else + if (!PyString_Check(attr_name)) { +#endif + PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", attr_name->ob_type->tp_name); + return NULL; + } else { + Py_INCREF(attr_name); + } + if (PyUnicode_CompareWithASCIIString(attr_name, "Data") == 0) { + Py_DECREF(attr_name); + spy_message_object* obj = (spy_message_object*)o; + PyObject* temp = Py_BuildValue("(i,i,i,i,i,i,i,i)", + obj->msg.Data[0], + obj->msg.Data[1], + obj->msg.Data[2], + obj->msg.Data[3], + obj->msg.Data[4], + obj->msg.Data[5], + obj->msg.Data[6], + obj->msg.Data[7]); + PyObject* data = PyTuple_GetSlice(temp, 0, obj->msg.NumberBytesData); + Py_DECREF(temp); + return data; + } else if (PyUnicode_CompareWithASCIIString(attr_name, "AckBytes") == 0) { + Py_DECREF(attr_name); + spy_message_object* obj = (spy_message_object*)o; + return Py_BuildValue("(i,i,i,i,i,i,i,i)", + obj->msg.AckBytes[0], + obj->msg.AckBytes[1], + obj->msg.AckBytes[2], + obj->msg.AckBytes[3], + obj->msg.AckBytes[4], + obj->msg.AckBytes[5], + obj->msg.AckBytes[6], + obj->msg.AckBytes[7]); + } else if (PyUnicode_CompareWithASCIIString(attr_name, "Header") == 0) { + Py_DECREF(attr_name); + spy_message_j1850_object* obj = (spy_message_j1850_object*)o; + PyObject* temp = + Py_BuildValue("(i,i,i,i)", obj->msg.Header[0], obj->msg.Header[1], obj->msg.Header[2], obj->msg.Header[3]); + PyObject* data = PyTuple_GetSlice(temp, 0, obj->msg.NumberBytesHeader); + Py_DECREF(temp); + return data; + } else if (PyUnicode_CompareWithASCIIString(attr_name, "ExtraDataPtr") == 0) { + Py_DECREF(attr_name); + spy_message_j1850_object* obj = (spy_message_j1850_object*)o; + unsigned char* ExtraDataPtr = (unsigned char*)obj->msg.ExtraDataPtr; + bool extra_data_ptr_enabled = obj->msg.ExtraDataPtrEnabled != 0; + // Ethernet protocol uses the ExtraDataPtrEnabled reversed internally + if ((obj->msg.Protocol == SPY_PROTOCOL_ETHERNET || + obj->msg.Protocol == SPY_PROTOCOL_SPI || + obj->msg.Protocol == SPY_PROTOCOL_WBMS) + && obj->msg.ExtraDataPtr != NULL) { + extra_data_ptr_enabled = true; + } + int actual_size = 0; + // Some newer protocols are packing the length into NumberBytesHeader also so lets handle it here... + if (obj->msg.Protocol == SPY_PROTOCOL_A2B || obj->msg.Protocol == SPY_PROTOCOL_ETHERNET || + obj->msg.Protocol == SPY_PROTOCOL_SPI || obj->msg.Protocol == SPY_PROTOCOL_WBMS) { + actual_size = (obj->msg.NumberBytesHeader << 8) | obj->msg.NumberBytesData; + } else { + actual_size = obj->msg.NumberBytesData; + } + if (extra_data_ptr_enabled && actual_size && obj->msg.ExtraDataPtr) { + PyObject* tuple = PyTuple_New(actual_size); + for (int i = 0; i < actual_size; ++i) { + PyTuple_SET_ITEM(tuple, i, PyLong_FromLong(ExtraDataPtr[i])); + } + return tuple; + } else { + return Py_None; + } + } else { + return PyObject_GenericGetAttr(o, attr_name); + } +} + +static int spy_message_object_setattr(PyObject* o, PyObject* name, PyObject* value) +{ + spy_message_object* obj = (spy_message_object*)o; + if (PyUnicode_CompareWithASCIIString(name, "Data") == 0) { + // Make sure we are a tuple and len() == 8 + if (!PyTuple_Check(value)) { + PyErr_Format(PyExc_AttributeError, + "'%.50s' object attribute '%.400s' needs to be a tuple", + MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME, + name); + return -1; + } + // Get tuple items and place them in array, set as 0 if error. + for (int i = 0; i < 8 && i < PyObject_Length(value); ++i) { + PyObject* data = PyTuple_GetItem(value, i); + if (!data && !PyLong_Check(data)) { + obj->msg.Data[i] = 0; + } else { + obj->msg.Data[i] = (unsigned char)PyLong_AsLong(data); + } + } + obj->msg.NumberBytesData = static_cast(PyObject_Length(value)); + return 0; + } else if (PyUnicode_CompareWithASCIIString(name, "AckBytes") == 0) { + // Make sure we are a tuple and len() == 8 + if (!PyTuple_Check(value)) { + PyErr_Format(PyExc_AttributeError, + "'%.50s' object attribute '%.400s' needs to be a tuple", + MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME, + name); + return -1; + } + // Get tuple items and place them in array, set as 0 if error. + for (int i = 0; i < 8 && i < PyObject_Length(value); ++i) { + PyObject* data = PyTuple_GetItem(value, i); + if (!data && !PyLong_Check(data)) { + obj->msg.AckBytes[i] = 0; + } else { + obj->msg.AckBytes[i] = (unsigned char)PyLong_AsLong(data); + } + } + return 0; + } else if (PyUnicode_CompareWithASCIIString(name, "Header") == 0) { + // Make sure we are a tuple and len() == 8 + if (!PyTuple_Check(value)) { + PyErr_Format(PyExc_AttributeError, + "'%.50s' object attribute '%.400s' needs to be a tuple", + MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME, + name); + return -1; + } + // Get tuple items and place them in array, set as 0 if error. + for (int i = 0; i < 8 && i < PyObject_Length(value); ++i) { + PyObject* data = PyTuple_GetItem(value, i); + if (!data && !PyLong_Check(data)) { + ((spy_message_j1850_object*)obj)->msg.Header[i] = 0; + } else { + ((spy_message_j1850_object*)obj)->msg.Header[i] = (unsigned char)PyLong_AsLong(data); + } + obj->msg.NumberBytesHeader = static_cast(PyObject_Length(value)); + } + return 0; + } else if (PyUnicode_CompareWithASCIIString(name, "Protocol") == 0) { + // Ethernet behavior is backward to CAN and will crash if enabled. + if (PyLong_AsLong(value) == SPY_PROTOCOL_ETHERNET) + obj->msg.ExtraDataPtrEnabled = 0; + return PyObject_GenericSetAttr(o, name, value); + } else if (PyUnicode_CompareWithASCIIString(name, "ExtraDataPtr") == 0) { + // Make sure we are a tuple and len() == 8 + if (!PyTuple_Check(value)) { + PyErr_Format(PyExc_AttributeError, + "'%.50s' object attribute '%.400s' needs to be a tuple", + MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME, + name); + return -1; + } + // Get tuple items and place them in array, set as 0 if error. + size_t length = static_cast(PyObject_Length(value)); + if (obj->msg.ExtraDataPtr != NULL) + delete[] (unsigned char*)obj->msg.ExtraDataPtr; + obj->msg.ExtraDataPtr = new unsigned char[length]; + // Some newer protocols are packing the length into NumberBytesHeader also so lets handle it here... + if (obj->msg.Protocol == SPY_PROTOCOL_A2B || obj->msg.Protocol == SPY_PROTOCOL_ETHERNET || + obj->msg.Protocol == SPY_PROTOCOL_SPI || obj->msg.Protocol == SPY_PROTOCOL_WBMS) { + obj->msg.NumberBytesHeader = static_cast(length >> 8); + } + obj->msg.NumberBytesData = length & 0xFF; + if (obj->msg.Protocol != SPY_PROTOCOL_ETHERNET) + obj->msg.ExtraDataPtrEnabled = 1; + unsigned char* ExtraDataPtr = (unsigned char*)(obj->msg.ExtraDataPtr); + for (size_t i = 0; i < length; ++i) { + PyObject* data = PyTuple_GetItem(value, static_cast(i)); + if (!data && !PyLong_Check(data)) { + ExtraDataPtr[i] = (unsigned char)0; + } else { + ExtraDataPtr[i] = (unsigned char)PyLong_AsLong(data); + } + } + return 0; + } else if (PyUnicode_CompareWithASCIIString(name, "ExtraDataPtrEnabled") == 0) { + // Make sure we clean up here so we don't memory leak + if ((!obj->noExtraDataPtrCleanup && PyLong_AsLong(value) != 1 && obj->msg.ExtraDataPtrEnabled == 1) || + (!obj->noExtraDataPtrCleanup && PyLong_AsLong(value) != 1 && obj->msg.Protocol == SPY_PROTOCOL_ETHERNET)) { + if (obj->msg.ExtraDataPtr != NULL) + delete[] (unsigned char*)obj->msg.ExtraDataPtr; + } else if (PyLong_AsLong(value) != 0 && obj->msg.Protocol == SPY_PROTOCOL_ETHERNET) { + // Ethernet always needs to be set to 0 + return 0; + } + return PyObject_GenericSetAttr(o, name, value); + } else { + return PyObject_GenericSetAttr(o, name, value); + } +} + +static PyMemberDef spy_message_object_members[] = { + { "StatusBitField", T_UINT, offsetof(spy_message_object, msg.StatusBitField), 0, "StatusBitField" }, + { "StatusBitField2", T_UINT, offsetof(spy_message_object, msg.StatusBitField2), 0, "StatusBitField2" }, + { "TimeHardware", + T_UINT, + offsetof(spy_message_object, msg.TimeHardware), + 0, + "Hardware time stamp. The TimeStamp is reset on device open" }, + { "TimeHardware2", + T_UINT, + offsetof(spy_message_object, msg.TimeHardware2), + 0, + "Hardware time stamp. The TimeStamp is reset on device open" }, + { "TimeSystem", + T_UINT, + offsetof(spy_message_object, msg.TimeSystem), + 0, + "TimeSystem is loaded with the value received from the timeGetTime call in the WIN32 multimedia API." }, + { "TimeSystem2", + T_UINT, + offsetof(spy_message_object, msg.TimeSystem2), + 0, + "TimeSystem is loaded with the value received from the timeGetTime call in the WIN32 multimedia API." }, + { "TimeStampHardwareID", + T_UBYTE, + offsetof(spy_message_object, msg.TimeStampHardwareID), + 0, + "This is an identifier of what type of hardware timestamp is used. Since neoVI's timestamp is always the same, " + "this doesn't change." }, + { "TimeStampSystemID", + T_UBYTE, + offsetof(spy_message_object, msg.TimeStampSystemID), + 0, + "This is an identifier of what type of system timestamp is used. Since WIN32 neoVI's timestamp is always the " + "same, " + "from the timeGetTime API, this doesn't change." }, + { "NetworkID", + T_UBYTE, + offsetof(spy_message_object, msg.NetworkID), + 0, + "This value is used to identify which network this message was received on." }, + { "NodeID", T_UBYTE, offsetof(spy_message_object, msg.NodeID), 0, "Not Used" }, + { "Protocol", + T_UBYTE, + offsetof(spy_message_object, msg.Protocol), + 0, + "Valid values are SPY_PROTOCOL_CAN, SPY_PROTOCOL_J1850VPW, and SPY_PROTOCOL_ISO9141." }, + { "MessagePieceID", T_UBYTE, offsetof(spy_message_object, msg.MessagePieceID), 0, "Not Used" }, + { "ExtraDataPtrEnabled", T_UBYTE, offsetof(spy_message_object, msg.ExtraDataPtrEnabled), 0, "" }, + { "NumberBytesHeader", + T_UBYTE, + offsetof(spy_message_object, msg.NumberBytesHeader), + 0, + " Used for J1850/ISO messages. It indicates how many bytes are stored in the Header(1 to 4) array." }, + { "NumberBytesData", + T_UBYTE, + offsetof(spy_message_object, msg.NumberBytesData), + 0, + "Holds the number of bytes in the Data(1 to 8) array or the number of bytes in a CAN remote frame (The DLC)." }, + { "NetworkID2", + T_UBYTE, + offsetof(spy_message_object, msg.NetworkID2), + 0, + "This value is used to identify which network this message was received on." }, + { "DescriptionID", T_SHORT, offsetof(spy_message_object, msg.DescriptionID), 0, "Not Used" }, + { "ArbIDOrHeader", T_UINT, offsetof(spy_message_object, msg.ArbIDOrHeader), 0, "" }, + { "Data", T_OBJECT_EX, 0, 0, "" }, + { "StatusBitField3", T_UINT, offsetof(spy_message_object, msg.StatusBitField3), 0, "StatusBitField3" }, + { "StatusBitField4", T_UINT, offsetof(spy_message_object, msg.StatusBitField4), 0, "StatusBitField4" }, + { "AckBytes", T_OBJECT_EX, 0, 0, "" }, + { "ExtraDataPtr", T_OBJECT_EX, offsetof(spy_message_object, msg.ExtraDataPtr), 0, "" }, + { "MiscData", T_UBYTE, offsetof(spy_message_object, msg.MiscData), 0, "" }, + { "noExtraDataPtrCleanup", + T_BOOL, + offsetof(spy_message_object, noExtraDataPtrCleanup), + 0, + "Tells Python to not clean up ExtraDataPtrMemory, If this is enabled. Ignore, if unsure." }, + { NULL, 0, 0, 0, NULL }, +}; + +static PyMemberDef spy_message_j1850_object_members[] = { + { "StatusBitField", T_UINT, offsetof(spy_message_j1850_object, msg.StatusBitField), 0, "StatusBitField" }, + { "StatusBitField2", T_UINT, offsetof(spy_message_j1850_object, msg.StatusBitField2), 0, "StatusBitField2" }, + { "TimeHardware", + T_UINT, + offsetof(spy_message_j1850_object, msg.TimeHardware), + 0, + "Hardware time stamp. The TimeStamp is reset on device open" }, + { "TimeHardware2", + T_UINT, + offsetof(spy_message_j1850_object, msg.TimeHardware2), + 0, + "Hardware time stamp. The TimeStamp is reset on device open" }, + { "TimeSystem", + T_UINT, + offsetof(spy_message_j1850_object, msg.TimeSystem), + 0, + "TimeSystem is loaded with the value received from the timeGetTime call in the WIN32 multimedia API." }, + { "TimeSystem2", + T_UINT, + offsetof(spy_message_j1850_object, msg.TimeSystem2), + 0, + "TimeSystem is loaded with the value received from the timeGetTime call in the WIN32 multimedia API." }, + { "TimeStampHardwareID", + T_UBYTE, + offsetof(spy_message_j1850_object, msg.TimeStampHardwareID), + 0, + "This is an identifier of what type of hardware timestamp is used. Since neoVI's timestamp is always the same, " + "this doesn't change." }, + { "TimeStampSystemID", + T_UBYTE, + offsetof(spy_message_j1850_object, msg.TimeStampSystemID), + 0, + "This is an identifier of what type of system timestamp is used. Since WIN32 neoVI's timestamp is always the " + "same, " + "from the timeGetTime API, this doesn't change." }, + { "NetworkID", + T_UBYTE, + offsetof(spy_message_j1850_object, msg.NetworkID), + 0, + "This value is used to identify which network this message was received on." }, + { "NodeID", T_UBYTE, offsetof(spy_message_j1850_object, msg.NodeID), 0, "Not Used" }, + { "Protocol", + T_UBYTE, + offsetof(spy_message_j1850_object, msg.Protocol), + 0, + "Valid values are SPY_PROTOCOL_CAN, SPY_PROTOCOL_J1850VPW, and SPY_PROTOCOL_ISO9141." }, + { "MessagePieceID", T_UBYTE, offsetof(spy_message_j1850_object, msg.MessagePieceID), 0, "Not Used" }, + { "ExtraDataPtrEnabled", T_UBYTE, offsetof(spy_message_j1850_object, msg.ExtraDataPtrEnabled), 0, "" }, + { "NumberBytesHeader", + T_UBYTE, + offsetof(spy_message_j1850_object, msg.NumberBytesHeader), + 0, + " Used for J1850/ISO messages. It indicates how many bytes are stored in the Header(1 to 4) array." }, + { "NumberBytesData", + T_UBYTE, + offsetof(spy_message_j1850_object, msg.NumberBytesData), + 0, + "Holds the number of bytes in the Data(1 to 8) array or the number of bytes in a CAN remote frame (The DLC)." }, + { "NetworkID2", + T_UBYTE, + offsetof(spy_message_object, msg.NetworkID2), + 0, + "This value is used to identify which network this message was received on." }, + { "DescriptionID", T_SHORT, offsetof(spy_message_j1850_object, msg.DescriptionID), 0, "Not Used" }, + { "Header", T_OBJECT_EX, 0, 0, "" }, + { "Data", T_OBJECT_EX, 0, 0, "" }, + { "StatusBitField3", T_UINT, offsetof(spy_message_j1850_object, msg.StatusBitField3), 0, "StatusBitField3" }, + { "StatusBitField4", T_UINT, offsetof(spy_message_j1850_object, msg.StatusBitField4), 0, "StatusBitField4" }, + { "AckBytes", T_OBJECT_EX, 0, 0, "" }, + { "ExtraDataPtr", T_OBJECT_EX, offsetof(spy_message_j1850_object, msg.ExtraDataPtr), 0, "" }, + { "MiscData", T_UBYTE, offsetof(spy_message_j1850_object, msg.MiscData), 0, "" }, + { "noExtraDataPtrCleanup", + T_BOOL, + offsetof(spy_message_object, noExtraDataPtrCleanup), + 0, + "Tells Python to not clean up ExtraDataPtrMemory, If this is enabled. Ignore, if unsure." }, + { NULL, 0, 0, 0, NULL }, +}; + + PyTypeObject spy_message_object_type = { PyVarObject_HEAD_INIT(NULL, 0) MODULE_NAME "." SPY_MESSAGE_OBJECT_NAME, /* tp_name */ sizeof(spy_message_object), /* tp_basicsize */ diff --git a/src/setup_module_auto_defines.cpp b/src/setup_module_auto_defines.cpp index 4c6e42b44..3c67428d6 100644 --- a/src/setup_module_auto_defines.cpp +++ b/src/setup_module_auto_defines.cpp @@ -6,7 +6,9 @@ #include "setup_module_auto_defines.h" #include +#pragma warning(push, 0) #include "ics/icsnVC40.h" +#pragma warning(pop) int setup_module_auto_defines(PyObject * module) { @@ -137,6 +139,16 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddIntMacro(module, NETID_SPI4); result += PyModule_AddIntMacro(module, NETID_SPI5); result += PyModule_AddIntMacro(module, NETID_SPI6); + result += PyModule_AddIntMacro(module, NETID_SPI7); + result += PyModule_AddIntMacro(module, NETID_SPI8); + result += PyModule_AddIntMacro(module, NETID_LIN_09); + result += PyModule_AddIntMacro(module, NETID_LIN_10); + result += PyModule_AddIntMacro(module, NETID_LIN_11); + result += PyModule_AddIntMacro(module, NETID_LIN_12); + result += PyModule_AddIntMacro(module, NETID_LIN_13); + result += PyModule_AddIntMacro(module, NETID_LIN_14); + result += PyModule_AddIntMacro(module, NETID_LIN_15); + result += PyModule_AddIntMacro(module, NETID_LIN_16); result += PyModule_AddIntMacro(module, NETID_MAX); result += PyModule_AddIntMacro(module, NETID_INVALID); result += PyModule_AddIntMacro(module, NEODEVICE_UNKNOWN); @@ -175,8 +187,10 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddIntMacro(module, NEODEVICE_RADMOON3); result += PyModule_AddIntMacro(module, NEODEVICE_RADCOMET); result += PyModule_AddIntMacro(module, NEODEVICE_FIRE3_FLEXRAY); - result += PyModule_AddIntMacro(module, NEODEVICE_RED2_OEM); + result += PyModule_AddIntMacro(module, NEODEVICE_NEOVI_CONNECT); result += PyModule_AddIntMacro(module, NEODEVICE_RADCOMET3); + result += PyModule_AddIntMacro(module, NEODEVICE_RADMOONT1S); + result += PyModule_AddIntMacro(module, NEODEVICE_GIGASTAR2); result += PyModule_AddIntMacro(module, NEODEVICE_RED); result += PyModule_AddIntMacro(module, NEODEVICE_ECU); result += PyModule_AddIntMacro(module, NEODEVICE_IEVB); @@ -196,7 +210,7 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddIntMacro(module, NEODEVICE_VCAN42); result += PyModule_AddIntMacro(module, NEODEVICE_CMPROBE); result += PyModule_AddIntMacro(module, NEODEVICE_EEVB); - result += PyModule_AddIntMacro(module, NEODEVICE_VCANRF); + result += PyModule_AddIntMacro(module, NEODEVICE_DONT_REUSE4); result += PyModule_AddIntMacro(module, NEODEVICE_FIRE2); result += PyModule_AddIntMacro(module, NEODEVICE_FLEX); result += PyModule_AddIntMacro(module, NEODEVICE_RADGALAXY); @@ -539,7 +553,6 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddIntMacro(module, OP_ETH_GENERAL_SETTINGS_SIZE); result += PyModule_AddIntMacro(module, RAD_GPTP_SETTINGS_SIZE); result += PyModule_AddIntMacro(module, RAD_GPTP_AND_TAP_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, HW_ETH_SETTINGS_SIZE); // enum result += PyModule_AddIntMacro(module, OPETH_LINK_AUTO); result += PyModule_AddIntMacro(module, OPETH_LINK_MASTER); @@ -567,6 +580,10 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG2_IP_CONFIG_NOT_ALLOWED); result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG2_SFP_ID_SHIFT); result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG2_SFP_ID_MASK); + result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG2_CUT_THRU_TAP_ENABLE); + result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG2_SNF_TAP_ENABLE); + result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG2_DISABLE_TAP_TO_HOST); + result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG2_SHOW_TAP_TX_RECEIPT); // enum result += PyModule_AddIntMacro(module, SFP_ID_UNKNOWN); result += PyModule_AddIntMacro(module, SFP_ID_FINISAR_FCLF8522P2BTL); @@ -592,6 +609,11 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_PKT_CHECK); result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_PKT_GEN); result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_IP_CONFIG_NOT_ALLOWED); + result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_CUT_THRU_TAP_ENABLE); + result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_SNF_TAP_ENABLE); + result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_DISABLE_TAP_TO_HOST); + result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_MACSEC_ENABLE); + result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_SHOW_TAP_TX_RECEIPT); result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_COMM_IN_USE); result += PyModule_AddIntMacro(module, ETHERNET10G_SETTINGS_SIZE); result += PyModule_AddIntMacro(module, ETHERNET10T1S_SETTINGS_SIZE); @@ -600,7 +622,6 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddIntMacro(module, ETHERNET10T1S_SETTINGS_FLAG_BUS_DECODING_BEACONS); result += PyModule_AddIntMacro(module, ETHERNET10T1S_SETTINGS_FLAG_BUS_DECODING_ALL); result += PyModule_AddIntMacro(module, ETHERNET10T1S_SETTINGS_EXT_SIZE); - result += PyModule_AddIntMacro(module, ETHERNET10T1S_SETTINGS_EXT_FLAG_ENABLE_MULTI_ID); // enum result += PyModule_AddIntMacro(module, MACSEC_PACKET_NO_VLAN_OR_MPLS); result += PyModule_AddIntMacro(module, MACSEC_PACKET_SINGLE_VLAN); @@ -873,7 +894,6 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddIntMacro(module, SCyanSettings_SIZE); result += PyModule_AddIntMacro(module, SVCAN3Settings_SIZE); result += PyModule_AddIntMacro(module, SVCAN4Settings_SIZE); - result += PyModule_AddIntMacro(module, SVCANRFSettings_SIZE); result += PyModule_AddIntMacro(module, SECUSettings_SIZE); result += PyModule_AddIntMacro(module, SPendantSettings_SIZE); result += PyModule_AddIntMacro(module, SIEVBSettings_SIZE); @@ -1022,6 +1042,9 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddIntMacro(module, SRADBMSSettings_SIZE); result += PyModule_AddIntMacro(module, SRADCometSettings_SIZE); result += PyModule_AddIntMacro(module, SRADComet3Settings_SIZE); + result += PyModule_AddIntMacro(module, SRADGigastar2Settings_SIZE); + result += PyModule_AddIntMacro(module, SRADMoonT1SSettings_SIZE); + result += PyModule_AddIntMacro(module, SNeoVIConnectSettings_SIZE); result += PyModule_AddIntMacro(module, GS_VERSION); result += PyModule_AddIntMacro(module, GLOBAL_SETTINGS_SIZE); result += PyModule_AddIntMacro(module, NEOVI_3G_MAX_SETTINGS_SIZE); @@ -1040,7 +1063,7 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddIntMacro(module, DeviceRADMoon2SettingsType); result += PyModule_AddIntMacro(module, DeviceRADPlutoSettingsType); result += PyModule_AddIntMacro(module, DeviceRADGigalogSettingsType); - result += PyModule_AddIntMacro(module, DeviceVCANRFSettingsType); + result += PyModule_AddIntMacro(module, DeviceDeprecatedType); result += PyModule_AddIntMacro(module, DeviceEEVBSettingsType); result += PyModule_AddIntMacro(module, DeviceVCAN4IndSettingsType); result += PyModule_AddIntMacro(module, DeviceNeoECU12SettingsType); @@ -1065,9 +1088,11 @@ int setup_module_auto_defines(PyObject * module) result += PyModule_AddIntMacro(module, DeviceFire3SettingsType); result += PyModule_AddIntMacro(module, DeviceFire3FlexraySettingsType); result += PyModule_AddIntMacro(module, DeviceRADCometSettingsType); - result += PyModule_AddIntMacro(module, DeviceRed2OemSettingsType); + result += PyModule_AddIntMacro(module, DeviceNeoVIConnectSettingsType); result += PyModule_AddIntMacro(module, DeviceRADComet3SettingsType); result += PyModule_AddIntMacro(module, DeviceRADGalaxy2SettingsType); + result += PyModule_AddIntMacro(module, DeviceRADGigastar2SettingsType); + result += PyModule_AddIntMacro(module, DeviceRADMoonT1SSettingsType); result += PyModule_AddIntMacro(module, DeviceSettingsTypeMax); result += PyModule_AddIntMacro(module, DeviceSettingsNone); // end of enum - } EDeviceSettingsType;