////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
// All Rights Reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// THIS IS AUTO-GENERATED CODE.  PLEASE DO NOT EDIT (File bug reports against tools).
///
/// Auto-generated by: Parameter Parser V5.5.1 (2411131018)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @file  camxsensordriver.cpp
/// @brief Auto-generated Chromatix parameter file
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#include "camxsensordriver.h"
#include "parametersetmanager.h"

CAMX_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_ModuleType(
    ParameterFileSymbolTableEntry* const entry,
    ModuleType& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(ModuleType::REAL):
            enumValue = ModuleType::REAL;
            result    = true;
            break;
        case static_cast<UINT32>(ModuleType::VIRTUAL):
            enumValue = ModuleType::VIRTUAL;
            result    = true;
            break;
        case static_cast<UINT32>(ModuleType::EXTERNAL):
            enumValue = ModuleType::EXTERNAL;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to ModuleType", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_HDRExposureTypeInfo(
    ParameterFileSymbolTableEntry* const entry,
    HDRExposureTypeInfo& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(HDRExposureTypeInfo::TWOEXPOSURE):
            enumValue = HDRExposureTypeInfo::TWOEXPOSURE;
            result    = true;
            break;
        case static_cast<UINT32>(HDRExposureTypeInfo::THREEEXPOSURE):
            enumValue = HDRExposureTypeInfo::THREEEXPOSURE;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to HDRExposureTypeInfo", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_ColorFilterArrangement(
    ParameterFileSymbolTableEntry* const entry,
    ColorFilterArrangement& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(ColorFilterArrangement::BAYER_BGGR):
            enumValue = ColorFilterArrangement::BAYER_BGGR;
            result    = true;
            break;
        case static_cast<UINT32>(ColorFilterArrangement::BAYER_GBRG):
            enumValue = ColorFilterArrangement::BAYER_GBRG;
            result    = true;
            break;
        case static_cast<UINT32>(ColorFilterArrangement::BAYER_GRBG):
            enumValue = ColorFilterArrangement::BAYER_GRBG;
            result    = true;
            break;
        case static_cast<UINT32>(ColorFilterArrangement::BAYER_RGGB):
            enumValue = ColorFilterArrangement::BAYER_RGGB;
            result    = true;
            break;
        case static_cast<UINT32>(ColorFilterArrangement::BAYER_Y):
            enumValue = ColorFilterArrangement::BAYER_Y;
            result    = true;
            break;
        case static_cast<UINT32>(ColorFilterArrangement::YUV_UYVY):
            enumValue = ColorFilterArrangement::YUV_UYVY;
            result    = true;
            break;
        case static_cast<UINT32>(ColorFilterArrangement::YUV_YUYV):
            enumValue = ColorFilterArrangement::YUV_YUYV;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to ColorFilterArrangement", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_DelayInfoType(
    ParameterFileSymbolTableEntry* const entry,
    DelayInfoType& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(DelayInfoType::EXPOSURECONTROL):
            enumValue = DelayInfoType::EXPOSURECONTROL;
            result    = true;
            break;
        case static_cast<UINT32>(DelayInfoType::FRAMESYNC):
            enumValue = DelayInfoType::FRAMESYNC;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to DelayInfoType", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_StreamType(
    ParameterFileSymbolTableEntry* const entry,
    StreamType& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(StreamType::BLOB):
            enumValue = StreamType::BLOB;
            result    = true;
            break;
        case static_cast<UINT32>(StreamType::IMAGE):
            enumValue = StreamType::IMAGE;
            result    = true;
            break;
        case static_cast<UINT32>(StreamType::IMAGE1):
            enumValue = StreamType::IMAGE1;
            result    = true;
            break;
        case static_cast<UINT32>(StreamType::IMAGE2):
            enumValue = StreamType::IMAGE2;
            result    = true;
            break;
        case static_cast<UINT32>(StreamType::PDAF):
            enumValue = StreamType::PDAF;
            result    = true;
            break;
        case static_cast<UINT32>(StreamType::HDR):
            enumValue = StreamType::HDR;
            result    = true;
            break;
        case static_cast<UINT32>(StreamType::META):
            enumValue = StreamType::META;
            result    = true;
            break;
        case static_cast<UINT32>(StreamType::IMAGE_SHORT):
            enumValue = StreamType::IMAGE_SHORT;
            result    = true;
            break;
        case static_cast<UINT32>(StreamType::IMAGE_MIDDLE):
            enumValue = StreamType::IMAGE_MIDDLE;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to StreamType", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_SensorCapability(
    ParameterFileSymbolTableEntry* const entry,
    SensorCapability& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(SensorCapability::NORMAL):
            enumValue = SensorCapability::NORMAL;
            result    = true;
            break;
        case static_cast<UINT32>(SensorCapability::HFR):
            enumValue = SensorCapability::HFR;
            result    = true;
            break;
        case static_cast<UINT32>(SensorCapability::IHDR):
            enumValue = SensorCapability::IHDR;
            result    = true;
            break;
        case static_cast<UINT32>(SensorCapability::PDAF):
            enumValue = SensorCapability::PDAF;
            result    = true;
            break;
        case static_cast<UINT32>(SensorCapability::QUADCFA):
            enumValue = SensorCapability::QUADCFA;
            result    = true;
            break;
        case static_cast<UINT32>(SensorCapability::ZZHDR):
            enumValue = SensorCapability::ZZHDR;
            result    = true;
            break;
        case static_cast<UINT32>(SensorCapability::FASTAEC):
            enumValue = SensorCapability::FASTAEC;
            result    = true;
            break;
        case static_cast<UINT32>(SensorCapability::DEPTH):
            enumValue = SensorCapability::DEPTH;
            result    = true;
            break;
        case static_cast<UINT32>(SensorCapability::SHDR):
            enumValue = SensorCapability::SHDR;
            result    = true;
            break;
        case static_cast<UINT32>(SensorCapability::FS):
            enumValue = SensorCapability::FS;
            result    = true;
            break;
        case static_cast<UINT32>(SensorCapability::INSENSORZOOM):
            enumValue = SensorCapability::INSENSORZOOM;
            result    = true;
            break;
        case static_cast<UINT32>(SensorCapability::INTERNAL):
            enumValue = SensorCapability::INTERNAL;
            result    = true;
            break;
        case static_cast<UINT32>(SensorCapability::HDMI):
            enumValue = SensorCapability::HDMI;
            result    = true;
            break;
        case static_cast<UINT32>(SensorCapability::DP):
            enumValue = SensorCapability::DP;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to SensorCapability", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_MipiFlagsType(
    ParameterFileSymbolTableEntry* const entry,
    MipiFlagsType& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(MipiFlagsType::EPDEnabled):
            enumValue = MipiFlagsType::EPDEnabled;
            result    = true;
            break;
        case static_cast<UINT32>(MipiFlagsType::DSKEWCalibEnabled):
            enumValue = MipiFlagsType::DSKEWCalibEnabled;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to MipiFlagsType", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_SHDRTypeEnum(
    ParameterFileSymbolTableEntry* const entry,
    SHDRTypeEnum& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(SHDRTypeEnum::NON_HDR_FRAME):
            enumValue = SHDRTypeEnum::NON_HDR_FRAME;
            result    = true;
            break;
        case static_cast<UINT32>(SHDRTypeEnum::LI_2FRAME):
            enumValue = SHDRTypeEnum::LI_2FRAME;
            result    = true;
            break;
        case static_cast<UINT32>(SHDRTypeEnum::LI_3FRAME):
            enumValue = SHDRTypeEnum::LI_3FRAME;
            result    = true;
            break;
        case static_cast<UINT32>(SHDRTypeEnum::VC_2FRAME):
            enumValue = SHDRTypeEnum::VC_2FRAME;
            result    = true;
            break;
        case static_cast<UINT32>(SHDRTypeEnum::VC_3FRAME):
            enumValue = SHDRTypeEnum::VC_3FRAME;
            result    = true;
            break;
        case static_cast<UINT32>(SHDRTypeEnum::PWL_COMP):
            enumValue = SHDRTypeEnum::PWL_COMP;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to SHDRTypeEnum", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_HDR3ExposureTypeInfo(
    ParameterFileSymbolTableEntry* const entry,
    HDR3ExposureTypeInfo& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(HDR3ExposureTypeInfo::HDR3ExposureTypeUnknown):
            enumValue = HDR3ExposureTypeInfo::HDR3ExposureTypeUnknown;
            result    = true;
            break;
        case static_cast<UINT32>(HDR3ExposureTypeInfo::HDR3ExposureType1):
            enumValue = HDR3ExposureTypeInfo::HDR3ExposureType1;
            result    = true;
            break;
        case static_cast<UINT32>(HDR3ExposureTypeInfo::HDR3ExposureType2):
            enumValue = HDR3ExposureTypeInfo::HDR3ExposureType2;
            result    = true;
            break;
        case static_cast<UINT32>(HDR3ExposureTypeInfo::HDR3ExposureType3):
            enumValue = HDR3ExposureTypeInfo::HDR3ExposureType3;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to HDR3ExposureTypeInfo", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_ZZHDRFirstExposurePattern(
    ParameterFileSymbolTableEntry* const entry,
    ZZHDRFirstExposurePattern& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(ZZHDRFirstExposurePattern::SHORTEXPOSURE):
            enumValue = ZZHDRFirstExposurePattern::SHORTEXPOSURE;
            result    = true;
            break;
        case static_cast<UINT32>(ZZHDRFirstExposurePattern::LONGEXPOSURE):
            enumValue = ZZHDRFirstExposurePattern::LONGEXPOSURE;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to ZZHDRFirstExposurePattern", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_ZZHDRColorPattern(
    ParameterFileSymbolTableEntry* const entry,
    ZZHDRColorPattern& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(ZZHDRColorPattern::P0P1P0P0):
            enumValue = ZZHDRColorPattern::P0P1P0P0;
            result    = true;
            break;
        case static_cast<UINT32>(ZZHDRColorPattern::P0P1P0P1):
            enumValue = ZZHDRColorPattern::P0P1P0P1;
            result    = true;
            break;
        case static_cast<UINT32>(ZZHDRColorPattern::P0P0P1P0):
            enumValue = ZZHDRColorPattern::P0P0P1P0;
            result    = true;
            break;
        case static_cast<UINT32>(ZZHDRColorPattern::P0P0P1P1):
            enumValue = ZZHDRColorPattern::P0P0P1P1;
            result    = true;
            break;
        case static_cast<UINT32>(ZZHDRColorPattern::P0P0P0P1):
            enumValue = ZZHDRColorPattern::P0P0P0P1;
            result    = true;
            break;
        case static_cast<UINT32>(ZZHDRColorPattern::P0P1P1P1):
            enumValue = ZZHDRColorPattern::P0P1P1P1;
            result    = true;
            break;
        case static_cast<UINT32>(ZZHDRColorPattern::P0P1P1P0):
            enumValue = ZZHDRColorPattern::P0P1P1P0;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to ZZHDRColorPattern", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_RemosaicType(
    ParameterFileSymbolTableEntry* const entry,
    RemosaicType& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(RemosaicType::SWRemosaic):
            enumValue = RemosaicType::SWRemosaic;
            result    = true;
            break;
        case static_cast<UINT32>(RemosaicType::HWRemosaic):
            enumValue = RemosaicType::HWRemosaic;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to RemosaicType", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_TestPatternMode(
    ParameterFileSymbolTableEntry* const entry,
    TestPatternMode& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(TestPatternMode::OFF):
            enumValue = TestPatternMode::OFF;
            result    = true;
            break;
        case static_cast<UINT32>(TestPatternMode::SOLID_COLOR):
            enumValue = TestPatternMode::SOLID_COLOR;
            result    = true;
            break;
        case static_cast<UINT32>(TestPatternMode::COLOR_BARS):
            enumValue = TestPatternMode::COLOR_BARS;
            result    = true;
            break;
        case static_cast<UINT32>(TestPatternMode::COLOR_BARS_FADE_TO_GRAY):
            enumValue = TestPatternMode::COLOR_BARS_FADE_TO_GRAY;
            result    = true;
            break;
        case static_cast<UINT32>(TestPatternMode::PN9):
            enumValue = TestPatternMode::PN9;
            result    = true;
            break;
        case static_cast<UINT32>(TestPatternMode::CUSTOM1):
            enumValue = TestPatternMode::CUSTOM1;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to TestPatternMode", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_SensingMethod(
    ParameterFileSymbolTableEntry* const entry,
    SensingMethod& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(SensingMethod::UNDEFINED):
            enumValue = SensingMethod::UNDEFINED;
            result    = true;
            break;
        case static_cast<UINT32>(SensingMethod::ONE_CHIP_COLOR_AREA):
            enumValue = SensingMethod::ONE_CHIP_COLOR_AREA;
            result    = true;
            break;
        case static_cast<UINT32>(SensingMethod::TWO_CHIP_COLOR_AREA):
            enumValue = SensingMethod::TWO_CHIP_COLOR_AREA;
            result    = true;
            break;
        case static_cast<UINT32>(SensingMethod::THREE_CHIP_COLOR_AREA):
            enumValue = SensingMethod::THREE_CHIP_COLOR_AREA;
            result    = true;
            break;
        case static_cast<UINT32>(SensingMethod::COLOR_SEQUENCE_AREA):
            enumValue = SensingMethod::COLOR_SEQUENCE_AREA;
            result    = true;
            break;
        case static_cast<UINT32>(SensingMethod::TRILINEAR):
            enumValue = SensingMethod::TRILINEAR;
            result    = true;
            break;
        case static_cast<UINT32>(SensingMethod::COLOR_SEQUENCE_LINEAR):
            enumValue = SensingMethod::COLOR_SEQUENCE_LINEAR;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to SensingMethod", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_NoiseCoefficientChannel(
    ParameterFileSymbolTableEntry* const entry,
    NoiseCoefficientChannel& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(NoiseCoefficientChannel::BAYER_R):
            enumValue = NoiseCoefficientChannel::BAYER_R;
            result    = true;
            break;
        case static_cast<UINT32>(NoiseCoefficientChannel::BAYER_Gr):
            enumValue = NoiseCoefficientChannel::BAYER_Gr;
            result    = true;
            break;
        case static_cast<UINT32>(NoiseCoefficientChannel::BAYER_Gb):
            enumValue = NoiseCoefficientChannel::BAYER_Gb;
            result    = true;
            break;
        case static_cast<UINT32>(NoiseCoefficientChannel::BAYER_B):
            enumValue = NoiseCoefficientChannel::BAYER_B;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to NoiseCoefficientChannel", uintValue);
            break;
        }
    }
    return result;
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
SensorDriverDataClass::SensorDriverDataClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(slaveInfo);
    PARAMETER_INITIALIZE(regAddrInfo);
    PARAMETER_INITIALIZE(resolutionInfoCount);
    PARAMETER_INITIALIZE(resolutionInfo);
    PARAMETER_INITIALIZE(exposureControlInfo);
    PARAMETER_INITIALIZE(streamOnSettings);
    PARAMETER_INITIALIZE(streamOffSettings);
    PARAMETER_INITIALIZE(groupHoldOnSettings);
    PARAMETER_INITIALIZE(groupHoldOffSettings);
    PARAMETER_INITIALIZE(masterSettingsExists);
    PARAMETER_INITIALIZE(masterSettings);
    PARAMETER_INITIALIZE(slaveSettingsExists);
    PARAMETER_INITIALIZE(slaveSettings);
    PARAMETER_INITIALIZE(softwareSyncConfigurationExists);
    PARAMETER_INITIALIZE(softwareSyncConfiguration);
    PARAMETER_INITIALIZE(temperatureReadInfoExists);
    PARAMETER_INITIALIZE(temperatureReadInfo);
    PARAMETER_INITIALIZE(initSettingsCount);
    PARAMETER_INITIALIZE(initSettings);
    PARAMETER_INITIALIZE(testPatternInfo);
    PARAMETER_INITIALIZE(gmslInfoExists);
    PARAMETER_INITIALIZE(gmslInfo);
    PARAMETER_INITIALIZE(colorLevelInfo);
    PARAMETER_INITIALIZE(opticalBlackRegionInfo);
    PARAMETER_INITIALIZE(pixelArrayInfo);
    PARAMETER_INITIALIZE(delayInfoCount);
    PARAMETER_INITIALIZE(delayInfo);
    PARAMETER_INITIALIZE(sensorProperty);
    PARAMETER_INITIALIZE(noiseCoefficentExists);
    PARAMETER_INITIALIZE(noiseCoefficent);
    PARAMETER_INITIALIZE(noiseCoefficientBayerExists);
    PARAMETER_INITIALIZE(noiseCoefficientBayer);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
