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

#include "aecxextension.h"
#include "parametersetmanager.h"

AECXEXTENSION_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool SceneCriterion::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, "dataBankSource") == 0)
    {
        __result = dataBankSource.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "postCalculation") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)postCalculation, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "triggers") == 0)
    {
        if (__index < triggersCount)
        {
            __result = triggers[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool SceneCriterion::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, "dataBankSource") == 0)
    {
        __result = dataBankSource.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "postCalculation") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            postCalculation = (MonitorDataCalculatorType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "triggers") == 0)
    {
        if (__index < triggersCount)
        {
            __result = triggers[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

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

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

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

    return __result;
}

bool MonitorSceneConfiguration::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, "sceneDescription") == 0)
    {
        PARAMETER_STRCPY(__value, __size, sceneDescription);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "criteriaArray") == 0)
    {
        if (__index < criteriaArrayCount)
        {
            __result = criteriaArray[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "passThreshold") == 0)
    {
        ParameterUtils::DoubleToString((double)passThreshold, __value, __size);
        __result = true;
    }

    return __result;
}

bool MonitorSceneConfiguration::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, "sceneDescription") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }
    else if (PARAMETER_STRCMP(__name, "criteriaArray") == 0)
    {
        if (__index < criteriaArrayCount)
        {
            __result = criteriaArray[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "passThreshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            passThreshold = (float)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

    return __result;
}

bool ExtensionGeneralizedMonitor::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, "monitorDescription") == 0)
    {
        PARAMETER_STRCPY(__value, __size, monitorDescription);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "scenes") == 0)
    {
        if (__index < scenesCount)
        {
            __result = scenes[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool ExtensionGeneralizedMonitor::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, "monitorDescription") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }
    else if (PARAMETER_STRCMP(__name, "scenes") == 0)
    {
        if (__index < scenesCount)
        {
            __result = scenes[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

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

    return __result;
}

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

    return __result;
}

bool ExtensionFlagQLL::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, "enableQLLSnapshot") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableQLLSnapshot = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enforceQLLSetting") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enforceQLLSetting = (BOOL)dblValue; 
        }
    }

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

bool ExtensionYHistStretch::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, "enableYHistStretch") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableYHistStretch = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "tempFilterStrength") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            tempFilterStrength = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "clampValue") == 0)
    {
        __result = clampValue.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "scalingValue") == 0)
    {
        __result = scalingValue.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

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

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

    return __result;
}

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

    return __result;
}

bool AECXExtensionType::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, "moduleID") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            moduleID = (aecxglobalelements::AECXModuleIDType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "flagMonitor") == 0)
    {
        __result = flagMonitor.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "monitor3HDRSnapshot") == 0)
    {
        __result = monitor3HDRSnapshot.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "monitorEVBracketLock") == 0)
    {
        __result = monitorEVBracketLock.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "verboseDebugDataEnable") == 0)
    {
        __result = verboseDebugDataEnable.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

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

    return __result;
}

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

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

    return __result;
}

