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

#include "aecxdbsnapshot.h"
#include "parametersetmanager.h"

AECXDBSNAPSHOT_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool DRCGainType::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, "ADRCGain") == 0)
    {
        ParameterUtils::DoubleToString((double)ADRCGain, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "darkBoostGain") == 0)
    {
        ParameterUtils::DoubleToString((double)darkBoostGain, __value, __size);
        __result = true;
    }

    return __result;
}

bool DRCGainType::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, "ADRCGain") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            ADRCGain = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "darkBoostGain") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            darkBoostGain = (float)dblValue; 
        }
    }

    return __result;
}

bool DRCGainType::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);

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

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

    return __result;
}

bool DRCGainTriggerSystemEndLevelType::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, "triggerLux") == 0)
    {
        __result = triggerLux.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "triggerData") == 0)
    {
        __result = triggerData.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool DRCGainTriggerSystemEndLevelType::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, "triggerLux") == 0)
    {
        __result = triggerLux.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "triggerData") == 0)
    {
        __result = triggerData.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool DRCGainTriggerSystemEndLevelType::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);

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

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

    return __result;
}

bool FixedDRCTriggerType::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, "triggerSystem") == 0)
    {
        if (__index < triggerSystemCount)
        {
            __result = triggerSystem[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool FixedDRCTriggerType::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, "triggerSystem") == 0)
    {
        if (__index < triggerSystemCount)
        {
            __result = triggerSystem[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

bool FixedDRCTriggerType::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);

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

    return __result;
}

bool BaseExposureConstraintType::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, "maxADRCGain") == 0)
    {
        ParameterUtils::DoubleToString((double)maxADRCGain, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "maxDarkBoostGain") == 0)
    {
        ParameterUtils::DoubleToString((double)maxDarkBoostGain, __value, __size);
        __result = true;
    }

    return __result;
}

bool BaseExposureConstraintType::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, "maxADRCGain") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            maxADRCGain = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "maxDarkBoostGain") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            maxDarkBoostGain = (float)dblValue; 
        }
    }

    return __result;
}

bool BaseExposureConstraintType::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);

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

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

    return __result;
}

bool ExposureConfigType::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, "method") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)method, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "baseExposureConstraints") == 0)
    {
        __result = baseExposureConstraints.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "fixedDRC") == 0)
    {
        __result = fixedDRC.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool ExposureConfigType::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, "method") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            method = (DRCConfigMethodType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "baseExposureConstraints") == 0)
    {
        __result = baseExposureConstraints.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "fixedDRC") == 0)
    {
        __result = fixedDRC.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool ExposureConfigType::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);

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

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

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

    return __result;
}

bool BracketingExposureType::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, "baseExposure") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)baseExposure, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "zeroEVDRCConfig") == 0)
    {
        __result = zeroEVDRCConfig.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "positiveEVDRCConfig") == 0)
    {
        __result = positiveEVDRCConfig.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "negativeEVDRCConfig") == 0)
    {
        __result = negativeEVDRCConfig.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "bOverrideEVPositive") == 0)
    {
        ParameterUtils::DoubleToString((double)bOverrideEVPositive, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "bOverrideEVNegative") == 0)
    {
        ParameterUtils::DoubleToString((double)bOverrideEVNegative, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool BracketingExposureType::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, "baseExposure") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            baseExposure = (BaseExposureType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "zeroEVDRCConfig") == 0)
    {
        __result = zeroEVDRCConfig.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "positiveEVDRCConfig") == 0)
    {
        __result = positiveEVDRCConfig.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "negativeEVDRCConfig") == 0)
    {
        __result = negativeEVDRCConfig.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "bOverrideEVPositive") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            bOverrideEVPositive = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "bOverrideEVNegative") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            bOverrideEVNegative = (BOOL)dblValue; 
        }
    }

    return __result;
}

bool BracketingExposureType::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);

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

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

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

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

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

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

    return __result;
}

