////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 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  aecsync.cpp
/// @brief Auto-generated Chromatix parameter file
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#include "aecsync.h"
#include "parametersetmanager.h"

AECSYNC_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool DynamicMixingZoneDataType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "weight") == 0)
    {
        ParameterUtils::DoubleToString((double)weight, __value, __size);
        __result = true;
    }

    return __result;
}

bool DynamicMixingZoneDataType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "weight") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            weight = (float)dblValue; 
        }
    }

    return __result;
}

bool DynamicMixingZoneDataType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // weight
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("weight", ParameterParserDataType::Float, (double)weight));
    }
    else if (PARAMETER_STRCMP(__name, "weight") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)weight));
    }

    return __result;
}

bool DynamicMixingConfigType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        __result = zoneData.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool DynamicMixingConfigType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        __result = zoneData.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool DynamicMixingConfigType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // zoneTrigger
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("zoneTrigger", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.GetInfo(&__path[__pos], __info);
    }

    // zoneData
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("zoneData", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        __result = zoneData.GetInfo(&__path[__pos], __info);
    }

    return __result;
}

bool StaticMixingConfigType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "lumaMixingWeight") == 0)
    {
        ParameterUtils::DoubleToString((double)lumaMixingWeight, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "targetMixingWeight") == 0)
    {
        ParameterUtils::DoubleToString((double)targetMixingWeight, __value, __size);
        __result = true;
    }

    return __result;
}

bool StaticMixingConfigType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "lumaMixingWeight") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            lumaMixingWeight = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "targetMixingWeight") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            targetMixingWeight = (float)dblValue; 
        }
    }

    return __result;
}

bool StaticMixingConfigType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // lumaMixingWeight
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("lumaMixingWeight", ParameterParserDataType::Float, (double)lumaMixingWeight));
    }
    else if (PARAMETER_STRCMP(__name, "lumaMixingWeight") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)lumaMixingWeight));
    }

    // targetMixingWeight
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("targetMixingWeight", ParameterParserDataType::Float, (double)targetMixingWeight));
    }
    else if (PARAMETER_STRCMP(__name, "targetMixingWeight") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)targetMixingWeight));
    }

    return __result;
}

bool AECMeteringMixConfigType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "staticMixingConfig") == 0)
    {
        __result = staticMixingConfig.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "dynamicMixingConfig") == 0)
    {
        if (__index < dynamicMixingConfigCount)
        {
            __result = dynamicMixingConfig[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool AECMeteringMixConfigType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "staticMixingConfig") == 0)
    {
        __result = staticMixingConfig.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "dynamicMixingConfig") == 0)
    {
        if (__index < dynamicMixingConfigCount)
        {
            __result = dynamicMixingConfig[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

bool AECMeteringMixConfigType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // staticMixingConfig
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("staticMixingConfig", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "staticMixingConfig") == 0)
    {
        __result = staticMixingConfig.GetInfo(&__path[__pos], __info);
    }

    // dynamicMixingConfig
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("dynamicMixingConfig", ParameterParserDataType::Structure, true, false, dynamicMixingConfigCount));
    }
    else if (PARAMETER_STRCMP(__name, "dynamicMixingConfig") == 0)
    {
        if (__index < dynamicMixingConfigCount)
        {
            __result = dynamicMixingConfig[__index].GetInfo(&__path[__pos], __info);
        }
        else
        {
            __result = true;
            __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Structure, true, false, dynamicMixingConfigCount));
        }
    }

    return __result;
}

bool MultiCamCCTExpCompType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        ParameterUtils::DoubleToString((double)zoneData, __value, __size);
        __result = true;
    }

    return __result;
}

bool MultiCamCCTExpCompType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            zoneData = (float)dblValue; 
        }
    }

    return __result;
}

bool MultiCamCCTExpCompType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // zoneTrigger
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("zoneTrigger", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.GetInfo(&__path[__pos], __info);
    }

    // zoneData
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("zoneData", ParameterParserDataType::Float, (double)zoneData));
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)zoneData));
    }

    return __result;
}

bool AbsSensitivityValueType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        ParameterUtils::DoubleToString((double)zoneData, __value, __size);
        __result = true;
    }

    return __result;
}

