diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9437fb748..4a585c0f4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,32 +1,54 @@ -name: Run Unit Tests +name: Test + on: push: - branches: - -'arm/**' + branches: [ master ] pull_request: - branches: - -'arm/**' jobs: - test_arm64: - if: github.repository == 'intrepidcs/python_ics' - name: Linux ARM64 unit tests - runs-on: [ self-hosted, Linux, ARM64, Hardware ] - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - fetch-depth: 0 # needed for history/tags + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ["3.10", "3.11", "3.12", "3.13"] - - name: Setup Python - run: | - python -m venv .venv - source .venv/bin/activate - python -m pip install --upgrade pip - pip install . - - - name: Run unit tests - run: | - source .venv/bin/activate - sudo setcap cap_net_admin,cap_net_raw+ep $(realpath $(which python)) - python -m unittest discover -s tests.runner --verbose \ No newline at end of file + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: recursive + + # Install system dependencies + - name: Install system dependencies (Ubuntu) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y cmake clang clang-format clang-tools flex bison build-essential + + - name: Install system dependencies (macOS) + if: runner.os == 'macOS' + run: | + brew install cmake clang-format + + - name: Install system dependencies (Windows) + if: runner.os == 'Windows' + run: | + choco install llvm cmake + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install uv + uses: astral-sh/setup-uv@v3 + + - name: Install dependencies + run: | + uv sync --group test + + - name: Run tests + run: | + uv run pytest tests/ --verbose \ No newline at end of file diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 848562c0d..a8c5cea26 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.22.0 + run: python -m pip install cibuildwheel - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..94d4d895e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,14 @@ +{ + "python.analysis.autoImportCompletions": false, + "python.analysis.indexing": false, + "python.analysis.packageIndexDepths": [ + { + "name": "ics", + "depth": 0 + } + ], + "python.analysis.exclude": [ + "**/gen/**", + "**/.venv/**" + ] +} \ No newline at end of file diff --git a/cicsSpyStatusBits_processed.h b/cicsSpyStatusBits_processed.h new file mode 100644 index 000000000..b2f3b37c9 --- /dev/null +++ b/cicsSpyStatusBits_processed.h @@ -0,0 +1,243 @@ +// -------------------------------------------------------------------------- +// COPYRIGHT INTREPID CONTROL SYSTEMS, INC. (c) 1994-20xx +// Confidential and proprietary. This document and its contents are the +// property of Intrepid Control Systems, Inc. It is not to be copied, +// distributed, or otherwise disclosed or used without the prior written +// consent of Intrepid Control Systems Inc. +// All rights reserved. +// -------------------------------------------------------------------------- + +// SPY Status Bit Definitions +// Generated automatically - DO NOT MODIFY +// Modify cicsSpyStatusBits_config.yml and run cicsSpyStatusBits_gen.py +// Generated on: 2025-07-14 14:31:40 + +#ifndef CICSSPYSTATUSBITS_H_ +#define CICSSPYSTATUSBITS_H_ 1 + +// WARNING: The following bit conflicts were detected: +// spystatus value 0x10000000: // VSI value 'SPY_STATUS_VSI_IFR_CRC_BIT' conflicts with common value 'SPY_STATUS_PDU' +// spystatus value 0x10000000: // A2B value 'SPY_STATUS_A2B_CONTROL' conflicts with common value 'SPY_STATUS_PDU' +// spystatus value 0x08: // A2B value 'SPY_STATUS_A2B_SCF_VALID_WAITING' conflicts with common value 'SPY_STATUS_REMOTE_FRAME' +// spystatus value 0x40000000: // A2B value 'SPY_STATUS_A2B_UPSTREAM' conflicts with common value 'SPY_STATUS_HIGH_SPEED' +// spystatus value 0x10000000: // FLEXRAY value 'SPY_STATUS_FLEXRAY_PDU' conflicts with common value 'SPY_STATUS_PDU' +// spystatus value 0x40000000: // FLEXRAY value 'SPY_STATUS_FLEXRAY_PDU_UPDATE_BIT_SET' conflicts with common value 'SPY_STATUS_HIGH_SPEED' +// spystatus value 0x08: // FLEXRAY value 'SPY_STATUS_FLEXRAY_PDU_NO_UPDATE_BIT' conflicts with common value 'SPY_STATUS_REMOTE_FRAME' + +// Glyph definitions +// '|' - byte divider +// '.' - nibble divider +// '-' - unused bit +// 'o' - common bit +// 'x' - protocol specific bit +// '!' - conflict bit + +// SPYSTATUS bit definitions +// SPYSTATUS - Common bits +// |oo-o.oooo|oooo.oooo|oooo.oo-o|oo-o.oooo| +#define SPY_STATUS_GLOBAL_ERR 0x01 // Global error flag +#define SPY_STATUS_TX_MSG 0x02 // Transmitted message +#define SPY_STATUS_XTD_FRAME 0x04 // Extended frame +#define SPY_STATUS_REMOTE_FRAME 0x08 // Remote frame +#define SPY_STATUS_CRC_ERROR 0x10 // CRC error +#define SPY_STATUS_INCOMPLETE_FRAME 0x40 // Incomplete frame +#define SPY_STATUS_LOST_ARBITRATION 0x80 // Lost arbitration +#define SPY_STATUS_UNDEFINED_ERROR 0x0100 // Undefined error +#define SPY_STATUS_BUS_RECOVERED 0x0400 // Bus recovered +#define SPY_STATUS_BUS_SHORTED_PLUS 0x0800 // Bus shorted to plus +#define SPY_STATUS_BUS_SHORTED_GND 0x1000 // Bus shorted to ground +#define SPY_STATUS_CHECKSUM_ERROR 0x2000 // Checksum error +#define SPY_STATUS_BAD_MESSAGE_BIT_TIME_ERROR 0x4000 // Bad message bit time error +#define SPY_STATUS_TX_NOMATCH 0x8000 // TX no match +#define SPY_STATUS_COMM_IN_OVERFLOW 0x010000 // Communication input overflow +#define SPY_STATUS_EXPECTED_LEN_MISMATCH 0x020000 // Expected length mismatch +#define SPY_STATUS_MSG_NO_MATCH 0x040000 // Message no match +#define SPY_STATUS_BREAK 0x080000 // Break detected +#define SPY_STATUS_AVSI_REC_OVERFLOW 0x100000 // AVSI record overflow +#define SPY_STATUS_TEST_TRIGGER 0x200000 // Test trigger +#define SPY_STATUS_AUDIO_COMMENT 0x400000 // Audio comment +#define SPY_STATUS_GPS_DATA 0x800000 // GPS data +#define SPY_STATUS_ANALOG_DIGITAL_INPUT 0x01000000 // Analog digital input +#define SPY_STATUS_TEXT_COMMENT 0x02000000 // Text comment +#define SPY_STATUS_NETWORK_MESSAGE_TYPE 0x04000000 // Network message type +#define SPY_STATUS_VSI_TX_UNDERRUN 0x08000000 // VSI TX underrun +#define SPY_STATUS_PDU 0x10000000 // PDU message +#define SPY_STATUS_HIGH_SPEED 0x40000000 // High speed +#define SPY_STATUS_EXTENDED 0x80000000 // Extended - if this bit is set than decode StatusBitField3 in AckBytes + +// SPYSTATUS - A2B protocol bits +// |o!x!.oooo|oooo.oooo|oooo.oo-o|oo-o.!ooo| +#define SPY_STATUS_A2B_SCF_VALID_WAITING 0x08 // A2B SCF valid waiting +#define SPY_STATUS_A2B_CONTROL 0x10000000 // A2B control message +#define SPY_STATUS_A2B_MONITOR 0x20000000 // A2B monitor message +#define SPY_STATUS_A2B_UPSTREAM 0x40000000 // A2B upstream message + +// SPYSTATUS - CAN protocol bits +// |ooxo.oooo|oooo.oooo|oooo.ooxo|ooxo.oooo| +#define SPY_STATUS_CAN_ERROR_PASSIVE 0x20 // CAN error passive state +#define SPY_STATUS_CAN_BUS_OFF 0x0200 // CAN bus off state +#define SPY_STATUS_CANFD 0x20000000 // CAN FD frame + +// SPYSTATUS - ETHERNET protocol bits +// |oo-o.oooo|oooo.oooo|oooo.oo-o|ooxo.oooo| +#define SPY_STATUS_HEADERCRC_ERROR 0x20 // Header CRC error + +// SPYSTATUS - FLEXRAY protocol bits +// |o!-!.oooo|oooo.oooo|oooo.oo-o|oo-o.!ooo| +#define SPY_STATUS_FLEXRAY_PDU_NO_UPDATE_BIT 0x08 // FlexRay PDU no update bit +#define SPY_STATUS_FLEXRAY_PDU 0x10000000 // FlexRay PDU (alias for SPY_STATUS_PDU) +#define SPY_STATUS_FLEXRAY_PDU_UPDATE_BIT_SET 0x40000000 // FlexRay PDU update bit set + +// SPYSTATUS - LIN protocol bits +// |ooxo.oooo|oooo.oooo|oooo.oo-o|oo-o.oooo| +#define SPY_STATUS_LIN_MASTER 0x20000000 // LIN master message + +// SPYSTATUS - VSI protocol bits +// |oox!.oooo|oooo.oooo|oooo.oo-o|oo-o.oooo| +#define SPY_STATUS_VSI_IFR_CRC_BIT 0x10000000 // VSI IFR CRC bit +#define SPY_STATUS_INIT_MESSAGE 0x20000000 // Initialization message + +// SPYSTATUS2 bit definitions +// SPYSTATUS2 - Common bits +// |----.----|---o.--oo|----.----|----.oooo| +#define SPY_STATUS2_HAS_VALUE 0x01 +#define SPY_STATUS2_VALUE_IS_BOOLEAN 0x02 +#define SPY_STATUS2_HIGH_VOLTAGE 0x04 +#define SPY_STATUS2_LONG_MESSAGE 0x08 +#define SPY_STATUS2_GLOBAL_CHANGE 0x010000 +#define SPY_STATUS2_ERROR_FRAME 0x020000 +#define SPY_STATUS2_END_OF_LONG_MESSAGE 0x100000 + +// SPYSTATUS2 - CAN protocol bits +// |----.----|-xxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_CAN_ISO15765_LOGICAL_FRAME 0x200000 +#define SPY_STATUS2_CAN_HAVE_LINK_DATA 0x400000 + +// SPYSTATUS2 - ETHERNET protocol bits +// |xxxx.xxxx|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_ETHERNET_CRC_ERROR 0x200000 +#define SPY_STATUS2_ETHERNET_FRAME_TOO_SHORT 0x400000 +#define SPY_STATUS2_ETHERNET_FCS_AVAILABLE 0x800000 // This frame contains FCS (4 bytes) obtained from ICS Ethernet hardware (ex. RAD-STAR) +#define SPY_STATUS2_ETHERNET_NO_PADDING 0x01000000 +#define SPY_STATUS2_ETHERNET_PREEMPTION_ENABLED 0x02000000 +#define SPY_STATUS2_ETHERNET_UPDATE_CHECKSUMS 0x04000000 +#define SPY_STATUS2_ETHERNET_MANUALFCS_ENABLED 0x08000000 +#define SPY_STATUS2_ETHERNET_FCS_VERIFIED 0x10000000 +#define SPY_STATUS2_ETHERNET_T1S_SYMBOL 0x20000000 +#define SPY_STATUS2_ETHERNET_T1S_BURST 0x40000000 +#define SPY_STATUS2_ETHERNET_T1S_ETHERNET 0x80000000 + +// SPYSTATUS2 - FLEXRAY protocol bits +// |----.-xxx|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_FLEXRAY_TX_AB 0x200000 +#define SPY_STATUS2_FLEXRAY_TX_AB_NO_A 0x400000 +#define SPY_STATUS2_FLEXRAY_TX_AB_NO_B 0x800000 +#define SPY_STATUS2_FLEXRAY_TX_AB_NO_MATCH 0x01000000 +#define SPY_STATUS2_FLEXRAY_NO_CRC 0x02000000 +#define SPY_STATUS2_FLEXRAY_NO_HEADERCRC 0x04000000 // + +// SPYSTATUS2 - I2C protocol bits +// |----.----|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_I2C_ERR_TIMEOUT 0x200000 +#define SPY_STATUS2_I2C_ERR_NACK 0x400000 +#define SPY_STATUS2_I2C_DIR_READ 0x800000 + +// SPYSTATUS2 - ISO protocol bits +// |-xxx.x---|---o.--oo|----.----|----.oooo| +#define SPY_STATUS2_ISO_FRAME_ERROR 0x08000000 // ISO frame error +#define SPY_STATUS2_ISO_OVERFLOW_ERROR 0x10000000 // ISO overflow error +#define SPY_STATUS2_ISO_PARITY_ERROR 0x20000000 // ISO parity error +#define SPY_STATUS2_ISO_RX_TIMEOUT_ERROR 0x40000000 // ISO specific timeout error + +// SPYSTATUS2 - LIN protocol bits +// |xxxx.xxxx|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_LIN_ERR_RX_BREAK_NOT_0 0x200000 // LIN RX break not 0 error +#define SPY_STATUS2_LIN_ERR_RX_BREAK_TOO_SHORT 0x400000 // LIN RX break too short error +#define SPY_STATUS2_LIN_ERR_RX_SYNC_NOT_55 0x800000 // LIN RX sync not 0x55 error +#define SPY_STATUS2_LIN_ERR_RX_DATA_GREATER_8 0x01000000 // LIN RX data greater than 8 bytes error +#define SPY_STATUS2_LIN_ERR_TX_RX_MISMATCH 0x02000000 // LIN TX/RX mismatch error +#define SPY_STATUS2_LIN_ERR_MSG_ID_PARITY 0x04000000 // LIN message ID parity error +#define SPY_STATUS2_LIN_SYNC_FRAME_ERROR 0x08000000 // LIN sync frame error +#define SPY_STATUS2_LIN_ID_FRAME_ERROR 0x10000000 // LIN ID frame error +#define SPY_STATUS2_LIN_SLAVE_BYTE_ERROR 0x20000000 // LIN slave byte error +#define SPY_STATUS2_LIN_RX_TIMEOUT_ERROR 0x40000000 // RX timeout error +#define SPY_STATUS2_LIN_NO_SLAVE_DATA 0x80000000 // LIN no slave data + +// SPYSTATUS2 - MDIO protocol bits +// |-xxx.xxxx|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_MDIO_ERR_TIMEOUT 0x200000 +#define SPY_STATUS2_MDIO_JOB_CANCELLED 0x400000 +#define SPY_STATUS2_MDIO_INVALID_BUS 0x800000 +#define SPY_STATUS2_MDIO_INVALID_PHYADDR 0x01000000 +#define SPY_STATUS2_MDIO_INVALID_REGADDR 0x02000000 +#define SPY_STATUS2_MDIO_UNSUPPORTED_CLAUSE 0x04000000 +#define SPY_STATUS2_MDIO_UNSUPPORTED_OPCODE 0x08000000 +#define SPY_STATUS2_MDIO_OVERFLOW 0x10000000 +#define SPY_STATUS2_MDIO_CLAUSE45 0x20000000 +#define SPY_STATUS2_MDIO_READ 0x40000000 + +// SPYSTATUS2 - MOST protocol bits +// |xxxx.xxxx|xxxo.--oo|----.----|----.oooo| +#define SPY_STATUS2_MOST_PACKET_DATA 0x200000 +#define SPY_STATUS2_MOST_STATUS 0x400000 // reflects changes in light/lock/MPR/SBC/etc... +#define SPY_STATUS2_MOST_LOW_LEVEL 0x800000 // MOST low level message, allocs, deallocs, remote requests...*/ +#define SPY_STATUS2_MOST_CONTROL_DATA 0x01000000 +#define SPY_STATUS2_MOST_MHP_USER_DATA 0x02000000 // MOST HIGH User Data Frame +#define SPY_STATUS2_MOST_MHP_CONTROL_DATA 0x04000000 // MOST HIGH Control Data +#define SPY_STATUS2_MOST_I2S_DUMP 0x08000000 +#define SPY_STATUS2_MOST_TOO_SHORT 0x10000000 +#define SPY_STATUS2_MOST_MOST50 0x20000000 // absence of MOST50 and MOST150 implies it's MOST25 +#define SPY_STATUS2_MOST_MOST150 0x40000000 +#define SPY_STATUS2_MOST_CHANGED_PAR 0x80000000 // first byte in ack reflects what changed. + +// SPYSTATUS2 - WBMS protocol bits +// |----.----|--xo.--oo|----.----|----.oooo| +#define SPY_STATUS2_WBMS_API_IS_CALLBACK 0x200000 + +// SPYSTATUS3 bit definitions +// SPYSTATUS3 - CAN protocol bits +// |----.----|-xxx.xxxx|-xxx.xxxx|----.-xxx| +#define SPY_STATUS3_CAN_ERR_PASSIVE 0x01 // CAN error passive state: typically when error counter is > 127 +#define SPY_STATUS3_CAN_BUS_OFF 0x02 // CAN bus off state +#define SPY_STATUS3_CAN_ERR_WARNING 0x04 // CAN error warning: typically when error counter is > 96 +#define SPY_STATUS3_CAN_DATAERR_STUFF_ERROR 0x0100 // CAN stuff error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_FORM_ERROR 0x0200 // CAN form error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_ACK_ERROR 0x0400 // CAN ack error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_BIT1_ERROR 0x0800 // CAN bit1 error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_BIT0_ERROR 0x1000 // CAN bit0 error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_CRC_ERROR 0x2000 // CAN CRC error during the data payload phase +#define SPY_STATUS3_CAN_DATAERR_NOCHANGE 0x4000 // CAN data error occurred before and no change yet +#define SPY_STATUS3_CAN_GENERR_STUFF_ERROR 0x010000 // CAN stuff error at the general frame level +#define SPY_STATUS3_CAN_GENERR_FORM_ERROR 0x020000 // CAN form error at the general frame level +#define SPY_STATUS3_CAN_GENERR_ACK_ERROR 0x040000 // CAN ack error at the general frame level +#define SPY_STATUS3_CAN_GENERR_BIT1_ERROR 0x080000 // CAN bit1 error at the general frame level +#define SPY_STATUS3_CAN_GENERR_BIT0_ERROR 0x100000 // CAN bit0 error at the general frame level +#define SPY_STATUS3_CAN_GENERR_CRC_ERROR 0x200000 // CAN CRC error at the general frame level +#define SPY_STATUS3_CAN_GENERR_NOCHANGE 0x400000 // CAN frame Error occurred before and no change yet + +// SPYSTATUS3 - CANFD protocol bits +// |----.----|----.----|----.----|---x.xxxx| +#define SPY_STATUS3_CANFD_ESI 0x01 // CAN FD Error State Indicator (ESI) reflects the error state of the transmitting node +#define SPY_STATUS3_CANFD_IDE 0x02 // CAN FD Identifier Extension (IDE) indicates if standard or extended IDs are in use +#define SPY_STATUS3_CANFD_RTR 0x04 +#define SPY_STATUS3_CANFD_FDF 0x08 // CAN FD Format (FDF) flag -- distinguishes classic CAN from CANFD +#define SPY_STATUS3_CANFD_BRS 0x10 // CANFD Baud Rate Select (BRS) flag, indicates if the data portion transmits at a higher bitrate + +// SPYSTATUS3 - ETHERNET protocol bits +// |----.----|----.----|----.----|----.--xx| +#define SPY_STATUS3_ETHERNET_TX_COLLISION 0x01 +#define SPY_STATUS3_ETHERNET_T1S_WAKE 0x02 + +// SPYSTATUS3 - LIN protocol bits +// |----.----|----.----|----.----|----.-xxx| +#define SPY_STATUS3_LIN_JUST_BREAK_SYNC 0x01 +#define SPY_STATUS3_LIN_SLAVE_DATA_TOO_SHORT 0x02 +#define SPY_STATUS3_LIN_ONLY_UPDATE_SLAVE_TABLE_ONCE 0x04 + +// SPYSTATUS4 bit definitions +// SPYSTATUS4 - ETHERNET protocol bits +// |----.----|----.----|----.----|----.--xx| +#define SPY_STATUS4_ETH_CRC_ERROR 0x01 // Ethernet CRC error +#define SPY_STATUS4_ETH_FRAME_TOO_LONG 0x02 // Ethernet frame too long + +#endif // CICSSPYSTATUSBITS_H_ diff --git a/doc/requirements.txt b/doc/requirements.txt index c52969dba..a10b57ea8 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,4 +1,5 @@ cython>=0.20 m2r2 docutils>=0.18.1,<0.21 -furo \ No newline at end of file +furo +dunamai \ No newline at end of file diff --git a/doc/source/conf.py b/doc/source/conf.py index 1ba003306..5170346de 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -56,10 +56,27 @@ # |version| and |release|, also used in various other places throughout the # built documents. # -# The short X.Y version. -version = "918.14" -# The full version, including alpha/beta/rc tags. -release = version +# Get version dynamically from the same source as pyproject.toml +try: + # First, try to import from the generated ics module (same as pyproject.toml) + sys.path.insert(0, os.path.abspath("../../gen")) + import ics + version = ics.__version__ + release = ics.__full_version__ +except ImportError: + try: + # Fallback: try dunamai directly (for build environments) + import dunamai + version = dunamai.Version.from_git().serialize(metadata=False) + release = dunamai.Version.from_git().serialize(format="v{base}-{commit}-{timestamp}") + except ImportError: + # Fallback if neither is available + version = "unknown" + release = version + except Exception: + # Fallback if not in a git repository or other issues + version = "unknown" + release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/extract_icsneo40_defines.py b/extract_icsneo40_defines.py index c5b725567..868c16885 100644 --- a/extract_icsneo40_defines.py +++ b/extract_icsneo40_defines.py @@ -134,7 +134,8 @@ def extract(): sline[0] = sline[0].split(",")[0] # This removes anything after the equal sign as we don't need it sline[0] = sline[0].split("=")[0] - print("\tresult += PyModule_AddIntMacro(module, %s);" % sline[0].replace(",", ""), file=f) + value = sline[0].replace(",", "") + print(f"\tresult += PyModule_AddObjectRef(module, \"{value}\", PyLong_FromLongLong({value}));", file=f) continue if "#define" in line: sline = line.split("//")[0].split() @@ -144,21 +145,36 @@ def extract(): if len(sline) >= 3 and re.match(r"^\d+?\.\d+?$", sline[2]) is not None: # Value is a float print( - '\tresult += PyModule_AddObject(module, "{0}", PyFloat_FromDouble({0}));'.format( + '\tresult += PyModule_AddObjectRef(module, "{0}", PyFloat_FromDouble({0}));'.format( sline[1] ), file=f, ) + elif len(sline) >= 3 and re.match(r"^\d+$", sline[2]) is not None: + # We should be an integer at this point + try: + if int(sline[2]) < 0: + # Integer Value is negative + print(f"\tresult += PyModule_AddObjectRef(module, \"{sline[1]}\", PyLong_FromLongLong({sline[1]}));", file=f) + else: + # Integer Value is positive + print(f"\tresult += PyModule_AddObjectRef(module, \"{sline[1]}\", PyLong_FromUnsignedLongLong({sline[1]}));", file=f) + except ValueError: + # Not an integer, probably another define + # This comes here: #define SPY_STATUS2_RX_TIMEOUT_ERROR SPY_STATUS2_ISO_RX_TIMEOUT_ERROR + print(f"ERROR: {sline[1]} {sline[2]}") + print(f"\tresult += PyModule_AddObjectRef(module, \"{sline[1]}\", PyLong_FromLongLong({sline[1]}));", file=f) + elif len(sline) == 2: # There is no value, this is used for preprocessor only # and really shouldn't care about it in python. Going to set it as 0 "just in case" print( - '\tresult += PyModule_AddObject(module, "{}", PyLong_FromLong(0));'.format(sline[1]), + '\tresult += PyModule_AddObjectRef(module, "{}", PyLong_FromLong(0));'.format(sline[1]), file=f, ) else: - print("\tresult += PyModule_AddIntMacro(module, %s);" % sline[1], file=f) - + print(f"\tresult += PyModule_AddObjectRef(module, \"{sline[1]}\", PyLong_FromLongLong({sline[1]}));", file=f) + elif "/*" in line: inside_comment = True continue @@ -172,7 +188,7 @@ def extract(): # Remove =X assignments if present. sline = [x.split("=")[0] for x in sline] for e in sline: - print("\tresult += PyModule_AddIntMacro(module, %s);" % e, file=f) + print(f"\tresult += PyModule_AddObjectRef(module, \"{e}\", PyLong_FromLongLong({e}));", file=f) inside_enum = False continue if "icsnVC40Internal" in header_file: diff --git a/pyproject.toml b/pyproject.toml index 7013cf0ba..4a3015ed2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ maintainers = [{ name = "David Rebbe", email = "drebbe@intrepidcs.com" }] description = "Python wrapper for interfacing to IntrepidCS Hardware." keywords = ["intrepidcs", "CAN", "Ethernet", "Automotive", "ICS"] readme = { file = "README.md", content-type = "text/markdown" } -requires-python = ">=3.9" +requires-python = ">=3.10" license = { file = "LICENSE.md" } classifiers = [ "Development Status :: 5 - Production/Stable", @@ -15,11 +15,11 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] [project.urls] @@ -28,6 +28,11 @@ Documentation = "http://python-ics.readthedocs.io/" Repository = "https://github.com/intrepidcs/python_ics/" Issues = "https://github.com/intrepidcs/python_ics/issues" +[dependency-groups] +test = [ + "pytest>=8.4.2", +] + [tool.setuptools.dynamic] version = { attr = "ics.__version__" } @@ -36,17 +41,17 @@ requires = [ "setuptools", "wheel", "dunamai", + "pytest>=8.4.2", ] [tool.cibuildwheel] -build = "{*-win32,*-win_amd64,*-macosx_universal2,*-manylinux_x86_64,*-manylinux_aarch64}" -skip = "cp36-* cp37-* pp* *-manylinux_i686 *-musllinux_*" +build = "cp{310,311,312,313,314}-{win32,win_amd64,macosx_universal2,manylinux_x86_64,manylinux_aarch64}" +skip = "cp36-* cp37-* cp38-* cp39-* pp* *-manylinux_i686 *-musllinux_*" environment = { CIBW_BUILD_VERBOSITY = 1, DISTUTILS_DEBUG = 1, MACOSX_DEPLOYMENT_TARGET = "10.13", CIBW_ARCHS_LINUX = "auto aarch64" } before-build = "python -m pip install wheel" manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64" manylinux-aarch64-image = "quay.io/pypa/manylinux_2_28_aarch64" -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 3ffd697f4..105e93ae8 100644 --- a/setup.py +++ b/setup.py @@ -100,7 +100,8 @@ def get_ics_extension_compiler_arguments() -> List[str]: compile_args = GCC_COMPILE_ARGS elif "DARWIN" in platform.system().upper(): # Mac doesn't respect the compiler args, but will append with ARCHFLAGS environment variable - os.environ["ARCHFLAGS"] += " -std=c++17" + archflags = os.environ.get("ARCHFLAGS", "") + os.environ["ARCHFLAGS"] = archflags + " -std=c++17" compile_args = [] else: compile_args = [] diff --git a/src/setup_module_auto_defines.cpp b/src/setup_module_auto_defines.cpp index dadeee75e..0a390264b 100644 --- a/src/setup_module_auto_defines.cpp +++ b/src/setup_module_auto_defines.cpp @@ -14,1262 +14,1271 @@ int setup_module_auto_defines(PyObject * module) { int result = 0; - result += PyModule_AddIntMacro(module, NEOVI_COMMTYPE_RS232); - result += PyModule_AddIntMacro(module, NEOVI_COMMTYPE_USB_BULK); - result += PyModule_AddIntMacro(module, NEOVI_COMMTYPE_TCPIP); - result += PyModule_AddIntMacro(module, NEOVI_COMMTYPE_FIRE_USB); - result += PyModule_AddIntMacro(module, NETID_DEVICE); - result += PyModule_AddIntMacro(module, NETID_HSCAN); - result += PyModule_AddIntMacro(module, NETID_MSCAN); - result += PyModule_AddIntMacro(module, NETID_SWCAN); - result += PyModule_AddIntMacro(module, NETID_LSFTCAN); - result += PyModule_AddIntMacro(module, NETID_FORDSCP); - result += PyModule_AddIntMacro(module, NETID_J1708); - result += PyModule_AddIntMacro(module, NETID_AUX); - result += PyModule_AddIntMacro(module, NETID_JVPW); - result += PyModule_AddIntMacro(module, NETID_ISO); - result += PyModule_AddIntMacro(module, NETID_ISOPIC); - result += PyModule_AddIntMacro(module, NETID_MAIN51); - result += PyModule_AddIntMacro(module, NETID_RED); - result += PyModule_AddIntMacro(module, NETID_SCI); - result += PyModule_AddIntMacro(module, NETID_ISO2); - result += PyModule_AddIntMacro(module, NETID_ISO14230); - result += PyModule_AddIntMacro(module, NETID_LIN); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET1); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET2); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET3); - result += PyModule_AddIntMacro(module, NETID_ISO3); - result += PyModule_AddIntMacro(module, NETID_HSCAN2); - result += PyModule_AddIntMacro(module, NETID_HSCAN3); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET4); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET5); - result += PyModule_AddIntMacro(module, NETID_ISO4); - result += PyModule_AddIntMacro(module, NETID_LIN2); - result += PyModule_AddIntMacro(module, NETID_LIN3); - result += PyModule_AddIntMacro(module, NETID_LIN4); - result += PyModule_AddIntMacro(module, NETID_MOST); - result += PyModule_AddIntMacro(module, NETID_RED_APP_ERROR); - result += PyModule_AddIntMacro(module, NETID_CGI); - result += PyModule_AddIntMacro(module, NETID_3G_RESET_STATUS); - result += PyModule_AddIntMacro(module, NETID_3G_FB_STATUS); - result += PyModule_AddIntMacro(module, NETID_3G_APP_SIGNAL_STATUS); - result += PyModule_AddIntMacro(module, NETID_3G_READ_DATALINK_CM_TX_MSG); - result += PyModule_AddIntMacro(module, NETID_3G_READ_DATALINK_CM_RX_MSG); - result += PyModule_AddIntMacro(module, NETID_3G_LOGGING_OVERFLOW); - result += PyModule_AddIntMacro(module, NETID_3G_READ_SETTINGS_EX); - result += PyModule_AddIntMacro(module, NETID_HSCAN4); - result += PyModule_AddIntMacro(module, NETID_HSCAN5); - result += PyModule_AddIntMacro(module, NETID_RS232); - result += PyModule_AddIntMacro(module, NETID_UART); - result += PyModule_AddIntMacro(module, NETID_UART2); - result += PyModule_AddIntMacro(module, NETID_UART3); - result += PyModule_AddIntMacro(module, NETID_UART4); - result += PyModule_AddIntMacro(module, NETID_SWCAN2); - result += PyModule_AddIntMacro(module, NETID_ETHERNET_DAQ); - result += PyModule_AddIntMacro(module, NETID_DATA_TO_HOST); - result += PyModule_AddIntMacro(module, NETID_TEXTAPI_TO_HOST); - result += PyModule_AddIntMacro(module, NETID_SPI1); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET6); - result += PyModule_AddIntMacro(module, NETID_RED_VBAT); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET7); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET8); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET9); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET10); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET11); - result += PyModule_AddIntMacro(module, NETID_FLEXRAY1A); - result += PyModule_AddIntMacro(module, NETID_FLEXRAY1B); - result += PyModule_AddIntMacro(module, NETID_FLEXRAY2A); - result += PyModule_AddIntMacro(module, NETID_FLEXRAY2B); - result += PyModule_AddIntMacro(module, NETID_LIN5); - result += PyModule_AddIntMacro(module, NETID_FLEXRAY); - result += PyModule_AddIntMacro(module, NETID_FLEXRAY2); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET12); - result += PyModule_AddIntMacro(module, NETID_I2C1); - result += PyModule_AddIntMacro(module, NETID_MOST25); - result += PyModule_AddIntMacro(module, NETID_MOST50); - result += PyModule_AddIntMacro(module, NETID_MOST150); - result += PyModule_AddIntMacro(module, NETID_ETHERNET); - result += PyModule_AddIntMacro(module, NETID_GMFSA); - result += PyModule_AddIntMacro(module, NETID_TCP); - result += PyModule_AddIntMacro(module, NETID_HSCAN6); - result += PyModule_AddIntMacro(module, NETID_HSCAN7); - result += PyModule_AddIntMacro(module, NETID_LIN6); - result += PyModule_AddIntMacro(module, NETID_LSFTCAN2); - result += PyModule_AddIntMacro(module, NETID_HW_COM_LATENCY_TEST); - result += PyModule_AddIntMacro(module, NETID_DEVICE_STATUS); - result += PyModule_AddIntMacro(module, NETID_UDP); - result += PyModule_AddIntMacro(module, NETID_AUTOSAR); - result += PyModule_AddIntMacro(module, NETID_FORWARDED_MESSAGE); - result += PyModule_AddIntMacro(module, NETID_I2C2); - result += PyModule_AddIntMacro(module, NETID_I2C3); - result += PyModule_AddIntMacro(module, NETID_I2C4); - result += PyModule_AddIntMacro(module, NETID_ETHERNET2); - result += PyModule_AddIntMacro(module, NETID_ETHERNET_TX_WRAP); - result += PyModule_AddIntMacro(module, NETID_A2B_01); - result += PyModule_AddIntMacro(module, NETID_A2B_02); - result += PyModule_AddIntMacro(module, NETID_ETHERNET3); - result += PyModule_AddIntMacro(module, NETID_ISM_LOGGER); - result += PyModule_AddIntMacro(module, NETID_CAN_SWITCH); - result += PyModule_AddIntMacro(module, NETID_WBMS); - result += PyModule_AddIntMacro(module, NETID_WBMS2); - result += PyModule_AddIntMacro(module, NETID_DWCAN_09); - result += PyModule_AddIntMacro(module, NETID_DWCAN_10); - result += PyModule_AddIntMacro(module, NETID_DWCAN_11); - result += PyModule_AddIntMacro(module, NETID_DWCAN_12); - result += PyModule_AddIntMacro(module, NETID_DWCAN_13); - result += PyModule_AddIntMacro(module, NETID_DWCAN_14); - result += PyModule_AddIntMacro(module, NETID_DWCAN_15); - result += PyModule_AddIntMacro(module, NETID_DWCAN_16); - result += PyModule_AddIntMacro(module, NETID_LIN_07); - result += PyModule_AddIntMacro(module, NETID_LIN_08); - result += PyModule_AddIntMacro(module, NETID_SPI2); - result += PyModule_AddIntMacro(module, NETID_MDIO_01); - result += PyModule_AddIntMacro(module, NETID_MDIO_02); - result += PyModule_AddIntMacro(module, NETID_MDIO_03); - result += PyModule_AddIntMacro(module, NETID_MDIO_04); - result += PyModule_AddIntMacro(module, NETID_MDIO_05); - result += PyModule_AddIntMacro(module, NETID_MDIO_06); - result += PyModule_AddIntMacro(module, NETID_MDIO_07); - result += PyModule_AddIntMacro(module, NETID_MDIO_08); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET13); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET14); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET15); - result += PyModule_AddIntMacro(module, NETID_OP_ETHERNET16); - result += PyModule_AddIntMacro(module, NETID_SPI3); - 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); - result += PyModule_AddIntMacro(module, NEODEVICE_BLUE); - result += PyModule_AddIntMacro(module, NEODEVICE_ECU_AVB); - result += PyModule_AddIntMacro(module, NEODEVICE_RADSUPERMOON); - result += PyModule_AddIntMacro(module, NEODEVICE_DW_VCAN); - result += PyModule_AddIntMacro(module, NEODEVICE_RADMOON2); - result += PyModule_AddIntMacro(module, NEODEVICE_RADGIGALOG); - result += PyModule_AddIntMacro(module, NEODEVICE_VCAN41); - result += PyModule_AddIntMacro(module, NEODEVICE_FIRE); - result += PyModule_AddIntMacro(module, NEODEVICE_RADPLUTO); - result += PyModule_AddIntMacro(module, NEODEVICE_VCAN42_EL); - result += PyModule_AddIntMacro(module, NEODEVICE_RADIO_CANHUB); - result += PyModule_AddIntMacro(module, NEODEVICE_NEOECU12); - result += PyModule_AddIntMacro(module, NEODEVICE_OBD2_LC); - result += PyModule_AddIntMacro(module, NEODEVICE_RAD_MOON_DUO); - result += PyModule_AddIntMacro(module, NEODEVICE_FIRE3); - result += PyModule_AddIntMacro(module, NEODEVICE_VCAN3); - result += PyModule_AddIntMacro(module, NEODEVICE_RADJUPITER); - result += PyModule_AddIntMacro(module, NEODEVICE_VCAN4_IND); - result += PyModule_AddIntMacro(module, NEODEVICE_GIGASTAR); - result += PyModule_AddIntMacro(module, NEODEVICE_RED2); - result += PyModule_AddIntMacro(module, NEODEVICE_FIRE2_REDLINE); - result += PyModule_AddIntMacro(module, NEODEVICE_ETHER_BADGE); - result += PyModule_AddIntMacro(module, NEODEVICE_RAD_A2B); - result += PyModule_AddIntMacro(module, NEODEVICE_RADEPSILON); - result += PyModule_AddIntMacro(module, NEODEVICE_OBD2_SIM_DOIP); - result += PyModule_AddIntMacro(module, NEODEVICE_OBD2_DEV); - result += PyModule_AddIntMacro(module, NEODEVICE_ECU22); - result += PyModule_AddIntMacro(module, NEODEVICE_RADEPSILON_T); - result += PyModule_AddIntMacro(module, NEODEVICE_RADEPSILON_EXPRESS); - result += PyModule_AddIntMacro(module, NEODEVICE_RADPROXIMA); - result += PyModule_AddIntMacro(module, NEODEVICE_RAD_GALAXY_2); - result += PyModule_AddIntMacro(module, NEODEVICE_RAD_BMS); - result += PyModule_AddIntMacro(module, NEODEVICE_RADMOON3); - result += PyModule_AddIntMacro(module, NEODEVICE_RADCOMET); - result += PyModule_AddIntMacro(module, NEODEVICE_FIRE3_FLEXRAY); - 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); - result += PyModule_AddIntMacro(module, NEODEVICE_PENDANT); - result += PyModule_AddIntMacro(module, NEODEVICE_OBD2_PRO); - result += PyModule_AddIntMacro(module, NEODEVICE_ECUCHIP_UART); - result += PyModule_AddIntMacro(module, NEODEVICE_PLASMA); - result += PyModule_AddIntMacro(module, NEODEVICE_DONT_REUSE0); - result += PyModule_AddIntMacro(module, NEODEVICE_NEOANALOG); - result += PyModule_AddIntMacro(module, NEODEVICE_CT_OBD); - result += PyModule_AddIntMacro(module, NEODEVICE_DONT_REUSE1); - result += PyModule_AddIntMacro(module, NEODEVICE_DONT_REUSE2); - result += PyModule_AddIntMacro(module, NEODEVICE_ION); - result += PyModule_AddIntMacro(module, NEODEVICE_RADSTAR); - result += PyModule_AddIntMacro(module, NEODEVICE_DONT_REUSE3); - result += PyModule_AddIntMacro(module, NEODEVICE_VCAN44); - result += PyModule_AddIntMacro(module, NEODEVICE_VCAN42); - result += PyModule_AddIntMacro(module, NEODEVICE_CMPROBE); - result += PyModule_AddIntMacro(module, NEODEVICE_EEVB); - result += PyModule_AddIntMacro(module, NEODEVICE_DONT_REUSE4); - result += PyModule_AddIntMacro(module, NEODEVICE_FIRE2); - result += PyModule_AddIntMacro(module, NEODEVICE_FLEX); - result += PyModule_AddIntMacro(module, NEODEVICE_RADGALAXY); - result += PyModule_AddIntMacro(module, NEODEVICE_RADSTAR2); - result += PyModule_AddIntMacro(module, NEODEVICE_VIVIDCAN); - result += PyModule_AddIntMacro(module, NEODEVICE_OBD2_SIM); - result += PyModule_AddIntMacro(module, NEODEVICE_ANY_PLASMA); - result += PyModule_AddIntMacro(module, NEODEVICE_ANY_ION); - result += PyModule_AddIntMacro(module, NEODEVICE_NEOECUCHIP); - result += PyModule_AddIntMacro(module, DEVICECOUNT_FOR_EXPLORER); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_HSCAN); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_MSCAN); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_HSCAN2); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_HSCAN3); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_SWCAN); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_HSCAN4); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_HSCAN5); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_HSCAN6); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_HSCAN7); - result += PyModule_AddIntMacro(module, ISO15765_2_NETWORK_SWCAN2); - result += PyModule_AddIntMacro(module, PLASMA_SLAVE1_OFFSET); - result += PyModule_AddIntMacro(module, PLASMA_SLAVE2_OFFSET); - result += PyModule_AddIntMacro(module, PLASMA_SLAVE_NUM); - result += PyModule_AddIntMacro(module, PLASMA_SLAVE1_OFFSET_RANGE2); - result += PyModule_AddIntMacro(module, PLASMA_SLAVE2_OFFSET_RANGE2); - result += PyModule_AddIntMacro(module, PLASMA_SLAVE3_OFFSET_RANGE2); - result += PyModule_AddIntMacro(module, SCRIPT_STATUS_STOPPED); - result += PyModule_AddIntMacro(module, SCRIPT_STATUS_RUNNING); - result += PyModule_AddIntMacro(module, SCRIPT_LOCATION_FLASH_MEM); - result += PyModule_AddIntMacro(module, SCRIPT_LOCATION_INTERNAL_FLASH); - result += PyModule_AddIntMacro(module, SCRIPT_LOCATION_SDCARD); - result += PyModule_AddIntMacro(module, SCRIPT_LOCATION_VCAN3_MEM); - result += PyModule_AddIntMacro(module, SCRIPT_LOCATION_EMMC); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_CUSTOM); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_CAN); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_GMLAN); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_J1850VPW); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_J1850PWM); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_ISO9141); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_Keyword2000); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_GM_ALDL_UART); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_CHRYSLER_CCD); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_CHRYSLER_SCI); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_FORD_UBP); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_BEAN); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_LIN); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_J1708); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_CHRYSLER_JVPW); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_J1939); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_FLEXRAY); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_MOST); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_CGI); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_GME_CIM_SCL_KLINE); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_SPI); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_I2C); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_GENERIC_UART); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_JTAG); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_UNIO); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_DALLAS_1WIRE); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_GENERIC_MANCHSESTER); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_SENT_PROTOCOL); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_UART); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_ETHERNET); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_CANFD); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_GMFSA); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_TCP); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_UDP); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_AUTOSAR); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_A2B); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_WBMS); - result += PyModule_AddIntMacro(module, SPY_PROTOCOL_MDIO); - result += PyModule_AddIntMacro(module, SPY_STATUS_GLOBAL_ERR); - result += PyModule_AddIntMacro(module, SPY_STATUS_TX_MSG); - result += PyModule_AddIntMacro(module, SPY_STATUS_XTD_FRAME); - result += PyModule_AddIntMacro(module, SPY_STATUS_REMOTE_FRAME); - result += PyModule_AddIntMacro(module, SPY_STATUS_CRC_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS_CAN_ERROR_PASSIVE); - result += PyModule_AddIntMacro(module, SPY_STATUS_HEADERCRC_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS_INCOMPLETE_FRAME); - result += PyModule_AddIntMacro(module, SPY_STATUS_LOST_ARBITRATION); - result += PyModule_AddIntMacro(module, SPY_STATUS_UNDEFINED_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS_CAN_BUS_OFF); - result += PyModule_AddIntMacro(module, SPY_STATUS_BUS_RECOVERED); - result += PyModule_AddIntMacro(module, SPY_STATUS_BUS_SHORTED_PLUS); - result += PyModule_AddIntMacro(module, SPY_STATUS_BUS_SHORTED_GND); - result += PyModule_AddIntMacro(module, SPY_STATUS_CHECKSUM_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS_BAD_MESSAGE_BIT_TIME_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS_TX_NOMATCH); - result += PyModule_AddIntMacro(module, SPY_STATUS_COMM_IN_OVERFLOW); - result += PyModule_AddIntMacro(module, SPY_STATUS_EXPECTED_LEN_MISMATCH); - result += PyModule_AddIntMacro(module, SPY_STATUS_MSG_NO_MATCH); - result += PyModule_AddIntMacro(module, SPY_STATUS_BREAK); - result += PyModule_AddIntMacro(module, SPY_STATUS_AVSI_REC_OVERFLOW); - result += PyModule_AddIntMacro(module, SPY_STATUS_TEST_TRIGGER); - result += PyModule_AddIntMacro(module, SPY_STATUS_AUDIO_COMMENT); - result += PyModule_AddIntMacro(module, SPY_STATUS_GPS_DATA); - result += PyModule_AddIntMacro(module, SPY_STATUS_ANALOG_DIGITAL_INPUT); - result += PyModule_AddIntMacro(module, SPY_STATUS_TEXT_COMMENT); - result += PyModule_AddIntMacro(module, SPY_STATUS_NETWORK_MESSAGE_TYPE); - result += PyModule_AddIntMacro(module, SPY_STATUS_VSI_TX_UNDERRUN); - result += PyModule_AddIntMacro(module, SPY_STATUS_VSI_IFR_CRC_BIT); - result += PyModule_AddIntMacro(module, SPY_STATUS_INIT_MESSAGE); - result += PyModule_AddIntMacro(module, SPY_STATUS_LIN_MASTER); - result += PyModule_AddIntMacro(module, SPY_STATUS_CANFD); - result += PyModule_AddIntMacro(module, SPY_STATUS_A2B_CONTROL); - result += PyModule_AddIntMacro(module, SPY_STATUS_A2B_SCF_VALID_WAITING); - result += PyModule_AddIntMacro(module, SPY_STATUS_A2B_MONITOR); - result += PyModule_AddIntMacro(module, SPY_STATUS_A2B_UPSTREAM); - result += PyModule_AddIntMacro(module, SPY_STATUS_PDU); - result += PyModule_AddIntMacro(module, SPY_STATUS_FLEXRAY_PDU); - result += PyModule_AddIntMacro(module, SPY_STATUS_HIGH_SPEED); - result += PyModule_AddIntMacro(module, SPY_STATUS_EXTENDED); - result += PyModule_AddIntMacro(module, SPY_STATUS_FLEXRAY_PDU_UPDATE_BIT_SET); - result += PyModule_AddIntMacro(module, SPY_STATUS_FLEXRAY_PDU_NO_UPDATE_BIT); - result += PyModule_AddIntMacro(module, SPY_STATUS2_HAS_VALUE); - result += PyModule_AddIntMacro(module, SPY_STATUS2_VALUE_IS_BOOLEAN); - result += PyModule_AddIntMacro(module, SPY_STATUS2_HIGH_VOLTAGE); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LONG_MESSAGE); - result += PyModule_AddIntMacro(module, SPY_STATUS2_GLOBAL_CHANGE); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ERROR_FRAME); - result += PyModule_AddIntMacro(module, SPY_STATUS2_END_OF_LONG_MESSAGE); - result += PyModule_AddIntMacro(module, SPY_STATUS2_I2C_ERR_TIMEOUT); - result += PyModule_AddIntMacro(module, SPY_STATUS2_I2C_ERR_NACK); - result += PyModule_AddIntMacro(module, SPY_STATUS2_I2C_DIR_READ); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MDIO_ERR_TIMEOUT); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MDIO_JOB_CANCELLED); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MDIO_INVALID_BUS); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MDIO_INVALID_PHYADDR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MDIO_INVALID_REGADDR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MDIO_UNSUPPORTED_CLAUSE); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MDIO_UNSUPPORTED_OPCODE); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MDIO_OVERFLOW); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MDIO_CLAUSE45); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MDIO_READ); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_ERR_RX_BREAK_NOT_0); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_ERR_RX_BREAK_TOO_SHORT); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_ERR_RX_SYNC_NOT_55); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_ERR_RX_DATA_GREATER_8); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_ERR_TX_RX_MISMATCH); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_ERR_MSG_ID_PARITY); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ISO_FRAME_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_SYNC_FRAME_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ISO_OVERFLOW_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_ID_FRAME_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ISO_PARITY_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_SLAVE_BYTE_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_RX_TIMEOUT_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_LIN_NO_SLAVE_DATA); - result += PyModule_AddIntMacro(module, SPY_STATUS3_LIN_JUST_BREAK_SYNC); - result += PyModule_AddIntMacro(module, SPY_STATUS3_LIN_SLAVE_DATA_TOO_SHORT); - result += PyModule_AddIntMacro(module, SPY_STATUS3_LIN_ONLY_UPDATE_SLAVE_TABLE_ONCE); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_PACKET_DATA); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_LOW_LEVEL); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_CONTROL_DATA); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_MHP_USER_DATA); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_MHP_CONTROL_DATA); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_I2S_DUMP); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_TOO_SHORT); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_MOST50); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_MOST150); - result += PyModule_AddIntMacro(module, SPY_STATUS2_MOST_CHANGED_PAR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ETHERNET_CRC_ERROR); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ETHERNET_FRAME_TOO_SHORT); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ETHERNET_NO_PADDING); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ETHERNET_PREEMPTION_ENABLED); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ETHERNET_UPDATE_CHECKSUMS); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ETHERNET_MANUALFCS_ENABLED); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ETHERNET_FCS_VERIFIED); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ETHERNET_T1S_SYMBOL); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ETHERNET_T1S_BURST); - result += PyModule_AddIntMacro(module, SPY_STATUS2_ETHERNET_T1S_ETHERNET); - result += PyModule_AddIntMacro(module, SPY_STATUS3_ETHERNET_TX_COLLISION); - result += PyModule_AddIntMacro(module, SPY_STATUS3_ETHERNET_T1S_WAKE); - result += PyModule_AddIntMacro(module, SPY_STATUS2_FLEXRAY_TX_AB); - result += PyModule_AddIntMacro(module, SPY_STATUS2_FLEXRAY_TX_AB_NO_A); - result += PyModule_AddIntMacro(module, SPY_STATUS2_FLEXRAY_TX_AB_NO_B); - result += PyModule_AddIntMacro(module, SPY_STATUS2_FLEXRAY_TX_AB_NO_MATCH); - result += PyModule_AddIntMacro(module, SPY_STATUS2_FLEXRAY_NO_CRC); - result += PyModule_AddIntMacro(module, SPY_STATUS2_FLEXRAY_NO_HEADERCRC); - result += PyModule_AddIntMacro(module, SPY_STATUS2_CAN_ISO15765_LOGICAL_FRAME); - result += PyModule_AddIntMacro(module, SPY_STATUS2_CAN_HAVE_LINK_DATA); - result += PyModule_AddIntMacro(module, SPY_STATUS2_WBMS_API_IS_CALLBACK); - result += PyModule_AddIntMacro(module, SPY_STATUS3_CANFD_ESI); - result += PyModule_AddIntMacro(module, SPY_STATUS3_CANFD_IDE); - result += PyModule_AddIntMacro(module, SPY_STATUS3_CANFD_RTR); - result += PyModule_AddIntMacro(module, SPY_STATUS3_CANFD_FDF); - result += PyModule_AddIntMacro(module, SPY_STATUS3_CANFD_BRS); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_HS_CAN_CNF1); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_HS_CAN_CNF2); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_HS_CAN_CNF3); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_HS_CAN_MODE); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_MS_CAN_CNF1); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_MS_CAN_CNF2); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_MS_CAN_CNF3); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_SW_CAN_CNF1); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_SW_CAN_CNF2); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_SW_CAN_CNF3); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_LSFT_CAN_CNF1); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_LSFT_CAN_CNF2); - result += PyModule_AddIntMacro(module, NEO_CFG_MPIC_LSFT_CAN_CNF3); - result += PyModule_AddObject(module, "NEOVI_TIMESTAMP_2", PyFloat_FromDouble(NEOVI_TIMESTAMP_2)); - result += PyModule_AddObject(module, "NEOVI_TIMESTAMP_1", PyFloat_FromDouble(NEOVI_TIMESTAMP_1)); - result += PyModule_AddObject(module, "NEOVIPRO_VCAN_TIMESTAMP_2", PyFloat_FromDouble(NEOVIPRO_VCAN_TIMESTAMP_2)); - result += PyModule_AddObject(module, "NEOVIPRO_VCAN_TIMESTAMP_1", PyFloat_FromDouble(NEOVIPRO_VCAN_TIMESTAMP_1)); - result += PyModule_AddObject(module, "NEOVI6_VCAN_TIMESTAMP_2", PyFloat_FromDouble(NEOVI6_VCAN_TIMESTAMP_2)); - result += PyModule_AddObject(module, "NEOVI6_VCAN_TIMESTAMP_1", PyFloat_FromDouble(NEOVI6_VCAN_TIMESTAMP_1)); - result += PyModule_AddObject(module, "NEOVI_RED_TIMESTAMP_2_25NS", PyFloat_FromDouble(NEOVI_RED_TIMESTAMP_2_25NS)); - result += PyModule_AddObject(module, "NEOVI_RED_TIMESTAMP_1_25NS", PyFloat_FromDouble(NEOVI_RED_TIMESTAMP_1_25NS)); - result += PyModule_AddObject(module, "NEOVI_RED_TIMESTAMP_2_10NS", PyFloat_FromDouble(NEOVI_RED_TIMESTAMP_2_10NS)); - result += PyModule_AddObject(module, "NEOVI_RED_TIMESTAMP_1_10NS", PyFloat_FromDouble(NEOVI_RED_TIMESTAMP_1_10NS)); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_NONE); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_VSI); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_AVT_716); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_NI_CAN); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_NEOVI); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_AVT_717); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_NEOv6_VCAN); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_DOUBLE_SEC); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_NEORED_10US); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_NEORED_25NS); - result += PyModule_AddIntMacro(module, HARDWARE_TIMESTAMP_ID_NEORED_10NS); - result += PyModule_AddIntMacro(module, HADRWARE_TIMESTAMP_ID_FIXED); - result += PyModule_AddIntMacro(module, FIRE2_REPORT_PERIODIC); - result += PyModule_AddIntMacro(module, FIRE2_REPORT_EMISC1_DIGITAL); - result += PyModule_AddIntMacro(module, FIRE2_REPORT_EMISC2_DIGITAL); - result += PyModule_AddIntMacro(module, FIRE2_REPORT_MISC5_DIGITAL); - result += PyModule_AddIntMacro(module, FIRE2_REPORT_MISC6_DIGITAL); - result += PyModule_AddIntMacro(module, FIRE2_REPORT_EMISC1_ANALOG); - result += PyModule_AddIntMacro(module, FIRE2_REPORT_EMISC2_ANALOG); - result += PyModule_AddIntMacro(module, FIRE2_REPORT_VBATT_ANALOG); - result += PyModule_AddIntMacro(module, FIRE2_REPORT_TEMP_ANALOG); - result += PyModule_AddIntMacro(module, FIRE2_REPORT_PWM_IN); - result += PyModule_AddIntMacro(module, FIRE2_REPORT_GPS); - result += PyModule_AddIntMacro(module, FIRE3_REPORT_ORIENTATION); - result += PyModule_AddIntMacro(module, CANNODE_STATUS_COREMINI_IS_RUNNING); - result += PyModule_AddIntMacro(module, CANNODE_STATUS_IN_BOOTLOADER); - result += PyModule_AddIntMacro(module, MAIN_VNET); - result += PyModule_AddIntMacro(module, SLAVE_VNET_A); - result += PyModule_AddIntMacro(module, SLAVE_VNET_B); - result += PyModule_AddIntMacro(module, WIFI_CONNECTION); - result += PyModule_AddIntMacro(module, REGISTER_BY_SERIAL); - result += PyModule_AddIntMacro(module, TCP_SUPPORTED); - result += PyModule_AddIntMacro(module, DRIVER_MASK); - result += PyModule_AddIntMacro(module, DRIVER_USB1); - result += PyModule_AddIntMacro(module, DRIVER_USB2); - result += PyModule_AddIntMacro(module, DRIVER_USB3); - result += PyModule_AddIntMacro(module, SERVD_DRIVER_MASK); - result += PyModule_AddIntMacro(module, SERVD_DRIVER_VCP); - result += PyModule_AddIntMacro(module, SERVD_DRIVER_DXX); - result += PyModule_AddIntMacro(module, SERVD_DRIVER_CAB); - result += PyModule_AddIntMacro(module, SERVD_DRIVER_TCP); - result += PyModule_AddIntMacro(module, CMP_STREAMS_FIRE3); - result += PyModule_AddIntMacro(module, CMP_STREAMS_FIRE3FR); - result += PyModule_AddIntMacro(module, CMP_STREAMS_RED2); - result += PyModule_AddIntMacro(module, CMP_STREAMS_A2B); - result += PyModule_AddIntMacro(module, CMP_STREAMS_GIGASTAR); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_RX_TIMEOUT_ERROR", PyLong_FromLongLong(SPY_STATUS2_RX_TIMEOUT_ERROR)); + result += PyModule_AddObjectRef(module, "NEOVI_COMMTYPE_RS232", PyLong_FromUnsignedLongLong(NEOVI_COMMTYPE_RS232)); + result += PyModule_AddObjectRef(module, "NEOVI_COMMTYPE_USB_BULK", PyLong_FromUnsignedLongLong(NEOVI_COMMTYPE_USB_BULK)); + result += PyModule_AddObjectRef(module, "NEOVI_COMMTYPE_TCPIP", PyLong_FromUnsignedLongLong(NEOVI_COMMTYPE_TCPIP)); + result += PyModule_AddObjectRef(module, "NEOVI_COMMTYPE_FIRE_USB", PyLong_FromUnsignedLongLong(NEOVI_COMMTYPE_FIRE_USB)); + result += PyModule_AddObjectRef(module, "NETID_DEVICE", PyLong_FromUnsignedLongLong(NETID_DEVICE)); + result += PyModule_AddObjectRef(module, "NETID_HSCAN", PyLong_FromUnsignedLongLong(NETID_HSCAN)); + result += PyModule_AddObjectRef(module, "NETID_MSCAN", PyLong_FromUnsignedLongLong(NETID_MSCAN)); + result += PyModule_AddObjectRef(module, "NETID_SWCAN", PyLong_FromUnsignedLongLong(NETID_SWCAN)); + result += PyModule_AddObjectRef(module, "NETID_LSFTCAN", PyLong_FromUnsignedLongLong(NETID_LSFTCAN)); + result += PyModule_AddObjectRef(module, "NETID_FORDSCP", PyLong_FromUnsignedLongLong(NETID_FORDSCP)); + result += PyModule_AddObjectRef(module, "NETID_J1708", PyLong_FromUnsignedLongLong(NETID_J1708)); + result += PyModule_AddObjectRef(module, "NETID_AUX", PyLong_FromUnsignedLongLong(NETID_AUX)); + result += PyModule_AddObjectRef(module, "NETID_JVPW", PyLong_FromUnsignedLongLong(NETID_JVPW)); + result += PyModule_AddObjectRef(module, "NETID_ISO", PyLong_FromUnsignedLongLong(NETID_ISO)); + result += PyModule_AddObjectRef(module, "NETID_ISOPIC", PyLong_FromUnsignedLongLong(NETID_ISOPIC)); + result += PyModule_AddObjectRef(module, "NETID_MAIN51", PyLong_FromUnsignedLongLong(NETID_MAIN51)); + result += PyModule_AddObjectRef(module, "NETID_RED", PyLong_FromUnsignedLongLong(NETID_RED)); + result += PyModule_AddObjectRef(module, "NETID_SCI", PyLong_FromUnsignedLongLong(NETID_SCI)); + result += PyModule_AddObjectRef(module, "NETID_ISO2", PyLong_FromUnsignedLongLong(NETID_ISO2)); + result += PyModule_AddObjectRef(module, "NETID_ISO14230", PyLong_FromUnsignedLongLong(NETID_ISO14230)); + result += PyModule_AddObjectRef(module, "NETID_LIN", PyLong_FromUnsignedLongLong(NETID_LIN)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET1", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET1)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET2", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET2)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET3", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET3)); + result += PyModule_AddObjectRef(module, "NETID_ISO3", PyLong_FromUnsignedLongLong(NETID_ISO3)); + result += PyModule_AddObjectRef(module, "NETID_HSCAN2", PyLong_FromUnsignedLongLong(NETID_HSCAN2)); + result += PyModule_AddObjectRef(module, "NETID_HSCAN3", PyLong_FromUnsignedLongLong(NETID_HSCAN3)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET4", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET4)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET5", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET5)); + result += PyModule_AddObjectRef(module, "NETID_ISO4", PyLong_FromUnsignedLongLong(NETID_ISO4)); + result += PyModule_AddObjectRef(module, "NETID_LIN2", PyLong_FromUnsignedLongLong(NETID_LIN2)); + result += PyModule_AddObjectRef(module, "NETID_LIN3", PyLong_FromUnsignedLongLong(NETID_LIN3)); + result += PyModule_AddObjectRef(module, "NETID_LIN4", PyLong_FromUnsignedLongLong(NETID_LIN4)); + result += PyModule_AddObjectRef(module, "NETID_MOST", PyLong_FromUnsignedLongLong(NETID_MOST)); + result += PyModule_AddObjectRef(module, "NETID_RED_APP_ERROR", PyLong_FromUnsignedLongLong(NETID_RED_APP_ERROR)); + result += PyModule_AddObjectRef(module, "NETID_CGI", PyLong_FromUnsignedLongLong(NETID_CGI)); + result += PyModule_AddObjectRef(module, "NETID_3G_RESET_STATUS", PyLong_FromUnsignedLongLong(NETID_3G_RESET_STATUS)); + result += PyModule_AddObjectRef(module, "NETID_3G_FB_STATUS", PyLong_FromUnsignedLongLong(NETID_3G_FB_STATUS)); + result += PyModule_AddObjectRef(module, "NETID_3G_APP_SIGNAL_STATUS", PyLong_FromUnsignedLongLong(NETID_3G_APP_SIGNAL_STATUS)); + result += PyModule_AddObjectRef(module, "NETID_3G_READ_DATALINK_CM_TX_MSG", PyLong_FromUnsignedLongLong(NETID_3G_READ_DATALINK_CM_TX_MSG)); + result += PyModule_AddObjectRef(module, "NETID_3G_READ_DATALINK_CM_RX_MSG", PyLong_FromUnsignedLongLong(NETID_3G_READ_DATALINK_CM_RX_MSG)); + result += PyModule_AddObjectRef(module, "NETID_3G_LOGGING_OVERFLOW", PyLong_FromUnsignedLongLong(NETID_3G_LOGGING_OVERFLOW)); + result += PyModule_AddObjectRef(module, "NETID_3G_READ_SETTINGS_EX", PyLong_FromUnsignedLongLong(NETID_3G_READ_SETTINGS_EX)); + result += PyModule_AddObjectRef(module, "NETID_HSCAN4", PyLong_FromUnsignedLongLong(NETID_HSCAN4)); + result += PyModule_AddObjectRef(module, "NETID_HSCAN5", PyLong_FromUnsignedLongLong(NETID_HSCAN5)); + result += PyModule_AddObjectRef(module, "NETID_RS232", PyLong_FromUnsignedLongLong(NETID_RS232)); + result += PyModule_AddObjectRef(module, "NETID_UART", PyLong_FromUnsignedLongLong(NETID_UART)); + result += PyModule_AddObjectRef(module, "NETID_UART2", PyLong_FromUnsignedLongLong(NETID_UART2)); + result += PyModule_AddObjectRef(module, "NETID_UART3", PyLong_FromUnsignedLongLong(NETID_UART3)); + result += PyModule_AddObjectRef(module, "NETID_UART4", PyLong_FromUnsignedLongLong(NETID_UART4)); + result += PyModule_AddObjectRef(module, "NETID_SWCAN2", PyLong_FromUnsignedLongLong(NETID_SWCAN2)); + result += PyModule_AddObjectRef(module, "NETID_ETHERNET_DAQ", PyLong_FromUnsignedLongLong(NETID_ETHERNET_DAQ)); + result += PyModule_AddObjectRef(module, "NETID_DATA_TO_HOST", PyLong_FromUnsignedLongLong(NETID_DATA_TO_HOST)); + result += PyModule_AddObjectRef(module, "NETID_TEXTAPI_TO_HOST", PyLong_FromUnsignedLongLong(NETID_TEXTAPI_TO_HOST)); + result += PyModule_AddObjectRef(module, "NETID_SPI1", PyLong_FromUnsignedLongLong(NETID_SPI1)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET6", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET6)); + result += PyModule_AddObjectRef(module, "NETID_RED_VBAT", PyLong_FromUnsignedLongLong(NETID_RED_VBAT)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET7", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET7)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET8", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET8)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET9", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET9)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET10", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET10)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET11", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET11)); + result += PyModule_AddObjectRef(module, "NETID_FLEXRAY1A", PyLong_FromUnsignedLongLong(NETID_FLEXRAY1A)); + result += PyModule_AddObjectRef(module, "NETID_FLEXRAY1B", PyLong_FromUnsignedLongLong(NETID_FLEXRAY1B)); + result += PyModule_AddObjectRef(module, "NETID_FLEXRAY2A", PyLong_FromUnsignedLongLong(NETID_FLEXRAY2A)); + result += PyModule_AddObjectRef(module, "NETID_FLEXRAY2B", PyLong_FromUnsignedLongLong(NETID_FLEXRAY2B)); + result += PyModule_AddObjectRef(module, "NETID_LIN5", PyLong_FromUnsignedLongLong(NETID_LIN5)); + result += PyModule_AddObjectRef(module, "NETID_FLEXRAY", PyLong_FromUnsignedLongLong(NETID_FLEXRAY)); + result += PyModule_AddObjectRef(module, "NETID_FLEXRAY2", PyLong_FromUnsignedLongLong(NETID_FLEXRAY2)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET12", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET12)); + result += PyModule_AddObjectRef(module, "NETID_I2C1", PyLong_FromUnsignedLongLong(NETID_I2C1)); + result += PyModule_AddObjectRef(module, "NETID_MOST25", PyLong_FromUnsignedLongLong(NETID_MOST25)); + result += PyModule_AddObjectRef(module, "NETID_MOST50", PyLong_FromUnsignedLongLong(NETID_MOST50)); + result += PyModule_AddObjectRef(module, "NETID_MOST150", PyLong_FromUnsignedLongLong(NETID_MOST150)); + result += PyModule_AddObjectRef(module, "NETID_ETHERNET", PyLong_FromUnsignedLongLong(NETID_ETHERNET)); + result += PyModule_AddObjectRef(module, "NETID_GMFSA", PyLong_FromUnsignedLongLong(NETID_GMFSA)); + result += PyModule_AddObjectRef(module, "NETID_TCP", PyLong_FromUnsignedLongLong(NETID_TCP)); + result += PyModule_AddObjectRef(module, "NETID_HSCAN6", PyLong_FromUnsignedLongLong(NETID_HSCAN6)); + result += PyModule_AddObjectRef(module, "NETID_HSCAN7", PyLong_FromUnsignedLongLong(NETID_HSCAN7)); + result += PyModule_AddObjectRef(module, "NETID_LIN6", PyLong_FromUnsignedLongLong(NETID_LIN6)); + result += PyModule_AddObjectRef(module, "NETID_LSFTCAN2", PyLong_FromUnsignedLongLong(NETID_LSFTCAN2)); + result += PyModule_AddObjectRef(module, "NETID_HW_COM_LATENCY_TEST", PyLong_FromUnsignedLongLong(NETID_HW_COM_LATENCY_TEST)); + result += PyModule_AddObjectRef(module, "NETID_DEVICE_STATUS", PyLong_FromUnsignedLongLong(NETID_DEVICE_STATUS)); + result += PyModule_AddObjectRef(module, "NETID_UDP", PyLong_FromUnsignedLongLong(NETID_UDP)); + result += PyModule_AddObjectRef(module, "NETID_AUTOSAR", PyLong_FromUnsignedLongLong(NETID_AUTOSAR)); + result += PyModule_AddObjectRef(module, "NETID_FORWARDED_MESSAGE", PyLong_FromUnsignedLongLong(NETID_FORWARDED_MESSAGE)); + result += PyModule_AddObjectRef(module, "NETID_I2C2", PyLong_FromUnsignedLongLong(NETID_I2C2)); + result += PyModule_AddObjectRef(module, "NETID_I2C3", PyLong_FromUnsignedLongLong(NETID_I2C3)); + result += PyModule_AddObjectRef(module, "NETID_I2C4", PyLong_FromUnsignedLongLong(NETID_I2C4)); + result += PyModule_AddObjectRef(module, "NETID_ETHERNET2", PyLong_FromUnsignedLongLong(NETID_ETHERNET2)); + result += PyModule_AddObjectRef(module, "NETID_ETHERNET_TX_WRAP", PyLong_FromUnsignedLongLong(NETID_ETHERNET_TX_WRAP)); + result += PyModule_AddObjectRef(module, "NETID_A2B_01", PyLong_FromUnsignedLongLong(NETID_A2B_01)); + result += PyModule_AddObjectRef(module, "NETID_A2B_02", PyLong_FromUnsignedLongLong(NETID_A2B_02)); + result += PyModule_AddObjectRef(module, "NETID_ETHERNET3", PyLong_FromUnsignedLongLong(NETID_ETHERNET3)); + result += PyModule_AddObjectRef(module, "NETID_ISM_LOGGER", PyLong_FromUnsignedLongLong(NETID_ISM_LOGGER)); + result += PyModule_AddObjectRef(module, "NETID_CAN_SWITCH", PyLong_FromUnsignedLongLong(NETID_CAN_SWITCH)); + result += PyModule_AddObjectRef(module, "NETID_WBMS", PyLong_FromUnsignedLongLong(NETID_WBMS)); + result += PyModule_AddObjectRef(module, "NETID_WBMS2", PyLong_FromUnsignedLongLong(NETID_WBMS2)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_09", PyLong_FromUnsignedLongLong(NETID_DWCAN_09)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_10", PyLong_FromUnsignedLongLong(NETID_DWCAN_10)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_11", PyLong_FromUnsignedLongLong(NETID_DWCAN_11)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_12", PyLong_FromUnsignedLongLong(NETID_DWCAN_12)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_13", PyLong_FromUnsignedLongLong(NETID_DWCAN_13)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_14", PyLong_FromUnsignedLongLong(NETID_DWCAN_14)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_15", PyLong_FromUnsignedLongLong(NETID_DWCAN_15)); + result += PyModule_AddObjectRef(module, "NETID_DWCAN_16", PyLong_FromUnsignedLongLong(NETID_DWCAN_16)); + result += PyModule_AddObjectRef(module, "NETID_LIN_07", PyLong_FromUnsignedLongLong(NETID_LIN_07)); + result += PyModule_AddObjectRef(module, "NETID_LIN_08", PyLong_FromUnsignedLongLong(NETID_LIN_08)); + result += PyModule_AddObjectRef(module, "NETID_SPI2", PyLong_FromUnsignedLongLong(NETID_SPI2)); + result += PyModule_AddObjectRef(module, "NETID_MDIO_01", PyLong_FromUnsignedLongLong(NETID_MDIO_01)); + result += PyModule_AddObjectRef(module, "NETID_MDIO_02", PyLong_FromUnsignedLongLong(NETID_MDIO_02)); + result += PyModule_AddObjectRef(module, "NETID_MDIO_03", PyLong_FromUnsignedLongLong(NETID_MDIO_03)); + result += PyModule_AddObjectRef(module, "NETID_MDIO_04", PyLong_FromUnsignedLongLong(NETID_MDIO_04)); + result += PyModule_AddObjectRef(module, "NETID_MDIO_05", PyLong_FromUnsignedLongLong(NETID_MDIO_05)); + result += PyModule_AddObjectRef(module, "NETID_MDIO_06", PyLong_FromUnsignedLongLong(NETID_MDIO_06)); + result += PyModule_AddObjectRef(module, "NETID_MDIO_07", PyLong_FromUnsignedLongLong(NETID_MDIO_07)); + result += PyModule_AddObjectRef(module, "NETID_MDIO_08", PyLong_FromUnsignedLongLong(NETID_MDIO_08)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET13", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET13)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET14", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET14)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET15", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET15)); + result += PyModule_AddObjectRef(module, "NETID_OP_ETHERNET16", PyLong_FromUnsignedLongLong(NETID_OP_ETHERNET16)); + result += PyModule_AddObjectRef(module, "NETID_SPI3", PyLong_FromUnsignedLongLong(NETID_SPI3)); + result += PyModule_AddObjectRef(module, "NETID_SPI4", PyLong_FromUnsignedLongLong(NETID_SPI4)); + result += PyModule_AddObjectRef(module, "NETID_SPI5", PyLong_FromUnsignedLongLong(NETID_SPI5)); + result += PyModule_AddObjectRef(module, "NETID_SPI6", PyLong_FromUnsignedLongLong(NETID_SPI6)); + result += PyModule_AddObjectRef(module, "NETID_SPI7", PyLong_FromUnsignedLongLong(NETID_SPI7)); + result += PyModule_AddObjectRef(module, "NETID_SPI8", PyLong_FromUnsignedLongLong(NETID_SPI8)); + result += PyModule_AddObjectRef(module, "NETID_LIN_09", PyLong_FromUnsignedLongLong(NETID_LIN_09)); + result += PyModule_AddObjectRef(module, "NETID_LIN_10", PyLong_FromUnsignedLongLong(NETID_LIN_10)); + result += PyModule_AddObjectRef(module, "NETID_LIN_11", PyLong_FromUnsignedLongLong(NETID_LIN_11)); + result += PyModule_AddObjectRef(module, "NETID_LIN_12", PyLong_FromUnsignedLongLong(NETID_LIN_12)); + result += PyModule_AddObjectRef(module, "NETID_LIN_13", PyLong_FromUnsignedLongLong(NETID_LIN_13)); + result += PyModule_AddObjectRef(module, "NETID_LIN_14", PyLong_FromUnsignedLongLong(NETID_LIN_14)); + result += PyModule_AddObjectRef(module, "NETID_LIN_15", PyLong_FromUnsignedLongLong(NETID_LIN_15)); + result += PyModule_AddObjectRef(module, "NETID_LIN_16", PyLong_FromUnsignedLongLong(NETID_LIN_16)); + result += PyModule_AddObjectRef(module, "NETID_MAX", PyLong_FromUnsignedLongLong(NETID_MAX)); + result += PyModule_AddObjectRef(module, "NETID_INVALID", PyLong_FromLongLong(NETID_INVALID)); + result += PyModule_AddObjectRef(module, "NEODEVICE_UNKNOWN", PyLong_FromLongLong(NEODEVICE_UNKNOWN)); + result += PyModule_AddObjectRef(module, "NEODEVICE_BLUE", PyLong_FromLongLong(NEODEVICE_BLUE)); + result += PyModule_AddObjectRef(module, "NEODEVICE_ECU_AVB_DEPRECATED", PyLong_FromLongLong(NEODEVICE_ECU_AVB_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADSUPERMOON_DEPRECATED", PyLong_FromLongLong(NEODEVICE_RADSUPERMOON_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_DW_VCAN", PyLong_FromLongLong(NEODEVICE_DW_VCAN)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADMOON2", PyLong_FromLongLong(NEODEVICE_RADMOON2)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADGIGALOG_DEPRECATED", PyLong_FromLongLong(NEODEVICE_RADGIGALOG_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_VCAN41", PyLong_FromLongLong(NEODEVICE_VCAN41)); + result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE", PyLong_FromLongLong(NEODEVICE_FIRE)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADPLUTO_DEPRECATED", PyLong_FromLongLong(NEODEVICE_RADPLUTO_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_VCAN42_EL", PyLong_FromLongLong(NEODEVICE_VCAN42_EL)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADIO_CANHUB", PyLong_FromLongLong(NEODEVICE_RADIO_CANHUB)); + result += PyModule_AddObjectRef(module, "NEODEVICE_NEOECU12", PyLong_FromLongLong(NEODEVICE_NEOECU12)); + result += PyModule_AddObjectRef(module, "NEODEVICE_OBD2_LC", PyLong_FromLongLong(NEODEVICE_OBD2_LC)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RAD_MOON_DUO_DEPRECATED", PyLong_FromLongLong(NEODEVICE_RAD_MOON_DUO_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE3", PyLong_FromLongLong(NEODEVICE_FIRE3)); + result += PyModule_AddObjectRef(module, "NEODEVICE_VCAN3", PyLong_FromLongLong(NEODEVICE_VCAN3)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADJUPITER", PyLong_FromLongLong(NEODEVICE_RADJUPITER)); + result += PyModule_AddObjectRef(module, "NEODEVICE_VCAN4_IND", PyLong_FromLongLong(NEODEVICE_VCAN4_IND)); + result += PyModule_AddObjectRef(module, "NEODEVICE_GIGASTAR", PyLong_FromLongLong(NEODEVICE_GIGASTAR)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RED2", PyLong_FromLongLong(NEODEVICE_RED2)); + result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE2_REDLINE_DEPRECATED", PyLong_FromLongLong(NEODEVICE_FIRE2_REDLINE_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_ETHER_BADGE_DEPRECATED", PyLong_FromLongLong(NEODEVICE_ETHER_BADGE_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RAD_A2B", PyLong_FromLongLong(NEODEVICE_RAD_A2B)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADEPSILON", PyLong_FromLongLong(NEODEVICE_RADEPSILON)); + result += PyModule_AddObjectRef(module, "NEODEVICE_OBD2_SIM_DOIP_DEPRECATED", PyLong_FromLongLong(NEODEVICE_OBD2_SIM_DOIP_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_OBD2_DEV_DEPRECATED", PyLong_FromLongLong(NEODEVICE_OBD2_DEV_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_ECU22_DEPRECATED", PyLong_FromLongLong(NEODEVICE_ECU22_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADEPSILON_T", PyLong_FromLongLong(NEODEVICE_RADEPSILON_T)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADEPSILON_EXPRESS", PyLong_FromLongLong(NEODEVICE_RADEPSILON_EXPRESS)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADPROXIMA", PyLong_FromLongLong(NEODEVICE_RADPROXIMA)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RAD_GALAXY_2", PyLong_FromLongLong(NEODEVICE_RAD_GALAXY_2)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RAD_BMS", PyLong_FromLongLong(NEODEVICE_RAD_BMS)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADMOON3", PyLong_FromLongLong(NEODEVICE_RADMOON3)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADCOMET", PyLong_FromLongLong(NEODEVICE_RADCOMET)); + result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE3_FLEXRAY", PyLong_FromLongLong(NEODEVICE_FIRE3_FLEXRAY)); + result += PyModule_AddObjectRef(module, "NEODEVICE_NEOVI_CONNECT", PyLong_FromLongLong(NEODEVICE_NEOVI_CONNECT)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADCOMET3", PyLong_FromLongLong(NEODEVICE_RADCOMET3)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADMOONT1S", PyLong_FromLongLong(NEODEVICE_RADMOONT1S)); + result += PyModule_AddObjectRef(module, "NEODEVICE_GIGASTAR2", PyLong_FromLongLong(NEODEVICE_GIGASTAR2)); + result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE3_T1S_LIN", PyLong_FromLongLong(NEODEVICE_FIRE3_T1S_LIN)); + result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE3_T1S_SENT", PyLong_FromLongLong(NEODEVICE_FIRE3_T1S_SENT)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RED", PyLong_FromLongLong(NEODEVICE_RED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_ECU", PyLong_FromLongLong(NEODEVICE_ECU)); + result += PyModule_AddObjectRef(module, "NEODEVICE_IEVB_DEPRECATED", PyLong_FromLongLong(NEODEVICE_IEVB_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_PENDANT", PyLong_FromLongLong(NEODEVICE_PENDANT)); + result += PyModule_AddObjectRef(module, "NEODEVICE_OBD2_PRO_DEPRECATED", PyLong_FromLongLong(NEODEVICE_OBD2_PRO_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_ECUCHIP_UART_DEPRECATED", PyLong_FromLongLong(NEODEVICE_ECUCHIP_UART_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_PLASMA", PyLong_FromLongLong(NEODEVICE_PLASMA)); + result += PyModule_AddObjectRef(module, "NEODEVICE_DONT_REUSE0", PyLong_FromLongLong(NEODEVICE_DONT_REUSE0)); + result += PyModule_AddObjectRef(module, "NEODEVICE_NEOANALOG", PyLong_FromLongLong(NEODEVICE_NEOANALOG)); + result += PyModule_AddObjectRef(module, "NEODEVICE_CT_OBD", PyLong_FromLongLong(NEODEVICE_CT_OBD)); + result += PyModule_AddObjectRef(module, "NEODEVICE_DONT_REUSE1", PyLong_FromLongLong(NEODEVICE_DONT_REUSE1)); + result += PyModule_AddObjectRef(module, "NEODEVICE_DONT_REUSE2", PyLong_FromLongLong(NEODEVICE_DONT_REUSE2)); + result += PyModule_AddObjectRef(module, "NEODEVICE_ION", PyLong_FromLongLong(NEODEVICE_ION)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADSTAR_DEPRECATED", PyLong_FromLongLong(NEODEVICE_RADSTAR_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_DONT_REUSE3", PyLong_FromLongLong(NEODEVICE_DONT_REUSE3)); + result += PyModule_AddObjectRef(module, "NEODEVICE_VCAN44", PyLong_FromLongLong(NEODEVICE_VCAN44)); + result += PyModule_AddObjectRef(module, "NEODEVICE_VCAN42", PyLong_FromLongLong(NEODEVICE_VCAN42)); + result += PyModule_AddObjectRef(module, "NEODEVICE_CMPROBE_DEPRECATED", PyLong_FromLongLong(NEODEVICE_CMPROBE_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_EEVB_DEPRECATED", PyLong_FromLongLong(NEODEVICE_EEVB_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_DONT_REUSE4", PyLong_FromLongLong(NEODEVICE_DONT_REUSE4)); + result += PyModule_AddObjectRef(module, "NEODEVICE_FIRE2", PyLong_FromLongLong(NEODEVICE_FIRE2)); + result += PyModule_AddObjectRef(module, "NEODEVICE_FLEX_DEPRECATED", PyLong_FromLongLong(NEODEVICE_FLEX_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADGALAXY", PyLong_FromLongLong(NEODEVICE_RADGALAXY)); + result += PyModule_AddObjectRef(module, "NEODEVICE_RADSTAR2", PyLong_FromLongLong(NEODEVICE_RADSTAR2)); + result += PyModule_AddObjectRef(module, "NEODEVICE_VIVIDCAN", PyLong_FromLongLong(NEODEVICE_VIVIDCAN)); + result += PyModule_AddObjectRef(module, "NEODEVICE_OBD2_SIM_DEPRECATED", PyLong_FromLongLong(NEODEVICE_OBD2_SIM_DEPRECATED)); + result += PyModule_AddObjectRef(module, "NEODEVICE_ANY_PLASMA", PyLong_FromLongLong(NEODEVICE_ANY_PLASMA)); + result += PyModule_AddObjectRef(module, "NEODEVICE_ANY_ION", PyLong_FromLongLong(NEODEVICE_ANY_ION)); + result += PyModule_AddObjectRef(module, "NEODEVICE_NEOECUCHIP", PyLong_FromLongLong(NEODEVICE_NEOECUCHIP)); + result += PyModule_AddObjectRef(module, "DEVICECOUNT_FOR_EXPLORER", PyLong_FromLongLong(DEVICECOUNT_FOR_EXPLORER)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_HSCAN", PyLong_FromLongLong(ISO15765_2_NETWORK_HSCAN)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_MSCAN", PyLong_FromLongLong(ISO15765_2_NETWORK_MSCAN)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_HSCAN2", PyLong_FromLongLong(ISO15765_2_NETWORK_HSCAN2)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_HSCAN3", PyLong_FromLongLong(ISO15765_2_NETWORK_HSCAN3)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_SWCAN", PyLong_FromLongLong(ISO15765_2_NETWORK_SWCAN)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_HSCAN4", PyLong_FromLongLong(ISO15765_2_NETWORK_HSCAN4)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_HSCAN5", PyLong_FromLongLong(ISO15765_2_NETWORK_HSCAN5)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_HSCAN6", PyLong_FromLongLong(ISO15765_2_NETWORK_HSCAN6)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_HSCAN7", PyLong_FromLongLong(ISO15765_2_NETWORK_HSCAN7)); + result += PyModule_AddObjectRef(module, "ISO15765_2_NETWORK_SWCAN2", PyLong_FromLongLong(ISO15765_2_NETWORK_SWCAN2)); + result += PyModule_AddObjectRef(module, "PLASMA_SLAVE1_OFFSET", PyLong_FromUnsignedLongLong(PLASMA_SLAVE1_OFFSET)); + result += PyModule_AddObjectRef(module, "PLASMA_SLAVE2_OFFSET", PyLong_FromUnsignedLongLong(PLASMA_SLAVE2_OFFSET)); + result += PyModule_AddObjectRef(module, "PLASMA_SLAVE_NUM", PyLong_FromUnsignedLongLong(PLASMA_SLAVE_NUM)); + result += PyModule_AddObjectRef(module, "PLASMA_SLAVE1_OFFSET_RANGE2", PyLong_FromUnsignedLongLong(PLASMA_SLAVE1_OFFSET_RANGE2)); + result += PyModule_AddObjectRef(module, "PLASMA_SLAVE2_OFFSET_RANGE2", PyLong_FromUnsignedLongLong(PLASMA_SLAVE2_OFFSET_RANGE2)); + result += PyModule_AddObjectRef(module, "PLASMA_SLAVE3_OFFSET_RANGE2", PyLong_FromUnsignedLongLong(PLASMA_SLAVE3_OFFSET_RANGE2)); + result += PyModule_AddObjectRef(module, "SCRIPT_STATUS_STOPPED", PyLong_FromUnsignedLongLong(SCRIPT_STATUS_STOPPED)); + result += PyModule_AddObjectRef(module, "SCRIPT_STATUS_RUNNING", PyLong_FromUnsignedLongLong(SCRIPT_STATUS_RUNNING)); + result += PyModule_AddObjectRef(module, "SCRIPT_LOCATION_FLASH_MEM", PyLong_FromUnsignedLongLong(SCRIPT_LOCATION_FLASH_MEM)); + result += PyModule_AddObjectRef(module, "SCRIPT_LOCATION_INTERNAL_FLASH", PyLong_FromUnsignedLongLong(SCRIPT_LOCATION_INTERNAL_FLASH)); + result += PyModule_AddObjectRef(module, "SCRIPT_LOCATION_SDCARD", PyLong_FromUnsignedLongLong(SCRIPT_LOCATION_SDCARD)); + result += PyModule_AddObjectRef(module, "SCRIPT_LOCATION_VCAN3_MEM", PyLong_FromUnsignedLongLong(SCRIPT_LOCATION_VCAN3_MEM)); + result += PyModule_AddObjectRef(module, "SCRIPT_LOCATION_EMMC", PyLong_FromUnsignedLongLong(SCRIPT_LOCATION_EMMC)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_CUSTOM", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_CUSTOM)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_CAN", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_CAN)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_GMLAN", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_GMLAN)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_J1850VPW", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_J1850VPW)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_J1850PWM", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_J1850PWM)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_ISO9141", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_ISO9141)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_Keyword2000", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_Keyword2000)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_GM_ALDL_UART", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_GM_ALDL_UART)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_CHRYSLER_CCD", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_CHRYSLER_CCD)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_CHRYSLER_SCI", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_CHRYSLER_SCI)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_FORD_UBP", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_FORD_UBP)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_BEAN", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_BEAN)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_LIN", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_LIN)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_J1708", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_J1708)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_CHRYSLER_JVPW", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_CHRYSLER_JVPW)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_J1939", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_J1939)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_FLEXRAY", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_FLEXRAY)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_MOST", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_MOST)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_CGI", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_CGI)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_GME_CIM_SCL_KLINE", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_GME_CIM_SCL_KLINE)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_SPI", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_SPI)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_I2C", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_I2C)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_GENERIC_UART", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_GENERIC_UART)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_JTAG", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_JTAG)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_UNIO", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_UNIO)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_DALLAS_1WIRE", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_DALLAS_1WIRE)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_GENERIC_MANCHSESTER", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_GENERIC_MANCHSESTER)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_SENT_PROTOCOL", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_SENT_PROTOCOL)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_UART", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_UART)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_ETHERNET", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_ETHERNET)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_CANFD", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_CANFD)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_GMFSA", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_GMFSA)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_TCP", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_TCP)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_UDP", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_UDP)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_AUTOSAR", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_AUTOSAR)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_A2B", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_A2B)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_WBMS", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_WBMS)); + result += PyModule_AddObjectRef(module, "SPY_PROTOCOL_MDIO", PyLong_FromUnsignedLongLong(SPY_PROTOCOL_MDIO)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_HS_CAN_CNF1", PyLong_FromLongLong(NEO_CFG_MPIC_HS_CAN_CNF1)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_HS_CAN_CNF2", PyLong_FromLongLong(NEO_CFG_MPIC_HS_CAN_CNF2)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_HS_CAN_CNF3", PyLong_FromLongLong(NEO_CFG_MPIC_HS_CAN_CNF3)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_HS_CAN_MODE", PyLong_FromLongLong(NEO_CFG_MPIC_HS_CAN_MODE)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_MS_CAN_CNF1", PyLong_FromLongLong(NEO_CFG_MPIC_MS_CAN_CNF1)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_MS_CAN_CNF2", PyLong_FromLongLong(NEO_CFG_MPIC_MS_CAN_CNF2)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_MS_CAN_CNF3", PyLong_FromLongLong(NEO_CFG_MPIC_MS_CAN_CNF3)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_SW_CAN_CNF1", PyLong_FromLongLong(NEO_CFG_MPIC_SW_CAN_CNF1)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_SW_CAN_CNF2", PyLong_FromLongLong(NEO_CFG_MPIC_SW_CAN_CNF2)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_SW_CAN_CNF3", PyLong_FromLongLong(NEO_CFG_MPIC_SW_CAN_CNF3)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_LSFT_CAN_CNF1", PyLong_FromLongLong(NEO_CFG_MPIC_LSFT_CAN_CNF1)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_LSFT_CAN_CNF2", PyLong_FromLongLong(NEO_CFG_MPIC_LSFT_CAN_CNF2)); + result += PyModule_AddObjectRef(module, "NEO_CFG_MPIC_LSFT_CAN_CNF3", PyLong_FromLongLong(NEO_CFG_MPIC_LSFT_CAN_CNF3)); + result += PyModule_AddObjectRef(module, "NEOVI_TIMESTAMP_2", PyFloat_FromDouble(NEOVI_TIMESTAMP_2)); + result += PyModule_AddObjectRef(module, "NEOVI_TIMESTAMP_1", PyFloat_FromDouble(NEOVI_TIMESTAMP_1)); + result += PyModule_AddObjectRef(module, "NEOVIPRO_VCAN_TIMESTAMP_2", PyFloat_FromDouble(NEOVIPRO_VCAN_TIMESTAMP_2)); + result += PyModule_AddObjectRef(module, "NEOVIPRO_VCAN_TIMESTAMP_1", PyFloat_FromDouble(NEOVIPRO_VCAN_TIMESTAMP_1)); + result += PyModule_AddObjectRef(module, "NEOVI6_VCAN_TIMESTAMP_2", PyFloat_FromDouble(NEOVI6_VCAN_TIMESTAMP_2)); + result += PyModule_AddObjectRef(module, "NEOVI6_VCAN_TIMESTAMP_1", PyFloat_FromDouble(NEOVI6_VCAN_TIMESTAMP_1)); + result += PyModule_AddObjectRef(module, "NEOVI_RED_TIMESTAMP_2_25NS", PyFloat_FromDouble(NEOVI_RED_TIMESTAMP_2_25NS)); + result += PyModule_AddObjectRef(module, "NEOVI_RED_TIMESTAMP_1_25NS", PyFloat_FromDouble(NEOVI_RED_TIMESTAMP_1_25NS)); + result += PyModule_AddObjectRef(module, "NEOVI_RED_TIMESTAMP_2_10NS", PyFloat_FromDouble(NEOVI_RED_TIMESTAMP_2_10NS)); + result += PyModule_AddObjectRef(module, "NEOVI_RED_TIMESTAMP_1_10NS", PyFloat_FromDouble(NEOVI_RED_TIMESTAMP_1_10NS)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_NONE", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_NONE)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_VSI", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_VSI)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_AVT_716", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_AVT_716)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_NI_CAN", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_NI_CAN)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_NEOVI", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_NEOVI)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_AVT_717", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_AVT_717)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_NEOv6_VCAN", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_NEOv6_VCAN)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_DOUBLE_SEC", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_DOUBLE_SEC)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_NEORED_10US", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_NEORED_10US)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_NEORED_25NS", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_NEORED_25NS)); + result += PyModule_AddObjectRef(module, "HARDWARE_TIMESTAMP_ID_NEORED_10NS", PyLong_FromLongLong(HARDWARE_TIMESTAMP_ID_NEORED_10NS)); + result += PyModule_AddObjectRef(module, "HADRWARE_TIMESTAMP_ID_FIXED", PyLong_FromLongLong(HADRWARE_TIMESTAMP_ID_FIXED)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_PERIODIC", PyLong_FromLongLong(FIRE2_REPORT_PERIODIC)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_EMISC1_DIGITAL", PyLong_FromLongLong(FIRE2_REPORT_EMISC1_DIGITAL)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_EMISC2_DIGITAL", PyLong_FromLongLong(FIRE2_REPORT_EMISC2_DIGITAL)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_MISC5_DIGITAL", PyLong_FromLongLong(FIRE2_REPORT_MISC5_DIGITAL)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_MISC6_DIGITAL", PyLong_FromLongLong(FIRE2_REPORT_MISC6_DIGITAL)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_EMISC1_ANALOG", PyLong_FromLongLong(FIRE2_REPORT_EMISC1_ANALOG)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_EMISC2_ANALOG", PyLong_FromLongLong(FIRE2_REPORT_EMISC2_ANALOG)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_VBATT_ANALOG", PyLong_FromLongLong(FIRE2_REPORT_VBATT_ANALOG)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_TEMP_ANALOG", PyLong_FromLongLong(FIRE2_REPORT_TEMP_ANALOG)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_PWM_IN", PyLong_FromLongLong(FIRE2_REPORT_PWM_IN)); + result += PyModule_AddObjectRef(module, "FIRE2_REPORT_GPS", PyLong_FromLongLong(FIRE2_REPORT_GPS)); + result += PyModule_AddObjectRef(module, "FIRE3_REPORT_ORIENTATION", PyLong_FromLongLong(FIRE3_REPORT_ORIENTATION)); + result += PyModule_AddObjectRef(module, "CANNODE_STATUS_COREMINI_IS_RUNNING", PyLong_FromLongLong(CANNODE_STATUS_COREMINI_IS_RUNNING)); + result += PyModule_AddObjectRef(module, "CANNODE_STATUS_IN_BOOTLOADER", PyLong_FromLongLong(CANNODE_STATUS_IN_BOOTLOADER)); + result += PyModule_AddObjectRef(module, "MAIN_VNET", PyLong_FromLongLong(MAIN_VNET)); + result += PyModule_AddObjectRef(module, "SLAVE_VNET_A", PyLong_FromLongLong(SLAVE_VNET_A)); + result += PyModule_AddObjectRef(module, "SLAVE_VNET_B", PyLong_FromLongLong(SLAVE_VNET_B)); + result += PyModule_AddObjectRef(module, "WIFI_CONNECTION", PyLong_FromLongLong(WIFI_CONNECTION)); + result += PyModule_AddObjectRef(module, "REGISTER_BY_SERIAL", PyLong_FromLongLong(REGISTER_BY_SERIAL)); + result += PyModule_AddObjectRef(module, "TCP_SUPPORTED", PyLong_FromLongLong(TCP_SUPPORTED)); + result += PyModule_AddObjectRef(module, "DRIVER_MASK", PyLong_FromLongLong(DRIVER_MASK)); + result += PyModule_AddObjectRef(module, "DRIVER_USB1", PyLong_FromLongLong(DRIVER_USB1)); + result += PyModule_AddObjectRef(module, "DRIVER_USB2", PyLong_FromLongLong(DRIVER_USB2)); + result += PyModule_AddObjectRef(module, "DRIVER_USB3", PyLong_FromLongLong(DRIVER_USB3)); + result += PyModule_AddObjectRef(module, "SERVD_DRIVER_MASK", PyLong_FromLongLong(SERVD_DRIVER_MASK)); + result += PyModule_AddObjectRef(module, "SERVD_DRIVER_VCP", PyLong_FromLongLong(SERVD_DRIVER_VCP)); + result += PyModule_AddObjectRef(module, "SERVD_DRIVER_DXX", PyLong_FromLongLong(SERVD_DRIVER_DXX)); + result += PyModule_AddObjectRef(module, "SERVD_DRIVER_CAB", PyLong_FromLongLong(SERVD_DRIVER_CAB)); + result += PyModule_AddObjectRef(module, "SERVD_DRIVER_TCP", PyLong_FromLongLong(SERVD_DRIVER_TCP)); // enum - result += PyModule_AddIntMacro(module, AUTO); - result += PyModule_AddIntMacro(module, USE_TQ); + result += PyModule_AddObjectRef(module, "PHY_88Q211x_Z1", PyLong_FromLongLong(PHY_88Q211x_Z1)); + result += PyModule_AddObjectRef(module, "PHY_88Q211x_A0", PyLong_FromLongLong(PHY_88Q211x_A0)); + result += PyModule_AddObjectRef(module, "PHY_88Q211x_A1", PyLong_FromLongLong(PHY_88Q211x_A1)); + result += PyModule_AddObjectRef(module, "PHY_88Q211x_A2", PyLong_FromLongLong(PHY_88Q211x_A2)); + result += PyModule_AddObjectRef(module, "PHY_88Q222xM_A0", PyLong_FromLongLong(PHY_88Q222xM_A0)); + result += PyModule_AddObjectRef(module, "PHY_88Q222xM_B0", PyLong_FromLongLong(PHY_88Q222xM_B0)); + result += PyModule_AddObjectRef(module, "PHY_88Q222xM_B1", PyLong_FromLongLong(PHY_88Q222xM_B1)); + result += PyModule_AddObjectRef(module, "PHY_88Q222xM_B2", PyLong_FromLongLong(PHY_88Q222xM_B2)); + result += PyModule_AddObjectRef(module, "PHY_UNKNOWN", PyLong_FromLongLong(PHY_UNKNOWN)); + // end of enum - } PhyId; + + result += PyModule_AddObjectRef(module, "CMP_STREAMS_FIRE3", PyLong_FromLongLong(CMP_STREAMS_FIRE3)); + result += PyModule_AddObjectRef(module, "CMP_STREAMS_FIRE3FR", PyLong_FromLongLong(CMP_STREAMS_FIRE3FR)); + result += PyModule_AddObjectRef(module, "CMP_STREAMS_RED2", PyLong_FromLongLong(CMP_STREAMS_RED2)); + result += PyModule_AddObjectRef(module, "CMP_STREAMS_A2B", PyLong_FromLongLong(CMP_STREAMS_A2B)); + result += PyModule_AddObjectRef(module, "CMP_STREAMS_GIGASTAR", PyLong_FromLongLong(CMP_STREAMS_GIGASTAR)); + // enum + result += PyModule_AddObjectRef(module, "AUTO", PyLong_FromLongLong(AUTO)); + result += PyModule_AddObjectRef(module, "USE_TQ", PyLong_FromLongLong(USE_TQ)); // end of enum - }; // enum - result += PyModule_AddIntMacro(module, BPS20); - result += PyModule_AddIntMacro(module, BPS33); - result += PyModule_AddIntMacro(module, BPS50); - result += PyModule_AddIntMacro(module, BPS62); - result += PyModule_AddIntMacro(module, BPS83); - result += PyModule_AddIntMacro(module, BPS100); - result += PyModule_AddIntMacro(module, BPS125); - result += PyModule_AddIntMacro(module, BPS250); - result += PyModule_AddIntMacro(module, BPS500); - result += PyModule_AddIntMacro(module, BPS800); - result += PyModule_AddIntMacro(module, BPS1000); - result += PyModule_AddIntMacro(module, BPS666); - result += PyModule_AddIntMacro(module, BPS2000); - result += PyModule_AddIntMacro(module, BPS4000); - result += PyModule_AddIntMacro(module, CAN_BPS5000); - result += PyModule_AddIntMacro(module, CAN_BPS6667); - result += PyModule_AddIntMacro(module, CAN_BPS8000); - result += PyModule_AddIntMacro(module, CAN_BPS10000); + result += PyModule_AddObjectRef(module, "BPS20", PyLong_FromLongLong(BPS20)); + result += PyModule_AddObjectRef(module, "BPS33", PyLong_FromLongLong(BPS33)); + result += PyModule_AddObjectRef(module, "BPS50", PyLong_FromLongLong(BPS50)); + result += PyModule_AddObjectRef(module, "BPS62", PyLong_FromLongLong(BPS62)); + result += PyModule_AddObjectRef(module, "BPS83", PyLong_FromLongLong(BPS83)); + result += PyModule_AddObjectRef(module, "BPS100", PyLong_FromLongLong(BPS100)); + result += PyModule_AddObjectRef(module, "BPS125", PyLong_FromLongLong(BPS125)); + result += PyModule_AddObjectRef(module, "BPS250", PyLong_FromLongLong(BPS250)); + result += PyModule_AddObjectRef(module, "BPS500", PyLong_FromLongLong(BPS500)); + result += PyModule_AddObjectRef(module, "BPS800", PyLong_FromLongLong(BPS800)); + result += PyModule_AddObjectRef(module, "BPS1000", PyLong_FromLongLong(BPS1000)); + result += PyModule_AddObjectRef(module, "BPS666", PyLong_FromLongLong(BPS666)); + result += PyModule_AddObjectRef(module, "BPS2000", PyLong_FromLongLong(BPS2000)); + result += PyModule_AddObjectRef(module, "BPS4000", PyLong_FromLongLong(BPS4000)); + result += PyModule_AddObjectRef(module, "CAN_BPS5000", PyLong_FromLongLong(CAN_BPS5000)); + result += PyModule_AddObjectRef(module, "CAN_BPS6667", PyLong_FromLongLong(CAN_BPS6667)); + result += PyModule_AddObjectRef(module, "CAN_BPS8000", PyLong_FromLongLong(CAN_BPS8000)); + result += PyModule_AddObjectRef(module, "CAN_BPS10000", PyLong_FromLongLong(CAN_BPS10000)); // end of enum - }; // enum - result += PyModule_AddIntMacro(module, NORMAL); - result += PyModule_AddIntMacro(module, DISABLE); - result += PyModule_AddIntMacro(module, LOOPBACK); - result += PyModule_AddIntMacro(module, LISTEN_ONLY); - result += PyModule_AddIntMacro(module, LISTEN_ALL); + result += PyModule_AddObjectRef(module, "NORMAL", PyLong_FromLongLong(NORMAL)); + result += PyModule_AddObjectRef(module, "DISABLE", PyLong_FromLongLong(DISABLE)); + result += PyModule_AddObjectRef(module, "LOOPBACK", PyLong_FromLongLong(LOOPBACK)); + result += PyModule_AddObjectRef(module, "LISTEN_ONLY", PyLong_FromLongLong(LISTEN_ONLY)); + result += PyModule_AddObjectRef(module, "LISTEN_ALL", PyLong_FromLongLong(LISTEN_ALL)); // end of enum - }; - result += PyModule_AddIntMacro(module, CAN_SETTINGS_SIZE); + result += PyModule_AddObjectRef(module, "CAN_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(CAN_SETTINGS_SIZE)); // enum - result += PyModule_AddIntMacro(module, NO_CANFD); - result += PyModule_AddIntMacro(module, CANFD_ENABLED); - result += PyModule_AddIntMacro(module, CANFD_BRS_ENABLED); - result += PyModule_AddIntMacro(module, CANFD_ENABLED_ISO); - result += PyModule_AddIntMacro(module, CANFD_BRS_ENABLED_ISO); + result += PyModule_AddObjectRef(module, "NO_CANFD", PyLong_FromLongLong(NO_CANFD)); + result += PyModule_AddObjectRef(module, "CANFD_ENABLED", PyLong_FromLongLong(CANFD_ENABLED)); + result += PyModule_AddObjectRef(module, "CANFD_BRS_ENABLED", PyLong_FromLongLong(CANFD_BRS_ENABLED)); + result += PyModule_AddObjectRef(module, "CANFD_ENABLED_ISO", PyLong_FromLongLong(CANFD_ENABLED_ISO)); + result += PyModule_AddObjectRef(module, "CANFD_BRS_ENABLED_ISO", PyLong_FromLongLong(CANFD_BRS_ENABLED_ISO)); // end of enum - }; - result += PyModule_AddIntMacro(module, CANFD_SETTINGS_SIZE); + result += PyModule_AddObjectRef(module, "CANFD_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(CANFD_SETTINGS_SIZE)); // enum - result += PyModule_AddIntMacro(module, SWCAN_AUTOSWITCH_DISABLED); - result += PyModule_AddIntMacro(module, SWCAN_AUTOSWITCH_NO_RESISTOR); - result += PyModule_AddIntMacro(module, SWCAN_AUTOSWITCH_WITH_RESISTOR); - result += PyModule_AddIntMacro(module, SWCAN_AUTOSWITCH_DISABLED_RESISTOR_ENABLED); + result += PyModule_AddObjectRef(module, "SWCAN_AUTOSWITCH_DISABLED", PyLong_FromLongLong(SWCAN_AUTOSWITCH_DISABLED)); + result += PyModule_AddObjectRef(module, "SWCAN_AUTOSWITCH_NO_RESISTOR", PyLong_FromLongLong(SWCAN_AUTOSWITCH_NO_RESISTOR)); + result += PyModule_AddObjectRef(module, "SWCAN_AUTOSWITCH_WITH_RESISTOR", PyLong_FromLongLong(SWCAN_AUTOSWITCH_WITH_RESISTOR)); + result += PyModule_AddObjectRef(module, "SWCAN_AUTOSWITCH_DISABLED_RESISTOR_ENABLED", PyLong_FromLongLong(SWCAN_AUTOSWITCH_DISABLED_RESISTOR_ENABLED)); // end of enum - }; - result += PyModule_AddIntMacro(module, SWCAN_SETTINGS_SIZE); + result += PyModule_AddObjectRef(module, "SWCAN_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(SWCAN_SETTINGS_SIZE)); // enum - result += PyModule_AddIntMacro(module, BPS5000); - result += PyModule_AddIntMacro(module, BPS10400); - result += PyModule_AddIntMacro(module, BPS33333); - result += PyModule_AddIntMacro(module, BPS50000); - result += PyModule_AddIntMacro(module, BPS62500); - result += PyModule_AddIntMacro(module, BPS71429); - result += PyModule_AddIntMacro(module, BPS83333); - result += PyModule_AddIntMacro(module, BPS100000); - result += PyModule_AddIntMacro(module, BPS117647); + result += PyModule_AddObjectRef(module, "BPS5000", PyLong_FromLongLong(BPS5000)); + result += PyModule_AddObjectRef(module, "BPS10400", PyLong_FromLongLong(BPS10400)); + result += PyModule_AddObjectRef(module, "BPS33333", PyLong_FromLongLong(BPS33333)); + result += PyModule_AddObjectRef(module, "BPS50000", PyLong_FromLongLong(BPS50000)); + result += PyModule_AddObjectRef(module, "BPS62500", PyLong_FromLongLong(BPS62500)); + result += PyModule_AddObjectRef(module, "BPS71429", PyLong_FromLongLong(BPS71429)); + result += PyModule_AddObjectRef(module, "BPS83333", PyLong_FromLongLong(BPS83333)); + result += PyModule_AddObjectRef(module, "BPS100000", PyLong_FromLongLong(BPS100000)); + result += PyModule_AddObjectRef(module, "BPS117647", PyLong_FromLongLong(BPS117647)); // end of enum - }; // enum - result += PyModule_AddIntMacro(module, RESISTOR_ON); - result += PyModule_AddIntMacro(module, RESISTOR_OFF); + result += PyModule_AddObjectRef(module, "RESISTOR_ON", PyLong_FromLongLong(RESISTOR_ON)); + result += PyModule_AddObjectRef(module, "RESISTOR_OFF", PyLong_FromLongLong(RESISTOR_OFF)); // end of enum - }; // enum - result += PyModule_AddIntMacro(module, SLEEP_MODE); - result += PyModule_AddIntMacro(module, SLOW_MODE); - result += PyModule_AddIntMacro(module, NORMAL_MODE); - result += PyModule_AddIntMacro(module, FAST_MODE); + result += PyModule_AddObjectRef(module, "SLEEP_MODE", PyLong_FromLongLong(SLEEP_MODE)); + result += PyModule_AddObjectRef(module, "SLOW_MODE", PyLong_FromLongLong(SLOW_MODE)); + result += PyModule_AddObjectRef(module, "NORMAL_MODE", PyLong_FromLongLong(NORMAL_MODE)); + result += PyModule_AddObjectRef(module, "FAST_MODE", PyLong_FromLongLong(FAST_MODE)); // end of enum - }; - result += PyModule_AddIntMacro(module, LIN_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, ISO9141_KEYWORD2000__INIT_STEP_SIZE); - result += PyModule_AddIntMacro(module, ISO9141_KEYWORD2000_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, UART_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, J1708_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, SRedSettings_SIZE); - result += PyModule_AddIntMacro(module, STextAPISettings_SIZE); - result += PyModule_AddIntMacro(module, stChipVersions_SIZE); - result += PyModule_AddIntMacro(module, SNeoMostGatewaySettings_SIZE); + result += PyModule_AddObjectRef(module, "LIN_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(LIN_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "ISO9141_KEYWORD2000__INIT_STEP_SIZE", PyLong_FromUnsignedLongLong(ISO9141_KEYWORD2000__INIT_STEP_SIZE)); + result += PyModule_AddObjectRef(module, "ISO9141_KEYWORD2000_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(ISO9141_KEYWORD2000_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "UART_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(UART_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "J1708_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(J1708_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "SRedSettings_SIZE", PyLong_FromUnsignedLongLong(SRedSettings_SIZE)); + result += PyModule_AddObjectRef(module, "STextAPISettings_SIZE", PyLong_FromUnsignedLongLong(STextAPISettings_SIZE)); + result += PyModule_AddObjectRef(module, "stChipVersions_SIZE", PyLong_FromUnsignedLongLong(stChipVersions_SIZE)); + result += PyModule_AddObjectRef(module, "SNeoMostGatewaySettings_SIZE", PyLong_FromUnsignedLongLong(SNeoMostGatewaySettings_SIZE)); // enum - result += PyModule_AddIntMacro(module, OPETH_FUNC_TAP); - result += PyModule_AddIntMacro(module, OPETH_FUNC_MEDIACONVERTER); - result += PyModule_AddIntMacro(module, OPETH_FUNC_TAP_LOW_LATENCY); - result += PyModule_AddIntMacro(module, OPETH_FUNC_RAW_MEDIA_CONVERTER); - result += PyModule_AddIntMacro(module, OPETH_FUNC_RAW_MEDIA_CONVERTER2); - result += PyModule_AddIntMacro(module, OPETH_FUNC_RAW_MEDIA_CONVERTER2_LOW_LATENCY); + result += PyModule_AddObjectRef(module, "OPETH_FUNC_TAP", PyLong_FromLongLong(OPETH_FUNC_TAP)); + result += PyModule_AddObjectRef(module, "OPETH_FUNC_MEDIACONVERTER", PyLong_FromLongLong(OPETH_FUNC_MEDIACONVERTER)); + result += PyModule_AddObjectRef(module, "OPETH_FUNC_TAP_LOW_LATENCY", PyLong_FromLongLong(OPETH_FUNC_TAP_LOW_LATENCY)); + result += PyModule_AddObjectRef(module, "OPETH_FUNC_RAW_MEDIA_CONVERTER", PyLong_FromLongLong(OPETH_FUNC_RAW_MEDIA_CONVERTER)); + result += PyModule_AddObjectRef(module, "OPETH_FUNC_RAW_MEDIA_CONVERTER2", PyLong_FromLongLong(OPETH_FUNC_RAW_MEDIA_CONVERTER2)); + result += PyModule_AddObjectRef(module, "OPETH_FUNC_RAW_MEDIA_CONVERTER2_LOW_LATENCY", PyLong_FromLongLong(OPETH_FUNC_RAW_MEDIA_CONVERTER2_LOW_LATENCY)); // end of enum - }; - result += PyModule_AddIntMacro(module, OP_ETH_GENERAL_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, RAD_GPTP_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, RAD_GPTP_AND_TAP_SETTINGS_SIZE); + result += PyModule_AddObjectRef(module, "OP_ETH_GENERAL_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(OP_ETH_GENERAL_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "RAD_GPTP_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(RAD_GPTP_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "RAD_GPTP_AND_TAP_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(RAD_GPTP_AND_TAP_SETTINGS_SIZE)); // enum - result += PyModule_AddIntMacro(module, OPETH_LINK_AUTO); - result += PyModule_AddIntMacro(module, OPETH_LINK_MASTER); - result += PyModule_AddIntMacro(module, OPETH_LINK_SLAVE); + result += PyModule_AddObjectRef(module, "OPETH_LINK_AUTO", PyLong_FromLongLong(OPETH_LINK_AUTO)); + result += PyModule_AddObjectRef(module, "OPETH_LINK_MASTER", PyLong_FromLongLong(OPETH_LINK_MASTER)); + result += PyModule_AddObjectRef(module, "OPETH_LINK_SLAVE", PyLong_FromLongLong(OPETH_LINK_SLAVE)); // end of enum - } opEthLinkMode; // enum - result += PyModule_AddIntMacro(module, OPETH_MAC_SPOOF_DST_ADDR); - result += PyModule_AddIntMacro(module, OPETH_MAC_SPOOF_SRC_ADDR); + result += PyModule_AddObjectRef(module, "OPETH_MAC_SPOOF_DST_ADDR", PyLong_FromLongLong(OPETH_MAC_SPOOF_DST_ADDR)); + result += PyModule_AddObjectRef(module, "OPETH_MAC_SPOOF_SRC_ADDR", PyLong_FromLongLong(OPETH_MAC_SPOOF_SRC_ADDR)); // end of enum - }; - result += PyModule_AddIntMacro(module, OP_ETH_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG_FULL_DUPLEX); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG_AUTO_NEG); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG_TCPIP_ENABLE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG_RTSP_ENABLE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG_DEVICE_HOSTING_ENABLE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG_CONFIG_NOT_ALLOWED); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG_ICS_SFP); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG_COMM_IN_USE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG2_LINK_MODE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG2_PHY_MODE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG2_LINK_MODE_AUTO); - 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); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_FLAG2_TCP_COMM_STATIC_PORT_ENABLE); + result += PyModule_AddObjectRef(module, "OP_ETH_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(OP_ETH_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(ETHERNET_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG_FULL_DUPLEX", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG_FULL_DUPLEX)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG_AUTO_NEG", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG_AUTO_NEG)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG_TCPIP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG_TCPIP_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG_RTSP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG_RTSP_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG_DEVICE_HOSTING_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG_DEVICE_HOSTING_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG_CONFIG_NOT_ALLOWED", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG_CONFIG_NOT_ALLOWED)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG_ICS_SFP", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG_ICS_SFP)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG_COMM_IN_USE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG_COMM_IN_USE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_LINK_MODE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_LINK_MODE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_PHY_MODE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_PHY_MODE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_LINK_MODE_AUTO", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_LINK_MODE_AUTO)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_IP_CONFIG_NOT_ALLOWED", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_IP_CONFIG_NOT_ALLOWED)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_SFP_ID_SHIFT", PyLong_FromUnsignedLongLong(ETHERNET_SETTINGS2_FLAG2_SFP_ID_SHIFT)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_SFP_ID_MASK", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_SFP_ID_MASK)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_CUT_THRU_TAP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_CUT_THRU_TAP_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_SNF_TAP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_SNF_TAP_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_DISABLE_TAP_TO_HOST", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_DISABLE_TAP_TO_HOST)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_SHOW_TAP_TX_RECEIPT", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_SHOW_TAP_TX_RECEIPT)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_TCP_COMM_STATIC_PORT_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_TCP_COMM_STATIC_PORT_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_TAP_DEST_SHIFT", PyLong_FromUnsignedLongLong(ETHERNET_SETTINGS2_FLAG2_TAP_DEST_SHIFT)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_TAP_DEST_MASK", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_TAP_DEST_MASK)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_FLAG2_TC10_FWD_TAP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS2_FLAG2_TC10_FWD_TAP_ENABLE)); // enum - result += PyModule_AddIntMacro(module, SFP_ID_UNKNOWN); - result += PyModule_AddIntMacro(module, SFP_ID_FINISAR_FCLF8522P2BTL); - result += PyModule_AddIntMacro(module, SFP_ID_FS_GB_GE_T); - result += PyModule_AddIntMacro(module, SFP_ID_ICS_MV2112A2); - result += PyModule_AddIntMacro(module, SFP_ID_ICS_MV2221MB1); - result += PyModule_AddIntMacro(module, SFP_ID_ICS_MV3244); - result += PyModule_AddIntMacro(module, SFP_ID_ICS_MC8670); - result += PyModule_AddIntMacro(module, SFP_ID_ICS_EN11100); - result += PyModule_AddIntMacro(module, SFP_ID_MAX); + result += PyModule_AddObjectRef(module, "SFP_ID_UNKNOWN", PyLong_FromLongLong(SFP_ID_UNKNOWN)); + result += PyModule_AddObjectRef(module, "SFP_ID_FINISAR_FCLF8522P2BTL", PyLong_FromLongLong(SFP_ID_FINISAR_FCLF8522P2BTL)); + result += PyModule_AddObjectRef(module, "SFP_ID_FS_GB_GE_T", PyLong_FromLongLong(SFP_ID_FS_GB_GE_T)); + result += PyModule_AddObjectRef(module, "SFP_ID_ICS_MV2112A2", PyLong_FromLongLong(SFP_ID_ICS_MV2112A2)); + result += PyModule_AddObjectRef(module, "SFP_ID_ICS_MV2221MB1", PyLong_FromLongLong(SFP_ID_ICS_MV2221MB1)); + result += PyModule_AddObjectRef(module, "SFP_ID_ICS_MV3244", PyLong_FromLongLong(SFP_ID_ICS_MV3244)); + result += PyModule_AddObjectRef(module, "SFP_ID_ICS_MC8670", PyLong_FromLongLong(SFP_ID_ICS_MC8670)); + result += PyModule_AddObjectRef(module, "SFP_ID_ICS_EN11100", PyLong_FromLongLong(SFP_ID_ICS_EN11100)); + result += PyModule_AddObjectRef(module, "SFP_ID_MAX", PyLong_FromLongLong(SFP_ID_MAX)); // end of enum - } SfpId; - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS2_SIZE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_FULL_DUPLEX); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_AUTO_NEG); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_TCPIP_ENABLE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_RTSP_ENABLE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_DEVICE_HOSTING_ENABLE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_CONFIG_NOT_ALLOWED); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_ICS_SFP); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_LINK_MODE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_PHY_MODE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_LINK_MODE_AUTO); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_COMPL_MODE); - 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_TCP_COMM_STATIC_PORT_ENABLE); - result += PyModule_AddIntMacro(module, ETHERNET_SETTINGS10G_FLAG_COMM_IN_USE); - result += PyModule_AddIntMacro(module, ETHERNET10G_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, ETHERNET10T1S_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, ETHERNET10T1S_SETTINGS_FLAG_ENABLE_PLCA); - result += PyModule_AddIntMacro(module, ETHERNET10T1S_SETTINGS_FLAG_TERMINATION); - 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_FLAG_ENABLE_PLCA_COL_DET); - result += PyModule_AddIntMacro(module, ETHERNET10T1S_SETTINGS_FLAG_ENABLE_CSMA_FALLBACK); - result += PyModule_AddIntMacro(module, ETHERNET10T1S_SETTINGS_EXT_SIZE); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS2_SIZE", PyLong_FromUnsignedLongLong(ETHERNET_SETTINGS2_SIZE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_FULL_DUPLEX", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_FULL_DUPLEX)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_AUTO_NEG", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_AUTO_NEG)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_TCPIP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_TCPIP_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_RTSP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_RTSP_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_DEVICE_HOSTING_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_DEVICE_HOSTING_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_CONFIG_NOT_ALLOWED", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_CONFIG_NOT_ALLOWED)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_ICS_SFP", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_ICS_SFP)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_LINK_MODE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_LINK_MODE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_PHY_MODE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_PHY_MODE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_LINK_MODE_AUTO", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_LINK_MODE_AUTO)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_COMPL_MODE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_COMPL_MODE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_PKT_CHECK", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_PKT_CHECK)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_PKT_GEN", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_PKT_GEN)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_IP_CONFIG_NOT_ALLOWED", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_IP_CONFIG_NOT_ALLOWED)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_CUT_THRU_TAP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_CUT_THRU_TAP_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_SNF_TAP_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_SNF_TAP_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_DISABLE_TAP_TO_HOST", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_DISABLE_TAP_TO_HOST)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_MACSEC_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_MACSEC_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_SHOW_TAP_TX_RECEIPT", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_SHOW_TAP_TX_RECEIPT)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_TCP_COMM_STATIC_PORT_ENABLE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_TCP_COMM_STATIC_PORT_ENABLE)); + result += PyModule_AddObjectRef(module, "ETHERNET_SETTINGS10G_FLAG_COMM_IN_USE", PyLong_FromLongLong(ETHERNET_SETTINGS10G_FLAG_COMM_IN_USE)); + result += PyModule_AddObjectRef(module, "ETHERNET10G_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(ETHERNET10G_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(ETHERNET10T1S_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_FLAG_ENABLE_PLCA", PyLong_FromLongLong(ETHERNET10T1S_SETTINGS_FLAG_ENABLE_PLCA)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_FLAG_TERMINATION", PyLong_FromLongLong(ETHERNET10T1S_SETTINGS_FLAG_TERMINATION)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_FLAG_BUS_DECODING_BEACONS", PyLong_FromLongLong(ETHERNET10T1S_SETTINGS_FLAG_BUS_DECODING_BEACONS)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_FLAG_BUS_DECODING_ALL", PyLong_FromLongLong(ETHERNET10T1S_SETTINGS_FLAG_BUS_DECODING_ALL)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_FLAG_ENABLE_PLCA_COL_DET", PyLong_FromLongLong(ETHERNET10T1S_SETTINGS_FLAG_ENABLE_PLCA_COL_DET)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_FLAG_ENABLE_CSMA_FALLBACK", PyLong_FromLongLong(ETHERNET10T1S_SETTINGS_FLAG_ENABLE_CSMA_FALLBACK)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_FLAG_DISABLE_ALL_DECODING", PyLong_FromLongLong(ETHERNET10T1S_SETTINGS_FLAG_DISABLE_ALL_DECODING)); + result += PyModule_AddObjectRef(module, "ETHERNET10T1S_SETTINGS_EXT_SIZE", PyLong_FromUnsignedLongLong(ETHERNET10T1S_SETTINGS_EXT_SIZE)); // enum - result += PyModule_AddIntMacro(module, MACSEC_PACKET_NO_VLAN_OR_MPLS); - result += PyModule_AddIntMacro(module, MACSEC_PACKET_SINGLE_VLAN); - result += PyModule_AddIntMacro(module, MACSEC_PACKET_DUAL_VLAN); - result += PyModule_AddIntMacro(module, MACSEC_PACKET_MPLS); - result += PyModule_AddIntMacro(module, MACSEC_PACKET_SINGLE_VLAN_FOLLOW_BY_MPLS); - result += PyModule_AddIntMacro(module, MACSEC_PACKET_DUAL_VLAN_FOLLOW_BY_MPLS); - result += PyModule_AddIntMacro(module, MACSEC_PACKET_UNSUPPORTED_TYPE); + result += PyModule_AddObjectRef(module, "MACSEC_PACKET_NO_VLAN_OR_MPLS", PyLong_FromLongLong(MACSEC_PACKET_NO_VLAN_OR_MPLS)); + result += PyModule_AddObjectRef(module, "MACSEC_PACKET_SINGLE_VLAN", PyLong_FromLongLong(MACSEC_PACKET_SINGLE_VLAN)); + result += PyModule_AddObjectRef(module, "MACSEC_PACKET_DUAL_VLAN", PyLong_FromLongLong(MACSEC_PACKET_DUAL_VLAN)); + result += PyModule_AddObjectRef(module, "MACSEC_PACKET_MPLS", PyLong_FromLongLong(MACSEC_PACKET_MPLS)); + result += PyModule_AddObjectRef(module, "MACSEC_PACKET_SINGLE_VLAN_FOLLOW_BY_MPLS", PyLong_FromLongLong(MACSEC_PACKET_SINGLE_VLAN_FOLLOW_BY_MPLS)); + result += PyModule_AddObjectRef(module, "MACSEC_PACKET_DUAL_VLAN_FOLLOW_BY_MPLS", PyLong_FromLongLong(MACSEC_PACKET_DUAL_VLAN_FOLLOW_BY_MPLS)); + result += PyModule_AddObjectRef(module, "MACSEC_PACKET_UNSUPPORTED_TYPE", PyLong_FromLongLong(MACSEC_PACKET_UNSUPPORTED_TYPE)); // end of enum - } MACSEC_PACKET_TYPE; - result += PyModule_AddIntMacro(module, MACSEC_SETTINGS_RULE_SIZE); - result += PyModule_AddIntMacro(module, MACSEC_SETTINGS_MAP_SIZE); + result += PyModule_AddObjectRef(module, "MACSEC_SETTINGS_RULE_SIZE", PyLong_FromLongLong(MACSEC_SETTINGS_RULE_SIZE)); + result += PyModule_AddObjectRef(module, "MACSEC_SETTINGS_MAP_SIZE", PyLong_FromLongLong(MACSEC_SETTINGS_MAP_SIZE)); // enum - result += PyModule_AddIntMacro(module, MACSEC_VF_DISABLED); - result += PyModule_AddIntMacro(module, MACSEC_VF_CHECK); - result += PyModule_AddIntMacro(module, MACSEC_VF_STRICT); - result += PyModule_AddIntMacro(module, MACSEC_VF_NA); + result += PyModule_AddObjectRef(module, "MACSEC_VF_DISABLED", PyLong_FromLongLong(MACSEC_VF_DISABLED)); + result += PyModule_AddObjectRef(module, "MACSEC_VF_CHECK", PyLong_FromLongLong(MACSEC_VF_CHECK)); + result += PyModule_AddObjectRef(module, "MACSEC_VF_STRICT", PyLong_FromLongLong(MACSEC_VF_STRICT)); + result += PyModule_AddObjectRef(module, "MACSEC_VF_NA", PyLong_FromLongLong(MACSEC_VF_NA)); // end of enum - } MACSEC_VALIDATEFRAME; // enum - result += PyModule_AddIntMacro(module, MACSEC_SECTAG_ICV_BOTH_STRIP); - result += PyModule_AddIntMacro(module, MACSEC_SECTAG_ICV_RESERVED); - result += PyModule_AddIntMacro(module, MACSEC_SECTAG_ICV_STRIP_ICV_ONLY); - result += PyModule_AddIntMacro(module, MACSEC_SECTAG_ICV_NO_STRIP); + result += PyModule_AddObjectRef(module, "MACSEC_SECTAG_ICV_BOTH_STRIP", PyLong_FromLongLong(MACSEC_SECTAG_ICV_BOTH_STRIP)); + result += PyModule_AddObjectRef(module, "MACSEC_SECTAG_ICV_RESERVED", PyLong_FromLongLong(MACSEC_SECTAG_ICV_RESERVED)); + result += PyModule_AddObjectRef(module, "MACSEC_SECTAG_ICV_STRIP_ICV_ONLY", PyLong_FromLongLong(MACSEC_SECTAG_ICV_STRIP_ICV_ONLY)); + result += PyModule_AddObjectRef(module, "MACSEC_SECTAG_ICV_NO_STRIP", PyLong_FromLongLong(MACSEC_SECTAG_ICV_NO_STRIP)); // end of enum - } MACSEC_STRIP_SECTAG_ICV; // enum - result += PyModule_AddIntMacro(module, MACSEC_CIPHER_GCM_AES_128); - result += PyModule_AddIntMacro(module, MACSEC_CIPHER_GCM_AES_256); - result += PyModule_AddIntMacro(module, MACSEC_CIPHER_GCM_AES_128_XPN); - result += PyModule_AddIntMacro(module, MACSEC_CIPHER_GCM_AES_256_XPN); + result += PyModule_AddObjectRef(module, "MACSEC_CIPHER_GCM_AES_128", PyLong_FromLongLong(MACSEC_CIPHER_GCM_AES_128)); + result += PyModule_AddObjectRef(module, "MACSEC_CIPHER_GCM_AES_256", PyLong_FromLongLong(MACSEC_CIPHER_GCM_AES_256)); + result += PyModule_AddObjectRef(module, "MACSEC_CIPHER_GCM_AES_128_XPN", PyLong_FromLongLong(MACSEC_CIPHER_GCM_AES_128_XPN)); + result += PyModule_AddObjectRef(module, "MACSEC_CIPHER_GCM_AES_256_XPN", PyLong_FromLongLong(MACSEC_CIPHER_GCM_AES_256_XPN)); // end of enum - } MACSEC_CIPHER_SUITE; - result += PyModule_AddIntMacro(module, MACSEC_SETTINGS_SECY_SIZE); - result += PyModule_AddIntMacro(module, MACSEC_SETTINGS_SC_SIZE); - result += PyModule_AddIntMacro(module, MACSEC_SETTINGS_SA_SIZE); - result += PyModule_AddIntMacro(module, MACSEC_SETTINGS_FLAGS_SIZE); - result += PyModule_AddIntMacro(module, MACSEC_NUM_FLAGS_PER_CONFIG); - result += PyModule_AddIntMacro(module, MACSEC_NUM_RULES_PER_CONFIG); - result += PyModule_AddIntMacro(module, MACSEC_NUM_MAPS_PER_CONFIG); - result += PyModule_AddIntMacro(module, MACSEC_NUM_SECY_PER_CONFIG); - result += PyModule_AddIntMacro(module, MACSEC_NUM_SC_PER_CONFIG); - result += PyModule_AddIntMacro(module, MACSEC_NUM_SA_PER_CONFIG); - result += PyModule_AddIntMacro(module, MACSEC_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, LOGGER_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, DISK_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, CANTERM_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, TIMESYNC_ICSHARDWARE_SETTINGS_SIZE); + result += PyModule_AddObjectRef(module, "MACSEC_SETTINGS_SECY_SIZE", PyLong_FromLongLong(MACSEC_SETTINGS_SECY_SIZE)); + result += PyModule_AddObjectRef(module, "MACSEC_SETTINGS_SC_SIZE", PyLong_FromLongLong(MACSEC_SETTINGS_SC_SIZE)); + result += PyModule_AddObjectRef(module, "MACSEC_SETTINGS_SA_SIZE", PyLong_FromLongLong(MACSEC_SETTINGS_SA_SIZE)); + result += PyModule_AddObjectRef(module, "MACSEC_SETTINGS_FLAGS_SIZE", PyLong_FromLongLong(MACSEC_SETTINGS_FLAGS_SIZE)); + result += PyModule_AddObjectRef(module, "MACSEC_NUM_FLAGS_PER_CONFIG", PyLong_FromLongLong(MACSEC_NUM_FLAGS_PER_CONFIG)); + result += PyModule_AddObjectRef(module, "MACSEC_NUM_RULES_PER_CONFIG", PyLong_FromLongLong(MACSEC_NUM_RULES_PER_CONFIG)); + result += PyModule_AddObjectRef(module, "MACSEC_NUM_MAPS_PER_CONFIG", PyLong_FromLongLong(MACSEC_NUM_MAPS_PER_CONFIG)); + result += PyModule_AddObjectRef(module, "MACSEC_NUM_SECY_PER_CONFIG", PyLong_FromLongLong(MACSEC_NUM_SECY_PER_CONFIG)); + result += PyModule_AddObjectRef(module, "MACSEC_NUM_SC_PER_CONFIG", PyLong_FromLongLong(MACSEC_NUM_SC_PER_CONFIG)); + result += PyModule_AddObjectRef(module, "MACSEC_NUM_SA_PER_CONFIG", PyLong_FromLongLong(MACSEC_NUM_SA_PER_CONFIG)); + result += PyModule_AddObjectRef(module, "MACSEC_SETTINGS_SIZE", PyLong_FromLongLong(MACSEC_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "LOGGER_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(LOGGER_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "DISK_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(DISK_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "CANTERM_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(CANTERM_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "TIMESYNC_ICSHARDWARE_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(TIMESYNC_ICSHARDWARE_SETTINGS_SIZE)); // enum - result += PyModule_AddIntMacro(module, DiskFormatUnknown); - result += PyModule_AddIntMacro(module, DiskFormatFAT32); - result += PyModule_AddIntMacro(module, DiskFormatexFAT); + result += PyModule_AddObjectRef(module, "DiskFormatUnknown", PyLong_FromLongLong(DiskFormatUnknown)); + result += PyModule_AddObjectRef(module, "DiskFormatFAT32", PyLong_FromLongLong(DiskFormatFAT32)); + result += PyModule_AddObjectRef(module, "DiskFormatexFAT", PyLong_FromLongLong(DiskFormatexFAT)); // end of enum - } EDiskFormat; // enum - result += PyModule_AddIntMacro(module, DiskLayoutSpanned); - result += PyModule_AddIntMacro(module, DiskLayoutRAID0); - result += PyModule_AddIntMacro(module, DiskLayoutRAID1); - result += PyModule_AddIntMacro(module, DiskLayoutRAID5); - result += PyModule_AddIntMacro(module, DiskLayoutIndividual); + result += PyModule_AddObjectRef(module, "DiskLayoutSpanned", PyLong_FromLongLong(DiskLayoutSpanned)); + result += PyModule_AddObjectRef(module, "DiskLayoutRAID0", PyLong_FromLongLong(DiskLayoutRAID0)); + result += PyModule_AddObjectRef(module, "DiskLayoutRAID1", PyLong_FromLongLong(DiskLayoutRAID1)); + result += PyModule_AddObjectRef(module, "DiskLayoutRAID5", PyLong_FromLongLong(DiskLayoutRAID5)); + result += PyModule_AddObjectRef(module, "DiskLayoutIndividual", PyLong_FromLongLong(DiskLayoutIndividual)); // end of enum - } EDiskLayout; - result += PyModule_AddIntMacro(module, DISK_STATUS_FLAG_PRESENT); - result += PyModule_AddIntMacro(module, DISK_STATUS_FLAG_INITIALIZED); - result += PyModule_AddIntMacro(module, SDiskStatus_SIZE); - result += PyModule_AddIntMacro(module, DISK_STRUCTURE_FLAG_FULL_FORMAT); - result += PyModule_AddIntMacro(module, SDiskStructure_SIZE); - result += PyModule_AddIntMacro(module, SDiskDetails_SIZE); - result += PyModule_AddIntMacro(module, SDiskFormatProgress_SIZE); + result += PyModule_AddObjectRef(module, "DISK_STATUS_FLAG_PRESENT", PyLong_FromLongLong(DISK_STATUS_FLAG_PRESENT)); + result += PyModule_AddObjectRef(module, "DISK_STATUS_FLAG_INITIALIZED", PyLong_FromLongLong(DISK_STATUS_FLAG_INITIALIZED)); + result += PyModule_AddObjectRef(module, "SDiskStatus_SIZE", PyLong_FromUnsignedLongLong(SDiskStatus_SIZE)); + result += PyModule_AddObjectRef(module, "DISK_STRUCTURE_FLAG_FULL_FORMAT", PyLong_FromLongLong(DISK_STRUCTURE_FLAG_FULL_FORMAT)); + result += PyModule_AddObjectRef(module, "SDiskStructure_SIZE", PyLong_FromUnsignedLongLong(SDiskStructure_SIZE)); + result += PyModule_AddObjectRef(module, "SDiskDetails_SIZE", PyLong_FromUnsignedLongLong(SDiskDetails_SIZE)); + result += PyModule_AddObjectRef(module, "SDiskFormatProgress_SIZE", PyLong_FromUnsignedLongLong(SDiskFormatProgress_SIZE)); // enum - result += PyModule_AddIntMacro(module, EXTENDED_RESPONSE_OK); - result += PyModule_AddIntMacro(module, EXTENDED_RESPONSE_INVALID_COMMAND); - result += PyModule_AddIntMacro(module, EXTENDED_RESPONSE_INVALID_STATE); - result += PyModule_AddIntMacro(module, EXTENDED_RESPONSE_OPERATION_FAILED); - result += PyModule_AddIntMacro(module, EXTENDED_RESPONSE_OPERATION_PENDING); - result += PyModule_AddIntMacro(module, EXTENDED_RESPONSE_INVALID_PARAMETER); + result += PyModule_AddObjectRef(module, "EXTENDED_RESPONSE_OK", PyLong_FromLongLong(EXTENDED_RESPONSE_OK)); + result += PyModule_AddObjectRef(module, "EXTENDED_RESPONSE_INVALID_COMMAND", PyLong_FromLongLong(EXTENDED_RESPONSE_INVALID_COMMAND)); + result += PyModule_AddObjectRef(module, "EXTENDED_RESPONSE_INVALID_STATE", PyLong_FromLongLong(EXTENDED_RESPONSE_INVALID_STATE)); + result += PyModule_AddObjectRef(module, "EXTENDED_RESPONSE_OPERATION_FAILED", PyLong_FromLongLong(EXTENDED_RESPONSE_OPERATION_FAILED)); + result += PyModule_AddObjectRef(module, "EXTENDED_RESPONSE_OPERATION_PENDING", PyLong_FromLongLong(EXTENDED_RESPONSE_OPERATION_PENDING)); + result += PyModule_AddObjectRef(module, "EXTENDED_RESPONSE_INVALID_PARAMETER", PyLong_FromLongLong(EXTENDED_RESPONSE_INVALID_PARAMETER)); // end of enum - } ExtendedResponseCode; - result += PyModule_AddIntMacro(module, GENERIC_API_DATA_BUFFER_SIZE); - result += PyModule_AddIntMacro(module, GET_SUPPORTED_FEATURES_COMMAND_VERSION); - result += PyModule_AddIntMacro(module, MAX_REPORTED_VERSIONS); - // enum - result += PyModule_AddIntMacro(module, swUpdateWrite); - result += PyModule_AddIntMacro(module, swUpdateErase); - result += PyModule_AddIntMacro(module, swUpdateGetProgress); - result += PyModule_AddIntMacro(module, swUpdateValidateAll); - result += PyModule_AddIntMacro(module, swUpdateGetBufferSize); - result += PyModule_AddIntMacro(module, swUpdateCheckHostVersion); - result += PyModule_AddIntMacro(module, swUpdateValidateComponent); - result += PyModule_AddIntMacro(module, swUpdateFinalize); - result += PyModule_AddIntMacro(module, swUpdateGetCommunicationVersion); - result += PyModule_AddIntMacro(module, swUpdateCheckFwVersion); - // end of enum - }; - - result += PyModule_AddIntMacro(module, SExtSubCmdHdr_SIZE); - result += PyModule_AddIntMacro(module, MACADDR_LEN); - result += PyModule_AddIntMacro(module, MULTI_MACADDR_CNT); - result += PyModule_AddIntMacro(module, GENERIC_BINARY_STATUS_ERROR_UNKNOWN_BINARY); - result += PyModule_AddIntMacro(module, GENERIC_BINARY_STATUS_ERROR_OVERSIZE); - result += PyModule_AddIntMacro(module, GENERIC_BINARY_STATUS_ERROR_BINARY_EMPTY); - result += PyModule_AddIntMacro(module, GENERIC_BINARY_STATUS_ERROR_ANY_MASK); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_ENABLE); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_RTSP_ENABLE); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_AUTO_DET_RES_ENABLE); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_CONFIG_ENABLE); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_LOGGING_ENABLE); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_TX0_ENABLE); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_TX1_ENABLE); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_TX2_ENABLE); - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_FLAG_TX3_ENABLE); + result += PyModule_AddObjectRef(module, "GENERIC_API_DATA_BUFFER_SIZE", PyLong_FromUnsignedLongLong(GENERIC_API_DATA_BUFFER_SIZE)); + result += PyModule_AddObjectRef(module, "MACADDR_LEN", PyLong_FromUnsignedLongLong(MACADDR_LEN)); + result += PyModule_AddObjectRef(module, "MULTI_MACADDR_CNT", PyLong_FromUnsignedLongLong(MULTI_MACADDR_CNT)); + result += PyModule_AddObjectRef(module, "GENERIC_BINARY_STATUS_ERROR_UNKNOWN_BINARY", PyLong_FromLongLong(GENERIC_BINARY_STATUS_ERROR_UNKNOWN_BINARY)); + result += PyModule_AddObjectRef(module, "GENERIC_BINARY_STATUS_ERROR_OVERSIZE", PyLong_FromLongLong(GENERIC_BINARY_STATUS_ERROR_OVERSIZE)); + result += PyModule_AddObjectRef(module, "GENERIC_BINARY_STATUS_ERROR_BINARY_EMPTY", PyLong_FromLongLong(GENERIC_BINARY_STATUS_ERROR_BINARY_EMPTY)); + result += PyModule_AddObjectRef(module, "GENERIC_BINARY_STATUS_ERROR_ANY_MASK", PyLong_FromLongLong(GENERIC_BINARY_STATUS_ERROR_ANY_MASK)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_RTSP_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_RTSP_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_AUTO_DET_RES_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_AUTO_DET_RES_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_CONFIG_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_CONFIG_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_LOGGING_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_LOGGING_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_TX0_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_TX0_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_TX1_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_TX1_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_TX2_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_TX2_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_FLAG_TX3_ENABLE", PyLong_FromLongLong(SERDESCAM_SETTINGS_FLAG_TX3_ENABLE)); // enum - result += PyModule_AddIntMacro(module, SERDESCAM_MODE_TAP_REPEATER); - result += PyModule_AddIntMacro(module, SERDESCAM_MODE_SPLITTER); - result += PyModule_AddIntMacro(module, SERDESCAM_MODE_LOG_ONLY); - result += PyModule_AddIntMacro(module, SERDESCAM_MODE_CUSTOM); - result += PyModule_AddIntMacro(module, SERDESCAM_MODE_COUNT); + result += PyModule_AddObjectRef(module, "SERDESCAM_MODE_TAP_REPEATER", PyLong_FromLongLong(SERDESCAM_MODE_TAP_REPEATER)); + result += PyModule_AddObjectRef(module, "SERDESCAM_MODE_SPLITTER", PyLong_FromLongLong(SERDESCAM_MODE_SPLITTER)); + result += PyModule_AddObjectRef(module, "SERDESCAM_MODE_LOG_ONLY", PyLong_FromLongLong(SERDESCAM_MODE_LOG_ONLY)); + result += PyModule_AddObjectRef(module, "SERDESCAM_MODE_CUSTOM", PyLong_FromLongLong(SERDESCAM_MODE_CUSTOM)); + result += PyModule_AddObjectRef(module, "SERDESCAM_MODE_COUNT", PyLong_FromLongLong(SERDESCAM_MODE_COUNT)); // end of enum - }; // enum - result += PyModule_AddIntMacro(module, SERDESCAM_PIXEL_BIT_POS_0); - result += PyModule_AddIntMacro(module, SERDESCAM_PIXEL_BIT_POS_1); - result += PyModule_AddIntMacro(module, SERDESCAM_PIXEL_BIT_POS_2); - result += PyModule_AddIntMacro(module, SERDESCAM_PIXEL_BIT_POS_3); + result += PyModule_AddObjectRef(module, "SERDESCAM_PIXEL_BIT_POS_0", PyLong_FromLongLong(SERDESCAM_PIXEL_BIT_POS_0)); + result += PyModule_AddObjectRef(module, "SERDESCAM_PIXEL_BIT_POS_1", PyLong_FromLongLong(SERDESCAM_PIXEL_BIT_POS_1)); + result += PyModule_AddObjectRef(module, "SERDESCAM_PIXEL_BIT_POS_2", PyLong_FromLongLong(SERDESCAM_PIXEL_BIT_POS_2)); + result += PyModule_AddObjectRef(module, "SERDESCAM_PIXEL_BIT_POS_3", PyLong_FromLongLong(SERDESCAM_PIXEL_BIT_POS_3)); // end of enum - }; // enum - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_NONE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_UYVY_422_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_YUYV_422_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_YVYU_422_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_VYUY_422_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_10); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_12); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_16); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_20); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_24); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_30); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_32); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_36); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RGB888); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_UYVY_422_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_YUYV_422_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_YVYU_422_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_VYUY_422_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16LE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16BE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_JPEG); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_UYVY_422_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_YUYV_422_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_YVYU_422_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_VYUY_422_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_YUV422_10LE_PLANAR); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_YUV422_16LE_PLANAR); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RGB565); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RGB666); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_11x2); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_12x2); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_RAW_14); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RGB565); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RGB666); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RGB888); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_10); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_11x2); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_12); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_12x2); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_14); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_16); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_20); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_24); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_30); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_32); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_RAW_36); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16LE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16BE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16LE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16BE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16LE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16BE); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_8); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_10LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_12LE_PACKED); - result += PyModule_AddIntMacro(module, SERDESCAM_VIDEO_FORMAT_COUNT); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_NONE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_NONE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_UYVY_422_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_UYVY_422_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_YUYV_422_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_YUYV_422_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_YVYU_422_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_YVYU_422_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_VYUY_422_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_VYUY_422_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_10", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_10)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_12", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_12)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_16", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_16)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_20", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_20)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_24", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_24)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_30", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_30)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_32", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_32)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_36", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_36)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RGB888", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RGB888)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_UYVY_422_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_UYVY_422_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_YUYV_422_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_YUYV_422_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_YVYU_422_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_YVYU_422_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_VYUY_422_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_VYUY_422_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16LE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16LE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16BE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_BGGR_16BE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_JPEG", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_JPEG)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_UYVY_422_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_UYVY_422_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_YUYV_422_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_YUYV_422_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_YVYU_422_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_YVYU_422_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_VYUY_422_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_VYUY_422_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_YUV422_10LE_PLANAR", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_YUV422_10LE_PLANAR)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_YUV422_16LE_PLANAR", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_YUV422_16LE_PLANAR)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RGB565", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RGB565)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RGB666", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RGB666)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_11x2", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_11x2)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_12x2", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_12x2)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_RAW_14", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_RAW_14)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_UYVY_422_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_YUYV_422_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_YVYU_422_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_VYUY_422_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RGB565", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RGB565)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RGB666", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RGB666)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RGB888", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RGB888)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_BGGR_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_10", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_10)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_11x2", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_11x2)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_12", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_12)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_12x2", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_12x2)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_14", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_14)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_16", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_16)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_20", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_20)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_24", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_24)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_30", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_30)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_32", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_32)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_RAW_36", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_RAW_36)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16LE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16LE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16BE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_RGGB_16BE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_RGGB_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16LE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16LE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16BE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GBRG_16BE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GBRG_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16LE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16LE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16BE", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_BAYER_GRBG_16BE)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_8", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_8)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_10LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_10LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_12LE_PACKED", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_CSI2_BAYER_GRBG_12LE_PACKED)); + result += PyModule_AddObjectRef(module, "SERDESCAM_VIDEO_FORMAT_COUNT", PyLong_FromLongLong(SERDESCAM_VIDEO_FORMAT_COUNT)); // end of enum - }; - result += PyModule_AddIntMacro(module, SERDESCAM_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, SERDESPOC_SETTINGS_MODE_DISABLED); - result += PyModule_AddIntMacro(module, SERDESPOC_SETTINGS_MODE_SUPPLY); - result += PyModule_AddIntMacro(module, SERDESPOC_SETTINGS_MODE_SERIALIZER); - result += PyModule_AddIntMacro(module, SERDESPOC_SETTINGS_SIZE); + result += PyModule_AddObjectRef(module, "SERDESCAM_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(SERDESCAM_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "SERDESPOC_SETTINGS_MODE_DISABLED", PyLong_FromLongLong(SERDESPOC_SETTINGS_MODE_DISABLED)); + result += PyModule_AddObjectRef(module, "SERDESPOC_SETTINGS_MODE_SUPPLY", PyLong_FromLongLong(SERDESPOC_SETTINGS_MODE_SUPPLY)); + result += PyModule_AddObjectRef(module, "SERDESPOC_SETTINGS_MODE_SERIALIZER", PyLong_FromLongLong(SERDESPOC_SETTINGS_MODE_SERIALIZER)); + result += PyModule_AddObjectRef(module, "SERDESPOC_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(SERDESPOC_SETTINGS_SIZE)); // enum - result += PyModule_AddIntMacro(module, SERDESGEN_MOD_ID_NONE); - result += PyModule_AddIntMacro(module, SERDESGEN_MOD_ID_FPD3_2x2); - result += PyModule_AddIntMacro(module, SERDESGEN_MOD_ID_GMSL2_2x2); - result += PyModule_AddIntMacro(module, SERDESGEN_MOD_ID_GMSL1_4x4); - result += PyModule_AddIntMacro(module, SERDESGEN_MOD_ID_FPD3_TO_GMSL2_2x2); - result += PyModule_AddIntMacro(module, SERDESGEN_MOD_ID_UNKNOWN); + result += PyModule_AddObjectRef(module, "SERDESGEN_MOD_ID_NONE", PyLong_FromLongLong(SERDESGEN_MOD_ID_NONE)); + result += PyModule_AddObjectRef(module, "SERDESGEN_MOD_ID_FPD3_2x2", PyLong_FromLongLong(SERDESGEN_MOD_ID_FPD3_2x2)); + result += PyModule_AddObjectRef(module, "SERDESGEN_MOD_ID_GMSL2_2x2", PyLong_FromLongLong(SERDESGEN_MOD_ID_GMSL2_2x2)); + result += PyModule_AddObjectRef(module, "SERDESGEN_MOD_ID_GMSL1_4x4", PyLong_FromLongLong(SERDESGEN_MOD_ID_GMSL1_4x4)); + result += PyModule_AddObjectRef(module, "SERDESGEN_MOD_ID_FPD3_TO_GMSL2_2x2", PyLong_FromLongLong(SERDESGEN_MOD_ID_FPD3_TO_GMSL2_2x2)); + result += PyModule_AddObjectRef(module, "SERDESGEN_MOD_ID_UNKNOWN", PyLong_FromLongLong(SERDESGEN_MOD_ID_UNKNOWN)); // end of enum - }; - result += PyModule_AddIntMacro(module, SERDESGEN_SETTINGS_FLAG_TX_PATGEN_ENABLE); - result += PyModule_AddIntMacro(module, SERDESGEN_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, RADMOONDUO_CONVERTER_SETTINGS_SIZE); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_TEMP_ENABLE); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_MIC2_GPS_ENABLE); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_INT_GPS_ENABLE); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_MIC2_GPS_ENABLE2); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_MISC1_DIN); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_MISC2_DIN); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_MISC1_PWMIN); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_MISC2_PWMIN); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_AIN1); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_SERDES_ENABLE); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_FAN_SPEED_ENABLE); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_FLAG_REPORT_ORIENTATION_ENABLE); - result += PyModule_AddIntMacro(module, RAD_REPORTING_SETTINGS_SIZE); + result += PyModule_AddObjectRef(module, "SERDESGEN_SETTINGS_FLAG_TX_PATGEN_ENABLE", PyLong_FromLongLong(SERDESGEN_SETTINGS_FLAG_TX_PATGEN_ENABLE)); + result += PyModule_AddObjectRef(module, "SERDESGEN_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(SERDESGEN_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_TEMP_ENABLE", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_TEMP_ENABLE)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_MIC2_GPS_ENABLE", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_MIC2_GPS_ENABLE)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_INT_GPS_ENABLE", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_INT_GPS_ENABLE)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_MIC2_GPS_ENABLE2", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_MIC2_GPS_ENABLE2)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_MISC1_DIN", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_MISC1_DIN)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_MISC2_DIN", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_MISC2_DIN)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_MISC1_PWMIN", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_MISC1_PWMIN)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_MISC2_PWMIN", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_MISC2_PWMIN)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_AIN1", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_AIN1)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_SERDES_ENABLE", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_SERDES_ENABLE)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_FAN_SPEED_ENABLE", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_FAN_SPEED_ENABLE)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_FLAG_REPORT_ORIENTATION_ENABLE", PyLong_FromLongLong(RAD_REPORTING_SETTINGS_FLAG_REPORT_ORIENTATION_ENABLE)); + result += PyModule_AddObjectRef(module, "RAD_REPORTING_SETTINGS_SIZE", PyLong_FromUnsignedLongLong(RAD_REPORTING_SETTINGS_SIZE)); // enum - result += PyModule_AddIntMacro(module, REPORT_ON_PERIODIC); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC1); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC2); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC3); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC4); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC5); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC6); - result += PyModule_AddIntMacro(module, REPORT_ON_LED1); - result += PyModule_AddIntMacro(module, REPORT_ON_LED2); - result += PyModule_AddIntMacro(module, REPORT_ON_KLINE); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC3_AIN); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC4_AIN); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC5_AIN); - result += PyModule_AddIntMacro(module, REPORT_ON_MISC6_AIN); - result += PyModule_AddIntMacro(module, REPORT_ON_GPS); + result += PyModule_AddObjectRef(module, "REPORT_ON_PERIODIC", PyLong_FromLongLong(REPORT_ON_PERIODIC)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC1", PyLong_FromLongLong(REPORT_ON_MISC1)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC2", PyLong_FromLongLong(REPORT_ON_MISC2)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC3", PyLong_FromLongLong(REPORT_ON_MISC3)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC4", PyLong_FromLongLong(REPORT_ON_MISC4)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC5", PyLong_FromLongLong(REPORT_ON_MISC5)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC6", PyLong_FromLongLong(REPORT_ON_MISC6)); + result += PyModule_AddObjectRef(module, "REPORT_ON_LED1", PyLong_FromLongLong(REPORT_ON_LED1)); + result += PyModule_AddObjectRef(module, "REPORT_ON_LED2", PyLong_FromLongLong(REPORT_ON_LED2)); + result += PyModule_AddObjectRef(module, "REPORT_ON_KLINE", PyLong_FromLongLong(REPORT_ON_KLINE)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC3_AIN", PyLong_FromLongLong(REPORT_ON_MISC3_AIN)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC4_AIN", PyLong_FromLongLong(REPORT_ON_MISC4_AIN)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC5_AIN", PyLong_FromLongLong(REPORT_ON_MISC5_AIN)); + result += PyModule_AddObjectRef(module, "REPORT_ON_MISC6_AIN", PyLong_FromLongLong(REPORT_ON_MISC6_AIN)); + result += PyModule_AddObjectRef(module, "REPORT_ON_GPS", PyLong_FromLongLong(REPORT_ON_GPS)); // end of enum - }; - result += PyModule_AddIntMacro(module, VNETBITS_FEATURE_ANDROID_MSGS); - result += PyModule_AddIntMacro(module, SFireSettings_SIZE); - result += PyModule_AddIntMacro(module, VNETBITS_FEATURE_ANDROID_MSGS); - result += PyModule_AddIntMacro(module, VNETBITS_FEATURE_DISABLE_USB_CHECK); - result += PyModule_AddIntMacro(module, SFireVnetSettings_SIZE); - result += PyModule_AddIntMacro(module, SCyanSettings_SIZE); - result += PyModule_AddIntMacro(module, SVCAN3Settings_SIZE); - result += PyModule_AddIntMacro(module, SVCAN4Settings_SIZE); - result += PyModule_AddIntMacro(module, SECUSettings_SIZE); - result += PyModule_AddIntMacro(module, SPendantSettings_SIZE); - result += PyModule_AddIntMacro(module, SIEVBSettings_SIZE); - result += PyModule_AddIntMacro(module, SEEVBSettings_SIZE); + result += PyModule_AddObjectRef(module, "VNETBITS_FEATURE_ANDROID_MSGS", PyLong_FromLongLong(VNETBITS_FEATURE_ANDROID_MSGS)); + result += PyModule_AddObjectRef(module, "SFireSettings_SIZE", PyLong_FromUnsignedLongLong(SFireSettings_SIZE)); + result += PyModule_AddObjectRef(module, "VNETBITS_FEATURE_ANDROID_MSGS", PyLong_FromLongLong(VNETBITS_FEATURE_ANDROID_MSGS)); + result += PyModule_AddObjectRef(module, "VNETBITS_FEATURE_DISABLE_USB_CHECK", PyLong_FromLongLong(VNETBITS_FEATURE_DISABLE_USB_CHECK)); + result += PyModule_AddObjectRef(module, "SFireVnetSettings_SIZE", PyLong_FromUnsignedLongLong(SFireVnetSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SCyanSettings_SIZE", PyLong_FromUnsignedLongLong(SCyanSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SVCAN3Settings_SIZE", PyLong_FromUnsignedLongLong(SVCAN3Settings_SIZE)); + result += PyModule_AddObjectRef(module, "SVCAN4Settings_SIZE", PyLong_FromUnsignedLongLong(SVCAN4Settings_SIZE)); + result += PyModule_AddObjectRef(module, "SECUSettings_SIZE", PyLong_FromUnsignedLongLong(SECUSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SPendantSettings_SIZE", PyLong_FromUnsignedLongLong(SPendantSettings_SIZE)); // enum - result += PyModule_AddIntMacro(module, ePortDisabled); - result += PyModule_AddIntMacro(module, ePortOpEth1); - result += PyModule_AddIntMacro(module, ePortOpEth2); - result += PyModule_AddIntMacro(module, ePortOpEth3); - result += PyModule_AddIntMacro(module, ePortOpEth4); - result += PyModule_AddIntMacro(module, ePortOpEth5); - result += PyModule_AddIntMacro(module, ePortOpEth6); - result += PyModule_AddIntMacro(module, ePortOpEth7); - result += PyModule_AddIntMacro(module, ePortOpEth8); - result += PyModule_AddIntMacro(module, ePortOpEth9); - result += PyModule_AddIntMacro(module, ePortOpEth10); - result += PyModule_AddIntMacro(module, ePortOpEth11); - result += PyModule_AddIntMacro(module, ePortOpEth12); - result += PyModule_AddIntMacro(module, ePortStdEth1); - result += PyModule_AddIntMacro(module, ePortStdEth2); - result += PyModule_AddIntMacro(module, ePortStdEth3); - result += PyModule_AddIntMacro(module, ePortOpEth13); - result += PyModule_AddIntMacro(module, ePortOpEth14); - result += PyModule_AddIntMacro(module, ePortOpEth15); - result += PyModule_AddIntMacro(module, ePortOpEth16); + result += PyModule_AddObjectRef(module, "ePortDisabled", PyLong_FromLongLong(ePortDisabled)); + result += PyModule_AddObjectRef(module, "ePortOpEth1", PyLong_FromLongLong(ePortOpEth1)); + result += PyModule_AddObjectRef(module, "ePortOpEth2", PyLong_FromLongLong(ePortOpEth2)); + result += PyModule_AddObjectRef(module, "ePortOpEth3", PyLong_FromLongLong(ePortOpEth3)); + result += PyModule_AddObjectRef(module, "ePortOpEth4", PyLong_FromLongLong(ePortOpEth4)); + result += PyModule_AddObjectRef(module, "ePortOpEth5", PyLong_FromLongLong(ePortOpEth5)); + result += PyModule_AddObjectRef(module, "ePortOpEth6", PyLong_FromLongLong(ePortOpEth6)); + result += PyModule_AddObjectRef(module, "ePortOpEth7", PyLong_FromLongLong(ePortOpEth7)); + result += PyModule_AddObjectRef(module, "ePortOpEth8", PyLong_FromLongLong(ePortOpEth8)); + result += PyModule_AddObjectRef(module, "ePortOpEth9", PyLong_FromLongLong(ePortOpEth9)); + result += PyModule_AddObjectRef(module, "ePortOpEth10", PyLong_FromLongLong(ePortOpEth10)); + result += PyModule_AddObjectRef(module, "ePortOpEth11", PyLong_FromLongLong(ePortOpEth11)); + result += PyModule_AddObjectRef(module, "ePortOpEth12", PyLong_FromLongLong(ePortOpEth12)); + result += PyModule_AddObjectRef(module, "ePortStdEth1", PyLong_FromLongLong(ePortStdEth1)); + result += PyModule_AddObjectRef(module, "ePortStdEth2", PyLong_FromLongLong(ePortStdEth2)); + result += PyModule_AddObjectRef(module, "ePortStdEth3", PyLong_FromLongLong(ePortStdEth3)); + result += PyModule_AddObjectRef(module, "ePortOpEth13", PyLong_FromLongLong(ePortOpEth13)); + result += PyModule_AddObjectRef(module, "ePortOpEth14", PyLong_FromLongLong(ePortOpEth14)); + result += PyModule_AddObjectRef(module, "ePortOpEth15", PyLong_FromLongLong(ePortOpEth15)); + result += PyModule_AddObjectRef(module, "ePortOpEth16", PyLong_FromLongLong(ePortOpEth16)); // end of enum - }; // enum - result += PyModule_AddIntMacro(module, eRoleDisabled); - result += PyModule_AddIntMacro(module, eRolePassive); - result += PyModule_AddIntMacro(module, eRoleMaster); - result += PyModule_AddIntMacro(module, eRoleSlave); + result += PyModule_AddObjectRef(module, "eRoleDisabled", PyLong_FromLongLong(eRoleDisabled)); + result += PyModule_AddObjectRef(module, "eRolePassive", PyLong_FromLongLong(eRolePassive)); + result += PyModule_AddObjectRef(module, "eRoleMaster", PyLong_FromLongLong(eRoleMaster)); + result += PyModule_AddObjectRef(module, "eRoleSlave", PyLong_FromLongLong(eRoleSlave)); // end of enum - }; // enum - result += PyModule_AddIntMacro(module, eGPTP_PROFILE_STANDARD); - result += PyModule_AddIntMacro(module, eGPTP_PROFILE_AUTOMOTIVE); + result += PyModule_AddObjectRef(module, "eGPTP_PROFILE_STANDARD", PyLong_FromLongLong(eGPTP_PROFILE_STANDARD)); + result += PyModule_AddObjectRef(module, "eGPTP_PROFILE_AUTOMOTIVE", PyLong_FromLongLong(eGPTP_PROFILE_AUTOMOTIVE)); // end of enum - }; - result += PyModule_AddIntMacro(module, SRADGalaxySettings_SIZE); - result += PyModule_AddIntMacro(module, SRADStar2Settings_SIZE); - result += PyModule_AddIntMacro(module, SRADSuperMoonSettings_SIZE); + result += PyModule_AddObjectRef(module, "SRADGalaxySettings_SIZE", PyLong_FromUnsignedLongLong(SRADGalaxySettings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADStar2Settings_SIZE", PyLong_FromUnsignedLongLong(SRADStar2Settings_SIZE)); // enum - result += PyModule_AddIntMacro(module, tdmModeTDM2); - result += PyModule_AddIntMacro(module, tdmModeTDM4); - result += PyModule_AddIntMacro(module, tdmModeTDM8); - result += PyModule_AddIntMacro(module, tdmModeTDM12); - result += PyModule_AddIntMacro(module, tdmModeTDM16); - result += PyModule_AddIntMacro(module, tdmModeTDM20); - result += PyModule_AddIntMacro(module, tdmModeTDM24); - result += PyModule_AddIntMacro(module, tdmModeTDM32); + result += PyModule_AddObjectRef(module, "tdmModeTDM2", PyLong_FromLongLong(tdmModeTDM2)); + result += PyModule_AddObjectRef(module, "tdmModeTDM4", PyLong_FromLongLong(tdmModeTDM4)); + result += PyModule_AddObjectRef(module, "tdmModeTDM8", PyLong_FromLongLong(tdmModeTDM8)); + result += PyModule_AddObjectRef(module, "tdmModeTDM12", PyLong_FromLongLong(tdmModeTDM12)); + result += PyModule_AddObjectRef(module, "tdmModeTDM16", PyLong_FromLongLong(tdmModeTDM16)); + result += PyModule_AddObjectRef(module, "tdmModeTDM20", PyLong_FromLongLong(tdmModeTDM20)); + result += PyModule_AddObjectRef(module, "tdmModeTDM24", PyLong_FromLongLong(tdmModeTDM24)); + result += PyModule_AddObjectRef(module, "tdmModeTDM32", PyLong_FromLongLong(tdmModeTDM32)); // end of enum - } A2BTDMMode; // enum - result += PyModule_AddIntMacro(module, a2bNodeTypeMonitor); - result += PyModule_AddIntMacro(module, a2bNodeTypeMaster); - result += PyModule_AddIntMacro(module, a2bNodeTypeSlave); + result += PyModule_AddObjectRef(module, "a2bNodeTypeMonitor", PyLong_FromLongLong(a2bNodeTypeMonitor)); + result += PyModule_AddObjectRef(module, "a2bNodeTypeMaster", PyLong_FromLongLong(a2bNodeTypeMaster)); + result += PyModule_AddObjectRef(module, "a2bNodeTypeSlave", PyLong_FromLongLong(a2bNodeTypeSlave)); // end of enum - } A2BNodeType; - result += PyModule_AddIntMacro(module, A2B_SETTINGS_FLAG_16BIT); - result += PyModule_AddIntMacro(module, A2BMonitorSettings_SIZE); - result += PyModule_AddIntMacro(module, SRADA2BSettings_SIZE); - result += PyModule_AddIntMacro(module, SRADMoon2Settings_SIZE); - result += PyModule_AddIntMacro(module, SRADMoon3Settings_SIZE); - result += PyModule_AddIntMacro(module, SRADGigalogSettings_SIZE); - result += PyModule_AddIntMacro(module, SRADGigastarSettings_SIZE); - result += PyModule_AddIntMacro(module, SRADGalaxy2Settings_SIZE); - result += PyModule_AddIntMacro(module, SVividCANSettings_SIZE); - result += PyModule_AddIntMacro(module, SOBD2SimSettings_SIZE); - result += PyModule_AddIntMacro(module, CmProbeSettings_SIZE); - result += PyModule_AddIntMacro(module, OBD2ProSettings_SIZE); - result += PyModule_AddIntMacro(module, VCAN412Settings_SIZE); - result += PyModule_AddIntMacro(module, SVCAN412Settings_SIZE); - result += PyModule_AddIntMacro(module, ECU_AVBSettings_SIZE); - result += PyModule_AddIntMacro(module, PLUTO_NUM_PORTS); - result += PyModule_AddIntMacro(module, PLUTO_NUM_PRIORITY); - result += PyModule_AddIntMacro(module, PLUTO_MAX_L2_POLICING); - result += PyModule_AddIntMacro(module, PLUTO_MAX_L2_ADDRESS_LOOKUP); - result += PyModule_AddIntMacro(module, PLUTO_MAX_VLAN_LOOKUP); - result += PyModule_AddIntMacro(module, PLUTO_MAX_FORWARDING_ENTRIES); - result += PyModule_AddIntMacro(module, PLUTO_MAX_MAC_CONFIG_ENTRIES); - result += PyModule_AddIntMacro(module, PLUTO_MAX_RETAGGING_ENTRIES); - result += PyModule_AddIntMacro(module, MAX_VL_POLICING_ENTRIES); - result += PyModule_AddIntMacro(module, MAX_VL_FORWARDING_ENTRIES); - result += PyModule_AddIntMacro(module, gPTP_ROLE_DISABLED); - result += PyModule_AddIntMacro(module, gPTP_ROLE_PASSIVE); - result += PyModule_AddIntMacro(module, gPTP_ROLE_MASTER); - result += PyModule_AddIntMacro(module, gPTP_ROLE_SLAVE); - result += PyModule_AddIntMacro(module, gPTP_PROFILE_STANDARD); - result += PyModule_AddIntMacro(module, gPTP_PROFILE_AUTOMOTIVE); - result += PyModule_AddIntMacro(module, gPTP_PORT_DISABLED); - result += PyModule_AddIntMacro(module, gPTP_PORT_ENABLED); - result += PyModule_AddIntMacro(module, SPlutoSwitchSettings_SIZE); - result += PyModule_AddIntMacro(module, SRADPlutoSettings_SIZE); - result += PyModule_AddIntMacro(module, CANHubSettings_SIZE); - result += PyModule_AddIntMacro(module, SFlexVnetzSettings_Size); + result += PyModule_AddObjectRef(module, "A2B_SETTINGS_FLAG_16BIT", PyLong_FromLongLong(A2B_SETTINGS_FLAG_16BIT)); + result += PyModule_AddObjectRef(module, "A2BMonitorSettings_SIZE", PyLong_FromUnsignedLongLong(A2BMonitorSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADA2BSettings_SIZE", PyLong_FromUnsignedLongLong(SRADA2BSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADMoon2Settings_SIZE", PyLong_FromUnsignedLongLong(SRADMoon2Settings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADMoon3Settings_SIZE", PyLong_FromUnsignedLongLong(SRADMoon3Settings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADGigastarSettings_SIZE", PyLong_FromUnsignedLongLong(SRADGigastarSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADGalaxy2Settings_SIZE", PyLong_FromUnsignedLongLong(SRADGalaxy2Settings_SIZE)); + result += PyModule_AddObjectRef(module, "SVividCANSettings_SIZE", PyLong_FromUnsignedLongLong(SVividCANSettings_SIZE)); + result += PyModule_AddObjectRef(module, "VCAN412Settings_SIZE", PyLong_FromUnsignedLongLong(VCAN412Settings_SIZE)); + result += PyModule_AddObjectRef(module, "SVCAN412Settings_SIZE", PyLong_FromLongLong(SVCAN412Settings_SIZE)); + result += PyModule_AddObjectRef(module, "gPTP_ROLE_DISABLED", PyLong_FromUnsignedLongLong(gPTP_ROLE_DISABLED)); + result += PyModule_AddObjectRef(module, "gPTP_ROLE_PASSIVE", PyLong_FromUnsignedLongLong(gPTP_ROLE_PASSIVE)); + result += PyModule_AddObjectRef(module, "gPTP_ROLE_MASTER", PyLong_FromUnsignedLongLong(gPTP_ROLE_MASTER)); + result += PyModule_AddObjectRef(module, "gPTP_ROLE_SLAVE", PyLong_FromUnsignedLongLong(gPTP_ROLE_SLAVE)); + result += PyModule_AddObjectRef(module, "gPTP_PROFILE_STANDARD", PyLong_FromUnsignedLongLong(gPTP_PROFILE_STANDARD)); + result += PyModule_AddObjectRef(module, "gPTP_PROFILE_AUTOMOTIVE", PyLong_FromUnsignedLongLong(gPTP_PROFILE_AUTOMOTIVE)); + result += PyModule_AddObjectRef(module, "gPTP_PORT_DISABLED", PyLong_FromUnsignedLongLong(gPTP_PORT_DISABLED)); + result += PyModule_AddObjectRef(module, "gPTP_PORT_ENABLED", PyLong_FromUnsignedLongLong(gPTP_PORT_ENABLED)); + result += PyModule_AddObjectRef(module, "CANHubSettings_SIZE", PyLong_FromUnsignedLongLong(CANHubSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SFlexVnetzSettings_Size", PyLong_FromLongLong(SFlexVnetzSettings_Size)); // enum - result += PyModule_AddIntMacro(module, flexVnetModeDisabled); - result += PyModule_AddIntMacro(module, flexVnetModeOneSingle); - result += PyModule_AddIntMacro(module, flexVnetModeOneDual); - result += PyModule_AddIntMacro(module, flexVnetModeTwoSingle); - result += PyModule_AddIntMacro(module, flexVnetModeColdStart); + result += PyModule_AddObjectRef(module, "flexVnetModeDisabled", PyLong_FromLongLong(flexVnetModeDisabled)); + result += PyModule_AddObjectRef(module, "flexVnetModeOneSingle", PyLong_FromLongLong(flexVnetModeOneSingle)); + result += PyModule_AddObjectRef(module, "flexVnetModeOneDual", PyLong_FromLongLong(flexVnetModeOneDual)); + result += PyModule_AddObjectRef(module, "flexVnetModeTwoSingle", PyLong_FromLongLong(flexVnetModeTwoSingle)); + result += PyModule_AddObjectRef(module, "flexVnetModeColdStart", PyLong_FromLongLong(flexVnetModeColdStart)); // end of enum - } flexVnetMode; - result += PyModule_AddIntMacro(module, SNeoECU12Settings_SIZE); - result += PyModule_AddIntMacro(module, VCAN4IndSettings_SIZE); - result += PyModule_AddIntMacro(module, OBD2LCSettings_SIZE); - result += PyModule_AddIntMacro(module, RADJUPITER_NUM_PORTS); - result += PyModule_AddIntMacro(module, SRADJupiterSettings_SIZE); - result += PyModule_AddIntMacro(module, LINUX_BOOT_ALLOWED); - result += PyModule_AddIntMacro(module, WIFI_ANTENNA_INTERNAL); - result += PyModule_AddIntMacro(module, WIFI_ANTENNA_EXTERNAL); - result += PyModule_AddIntMacro(module, LINUX_CONFIG_PORT_NONE); - result += PyModule_AddIntMacro(module, LINUX_CONFIG_PORT_ETH_01); - result += PyModule_AddIntMacro(module, LINUX_CONFIG_PORT_ETH_02); + result += PyModule_AddObjectRef(module, "SNeoECU12Settings_SIZE", PyLong_FromUnsignedLongLong(SNeoECU12Settings_SIZE)); + result += PyModule_AddObjectRef(module, "VCAN4IndSettings_SIZE", PyLong_FromLongLong(VCAN4IndSettings_SIZE)); + result += PyModule_AddObjectRef(module, "OBD2LCSettings_SIZE", PyLong_FromUnsignedLongLong(OBD2LCSettings_SIZE)); + result += PyModule_AddObjectRef(module, "RADJUPITER_NUM_PORTS", PyLong_FromUnsignedLongLong(RADJUPITER_NUM_PORTS)); + result += PyModule_AddObjectRef(module, "SRADJupiterSettings_SIZE", PyLong_FromUnsignedLongLong(SRADJupiterSettings_SIZE)); + result += PyModule_AddObjectRef(module, "LINUX_BOOT_ALLOWED", PyLong_FromLongLong(LINUX_BOOT_ALLOWED)); + result += PyModule_AddObjectRef(module, "WIFI_ANTENNA_INTERNAL", PyLong_FromLongLong(WIFI_ANTENNA_INTERNAL)); + result += PyModule_AddObjectRef(module, "WIFI_ANTENNA_EXTERNAL", PyLong_FromLongLong(WIFI_ANTENNA_EXTERNAL)); + result += PyModule_AddObjectRef(module, "LINUX_CONFIG_PORT_NONE", PyLong_FromLongLong(LINUX_CONFIG_PORT_NONE)); + result += PyModule_AddObjectRef(module, "LINUX_CONFIG_PORT_ETH_01", PyLong_FromLongLong(LINUX_CONFIG_PORT_ETH_01)); + result += PyModule_AddObjectRef(module, "LINUX_CONFIG_PORT_ETH_02", PyLong_FromLongLong(LINUX_CONFIG_PORT_ETH_02)); // enum - result += PyModule_AddIntMacro(module, NETWORK_TIMESYNC_OFF); - result += PyModule_AddIntMacro(module, NETWORK_TIMESYNC_AUTO); - result += PyModule_AddIntMacro(module, NETWORK_TIMESYNC_NTP_ONLY); - result += PyModule_AddIntMacro(module, NETWORK_TIMESYNC_GPS_ONLY); + result += PyModule_AddObjectRef(module, "NETWORK_TIMESYNC_OFF", PyLong_FromLongLong(NETWORK_TIMESYNC_OFF)); + result += PyModule_AddObjectRef(module, "NETWORK_TIMESYNC_AUTO", PyLong_FromLongLong(NETWORK_TIMESYNC_AUTO)); + result += PyModule_AddObjectRef(module, "NETWORK_TIMESYNC_NTP_ONLY", PyLong_FromLongLong(NETWORK_TIMESYNC_NTP_ONLY)); + result += PyModule_AddObjectRef(module, "NETWORK_TIMESYNC_GPS_ONLY", PyLong_FromLongLong(NETWORK_TIMESYNC_GPS_ONLY)); // end of enum - }; - result += PyModule_AddIntMacro(module, SRed2Settings_SIZE); - result += PyModule_AddIntMacro(module, SFire3Settings_SIZE); - result += PyModule_AddIntMacro(module, SFire3FlexraySettings_SIZE); - result += PyModule_AddIntMacro(module, RadMoonDuoSettings_SIZE); - result += PyModule_AddIntMacro(module, SEtherBadgeSettings_SIZE); - result += PyModule_AddIntMacro(module, RADEPSILON_NUM_PORTS); - result += PyModule_AddIntMacro(module, RADEPSILON_MAX_PHY); - result += PyModule_AddIntMacro(module, EPSILON_88Q6113_SWITCH_A); - result += PyModule_AddIntMacro(module, EPSILON_88Q6113_SWITCH_B); - result += PyModule_AddIntMacro(module, EPSILON_88Q6113_SWITCH_AB); + result += PyModule_AddObjectRef(module, "SRed2Settings_SIZE", PyLong_FromLongLong(SRed2Settings_SIZE)); + result += PyModule_AddObjectRef(module, "SFire3Settings_SIZE", PyLong_FromLongLong(SFire3Settings_SIZE)); + result += PyModule_AddObjectRef(module, "SFire3FlexraySettings_SIZE", PyLong_FromLongLong(SFire3FlexraySettings_SIZE)); + result += PyModule_AddObjectRef(module, "RADEPSILON_NUM_PORTS", PyLong_FromUnsignedLongLong(RADEPSILON_NUM_PORTS)); + result += PyModule_AddObjectRef(module, "RADEPSILON_MAX_PHY", PyLong_FromUnsignedLongLong(RADEPSILON_MAX_PHY)); + result += PyModule_AddObjectRef(module, "EPSILON_88Q6113_SWITCH_A", PyLong_FromUnsignedLongLong(EPSILON_88Q6113_SWITCH_A)); + result += PyModule_AddObjectRef(module, "EPSILON_88Q6113_SWITCH_B", PyLong_FromUnsignedLongLong(EPSILON_88Q6113_SWITCH_B)); + result += PyModule_AddObjectRef(module, "EPSILON_88Q6113_SWITCH_AB", PyLong_FromUnsignedLongLong(EPSILON_88Q6113_SWITCH_AB)); // enum - result += PyModule_AddIntMacro(module, EPSILON_10G_PHY1); - result += PyModule_AddIntMacro(module, EPSILON_10G_PHY2); + result += PyModule_AddObjectRef(module, "EPSILON_10G_PHY1", PyLong_FromLongLong(EPSILON_10G_PHY1)); + result += PyModule_AddObjectRef(module, "EPSILON_10G_PHY2", PyLong_FromLongLong(EPSILON_10G_PHY2)); // end of enum - } Epsilon_10G_PHY_select; - result += PyModule_AddIntMacro(module, SRADEpsilonSettings_SIZE); + result += PyModule_AddObjectRef(module, "SRADEpsilonSettings_SIZE", PyLong_FromUnsignedLongLong(SRADEpsilonSettings_SIZE)); + // enum + result += PyModule_AddObjectRef(module, "enumWILPortConfig_Single_Port_A", PyLong_FromLongLong(enumWILPortConfig_Single_Port_A)); + result += PyModule_AddObjectRef(module, "enumWILPortConfig_Single_Port_B", PyLong_FromLongLong(enumWILPortConfig_Single_Port_B)); + result += PyModule_AddObjectRef(module, "enumWILPortConfig_Dual_Port_A_And_B", PyLong_FromLongLong(enumWILPortConfig_Dual_Port_A_And_B)); + result += PyModule_AddObjectRef(module, "enumWILPortConfig_Single_Port_A_And_B", PyLong_FromLongLong(enumWILPortConfig_Single_Port_A_And_B)); + result += PyModule_AddObjectRef(module, "_enumWILPortConfig_Total", PyLong_FromLongLong(_enumWILPortConfig_Total)); + // end of enum - }; + // enum - result += PyModule_AddIntMacro(module, enumWILPortConfig_Single_Port_A); - result += PyModule_AddIntMacro(module, enumWILPortConfig_Single_Port_B); - result += PyModule_AddIntMacro(module, enumWILPortConfig_Dual_Port_A_And_B); - result += PyModule_AddIntMacro(module, enumWILPortConfig_Single_Port_A_And_B); - result += PyModule_AddIntMacro(module, _enumWILPortConfig_Total); + result += PyModule_AddObjectRef(module, "SPI_PORT_ONBOARD", PyLong_FromLongLong(SPI_PORT_ONBOARD)); + result += PyModule_AddObjectRef(module, "SPI_PORT_EXTERNAL", PyLong_FromLongLong(SPI_PORT_EXTERNAL)); // end of enum - }; // enum - result += PyModule_AddIntMacro(module, SPI_PORT_ONBOARD); - result += PyModule_AddIntMacro(module, SPI_PORT_EXTERNAL); + result += PyModule_AddObjectRef(module, "SPI_TYPE_WIL", PyLong_FromLongLong(SPI_TYPE_WIL)); + result += PyModule_AddObjectRef(module, "SPI_TYPE_RAW", PyLong_FromLongLong(SPI_TYPE_RAW)); // end of enum - }; // enum - result += PyModule_AddIntMacro(module, SPI_TYPE_WIL); - result += PyModule_AddIntMacro(module, SPI_TYPE_RAW); + result += PyModule_AddObjectRef(module, "SPI_MODE_MASTER", PyLong_FromLongLong(SPI_MODE_MASTER)); + result += PyModule_AddObjectRef(module, "SPI_MODE_SLAVE", PyLong_FromLongLong(SPI_MODE_SLAVE)); + result += PyModule_AddObjectRef(module, "SPI_MODE_PMS_EMULATION", PyLong_FromLongLong(SPI_MODE_PMS_EMULATION)); // end of enum - }; + result += PyModule_AddObjectRef(module, "WBMS_GATEWAY_NETWORK_NONE", PyLong_FromLongLong(WBMS_GATEWAY_NETWORK_NONE)); + result += PyModule_AddObjectRef(module, "WBMS_GATEWAY_NETWORK_DWCAN_01", PyLong_FromLongLong(WBMS_GATEWAY_NETWORK_DWCAN_01)); + result += PyModule_AddObjectRef(module, "WBMS_GATEWAY_NETWORK_DWCAN_02", PyLong_FromLongLong(WBMS_GATEWAY_NETWORK_DWCAN_02)); + result += PyModule_AddObjectRef(module, "WBMS_GATEWAY_NETWORK_UDP_MULTICAST", PyLong_FromLongLong(WBMS_GATEWAY_NETWORK_UDP_MULTICAST)); + result += PyModule_AddObjectRef(module, "SRADBMSSettings_SIZE", PyLong_FromUnsignedLongLong(SRADBMSSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADCometSettings_SIZE", PyLong_FromUnsignedLongLong(SRADCometSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADComet3Settings_SIZE", PyLong_FromUnsignedLongLong(SRADComet3Settings_SIZE)); + result += PyModule_AddObjectRef(module, "SRADGigastar2Settings_SIZE", PyLong_FromUnsignedLongLong(SRADGigastar2Settings_SIZE)); // enum - result += PyModule_AddIntMacro(module, SPI_MODE_MASTER); - result += PyModule_AddIntMacro(module, SPI_MODE_SLAVE); - result += PyModule_AddIntMacro(module, SPI_MODE_PMS_EMULATION); + result += PyModule_AddObjectRef(module, "GIGASTAR2_FW_VARIANT_6T1S_1CAN_16LIN", PyLong_FromLongLong(GIGASTAR2_FW_VARIANT_6T1S_1CAN_16LIN)); + result += PyModule_AddObjectRef(module, "GIGASTAR2_FW_VARIANT_8T1S_4CAN_6LIN", PyLong_FromLongLong(GIGASTAR2_FW_VARIANT_8T1S_4CAN_6LIN)); + result += PyModule_AddObjectRef(module, "GIGASTAR2_FW_VARIANT_COUNT", PyLong_FromLongLong(GIGASTAR2_FW_VARIANT_COUNT)); // end of enum - }; - result += PyModule_AddIntMacro(module, WBMS_GATEWAY_NETWORK_NONE); - result += PyModule_AddIntMacro(module, WBMS_GATEWAY_NETWORK_DWCAN_01); - result += PyModule_AddIntMacro(module, WBMS_GATEWAY_NETWORK_DWCAN_02); - result += PyModule_AddIntMacro(module, WBMS_GATEWAY_NETWORK_UDP_MULTICAST); - 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); + result += PyModule_AddObjectRef(module, "SRADMoonT1SSettings_SIZE", PyLong_FromUnsignedLongLong(SRADMoonT1SSettings_SIZE)); + result += PyModule_AddObjectRef(module, "SNeoVIConnectSettings_SIZE", PyLong_FromLongLong(SNeoVIConnectSettings_SIZE)); + result += PyModule_AddObjectRef(module, "GS_VERSION", PyLong_FromUnsignedLongLong(GS_VERSION)); + result += PyModule_AddObjectRef(module, "GLOBAL_SETTINGS_SIZE", PyLong_FromLongLong(GLOBAL_SETTINGS_SIZE)); + result += PyModule_AddObjectRef(module, "NEOVI_3G_MAX_SETTINGS_SIZE", PyLong_FromLongLong(NEOVI_3G_MAX_SETTINGS_SIZE)); // enum - result += PyModule_AddIntMacro(module, DeviceFireSettingsType); - result += PyModule_AddIntMacro(module, DeviceFireVnetSettingsType); - result += PyModule_AddIntMacro(module, DeviceFire2SettingsType); - result += PyModule_AddIntMacro(module, DeviceVCAN3SettingsType); - result += PyModule_AddIntMacro(module, DeviceRADGalaxySettingsType); - result += PyModule_AddIntMacro(module, DeviceRADStar2SettingsType); - result += PyModule_AddIntMacro(module, DeviceVCAN4SettingsType); - result += PyModule_AddIntMacro(module, DeviceVCAN412SettingsType); - result += PyModule_AddIntMacro(module, DeviceVividCANSettingsType); - result += PyModule_AddIntMacro(module, DeviceECU_AVBSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADSuperMoonSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADMoon2SettingsType); - result += PyModule_AddIntMacro(module, DeviceRADPlutoSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADGigalogSettingsType); - result += PyModule_AddIntMacro(module, DeviceDeprecatedType); - result += PyModule_AddIntMacro(module, DeviceEEVBSettingsType); - result += PyModule_AddIntMacro(module, DeviceVCAN4IndSettingsType); - result += PyModule_AddIntMacro(module, DeviceNeoECU12SettingsType); - result += PyModule_AddIntMacro(module, DeviceFlexVnetzSettingsType); - result += PyModule_AddIntMacro(module, DeviceCANHUBSettingsType); - result += PyModule_AddIntMacro(module, DeviceIEVBSettingsType); - result += PyModule_AddIntMacro(module, DeviceOBD2SimSettingsType); - result += PyModule_AddIntMacro(module, DeviceCMProbeSettingsType); - result += PyModule_AddIntMacro(module, DeviceOBD2ProSettingsType); - result += PyModule_AddIntMacro(module, DeviceRedSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADPlutoSwitchSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADGigastarSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADJupiterSettingsType); - result += PyModule_AddIntMacro(module, DeviceRed2SettingsType); - result += PyModule_AddIntMacro(module, DeviceRadMoonDuoSettingsType); - result += PyModule_AddIntMacro(module, DeviceEtherBadgeSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADA2BSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADEpsilonSettingsType); - result += PyModule_AddIntMacro(module, DeviceOBD2LCSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADBMSSettingsType); - result += PyModule_AddIntMacro(module, DeviceRADMoon3SettingsType); - result += PyModule_AddIntMacro(module, DeviceFire3SettingsType); - result += PyModule_AddIntMacro(module, DeviceFire3FlexraySettingsType); - result += PyModule_AddIntMacro(module, DeviceRADCometSettingsType); - 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); + result += PyModule_AddObjectRef(module, "DeviceFireSettingsType", PyLong_FromLongLong(DeviceFireSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceFireVnetSettingsType", PyLong_FromLongLong(DeviceFireVnetSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceFire2SettingsType", PyLong_FromLongLong(DeviceFire2SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceVCAN3SettingsType", PyLong_FromLongLong(DeviceVCAN3SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADGalaxySettingsType", PyLong_FromLongLong(DeviceRADGalaxySettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADStar2SettingsType", PyLong_FromLongLong(DeviceRADStar2SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceVCAN4SettingsType", PyLong_FromLongLong(DeviceVCAN4SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceVCAN412SettingsType", PyLong_FromLongLong(DeviceVCAN412SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceVividCANSettingsType", PyLong_FromLongLong(DeviceVividCANSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceECU_AVBSettingsTypeDeprecated", PyLong_FromLongLong(DeviceECU_AVBSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceRADSuperMoonSettingsTypeDeprecated", PyLong_FromLongLong(DeviceRADSuperMoonSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceRADMoon2SettingsType", PyLong_FromLongLong(DeviceRADMoon2SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADPlutoSettingsTypeDeprecated", PyLong_FromLongLong(DeviceRADPlutoSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceRADGigalogSettingsTypeDeprecated", PyLong_FromLongLong(DeviceRADGigalogSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceDeprecatedType", PyLong_FromLongLong(DeviceDeprecatedType)); + result += PyModule_AddObjectRef(module, "DeviceEEVBSettingsTypeDeprecated", PyLong_FromLongLong(DeviceEEVBSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceVCAN4IndSettingsType", PyLong_FromLongLong(DeviceVCAN4IndSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceNeoECU12SettingsType", PyLong_FromLongLong(DeviceNeoECU12SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceFlexVnetzSettingsType", PyLong_FromLongLong(DeviceFlexVnetzSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceCANHUBSettingsType", PyLong_FromLongLong(DeviceCANHUBSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceIEVBSettingsTypeDeprecated", PyLong_FromLongLong(DeviceIEVBSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceOBD2SimSettingsTypeDeprecated", PyLong_FromLongLong(DeviceOBD2SimSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceCMProbeSettingsTypeDeprecated", PyLong_FromLongLong(DeviceCMProbeSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceOBD2ProSettingsTypeDeprecated", PyLong_FromLongLong(DeviceOBD2ProSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceRedSettingsType", PyLong_FromLongLong(DeviceRedSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADPlutoSwitchSettingsTypeDeprecated", PyLong_FromLongLong(DeviceRADPlutoSwitchSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceRADGigastarSettingsType", PyLong_FromLongLong(DeviceRADGigastarSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADJupiterSettingsType", PyLong_FromLongLong(DeviceRADJupiterSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRed2SettingsType", PyLong_FromLongLong(DeviceRed2SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRadMoonDuoSettingsTypeDeprecated", PyLong_FromLongLong(DeviceRadMoonDuoSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceEtherBadgeSettingsTypeDeprecated", PyLong_FromLongLong(DeviceEtherBadgeSettingsTypeDeprecated)); + result += PyModule_AddObjectRef(module, "DeviceRADA2BSettingsType", PyLong_FromLongLong(DeviceRADA2BSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADEpsilonSettingsType", PyLong_FromLongLong(DeviceRADEpsilonSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceOBD2LCSettingsType", PyLong_FromLongLong(DeviceOBD2LCSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADBMSSettingsType", PyLong_FromLongLong(DeviceRADBMSSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADMoon3SettingsType", PyLong_FromLongLong(DeviceRADMoon3SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceFire3SettingsType", PyLong_FromLongLong(DeviceFire3SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceFire3FlexraySettingsType", PyLong_FromLongLong(DeviceFire3FlexraySettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADCometSettingsType", PyLong_FromLongLong(DeviceRADCometSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceNeoVIConnectSettingsType", PyLong_FromLongLong(DeviceNeoVIConnectSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADComet3SettingsType", PyLong_FromLongLong(DeviceRADComet3SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADGalaxy2SettingsType", PyLong_FromLongLong(DeviceRADGalaxy2SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADGigastar2SettingsType", PyLong_FromLongLong(DeviceRADGigastar2SettingsType)); + result += PyModule_AddObjectRef(module, "DeviceRADMoonT1SSettingsType", PyLong_FromLongLong(DeviceRADMoonT1SSettingsType)); + result += PyModule_AddObjectRef(module, "DeviceSettingsTypeMax", PyLong_FromLongLong(DeviceSettingsTypeMax)); + result += PyModule_AddObjectRef(module, "DeviceSettingsNone", PyLong_FromLongLong(DeviceSettingsNone)); // end of enum - } EDeviceSettingsType; // enum - result += PyModule_AddIntMacro(module, PlasmaIonVnetChannelMain); - result += PyModule_AddIntMacro(module, PlasmaIonVnetChannelA); - result += PyModule_AddIntMacro(module, PlasmaIonVnetChannelB); - result += PyModule_AddIntMacro(module, eSoftCore); - result += PyModule_AddIntMacro(module, eFpgaStatusResp); + result += PyModule_AddObjectRef(module, "PlasmaIonVnetChannelMain", PyLong_FromLongLong(PlasmaIonVnetChannelMain)); + result += PyModule_AddObjectRef(module, "PlasmaIonVnetChannelA", PyLong_FromLongLong(PlasmaIonVnetChannelA)); + result += PyModule_AddObjectRef(module, "PlasmaIonVnetChannelB", PyLong_FromLongLong(PlasmaIonVnetChannelB)); + result += PyModule_AddObjectRef(module, "eSoftCore", PyLong_FromLongLong(eSoftCore)); + result += PyModule_AddObjectRef(module, "eFpgaStatusResp", PyLong_FromLongLong(eFpgaStatusResp)); // end of enum - } EPlasmaIonVnetChannel_t; // enum - result += PyModule_AddIntMacro(module, eManagerPortA); - result += PyModule_AddIntMacro(module, eManagerPortB); + result += PyModule_AddObjectRef(module, "eManagerPortA", PyLong_FromLongLong(eManagerPortA)); + result += PyModule_AddObjectRef(module, "eManagerPortB", PyLong_FromLongLong(eManagerPortB)); // end of enum - } EwBMSManagerPort_t; // enum - result += PyModule_AddIntMacro(module, eLockManager); - result += PyModule_AddIntMacro(module, eUnlockManager); + result += PyModule_AddObjectRef(module, "eLockManager", PyLong_FromLongLong(eLockManager)); + result += PyModule_AddObjectRef(module, "eUnlockManager", PyLong_FromLongLong(eUnlockManager)); // end of enum - } EwBMSManagerLockState_t; // enum - result += PyModule_AddIntMacro(module, eUART0); - result += PyModule_AddIntMacro(module, eUART1); + result += PyModule_AddObjectRef(module, "eUART0", PyLong_FromLongLong(eUART0)); + result += PyModule_AddObjectRef(module, "eUART1", PyLong_FromLongLong(eUART1)); // end of enum - } EUartPort_t; // enum - result += PyModule_AddIntMacro(module, eGENERIC_API); - result += PyModule_AddIntMacro(module, eADI_WIL_API); + result += PyModule_AddObjectRef(module, "eGENERIC_API", PyLong_FromLongLong(eGENERIC_API)); + result += PyModule_AddObjectRef(module, "eADI_WIL_API", PyLong_FromLongLong(eADI_WIL_API)); // end of enum - } eGenericAPIOptions; // enum - result += PyModule_AddIntMacro(module, ewBMSInstance0); - result += PyModule_AddIntMacro(module, ewBMSInstance1); + result += PyModule_AddObjectRef(module, "ewBMSInstance0", PyLong_FromLongLong(ewBMSInstance0)); + result += PyModule_AddObjectRef(module, "ewBMSInstance1", PyLong_FromLongLong(ewBMSInstance1)); // end of enum - } EwBMSInstance_t; - result += PyModule_AddIntMacro(module, stCM_ISO157652_TxMessage_SIZE); - result += PyModule_AddIntMacro(module, ISO15765_2015_TxMessage_SIZE); - result += PyModule_AddIntMacro(module, stCM_ISO157652_RxMessage_SIZE); - result += PyModule_AddIntMacro(module, spyFilterLong_SIZE); - result += PyModule_AddIntMacro(module, icsSpyMessage_SIZE); - result += PyModule_AddIntMacro(module, icsSpyMessage_SIZE); - result += PyModule_AddIntMacro(module, icsSpyMessage_SIZE); - result += PyModule_AddIntMacro(module, icsSpyMessage_SIZE); - result += PyModule_AddIntMacro(module, icsSpyMessageLong_SIZE); - result += PyModule_AddIntMacro(module, icsSpyMessageJ1850_SIZE); - result += PyModule_AddIntMacro(module, icsSpyMessageVSB_SIZE); - result += PyModule_AddIntMacro(module, MAX_PHY_REG_PKT_ENTRIES); - result += PyModule_AddIntMacro(module, PHY_REG_PKT_VERSION); - result += PyModule_AddIntMacro(module, MAX_PHY_SETTINGS_STRUCT); - result += PyModule_AddIntMacro(module, MAX_NUMBYTES_PHYSETTINGS); + result += PyModule_AddObjectRef(module, "stCM_ISO157652_TxMessage_SIZE", PyLong_FromUnsignedLongLong(stCM_ISO157652_TxMessage_SIZE)); + result += PyModule_AddObjectRef(module, "ISO15765_2015_TxMessage_SIZE", PyLong_FromLongLong(ISO15765_2015_TxMessage_SIZE)); + result += PyModule_AddObjectRef(module, "stCM_ISO157652_RxMessage_SIZE", PyLong_FromUnsignedLongLong(stCM_ISO157652_RxMessage_SIZE)); + result += PyModule_AddObjectRef(module, "spyFilterLong_SIZE", PyLong_FromUnsignedLongLong(spyFilterLong_SIZE)); + result += PyModule_AddObjectRef(module, "icsSpyMessage_SIZE", PyLong_FromUnsignedLongLong(icsSpyMessage_SIZE)); + result += PyModule_AddObjectRef(module, "icsSpyMessage_SIZE", PyLong_FromUnsignedLongLong(icsSpyMessage_SIZE)); + result += PyModule_AddObjectRef(module, "icsSpyMessage_SIZE", PyLong_FromUnsignedLongLong(icsSpyMessage_SIZE)); + result += PyModule_AddObjectRef(module, "icsSpyMessage_SIZE", PyLong_FromUnsignedLongLong(icsSpyMessage_SIZE)); + result += PyModule_AddObjectRef(module, "icsSpyMessageLong_SIZE", PyLong_FromLongLong(icsSpyMessageLong_SIZE)); + result += PyModule_AddObjectRef(module, "icsSpyMessageJ1850_SIZE", PyLong_FromLongLong(icsSpyMessageJ1850_SIZE)); + result += PyModule_AddObjectRef(module, "icsSpyMessageVSB_SIZE", PyLong_FromUnsignedLongLong(icsSpyMessageVSB_SIZE)); + result += PyModule_AddObjectRef(module, "MAX_PHY_REG_PKT_ENTRIES", PyLong_FromUnsignedLongLong(MAX_PHY_REG_PKT_ENTRIES)); + result += PyModule_AddObjectRef(module, "PHY_REG_PKT_VERSION", PyLong_FromUnsignedLongLong(PHY_REG_PKT_VERSION)); + result += PyModule_AddObjectRef(module, "MAX_PHY_SETTINGS_STRUCT", PyLong_FromUnsignedLongLong(MAX_PHY_SETTINGS_STRUCT)); + result += PyModule_AddObjectRef(module, "MAX_NUMBYTES_PHYSETTINGS", PyLong_FromLongLong(MAX_NUMBYTES_PHYSETTINGS)); // enum - result += PyModule_AddIntMacro(module, PHYREG_SUCCESS); - result += PyModule_AddIntMacro(module, PHYREG_FAILURE); - result += PyModule_AddIntMacro(module, PHYREG_INVALID_MDIO_BUS_INDEX); - result += PyModule_AddIntMacro(module, PHYREG_INVALID_PHY_ADDR); - result += PyModule_AddIntMacro(module, PHYREG_UNSUPPORTED_MDIO_CLAUSE); - result += PyModule_AddIntMacro(module, PHYREG_RESERVED1); - result += PyModule_AddIntMacro(module, PHYREG_RESERVED2); - result += PyModule_AddIntMacro(module, PHYREG_RESERVED3); + result += PyModule_AddObjectRef(module, "PHYREG_SUCCESS", PyLong_FromLongLong(PHYREG_SUCCESS)); + result += PyModule_AddObjectRef(module, "PHYREG_FAILURE", PyLong_FromLongLong(PHYREG_FAILURE)); + result += PyModule_AddObjectRef(module, "PHYREG_INVALID_MDIO_BUS_INDEX", PyLong_FromLongLong(PHYREG_INVALID_MDIO_BUS_INDEX)); + result += PyModule_AddObjectRef(module, "PHYREG_INVALID_PHY_ADDR", PyLong_FromLongLong(PHYREG_INVALID_PHY_ADDR)); + result += PyModule_AddObjectRef(module, "PHYREG_UNSUPPORTED_MDIO_CLAUSE", PyLong_FromLongLong(PHYREG_UNSUPPORTED_MDIO_CLAUSE)); + result += PyModule_AddObjectRef(module, "PHYREG_RESERVED1", PyLong_FromLongLong(PHYREG_RESERVED1)); + result += PyModule_AddObjectRef(module, "PHYREG_RESERVED2", PyLong_FromLongLong(PHYREG_RESERVED2)); + result += PyModule_AddObjectRef(module, "PHYREG_RESERVED3", PyLong_FromLongLong(PHYREG_RESERVED3)); // end of enum - } PhyRegPktStatus_t; // enum - result += PyModule_AddIntMacro(module, PHYREG_READ); - result += PyModule_AddIntMacro(module, PHYREG_WRITE); - result += PyModule_AddIntMacro(module, PHYREG_BOTH); + result += PyModule_AddObjectRef(module, "PHYREG_READ", PyLong_FromLongLong(PHYREG_READ)); + result += PyModule_AddObjectRef(module, "PHYREG_WRITE", PyLong_FromLongLong(PHYREG_WRITE)); + result += PyModule_AddObjectRef(module, "PHYREG_BOTH", PyLong_FromLongLong(PHYREG_BOTH)); // end of enum - } PhyRegPktRw_t; // enum - result += PyModule_AddIntMacro(module, networkDWCAN01); - result += PyModule_AddIntMacro(module, networkDWCAN02); - result += PyModule_AddIntMacro(module, networkDWCAN03); - result += PyModule_AddIntMacro(module, networkDWCAN04); - result += PyModule_AddIntMacro(module, networkDWCAN05); - result += PyModule_AddIntMacro(module, networkDWCAN06); - result += PyModule_AddIntMacro(module, networkDWCAN07); - result += PyModule_AddIntMacro(module, networkDWCAN08); - result += PyModule_AddIntMacro(module, networkTerminationDWCAN01); - result += PyModule_AddIntMacro(module, networkTerminationDWCAN02); - result += PyModule_AddIntMacro(module, networkTerminationDWCAN03); - result += PyModule_AddIntMacro(module, networkTerminationDWCAN04); - result += PyModule_AddIntMacro(module, networkTerminationDWCAN05); - result += PyModule_AddIntMacro(module, networkTerminationDWCAN06); - result += PyModule_AddIntMacro(module, networkTerminationDWCAN07); - result += PyModule_AddIntMacro(module, networkTerminationDWCAN08); - result += PyModule_AddIntMacro(module, enhancedFlashDriver); - result += PyModule_AddIntMacro(module, rtcCalibration); - result += PyModule_AddIntMacro(module, rtcClosedLoopCalibration); - result += PyModule_AddIntMacro(module, cmp); - result += PyModule_AddIntMacro(module, NUM_VALID_DEVICE_FEATURES); - result += PyModule_AddIntMacro(module, supportedFeatureMax); + result += PyModule_AddObjectRef(module, "networkDWCAN01", PyLong_FromLongLong(networkDWCAN01)); + result += PyModule_AddObjectRef(module, "networkDWCAN02", PyLong_FromLongLong(networkDWCAN02)); + result += PyModule_AddObjectRef(module, "networkDWCAN03", PyLong_FromLongLong(networkDWCAN03)); + result += PyModule_AddObjectRef(module, "networkDWCAN04", PyLong_FromLongLong(networkDWCAN04)); + result += PyModule_AddObjectRef(module, "networkDWCAN05", PyLong_FromLongLong(networkDWCAN05)); + result += PyModule_AddObjectRef(module, "networkDWCAN06", PyLong_FromLongLong(networkDWCAN06)); + result += PyModule_AddObjectRef(module, "networkDWCAN07", PyLong_FromLongLong(networkDWCAN07)); + result += PyModule_AddObjectRef(module, "networkDWCAN08", PyLong_FromLongLong(networkDWCAN08)); + result += PyModule_AddObjectRef(module, "networkTerminationDWCAN01", PyLong_FromLongLong(networkTerminationDWCAN01)); + result += PyModule_AddObjectRef(module, "networkTerminationDWCAN02", PyLong_FromLongLong(networkTerminationDWCAN02)); + result += PyModule_AddObjectRef(module, "networkTerminationDWCAN03", PyLong_FromLongLong(networkTerminationDWCAN03)); + result += PyModule_AddObjectRef(module, "networkTerminationDWCAN04", PyLong_FromLongLong(networkTerminationDWCAN04)); + result += PyModule_AddObjectRef(module, "networkTerminationDWCAN05", PyLong_FromLongLong(networkTerminationDWCAN05)); + result += PyModule_AddObjectRef(module, "networkTerminationDWCAN06", PyLong_FromLongLong(networkTerminationDWCAN06)); + result += PyModule_AddObjectRef(module, "networkTerminationDWCAN07", PyLong_FromLongLong(networkTerminationDWCAN07)); + result += PyModule_AddObjectRef(module, "networkTerminationDWCAN08", PyLong_FromLongLong(networkTerminationDWCAN08)); + result += PyModule_AddObjectRef(module, "enhancedFlashDriver", PyLong_FromLongLong(enhancedFlashDriver)); + result += PyModule_AddObjectRef(module, "rtcCalibration", PyLong_FromLongLong(rtcCalibration)); + result += PyModule_AddObjectRef(module, "rtcClosedLoopCalibration", PyLong_FromLongLong(rtcClosedLoopCalibration)); + result += PyModule_AddObjectRef(module, "cmp", PyLong_FromLongLong(cmp)); + result += PyModule_AddObjectRef(module, "NUM_VALID_DEVICE_FEATURES", PyLong_FromLongLong(NUM_VALID_DEVICE_FEATURES)); + result += PyModule_AddObjectRef(module, "supportedFeatureMax", PyLong_FromLongLong(supportedFeatureMax)); // end of enum - } DeviceFeature; // enum - result += PyModule_AddIntMacro(module, AccessoryOperationError); - result += PyModule_AddIntMacro(module, AccessoryOperationSuccess); - result += PyModule_AddIntMacro(module, AccessoryFlashingInitError); - result += PyModule_AddIntMacro(module, AccessoryFlashingEraseError); - result += PyModule_AddIntMacro(module, AccessoryFlashingWriteError); - result += PyModule_AddIntMacro(module, AccessoryFlashingReadError); - result += PyModule_AddIntMacro(module, AccessoryFlashingVerifyError); - result += PyModule_AddIntMacro(module, AccessoryFlashingDeinitError); - result += PyModule_AddIntMacro(module, AccessoryFlashingInvalidHardware); - result += PyModule_AddIntMacro(module, AccessoryFlashingInvalidDataFile); - result += PyModule_AddIntMacro(module, AccessoryGetVersionError); - result += PyModule_AddIntMacro(module, AccessoryIndexError); - result += PyModule_AddIntMacro(module, AccessoryParamApiVersionError); - result += PyModule_AddIntMacro(module, AccessoryParamSizeMismatchError); - result += PyModule_AddIntMacro(module, AccessoryParameterNull); + result += PyModule_AddObjectRef(module, "AccessoryOperationError", PyLong_FromLongLong(AccessoryOperationError)); + result += PyModule_AddObjectRef(module, "AccessoryOperationSuccess", PyLong_FromLongLong(AccessoryOperationSuccess)); + result += PyModule_AddObjectRef(module, "AccessoryFlashingInitError", PyLong_FromLongLong(AccessoryFlashingInitError)); + result += PyModule_AddObjectRef(module, "AccessoryFlashingEraseError", PyLong_FromLongLong(AccessoryFlashingEraseError)); + result += PyModule_AddObjectRef(module, "AccessoryFlashingWriteError", PyLong_FromLongLong(AccessoryFlashingWriteError)); + result += PyModule_AddObjectRef(module, "AccessoryFlashingReadError", PyLong_FromLongLong(AccessoryFlashingReadError)); + result += PyModule_AddObjectRef(module, "AccessoryFlashingVerifyError", PyLong_FromLongLong(AccessoryFlashingVerifyError)); + result += PyModule_AddObjectRef(module, "AccessoryFlashingDeinitError", PyLong_FromLongLong(AccessoryFlashingDeinitError)); + result += PyModule_AddObjectRef(module, "AccessoryFlashingInvalidHardware", PyLong_FromLongLong(AccessoryFlashingInvalidHardware)); + result += PyModule_AddObjectRef(module, "AccessoryFlashingInvalidDataFile", PyLong_FromLongLong(AccessoryFlashingInvalidDataFile)); + result += PyModule_AddObjectRef(module, "AccessoryGetVersionError", PyLong_FromLongLong(AccessoryGetVersionError)); + result += PyModule_AddObjectRef(module, "AccessoryIndexError", PyLong_FromLongLong(AccessoryIndexError)); + result += PyModule_AddObjectRef(module, "AccessoryParamApiVersionError", PyLong_FromLongLong(AccessoryParamApiVersionError)); + result += PyModule_AddObjectRef(module, "AccessoryParamSizeMismatchError", PyLong_FromLongLong(AccessoryParamSizeMismatchError)); + result += PyModule_AddObjectRef(module, "AccessoryParameterNull", PyLong_FromLongLong(AccessoryParameterNull)); // end of enum - } AccessoryOperationErrorType; // enum - result += PyModule_AddIntMacro(module, EDevNameTypeDefault); - result += PyModule_AddIntMacro(module, EDevNameTypeNoSerial); - result += PyModule_AddIntMacro(module, EDevNameTypeTCP); - result += PyModule_AddIntMacro(module, EDevNameTypeTCPShort); + result += PyModule_AddObjectRef(module, "EDevNameTypeDefault", PyLong_FromLongLong(EDevNameTypeDefault)); + result += PyModule_AddObjectRef(module, "EDevNameTypeNoSerial", PyLong_FromLongLong(EDevNameTypeNoSerial)); + result += PyModule_AddObjectRef(module, "EDevNameTypeTCP", PyLong_FromLongLong(EDevNameTypeTCP)); + result += PyModule_AddObjectRef(module, "EDevNameTypeTCPShort", PyLong_FromLongLong(EDevNameTypeTCPShort)); // end of enum - } EDevNameType; - result += PyModule_AddIntMacro(module, FlashAccessoryFirmwareParams_SIZE); - result += PyModule_AddIntMacro(module, FlashAccessoryFirmwareParams_SIZE); + result += PyModule_AddObjectRef(module, "FlashAccessoryFirmwareParams_SIZE", PyLong_FromLongLong(FlashAccessoryFirmwareParams_SIZE)); + result += PyModule_AddObjectRef(module, "FlashAccessoryFirmwareParams_SIZE", PyLong_FromLongLong(FlashAccessoryFirmwareParams_SIZE)); // enum - result += PyModule_AddIntMacro(module, FLASH_ACCESSORY_EPSILON_10G_PHY1); - result += PyModule_AddIntMacro(module, FLASH_ACCESSORY_EPSILON_10G_PHY2); - result += PyModule_AddIntMacro(module, FLASH_ACCESSORY_EPSILON_SWITCH_A); - result += PyModule_AddIntMacro(module, FLASH_ACCESSORY_EPSILON_SWITCH_B); + result += PyModule_AddObjectRef(module, "FLASH_ACCESSORY_EPSILON_10G_PHY1", PyLong_FromLongLong(FLASH_ACCESSORY_EPSILON_10G_PHY1)); + result += PyModule_AddObjectRef(module, "FLASH_ACCESSORY_EPSILON_10G_PHY2", PyLong_FromLongLong(FLASH_ACCESSORY_EPSILON_10G_PHY2)); + result += PyModule_AddObjectRef(module, "FLASH_ACCESSORY_EPSILON_SWITCH_A", PyLong_FromLongLong(FLASH_ACCESSORY_EPSILON_SWITCH_A)); + result += PyModule_AddObjectRef(module, "FLASH_ACCESSORY_EPSILON_SWITCH_B", PyLong_FromLongLong(FLASH_ACCESSORY_EPSILON_SWITCH_B)); // end of enum - } flashAccessoryIndex; // enum - result += PyModule_AddIntMacro(module, FLASH_ACCESSORY_EPSILON_10G_PHY_FW_0_3_7_0); + result += PyModule_AddObjectRef(module, "FLASH_ACCESSORY_EPSILON_10G_PHY_FW_0_3_7_0", PyLong_FromLongLong(FLASH_ACCESSORY_EPSILON_10G_PHY_FW_0_3_7_0)); // end of enum - } epsilon10GPHYFW; - result += PyModule_AddIntMacro(module, NUM_DEVICE_FEATURE_BITFIELDS); + result += PyModule_AddObjectRef(module, "NUM_DEVICE_FEATURE_BITFIELDS", PyLong_FromLongLong(NUM_DEVICE_FEATURE_BITFIELDS)); // enum // end of enum - } + result += PyModule_AddObjectRef(module, "CICSSPYSTATUSBITS_H_", PyLong_FromUnsignedLongLong(CICSSPYSTATUSBITS_H_)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_GLOBAL_ERR", PyLong_FromLongLong(SPY_STATUS_GLOBAL_ERR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_TX_MSG", PyLong_FromLongLong(SPY_STATUS_TX_MSG)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_XTD_FRAME", PyLong_FromLongLong(SPY_STATUS_XTD_FRAME)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_REMOTE_FRAME", PyLong_FromLongLong(SPY_STATUS_REMOTE_FRAME)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_CRC_ERROR", PyLong_FromLongLong(SPY_STATUS_CRC_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_INCOMPLETE_FRAME", PyLong_FromLongLong(SPY_STATUS_INCOMPLETE_FRAME)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_LOST_ARBITRATION", PyLong_FromLongLong(SPY_STATUS_LOST_ARBITRATION)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_UNDEFINED_ERROR", PyLong_FromLongLong(SPY_STATUS_UNDEFINED_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_BUS_RECOVERED", PyLong_FromLongLong(SPY_STATUS_BUS_RECOVERED)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_BUS_SHORTED_PLUS", PyLong_FromLongLong(SPY_STATUS_BUS_SHORTED_PLUS)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_BUS_SHORTED_GND", PyLong_FromLongLong(SPY_STATUS_BUS_SHORTED_GND)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_CHECKSUM_ERROR", PyLong_FromLongLong(SPY_STATUS_CHECKSUM_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_BAD_MESSAGE_BIT_TIME_ERROR", PyLong_FromLongLong(SPY_STATUS_BAD_MESSAGE_BIT_TIME_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_TX_NOMATCH", PyLong_FromLongLong(SPY_STATUS_TX_NOMATCH)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_COMM_IN_OVERFLOW", PyLong_FromLongLong(SPY_STATUS_COMM_IN_OVERFLOW)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_EXPECTED_LEN_MISMATCH", PyLong_FromLongLong(SPY_STATUS_EXPECTED_LEN_MISMATCH)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_MSG_NO_MATCH", PyLong_FromLongLong(SPY_STATUS_MSG_NO_MATCH)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_BREAK", PyLong_FromLongLong(SPY_STATUS_BREAK)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_AVSI_REC_OVERFLOW", PyLong_FromLongLong(SPY_STATUS_AVSI_REC_OVERFLOW)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_TEST_TRIGGER", PyLong_FromLongLong(SPY_STATUS_TEST_TRIGGER)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_AUDIO_COMMENT", PyLong_FromLongLong(SPY_STATUS_AUDIO_COMMENT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_GPS_DATA", PyLong_FromLongLong(SPY_STATUS_GPS_DATA)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_ANALOG_DIGITAL_INPUT", PyLong_FromLongLong(SPY_STATUS_ANALOG_DIGITAL_INPUT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_TEXT_COMMENT", PyLong_FromLongLong(SPY_STATUS_TEXT_COMMENT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_NETWORK_MESSAGE_TYPE", PyLong_FromLongLong(SPY_STATUS_NETWORK_MESSAGE_TYPE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_VSI_TX_UNDERRUN", PyLong_FromLongLong(SPY_STATUS_VSI_TX_UNDERRUN)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_PDU", PyLong_FromLongLong(SPY_STATUS_PDU)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_HIGH_SPEED", PyLong_FromLongLong(SPY_STATUS_HIGH_SPEED)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_EXTENDED", PyLong_FromLongLong(SPY_STATUS_EXTENDED)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_A2B_SCF_VALID_WAITING", PyLong_FromLongLong(SPY_STATUS_A2B_SCF_VALID_WAITING)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_A2B_CONTROL", PyLong_FromLongLong(SPY_STATUS_A2B_CONTROL)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_A2B_MONITOR", PyLong_FromLongLong(SPY_STATUS_A2B_MONITOR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_A2B_UPSTREAM", PyLong_FromLongLong(SPY_STATUS_A2B_UPSTREAM)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_CAN_ERROR_PASSIVE", PyLong_FromLongLong(SPY_STATUS_CAN_ERROR_PASSIVE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_CAN_BUS_OFF", PyLong_FromLongLong(SPY_STATUS_CAN_BUS_OFF)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_CANFD", PyLong_FromLongLong(SPY_STATUS_CANFD)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_HEADERCRC_ERROR", PyLong_FromLongLong(SPY_STATUS_HEADERCRC_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_FLEXRAY_PDU_NO_UPDATE_BIT", PyLong_FromLongLong(SPY_STATUS_FLEXRAY_PDU_NO_UPDATE_BIT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_FLEXRAY_PDU", PyLong_FromLongLong(SPY_STATUS_FLEXRAY_PDU)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_FLEXRAY_PDU_UPDATE_BIT_SET", PyLong_FromLongLong(SPY_STATUS_FLEXRAY_PDU_UPDATE_BIT_SET)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_LIN_MASTER", PyLong_FromLongLong(SPY_STATUS_LIN_MASTER)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_VSI_IFR_CRC_BIT", PyLong_FromLongLong(SPY_STATUS_VSI_IFR_CRC_BIT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS_INIT_MESSAGE", PyLong_FromLongLong(SPY_STATUS_INIT_MESSAGE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_HAS_VALUE", PyLong_FromLongLong(SPY_STATUS2_HAS_VALUE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_VALUE_IS_BOOLEAN", PyLong_FromLongLong(SPY_STATUS2_VALUE_IS_BOOLEAN)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_HIGH_VOLTAGE", PyLong_FromLongLong(SPY_STATUS2_HIGH_VOLTAGE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LONG_MESSAGE", PyLong_FromLongLong(SPY_STATUS2_LONG_MESSAGE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_GLOBAL_CHANGE", PyLong_FromLongLong(SPY_STATUS2_GLOBAL_CHANGE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ERROR_FRAME", PyLong_FromLongLong(SPY_STATUS2_ERROR_FRAME)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_END_OF_LONG_MESSAGE", PyLong_FromLongLong(SPY_STATUS2_END_OF_LONG_MESSAGE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_CAN_ISO15765_LOGICAL_FRAME", PyLong_FromLongLong(SPY_STATUS2_CAN_ISO15765_LOGICAL_FRAME)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_CAN_HAVE_LINK_DATA", PyLong_FromLongLong(SPY_STATUS2_CAN_HAVE_LINK_DATA)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_CRC_ERROR", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_CRC_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_FRAME_TOO_SHORT", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_FRAME_TOO_SHORT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_FCS_AVAILABLE", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_FCS_AVAILABLE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_NO_PADDING", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_NO_PADDING)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_PREEMPTION_ENABLED", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_PREEMPTION_ENABLED)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_UPDATE_CHECKSUMS", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_UPDATE_CHECKSUMS)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_MANUALFCS_ENABLED", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_MANUALFCS_ENABLED)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_FCS_VERIFIED", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_FCS_VERIFIED)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_T1S_SYMBOL", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_T1S_SYMBOL)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_T1S_BURST", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_T1S_BURST)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ETHERNET_T1S_ETHERNET", PyLong_FromLongLong(SPY_STATUS2_ETHERNET_T1S_ETHERNET)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_FLEXRAY_TX_AB", PyLong_FromLongLong(SPY_STATUS2_FLEXRAY_TX_AB)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_FLEXRAY_TX_AB_NO_A", PyLong_FromLongLong(SPY_STATUS2_FLEXRAY_TX_AB_NO_A)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_FLEXRAY_TX_AB_NO_B", PyLong_FromLongLong(SPY_STATUS2_FLEXRAY_TX_AB_NO_B)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_FLEXRAY_TX_AB_NO_MATCH", PyLong_FromLongLong(SPY_STATUS2_FLEXRAY_TX_AB_NO_MATCH)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_FLEXRAY_NO_CRC", PyLong_FromLongLong(SPY_STATUS2_FLEXRAY_NO_CRC)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_FLEXRAY_NO_HEADERCRC", PyLong_FromLongLong(SPY_STATUS2_FLEXRAY_NO_HEADERCRC)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_I2C_ERR_TIMEOUT", PyLong_FromLongLong(SPY_STATUS2_I2C_ERR_TIMEOUT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_I2C_ERR_NACK", PyLong_FromLongLong(SPY_STATUS2_I2C_ERR_NACK)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_I2C_DIR_READ", PyLong_FromLongLong(SPY_STATUS2_I2C_DIR_READ)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ISO_FRAME_ERROR", PyLong_FromLongLong(SPY_STATUS2_ISO_FRAME_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ISO_OVERFLOW_ERROR", PyLong_FromLongLong(SPY_STATUS2_ISO_OVERFLOW_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ISO_PARITY_ERROR", PyLong_FromLongLong(SPY_STATUS2_ISO_PARITY_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_ISO_RX_TIMEOUT_ERROR", PyLong_FromLongLong(SPY_STATUS2_ISO_RX_TIMEOUT_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_ERR_RX_BREAK_NOT_0", PyLong_FromLongLong(SPY_STATUS2_LIN_ERR_RX_BREAK_NOT_0)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_ERR_RX_BREAK_TOO_SHORT", PyLong_FromLongLong(SPY_STATUS2_LIN_ERR_RX_BREAK_TOO_SHORT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_ERR_RX_SYNC_NOT_55", PyLong_FromLongLong(SPY_STATUS2_LIN_ERR_RX_SYNC_NOT_55)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_ERR_RX_DATA_GREATER_8", PyLong_FromLongLong(SPY_STATUS2_LIN_ERR_RX_DATA_GREATER_8)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_ERR_TX_RX_MISMATCH", PyLong_FromLongLong(SPY_STATUS2_LIN_ERR_TX_RX_MISMATCH)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_ERR_MSG_ID_PARITY", PyLong_FromLongLong(SPY_STATUS2_LIN_ERR_MSG_ID_PARITY)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_SYNC_FRAME_ERROR", PyLong_FromLongLong(SPY_STATUS2_LIN_SYNC_FRAME_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_ID_FRAME_ERROR", PyLong_FromLongLong(SPY_STATUS2_LIN_ID_FRAME_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_SLAVE_BYTE_ERROR", PyLong_FromLongLong(SPY_STATUS2_LIN_SLAVE_BYTE_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_RX_TIMEOUT_ERROR", PyLong_FromLongLong(SPY_STATUS2_LIN_RX_TIMEOUT_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_LIN_NO_SLAVE_DATA", PyLong_FromLongLong(SPY_STATUS2_LIN_NO_SLAVE_DATA)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_ERR_TIMEOUT", PyLong_FromLongLong(SPY_STATUS2_MDIO_ERR_TIMEOUT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_JOB_CANCELLED", PyLong_FromLongLong(SPY_STATUS2_MDIO_JOB_CANCELLED)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_INVALID_BUS", PyLong_FromLongLong(SPY_STATUS2_MDIO_INVALID_BUS)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_INVALID_PHYADDR", PyLong_FromLongLong(SPY_STATUS2_MDIO_INVALID_PHYADDR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_INVALID_REGADDR", PyLong_FromLongLong(SPY_STATUS2_MDIO_INVALID_REGADDR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_UNSUPPORTED_CLAUSE", PyLong_FromLongLong(SPY_STATUS2_MDIO_UNSUPPORTED_CLAUSE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_UNSUPPORTED_OPCODE", PyLong_FromLongLong(SPY_STATUS2_MDIO_UNSUPPORTED_OPCODE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_OVERFLOW", PyLong_FromLongLong(SPY_STATUS2_MDIO_OVERFLOW)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_CLAUSE45", PyLong_FromLongLong(SPY_STATUS2_MDIO_CLAUSE45)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MDIO_READ", PyLong_FromLongLong(SPY_STATUS2_MDIO_READ)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_PACKET_DATA", PyLong_FromLongLong(SPY_STATUS2_MOST_PACKET_DATA)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_STATUS", PyLong_FromLongLong(SPY_STATUS2_MOST_STATUS)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_LOW_LEVEL", PyLong_FromLongLong(SPY_STATUS2_MOST_LOW_LEVEL)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_CONTROL_DATA", PyLong_FromLongLong(SPY_STATUS2_MOST_CONTROL_DATA)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_MHP_USER_DATA", PyLong_FromLongLong(SPY_STATUS2_MOST_MHP_USER_DATA)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_MHP_CONTROL_DATA", PyLong_FromLongLong(SPY_STATUS2_MOST_MHP_CONTROL_DATA)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_I2S_DUMP", PyLong_FromLongLong(SPY_STATUS2_MOST_I2S_DUMP)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_TOO_SHORT", PyLong_FromLongLong(SPY_STATUS2_MOST_TOO_SHORT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_MOST50", PyLong_FromLongLong(SPY_STATUS2_MOST_MOST50)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_MOST150", PyLong_FromLongLong(SPY_STATUS2_MOST_MOST150)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_MOST_CHANGED_PAR", PyLong_FromLongLong(SPY_STATUS2_MOST_CHANGED_PAR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS2_WBMS_API_IS_CALLBACK", PyLong_FromLongLong(SPY_STATUS2_WBMS_API_IS_CALLBACK)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_ERR_PASSIVE", PyLong_FromLongLong(SPY_STATUS3_CAN_ERR_PASSIVE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_BUS_OFF", PyLong_FromLongLong(SPY_STATUS3_CAN_BUS_OFF)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_ERR_WARNING", PyLong_FromLongLong(SPY_STATUS3_CAN_ERR_WARNING)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_DATAERR_STUFF_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_DATAERR_STUFF_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_DATAERR_FORM_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_DATAERR_FORM_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_DATAERR_ACK_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_DATAERR_ACK_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_DATAERR_BIT1_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_DATAERR_BIT1_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_DATAERR_BIT0_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_DATAERR_BIT0_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_DATAERR_CRC_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_DATAERR_CRC_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_DATAERR_NOCHANGE", PyLong_FromLongLong(SPY_STATUS3_CAN_DATAERR_NOCHANGE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_GENERR_STUFF_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_GENERR_STUFF_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_GENERR_FORM_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_GENERR_FORM_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_GENERR_ACK_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_GENERR_ACK_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_GENERR_BIT1_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_GENERR_BIT1_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_GENERR_BIT0_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_GENERR_BIT0_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_GENERR_CRC_ERROR", PyLong_FromLongLong(SPY_STATUS3_CAN_GENERR_CRC_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CAN_GENERR_NOCHANGE", PyLong_FromLongLong(SPY_STATUS3_CAN_GENERR_NOCHANGE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CANFD_ESI", PyLong_FromLongLong(SPY_STATUS3_CANFD_ESI)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CANFD_IDE", PyLong_FromLongLong(SPY_STATUS3_CANFD_IDE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CANFD_RTR", PyLong_FromLongLong(SPY_STATUS3_CANFD_RTR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CANFD_FDF", PyLong_FromLongLong(SPY_STATUS3_CANFD_FDF)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_CANFD_BRS", PyLong_FromLongLong(SPY_STATUS3_CANFD_BRS)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_ETHERNET_TX_COLLISION", PyLong_FromLongLong(SPY_STATUS3_ETHERNET_TX_COLLISION)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_ETHERNET_T1S_WAKE", PyLong_FromLongLong(SPY_STATUS3_ETHERNET_T1S_WAKE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_LIN_JUST_BREAK_SYNC", PyLong_FromLongLong(SPY_STATUS3_LIN_JUST_BREAK_SYNC)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_LIN_SLAVE_DATA_TOO_SHORT", PyLong_FromLongLong(SPY_STATUS3_LIN_SLAVE_DATA_TOO_SHORT)); + result += PyModule_AddObjectRef(module, "SPY_STATUS3_LIN_ONLY_UPDATE_SLAVE_TABLE_ONCE", PyLong_FromLongLong(SPY_STATUS3_LIN_ONLY_UPDATE_SLAVE_TABLE_ONCE)); + result += PyModule_AddObjectRef(module, "SPY_STATUS4_ETH_CRC_ERROR", PyLong_FromLongLong(SPY_STATUS4_ETH_CRC_ERROR)); + result += PyModule_AddObjectRef(module, "SPY_STATUS4_ETH_FRAME_TOO_LONG", PyLong_FromLongLong(SPY_STATUS4_ETH_FRAME_TOO_LONG)); return result == 0 ? 1 : 0; } diff --git a/tests/obsolete/cmvspy.h b/tests/obsolete/cmvspy.h deleted file mode 100644 index 3717beb11..000000000 --- a/tests/obsolete/cmvspy.h +++ /dev/null @@ -1,517 +0,0 @@ -// neoVI3 CoreMini Compressed Execution File -#define CM_EXE_SIZE 512 -unsigned char const ucharConfigurationArrayPM[CM_EXE_SIZE] = { -0x07, -0x09, -0x13, -0x00, -0x00, -0x02, -0x2B, -0x20, -0x04, -0xD2, -0xBA, -0xB4, -0x3F, -0x43, -0xFF, -0xF4, -0xBD, -0x2A, -0x75, -0xE4, -0x47, -0xFA, -0xE1, -0xE4, -0xA8, -0x82, -0xCE, -0x87, -0x0E, -0xB3, -0xEA, -0x7A, -0xD5, -0xF1, -0x6B, -0x2E, -0x1B, -0x8F, -0x0B, -0x82, -0x17, -0xE8, -0x09, -0x4D, -0x88, -0x78, -0xED, -0xA4, -0xC1, -0x40, -0x67, -0x73, -0xE3, -0xB0, -0xB6, -0xAD, -0xC6, -0x7C, -0x9D, -0x0C, -0x64, -0x71, -0xF9, -0xEF, -0xD0, -0xFF, -0xD1, -0x62, -0x3A, -0x7D, -0x6D, -0x31, -0x59, -0xA6, -0x9D, -0x2D, -0xB1, -0x2E, -0x3B, -0x84, -0xD3, -0x53, -0x56, -0xC8, -0x18, -0x45, -0x81, -0xDB, -0x0A, -0x3D, -0x6D, -0xAB, -0x06, -0x4F, -0x2D, -0x38, -0x0A, -0x3D, -0x6D, -0xAB, -0x06, -0x4F, -0x2D, -0x38, -0x0A, -0x3D, -0x6D, -0xAB, -0x06, -0x4F, -0x2D, -0x38, -0x0A, -0x3D, -0x6D, -0xAB, -0x06, -0x4F, -0x2D, -0x38, -0x7B, -0xE6, -0x3C, -0x8F, -0x4F, -0x6D, -0xB6, -0xE5, -0x05, -0x6F, -0x8C, -0xCE, -0xA4, -0x0A, -0xDC, -0x31, -0xDA, -0x52, -0x6F, -0xE6, -0xE2, -0xC2, -0x3A, -0xF3, -0xA7, -0xF5, -0x30, -0x48, -0xD7, -0x91, -0x22, -0x0E, -0x6E, -0x18, -0xF1, -0x05, -0xF1, -0xEB, -0xF9, -0xEF, -0x93, -0x7F, -0x60, -0x67, -0x94, -0x13, -0xCF, -0x9D, -0x78, -0x8B, -0xD5, -0x18, -0x06, -0xEE, -0xA4, -0xE5, -0x8D, -0xBA, -0x17, -0x22, -0x0C, -0x72, -0x19, -0xD2, -0xE8, -0xC9, -0x11, -0x03, -0xEE, -0x0D, -0x3B, -0x9A, -0xBD, -0x0C, -0x16, -0x28, -0x51, -0x47, -0x1A, -0x42, -0x0D, -0xEA, -0xD3, -0x56, -0x72, -0x00, -0xD4, -0x55, -0xB8, -0x69, -0x4C, -0xCD, -0xB9, -0x7F, -0xDB, -0x50, -0xE4, -0x67, -0xB5, -0xFC, -0x7F, -0x10, -0x63, -0xF2, -0x33, -0xA1, -0xD8, -0x00, -0x4D, -0xEE, -0xE8, -0x7A, -0xE0, -0xC4, -0x40, -0x0C, -0x90, -0x9A, -0xC8, -0x28, -0x43, -0x86, -0x06, -0xA8, -0xC7, -0xE8, -0x38, -0xE7, -0xC4, -0x9B, -0x7D, -0xC0, -0x50, -0x82, -0x27, -0x91, -0x67, -0xFF, -0x14, -0xDF, -0x62, -0x49, -0x0C, -0x0F, -0x9E, -0x1A, -0xC2, -0xA7, -0xF5, -0x03, -0x63, -0x15, -0x63, -0xB0, -0x10, -0x33, -0x14, -0xF9, -0xEC, -0x6A, -0xAA, -0x7C, -0xB3, -0x91, -0x79, -0x5C, -0x09, -0x79, -0xDC, -0x6C, -0xED, -0x97, -0x66, -0xB7, -0x49, -0xD7, -0xB5, -0x64, -0xAD, -0xCB, -0x3F, -0x30, -0x8B, -0x69, -0x5F, -0xF1, -0xB5, -0x23, -0x2D, -0x14, -0xE8, -0x9A, -0x2E, -0xC7, -0xFE, -0xEA, -0xBA, -0x3F, -0x4E, -0x27, -0x9E, -0xDA, -0xC1, -0x57, -0xEE, -0x9B, -0x88, -0x77, -0x8D, -0xB0, -0x8C, -0x55, -0x3F, -0x9C, -0xC3, -0x3F, -0xF9, -0x97, -0x59, -0xDA, -0x15, -0xAA, -0xFB, -0xF6, -0xAF, -0xA4, -0x4B, -0x50, -0xC1, -0xB0, -0x0A, -0x93, -0x1B, -0xF7, -0x1F, -0x44, -0xB7, -0xFD, -0x4E, -0x2B, -0x54, -0xDD, -0xF2, -0x55, -0xB5, -0xC7, -0xA9, -0xF1, -0x30, -0x0B, -0xAF, -0x29, -0xF8, -0xB3, -0xB0, -0x99, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -0x00, -}; - diff --git a/tests/obsolete/cmvspy.py b/tests/obsolete/cmvspy.py deleted file mode 100644 index 11c59d8b9..000000000 --- a/tests/obsolete/cmvspy.py +++ /dev/null @@ -1,519 +0,0 @@ -# This file was automatically generated by 'cmvspyconvert.py' -# from a cmvspy.h file. -# Example usage: -# from cmvspy import data as coremini_data - -data = ( - 0x07, - 0x09, - 0x13, - 0x00, - 0x00, - 0x02, - 0x2B, - 0x20, - 0x04, - 0xD2, - 0xBA, - 0xB4, - 0x3F, - 0x43, - 0xFF, - 0xF4, - 0xBD, - 0x2A, - 0x75, - 0xE4, - 0x47, - 0xFA, - 0xE1, - 0xE4, - 0xA8, - 0x82, - 0xCE, - 0x87, - 0x0E, - 0xB3, - 0xEA, - 0x7A, - 0xD5, - 0xF1, - 0x6B, - 0x2E, - 0x1B, - 0x8F, - 0x0B, - 0x82, - 0x17, - 0xE8, - 0x09, - 0x4D, - 0x88, - 0x78, - 0xED, - 0xA4, - 0xC1, - 0x40, - 0x67, - 0x73, - 0xE3, - 0xB0, - 0xB6, - 0xAD, - 0xC6, - 0x7C, - 0x9D, - 0x0C, - 0x64, - 0x71, - 0xF9, - 0xEF, - 0xD0, - 0xFF, - 0xD1, - 0x62, - 0x3A, - 0x7D, - 0x6D, - 0x31, - 0x59, - 0xA6, - 0x9D, - 0x2D, - 0xB1, - 0x2E, - 0x3B, - 0x84, - 0xD3, - 0x53, - 0x56, - 0xC8, - 0x18, - 0x45, - 0x81, - 0xDB, - 0x0A, - 0x3D, - 0x6D, - 0xAB, - 0x06, - 0x4F, - 0x2D, - 0x38, - 0x0A, - 0x3D, - 0x6D, - 0xAB, - 0x06, - 0x4F, - 0x2D, - 0x38, - 0x0A, - 0x3D, - 0x6D, - 0xAB, - 0x06, - 0x4F, - 0x2D, - 0x38, - 0x0A, - 0x3D, - 0x6D, - 0xAB, - 0x06, - 0x4F, - 0x2D, - 0x38, - 0x7B, - 0xE6, - 0x3C, - 0x8F, - 0x4F, - 0x6D, - 0xB6, - 0xE5, - 0x05, - 0x6F, - 0x8C, - 0xCE, - 0xA4, - 0x0A, - 0xDC, - 0x31, - 0xDA, - 0x52, - 0x6F, - 0xE6, - 0xE2, - 0xC2, - 0x3A, - 0xF3, - 0xA7, - 0xF5, - 0x30, - 0x48, - 0xD7, - 0x91, - 0x22, - 0x0E, - 0x6E, - 0x18, - 0xF1, - 0x05, - 0xF1, - 0xEB, - 0xF9, - 0xEF, - 0x93, - 0x7F, - 0x60, - 0x67, - 0x94, - 0x13, - 0xCF, - 0x9D, - 0x78, - 0x8B, - 0xD5, - 0x18, - 0x06, - 0xEE, - 0xA4, - 0xE5, - 0x8D, - 0xBA, - 0x17, - 0x22, - 0x0C, - 0x72, - 0x19, - 0xD2, - 0xE8, - 0xC9, - 0x11, - 0x03, - 0xEE, - 0x0D, - 0x3B, - 0x9A, - 0xBD, - 0x0C, - 0x16, - 0x28, - 0x51, - 0x47, - 0x1A, - 0x42, - 0x0D, - 0xEA, - 0xD3, - 0x56, - 0x72, - 0x00, - 0xD4, - 0x55, - 0xB8, - 0x69, - 0x4C, - 0xCD, - 0xB9, - 0x7F, - 0xDB, - 0x50, - 0xE4, - 0x67, - 0xB5, - 0xFC, - 0x7F, - 0x10, - 0x63, - 0xF2, - 0x33, - 0xA1, - 0xD8, - 0x00, - 0x4D, - 0xEE, - 0xE8, - 0x7A, - 0xE0, - 0xC4, - 0x40, - 0x0C, - 0x90, - 0x9A, - 0xC8, - 0x28, - 0x43, - 0x86, - 0x06, - 0xA8, - 0xC7, - 0xE8, - 0x38, - 0xE7, - 0xC4, - 0x9B, - 0x7D, - 0xC0, - 0x50, - 0x82, - 0x27, - 0x91, - 0x67, - 0xFF, - 0x14, - 0xDF, - 0x62, - 0x49, - 0x0C, - 0x0F, - 0x9E, - 0x1A, - 0xC2, - 0xA7, - 0xF5, - 0x03, - 0x63, - 0x15, - 0x63, - 0xB0, - 0x10, - 0x33, - 0x14, - 0xF9, - 0xEC, - 0x6A, - 0xAA, - 0x7C, - 0xB3, - 0x91, - 0x79, - 0x5C, - 0x09, - 0x79, - 0xDC, - 0x6C, - 0xED, - 0x97, - 0x66, - 0xB7, - 0x49, - 0xD7, - 0xB5, - 0x64, - 0xAD, - 0xCB, - 0x3F, - 0x30, - 0x8B, - 0x69, - 0x5F, - 0xF1, - 0xB5, - 0x23, - 0x2D, - 0x14, - 0xE8, - 0x9A, - 0x2E, - 0xC7, - 0xFE, - 0xEA, - 0xBA, - 0x3F, - 0x4E, - 0x27, - 0x9E, - 0xDA, - 0xC1, - 0x57, - 0xEE, - 0x9B, - 0x88, - 0x77, - 0x8D, - 0xB0, - 0x8C, - 0x55, - 0x3F, - 0x9C, - 0xC3, - 0x3F, - 0xF9, - 0x97, - 0x59, - 0xDA, - 0x15, - 0xAA, - 0xFB, - 0xF6, - 0xAF, - 0xA4, - 0x4B, - 0x50, - 0xC1, - 0xB0, - 0x0A, - 0x93, - 0x1B, - 0xF7, - 0x1F, - 0x44, - 0xB7, - 0xFD, - 0x4E, - 0x2B, - 0x54, - 0xDD, - 0xF2, - 0x55, - 0xB5, - 0xC7, - 0xA9, - 0xF1, - 0x30, - 0x0B, - 0xAF, - 0x29, - 0xF8, - 0xB3, - 0xB0, - 0x99, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, -) diff --git a/tests/obsolete/cmvspyconvert.py b/tests/obsolete/cmvspyconvert.py deleted file mode 100644 index fdb718a35..000000000 --- a/tests/obsolete/cmvspyconvert.py +++ /dev/null @@ -1,43 +0,0 @@ -# Converts a cmvspy.h file to a cmvspy.py file for use in python -# usage: cmvspyconvert.py cmvspy.h cmvspy_python.py -# arguments can be omitted -import sys -import re - -file_boiler_plate = ( - """#This file was automatically generated by '%s' -#from a cmvspy.h file. -#Example usage: -# from cmvspy import data as coremini_data\n\n""" - % sys.argv[0] -) - -if __name__ == "__main__": - try: - cmvspy_filename = sys.argv[1] - except IndexError: - cmvspy_filename = "cmvspy.h" - try: - cmvspy_py_filename = sys.argv[2] - except IndexError: - cmvspy_py_filename = "cmvspy.py" - print("'%s' Will be converted in '%s'" % (cmvspy_filename, cmvspy_py_filename)) - cmvspy_py_file = open(cmvspy_py_filename, "w+") - cmvspy_py_file.write(file_boiler_plate) - cmvspy_py_file.write("data = ( \\\n\t") - hex_regex = re.compile("^\s*0[xX][0-9a-fA-F]+") - BYTES_PER_LINE = 10 - bytes_current = 0 - with open(cmvspy_filename) as cmvspy_file: - for line in cmvspy_file: - matches = hex_regex.match(line) - if not matches: - continue - cmvspy_py_file.write(matches.group() + ", ") - bytes_current += 1 - if bytes_current >= 10: - bytes_current = 0 - cmvspy_py_file.write(" \\\n\t") - cmvspy_py_file.write(")\n") - cmvspy_py_file.close() - print("Done.") diff --git a/tests/obsolete/test_coremini.py b/tests/obsolete/test_coremini.py deleted file mode 100644 index f99cd0d20..000000000 --- a/tests/obsolete/test_coremini.py +++ /dev/null @@ -1,75 +0,0 @@ -import ics -import unittest -import random -import time -import os - -from cmvspy import data - - -class testCoreMini(unittest.TestCase): - def _clear_coremini(self): - if self.dev1.DeviceType == ics.NEODEVICE_VCAN3: - ics.coremini_clear(self.dev1, ics.SCRIPT_LOCATION_VCAN3_MEM) - else: - ics.coremini_clear(self.dev1, ics.SCRIPT_LOCATION_FLASH_MEM) - ics.coremini_clear(self.dev1, ics.SCRIPT_LOCATION_SDCARD) - - @classmethod - def setUpClass(self): - # input() # for debugging purposes - self.dev1 = ics.open_device() - self._clear_coremini(self) - - @classmethod - def tearDownClass(self): - # For some reason tp_dealloc doesn't get called on - # ics.NeoDevice when initialzed in setUpClass(). - # Lets force it here. - self._clear_coremini(self) - del self.dev1 - - def testStartStop(self): - def load_coremini(self, contents, location): - self.assertFalse(ics.coremini_get_status(self.dev1)) - ics.coremini_load(self.dev1, contents, location) - ics.coremini_start(self.dev1, location) - self.assertTrue(ics.coremini_get_status(self.dev1)) - time.sleep(2) - ics.coremini_clear(self.dev1, location) - time.sleep(0.1) - self.assertFalse(ics.coremini_get_status(self.dev1)) - - # This allows us to work in other directories and leave the vs3cmb file - # inside same directory as the script. - vs3file = os.path.dirname(os.path.realpath(__file__)) + "/cmvspy.vs3cmb" - if self.dev1.DeviceType == ics.NEODEVICE_VCAN3: - load_coremini(self, data, ics.SCRIPT_LOCATION_VCAN3_MEM) - load_coremini(self, vs3file, ics.SCRIPT_LOCATION_VCAN3_MEM) - elif self.dev1.DeviceType == ics.NEODEVICE_FIRE2: - load_coremini(self, data, ics.SCRIPT_LOCATION_SDCARD) - load_coremini(self, vs3file, ics.SCRIPT_LOCATION_SDCARD) - else: - load_coremini(self, data, ics.SCRIPT_LOCATION_FLASH_MEM) - load_coremini(self, data, ics.SCRIPT_LOCATION_SDCARD) - load_coremini(self, vs3file, ics.SCRIPT_LOCATION_FLASH_MEM) - load_coremini(self, vs3file, ics.SCRIPT_LOCATION_SDCARD) - - def testFblock(self): - if self.dev1.DeviceType == ics.NEODEVICE_VCAN3: - ics.coremini_load(self.dev1, data, ics.SCRIPT_LOCATION_VCAN3_MEM) - elif self.dev1.DeviceType == ics.NEODEVICE_FIRE2: - ics.coremini_load(self.dev1, data, ics.SCRIPT_LOCATION_SDCARD) - else: - ics.coremini_load(self.dev1, data, ics.SCRIPT_LOCATION_FLASH_MEM) - self.assertTrue(ics.coremini_get_fblock_status(self.dev1, 0)) - self.assertIsNone(ics.coremini_stop_fblock(self.dev1, 0)) - self.assertFalse(ics.coremini_get_fblock_status(self.dev1, 0)) - time.sleep(2) - self.assertIsNone(ics.coremini_start_fblock(self.dev1, 0)) - self.assertTrue(ics.coremini_get_fblock_status(self.dev1, 0)) - self._clear_coremini(self) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/obsolete/test_find_devices.py b/tests/obsolete/test_find_devices.py deleted file mode 100644 index 232373193..000000000 --- a/tests/obsolete/test_find_devices.py +++ /dev/null @@ -1,120 +0,0 @@ -import timeit -import unittest -import ics - -# This test requries 2 devices attached, one neoVI FIRE2s and one ValueCAN3 - -_DEBUG = False - - -class TestFindDevicesLegacy(unittest.TestCase): - @classmethod - def setUpClass(self): - ics.override_library_name(r"icsneo40-legacy.dll") - if _DEBUG: - import os - - input("Pause... " + str(os.getpid())) - - def test_default_parameters(self): - devices = ics.find_devices() - self.assertTrue(len(devices) == 2) - - def test_default_parameters_time(self): - if not _DEBUG: - self.assertTrue((timeit.timeit("ics.find_devices()", setup="import ics", number=1000)) <= 5.0) - - def test_find_fire2(self): - devices = ics.find_devices(ics.NEODEVICE_FIRE2) - self.assertTrue(len(devices) == 1) - - def test_find_vcan3(self): - devices = ics.find_devices(ics.NEODEVICE_VCAN3) - self.assertTrue(len(devices) == 1) - - def test_find_fire2_and_vcan3(self): - devices = ics.find_devices(ics.NEODEVICE_FIRE2 | ics.NEODEVICE_VCAN3) - self.assertTrue(len(devices) == 2) - - -class TestFindDevicesNewStyle(unittest.TestCase): - @classmethod - def setUpClass(self): - ics.override_library_name(r"icsneo40.dll") - if _DEBUG: - import os - - input("Pause... " + str(os.getpid())) - - def test_default_parameters(self): - devices = ics.find_devices() - self.assertTrue(len(devices) == 2) - - def test_default_parameters_time(self): - if not _DEBUG: - self.assertTrue((timeit.timeit("ics.find_devices()", setup="import ics", number=1000)) <= 5.0) - - def test_find_fire2(self): - devices = ics.find_devices( - [ - ics.NEODEVICE_FIRE2, - ] - ) - self.assertTrue(len(devices) == 1) - - def test_find_vcan3(self): - devices = ics.find_devices( - [ - ics.NEODEVICE_VCAN3, - ] - ) - self.assertTrue(len(devices) == 1) - - def test_find_fire2_and_vcan3(self): - devices = ics.find_devices([ics.NEODEVICE_FIRE2, ics.NEODEVICE_VCAN3]) - self.assertTrue(len(devices) == 2) - - -class TestFindDevicesNewStyleWithLegacyDLL(unittest.TestCase): - @classmethod - def setUpClass(self): - ics.override_library_name(r"icsneo40-legacy.dll") - if _DEBUG: - import os - - input("Pause... " + str(os.getpid())) - - def test_default_parameters(self): - devices = ics.find_devices() - self.assertTrue(len(devices) == 2) - - def test_default_parameters_time(self): - self.assertTrue((timeit.timeit("ics.find_devices()", setup="import ics", number=1000)) <= 5.0) - - def test_find_fire2(self): - devices = ics.find_devices( - [ - ics.NEODEVICE_FIRE2, - ] - ) - self.assertTrue(len(devices) == 2) - - def test_find_vcan3(self): - devices = ics.find_devices( - [ - ics.NEODEVICE_VCAN3, - ] - ) - self.assertTrue(len(devices) == 2) - - def test_find_fire2_and_vcan3(self): - devices = ics.find_devices([ics.NEODEVICE_FIRE2, ics.NEODEVICE_VCAN3]) - self.assertTrue(len(devices) == 2) - - -if __name__ == "__main__": - if _DEBUG: - import os - - input("Pause... " + str(os.getpid())) - unittest.main() diff --git a/tests/obsolete/test_get_device_status.py b/tests/obsolete/test_get_device_status.py deleted file mode 100644 index 86a7b674d..000000000 --- a/tests/obsolete/test_get_device_status.py +++ /dev/null @@ -1,19 +0,0 @@ -import ics -import time - - -def print_device_status(s): - for attr_name in dir(s): - if attr_name.startswith("_"): - continue - print(attr_name, " " * (35 - len(attr_name)), getattr(s, attr_name)) - if attr_name.upper() in ("FIRE2STATUS", "VCAN4STATUS"): - print() - print_device_status(getattr(s, attr_name)) - print() - - -d = ics.open_device() -time.sleep(0.250) # Give the device time to send the frame -s = ics.get_device_status(d) -print_device_status(s) diff --git a/tests/obsolete/test_network_fire.py b/tests/obsolete/test_network_fire.py deleted file mode 100644 index 38bf5da3e..000000000 --- a/tests/obsolete/test_network_fire.py +++ /dev/null @@ -1,129 +0,0 @@ -import ics -import unittest -import time -import random - - -class testneoVIFIRENetworks(unittest.TestCase): - @classmethod - def setUpClass(self): - devices = ics.find_devices(ics.NEODEVICE_FIRE) - ics.open_device(devices[0]) - ics.open_device(devices[1]) - self.dev1 = devices[0] - self.dev2 = devices[1] - - @classmethod - def setUp(self): - ics.load_default_settings(self.dev1) - ics.load_default_settings(self.dev2) - - # Make sure we start with a "clean" network - ics.get_error_messages(self.dev1) - ics.get_error_messages(self.dev2) - ics.get_messages(self.dev1, False, 0.1) - ics.get_messages(self.dev2, False, 0.1) - - @classmethod - def tearDownClass(self): - # For some reason tp_dealloc doesn't get called on - # ics.NeoDevice when initialzed in setUpClass(). - # Lets force it here. - del self.dev1 - del self.dev2 - - def testCAN(self): - message = ics.SpyMessage() - message.ArbIDOrHeader = 0xFF - message.Data = (1, 2, 3, 4, 5, 6, 7, 8) - for network in ( - ics.NETID_HSCAN, - ics.NETID_MSCAN, - ics.NETID_HSCAN2, - ics.NETID_HSCAN3, - ics.NETID_LSFTCAN, - ics.NETID_SWCAN, - ): - message.NetworkID = network - try: - self.assertTrue(ics.transmit_messages(self.dev1, message) == None, network) - except ics.RuntimeError as ex: - print(ex, network) - raise ex - self.assertFalse(ics.get_error_messages(self.dev1)) - self.assertFalse(ics.get_error_messages(self.dev2)) - messages, error_count = ics.get_messages(self.dev1, False, 0.1) - self.assertEqual(error_count, 0) - self.assertEqual(len(messages), 1) - self.assertEqual(message.ArbIDOrHeader, messages[0].ArbIDOrHeader) - self.assertEqual(message.NetworkID, messages[0].NetworkID) - self.assertEqual(message.Data, messages[0].Data) - self.assertFalse(ics.get_error_messages(self.dev1)) - self.assertFalse(ics.get_error_messages(self.dev2)) - - def testLIN(self): - message = ics.SpyMessageJ1850() - message.Header = (0x3C, 1, 2) - message.StatusBitField = ics.SPY_STATUS_NETWORK_MESSAGE_TYPE | ics.SPY_STATUS_LIN_MASTER - message.Protocol = ics.SPY_PROTOCOL_LIN - - for network in (ics.NETID_LIN, ics.NETID_LIN2, ics.NETID_LIN3, ics.NETID_LIN4): - message.NetworkID = network - message.Data = tuple([random.randint(x, 0xFF) for x in range(6)]) - # Generate the checksum - checksum = 0 - for byte in message.Data + message.Header[1:3]: - checksum += byte - if checksum > 255: - checksum -= 255 - message.Data += ((~checksum & 0xFF),) - self.assertTrue(ics.transmit_messages(self.dev1, message) == None) - self.assertFalse(ics.get_error_messages(self.dev1)) - self.assertFalse(ics.get_error_messages(self.dev2)) - messages, error_count = ics.get_messages(self.dev1, False, 0.1) - self.assertEqual(error_count, 0) - self.assertEqual(len(messages), 1) - self.assertEqual(message.Header, messages[0].Header) - self.assertEqual(message.NetworkID, messages[0].NetworkID) - self.assertEqual(message.Data[0:-1], messages[0].Data) - self.assertFalse(ics.get_error_messages(self.dev1)) - self.assertFalse(ics.get_error_messages(self.dev2)) - - def testMISC(self): - # dev1 = output, dev2 = input - def _test_misc(self, state): - arbs = (0x203, 0x204, 0x205, 0x206, 0x201, 0x202) - for arb in arbs: - message = ics.SpyMessage() - message.ArbIDOrHeader = arb - message.NetworkID = ics.NETID_DEVICE - message.Data = (state,) - self.assertEqual(ics.transmit_messages(self.dev1, message), None) - # Wait for the report message to get sent - time.sleep(0.2) - self.assertFalse(ics.get_error_messages(self.dev1)) - self.assertFalse(ics.get_error_messages(self.dev2)) - messages, error_count = ics.get_messages(self.dev2, False, 0.5) - self.assertEqual(error_count, 0) - self.assertNotEqual(len(messages), 0) - self.assertEqual(messages[-1].ArbIDOrHeader, 0x100) - for i, arb in enumerate(arbs): - # print(messages[-1].Data, messages[-1].Data[1]>>i & 1) - self.assertEqual(messages[-1].Data[1] >> i & 1, state, "MISC%d PIN state is wrong" % (arb - 0x200)) - self.assertFalse(ics.get_error_messages(self.dev1)) - self.assertFalse(ics.get_error_messages(self.dev2)) - - # Change the device settings - # dev1 = output, dev2 = input - settings = ics.get_device_settings(self.dev1) - settings.misc_io_initial_ddr = 0x3F - settings.misc_io_initial_latch = 0x3F - ics.set_device_settings(self.dev1, settings) - settings = ics.get_device_settings(self.dev2) - settings.misc_io_initial_ddr = 0x0 - settings.misc_io_initial_latch = 0x0 - settings.misc_io_on_report_events = 0x7F - settings.misc_io_report_period = 100 - ics.set_device_settings(self.dev2, settings) - _test_misc(self, 1) - _test_misc(self, 0) diff --git a/tests/obsolete/test_open_close.py b/tests/obsolete/test_open_close.py deleted file mode 100644 index dd50bcc91..000000000 --- a/tests/obsolete/test_open_close.py +++ /dev/null @@ -1,59 +0,0 @@ -import ics -import unittest -import time - - -class testneoVIFIRENetworks(unittest.TestCase): - @classmethod - def setUpClass(self): - self.devices = ics.find_devices() - - @classmethod - def setUp(self): - pass # time.sleep(2) - - @classmethod - def tearDownClass(self): - # For some reason tp_dealloc doesn't get called on - # ics.NeoDevice when initialzed in setUpClass(). - # Lets force it here. - del self.devices - - def testAutoClose(self): - devices = ics.find_devices() - for device in devices: - ics.open_device(device) - del devices # emulate NeoDevice list going out of scope - devices = ics.find_devices() - for device in devices: - ics.open_device(device) - - def testOpenCloseByFind(self): - # Open by ics.NeoDevice - for device in self.devices: - ics.open_device(device) - ics.close_device(device) - - def testOpenCloseBySerial(self): - # Open by serial number - for device in self.devices: - d = ics.open_device(device.SerialNumber) - ics.close_device(d) - - def testOpenCloseByFirstFound(self): - # Open by first found - first_devices = [] - for x in range(len(self.devices)): - first_devices.append(ics.open_device()) - # Close by API - for device in first_devices: - ics.close_device(device) - - def testOpenClose100Times(self): - for x in range(100): - try: - ics.open_device(self.devices[0]) - ics.close_device(self.devices[0]) - except Exception as ex: - print(f"Failed at iteration {x}...") - raise ex \ No newline at end of file diff --git a/tests/obsolete/test_structs.py b/tests/obsolete/test_structs.py deleted file mode 100644 index 25a9de512..000000000 --- a/tests/obsolete/test_structs.py +++ /dev/null @@ -1,249 +0,0 @@ -import unittest -import sys -import os - -# print(os.getcwd()) -print(os.path.abspath("../")) -sys.path.append("../") - -from ics.structures.inner_structure import * -from ics.structures.test_structure import * -from ics.structures.test import * - - -class TestTestEnum(unittest.TestCase): - def test_all(self): - self.assertEqual(test.TestNone, 0) - self.assertEqual(test.TestA, 1) - self.assertEqual(test.TestB, 2) - self.assertEqual(test.TestC, 3) - self.assertEqual(test.TestD, 4) - self.assertEqual(test.TestE, 5) - - -class TestInnerStructure(unittest.TestCase): - def test_all(self): - t = inner_structure() - self.assertTrue(isinstance(t, ctypes.Structure)) - - # default init - self.assertEqual(t.a, b"\x00") - self.assertEqual(t.b, 0) - self.assertEqual(t.t, 0) - t.a = b"Z" - self.assertEqual(t.a, b"Z") - self.assertEqual(t.b, 0) - self.assertEqual(t.t, 0) - t.a = b"\x00" - t.b = 10 - self.assertEqual(t.a, b"\x00") - self.assertEqual(t.b, 10) - self.assertEqual(t.t, 0) - t.b = 0 - t.t = test.TestD - self.assertEqual(t.a, b"\x00") - self.assertEqual(t.b, 0) - self.assertEqual(t.t, test.TestD) - - -class TestTestStructure(unittest.TestCase): - def test_a(self): - t = A() - self.assertTrue(isinstance(t, ctypes.Structure)) - # default init - self.assertEqual(t.a, 0) - self.assertEqual(t.b, 0) - self.assertEqual(t.c, 0) - t.a = 10 - self.assertEqual(t.a, 10) - self.assertEqual(t.b, 0) - self.assertEqual(t.c, 0) - t.a = 0 - t.b = 10 - self.assertEqual(t.a, 0) - self.assertEqual(t.b, 10) - self.assertEqual(t.c, 0) - t.b = 0 - t.c = 10 - self.assertEqual(t.a, 0) - self.assertEqual(t.b, 0) - self.assertEqual(t.c, 10) - - def test_b(self): - t = B() - self.assertTrue(isinstance(t, ctypes.Structure)) - # default init - self.assertEqual(t.d, 0) - self.assertEqual(t.e, 0) - self.assertEqual(t.f, 0) - t.d = 1 - self.assertEqual(t.d, 1) - self.assertEqual(t.e, 0) - self.assertEqual(t.f, 0) - t.d = 0 - t.e = 1 - self.assertEqual(t.d, 0) - self.assertEqual(t.e, 1) - self.assertEqual(t.f, 0) - t.e = 0 - t.f = 1 - self.assertEqual(t.d, 0) - self.assertEqual(t.e, 0) - self.assertEqual(t.f, 1) - - def test_c(self): - t = C() - self.assertTrue(isinstance(t, ctypes.Union)) - # default init - self.assertEqual(t.ghi, 0) - self.assertEqual(t.g, 0) - self.assertEqual(t.h, 0) - self.assertEqual(t.i, 0) - t.g = 1 - self.assertEqual(t.ghi, 0x1) - self.assertEqual(t.g, 1) - self.assertEqual(t.h, 0) - self.assertEqual(t.i, 0) - t.g = 0 - t.h = 1 - self.assertEqual(t.ghi, 0x10000) - self.assertEqual(t.g, 0) - self.assertEqual(t.h, 1) - self.assertEqual(t.i, 0) - t.h = 0 - t.i = 1 - self.assertEqual(t.ghi, 0x100000000) - self.assertEqual(t.g, 0) - self.assertEqual(t.h, 0) - self.assertEqual(t.i, 1) - t.i = 0 - t.ghi = 0x100010001 - self.assertEqual(t.ghi, 0x100010001) - self.assertEqual(t.g, 1) - self.assertEqual(t.h, 1) - self.assertEqual(t.i, 1) - - def test_d(self): - t = D() - self.assertTrue(isinstance(t, ctypes.Union)) - # default init - self.assertEqual(t.jkm, 0) - self.assertEqual(t.j, 0) - self.assertEqual(t.k, 0) - self.assertEqual(t.m, 0) - t.j = 1 - self.assertEqual(t.jkm, 0x1) - self.assertEqual(t.j, 1) - self.assertEqual(t.k, 0) - self.assertEqual(t.m, 0) - t.j = 0 - t.k = 1 - self.assertEqual(t.jkm, 0x10000) - self.assertEqual(t.j, 0) - self.assertEqual(t.k, 1) - self.assertEqual(t.m, 0) - t.k = 0 - t.m = 1 - self.assertEqual(t.jkm, 0x100000000) - self.assertEqual(t.j, 0) - self.assertEqual(t.k, 0) - self.assertEqual(t.m, 1) - t.m = 0 - t.jkm = 0x100010001 - self.assertEqual(t.jkm, 0x100010001) - self.assertEqual(t.j, 1) - self.assertEqual(t.k, 1) - self.assertEqual(t.m, 1) - - def test_e(self): - t = E() - self.assertTrue(isinstance(t, ctypes.Structure)) - # default init - self.assertEqual(t.n, 0) - self.assertEqual(t.p, 0) - self.assertEqual(t.q, 0) - t.n = 1 - self.assertEqual(t.n, 1) - self.assertEqual(t.p, 0) - self.assertEqual(t.q, 0) - t.n = 0 - t.p = 1 - self.assertEqual(t.n, 0) - self.assertEqual(t.p, 1) - self.assertEqual(t.q, 0) - t.p = 0 - t.q = 1 - self.assertEqual(t.n, 0) - self.assertEqual(t.p, 0) - self.assertEqual(t.q, 1) - t.q = 0 - self.assertEqual(t.n, 0) - self.assertEqual(t.p, 0) - self.assertEqual(t.q, 0) - - def test_f(self): - t = F() - self.assertTrue(isinstance(t, ctypes.Structure)) - # default init - self.assertEqual(t.r, 0) - self.assertEqual(t.s, 0) - self.assertEqual(t.t, 0) - t.r = 1 - self.assertEqual(t.r, 1) - self.assertEqual(t.s, 0) - self.assertEqual(t.t, 0) - t.r = 0 - t.s = 1 - self.assertEqual(t.r, 0) - self.assertEqual(t.s, 1) - self.assertEqual(t.t, 0) - t.s = 0 - t.t = 1 - self.assertEqual(t.r, 0) - self.assertEqual(t.s, 0) - self.assertEqual(t.t, 1) - t.t = 0 - self.assertEqual(t.r, 0) - self.assertEqual(t.s, 0) - self.assertEqual(t.t, 0) - - def test_anonymous(self): - t = test_structure() - self.assertTrue(isinstance(t, ctypes.Structure)) - - # test B - self.assertTrue(isinstance(t.B, ctypes.Structure)) - # default init - self.assertEqual(t._def, 0) - self.assertEqual(t.B.d, 0) - self.assertEqual(t.B.e, 0) - self.assertEqual(t.B.f, 0) - t.B.d = 1 - self.assertEqual(t._def, 0x1) - self.assertEqual(t.B.d, 1) - self.assertEqual(t.B.e, 0) - self.assertEqual(t.B.f, 0) - t.B.d = 0 - t.B.e = 1 - self.assertEqual(t._def, 0x2) - self.assertEqual(t.B.d, 0) - self.assertEqual(t.B.e, 1) - self.assertEqual(t.B.f, 0) - t.B.e = 0 - t.B.f = 1 - self.assertEqual(t._def, 0x4) - self.assertEqual(t.B.d, 0) - self.assertEqual(t.B.e, 0) - self.assertEqual(t.B.f, 1) - t._def = 0x7 - self.assertEqual(t._def, 0x7) - self.assertEqual(t.B.d, 1) - self.assertEqual(t.B.e, 1) - self.assertEqual(t.B.f, 1) - - -if __name__ == "__main__": - try: - unittest.main() - except SystemExit as ex: - print(f"Return code: {int(ex.code)}") diff --git a/tests/runner/Readme.md b/tests/runner/Readme.md deleted file mode 100644 index 55328b6a2..000000000 --- a/tests/runner/Readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Runner tests -=== - -This directory is specifically for testing against hardware attached to the runner. - -Each runner consists of the following hardware: - -- neoVI FIRE3 -- neoVI FIRE2 -- ValueCAN4-2 - - -- RAD-Moon2 -- RAD-Moon2 diff --git a/tests/runner/__init__.py b/tests/runner/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/runner/test_network.py b/tests/runner/test_network.py deleted file mode 100644 index 758d9de26..000000000 --- a/tests/runner/test_network.py +++ /dev/null @@ -1,118 +0,0 @@ -import unittest -import time -import ics -from ics.py_neo_device_ex import PyNeoDeviceEx -from ics.structures.e_device_settings_type import e_device_settings_type - -unittest.TestLoader.sortTestMethodsUsing = None - - -def are_errors_present(msg): - """Helper function to detect if a message error occurred.""" - error_flags = 0 - error_flags |= ics.SPY_STATUS_GLOBAL_ERR - error_flags |= ics.SPY_STATUS_CRC_ERROR - error_flags |= ics.SPY_STATUS_CAN_ERROR_PASSIVE - error_flags |= ics.SPY_STATUS_HEADERCRC_ERROR - error_flags |= ics.SPY_STATUS_INCOMPLETE_FRAME - error_flags |= ics.SPY_STATUS_LOST_ARBITRATION - error_flags |= ics.SPY_STATUS_UNDEFINED_ERROR - error_flags |= ics.SPY_STATUS_CAN_BUS_OFF - error_flags |= ics.SPY_STATUS_BUS_RECOVERED - error_flags |= ics.SPY_STATUS_BUS_SHORTED_PLUS - error_flags |= ics.SPY_STATUS_BUS_SHORTED_GND - error_flags |= ics.SPY_STATUS_CHECKSUM_ERROR - error_flags |= ics.SPY_STATUS_BAD_MESSAGE_BIT_TIME_ERROR - error_flags |= ics.SPY_STATUS_TX_NOMATCH - error_flags |= ics.SPY_STATUS_COMM_IN_OVERFLOW - error_flags |= ics.SPY_STATUS_EXPECTED_LEN_MISMATCH - error_flags |= ics.SPY_STATUS_MSG_NO_MATCH - error_flags |= ics.SPY_STATUS_BREAK - error_flags |= ics.SPY_STATUS_AVSI_REC_OVERFLOW - error_flags |= ics.SPY_STATUS_BREAK - if (msg.StatusBitField & error_flags) != 0: - return True - return False - - -class BaseTests: - """Base classes. These are isolated and won't be run/discovered. Used for inheritance""" - - class TestCAN(unittest.TestCase): - @classmethod - def setUpClass(cls): - cls.netid = None - - @classmethod - def setUp(self): - self.devices = ics.find_devices() - for device in self.devices: - device.open() - device.load_default_settings() - - @classmethod - def tearDown(self): - for device in self.devices: - device.close() - - def test_get_messages(self): - for device in self.devices: - messages, error_count = device.get_messages() - - def test_transmit(self): - data = tuple([x for x in range(64)]) - tx_msg = ics.SpyMessage() - tx_msg.ArbIDOrHeader = 0x01 - tx_msg.NetworkID = self.netid - tx_msg.Protocol = ics.SPY_PROTOCOL_CANFD - tx_msg.StatusBitField = ics.SPY_STATUS_CANFD | ics.SPY_STATUS_NETWORK_MESSAGE_TYPE - tx_msg.StatusBitField3 = ics.SPY_STATUS3_CANFD_BRS | ics.SPY_STATUS3_CANFD_FDF - tx_msg.ExtraDataPtr = data - for device in self.devices: - # Clear any messages in the buffer - _, __ = device.get_messages() - device.transmit_messages(tx_msg) - # CAN ACK timeout in firmware is 200ms, so wait 300ms for ACK - time.sleep(0.3) - start = time.time() - messages, error_count = device.get_messages(False, 1) - elapsed = time.time() - start - print(f"Elapsed time rx: {elapsed:.4f}s") - self.assertEqual(error_count, 0, str(device)) - self.assertTrue(len(messages) > 0, str(device)) - # Find the transmit message - tx_messages = [] - for message in messages: - if message.StatusBitField & ics.SPY_STATUS_TX_MSG == ics.SPY_STATUS_TX_MSG: - tx_messages.append(message) - self.assertEqual(len(tx_messages), 1, str(device)) - for message in tx_messages: - # We should only have one transmit message in the buffer - self.assertEqual(tx_msg.ArbIDOrHeader, message.ArbIDOrHeader, str(device)) - self.assertEqual(tx_msg.NetworkID, message.NetworkID, str(device)) - self.assertEqual(tx_msg.ExtraDataPtr, message.ExtraDataPtr, str(device)) - self.assertFalse(are_errors_present(message), f"{str(device)} {hex(message.StatusBitField)}") - self.assertEqual( - tx_msg.StatusBitField | ics.SPY_STATUS_TX_MSG, - message.StatusBitField, - f"{str(device)} {hex(tx_msg.StatusBitField| ics.SPY_STATUS_TX_MSG)} {hex(message.StatusBitField)}", - ) - self.assertEqual( - tx_msg.StatusBitField3, message.StatusBitField3, f"{str(device)} {hex(message.StatusBitField3)}" - ) - - -class TestHSCAN1(BaseTests.TestCAN): - @classmethod - def setUpClass(cls): - cls.netid = ics.NETID_HSCAN - - -class TestHSCAN2(BaseTests.TestCAN): - @classmethod - def setUpClass(cls): - cls.netid = ics.NETID_HSCAN2 - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/runner/test_open_close.py b/tests/runner/test_open_close.py deleted file mode 100644 index 6bd0f8dd1..000000000 --- a/tests/runner/test_open_close.py +++ /dev/null @@ -1,114 +0,0 @@ -import unittest -import ics - -unittest.TestLoader.sortTestMethodsUsing = None - - -class TestOpenClose(unittest.TestCase): - @classmethod - def setUpClass(self): - self.expected_dev_count = 3 - self.devices = ics.find_devices() - - @classmethod - def setUp(self): - pass - - @classmethod - def tearDownClass(self): - # For some reason tp_dealloc doesn't get called on - # ics.NeoDevice when initialzed in setUpClass(). - # Lets force it here. - del self.devices - - def _check_devices(self): - self.assertEqual( - len(self.devices), - self.expected_dev_count, - f"Expected {self.expected_dev_count}, found {len(self.devices)} ({self.devices})...", - ) - - def test_find_fire3(self): - self._check_devices() - devices = ics.find_devices([ics.NEODEVICE_FIRE3]) - self.assertTrue(len(devices) == 1) - self.assertEqual(devices[0].DeviceType, ics.NEODEVICE_FIRE3) - - def test_find_fire2(self): - self._check_devices() - devices = ics.find_devices([ics.NEODEVICE_FIRE2]) - self.assertTrue(len(devices) == 1) - self.assertEqual(devices[0].DeviceType, ics.NEODEVICE_FIRE2) - - def test_find_vcan42(self): - self._check_devices() - devices = ics.find_devices([ics.NEODEVICE_VCAN42]) - self.assertTrue(len(devices) == 1) - self.assertEqual(devices[0].DeviceType, ics.NEODEVICE_VCAN42) - - def test_find_fire2_and_vcan42(self): - self._check_devices() - devices = ics.find_devices([ics.NEODEVICE_FIRE2, ics.NEODEVICE_VCAN42]) - self.assertTrue(len(devices) == 2) - - def test_open_close(self): - self._check_devices() - for device in self.devices: - self.assertEqual(device.NumberOfClients, 0) - self.assertEqual(device.MaxAllowedClients, 1) - d = ics.open_device(device) - try: - self.assertEqual(device, d) - self.assertEqual(device.NumberOfClients, 1) - self.assertEqual(device.MaxAllowedClients, 1) - - self.assertEqual(d.NumberOfClients, 1) - self.assertEqual(d.MaxAllowedClients, 1) - finally: - self.assertEqual(device.NumberOfClients, 1) - self.assertEqual(d.NumberOfClients, 1) - ics.close_device(d) - self.assertEqual(device.NumberOfClients, 0) - self.assertEqual(d.NumberOfClients, 0) - - def test_open_close_by_serial(self): - # Open by serial number - for device in self.devices: - d = ics.open_device(device.SerialNumber) - self.assertEqual(d.SerialNumber, device.SerialNumber) - ics.close_device(d) - - def test_open_close_first_found(self): - # Open by first found - first_devices = [] - for x, device in enumerate(self.devices): - try: - self.assertEqual(device.NumberOfClients, 0, f"{device}") - d = ics.open_device() - first_devices.append(d) - self.assertEqual(d.NumberOfClients, 1, f"{device}") - except ics.RuntimeError as ex: - raise RuntimeError(f"Failed to open {device}... Iteration {len(first_devices)} ({ex})") - self.assertEqual(len(self.devices), len(first_devices)) - # Close by API - for device in first_devices: - self.assertEqual(device.NumberOfClients, 1, f"{device}") - ics.close_device(device) - self.assertEqual(device.NumberOfClients, 0, f"{device}") - - def test_open_close_10_times(self): - for device in self.devices: - for x in range(10): - try: - self.assertEqual(device.NumberOfClients, 0) - ics.open_device(device) - self.assertEqual(device.NumberOfClients, 1) - error_count = ics.close_device(device) - self.assertEqual(device.NumberOfClients, 0) - self.assertEqual(error_count, 0, "Error count was not 0 on {device} iteration {x}...") - except Exception as ex: - print(f"Failed at iteration {x} {device}: {ex}...") - raise ex - -if __name__ == "__main__": - unittest.main() diff --git a/tests/runner/test_settings.py b/tests/runner/test_settings.py deleted file mode 100644 index 5ded46cb0..000000000 --- a/tests/runner/test_settings.py +++ /dev/null @@ -1,71 +0,0 @@ -import unittest -import ics -from ics.py_neo_device_ex import PyNeoDeviceEx -from ics.structures.e_device_settings_type import e_device_settings_type - -unittest.TestLoader.sortTestMethodsUsing = None - - -class BaseTests: - """Base classes. These are isolated and won't be run/discovered. Used for inheritance""" - - class TestSettings(unittest.TestCase): - @classmethod - def setUpClass(cls): - cls.device_type = None - cls.device_settings_type = None - - def _get_device(self) -> PyNeoDeviceEx: - devices = ics.find_devices([self.device_type]) - self.assertEqual( - len(devices), - 1, - f"Failed to find any device types of {self.device_type}! Expected 1, got {len(devices)}.", - ) - return devices[0] - - def test_load_defaults(self): - device = self._get_device() - device.open() - try: - ics.load_default_settings(device) - finally: - device.close() - - def test_get_set_settings(self): - device = self._get_device() - device.open() - try: - ics.load_default_settings(device) - settings = ics.get_device_settings(device) - self.assertEqual(settings.DeviceSettingType, self.device_settings_type) - ics.set_device_settings(device, settings) - _ = ics.get_device_settings(device) - # TODO: compare both settings - finally: - device.close() - - -class TestFire3Settings(BaseTests.TestSettings): - @classmethod - def setUpClass(cls): - cls.device_type = ics.NEODEVICE_FIRE3 - cls.device_settings_type = e_device_settings_type.DeviceFire3SettingsType - - -class TestFire2Settings(BaseTests.TestSettings): - @classmethod - def setUpClass(cls): - cls.device_type = ics.NEODEVICE_FIRE2 - cls.device_settings_type = e_device_settings_type.DeviceFire2SettingsType - - -class TestValueCAN42Settings(BaseTests.TestSettings): - @classmethod - def setUpClass(cls): - cls.device_type = ics.NEODEVICE_VCAN42 - cls.device_settings_type = e_device_settings_type.DeviceVCAN412SettingsType - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/test_defines.py b/tests/test_defines.py new file mode 100644 index 000000000..fb8962744 --- /dev/null +++ b/tests/test_defines.py @@ -0,0 +1,26 @@ +import pytest +import ics + +def test_unsigned_overflow(): + """Test that certain defines are correctly set to large unsigned values.""" + # These values are defined in icsnVC40.h and should be interpreted as unsigned + values = ( + "SPY_STATUS_EXTENDED", + "SPY_STATUS2_ETHERNET_T1S_ETHERNET", + "SPY_STATUS2_LIN_NO_SLAVE_DATA", + "SPY_STATUS2_MOST_CHANGED_PAR" + ) + for value in values: + if hasattr(ics, value): + assert getattr(ics, value) == 0x80000000 + +if __name__ == "__main__": + import pytest + + pytest.main( + args=[ + __file__, + "--verbose", + "-s", + ] + ) diff --git a/uv.lock b/uv.lock index bdcce60bc..89db95d3e 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 1 +revision = 3 requires-python = ">=3.9" [[package]]