bool AECXExtensionType::verboseDebugDataEnableStruct::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, "Metering") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            Metering = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "StatsList") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            StatsList = (BOOL)dblValue; 
        }
    }

    return __result;
}

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

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

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

    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_MonitorDataCalculatorType(
    ParameterFileSymbolTableEntry* const entry,
    MonitorDataCalculatorType& enumValue,
    BYTE const alignment)
{
    bool result {false};

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

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


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXExtensionTypeClass::AECXExtensionTypeClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(moduleID);
    PARAMETER_INITIALIZE(flagMonitor);
    PARAMETER_INITIALIZE(monitor3HDRSnapshot);
    PARAMETER_INITIALIZE(monitorEVBracketLock);
    PARAMETER_INITIALIZE(verboseDebugDataEnable);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXExtensionTypeClass::AECXExtensionTypeClass(
    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(moduleID);
    PARAMETER_INITIALIZE(flagMonitor);
    PARAMETER_INITIALIZE(monitor3HDRSnapshot);
    PARAMETER_INITIALIZE(monitorEVBracketLock);
    PARAMETER_INITIALIZE(verboseDebugDataEnable);
}

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

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

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

    PARAMETER_INITIALIZE(dataBankSource);
    PARAMETER_INITIALIZE(postCalculation);
    PARAMETER_INITIALIZE(triggers);

    result = dataBankSource.Load(entry, alignment);
    if (result)
    {
        result = aecxextension::ReadEnum_MonitorDataCalculatorType(entry, postCalculation, alignment);
    }

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

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

    return result;
}

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

    PARAMETER_INITIALIZE(sceneDescription);
    PARAMETER_INITIALIZE(criteriaArray);
    PARAMETER_INITIALIZE(passThreshold);


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

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

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

    return result;
}

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

    PARAMETER_INITIALIZE(monitorDescription);
    PARAMETER_INITIALIZE(scenes);


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

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

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

    return result;
}

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

    PARAMETER_INITIALIZE(enableEVBracketLock);
    PARAMETER_INITIALIZE(maxFrameNum);
    PARAMETER_INITIALIZE(generalizedMonitor);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableEVBracketLock, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxFrameNum, alignment)
    if (result)
    {
        result = generalizedMonitor.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(enable3HDRSnapshot);
    PARAMETER_INITIALIZE(frameCounterEnter);
    PARAMETER_INITIALIZE(generalizedMonitor);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable3HDRSnapshot, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, frameCounterEnter, alignment)
    if (result)
    {
        result = generalizedMonitor.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(enableQLLSnapshot);
    PARAMETER_INITIALIZE(enforceQLLSetting);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableQLLSnapshot, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enforceQLLSetting, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(enableYHistStretch);
    PARAMETER_INITIALIZE(tempFilterStrength);
    PARAMETER_INITIALIZE(clampValue);
    PARAMETER_INITIALIZE(scalingValue);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableYHistStretch, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, tempFilterStrength, alignment)
    if (result)
    {
        result = clampValue.Load(entry, alignment);
    }
    if (result)
    {
        result = scalingValue.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(enableLLS);
    PARAMETER_INITIALIZE(LLSLuxHysteresis);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableLLS, alignment)
    if (result)
    {
        result = LLSLuxHysteresis.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(flashLuxTrigger);
    PARAMETER_INITIALIZE(flashFDReqestDelayLuxTrigger);
    PARAMETER_INITIALIZE(enableForceAFInLEDOnMode);

    result = flashLuxTrigger.Load(entry, alignment);
    if (result)
    {
        result = flashFDReqestDelayLuxTrigger.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableForceAFInLEDOnMode, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(flashFlag);
    PARAMETER_INITIALIZE(LLSFlag);
    PARAMETER_INITIALIZE(YHistStretch);
    PARAMETER_INITIALIZE(QLLFlag);

    result = flashFlag.Load(entry, alignment);
    if (result)
    {
        result = LLSFlag.Load(entry, alignment);
    }
    if (result)
    {
        result = YHistStretch.Load(entry, alignment);
    }
    if (result)
    {
        result = QLLFlag.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(moduleID);
    PARAMETER_INITIALIZE(flagMonitor);
    PARAMETER_INITIALIZE(monitor3HDRSnapshot);
    PARAMETER_INITIALIZE(monitorEVBracketLock);
    PARAMETER_INITIALIZE(verboseDebugDataEnable);

    result = module_version.Load(entry, alignment);
    if (result)
    {
        result = parameter_version.Load(entry, alignment);
    }
    if (result)
    {
        result = aecxglobalelements::ReadEnum_AECXModuleIDType(entry, moduleID, alignment);
    }
    if (result)
    {
        result = flagMonitor.Load(entry, alignment);
    }
    if (result)
    {
        result = monitor3HDRSnapshot.Load(entry, alignment);
    }
    if (result)
    {
        result = monitorEVBracketLock.Load(entry, alignment);
    }
    if (result)
    {
        result = verboseDebugDataEnable.Load(entry, alignment);
    }

    return result;
}

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

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

    PARAMETER_INITIALIZE(Metering);
    PARAMETER_INITIALIZE(StatsList);

    SYMBOL_TABLE_ENTRY_READ(entry, result, Metering, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, StatsList, alignment)

    return result;
}

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload ExtensionMonitorEVBracketLock
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ExtensionMonitorEVBracketLock::Unload(ParameterFileSymbolTable* const __table)
{
    generalizedMonitor.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload ExtensionMonitor3HDRSnapshot
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ExtensionMonitor3HDRSnapshot::Unload(ParameterFileSymbolTable* const __table)
{
    generalizedMonitor.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECXExtensionType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECXExtensionType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
    monitor3HDRSnapshot.Unload(__table);
    monitorEVBracketLock.Unload(__table);
}

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

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

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

    return (ParameterModule*)cls;
}

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

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

AECXEXTENSION_NAMESPACE_END