bool AbsSensitivityValueType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            zoneData = (float)dblValue; 
        }
    }

    return __result;
}

bool AbsSensitivityValueType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // zoneTrigger
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("zoneTrigger", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.GetInfo(&__path[__pos], __info);
    }

    // zoneData
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("zoneData", ParameterParserDataType::Float, (double)zoneData));
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)zoneData));
    }

    return __result;
}

bool AECExposureSyncConfigType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "enableRelSensitivity") == 0)
    {
        ParameterUtils::DoubleToString((double)enableRelSensitivity, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableExposureTimeMatch") == 0)
    {
        ParameterUtils::DoubleToString((double)enableExposureTimeMatch, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "expCompMultiplier") == 0)
    {
        ParameterUtils::DoubleToString((double)expCompMultiplier, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "refAbsSensitivity") == 0)
    {
        if (__index < refAbsSensitivityCount)
        {
            __result = refAbsSensitivity[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableCCTBasedExpComp") == 0)
    {
        ParameterUtils::DoubleToString((double)enableCCTBasedExpComp, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "CCTBasedExpComp") == 0)
    {
        if (__index < CCTBasedExpCompCount)
        {
            __result = CCTBasedExpComp[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool AECExposureSyncConfigType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "enableRelSensitivity") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableRelSensitivity = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableExposureTimeMatch") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableExposureTimeMatch = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "expCompMultiplier") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            expCompMultiplier = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "refAbsSensitivity") == 0)
    {
        if (__index < refAbsSensitivityCount)
        {
            __result = refAbsSensitivity[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableCCTBasedExpComp") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableCCTBasedExpComp = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "CCTBasedExpComp") == 0)
    {
        if (__index < CCTBasedExpCompCount)
        {
            __result = CCTBasedExpComp[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

bool AECExposureSyncConfigType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // enableRelSensitivity
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("enableRelSensitivity", ParameterParserDataType::Boolean, (double)enableRelSensitivity, 0));
    }
    else if (PARAMETER_STRCMP(__name, "enableRelSensitivity") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Boolean, (double)enableRelSensitivity, 0));
    }

    // enableExposureTimeMatch
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("enableExposureTimeMatch", ParameterParserDataType::Boolean, (double)enableExposureTimeMatch, 0));
    }
    else if (PARAMETER_STRCMP(__name, "enableExposureTimeMatch") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Boolean, (double)enableExposureTimeMatch, 0));
    }

    // expCompMultiplier
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("expCompMultiplier", ParameterParserDataType::Float, (double)expCompMultiplier));
    }
    else if (PARAMETER_STRCMP(__name, "expCompMultiplier") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)expCompMultiplier));
    }

    // refAbsSensitivity
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("refAbsSensitivity", ParameterParserDataType::Structure, true, false, refAbsSensitivityCount));
    }
    else if (PARAMETER_STRCMP(__name, "refAbsSensitivity") == 0)
    {
        if (__index < refAbsSensitivityCount)
        {
            __result = refAbsSensitivity[__index].GetInfo(&__path[__pos], __info);
        }
        else
        {
            __result = true;
            __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Structure, true, false, refAbsSensitivityCount));
        }
    }

    // enableCCTBasedExpComp
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("enableCCTBasedExpComp", ParameterParserDataType::Boolean, (double)enableCCTBasedExpComp, 0));
    }
    else if (PARAMETER_STRCMP(__name, "enableCCTBasedExpComp") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Boolean, (double)enableCCTBasedExpComp, 0));
    }

    // CCTBasedExpComp
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("CCTBasedExpComp", ParameterParserDataType::Structure, true, false, CCTBasedExpCompCount));
    }
    else if (PARAMETER_STRCMP(__name, "CCTBasedExpComp") == 0)
    {
        if (__index < CCTBasedExpCompCount)
        {
            __result = CCTBasedExpComp[__index].GetInfo(&__path[__pos], __info);
        }
        else
        {
            __result = true;
            __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Structure, true, false, CCTBasedExpCompCount));
        }
    }

    return __result;
}