SensorDriverDataClass::SensorDriverDataClass(
    const CHAR* const name,
    ModuleData* const moduleData)
    : ParameterModule(name, MAJOR, MINOR, PATCH, moduleData)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(slaveInfo);
    PARAMETER_INITIALIZE(regAddrInfo);
    PARAMETER_INITIALIZE(resolutionInfo);
    PARAMETER_INITIALIZE(exposureControlInfo);
    PARAMETER_INITIALIZE(streamOnSettings);
    PARAMETER_INITIALIZE(streamOffSettings);
    PARAMETER_INITIALIZE(groupHoldOnSettings);
    PARAMETER_INITIALIZE(groupHoldOffSettings);
    PARAMETER_INITIALIZE(masterSettings);
    PARAMETER_INITIALIZE(slaveSettings);
    PARAMETER_INITIALIZE(softwareSyncConfiguration);
    PARAMETER_INITIALIZE(temperatureReadInfo);
    PARAMETER_INITIALIZE(initSettings);
    PARAMETER_INITIALIZE(testPatternInfo);
    PARAMETER_INITIALIZE(gmslInfo);
    PARAMETER_INITIALIZE(colorLevelInfo);
    PARAMETER_INITIALIZE(opticalBlackRegionInfo);
    PARAMETER_INITIALIZE(pixelArrayInfo);
    PARAMETER_INITIALIZE(delayInfo);
    PARAMETER_INITIALIZE(sensorProperty);
    PARAMETER_INITIALIZE(noiseCoefficent);
    PARAMETER_INITIALIZE(noiseCoefficientBayer);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Destructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