bool NonBracketingExposureType::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, "baseExposure") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)baseExposure, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "DRCConfig") == 0)
    {
        __result = DRCConfig.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool NonBracketingExposureType::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, "baseExposure") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            baseExposure = (BaseExposureType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "DRCConfig") == 0)
    {
        __result = DRCConfig.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool NonBracketingExposureType::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);

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

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

    return __result;
}

bool SnapshotTuningType::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, "bApplyBracketingOnTopOfPreviewEV") == 0)
    {
        ParameterUtils::DoubleToString((double)bApplyBracketingOnTopOfPreviewEV, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "bApplyDRCWhenBracketing") == 0)
    {
        ParameterUtils::DoubleToString((double)bApplyDRCWhenBracketing, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "nonBracketingConfig") == 0)
    {
        __result = nonBracketingConfig.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "bracketingConfig") == 0)
    {
        __result = bracketingConfig.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool SnapshotTuningType::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, "bApplyBracketingOnTopOfPreviewEV") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            bApplyBracketingOnTopOfPreviewEV = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "bApplyDRCWhenBracketing") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            bApplyDRCWhenBracketing = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "nonBracketingConfig") == 0)
    {
        __result = nonBracketingConfig.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "bracketingConfig") == 0)
    {
        __result = bracketingConfig.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool SnapshotTuningType::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);

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

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

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

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

    return __result;
}

bool DBSnapshotPayload::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, "dataID") == 0)
    {
        ParameterUtils::DoubleToString((double)dataID, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "description") == 0)
    {
        PARAMETER_STRCPY(__value, __size, description);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "value") == 0)
    {
        __result = value.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool DBSnapshotPayload::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, "dataID") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            dataID = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "description") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }
    else if (PARAMETER_STRCMP(__name, "value") == 0)
    {
        __result = value.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool DBSnapshotPayload::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);

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

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

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

    return __result;
}

bool AECXDBSnapshotType::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, "dataBank") == 0)
    {
        __result = dataBank.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "data") == 0)
    {
        if (__index < dataCount)
        {
            __result = data[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool AECXDBSnapshotType::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, "dataBank") == 0)
    {
        __result = dataBank.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "data") == 0)
    {
        if (__index < dataCount)
        {
            __result = data[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

bool AECXDBSnapshotType::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);
    }

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

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

    return __result;
}