bool AECMeteringAndExpModeType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "master") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)master, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "slave") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)slave, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool AECMeteringAndExpModeType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "master") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            master = (aecglobalelements::AECMtrAndExpoConfigType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "slave") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            slave = (aecglobalelements::AECMtrAndExpoConfigType)(UINT32)dblValue; 
        }
    }

    return __result;
}

bool AECMeteringAndExpModeType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // master
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("master", ParameterParserDataType::Enum, (double)(UINT32)master, 0));
    }
    else if (PARAMETER_STRCMP(__name, "master") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Enum, (double)(UINT32)master, 0));
    }

    // slave
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("slave", ParameterParserDataType::Enum, (double)(UINT32)slave, 0));
    }
    else if (PARAMETER_STRCMP(__name, "slave") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Enum, (double)(UINT32)slave, 0));
    }

    return __result;
}

bool AECMultiCamType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_version.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "parameter_version") == 0)
    {
        __result = parameter_version.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "mtrAndExpMode") == 0)
    {
        __result = mtrAndExpMode.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "luxIndexSelection") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)luxIndexSelection, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "expSyncConfig") == 0)
    {
        __result = expSyncConfig.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "mtrMixConfig") == 0)
    {
        __result = mtrMixConfig.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool AECMultiCamType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_version.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "parameter_version") == 0)
    {
        __result = parameter_version.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "mtrAndExpMode") == 0)
    {
        __result = mtrAndExpMode.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "luxIndexSelection") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            luxIndexSelection = (aecglobalelements::AECDualCamSlaveLuxType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "expSyncConfig") == 0)
    {
        __result = expSyncConfig.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "mtrMixConfig") == 0)
    {
        __result = mtrMixConfig.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool AECMultiCamType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // module_version
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("module_version", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_version.GetInfo(&__path[__pos], __info);
    }

    // parameter_version
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("parameter_version", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "parameter_version") == 0)
    {
        __result = parameter_version.GetInfo(&__path[__pos], __info);
    }

    // mtrAndExpMode
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("mtrAndExpMode", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "mtrAndExpMode") == 0)
    {
        __result = mtrAndExpMode.GetInfo(&__path[__pos], __info);
    }

    // luxIndexSelection
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("luxIndexSelection", ParameterParserDataType::Enum, (double)(UINT32)luxIndexSelection, 0));
    }
    else if (PARAMETER_STRCMP(__name, "luxIndexSelection") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Enum, (double)(UINT32)luxIndexSelection, 0));
    }

    // expSyncConfig
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("expSyncConfig", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "expSyncConfig") == 0)
    {
        __result = expSyncConfig.GetInfo(&__path[__pos], __info);
    }

    // mtrMixConfig
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("mtrMixConfig", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "mtrMixConfig") == 0)
    {
        __result = mtrMixConfig.GetInfo(&__path[__pos], __info);
    }

    return __result;
}

bool AECMultiCamType::module_versionStruct::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "major_revision") == 0)
    {
        ParameterUtils::DoubleToString((double)major_revision, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "minor_revision") == 0)
    {
        ParameterUtils::DoubleToString((double)minor_revision, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "incr_revision") == 0)
    {
        ParameterUtils::DoubleToString((double)incr_revision, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool AECMultiCamType::module_versionStruct::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "major_revision") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            major_revision = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "minor_revision") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            minor_revision = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "incr_revision") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            incr_revision = (INT32)dblValue; 
        }
    }

    return __result;
}

bool AECMultiCamType::module_versionStruct::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // major_revision
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("major_revision", ParameterParserDataType::Int32, (double)major_revision, 0));
    }
    else if (PARAMETER_STRCMP(__name, "major_revision") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)major_revision, 0));
    }

    // minor_revision
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("minor_revision", ParameterParserDataType::Int32, (double)minor_revision, 0));
    }
    else if (PARAMETER_STRCMP(__name, "minor_revision") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)minor_revision, 0));
    }

    // incr_revision
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("incr_revision", ParameterParserDataType::Int32, (double)incr_revision, 0));
    }
    else if (PARAMETER_STRCMP(__name, "incr_revision") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)incr_revision, 0));
    }

    return __result;
}

bool AECMultiCamType::parameter_versionStruct::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "revision") == 0)
    {
        PARAMETER_STRCPY(__value, __size, revision);
        __result = true;
    }

    return __result;
}