SensorDriverDataClass::~SensorDriverDataClass()
{
    if (Loaded)
    {
        UnloadModule();
    }
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// GetName
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CHAR* SensorDriverDataClass::GetName(
    const CHAR* const type)
{
    const CHAR* name = type;
    CHAR temp[ParameterFileSymbolTableEntry::TYPE_LEN + 1];
    if (PARAMETER_STRCMP(type, ModuleData::GetType(temp, "sensorDriverData")) == 0)
    {
        name = "sensorDriverData";
    }
    return name;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load SlaveInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool SlaveInformation::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(sensorName);
    PARAMETER_INITIALIZE(moduleTypeExists);
    PARAMETER_INITIALIZE(moduleType);
    PARAMETER_INITIALIZE(slaveAddress);
    PARAMETER_INITIALIZE(regAddrType);
    PARAMETER_INITIALIZE(regDataType);
    PARAMETER_INITIALIZE(sensorIdRegAddr);
    PARAMETER_INITIALIZE(sensorId);
    PARAMETER_INITIALIZE(sensorIdMask);
    PARAMETER_INITIALIZE(i2cFrequencyMode);
    PARAMETER_INITIALIZE(powerUpSequence);
    PARAMETER_INITIALIZE(powerDownSequence);


    // Reading String sensorName from symbol table
    {
        UINT32 count = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, count, alignment)
        ParameterFileSymbolTableEntry stringPointerEntryCls;
        ParameterFileSymbolTableEntry* const stringPointerEntry = &stringPointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(stringPointerEntryCls, entry, alignment);
        }
        SYMBOL_TABLE_ENTRY_READ_STRING(stringPointerEntry, result, sensorName, count, alignment)
    }

    // Reading Optional parameter moduleType from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, moduleTypeExists, alignment)
        moduleTypeID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && moduleTypeExists)
        {
            if (result)
            {
                result = ReadEnum_ModuleType(pointerEntry, moduleType, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(moduleType);
        }
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, slaveAddress, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, regAddrType, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, regDataType, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, sensorIdRegAddr, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, sensorId, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, sensorIdMask, alignment)
    if (result)
    {
        result = ReadEnum_I2CFrequencyMode(entry, i2cFrequencyMode, alignment);
    }
    if (result)
    {
        result = powerUpSequence.Load(entry, alignment);
    }
    if (result)
    {
        result = powerDownSequence.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load RegAddrInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool RegAddrInformation::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(xOutput);
    PARAMETER_INITIALIZE(yOutput);
    PARAMETER_INITIALIZE(frameLengthLines);
    PARAMETER_INITIALIZE(lineLengthPixelClock);
    PARAMETER_INITIALIZE(coarseIntgTimeAddr);
    PARAMETER_INITIALIZE(middleCoarseIntgTimeAddrExists);
    PARAMETER_INITIALIZE(middleCoarseIntgTimeAddr);
    PARAMETER_INITIALIZE(shortCoarseIntgTimeAddrExists);
    PARAMETER_INITIALIZE(shortCoarseIntgTimeAddr);
    PARAMETER_INITIALIZE(globalGainAddr);
    PARAMETER_INITIALIZE(middleGlobalGainAddrExists);
    PARAMETER_INITIALIZE(middleGlobalGainAddr);
    PARAMETER_INITIALIZE(shortGlobalGainAddrExists);
    PARAMETER_INITIALIZE(shortGlobalGainAddr);
    PARAMETER_INITIALIZE(digitalGlobalGainAddrExists);
    PARAMETER_INITIALIZE(digitalGlobalGainAddr);
    PARAMETER_INITIALIZE(middleDigitalGlobalGainAddrExists);
    PARAMETER_INITIALIZE(middleDigitalGlobalGainAddr);
    PARAMETER_INITIALIZE(shortDigitalGlobalGainAddrExists);
    PARAMETER_INITIALIZE(shortDigitalGlobalGainAddr);
    PARAMETER_INITIALIZE(digitalGainRedAddrExists);
    PARAMETER_INITIALIZE(digitalGainRedAddr);
    PARAMETER_INITIALIZE(digitalGainGreenRedAddrExists);
    PARAMETER_INITIALIZE(digitalGainGreenRedAddr);
    PARAMETER_INITIALIZE(digitalGainBlueAddrExists);
    PARAMETER_INITIALIZE(digitalGainBlueAddr);
    PARAMETER_INITIALIZE(digitalGainGreenBlueAddrExists);
    PARAMETER_INITIALIZE(digitalGainGreenBlueAddr);
    PARAMETER_INITIALIZE(testPatternRAddr);
    PARAMETER_INITIALIZE(testPatternGRAddr);
    PARAMETER_INITIALIZE(testPatternBAddr);
    PARAMETER_INITIALIZE(testPatternGBAddr);

    SYMBOL_TABLE_ENTRY_READ(entry, result, xOutput, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, yOutput, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, frameLengthLines, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, lineLengthPixelClock, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, coarseIntgTimeAddr, alignment)

    // Reading Optional parameter middleCoarseIntgTimeAddr from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, middleCoarseIntgTimeAddrExists, alignment)
        middleCoarseIntgTimeAddrID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && middleCoarseIntgTimeAddrExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, middleCoarseIntgTimeAddr, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(middleCoarseIntgTimeAddr);
        }
    }

    // Reading Optional parameter shortCoarseIntgTimeAddr from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, shortCoarseIntgTimeAddrExists, alignment)
        shortCoarseIntgTimeAddrID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && shortCoarseIntgTimeAddrExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, shortCoarseIntgTimeAddr, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(shortCoarseIntgTimeAddr);
        }
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, globalGainAddr, alignment)

    // Reading Optional parameter middleGlobalGainAddr from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, middleGlobalGainAddrExists, alignment)
        middleGlobalGainAddrID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && middleGlobalGainAddrExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, middleGlobalGainAddr, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(middleGlobalGainAddr);
        }
    }

    // Reading Optional parameter shortGlobalGainAddr from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, shortGlobalGainAddrExists, alignment)
        shortGlobalGainAddrID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && shortGlobalGainAddrExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, shortGlobalGainAddr, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(shortGlobalGainAddr);
        }
    }

    // Reading Optional parameter digitalGlobalGainAddr from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, digitalGlobalGainAddrExists, alignment)
        digitalGlobalGainAddrID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && digitalGlobalGainAddrExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, digitalGlobalGainAddr, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(digitalGlobalGainAddr);
        }
    }

    // Reading Optional parameter middleDigitalGlobalGainAddr from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, middleDigitalGlobalGainAddrExists, alignment)
        middleDigitalGlobalGainAddrID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && middleDigitalGlobalGainAddrExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, middleDigitalGlobalGainAddr, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(middleDigitalGlobalGainAddr);
        }
    }

    // Reading Optional parameter shortDigitalGlobalGainAddr from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, shortDigitalGlobalGainAddrExists, alignment)
        shortDigitalGlobalGainAddrID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && shortDigitalGlobalGainAddrExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, shortDigitalGlobalGainAddr, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(shortDigitalGlobalGainAddr);
        }
    }

    // Reading Optional parameter digitalGainRedAddr from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, digitalGainRedAddrExists, alignment)
        digitalGainRedAddrID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && digitalGainRedAddrExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, digitalGainRedAddr, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(digitalGainRedAddr);
        }
    }

    // Reading Optional parameter digitalGainGreenRedAddr from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, digitalGainGreenRedAddrExists, alignment)
        digitalGainGreenRedAddrID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && digitalGainGreenRedAddrExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, digitalGainGreenRedAddr, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(digitalGainGreenRedAddr);
        }
    }

    // Reading Optional parameter digitalGainBlueAddr from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, digitalGainBlueAddrExists, alignment)
        digitalGainBlueAddrID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && digitalGainBlueAddrExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, digitalGainBlueAddr, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(digitalGainBlueAddr);
        }
    }

    // Reading Optional parameter digitalGainGreenBlueAddr from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, digitalGainGreenBlueAddrExists, alignment)
        digitalGainGreenBlueAddrID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && digitalGainGreenBlueAddrExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, digitalGainGreenBlueAddr, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(digitalGainGreenBlueAddr);
        }
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, testPatternRAddr, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, testPatternGRAddr, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, testPatternBAddr, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, testPatternGBAddr, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load ResolutionExposureInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ResolutionExposureInformation::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(exposureType);
    PARAMETER_INITIALIZE(coarseIntgTimeAddrExists);
    PARAMETER_INITIALIZE(coarseIntgTimeAddr);
    PARAMETER_INITIALIZE(globalGainAddrExists);
    PARAMETER_INITIALIZE(globalGainAddr);
    PARAMETER_INITIALIZE(digitalGlobalGainAddrExists);
    PARAMETER_INITIALIZE(digitalGlobalGainAddr);
    PARAMETER_INITIALIZE(maxAnalogGainExists);
    PARAMETER_INITIALIZE(maxAnalogGain);
    PARAMETER_INITIALIZE(minAnalogGainExists);
    PARAMETER_INITIALIZE(minAnalogGain);
    PARAMETER_INITIALIZE(maxDigitalGainExists);
    PARAMETER_INITIALIZE(maxDigitalGain);
    PARAMETER_INITIALIZE(minDigitalGainExists);
    PARAMETER_INITIALIZE(minDigitalGain);
    PARAMETER_INITIALIZE(maxLineCountExists);
    PARAMETER_INITIALIZE(maxLineCount);
    PARAMETER_INITIALIZE(minLineCountExists);
    PARAMETER_INITIALIZE(minLineCount);
    PARAMETER_INITIALIZE(verticalOffsetExists);
    PARAMETER_INITIALIZE(verticalOffset);

    result = ReadEnum_ExposureType(entry, exposureType, alignment);

    // Reading Optional parameter coarseIntgTimeAddr from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, coarseIntgTimeAddrExists, alignment)
        coarseIntgTimeAddrID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && coarseIntgTimeAddrExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, coarseIntgTimeAddr, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(coarseIntgTimeAddr);
        }
    }

    // Reading Optional parameter globalGainAddr from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, globalGainAddrExists, alignment)
        globalGainAddrID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && globalGainAddrExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, globalGainAddr, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(globalGainAddr);
        }
    }

    // Reading Optional parameter digitalGlobalGainAddr from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, digitalGlobalGainAddrExists, alignment)
        digitalGlobalGainAddrID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && digitalGlobalGainAddrExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, digitalGlobalGainAddr, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(digitalGlobalGainAddr);
        }
    }

    // Reading Optional parameter maxAnalogGain from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, maxAnalogGainExists, alignment)
        maxAnalogGainID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && maxAnalogGainExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, maxAnalogGain, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(maxAnalogGain);
        }
    }

    // Reading Optional parameter minAnalogGain from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, minAnalogGainExists, alignment)
        minAnalogGainID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && minAnalogGainExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, minAnalogGain, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(minAnalogGain);
        }
    }

    // Reading Optional parameter maxDigitalGain from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, maxDigitalGainExists, alignment)
        maxDigitalGainID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && maxDigitalGainExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, maxDigitalGain, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(maxDigitalGain);
        }
    }

    // Reading Optional parameter minDigitalGain from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, minDigitalGainExists, alignment)
        minDigitalGainID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && minDigitalGainExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, minDigitalGain, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(minDigitalGain);
        }
    }

    // Reading Optional parameter maxLineCount from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, maxLineCountExists, alignment)
        maxLineCountID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && maxLineCountExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, maxLineCount, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(maxLineCount);
        }
    }

    // Reading Optional parameter minLineCount from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, minLineCountExists, alignment)
        minLineCountID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && minLineCountExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, minLineCount, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(minLineCount);
        }
    }

    // Reading Optional parameter verticalOffset from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, verticalOffsetExists, alignment)
        verticalOffsetID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && verticalOffsetExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, verticalOffset, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(verticalOffset);
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FrameOffsetInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FrameOffsetInformation::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(middleFrameOffsetAddrExists);
    PARAMETER_INITIALIZE(middleFrameOffsetAddr);
    PARAMETER_INITIALIZE(shortFrameOffsetAddrExists);
    PARAMETER_INITIALIZE(shortFrameOffsetAddr);


    // Reading Optional parameter middleFrameOffsetAddr from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, middleFrameOffsetAddrExists, alignment)
        middleFrameOffsetAddrID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && middleFrameOffsetAddrExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, middleFrameOffsetAddr, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(middleFrameOffsetAddr);
        }
    }

    // Reading Optional parameter shortFrameOffsetAddr from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, shortFrameOffsetAddrExists, alignment)
        shortFrameOffsetAddrID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && shortFrameOffsetAddrExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, shortFrameOffsetAddr, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(shortFrameOffsetAddr);
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load IntegrationInfo
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool IntegrationInfo::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(integrationTimeMin);
    PARAMETER_INITIALIZE(integrationTimeStep);
    PARAMETER_INITIALIZE(integrationTimeMargin);

    SYMBOL_TABLE_ENTRY_READ(entry, result, integrationTimeMin, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, integrationTimeStep, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, integrationTimeMargin, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load StreamConfiguration
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool StreamConfiguration::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(vc);
    PARAMETER_INITIALIZE(dt);
    PARAMETER_INITIALIZE(frameDimension);
    PARAMETER_INITIALIZE(bitWidth);
    PARAMETER_INITIALIZE(type);

    SYMBOL_TABLE_ENTRY_READ(entry, result, vc, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, dt, alignment)
    if (result)
    {
        result = frameDimension.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, bitWidth, alignment)
    if (result)
    {
        result = ReadEnum_StreamType(entry, type, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load StreamInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool StreamInformation::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(streamConfiguration);


    // Reading Array streamConfiguration from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        streamConfigurationCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, streamConfigurationCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            streamConfigurationID = pointerEntry->ID;
            DupObjInfo* streamConfigurationDupInfo = pointerEntry->GetDupObject(streamConfigurationCount, file, line);
            if (streamConfigurationDupInfo != nullptr && streamConfigurationDupInfo->Object != nullptr)
            {
                streamConfiguration = (StreamConfiguration*)streamConfigurationDupInfo->Object;
                if (streamConfiguration == nullptr)
                {
                    if (streamConfigurationDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "streamConfiguration duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            streamConfigurationDupInfo->File, streamConfigurationDupInfo->Line, streamConfigurationDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "streamConfiguration duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            streamConfigurationDupInfo->Line, streamConfigurationDupInfo->RefCount);
                    }
                }
            }

            if (streamConfiguration == nullptr)
            {
                if (result && streamConfigurationCount > 0)
                {
                    streamConfiguration = PARAMETER_NEW StreamConfiguration[streamConfigurationCount];
                    (void)pointerEntry->SetDupObject(streamConfiguration, streamConfigurationCount, file, line);
                }
                if (!result || streamConfiguration == nullptr)
                {
                    if (streamConfigurationCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate streamConfiguration\n");
                    }
                    streamConfigurationCount = 0;
                }
                for (UINT32 i = 0; result && i < streamConfigurationCount; i++)
                {
                    result = streamConfiguration[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (streamConfiguration == nullptr)
        {
            streamConfigurationCount = 0;
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load SHDRInfoType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool SHDRInfoType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(SHDRType);
    PARAMETER_INITIALIZE(RHS1);
    PARAMETER_INITIALIZE(RHS2);
    PARAMETER_INITIALIZE(MIN_SHR0);
    PARAMETER_INITIALIZE(MIN_SHR1);
    PARAMETER_INITIALIZE(MIN_SHR2);
    PARAMETER_INITIALIZE(VMAX);
    PARAMETER_INITIALIZE(BRL);
    PARAMETER_INITIALIZE(LEF_OFFSET);
    PARAMETER_INITIALIZE(SEF_OFFSET);
    PARAMETER_INITIALIZE(MEF_OFFSET);
    PARAMETER_INITIALIZE(SHDR_WIDTH);
    PARAMETER_INITIALIZE(SHDR_HEIGHT);
    PARAMETER_INITIALIZE(isDynamicOffsetExists);
    PARAMETER_INITIALIZE(isDynamicOffset);
    PARAMETER_INITIALIZE(NUMBER_CONTROL_POINTS);
    PARAMETER_INITIALIZE(COMPAND_BITWIDTH);
    PARAMETER_INITIALIZE(DECOMPAND_BITWIDTH);

    result = ReadEnum_SHDRTypeEnum(entry, SHDRType, alignment);
    SYMBOL_TABLE_ENTRY_READ(entry, result, RHS1, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, RHS2, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, MIN_SHR0, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, MIN_SHR1, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, MIN_SHR2, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, VMAX, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, BRL, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, LEF_OFFSET, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, SEF_OFFSET, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, MEF_OFFSET, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, SHDR_WIDTH, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, SHDR_HEIGHT, alignment)

    // Reading Optional parameter isDynamicOffset from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, isDynamicOffsetExists, alignment)
        isDynamicOffsetID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && isDynamicOffsetExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, isDynamicOffset, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(isDynamicOffset);
        }
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, NUMBER_CONTROL_POINTS, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, COMPAND_BITWIDTH, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, DECOMPAND_BITWIDTH, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load BorderInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool BorderInformation::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(left);
    PARAMETER_INITIALIZE(right);
    PARAMETER_INITIALIZE(top);
    PARAMETER_INITIALIZE(bottom);

    SYMBOL_TABLE_ENTRY_READ(entry, result, left, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, right, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, top, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, bottom, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load HDR3ExposureInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool HDR3ExposureInformation::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(HDR3ExposureTypeExists);
    PARAMETER_INITIALIZE(HDR3ExposureType);
    PARAMETER_INITIALIZE(sensorLTCRatioAddrExists);
    PARAMETER_INITIALIZE(sensorLTCRatioAddr);
    PARAMETER_INITIALIZE(numberOfLTCRatioRegCountExists);
    PARAMETER_INITIALIZE(numberOfLTCRatioRegCount);
    PARAMETER_INITIALIZE(InSensorHDR3ExpLineLengthPixelClockExists);
    PARAMETER_INITIALIZE(InSensorHDR3ExpLineLengthPixelClock);
    PARAMETER_INITIALIZE(InSensorHDR3ExpFrameLengthLinesExists);
    PARAMETER_INITIALIZE(InSensorHDR3ExpFrameLengthLines);
    PARAMETER_INITIALIZE(InSensorHDR3ExpMaxAnalogGainExists);
    PARAMETER_INITIALIZE(InSensorHDR3ExpMaxAnalogGain);
    PARAMETER_INITIALIZE(InSensorHDR3ExpStartSettingsExists);
    PARAMETER_INITIALIZE(InSensorHDR3ExpStartSettings);
    PARAMETER_INITIALIZE(InSensorHDR3ExpStopSettingsExists);
    PARAMETER_INITIALIZE(InSensorHDR3ExpStopSettings);


    // Reading Optional parameter HDR3ExposureType from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, HDR3ExposureTypeExists, alignment)
        HDR3ExposureTypeID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && HDR3ExposureTypeExists)
        {
            result = ReadEnum_HDR3ExposureTypeInfo(pointerEntry, HDR3ExposureType, alignment);
        }
        else
        {
            PARAMETER_INITIALIZE(HDR3ExposureType);
        }
    }

    // Reading Optional parameter sensorLTCRatioAddr from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, sensorLTCRatioAddrExists, alignment)
        sensorLTCRatioAddrID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && sensorLTCRatioAddrExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, sensorLTCRatioAddr, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(sensorLTCRatioAddr);
        }
    }

    // Reading Optional parameter numberOfLTCRatioRegCount from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, numberOfLTCRatioRegCountExists, alignment)
        numberOfLTCRatioRegCountID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && numberOfLTCRatioRegCountExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, numberOfLTCRatioRegCount, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(numberOfLTCRatioRegCount);
        }
    }

    // Reading Optional parameter InSensorHDR3ExpLineLengthPixelClock from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, InSensorHDR3ExpLineLengthPixelClockExists, alignment)
        InSensorHDR3ExpLineLengthPixelClockID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && InSensorHDR3ExpLineLengthPixelClockExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, InSensorHDR3ExpLineLengthPixelClock, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(InSensorHDR3ExpLineLengthPixelClock);
        }
    }

    // Reading Optional parameter InSensorHDR3ExpFrameLengthLines from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, InSensorHDR3ExpFrameLengthLinesExists, alignment)
        InSensorHDR3ExpFrameLengthLinesID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && InSensorHDR3ExpFrameLengthLinesExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, InSensorHDR3ExpFrameLengthLines, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(InSensorHDR3ExpFrameLengthLines);
        }
    }

    // Reading Optional parameter InSensorHDR3ExpMaxAnalogGain from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, InSensorHDR3ExpMaxAnalogGainExists, alignment)
        InSensorHDR3ExpMaxAnalogGainID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && InSensorHDR3ExpMaxAnalogGainExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, InSensorHDR3ExpMaxAnalogGain, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(InSensorHDR3ExpMaxAnalogGain);
        }
    }

    // Reading Optional parameter InSensorHDR3ExpStartSettings from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, InSensorHDR3ExpStartSettingsExists, alignment)
        InSensorHDR3ExpStartSettingsID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && InSensorHDR3ExpStartSettingsExists)
        {
            if (result)
            {
                result = InSensorHDR3ExpStartSettings.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(InSensorHDR3ExpStartSettings);
        }
    }

    // Reading Optional parameter InSensorHDR3ExpStopSettings from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, InSensorHDR3ExpStopSettingsExists, alignment)
        InSensorHDR3ExpStopSettingsID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && InSensorHDR3ExpStopSettingsExists)
        {
            if (result)
            {
                result = InSensorHDR3ExpStopSettings.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(InSensorHDR3ExpStopSettings);
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load ZZHDRInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ZZHDRInformation::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(ZZHDRPatternExists);
    PARAMETER_INITIALIZE(ZZHDRPattern);
    PARAMETER_INITIALIZE(ZZHDRFirstExposureExists);
    PARAMETER_INITIALIZE(ZZHDRFirstExposure);


    // Reading Optional parameter ZZHDRPattern from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, ZZHDRPatternExists, alignment)
        ZZHDRPatternID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && ZZHDRPatternExists)
        {
            result = ReadEnum_ZZHDRColorPattern(pointerEntry, ZZHDRPattern, alignment);
        }
        else
        {
            PARAMETER_INITIALIZE(ZZHDRPattern);
        }
    }

    // Reading Optional parameter ZZHDRFirstExposure from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, ZZHDRFirstExposureExists, alignment)
        ZZHDRFirstExposureID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && ZZHDRFirstExposureExists)
        {
            if (result)
            {
                result = ReadEnum_ZZHDRFirstExposurePattern(pointerEntry, ZZHDRFirstExposure, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(ZZHDRFirstExposure);
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load ResolutionData
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ResolutionData::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(colorFilterArrangement);
    PARAMETER_INITIALIZE(streamInfo);
    PARAMETER_INITIALIZE(lineLengthPixelClock);
    PARAMETER_INITIALIZE(frameLengthLines);
    PARAMETER_INITIALIZE(minHorizontalBlanking);
    PARAMETER_INITIALIZE(minVerticalBlanking);
    PARAMETER_INITIALIZE(outputPixelClock);
    PARAMETER_INITIALIZE(horizontalBinning);
    PARAMETER_INITIALIZE(verticalBinning);
    PARAMETER_INITIALIZE(frameRate);
    PARAMETER_INITIALIZE(sensorFpsExists);
    PARAMETER_INITIALIZE(sensorFps);
    PARAMETER_INITIALIZE(activeLinesTransmissionTimeUSExists);
    PARAMETER_INITIALIZE(activeLinesTransmissionTimeUS);
    PARAMETER_INITIALIZE(laneCount);
    PARAMETER_INITIALIZE(downScaleFactorExists);
    PARAMETER_INITIALIZE(downScaleFactor);
    PARAMETER_INITIALIZE(settleTimeNs);
    PARAMETER_INITIALIZE(is3Phase);
    PARAMETER_INITIALIZE(integrationInfoExists);
    PARAMETER_INITIALIZE(integrationInfo);
    PARAMETER_INITIALIZE(resSettings);
    PARAMETER_INITIALIZE(cropInfo);
    PARAMETER_INITIALIZE(exposureInfo);
    PARAMETER_INITIALIZE(frameOffsetInfoExists);
    PARAMETER_INITIALIZE(frameOffsetInfo);
    PARAMETER_INITIALIZE(HDRExposureTypeExists);
    PARAMETER_INITIALIZE(HDRExposureType);
    PARAMETER_INITIALIZE(ZZHDRInfoExists);
    PARAMETER_INITIALIZE(ZZHDRInfo);
    PARAMETER_INITIALIZE(HDR3ExposureInfoExists);
    PARAMETER_INITIALIZE(HDR3ExposureInfo);
    PARAMETER_INITIALIZE(RemosaicTypeInfoExists);
    PARAMETER_INITIALIZE(RemosaicTypeInfo);
    PARAMETER_INITIALIZE(capability);
    PARAMETER_INITIALIZE(ADCReadoutTimeExists);
    PARAMETER_INITIALIZE(ADCReadoutTime);
    PARAMETER_INITIALIZE(SHDRInfoExists);
    PARAMETER_INITIALIZE(SHDRInfo);
    PARAMETER_INITIALIZE(mipiFlags);
    PARAMETER_INITIALIZE(maxAnalogGainExists);
    PARAMETER_INITIALIZE(maxAnalogGain);
    PARAMETER_INITIALIZE(PDModeKeyExists);
    PARAMETER_INITIALIZE(PDModeKey);

    result = ReadEnum_ColorFilterArrangement(entry, colorFilterArrangement, alignment);
    if (result)
    {
        result = streamInfo.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, lineLengthPixelClock, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, frameLengthLines, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, minHorizontalBlanking, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, minVerticalBlanking, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, outputPixelClock, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, horizontalBinning, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, verticalBinning, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, frameRate, alignment)

    // Reading Optional parameter sensorFps from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, sensorFpsExists, alignment)
        sensorFpsID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && sensorFpsExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, sensorFps, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(sensorFps);
        }
    }

    // Reading Optional parameter activeLinesTransmissionTimeUS from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, activeLinesTransmissionTimeUSExists, alignment)
        activeLinesTransmissionTimeUSID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && activeLinesTransmissionTimeUSExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, activeLinesTransmissionTimeUS, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(activeLinesTransmissionTimeUS);
        }
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, laneCount, alignment)

    // Reading Optional parameter downScaleFactor from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, downScaleFactorExists, alignment)
        downScaleFactorID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && downScaleFactorExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, downScaleFactor, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(downScaleFactor);
        }
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, settleTimeNs, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, is3Phase, alignment)

    // Reading Optional parameter integrationInfo from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, integrationInfoExists, alignment)
        integrationInfoID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && integrationInfoExists)
        {
            if (result)
            {
                result = integrationInfo.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(integrationInfo);
        }
    }
    if (result)
    {
        result = resSettings.Load(entry, alignment);
    }
    if (result)
    {
        result = cropInfo.Load(entry, alignment);
    }

    // Reading Array exposureInfo from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        exposureInfoCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, exposureInfoCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            exposureInfoID = pointerEntry->ID;
            DupObjInfo* exposureInfoDupInfo = pointerEntry->GetDupObject(exposureInfoCount, file, line);
            if (exposureInfoDupInfo != nullptr && exposureInfoDupInfo->Object != nullptr)
            {
                exposureInfo = (ResolutionExposureInformation*)exposureInfoDupInfo->Object;
                if (exposureInfo == nullptr)
                {
                    if (exposureInfoDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "exposureInfo duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            exposureInfoDupInfo->File, exposureInfoDupInfo->Line, exposureInfoDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "exposureInfo duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            exposureInfoDupInfo->Line, exposureInfoDupInfo->RefCount);
                    }
                }
            }

            if (exposureInfo == nullptr)
            {
                if (result && exposureInfoCount > 0)
                {
                    exposureInfo = PARAMETER_NEW ResolutionExposureInformation[exposureInfoCount];
                    (void)pointerEntry->SetDupObject(exposureInfo, exposureInfoCount, file, line);
                }
                if (!result || exposureInfo == nullptr)
                {
                    if (exposureInfoCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate exposureInfo\n");
                    }
                    exposureInfoCount = 0;
                }
                for (UINT32 i = 0; result && i < exposureInfoCount; i++)
                {
                    result = exposureInfo[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (exposureInfo == nullptr)
        {
            exposureInfoCount = 0;
        }
    }

    // Reading Optional parameter frameOffsetInfo from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, frameOffsetInfoExists, alignment)
        frameOffsetInfoID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && frameOffsetInfoExists)
        {
            if (result)
            {
                result = frameOffsetInfo.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(frameOffsetInfo);
        }
    }

    // Reading Optional parameter HDRExposureType from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, HDRExposureTypeExists, alignment)
        HDRExposureTypeID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && HDRExposureTypeExists)
        {
            if (result)
            {
                result = ReadEnum_HDRExposureTypeInfo(pointerEntry, HDRExposureType, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(HDRExposureType);
        }
    }

    // Reading Optional parameter ZZHDRInfo from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, ZZHDRInfoExists, alignment)
        ZZHDRInfoID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && ZZHDRInfoExists)
        {
            if (result)
            {
                result = ZZHDRInfo.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(ZZHDRInfo);
        }
    }

    // Reading Optional parameter HDR3ExposureInfo from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, HDR3ExposureInfoExists, alignment)
        HDR3ExposureInfoID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && HDR3ExposureInfoExists)
        {
            if (result)
            {
                result = HDR3ExposureInfo.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(HDR3ExposureInfo);
        }
    }

    // Reading Optional parameter RemosaicTypeInfo from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, RemosaicTypeInfoExists, alignment)
        RemosaicTypeInfoID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && RemosaicTypeInfoExists)
        {
            if (result)
            {
                result = ReadEnum_RemosaicType(pointerEntry, RemosaicTypeInfo, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(RemosaicTypeInfo);
        }
    }

    // Reading Array capability from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        capabilityCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, capabilityCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            capabilityID = pointerEntry->ID;
            DupObjInfo* capabilityDupInfo = pointerEntry->GetDupObject(capabilityCount, file, line);
            if (capabilityDupInfo != nullptr && capabilityDupInfo->Object != nullptr)
            {
                capability = (SensorCapability*)capabilityDupInfo->Object;
                if (capability == nullptr)
                {
                    if (capabilityDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "capability duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            capabilityDupInfo->File, capabilityDupInfo->Line, capabilityDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "capability duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            capabilityDupInfo->Line, capabilityDupInfo->RefCount);
                    }
                }
            }

            if (capability == nullptr)
            {
                if (result && capabilityCount > 0)
                {
                    capability = PARAMETER_NEW SensorCapability[capabilityCount];
                    (void)pointerEntry->SetDupObject(capability, capabilityCount, file, line);
                }
                if (!result || capability == nullptr)
                {
                    if (capabilityCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate capability\n");
                    }
                    capabilityCount = 0;
                }
                for (UINT32 i = 0; result && i < capabilityCount; i++)
                {
                    result = ReadEnum_SensorCapability(pointerEntry, capability[i], alignment);
                }
            }
        }
        if (capability == nullptr)
        {
            capabilityCount = 0;
        }
    }

    // Reading Optional parameter ADCReadoutTime from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, ADCReadoutTimeExists, alignment)
        ADCReadoutTimeID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && ADCReadoutTimeExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, ADCReadoutTime, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(ADCReadoutTime);
        }
    }

    // Reading Optional parameter SHDRInfo from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, SHDRInfoExists, alignment)
        SHDRInfoID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && SHDRInfoExists)
        {
            if (result)
            {
                result = SHDRInfo.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(SHDRInfo);
        }
    }

    // Reading Array mipiFlags from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        mipiFlagsCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, mipiFlagsCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            mipiFlagsID = pointerEntry->ID;
            DupObjInfo* mipiFlagsDupInfo = pointerEntry->GetDupObject(mipiFlagsCount, file, line);
            if (mipiFlagsDupInfo != nullptr && mipiFlagsDupInfo->Object != nullptr)
            {
                mipiFlags = (MipiFlagsType*)mipiFlagsDupInfo->Object;
                if (mipiFlags == nullptr)
                {
                    if (mipiFlagsDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "mipiFlags duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            mipiFlagsDupInfo->File, mipiFlagsDupInfo->Line, mipiFlagsDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "mipiFlags duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            mipiFlagsDupInfo->Line, mipiFlagsDupInfo->RefCount);
                    }
                }
            }

            if (mipiFlags == nullptr)
            {
                if (result && mipiFlagsCount > 0)
                {
                    mipiFlags = PARAMETER_NEW MipiFlagsType[mipiFlagsCount];
                    (void)pointerEntry->SetDupObject(mipiFlags, mipiFlagsCount, file, line);
                }
                if (!result || mipiFlags == nullptr)
                {
                    if (mipiFlagsCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate mipiFlags\n");
                    }
                    mipiFlagsCount = 0;
                }
                for (UINT32 i = 0; result && i < mipiFlagsCount; i++)
                {
                    result = ReadEnum_MipiFlagsType(pointerEntry, mipiFlags[i], alignment);
                }
            }
        }
        if (mipiFlags == nullptr)
        {
            mipiFlagsCount = 0;
        }
    }

    // Reading Optional parameter maxAnalogGain from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, maxAnalogGainExists, alignment)
        maxAnalogGainID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && maxAnalogGainExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, maxAnalogGain, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(maxAnalogGain);
        }
    }

    // Reading Optional parameter PDModeKey from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, PDModeKeyExists, alignment)
        PDModeKeyID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && PDModeKeyExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, PDModeKey, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(PDModeKey);
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load ResolutionInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ResolutionInformation::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(sensorVersionExists);
    PARAMETER_INITIALIZE(sensorVersion);
    PARAMETER_INITIALIZE(resolutionData);


    // Reading Optional parameter sensorVersion from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, sensorVersionExists, alignment)
        sensorVersionID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && sensorVersionExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, sensorVersion, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(sensorVersion);
        }
    }

    // Reading Array resolutionData from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        resolutionDataCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, resolutionDataCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            resolutionDataID = pointerEntry->ID;
            DupObjInfo* resolutionDataDupInfo = pointerEntry->GetDupObject(resolutionDataCount, file, line);
            if (resolutionDataDupInfo != nullptr && resolutionDataDupInfo->Object != nullptr)
            {
                resolutionData = (ResolutionData*)resolutionDataDupInfo->Object;
                if (resolutionData == nullptr)
                {
                    if (resolutionDataDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "resolutionData duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            resolutionDataDupInfo->File, resolutionDataDupInfo->Line, resolutionDataDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "resolutionData duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            resolutionDataDupInfo->Line, resolutionDataDupInfo->RefCount);
                    }
                }
            }

            if (resolutionData == nullptr)
            {
                if (result && resolutionDataCount > 0)
                {
                    resolutionData = PARAMETER_NEW ResolutionData[resolutionDataCount];
                    (void)pointerEntry->SetDupObject(resolutionData, resolutionDataCount, file, line);
                }
                if (!result || resolutionData == nullptr)
                {
                    if (resolutionDataCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate resolutionData\n");
                    }
                    resolutionDataCount = 0;
                }
                for (UINT32 i = 0; result && i < resolutionDataCount; i++)
                {
                    result = resolutionData[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (resolutionData == nullptr)
        {
            resolutionDataCount = 0;
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load TemperatureReadSettings
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool TemperatureReadSettings::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(readIntervalInMs);
    PARAMETER_INITIALIZE(readSetting);

    SYMBOL_TABLE_ENTRY_READ(entry, result, readIntervalInMs, alignment)
    if (result)
    {
        result = readSetting.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load InitSettings
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool InitSettings::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(sensorVersion);
    PARAMETER_INITIALIZE(initSetting);

    SYMBOL_TABLE_ENTRY_READ(entry, result, sensorVersion, alignment)
    if (result)
    {
        result = initSetting.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load SoftwareSyncConfiguration
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool SoftwareSyncConfiguration::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(blankingCompensation);

    SYMBOL_TABLE_ENTRY_READ(entry, result, blankingCompensation, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load ExposureControlInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ExposureControlInformation::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(maxAnalogGain);
    PARAMETER_INITIALIZE(maxDigitalGain);
    PARAMETER_INITIALIZE(minAnalogGainExists);
    PARAMETER_INITIALIZE(minAnalogGain);
    PARAMETER_INITIALIZE(verticalOffset);
    PARAMETER_INITIALIZE(multiCamLineDeltaExists);
    PARAMETER_INITIALIZE(multiCamLineDelta);
    PARAMETER_INITIALIZE(maxLineCount);
    PARAMETER_INITIALIZE(minLineCountExists);
    PARAMETER_INITIALIZE(minLineCount);
    PARAMETER_INITIALIZE(middleMaxLineCountExists);
    PARAMETER_INITIALIZE(middleMaxLineCount);
    PARAMETER_INITIALIZE(middleMinLineCountExists);
    PARAMETER_INITIALIZE(middleMinLineCount);
    PARAMETER_INITIALIZE(shortMaxLineCountExists);
    PARAMETER_INITIALIZE(shortMaxLineCount);
    PARAMETER_INITIALIZE(shortMinLineCountExists);
    PARAMETER_INITIALIZE(shortMinLineCount);
    PARAMETER_INITIALIZE(isFastStandbyEnabledExists);
    PARAMETER_INITIALIZE(isFastStandbyEnabled);
    PARAMETER_INITIALIZE(isFLLAutomaticTrackingEnabledExists);
    PARAMETER_INITIALIZE(isFLLAutomaticTrackingEnabled);
    PARAMETER_INITIALIZE(realToRegDigitalGainConversionFactor);
    PARAMETER_INITIALIZE(realToRegGain);
    PARAMETER_INITIALIZE(regToRealGain);

    SYMBOL_TABLE_ENTRY_READ(entry, result, maxAnalogGain, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxDigitalGain, alignment)

    // Reading Optional parameter minAnalogGain from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, minAnalogGainExists, alignment)
        minAnalogGainID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && minAnalogGainExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, minAnalogGain, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(minAnalogGain);
        }
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, verticalOffset, alignment)

    // Reading Optional parameter multiCamLineDelta from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, multiCamLineDeltaExists, alignment)
        multiCamLineDeltaID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && multiCamLineDeltaExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, multiCamLineDelta, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(multiCamLineDelta);
        }
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxLineCount, alignment)

    // Reading Optional parameter minLineCount from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, minLineCountExists, alignment)
        minLineCountID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && minLineCountExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, minLineCount, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(minLineCount);
        }
    }

    // Reading Optional parameter middleMaxLineCount from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, middleMaxLineCountExists, alignment)
        middleMaxLineCountID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && middleMaxLineCountExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, middleMaxLineCount, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(middleMaxLineCount);
        }
    }

    // Reading Optional parameter middleMinLineCount from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, middleMinLineCountExists, alignment)
        middleMinLineCountID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && middleMinLineCountExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, middleMinLineCount, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(middleMinLineCount);
        }
    }

    // Reading Optional parameter shortMaxLineCount from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, shortMaxLineCountExists, alignment)
        shortMaxLineCountID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && shortMaxLineCountExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, shortMaxLineCount, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(shortMaxLineCount);
        }
    }

    // Reading Optional parameter shortMinLineCount from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, shortMinLineCountExists, alignment)
        shortMinLineCountID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && shortMinLineCountExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, shortMinLineCount, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(shortMinLineCount);
        }
    }

    // Reading Optional parameter isFastStandbyEnabled from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, isFastStandbyEnabledExists, alignment)
        isFastStandbyEnabledID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && isFastStandbyEnabledExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, isFastStandbyEnabled, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(isFastStandbyEnabled);
        }
    }

    // Reading Optional parameter isFLLAutomaticTrackingEnabled from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, isFLLAutomaticTrackingEnabledExists, alignment)
        isFLLAutomaticTrackingEnabledID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && isFLLAutomaticTrackingEnabledExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, isFLLAutomaticTrackingEnabled, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(isFLLAutomaticTrackingEnabled);
        }
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, realToRegDigitalGainConversionFactor, alignment)

    // Reading String realToRegGain from symbol table
    {
        UINT32 count = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, count, alignment)
        ParameterFileSymbolTableEntry stringPointerEntryCls;
        ParameterFileSymbolTableEntry* const stringPointerEntry = &stringPointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(stringPointerEntryCls, entry, alignment);
        }
        SYMBOL_TABLE_ENTRY_READ_STRING(stringPointerEntry, result, realToRegGain, count, alignment)
    }

    // Reading String regToRealGain from symbol table
    {
        UINT32 count = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, count, alignment)
        ParameterFileSymbolTableEntry stringPointerEntryCls;
        ParameterFileSymbolTableEntry* const stringPointerEntry = &stringPointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(stringPointerEntryCls, entry, alignment);
        }
        SYMBOL_TABLE_ENTRY_READ_STRING(stringPointerEntry, result, regToRealGain, count, alignment)
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load TestPatternData
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool TestPatternData::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(mode);
    PARAMETER_INITIALIZE(settings);

    result = ReadEnum_TestPatternMode(entry, mode, alignment);
    if (result)
    {
        result = settings.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load TestPatternInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool TestPatternInformation::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(testPatternData);


    // Reading Array testPatternData from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        testPatternDataCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, testPatternDataCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            testPatternDataID = pointerEntry->ID;
            DupObjInfo* testPatternDataDupInfo = pointerEntry->GetDupObject(testPatternDataCount, file, line);
            if (testPatternDataDupInfo != nullptr && testPatternDataDupInfo->Object != nullptr)
            {
                testPatternData = (TestPatternData*)testPatternDataDupInfo->Object;
                if (testPatternData == nullptr)
                {
                    if (testPatternDataDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "testPatternData duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            testPatternDataDupInfo->File, testPatternDataDupInfo->Line, testPatternDataDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "testPatternData duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            testPatternDataDupInfo->Line, testPatternDataDupInfo->RefCount);
                    }
                }
            }

            if (testPatternData == nullptr)
            {
                if (result && testPatternDataCount > 0)
                {
                    testPatternData = PARAMETER_NEW TestPatternData[testPatternDataCount];
                    (void)pointerEntry->SetDupObject(testPatternData, testPatternDataCount, file, line);
                }
                if (!result || testPatternData == nullptr)
                {
                    if (testPatternDataCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate testPatternData\n");
                    }
                    testPatternDataCount = 0;
                }
                for (UINT32 i = 0; result && i < testPatternDataCount; i++)
                {
                    result = testPatternData[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (testPatternData == nullptr)
        {
            testPatternDataCount = 0;
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load GmslAliasInfo
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool GmslAliasInfo::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(sensorVersion);
    PARAMETER_INITIALIZE(aliasAddr);

    SYMBOL_TABLE_ENTRY_READ(entry, result, sensorVersion, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, aliasAddr, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load GmslSettings
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool GmslSettings::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(sensorVersion);
    PARAMETER_INITIALIZE(gmslSetting);

    SYMBOL_TABLE_ENTRY_READ(entry, result, sensorVersion, alignment)
    if (result)
    {
        result = gmslSetting.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load GmslInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool GmslInformation::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(isGmslModule);
    PARAMETER_INITIALIZE(muxedVersionFirst);
    PARAMETER_INITIALIZE(muxedVersionSecond);
    PARAMETER_INITIALIZE(desSlaveAddr);
    PARAMETER_INITIALIZE(desRevAddr);
    PARAMETER_INITIALIZE(desChipIdAddr);
    PARAMETER_INITIALIZE(serSlaveAddr);
    PARAMETER_INITIALIZE(serBroadcastAddr);
    PARAMETER_INITIALIZE(serChipIdAddr);
    PARAMETER_INITIALIZE(sensorSlaveAddr);
    PARAMETER_INITIALIZE(sensorChipIdAddr);
    PARAMETER_INITIALIZE(desAliasInfo);
    PARAMETER_INITIALIZE(serAliasInfo);
    PARAMETER_INITIALIZE(sensorAliasInfo);
    PARAMETER_INITIALIZE(enablePortAClockSettingsExists);
    PARAMETER_INITIALIZE(enablePortAClockSettings);
    PARAMETER_INITIALIZE(enablePortBClockSettingsExists);
    PARAMETER_INITIALIZE(enablePortBClockSettings);
    PARAMETER_INITIALIZE(enablePortABClockSettingsExists);
    PARAMETER_INITIALIZE(enablePortABClockSettings);
    PARAMETER_INITIALIZE(disablePortABClockSettingsExists);
    PARAMETER_INITIALIZE(disablePortABClockSettings);
    PARAMETER_INITIALIZE(sensorAStartSettingsExists);
    PARAMETER_INITIALIZE(sensorAStartSettings);
    PARAMETER_INITIALIZE(sensorBStartSettingsExists);
    PARAMETER_INITIALIZE(sensorBStartSettings);
    PARAMETER_INITIALIZE(sensorAStopSettingsExists);
    PARAMETER_INITIALIZE(sensorAStopSettings);
    PARAMETER_INITIALIZE(sensorBStopSettingsExists);
    PARAMETER_INITIALIZE(sensorBStopSettings);
    PARAMETER_INITIALIZE(streamOnSettings);
    PARAMETER_INITIALIZE(streamOffSettings);

    SYMBOL_TABLE_ENTRY_READ(entry, result, isGmslModule, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, muxedVersionFirst, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, muxedVersionSecond, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, desSlaveAddr, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, desRevAddr, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, desChipIdAddr, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, serSlaveAddr, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, serBroadcastAddr, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, serChipIdAddr, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, sensorSlaveAddr, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, sensorChipIdAddr, alignment)

    // Reading Array desAliasInfo from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        desAliasInfoCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, desAliasInfoCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            desAliasInfoID = pointerEntry->ID;
            DupObjInfo* desAliasInfoDupInfo = pointerEntry->GetDupObject(desAliasInfoCount, file, line);
            if (desAliasInfoDupInfo != nullptr && desAliasInfoDupInfo->Object != nullptr)
            {
                desAliasInfo = (GmslAliasInfo*)desAliasInfoDupInfo->Object;
                if (desAliasInfo == nullptr)
                {
                    if (desAliasInfoDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "desAliasInfo duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            desAliasInfoDupInfo->File, desAliasInfoDupInfo->Line, desAliasInfoDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "desAliasInfo duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            desAliasInfoDupInfo->Line, desAliasInfoDupInfo->RefCount);
                    }
                }
            }

            if (desAliasInfo == nullptr)
            {
                if (result && desAliasInfoCount > 0)
                {
                    desAliasInfo = PARAMETER_NEW GmslAliasInfo[desAliasInfoCount];
                    (void)pointerEntry->SetDupObject(desAliasInfo, desAliasInfoCount, file, line);
                }
                if (!result || desAliasInfo == nullptr)
                {
                    if (desAliasInfoCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate desAliasInfo\n");
                    }
                    desAliasInfoCount = 0;
                }
                for (UINT32 i = 0; result && i < desAliasInfoCount; i++)
                {
                    result = desAliasInfo[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (desAliasInfo == nullptr)
        {
            desAliasInfoCount = 0;
        }
    }

    // Reading Array serAliasInfo from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        serAliasInfoCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, serAliasInfoCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            serAliasInfoID = pointerEntry->ID;
            DupObjInfo* serAliasInfoDupInfo = pointerEntry->GetDupObject(serAliasInfoCount, file, line);
            if (serAliasInfoDupInfo != nullptr && serAliasInfoDupInfo->Object != nullptr)
            {
                serAliasInfo = (GmslAliasInfo*)serAliasInfoDupInfo->Object;
                if (serAliasInfo == nullptr)
                {
                    if (serAliasInfoDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "serAliasInfo duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            serAliasInfoDupInfo->File, serAliasInfoDupInfo->Line, serAliasInfoDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "serAliasInfo duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            serAliasInfoDupInfo->Line, serAliasInfoDupInfo->RefCount);
                    }
                }
            }

            if (serAliasInfo == nullptr)
            {
                if (result && serAliasInfoCount > 0)
                {
                    serAliasInfo = PARAMETER_NEW GmslAliasInfo[serAliasInfoCount];
                    (void)pointerEntry->SetDupObject(serAliasInfo, serAliasInfoCount, file, line);
                }
                if (!result || serAliasInfo == nullptr)
                {
                    if (serAliasInfoCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate serAliasInfo\n");
                    }
                    serAliasInfoCount = 0;
                }
                for (UINT32 i = 0; result && i < serAliasInfoCount; i++)
                {
                    result = serAliasInfo[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (serAliasInfo == nullptr)
        {
            serAliasInfoCount = 0;
        }
    }

    // Reading Array sensorAliasInfo from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        sensorAliasInfoCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, sensorAliasInfoCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            sensorAliasInfoID = pointerEntry->ID;
            DupObjInfo* sensorAliasInfoDupInfo = pointerEntry->GetDupObject(sensorAliasInfoCount, file, line);
            if (sensorAliasInfoDupInfo != nullptr && sensorAliasInfoDupInfo->Object != nullptr)
            {
                sensorAliasInfo = (GmslAliasInfo*)sensorAliasInfoDupInfo->Object;
                if (sensorAliasInfo == nullptr)
                {
                    if (sensorAliasInfoDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "sensorAliasInfo duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            sensorAliasInfoDupInfo->File, sensorAliasInfoDupInfo->Line, sensorAliasInfoDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "sensorAliasInfo duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            sensorAliasInfoDupInfo->Line, sensorAliasInfoDupInfo->RefCount);
                    }
                }
            }

            if (sensorAliasInfo == nullptr)
            {
                if (result && sensorAliasInfoCount > 0)
                {
                    sensorAliasInfo = PARAMETER_NEW GmslAliasInfo[sensorAliasInfoCount];
                    (void)pointerEntry->SetDupObject(sensorAliasInfo, sensorAliasInfoCount, file, line);
                }
                if (!result || sensorAliasInfo == nullptr)
                {
                    if (sensorAliasInfoCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate sensorAliasInfo\n");
                    }
                    sensorAliasInfoCount = 0;
                }
                for (UINT32 i = 0; result && i < sensorAliasInfoCount; i++)
                {
                    result = sensorAliasInfo[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (sensorAliasInfo == nullptr)
        {
            sensorAliasInfoCount = 0;
        }
    }

    // Reading Optional parameter enablePortAClockSettings from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, enablePortAClockSettingsExists, alignment)
        enablePortAClockSettingsID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && enablePortAClockSettingsExists)
        {
            if (result)
            {
                result = enablePortAClockSettings.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(enablePortAClockSettings);
        }
    }

    // Reading Optional parameter enablePortBClockSettings from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, enablePortBClockSettingsExists, alignment)
        enablePortBClockSettingsID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && enablePortBClockSettingsExists)
        {
            if (result)
            {
                result = enablePortBClockSettings.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(enablePortBClockSettings);
        }
    }

    // Reading Optional parameter enablePortABClockSettings from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, enablePortABClockSettingsExists, alignment)
        enablePortABClockSettingsID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && enablePortABClockSettingsExists)
        {
            if (result)
            {
                result = enablePortABClockSettings.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(enablePortABClockSettings);
        }
    }

    // Reading Optional parameter disablePortABClockSettings from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, disablePortABClockSettingsExists, alignment)
        disablePortABClockSettingsID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && disablePortABClockSettingsExists)
        {
            if (result)
            {
                result = disablePortABClockSettings.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(disablePortABClockSettings);
        }
    }

    // Reading Optional parameter sensorAStartSettings from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, sensorAStartSettingsExists, alignment)
        sensorAStartSettingsID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && sensorAStartSettingsExists)
        {
            if (result)
            {
                result = sensorAStartSettings.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(sensorAStartSettings);
        }
    }

    // Reading Optional parameter sensorBStartSettings from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, sensorBStartSettingsExists, alignment)
        sensorBStartSettingsID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && sensorBStartSettingsExists)
        {
            if (result)
            {
                result = sensorBStartSettings.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(sensorBStartSettings);
        }
    }

    // Reading Optional parameter sensorAStopSettings from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, sensorAStopSettingsExists, alignment)
        sensorAStopSettingsID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && sensorAStopSettingsExists)
        {
            if (result)
            {
                result = sensorAStopSettings.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(sensorAStopSettings);
        }
    }

    // Reading Optional parameter sensorBStopSettings from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, sensorBStopSettingsExists, alignment)
        sensorBStopSettingsID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && sensorBStopSettingsExists)
        {
            if (result)
            {
                result = sensorBStopSettings.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(sensorBStopSettings);
        }
    }

    // Reading Array streamOnSettings from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        streamOnSettingsCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, streamOnSettingsCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            streamOnSettingsID = pointerEntry->ID;
            DupObjInfo* streamOnSettingsDupInfo = pointerEntry->GetDupObject(streamOnSettingsCount, file, line);
            if (streamOnSettingsDupInfo != nullptr && streamOnSettingsDupInfo->Object != nullptr)
            {
                streamOnSettings = (GmslSettings*)streamOnSettingsDupInfo->Object;
                if (streamOnSettings == nullptr)
                {
                    if (streamOnSettingsDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "streamOnSettings duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            streamOnSettingsDupInfo->File, streamOnSettingsDupInfo->Line, streamOnSettingsDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "streamOnSettings duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            streamOnSettingsDupInfo->Line, streamOnSettingsDupInfo->RefCount);
                    }
                }
            }

            if (streamOnSettings == nullptr)
            {
                if (result && streamOnSettingsCount > 0)
                {
                    streamOnSettings = PARAMETER_NEW GmslSettings[streamOnSettingsCount];
                    (void)pointerEntry->SetDupObject(streamOnSettings, streamOnSettingsCount, file, line);
                }
                if (!result || streamOnSettings == nullptr)
                {
                    if (streamOnSettingsCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate streamOnSettings\n");
                    }
                    streamOnSettingsCount = 0;
                }
                for (UINT32 i = 0; result && i < streamOnSettingsCount; i++)
                {
                    result = streamOnSettings[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (streamOnSettings == nullptr)
        {
            streamOnSettingsCount = 0;
        }
    }

    // Reading Array streamOffSettings from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        streamOffSettingsCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, streamOffSettingsCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            streamOffSettingsID = pointerEntry->ID;
            DupObjInfo* streamOffSettingsDupInfo = pointerEntry->GetDupObject(streamOffSettingsCount, file, line);
            if (streamOffSettingsDupInfo != nullptr && streamOffSettingsDupInfo->Object != nullptr)
            {
                streamOffSettings = (GmslSettings*)streamOffSettingsDupInfo->Object;
                if (streamOffSettings == nullptr)
                {
                    if (streamOffSettingsDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "streamOffSettings duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            streamOffSettingsDupInfo->File, streamOffSettingsDupInfo->Line, streamOffSettingsDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "streamOffSettings duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            streamOffSettingsDupInfo->Line, streamOffSettingsDupInfo->RefCount);
                    }
                }
            }

            if (streamOffSettings == nullptr)
            {
                if (result && streamOffSettingsCount > 0)
                {
                    streamOffSettings = PARAMETER_NEW GmslSettings[streamOffSettingsCount];
                    (void)pointerEntry->SetDupObject(streamOffSettings, streamOffSettingsCount, file, line);
                }
                if (!result || streamOffSettings == nullptr)
                {
                    if (streamOffSettingsCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate streamOffSettings\n");
                    }
                    streamOffSettingsCount = 0;
                }
                for (UINT32 i = 0; result && i < streamOffSettingsCount; i++)
                {
                    result = streamOffSettings[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (streamOffSettings == nullptr)
        {
            streamOffSettingsCount = 0;
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load ColorLevelInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ColorLevelInformation::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(whiteLevel);
    PARAMETER_INITIALIZE(rPedestal);
    PARAMETER_INITIALIZE(grPedestal);
    PARAMETER_INITIALIZE(bPedestal);
    PARAMETER_INITIALIZE(gbPedestal);

    SYMBOL_TABLE_ENTRY_READ(entry, result, whiteLevel, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, rPedestal, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, grPedestal, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, bPedestal, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, gbPedestal, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load OpticalBlackRegionInfo
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool OpticalBlackRegionInfo::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(dimension);


    // Reading Array dimension from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        dimensionCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, dimensionCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            dimensionID = pointerEntry->ID;
            DupObjInfo* dimensionDupInfo = pointerEntry->GetDupObject(dimensionCount, file, line);
            if (dimensionDupInfo != nullptr && dimensionDupInfo->Object != nullptr)
            {
                dimension = (FrameDimension*)dimensionDupInfo->Object;
                if (dimension == nullptr)
                {
                    if (dimensionDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "dimension duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            dimensionDupInfo->File, dimensionDupInfo->Line, dimensionDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "dimension duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            dimensionDupInfo->Line, dimensionDupInfo->RefCount);
                    }
                }
            }

            if (dimension == nullptr)
            {
                if (result && dimensionCount > 0)
                {
                    dimension = PARAMETER_NEW FrameDimension[dimensionCount];
                    (void)pointerEntry->SetDupObject(dimension, dimensionCount, file, line);
                }
                if (!result || dimension == nullptr)
                {
                    if (dimensionCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate dimension\n");
                    }
                    dimensionCount = 0;
                }
                for (UINT32 i = 0; result && i < dimensionCount; i++)
                {
                    result = dimension[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (dimension == nullptr)
        {
            dimensionCount = 0;
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load PixelArrayInfo
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool PixelArrayInfo::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(activeDimension);
    PARAMETER_INITIALIZE(dummyInfo);

    result = activeDimension.Load(entry, alignment);
    if (result)
    {
        result = dummyInfo.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load DelayInfo
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool DelayInfo::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(delayTypeExists);
    PARAMETER_INITIALIZE(delayType);
    PARAMETER_INITIALIZE(linecountExists);
    PARAMETER_INITIALIZE(linecount);
    PARAMETER_INITIALIZE(gainExists);
    PARAMETER_INITIALIZE(gain);
    PARAMETER_INITIALIZE(frameLengthLinesExists);
    PARAMETER_INITIALIZE(frameLengthLines);
    PARAMETER_INITIALIZE(maxPipeline);
    PARAMETER_INITIALIZE(frameSkip);
    PARAMETER_INITIALIZE(modeSwitch);


    // Reading Optional parameter delayType from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, delayTypeExists, alignment)
        delayTypeID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && delayTypeExists)
        {
            result = ReadEnum_DelayInfoType(pointerEntry, delayType, alignment);
        }
        else
        {
            PARAMETER_INITIALIZE(delayType);
        }
    }

    // Reading Optional parameter linecount from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, linecountExists, alignment)
        linecountID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && linecountExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, linecount, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(linecount);
        }
    }

    // Reading Optional parameter gain from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, gainExists, alignment)
        gainID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && gainExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, gain, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(gain);
        }
    }

    // Reading Optional parameter frameLengthLines from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, frameLengthLinesExists, alignment)
        frameLengthLinesID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && frameLengthLinesExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, frameLengthLines, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(frameLengthLines);
        }
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxPipeline, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, frameSkip, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, modeSwitch, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load SensorProperty
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool SensorProperty::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(pixelSize);
    PARAMETER_INITIALIZE(cropFactor);
    PARAMETER_INITIALIZE(sensingMethod);
    PARAMETER_INITIALIZE(isIrledSensorExists);
    PARAMETER_INITIALIZE(isIrledSensor);

    SYMBOL_TABLE_ENTRY_READ(entry, result, pixelSize, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, cropFactor, alignment)
    if (result)
    {
        result = ReadEnum_SensingMethod(entry, sensingMethod, alignment);
    }

    // Reading Optional parameter isIrledSensor from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, isIrledSensorExists, alignment)
        isIrledSensorID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && isIrledSensorExists)
        {
            SYMBOL_TABLE_ENTRY_READ(pointerEntry, result, isIrledSensor, alignment)
        }
        else
        {
            PARAMETER_INITIALIZE(isIrledSensor);
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load NoiseCoefficent
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool NoiseCoefficent::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(gradient_S);
    PARAMETER_INITIALIZE(offset_S);
    PARAMETER_INITIALIZE(gradient_O);
    PARAMETER_INITIALIZE(offset_O);

    SYMBOL_TABLE_ENTRY_READ(entry, result, gradient_S, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, offset_S, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, gradient_O, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, offset_O, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load NoiseCoefficientBayer
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool NoiseCoefficientBayer::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(R);
    PARAMETER_INITIALIZE(Gr);
    PARAMETER_INITIALIZE(Gb);
    PARAMETER_INITIALIZE(B);

    result = R.Load(entry, alignment);
    if (result)
    {
        result = Gr.Load(entry, alignment);
    }
    if (result)
    {
        result = Gb.Load(entry, alignment);
    }
    if (result)
    {
        result = B.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load EnumDefinition
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool EnumDefinition::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(noiseCoefficientChannelExists);
    PARAMETER_INITIALIZE(noiseCoefficientChannel);


    // Reading Optional parameter noiseCoefficientChannel from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, noiseCoefficientChannelExists, alignment)
        noiseCoefficientChannelID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && noiseCoefficientChannelExists)
        {
            result = ReadEnum_NoiseCoefficientChannel(pointerEntry, noiseCoefficientChannel, alignment);
        }
        else
        {
            PARAMETER_INITIALIZE(noiseCoefficientChannel);
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load SensorDriverData
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool SensorDriverData::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(slaveInfo);
    PARAMETER_INITIALIZE(regAddrInfo);
    PARAMETER_INITIALIZE(resolutionInfo);
    PARAMETER_INITIALIZE(exposureControlInfo);
    PARAMETER_INITIALIZE(streamOnSettings);
    PARAMETER_INITIALIZE(streamOffSettings);
    PARAMETER_INITIALIZE(groupHoldOnSettings);
    PARAMETER_INITIALIZE(groupHoldOffSettings);
    PARAMETER_INITIALIZE(masterSettingsExists);
    PARAMETER_INITIALIZE(masterSettings);
    PARAMETER_INITIALIZE(slaveSettingsExists);
    PARAMETER_INITIALIZE(slaveSettings);
    PARAMETER_INITIALIZE(softwareSyncConfigurationExists);
    PARAMETER_INITIALIZE(softwareSyncConfiguration);
    PARAMETER_INITIALIZE(temperatureReadInfoExists);
    PARAMETER_INITIALIZE(temperatureReadInfo);
    PARAMETER_INITIALIZE(initSettings);
    PARAMETER_INITIALIZE(testPatternInfo);
    PARAMETER_INITIALIZE(gmslInfoExists);
    PARAMETER_INITIALIZE(gmslInfo);
    PARAMETER_INITIALIZE(colorLevelInfo);
    PARAMETER_INITIALIZE(opticalBlackRegionInfo);
    PARAMETER_INITIALIZE(pixelArrayInfo);
    PARAMETER_INITIALIZE(delayInfo);
    PARAMETER_INITIALIZE(sensorProperty);
    PARAMETER_INITIALIZE(noiseCoefficentExists);
    PARAMETER_INITIALIZE(noiseCoefficent);
    PARAMETER_INITIALIZE(noiseCoefficientBayerExists);
    PARAMETER_INITIALIZE(noiseCoefficientBayer);

    result = module_version.Load(entry, alignment);
    if (result)
    {
        result = slaveInfo.Load(entry, alignment);
    }
    if (result)
    {
        result = regAddrInfo.Load(entry, alignment);
    }

    // Reading Array resolutionInfo from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        resolutionInfoCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, resolutionInfoCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            resolutionInfoID = pointerEntry->ID;
            DupObjInfo* resolutionInfoDupInfo = pointerEntry->GetDupObject(resolutionInfoCount, file, line);
            if (resolutionInfoDupInfo != nullptr && resolutionInfoDupInfo->Object != nullptr)
            {
                resolutionInfo = (ResolutionInformation*)resolutionInfoDupInfo->Object;
                if (resolutionInfo == nullptr)
                {
                    if (resolutionInfoDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "resolutionInfo duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            resolutionInfoDupInfo->File, resolutionInfoDupInfo->Line, resolutionInfoDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "resolutionInfo duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            resolutionInfoDupInfo->Line, resolutionInfoDupInfo->RefCount);
                    }
                }
            }

            if (resolutionInfo == nullptr)
            {
                if (result && resolutionInfoCount > 0)
                {
                    resolutionInfo = PARAMETER_NEW ResolutionInformation[resolutionInfoCount];
                    (void)pointerEntry->SetDupObject(resolutionInfo, resolutionInfoCount, file, line);
                }
                if (!result || resolutionInfo == nullptr)
                {
                    if (resolutionInfoCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate resolutionInfo\n");
                    }
                    resolutionInfoCount = 0;
                }
                for (UINT32 i = 0; result && i < resolutionInfoCount; i++)
                {
                    result = resolutionInfo[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (resolutionInfo == nullptr)
        {
            resolutionInfoCount = 0;
        }
    }
    if (result)
    {
        result = exposureControlInfo.Load(entry, alignment);
    }
    if (result)
    {
        result = streamOnSettings.Load(entry, alignment);
    }
    if (result)
    {
        result = streamOffSettings.Load(entry, alignment);
    }
    if (result)
    {
        result = groupHoldOnSettings.Load(entry, alignment);
    }
    if (result)
    {
        result = groupHoldOffSettings.Load(entry, alignment);
    }

    // Reading Optional parameter masterSettings from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, masterSettingsExists, alignment)
        masterSettingsID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && masterSettingsExists)
        {
            if (result)
            {
                result = masterSettings.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(masterSettings);
        }
    }

    // Reading Optional parameter slaveSettings from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, slaveSettingsExists, alignment)
        slaveSettingsID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && slaveSettingsExists)
        {
            if (result)
            {
                result = slaveSettings.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(slaveSettings);
        }
    }

    // Reading Optional parameter softwareSyncConfiguration from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, softwareSyncConfigurationExists, alignment)
        softwareSyncConfigurationID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && softwareSyncConfigurationExists)
        {
            if (result)
            {
                result = softwareSyncConfiguration.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(softwareSyncConfiguration);
        }
    }

    // Reading Optional parameter temperatureReadInfo from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, temperatureReadInfoExists, alignment)
        temperatureReadInfoID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && temperatureReadInfoExists)
        {
            if (result)
            {
                result = temperatureReadInfo.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(temperatureReadInfo);
        }
    }

    // Reading Array initSettings from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        initSettingsCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, initSettingsCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            initSettingsID = pointerEntry->ID;
            DupObjInfo* initSettingsDupInfo = pointerEntry->GetDupObject(initSettingsCount, file, line);
            if (initSettingsDupInfo != nullptr && initSettingsDupInfo->Object != nullptr)
            {
                initSettings = (InitSettings*)initSettingsDupInfo->Object;
                if (initSettings == nullptr)
                {
                    if (initSettingsDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "initSettings duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            initSettingsDupInfo->File, initSettingsDupInfo->Line, initSettingsDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "initSettings duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            initSettingsDupInfo->Line, initSettingsDupInfo->RefCount);
                    }
                }
            }

            if (initSettings == nullptr)
            {
                if (result && initSettingsCount > 0)
                {
                    initSettings = PARAMETER_NEW InitSettings[initSettingsCount];
                    (void)pointerEntry->SetDupObject(initSettings, initSettingsCount, file, line);
                }
                if (!result || initSettings == nullptr)
                {
                    if (initSettingsCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate initSettings\n");
                    }
                    initSettingsCount = 0;
                }
                for (UINT32 i = 0; result && i < initSettingsCount; i++)
                {
                    result = initSettings[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (initSettings == nullptr)
        {
            initSettingsCount = 0;
        }
    }
    if (result)
    {
        result = testPatternInfo.Load(entry, alignment);
    }

    // Reading Optional parameter gmslInfo from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, gmslInfoExists, alignment)
        gmslInfoID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && gmslInfoExists)
        {
            if (result)
            {
                result = gmslInfo.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(gmslInfo);
        }
    }
    if (result)
    {
        result = colorLevelInfo.Load(entry, alignment);
    }
    if (result)
    {
        result = opticalBlackRegionInfo.Load(entry, alignment);
    }
    if (result)
    {
        result = pixelArrayInfo.Load(entry, alignment);
    }

    // Reading Array delayInfo from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        delayInfoCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, delayInfoCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            delayInfoID = pointerEntry->ID;
            DupObjInfo* delayInfoDupInfo = pointerEntry->GetDupObject(delayInfoCount, file, line);
            if (delayInfoDupInfo != nullptr && delayInfoDupInfo->Object != nullptr)
            {
                delayInfo = (DelayInfo*)delayInfoDupInfo->Object;
                if (delayInfo == nullptr)
                {
                    if (delayInfoDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "delayInfo duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            delayInfoDupInfo->File, delayInfoDupInfo->Line, delayInfoDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "delayInfo duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            delayInfoDupInfo->Line, delayInfoDupInfo->RefCount);
                    }
                }
            }

            if (delayInfo == nullptr)
            {
                if (result && delayInfoCount > 0)
                {
                    delayInfo = PARAMETER_NEW DelayInfo[delayInfoCount];
                    (void)pointerEntry->SetDupObject(delayInfo, delayInfoCount, file, line);
                }
                if (!result || delayInfo == nullptr)
                {
                    if (delayInfoCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate delayInfo\n");
                    }
                    delayInfoCount = 0;
                }
                for (UINT32 i = 0; result && i < delayInfoCount; i++)
                {
                    result = delayInfo[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (delayInfo == nullptr)
        {
            delayInfoCount = 0;
        }
    }
    if (result)
    {
        result = sensorProperty.Load(entry, alignment);
    }

    // Reading Optional parameter noiseCoefficent from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, noiseCoefficentExists, alignment)
        noiseCoefficentID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && noiseCoefficentExists)
        {
            if (result)
            {
                result = noiseCoefficent.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(noiseCoefficent);
        }
    }

    // Reading Optional parameter noiseCoefficientBayer from symbol table
    {
        SYMBOL_TABLE_ENTRY_READ(entry, result, noiseCoefficientBayerExists, alignment)
        noiseCoefficientBayerID = entry->ID;
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }
        if (result && noiseCoefficientBayerExists)
        {
            if (result)
            {
                result = noiseCoefficientBayer.Load(pointerEntry, alignment);
            }
        }
        else
        {
            PARAMETER_INITIALIZE(noiseCoefficientBayer);
        }
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool SensorDriverData::module_versionStruct::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(major_revision);
    PARAMETER_INITIALIZE(minor_revision);
    PARAMETER_INITIALIZE(incr_revision);

    SYMBOL_TABLE_ENTRY_READ(entry, result, major_revision, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, minor_revision, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, incr_revision, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload SlaveInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void SlaveInformation::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(sensorName))
    {
        PARAMETER_DELETE[] sensorName;
    }
    sensorName = nullptr;
    powerUpSequence.Unload(__table);
    powerDownSequence.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload StreamInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void StreamInformation::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(streamConfiguration))
    {
        PARAMETER_DELETE[] streamConfiguration;
    }
    streamConfiguration = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload HDR3ExposureInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void HDR3ExposureInformation::Unload(ParameterFileSymbolTable* const __table)
{
    InSensorHDR3ExpStartSettings.Unload(__table);
    InSensorHDR3ExpStopSettings.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload ResolutionData
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ResolutionData::Unload(ParameterFileSymbolTable* const __table)
{
    streamInfo.Unload(__table);
    resSettings.Unload(__table);
    if (__table != nullptr && __table->ReleaseDupObject(exposureInfo))
    {
        PARAMETER_DELETE[] exposureInfo;
    }
    exposureInfo = nullptr;
    HDR3ExposureInfo.Unload(__table);
    if (__table != nullptr && __table->ReleaseDupObject(capability))
    {
        PARAMETER_DELETE[] capability;
    }
    capability = nullptr;
    if (__table != nullptr && __table->ReleaseDupObject(mipiFlags))
    {
        PARAMETER_DELETE[] mipiFlags;
    }
    mipiFlags = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload ResolutionInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ResolutionInformation::Unload(ParameterFileSymbolTable* const __table)
{
    for (UINT32 i = 0; i < resolutionDataCount; i++)
    {
        resolutionData[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(resolutionData))
    {
        PARAMETER_DELETE[] resolutionData;
    }
    resolutionData = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload TemperatureReadSettings
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void TemperatureReadSettings::Unload(ParameterFileSymbolTable* const __table)
{
    readSetting.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload InitSettings
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void InitSettings::Unload(ParameterFileSymbolTable* const __table)
{
    initSetting.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload ExposureControlInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ExposureControlInformation::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(realToRegGain))
    {
        PARAMETER_DELETE[] realToRegGain;
    }
    realToRegGain = nullptr;
    if (__table != nullptr && __table->ReleaseDupObject(regToRealGain))
    {
        PARAMETER_DELETE[] regToRealGain;
    }
    regToRealGain = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload TestPatternData
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void TestPatternData::Unload(ParameterFileSymbolTable* const __table)
{
    settings.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload TestPatternInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void TestPatternInformation::Unload(ParameterFileSymbolTable* const __table)
{
    for (UINT32 i = 0; i < testPatternDataCount; i++)
    {
        testPatternData[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(testPatternData))
    {
        PARAMETER_DELETE[] testPatternData;
    }
    testPatternData = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload GmslSettings
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void GmslSettings::Unload(ParameterFileSymbolTable* const __table)
{
    gmslSetting.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload GmslInformation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void GmslInformation::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(desAliasInfo))
    {
        PARAMETER_DELETE[] desAliasInfo;
    }
    desAliasInfo = nullptr;
    if (__table != nullptr && __table->ReleaseDupObject(serAliasInfo))
    {
        PARAMETER_DELETE[] serAliasInfo;
    }
    serAliasInfo = nullptr;
    if (__table != nullptr && __table->ReleaseDupObject(sensorAliasInfo))
    {
        PARAMETER_DELETE[] sensorAliasInfo;
    }
    sensorAliasInfo = nullptr;
    enablePortAClockSettings.Unload(__table);
    enablePortBClockSettings.Unload(__table);
    enablePortABClockSettings.Unload(__table);
    disablePortABClockSettings.Unload(__table);
    sensorAStartSettings.Unload(__table);
    sensorBStartSettings.Unload(__table);
    sensorAStopSettings.Unload(__table);
    sensorBStopSettings.Unload(__table);
    for (UINT32 i = 0; i < streamOnSettingsCount; i++)
    {
        streamOnSettings[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(streamOnSettings))
    {
        PARAMETER_DELETE[] streamOnSettings;
    }
    streamOnSettings = nullptr;
    for (UINT32 i = 0; i < streamOffSettingsCount; i++)
    {
        streamOffSettings[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(streamOffSettings))
    {
        PARAMETER_DELETE[] streamOffSettings;
    }
    streamOffSettings = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload OpticalBlackRegionInfo
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void OpticalBlackRegionInfo::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(dimension))
    {
        PARAMETER_DELETE[] dimension;
    }
    dimension = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload SensorDriverData
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void SensorDriverData::Unload(ParameterFileSymbolTable* const __table)
{
    slaveInfo.Unload(__table);
    for (UINT32 i = 0; i < resolutionInfoCount; i++)
    {
        resolutionInfo[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(resolutionInfo))
    {
        PARAMETER_DELETE[] resolutionInfo;
    }
    resolutionInfo = nullptr;
    exposureControlInfo.Unload(__table);
    streamOnSettings.Unload(__table);
    streamOffSettings.Unload(__table);
    groupHoldOnSettings.Unload(__table);
    groupHoldOffSettings.Unload(__table);
    masterSettings.Unload(__table);
    slaveSettings.Unload(__table);
    temperatureReadInfo.Unload(__table);
    for (UINT32 i = 0; i < initSettingsCount; i++)
    {
        initSettings[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(initSettings))
    {
        PARAMETER_DELETE[] initSettings;
    }
    initSettings = nullptr;
    testPatternInfo.Unload(__table);
    gmslInfo.Unload(__table);
    opticalBlackRegionInfo.Unload(__table);
    if (__table != nullptr && __table->ReleaseDupObject(delayInfo))
    {
        PARAMETER_DELETE[] delayInfo;
    }
    delayInfo = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Release the ParameterModule object
/// Requires that this object was created via a ParameterSetManager::GetModule call
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void SensorDriverData::Release()
{
    ((SensorDriverDataClass*)this)->Release();
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Returns the ParameterModule::Modified value
/// The Modified value is incremented when the module's data or pointer values change
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
UINT32 SensorDriverData::GetModified()
{
    return ((SensorDriverDataClass*)this)->Modified;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Create module, and return a new object
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ParameterModule* SensorDriverDataClass::Create(
    ModuleData*    moduleData,
    DefaultModule* const defModule) const
{
    SensorDriverDataClass* cls = nullptr;

    if (PARAMETER_STRCMP(Type, moduleData->Type) == 0 && Version.Value == moduleData->Version.Value)
    {
        const UINT32 id = moduleData->DuplicateID > 0 ? moduleData->DuplicateID : moduleData->ID;

        ParameterModule* const module = defModule->Find(id);
        if (module != nullptr)
        {
            cls = (SensorDriverDataClass*)module;
        }
        else
        {
            cls = PARAMETER_NEW SensorDriverDataClass(GetName(moduleData->Type), moduleData);
            cls->SymbolTableID = id;
            defModule->AddModule((ParameterModule*)cls);
        }
    }
    else if (Version.Value != moduleData->Version.Value)
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create SensorDriverDataClass, binary version (%lld) does not match source version (%lld)\n",
            moduleData->Version.Value, Version.Value);
    }
    else
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create SensorDriverDataClass, binary name (%s) does not match source name (%s)\n",
            moduleData->Type, Type);
    }

    return (ParameterModule*)cls;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module data, return true is successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool SensorDriverDataClass::LoadModule(
    ParameterFileSymbolTable* const table)
{
    bool result = true;

    if (!Loaded)
    {
        BYTE const alignment = table->Alignment;
        SensorDriverDataClass* const cls = this;

        ParameterFileSymbolTableEntry  entryObj;
        ParameterFileSymbolTableEntry* const entry = &entryObj;
        result = table->Find(entryObj, SymbolTableID);

        if (!result)
        {
            PARAMETER_LOG_ERROR(entry->SetManager, "SensorDriverDataClass::LoadModule Failed to find module ID (%d) in Symbol Table\n", SymbolTableID);
        }

        if (result)
        {
            result = cls->Load(entry, alignment);
        }
        Modified++;
        Loaded = true;
    }

    if (!result)
    {
        /// Module failed to fully load, unload it
        UnloadModule();
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload module data
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void SensorDriverDataClass::UnloadModule()
{
    if (Loaded)
    {
        if (Data != nullptr && Data->SymbolTable != nullptr)
        {
            Unload(Data->SymbolTable);
        }
        else
        {
            PARAMETER_LOG_ERROR(Data != nullptr ? Data->SetManager : nullptr, "UnloadModule %s called with nullptr "
                "Data->SymbolTable object\n", Name);
            Unload(nullptr);
        }
        Loaded = false;
    }
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// /// Release the ParameterModule object
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void SensorDriverDataClass::Release()
{
    ParameterModule::Release();
}

CAMX_NAMESPACE_END
