////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
// All rights reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// THIS IS AUTO-GENERATED CODE.  PLEASE DO NOT EDIT (File bug reports against tools).
///
/// Auto-generated by: Parameter Parser V7.4.1 (8cca6579792b9fcef3bc725ff070c5ec453c7c85)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

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

#include "aonaec.h"
#include "parametersetmanager.h"

AONAEC_NAMESPACE_BEGIN

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

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

    if (PARAMETER_STRCMP(__name, "gain") == 0)
    {
        ParameterUtils::DoubleToString((double)gain, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "expTime") == 0)
    {
        ParameterUtils::DoubleToString((double)expTime, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "incrementPriority") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)incrementPriority, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "expIndex") == 0)
    {
        ParameterUtils::DoubleToString((double)expIndex, __value, __size);
        __result = true;
    }

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "gain") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            gain = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "expTime") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            expTime = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "incrementPriority") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            incrementPriority = (AECExpIncPrioType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "expIndex") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            expIndex = (float)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

    return __result;
}

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

    return __result;
}

bool AONAECCoreArbitrationType::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, "expKneeEntries") == 0)
    {
        __result = expKneeEntries.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "digitalGain") == 0)
    {
        __result = digitalGain.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "antibandingmode") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            antibandingmode = (AntiBandingModeType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "StartUpExpIndexMap") == 0)
    {
        __result = StartUpExpIndexMap.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "startUpExpTableIndex") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            startUpExpTableIndex = (INT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "weight") == 0)
    {
        if (__index < weightCount)
        {
            ParameterUtils::DoubleToString((double)weight[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < weightCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)weight[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "weight") == 0)
    {
        if (__index < weightCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                weight[__index] = (float)dblValue; 
            }
        }
        else
        {
            const SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __valuePos = 0;

            __index = 0;
            while (__valuePos < __valueLen && __index < weightCount)
            {
                CHAR __valueStr[MAX_SIZE];

                __valuePos += ParameterUtils::GetSubString(&__value[__valuePos], ',', __valueStr, MAX_SIZE);
                __valuePos++;

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    weight[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }

    return __result;
}

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

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

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

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "weight") == 0)
    {
        if (__index < weightFixedCount)
        {
            ParameterUtils::DoubleToString((double)weight[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < weightFixedCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)weight[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "weight") == 0)
    {
        if (__index < weightFixedCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                weight[__index] = (float)dblValue; 
            }
        }
        else
        {
            const SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __valuePos = 0;

            __index = 0;
            while (__valuePos < __valueLen && __index < weightFixedCount)
            {
                CHAR __valueStr[MAX_SIZE];

                __valuePos += ParameterUtils::GetSubString(&__value[__valuePos], ',', __valueStr, MAX_SIZE);
                __valuePos++;

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    weight[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }

    return __result;
}

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

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

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

    return __result;
}

bool AONAECCoreMeteringType::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, "lumaWeight") == 0)
    {
        __result = lumaWeight.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "meteringTable") == 0)
    {
        __result = meteringTable.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "dynamicWeight") == 0)
    {
        __result = dynamicWeight.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "roiWeight") == 0)
    {
        ParameterUtils::DoubleToString((double)roiWeight, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "target") == 0)
    {
        __result = target.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "luxIndexConvFactor") == 0)
    {
        ParameterUtils::DoubleToString((double)luxIndexConvFactor, __value, __size);
        __result = true;
    }

    return __result;
}