bool AECMultiCamType::parameter_versionStruct::SetValue(
    const CHAR* const __path,
    const CHAR* const /*__value*/)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "revision") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }

    return __result;
}

bool AECMultiCamType::parameter_versionStruct::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // revision
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("revision", ParameterParserDataType::String, revision));
    }
    else if (PARAMETER_STRCMP(__name, "revision") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::String, revision));
    }

    return __result;
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECMultiCamTypeClass::AECMultiCamTypeClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(mtrAndExpMode);
    PARAMETER_INITIALIZE(luxIndexSelection);
    PARAMETER_INITIALIZE(expSyncConfig);
    PARAMETER_INITIALIZE(mtrMixConfig);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECMultiCamTypeClass::AECMultiCamTypeClass(
    const CHAR* const name,
    ModuleData* const moduleData)
    : ParameterModule(name, MAJOR, MINOR, PATCH, moduleData)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(mtrAndExpMode);
    PARAMETER_INITIALIZE(luxIndexSelection);
    PARAMETER_INITIALIZE(expSyncConfig);
    PARAMETER_INITIALIZE(mtrMixConfig);
}

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

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

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

    PARAMETER_INITIALIZE(weight);

    SYMBOL_TABLE_ENTRY_READ(entry, result, weight, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(zoneTrigger);
    PARAMETER_INITIALIZE(zoneData);

    result = zoneTrigger.Load(entry, alignment);
    if (result)
    {
        result = zoneData.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(lumaMixingWeight);
    PARAMETER_INITIALIZE(targetMixingWeight);

    SYMBOL_TABLE_ENTRY_READ(entry, result, lumaMixingWeight, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, targetMixingWeight, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(staticMixingConfig);
    PARAMETER_INITIALIZE(dynamicMixingConfig);

    result = staticMixingConfig.Load(entry, alignment);

    // Reading Array dynamicMixingConfig from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        dynamicMixingConfigCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, dynamicMixingConfigCount, 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)
        {
            dynamicMixingConfigID = pointerEntry->ID;
            DupObjInfo* dynamicMixingConfigDupInfo = pointerEntry->GetDupObject(dynamicMixingConfigCount, file, line);
            if (dynamicMixingConfigDupInfo != nullptr && dynamicMixingConfigDupInfo->Object != nullptr)
            {
                dynamicMixingConfig = (DynamicMixingConfigType*)dynamicMixingConfigDupInfo->Object;
                if (dynamicMixingConfig == nullptr)
                {
                    if (dynamicMixingConfigDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "dynamicMixingConfig duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            dynamicMixingConfigDupInfo->File, dynamicMixingConfigDupInfo->Line, dynamicMixingConfigDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "dynamicMixingConfig duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            dynamicMixingConfigDupInfo->Line, dynamicMixingConfigDupInfo->RefCount);
                    }
                }
            }

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

    return result;
}

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

    PARAMETER_INITIALIZE(zoneTrigger);
    PARAMETER_INITIALIZE(zoneData);

    result = zoneTrigger.Load(entry, alignment);
    SYMBOL_TABLE_ENTRY_READ(entry, result, zoneData, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(zoneTrigger);
    PARAMETER_INITIALIZE(zoneData);

    result = zoneTrigger.Load(entry, alignment);
    SYMBOL_TABLE_ENTRY_READ(entry, result, zoneData, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(enableRelSensitivity);
    PARAMETER_INITIALIZE(enableExposureTimeMatch);
    PARAMETER_INITIALIZE(expCompMultiplier);
    PARAMETER_INITIALIZE(refAbsSensitivity);
    PARAMETER_INITIALIZE(enableCCTBasedExpComp);
    PARAMETER_INITIALIZE(CCTBasedExpComp);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableRelSensitivity, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableExposureTimeMatch, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, expCompMultiplier, alignment)

    // Reading Array refAbsSensitivity from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        refAbsSensitivityCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, refAbsSensitivityCount, 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)
        {
            refAbsSensitivityID = pointerEntry->ID;
            DupObjInfo* refAbsSensitivityDupInfo = pointerEntry->GetDupObject(refAbsSensitivityCount, file, line);
            if (refAbsSensitivityDupInfo != nullptr && refAbsSensitivityDupInfo->Object != nullptr)
            {
                refAbsSensitivity = (AbsSensitivityValueType*)refAbsSensitivityDupInfo->Object;
                if (refAbsSensitivity == nullptr)
                {
                    if (refAbsSensitivityDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "refAbsSensitivity duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            refAbsSensitivityDupInfo->File, refAbsSensitivityDupInfo->Line, refAbsSensitivityDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "refAbsSensitivity duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            refAbsSensitivityDupInfo->Line, refAbsSensitivityDupInfo->RefCount);
                    }
                }
            }

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

    // Reading Array CCTBasedExpComp from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        CCTBasedExpCompCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, CCTBasedExpCompCount, 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)
        {
            CCTBasedExpCompID = pointerEntry->ID;
            DupObjInfo* CCTBasedExpCompDupInfo = pointerEntry->GetDupObject(CCTBasedExpCompCount, file, line);
            if (CCTBasedExpCompDupInfo != nullptr && CCTBasedExpCompDupInfo->Object != nullptr)
            {
                CCTBasedExpComp = (MultiCamCCTExpCompType*)CCTBasedExpCompDupInfo->Object;
                if (CCTBasedExpComp == nullptr)
                {
                    if (CCTBasedExpCompDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "CCTBasedExpComp duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            CCTBasedExpCompDupInfo->File, CCTBasedExpCompDupInfo->Line, CCTBasedExpCompDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "CCTBasedExpComp duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            CCTBasedExpCompDupInfo->Line, CCTBasedExpCompDupInfo->RefCount);
                    }
                }
            }

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

    return result;
}

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

    PARAMETER_INITIALIZE(master);
    PARAMETER_INITIALIZE(slave);

    result = aecglobalelements::ReadEnum_AECMtrAndExpoConfigType(entry, master, alignment);
    if (result)
    {
        result = aecglobalelements::ReadEnum_AECMtrAndExpoConfigType(entry, slave, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(mtrAndExpMode);
    PARAMETER_INITIALIZE(luxIndexSelection);
    PARAMETER_INITIALIZE(expSyncConfig);
    PARAMETER_INITIALIZE(mtrMixConfig);

    result = module_version.Load(entry, alignment);
    if (result)
    {
        result = parameter_version.Load(entry, alignment);
    }
    if (result)
    {
        result = mtrAndExpMode.Load(entry, alignment);
    }
    if (result)
    {
        result = aecglobalelements::ReadEnum_AECDualCamSlaveLuxType(entry, luxIndexSelection, alignment);
    }
    if (result)
    {
        result = expSyncConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = mtrMixConfig.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool AECMultiCamType::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;
}

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

    PARAMETER_INITIALIZE(revision);


    // Reading String revision 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, revision, count, alignment)
    }

    return result;
}

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECMultiCamType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECMultiCamType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
    expSyncConfig.Unload(__table);
    mtrMixConfig.Unload(__table);
}

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Create module, and return a new object
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ParameterModule* AECMultiCamTypeClass::Create(
    ModuleData*    moduleData,
    DefaultModule* const defModule) const
{
    AECMultiCamTypeClass* 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 = (AECMultiCamTypeClass*)module;
        }
        else
        {
            cls = PARAMETER_NEW AECMultiCamTypeClass(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 AECMultiCamTypeClass, binary version (%lld) does not match source version (%lld)\n",
            moduleData->Version.Value, Version.Value);
    }
    else
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create AECMultiCamTypeClass, binary name (%s) does not match source name (%s)\n",
            moduleData->Type, Type);
    }

    return (ParameterModule*)cls;
}

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

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

        ParameterFileSymbolTableEntry  entryObj;
        ParameterFileSymbolTableEntry* const entry = &entryObj;
        // With EzTune enabled, the unused upper byte of SymbolTableID value can change, so clear it
        result = table->Find(entryObj, SymbolTableID & 0x00ffffff);

        if (!result)
        {
            PARAMETER_LOG_ERROR(entry->SetManager, "AECMultiCamTypeClass::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 AECMultiCamTypeClass::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 AECMultiCamTypeClass::Release()
{
    ParameterModule::Release();
}

AECSYNC_NAMESPACE_END