bool AECXDBSnapshotType::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 AECXDBSnapshotType::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 AECXDBSnapshotType::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 AECXDBSnapshotType::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 AECXDBSnapshotType::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 AECXDBSnapshotType::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;
}

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

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

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

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

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

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


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXDBSnapshotTypeClass::AECXDBSnapshotTypeClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(dataBank);
    PARAMETER_INITIALIZE(dataCount);
    PARAMETER_INITIALIZE(data);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXDBSnapshotTypeClass::AECXDBSnapshotTypeClass(
    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(dataBank);
    PARAMETER_INITIALIZE(data);
}

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

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

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

    PARAMETER_INITIALIZE(ADRCGain);
    PARAMETER_INITIALIZE(darkBoostGain);

    SYMBOL_TABLE_ENTRY_READ(entry, result, ADRCGain, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, darkBoostGain, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(triggerLux);
    PARAMETER_INITIALIZE(triggerData);

    result = triggerLux.Load(entry, alignment);
    if (result)
    {
        result = triggerData.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(triggerSystem);


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

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

    return result;
}

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

    PARAMETER_INITIALIZE(maxADRCGain);
    PARAMETER_INITIALIZE(maxDarkBoostGain);

    SYMBOL_TABLE_ENTRY_READ(entry, result, maxADRCGain, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxDarkBoostGain, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(method);
    PARAMETER_INITIALIZE(baseExposureConstraints);
    PARAMETER_INITIALIZE(fixedDRC);

    result = aecxdbsnapshot::ReadEnum_DRCConfigMethodType(entry, method, alignment);
    if (result)
    {
        result = baseExposureConstraints.Load(entry, alignment);
    }
    if (result)
    {
        result = fixedDRC.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(baseExposure);
    PARAMETER_INITIALIZE(zeroEVDRCConfig);
    PARAMETER_INITIALIZE(positiveEVDRCConfig);
    PARAMETER_INITIALIZE(negativeEVDRCConfig);
    PARAMETER_INITIALIZE(bOverrideEVPositive);
    PARAMETER_INITIALIZE(bOverrideEVNegative);

    result = aecxdbsnapshot::ReadEnum_BaseExposureType(entry, baseExposure, alignment);
    if (result)
    {
        result = zeroEVDRCConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = positiveEVDRCConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = negativeEVDRCConfig.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, bOverrideEVPositive, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, bOverrideEVNegative, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(baseExposure);
    PARAMETER_INITIALIZE(DRCConfig);

    result = aecxdbsnapshot::ReadEnum_BaseExposureType(entry, baseExposure, alignment);
    if (result)
    {
        result = DRCConfig.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(bApplyBracketingOnTopOfPreviewEV);
    PARAMETER_INITIALIZE(bApplyDRCWhenBracketing);
    PARAMETER_INITIALIZE(nonBracketingConfig);
    PARAMETER_INITIALIZE(bracketingConfig);

    SYMBOL_TABLE_ENTRY_READ(entry, result, bApplyBracketingOnTopOfPreviewEV, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, bApplyDRCWhenBracketing, alignment)
    if (result)
    {
        result = nonBracketingConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = bracketingConfig.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(dataID);
    PARAMETER_INITIALIZE(description);
    PARAMETER_INITIALIZE(value);

    SYMBOL_TABLE_ENTRY_READ(entry, result, dataID, alignment)

    // Reading String description 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, description, count, alignment)
    }
    if (result)
    {
        result = value.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(dataBank);
    PARAMETER_INITIALIZE(data);

    result = module_version.Load(entry, alignment);
    if (result)
    {
        result = parameter_version.Load(entry, alignment);
    }
    if (result)
    {
        result = dataBank.Load(entry, alignment);
    }

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

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

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool AECXDBSnapshotType::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 AECXDBSnapshotType::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 FixedDRCTriggerType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void FixedDRCTriggerType::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(triggerSystem))
    {
        PARAMETER_DELETE[] triggerSystem;
    }
    triggerSystem = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload ExposureConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ExposureConfigType::Unload(ParameterFileSymbolTable* const __table)
{
    fixedDRC.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload BracketingExposureType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void BracketingExposureType::Unload(ParameterFileSymbolTable* const __table)
{
    zeroEVDRCConfig.Unload(__table);
    positiveEVDRCConfig.Unload(__table);
    negativeEVDRCConfig.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload NonBracketingExposureType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void NonBracketingExposureType::Unload(ParameterFileSymbolTable* const __table)
{
    DRCConfig.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload SnapshotTuningType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void SnapshotTuningType::Unload(ParameterFileSymbolTable* const __table)
{
    nonBracketingConfig.Unload(__table);
    bracketingConfig.Unload(__table);
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECXDBSnapshotType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECXDBSnapshotType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
    dataBank.Unload(__table);
    for (UINT32 i = 0; i < dataCount; i++)
    {
        data[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(data))
    {
        PARAMETER_DELETE[] data;
    }
    data = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload parameter_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECXDBSnapshotType::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 AECXDBSnapshotType::Release()
{
    ((AECXDBSnapshotTypeClass*)this)->Release();
}

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

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

    return (ParameterModule*)cls;
}

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

    if (!Loaded)
    {
        BYTE const alignment = table->Alignment;
        AECXDBSnapshotTypeClass* 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, "AECXDBSnapshotTypeClass::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 AECXDBSnapshotTypeClass::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 AECXDBSnapshotTypeClass::Release()
{
    ParameterModule::Release();
}

AECXDBSNAPSHOT_NAMESPACE_END
