////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 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 V7.4.1 (8cca6579792b9fcef3bc725ff070c5ec453c7c85)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @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;

    (void)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;

    (void)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;

    (void)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;

    (void)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;

    (void)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;

    (void)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;

    (void)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;

    (void)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;

    (void)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;

    (void)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;

    (void)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;

    (void)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;

    (void)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;

    (void)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;

    (void)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* 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*       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();
    }
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load DynamicMixingZoneDataType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void DynamicMixingZoneDataType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(weight);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xbe059318b040bcf4;
        entry->ReadSimpleTypeFixedArray(&weight, 1, localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void DynamicMixingZoneDataType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        DynamicMixingZoneDataType* arrayPtr = (DynamicMixingZoneDataType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* DynamicMixingZoneDataType::AllocArray(
    UINT32 __count)
{
    DynamicMixingZoneDataType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW DynamicMixingZoneDataType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load DynamicMixingConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void DynamicMixingConfigType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(zoneTrigger);
    PARAMETER_INITIALIZE(zoneData);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0x9d49dd7376f3949b;
        zoneTrigger.Load(localParams);
        localParams.NameHash        = 0xd47d0038091ab64b;
        zoneData.Load(localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void DynamicMixingConfigType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        DynamicMixingConfigType* arrayPtr = (DynamicMixingConfigType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* DynamicMixingConfigType::AllocArray(
    UINT32 __count)
{
    DynamicMixingConfigType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW DynamicMixingConfigType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load StaticMixingConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void StaticMixingConfigType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(lumaMixingWeight);
    PARAMETER_INITIALIZE(targetMixingWeight);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xba92b4e17b433a8b;
        entry->ReadSimpleTypeFixedArray(&lumaMixingWeight, 1, localParams);
        localParams.NameHash = 0x8bcad63510b6fca5;
        entry->ReadSimpleTypeFixedArray(&targetMixingWeight, 1, localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void StaticMixingConfigType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        StaticMixingConfigType* arrayPtr = (StaticMixingConfigType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* StaticMixingConfigType::AllocArray(
    UINT32 __count)
{
    StaticMixingConfigType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW StaticMixingConfigType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load AECMeteringMixConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECMeteringMixConfigType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(staticMixingConfig);
    PARAMETER_INITIALIZE(dynamicMixingConfigCount);
    PARAMETER_INITIALIZE(dynamicMixingConfig);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0xd7b5a029c70b4b58;
        staticMixingConfig.Load(localParams);
        localParams.NameHash = 0xbc46f1a95e26d7d2;
        entry->ReadStructureArray(dynamicMixingConfig, dynamicMixingConfigCount, dynamicMixingConfigID, 1, localParams, __COUNTER__);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void AECMeteringMixConfigType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        AECMeteringMixConfigType* arrayPtr = (AECMeteringMixConfigType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* AECMeteringMixConfigType::AllocArray(
    UINT32 __count)
{
    AECMeteringMixConfigType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW AECMeteringMixConfigType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load MultiCamCCTExpCompType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void MultiCamCCTExpCompType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(zoneTrigger);
    PARAMETER_INITIALIZE(zoneData);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0x9d49dd7376f3949b;
        zoneTrigger.Load(localParams);
        localParams.NameHash = 0xd47d0038091ab64b;
        entry->ReadSimpleTypeFixedArray(&zoneData, 1, localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void MultiCamCCTExpCompType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        MultiCamCCTExpCompType* arrayPtr = (MultiCamCCTExpCompType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* MultiCamCCTExpCompType::AllocArray(
    UINT32 __count)
{
    MultiCamCCTExpCompType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW MultiCamCCTExpCompType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load AbsSensitivityValueType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AbsSensitivityValueType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(zoneTrigger);
    PARAMETER_INITIALIZE(zoneData);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0x9d49dd7376f3949b;
        zoneTrigger.Load(localParams);
        localParams.NameHash = 0xd47d0038091ab64b;
        entry->ReadSimpleTypeFixedArray(&zoneData, 1, localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void AbsSensitivityValueType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        AbsSensitivityValueType* arrayPtr = (AbsSensitivityValueType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* AbsSensitivityValueType::AllocArray(
    UINT32 __count)
{
    AbsSensitivityValueType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW AbsSensitivityValueType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load AECExposureSyncConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECExposureSyncConfigType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(enableRelSensitivity);
    PARAMETER_INITIALIZE(enableExposureTimeMatch);
    PARAMETER_INITIALIZE(expCompMultiplier);
    PARAMETER_INITIALIZE(refAbsSensitivityCount);
    PARAMETER_INITIALIZE(refAbsSensitivity);
    PARAMETER_INITIALIZE(enableCCTBasedExpComp);
    PARAMETER_INITIALIZE(CCTBasedExpCompCount);
    PARAMETER_INITIALIZE(CCTBasedExpComp);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xfe5cace91f8ed413;
        entry->ReadSimpleTypeFixedArray(&enableRelSensitivity, 1, localParams);
        localParams.NameHash = 0xe3381c698cbc9743;
        entry->ReadSimpleTypeFixedArray(&enableExposureTimeMatch, 1, localParams);
        localParams.NameHash = 0x98d4a7047822bcd4;
        entry->ReadSimpleTypeFixedArray(&expCompMultiplier, 1, localParams);
        localParams.NameHash = 0xaad3f4a1a888ff09;
        entry->ReadStructureArray(refAbsSensitivity, refAbsSensitivityCount, refAbsSensitivityID, 1, localParams, __COUNTER__);
        localParams.NameHash = 0xc4d51b3507d59f10;
        entry->ReadSimpleTypeFixedArray(&enableCCTBasedExpComp, 1, localParams);
        localParams.NameHash = 0x83417a10498ac838;
        entry->ReadStructureArray(CCTBasedExpComp, CCTBasedExpCompCount, CCTBasedExpCompID, 1, localParams, __COUNTER__);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void AECExposureSyncConfigType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        AECExposureSyncConfigType* arrayPtr = (AECExposureSyncConfigType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* AECExposureSyncConfigType::AllocArray(
    UINT32 __count)
{
    AECExposureSyncConfigType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW AECExposureSyncConfigType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load AECMeteringAndExpModeType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECMeteringAndExpModeType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(master);
    PARAMETER_INITIALIZE(slave);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xd6502a4055fa55b2;
        entry->ReadEnumFixedArray(&master, 1, localParams);
        localParams.NameHash = 0xddd6fc12196a1251;
        entry->ReadEnumFixedArray(&slave, 1, localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void AECMeteringAndExpModeType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        AECMeteringAndExpModeType* arrayPtr = (AECMeteringAndExpModeType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* AECMeteringAndExpModeType::AllocArray(
    UINT32 __count)
{
    AECMeteringAndExpModeType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW AECMeteringAndExpModeType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load AECMultiCamType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECMultiCamType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(mtrAndExpMode);
    PARAMETER_INITIALIZE(luxIndexSelection);
    PARAMETER_INITIALIZE(expSyncConfig);
    PARAMETER_INITIALIZE(mtrMixConfig);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0xe11cd9f365a2599f;
        module_version.Load(localParams);
        localParams.NameHash        = 0xca3106e199a12935;
        parameter_version.Load(localParams);
        localParams.NameHash        = 0x8c78e530a60dc8a7;
        mtrAndExpMode.Load(localParams);
        localParams.NameHash = 0xa7bae859274b202d;
        entry->ReadEnumFixedArray(&luxIndexSelection, 1, localParams);
        localParams.NameHash        = 0xfbb137a151fc65bf;
        expSyncConfig.Load(localParams);
        localParams.NameHash        = 0xfccea632e19afa14;
        mtrMixConfig.Load(localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void AECMultiCamType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        AECMultiCamType* arrayPtr = (AECMultiCamType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* AECMultiCamType::AllocArray(
    UINT32 __count)
{
    AECMultiCamType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW AECMultiCamType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECMultiCamType::module_versionStruct::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(major_revision);
    PARAMETER_INITIALIZE(minor_revision);
    PARAMETER_INITIALIZE(incr_revision);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xcd66249477636693;
        entry->ReadSimpleTypeFixedArray(&major_revision, 1, localParams);
        localParams.NameHash = 0xc5497493137a9c25;
        entry->ReadSimpleTypeFixedArray(&minor_revision, 1, localParams);
        localParams.NameHash = 0xb27b8a668efb2a56;
        entry->ReadSimpleTypeFixedArray(&incr_revision, 1, localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void AECMultiCamType::module_versionStruct::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        module_versionStruct* arrayPtr = (module_versionStruct*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* AECMultiCamType::module_versionStruct::AllocArray(
    UINT32 __count)
{
    module_versionStruct* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW module_versionStruct[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load parameter_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECMultiCamType::parameter_versionStruct::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(revision);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xd594eed07a5650c5;
        entry->ReadStringFixedArray(&revision, 1, localParams, __COUNTER__);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void AECMultiCamType::parameter_versionStruct::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        parameter_versionStruct* arrayPtr = (parameter_versionStruct*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* AECMultiCamType::parameter_versionStruct::AllocArray(
    UINT32 __count)
{
    parameter_versionStruct* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW parameter_versionStruct[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECMeteringMixConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECMeteringMixConfigType::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, dynamicMixingConfig);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECExposureSyncConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECExposureSyncConfigType::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, refAbsSensitivity);
    ParameterFileSymbolTable::ReleaseObject(__table, CCTBasedExpComp);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// 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)
{
    ParameterFileSymbolTable::ReleaseObject(__table, revision);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// 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;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// GetModuleName: Returns ParameterModule::Name variable
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CHAR* AECMultiCamType::GetModuleName()
{
    return ((AECMultiCamTypeClass*)this)->Name;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// GetModuleName: Returns ParameterModule::NameHash variable
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
UINT64 AECMultiCamType::GetModuleNameHash()
{
    return ((AECMultiCamTypeClass*)this)->NameHash;
}

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

    if (IsModuleMatch(moduleData) && 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(Name, 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 hash (0x%016llx) does not match source name hash (0x%016llx)\n",
            moduleData->NameHash, NameHash);
    }

    return (ParameterModule*)cls;
}

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

#ifdef PARAMETER_USE_MUTEX
    ParameterMutexLocker lock(Mutex); // Unique LOCK
#endif

    if (!Loaded)
    {
        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 & 0x00ffffffU);

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


        ParameterDefinitionElement* _element = nullptr;
        if (table->ModuleDefinitions != nullptr && !table->ModuleDefinitions->empty())
        {
            _element = table->BuildModuleElement(NameHash);
        }

        ParameterLoadParameters parentParams(entry, NameHash, true, true, _element, entry->Position, 0, ParameterFileSymbolTableEntry::LOAD_LIMIT_MAX);
        cls->Load(parentParams);
        PARAMETER_DELETE _element;
        Modified++;
        Loaded = true;
    }

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

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload module data
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECMultiCamTypeClass::UnloadModule()
{
#ifdef PARAMETER_USE_MUTEX
    ParameterMutexLocker lock(Mutex); // Unique LOCK
#endif

    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