bool AONAECCoreMeteringType::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, "lumaWeight") == 0)
    {
        __result = lumaWeight.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "meteringTable") == 0)
    {
        __result = meteringTable.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "dynamicWeight") == 0)
    {
        __result = dynamicWeight.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "roiWeight") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            roiWeight = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "target") == 0)
    {
        __result = target.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "luxIndexConvFactor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            luxIndexConvFactor = (float)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

    return __result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AONAECCoreTuningTypeClass::AONAECCoreTuningTypeClass(
    const CHAR* name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(metering);
    PARAMETER_INITIALIZE(convergence);
    PARAMETER_INITIALIZE(arbitration);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AONAECCoreTuningTypeClass::AONAECCoreTuningTypeClass(
    const CHAR*       name,
    ModuleData* const moduleData)
    : ParameterModule(name, MAJOR, MINOR, PATCH, moduleData)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(metering);
    PARAMETER_INITIALIZE(convergence);
    PARAMETER_INITIALIZE(arbitration);
}

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


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load ExpTableUnit
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ExpTableUnit::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(gain);
    PARAMETER_INITIALIZE(expTime);
    PARAMETER_INITIALIZE(incrementPriority);
    PARAMETER_INITIALIZE(expIndex);

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

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

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

        localParams.NameHash = 0xb6319f731f23430c;
        entry->ReadSimpleTypeFixedArray(&gain, 1, localParams);
        localParams.NameHash = 0xbc9e1d8198d41a44;
        entry->ReadSimpleTypeFixedArray(&expTime, 1, localParams);
        localParams.NameHash = 0xb832139a7724de59;
        entry->ReadEnumFixedArray(&incrementPriority, 1, localParams);
        localParams.NameHash = 0xb16df62887dea6d4;
        entry->ReadSimpleTypeFixedArray(&expIndex, 1, localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load TuningExpTableType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void TuningExpTableType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(kneeCount);
    PARAMETER_INITIALIZE(knee);

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

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

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

        localParams.NameHash = 0xf776e35fe38784bf;
        entry->ReadStructureArray(knee, kneeCount, kneeID, 1, localParams, __COUNTER__);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load StartEndType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void StartEndType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(start);
    PARAMETER_INITIALIZE(end);

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

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

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

        localParams.NameHash = 0xb66cc2e0745d14d1;
        entry->ReadSimpleTypeFixedArray(&start, 1, localParams);
        localParams.NameHash = 0xb70a3330100fb825;
        entry->ReadSimpleTypeFixedArray(&end, 1, localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load TwoLevelTriggerSystemLevel2Type
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void TwoLevelTriggerSystemLevel2Type::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(trigger);
    PARAMETER_INITIALIZE(data);

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

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

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

        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0x9d162d4c268294aa;
        trigger.Load(localParams);
        localParams.NameHash = 0x8c93b82417321453;
        entry->ReadSimpleTypeFixedArray(&data, 1, localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load LUTLevel1
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void LUTLevel1::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(trigger1Count);
    PARAMETER_INITIALIZE(trigger1);

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

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

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

        localParams.NameHash = 0x96e6903e42b8a528;
        entry->ReadStructureArray(trigger1, trigger1Count, trigger1ID, 1, localParams, __COUNTER__);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load AONAECCoreArbitrationType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AONAECCoreArbitrationType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(expKneeEntries);
    PARAMETER_INITIALIZE(digitalGain);
    PARAMETER_INITIALIZE(antibandingmode);
    PARAMETER_INITIALIZE(StartUpExpIndexMap);
    PARAMETER_INITIALIZE(startUpExpTableIndex);

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

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

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

        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0xf6577403ad33af77;
        expKneeEntries.Load(localParams);
        localParams.NameHash        = 0xf65c7a7a27ea67d8;
        digitalGain.Load(localParams);
        localParams.NameHash = 0xb0e641c07b39637b;
        entry->ReadEnumFixedArray(&antibandingmode, 1, localParams);
        localParams.NameHash        = 0xdbc412cc62d3a4f2;
        StartUpExpIndexMap.Load(localParams);
        localParams.NameHash = 0xf5d52e7c728f2ddd;
        entry->ReadSimpleTypeFixedArray(&startUpExpTableIndex, 1, localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load AONAECCoreConvergenceType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AONAECCoreConvergenceType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(speed);
    PARAMETER_INITIALIZE(tolerance);
    PARAMETER_INITIALIZE(settleCntTh);

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

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

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

        localParams.NameHash = 0xbcce893f85a50f83;
        entry->ReadSimpleTypeFixedArray(&speed, 1, localParams);
        localParams.NameHash = 0xb52eb6377e17e22a;
        entry->ReadSimpleTypeFixedArray(&tolerance, 1, localParams);
        localParams.NameHash = 0xbe0c34c046e16ae4;
        entry->ReadSimpleTypeFixedArray(&settleCntTh, 1, localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load TwoLevelTriggerSystemLevel1Type
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void TwoLevelTriggerSystemLevel1Type::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(trigger);
    PARAMETER_INITIALIZE(triggerDataCount);
    PARAMETER_INITIALIZE(triggerData);

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

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

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

        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0x9d162d4c268294aa;
        trigger.Load(localParams);
        localParams.NameHash = 0xd5dc9fcb428af073;
        entry->ReadStructureArray(triggerData, triggerDataCount, triggerDataID, 1, localParams, __COUNTER__);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load LUT
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void LUT::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(trigger1Count);
    PARAMETER_INITIALIZE(trigger1);

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

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

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

        localParams.NameHash = 0x96e6903e42b8a528;
        entry->ReadStructureArray(trigger1, trigger1Count, trigger1ID, 1, localParams, __COUNTER__);

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

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

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

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

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

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

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

        localParams.NameHash = 0xbe059318b040bcf4;
        entry->ReadSimpleTypeArray(weight, weightCount, weightID, 1,
            localParams, __COUNTER__);

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

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

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

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

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

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

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

        localParams.NameHash = 0xbe059318b040bcf4;
        entry->ReadSimpleTypeFixedArray<float>(weight, weightFixedCount,
            localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load AONAECCoreMeteringType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AONAECCoreMeteringType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(lumaWeight);
    PARAMETER_INITIALIZE(meteringTable);
    PARAMETER_INITIALIZE(dynamicWeight);
    PARAMETER_INITIALIZE(roiWeight);
    PARAMETER_INITIALIZE(target);
    PARAMETER_INITIALIZE(luxIndexConvFactor);

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

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

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

        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0x8d6a01ecaa0b22e5;
        lumaWeight.Load(localParams);
        localParams.NameHash        = 0xf75d224fdbecd2cb;
        meteringTable.Load(localParams);
        localParams.NameHash        = 0x854fed26b475afb5;
        dynamicWeight.Load(localParams);
        localParams.NameHash = 0xc75f01305f8e009e;
        entry->ReadSimpleTypeFixedArray(&roiWeight, 1, localParams);
        localParams.NameHash        = 0x8dd1a9674fb50f94;
        target.Load(localParams);
        localParams.NameHash = 0xaef323d819343f07;
        entry->ReadSimpleTypeFixedArray(&luxIndexConvFactor, 1, localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load AONAECCoreTuningType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AONAECCoreTuningType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(metering);
    PARAMETER_INITIALIZE(convergence);
    PARAMETER_INITIALIZE(arbitration);

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

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

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

        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0xe11cd9f365a2599f;
        module_version.Load(localParams);
        localParams.NameHash        = 0xca3106e199a12935;
        parameter_version.Load(localParams);
        localParams.NameHash        = 0xe9f3b693e1e58480;
        metering.Load(localParams);
        localParams.NameHash        = 0xe40138906c3971d5;
        convergence.Load(localParams);
        localParams.NameHash        = 0xc99bc4745514c0ba;
        arbitration.Load(localParams);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load LUTLevel2
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void LUTLevel2::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(trigger2Count);
    PARAMETER_INITIALIZE(trigger2);

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

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

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

        localParams.NameHash = 0xdfca2f5f5ff45926;
        entry->ReadStructureArray(trigger2, trigger2Count, trigger2ID, 1, localParams, __COUNTER__);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload TuningExpTableType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void TuningExpTableType::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, knee);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload LUTLevel1
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void LUTLevel1::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, trigger1);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AONAECCoreArbitrationType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AONAECCoreArbitrationType::Unload(ParameterFileSymbolTable* const __table)
{
    expKneeEntries.Unload(__table);
    digitalGain.Unload(__table);
    StartUpExpIndexMap.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload TwoLevelTriggerSystemLevel1Type
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void TwoLevelTriggerSystemLevel1Type::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, triggerData);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload LUT
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void LUT::Unload(ParameterFileSymbolTable* const __table)
{
    for (UINT32 i = 0; trigger1 != nullptr && i < trigger1Count; i++)
    {
        trigger1[i].Unload(__table);
    }
    ParameterFileSymbolTable::ReleaseObject(__table, trigger1);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload CenterWeightedMtrTable
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CenterWeightedMtrTable::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, weight);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AONAECCoreMeteringType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AONAECCoreMeteringType::Unload(ParameterFileSymbolTable* const __table)
{
    meteringTable.Unload(__table);
    dynamicWeight.Unload(__table);
    target.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AONAECCoreTuningType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AONAECCoreTuningType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
    metering.Unload(__table);
    arbitration.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload parameter_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AONAECCoreTuningType::parameter_versionStruct::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, revision);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload LUTLevel2
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void LUTLevel2::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, trigger2);
}

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

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

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

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

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

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

        ParameterModule* const module = defModule->Find(id);
        if (module != nullptr)
        {
            cls = (AONAECCoreTuningTypeClass*)module;
        }
        else
        {
            cls = PARAMETER_NEW AONAECCoreTuningTypeClass(Name, moduleData);
            cls->SymbolTableID = id;
            defModule->AddModule((ParameterModule*)cls);
        }
    }
    else if (Version.Value != moduleData->Version.Value)
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create AONAECCoreTuningTypeClass, binary version (%lld) does not match source version (%lld)\n",
            moduleData->Version.Value, Version.Value);
    }
    else
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create AONAECCoreTuningTypeClass, binary name hash (0x%016llx) does not match source name hash (0x%016llx)\n",
            moduleData->NameHash, NameHash);
    }

    return (ParameterModule*)cls;
}

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

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

    if (!Loaded)
    {
        AONAECCoreTuningTypeClass* const cls = this;

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

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


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

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

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

    return result;
}

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

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

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

AONAEC_NAMESPACE_END
