////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
// All Rights Reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// THIS IS AUTO-GENERATED CODE.  PLEASE DO NOT EDIT (File bug reports against tools).
///
/// Auto-generated by: Parameter Parser V5.5.1 (2411131018)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

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

#include "statsnnmlawb.h"
#include "parametersetmanager.h"

STATSNNMLAWB_NAMESPACE_BEGIN

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    // triggerPt
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("triggerPt", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "triggerPt") == 0)
    {
        __result = triggerPt.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 Level1TriggerType::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, "triggerPt") == 0)
    {
        __result = triggerPt.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 Level1TriggerType::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, "triggerPt") == 0)
    {
        __result = triggerPt.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "triggerData") == 0)
    {
        if (__index < triggerDataCount)
        {
            __result = triggerData[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

    // triggerPt
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("triggerPt", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "triggerPt") == 0)
    {
        __result = triggerPt.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 LUTTriggerType::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, "triggerPt") == 0)
    {
        __result = triggerPt.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 LUTTriggerType::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, "triggerPt") == 0)
    {
        __result = triggerPt.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "triggerData") == 0)
    {
        if (__index < triggerDataCount)
        {
            __result = triggerData[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

    // triggerPt
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("triggerPt", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "triggerPt") == 0)
    {
        __result = triggerPt.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 CorrectionThresholdType::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, "threshold") == 0)
    {
        __result = threshold.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "triggeringTypes") == 0)
    {
        if (__index < 3)
        {
            ParameterUtils::DoubleToString((double)(UINT32)triggeringTypes[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 3; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)(UINT32)triggeringTypes[i], &__value[__valuePos], (INT32)(__size - __valuePos), 0);
            }
            __result = true;
        }
    }

    return __result;
}

bool CorrectionThresholdType::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, "threshold") == 0)
    {
        __result = threshold.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "triggeringTypes") == 0)
    {
        if (__index < 3)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                triggeringTypes[__index] = (mlawbTriggerCtrlType)(UINT32)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    // triggerPt
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("triggerPt", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "triggerPt") == 0)
    {
        __result = triggerPt.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 CBTLevel1TriggerType::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, "triggerPt") == 0)
    {
        __result = triggerPt.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 CBTLevel1TriggerType::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, "triggerPt") == 0)
    {
        __result = triggerPt.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "triggerData") == 0)
    {
        if (__index < triggerDataCount)
        {
            __result = triggerData[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

    // triggerPt
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("triggerPt", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "triggerPt") == 0)
    {
        __result = triggerPt.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 ColorBasedThresholdingLUTType::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, "triggerPt") == 0)
    {
        __result = triggerPt.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 ColorBasedThresholdingLUTType::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, "triggerPt") == 0)
    {
        __result = triggerPt.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "triggerData") == 0)
    {
        if (__index < triggerDataCount)
        {
            __result = triggerData[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

    // triggerPt
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("triggerPt", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "triggerPt") == 0)
    {
        __result = triggerPt.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 ColorBasedThresholdingType::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, "enableFlag") == 0)
    {
        ParameterUtils::DoubleToString((double)enableFlag, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "LUTSize") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)LUTSize, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "CBTTable") == 0)
    {
        __result = CBTTable.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "triggerType") == 0)
    {
        if (__index < 3)
        {
            ParameterUtils::DoubleToString((double)(UINT32)triggerType[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 3; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)(UINT32)triggerType[i], &__value[__valuePos], (INT32)(__size - __valuePos), 0);
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "coordinates") == 0)
    {
        __result = coordinates.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool ColorBasedThresholdingType::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, "enableFlag") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableFlag = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "LUTSize") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            LUTSize = (LUTSizeType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "CBTTable") == 0)
    {
        __result = CBTTable.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "triggerType") == 0)
    {
        if (__index < 3)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                triggerType[__index] = (mlawbTriggerCtrlType)(UINT32)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    triggerType[__index] = (mlawbTriggerCtrlType)(UINT32)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "coordinates") == 0)
    {
        __result = coordinates.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

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

    return __result;
}

bool chromatixStatsNNMLAWBType::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, "enable") == 0)
    {
        ParameterUtils::DoubleToString((double)enable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "infProcessLevel") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)infProcessLevel, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "selectHW") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)selectHW, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "selectInfEngine") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)selectInfEngine, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "downscaleStepX") == 0)
    {
        ParameterUtils::DoubleToString((double)downscaleStepX, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "downscaleStepY") == 0)
    {
        ParameterUtils::DoubleToString((double)downscaleStepY, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "gainMap") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)gainMap, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "gainMapUpscale") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)gainMapUpscale, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "CorrectionThresholds") == 0)
    {
        __result = CorrectionThresholds.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "frameRateLevel") == 0)
    {
        ParameterUtils::DoubleToString((double)frameRateLevel, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "colorBasedThresholding") == 0)
    {
        __result = colorBasedThresholding.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "extensionParam") == 0)
    {
        if (__index < extensionParamCount)
        {
            __result = extensionParam[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool chromatixStatsNNMLAWBType::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, "enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enable = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "infProcessLevel") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            infProcessLevel = (statsnncommon::chromatixStatsNNInfProcessLevel)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "selectHW") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            selectHW = (statsnncommon::chromatixStatsNNHW)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "selectInfEngine") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            selectInfEngine = (statsnncommon::chromatixStatsNNInfEngine)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "downscaleStepX") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            downscaleStepX = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "downscaleStepY") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            downscaleStepY = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "gainMap") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            gainMap = (GainMapType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "gainMapUpscale") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            gainMapUpscale = (GainMapUpscaleType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "CorrectionThresholds") == 0)
    {
        __result = CorrectionThresholds.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "frameRateLevel") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            frameRateLevel = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "colorBasedThresholding") == 0)
    {
        __result = colorBasedThresholding.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "extensionParam") == 0)
    {
        if (__index < extensionParamCount)
        {
            __result = extensionParam[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(GainMapType::NonUniformMap):
            enumValue = GainMapType::NonUniformMap;
            result    = true;
            break;
        case static_cast<UINT32>(GainMapType::UniformMapLowCorrection):
            enumValue = GainMapType::UniformMapLowCorrection;
            result    = true;
            break;
        case static_cast<UINT32>(GainMapType::UniformMapHighCorrection):
            enumValue = GainMapType::UniformMapHighCorrection;
            result    = true;
            break;
        case static_cast<UINT32>(GainMapType::UniformMapAvgCorrection):
            enumValue = GainMapType::UniformMapAvgCorrection;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to GainMapType", uintValue);
            break;
        }
    }
    return result;
}

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

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

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

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

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(mlawbTriggerCtrlType::TriggerCtrlLuxIdx):
            enumValue = mlawbTriggerCtrlType::TriggerCtrlLuxIdx;
            result    = true;
            break;
        case static_cast<UINT32>(mlawbTriggerCtrlType::TriggerCtrlCCT):
            enumValue = mlawbTriggerCtrlType::TriggerCtrlCCT;
            result    = true;
            break;
        case static_cast<UINT32>(mlawbTriggerCtrlType::TriggerCtrlAgwRg):
            enumValue = mlawbTriggerCtrlType::TriggerCtrlAgwRg;
            result    = true;
            break;
        case static_cast<UINT32>(mlawbTriggerCtrlType::TriggerCtrlAgwBg):
            enumValue = mlawbTriggerCtrlType::TriggerCtrlAgwBg;
            result    = true;
            break;
        case static_cast<UINT32>(mlawbTriggerCtrlType::TriggerCtrlFlashSensitivity):
            enumValue = mlawbTriggerCtrlType::TriggerCtrlFlashSensitivity;
            result    = true;
            break;
        case static_cast<UINT32>(mlawbTriggerCtrlType::TriggerCtrlADRC):
            enumValue = mlawbTriggerCtrlType::TriggerCtrlADRC;
            result    = true;
            break;
        case static_cast<UINT32>(mlawbTriggerCtrlType::TriggerCtrlTypeMax):
            enumValue = mlawbTriggerCtrlType::TriggerCtrlTypeMax;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to mlawbTriggerCtrlType", uintValue);
            break;
        }
    }
    return result;
}

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

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(LUTSizeType::Size6x6):
            enumValue = LUTSizeType::Size6x6;
            result    = true;
            break;
        case static_cast<UINT32>(LUTSizeType::Size8x8):
            enumValue = LUTSizeType::Size8x8;
            result    = true;
            break;
        case static_cast<UINT32>(LUTSizeType::Size10x10):
            enumValue = LUTSizeType::Size10x10;
            result    = true;
            break;
        case static_cast<UINT32>(LUTSizeType::Size12x12):
            enumValue = LUTSizeType::Size12x12;
            result    = true;
            break;
        case static_cast<UINT32>(LUTSizeType::Size16x16):
            enumValue = LUTSizeType::Size16x16;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to LUTSizeType", uintValue);
            break;
        }
    }
    return result;
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
chromatixStatsNNMLAWBTypeClass::chromatixStatsNNMLAWBTypeClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(infProcessLevel);
    PARAMETER_INITIALIZE(selectHW);
    PARAMETER_INITIALIZE(selectInfEngine);
    PARAMETER_INITIALIZE(downscaleStepX);
    PARAMETER_INITIALIZE(downscaleStepY);
    PARAMETER_INITIALIZE(gainMap);
    PARAMETER_INITIALIZE(gainMapUpscale);
    PARAMETER_INITIALIZE(CorrectionThresholds);
    PARAMETER_INITIALIZE(frameRateLevel);
    PARAMETER_INITIALIZE(colorBasedThresholding);
    PARAMETER_INITIALIZE(extensionParamCount);
    PARAMETER_INITIALIZE(extensionParam);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
chromatixStatsNNMLAWBTypeClass::chromatixStatsNNMLAWBTypeClass(
    const CHAR* const name,
    ModuleData* const moduleData)
    : ParameterModule(name, MAJOR, MINOR, PATCH, moduleData)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(infProcessLevel);
    PARAMETER_INITIALIZE(selectHW);
    PARAMETER_INITIALIZE(selectInfEngine);
    PARAMETER_INITIALIZE(downscaleStepX);
    PARAMETER_INITIALIZE(downscaleStepY);
    PARAMETER_INITIALIZE(gainMap);
    PARAMETER_INITIALIZE(gainMapUpscale);
    PARAMETER_INITIALIZE(CorrectionThresholds);
    PARAMETER_INITIALIZE(frameRateLevel);
    PARAMETER_INITIALIZE(colorBasedThresholding);
    PARAMETER_INITIALIZE(extensionParam);
}

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

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

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

    PARAMETER_INITIALIZE(minCorrectionThreshold);
    PARAMETER_INITIALIZE(maxCorrectionThreshold);
    PARAMETER_INITIALIZE(totalCorrectionStrength);

    SYMBOL_TABLE_ENTRY_READ(entry, result, minCorrectionThreshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxCorrectionThreshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, totalCorrectionStrength, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(triggerPt);
    PARAMETER_INITIALIZE(triggerData);

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

    return result;
}

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

    PARAMETER_INITIALIZE(triggerPt);
    PARAMETER_INITIALIZE(triggerData);

    result = triggerPt.Load(entry, alignment);

    // Reading Array triggerData from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        triggerDataCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, triggerDataCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            triggerDataID = pointerEntry->ID;
            DupObjInfo* triggerDataDupInfo = pointerEntry->GetDupObject(triggerDataCount, file, line);
            if (triggerDataDupInfo != nullptr && triggerDataDupInfo->Object != nullptr)
            {
                triggerData = (Level3TriggerType*)triggerDataDupInfo->Object;
                if (triggerData == nullptr)
                {
                    if (triggerDataDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "triggerData duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            triggerDataDupInfo->File, triggerDataDupInfo->Line, triggerDataDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "triggerData duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            triggerDataDupInfo->Line, triggerDataDupInfo->RefCount);
                    }
                }
            }

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

    return result;
}

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

    PARAMETER_INITIALIZE(triggerPt);
    PARAMETER_INITIALIZE(triggerData);

    result = triggerPt.Load(entry, alignment);

    // Reading Array triggerData from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        triggerDataCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, triggerDataCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            triggerDataID = pointerEntry->ID;
            DupObjInfo* triggerDataDupInfo = pointerEntry->GetDupObject(triggerDataCount, file, line);
            if (triggerDataDupInfo != nullptr && triggerDataDupInfo->Object != nullptr)
            {
                triggerData = (Level2TriggerType*)triggerDataDupInfo->Object;
                if (triggerData == nullptr)
                {
                    if (triggerDataDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "triggerData duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            triggerDataDupInfo->File, triggerDataDupInfo->Line, triggerDataDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "triggerData duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            triggerDataDupInfo->Line, triggerDataDupInfo->RefCount);
                    }
                }
            }

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

    return result;
}

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

    PARAMETER_INITIALIZE(triggerPt);
    PARAMETER_INITIALIZE(triggerData);

    result = triggerPt.Load(entry, alignment);

    // Reading Array triggerData from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        triggerDataCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, triggerDataCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            triggerDataID = pointerEntry->ID;
            DupObjInfo* triggerDataDupInfo = pointerEntry->GetDupObject(triggerDataCount, file, line);
            if (triggerDataDupInfo != nullptr && triggerDataDupInfo->Object != nullptr)
            {
                triggerData = (Level1TriggerType*)triggerDataDupInfo->Object;
                if (triggerData == nullptr)
                {
                    if (triggerDataDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "triggerData duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            triggerDataDupInfo->File, triggerDataDupInfo->Line, triggerDataDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "triggerData duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            triggerDataDupInfo->Line, triggerDataDupInfo->RefCount);
                    }
                }
            }

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

    return result;
}

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

    PARAMETER_INITIALIZE(threshold);
    PARAMETER_INITIALIZE(triggeringTypes);

    result = threshold.Load(entry, alignment);
    for (UINT32 i = 0; result && i < 3; i++)
    {
        if (result)
        {
            result = statsnnmlawb::ReadEnum_mlawbTriggerCtrlType(entry, triggeringTypes[i], alignment);
        }
    }

    return result;
}

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

    PARAMETER_INITIALIZE(CBTValue);

    result = entry->ReadArray(CBTValue, 256, alignment);

    return result;
}

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

    PARAMETER_INITIALIZE(triggerPt);
    PARAMETER_INITIALIZE(triggerData);

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

    return result;
}

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

    PARAMETER_INITIALIZE(triggerPt);
    PARAMETER_INITIALIZE(triggerData);

    result = triggerPt.Load(entry, alignment);

    // Reading Array triggerData from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        triggerDataCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, triggerDataCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            triggerDataID = pointerEntry->ID;
            DupObjInfo* triggerDataDupInfo = pointerEntry->GetDupObject(triggerDataCount, file, line);
            if (triggerDataDupInfo != nullptr && triggerDataDupInfo->Object != nullptr)
            {
                triggerData = (CBTLevel3TriggerType*)triggerDataDupInfo->Object;
                if (triggerData == nullptr)
                {
                    if (triggerDataDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "triggerData duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            triggerDataDupInfo->File, triggerDataDupInfo->Line, triggerDataDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "triggerData duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            triggerDataDupInfo->Line, triggerDataDupInfo->RefCount);
                    }
                }
            }

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

    return result;
}

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

    PARAMETER_INITIALIZE(triggerPt);
    PARAMETER_INITIALIZE(triggerData);

    result = triggerPt.Load(entry, alignment);

    // Reading Array triggerData from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        triggerDataCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, triggerDataCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            triggerDataID = pointerEntry->ID;
            DupObjInfo* triggerDataDupInfo = pointerEntry->GetDupObject(triggerDataCount, file, line);
            if (triggerDataDupInfo != nullptr && triggerDataDupInfo->Object != nullptr)
            {
                triggerData = (CBTLevel2TriggerType*)triggerDataDupInfo->Object;
                if (triggerData == nullptr)
                {
                    if (triggerDataDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "triggerData duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            triggerDataDupInfo->File, triggerDataDupInfo->Line, triggerDataDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "triggerData duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            triggerDataDupInfo->Line, triggerDataDupInfo->RefCount);
                    }
                }
            }

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

    return result;
}

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

    PARAMETER_INITIALIZE(triggerPt);
    PARAMETER_INITIALIZE(triggerData);

    result = triggerPt.Load(entry, alignment);

    // Reading Array triggerData from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        triggerDataCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, triggerDataCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            triggerDataID = pointerEntry->ID;
            DupObjInfo* triggerDataDupInfo = pointerEntry->GetDupObject(triggerDataCount, file, line);
            if (triggerDataDupInfo != nullptr && triggerDataDupInfo->Object != nullptr)
            {
                triggerData = (CBTLevel1TriggerType*)triggerDataDupInfo->Object;
                if (triggerData == nullptr)
                {
                    if (triggerDataDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "triggerData duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            triggerDataDupInfo->File, triggerDataDupInfo->Line, triggerDataDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "triggerData duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            triggerDataDupInfo->Line, triggerDataDupInfo->RefCount);
                    }
                }
            }

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

    return result;
}

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

    PARAMETER_INITIALIZE(enableFlag);
    PARAMETER_INITIALIZE(LUTSize);
    PARAMETER_INITIALIZE(CBTTable);
    PARAMETER_INITIALIZE(triggerType);
    PARAMETER_INITIALIZE(coordinates);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableFlag, alignment)
    if (result)
    {
        result = statsnnmlawb::ReadEnum_LUTSizeType(entry, LUTSize, alignment);
    }
    if (result)
    {
        result = CBTTable.Load(entry, alignment);
    }
    for (UINT32 i = 0; result && i < 3; i++)
    {
        if (result)
        {
            result = statsnnmlawb::ReadEnum_mlawbTriggerCtrlType(entry, triggerType[i], alignment);
        }
    }
    if (result)
    {
        result = coordinates.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(topLeft);
    PARAMETER_INITIALIZE(bottomRight);

    result = topLeft.Load(entry, alignment);
    if (result)
    {
        result = bottomRight.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load ColorBasedThresholdingType_coordinatesStruct_topLeftStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ColorBasedThresholdingType::coordinatesStruct::topLeftStruct::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(u);
    PARAMETER_INITIALIZE(v);

    SYMBOL_TABLE_ENTRY_READ(entry, result, u, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, v, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load ColorBasedThresholdingType_coordinatesStruct_bottomRightStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ColorBasedThresholdingType::coordinatesStruct::bottomRightStruct::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(u);
    PARAMETER_INITIALIZE(v);

    SYMBOL_TABLE_ENTRY_READ(entry, result, u, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, v, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(infProcessLevel);
    PARAMETER_INITIALIZE(selectHW);
    PARAMETER_INITIALIZE(selectInfEngine);
    PARAMETER_INITIALIZE(downscaleStepX);
    PARAMETER_INITIALIZE(downscaleStepY);
    PARAMETER_INITIALIZE(gainMap);
    PARAMETER_INITIALIZE(gainMapUpscale);
    PARAMETER_INITIALIZE(CorrectionThresholds);
    PARAMETER_INITIALIZE(frameRateLevel);
    PARAMETER_INITIALIZE(colorBasedThresholding);
    PARAMETER_INITIALIZE(extensionParam);

    result = module_version.Load(entry, alignment);
    if (result)
    {
        result = parameter_version.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)
    if (result)
    {
        result = statsnncommon::ReadEnum_chromatixStatsNNInfProcessLevel(entry, infProcessLevel, alignment);
    }
    if (result)
    {
        result = statsnncommon::ReadEnum_chromatixStatsNNHW(entry, selectHW, alignment);
    }
    if (result)
    {
        result = statsnncommon::ReadEnum_chromatixStatsNNInfEngine(entry, selectInfEngine, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, downscaleStepX, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, downscaleStepY, alignment)
    if (result)
    {
        result = statsnnmlawb::ReadEnum_GainMapType(entry, gainMap, alignment);
    }
    if (result)
    {
        result = statsnnmlawb::ReadEnum_GainMapUpscaleType(entry, gainMapUpscale, alignment);
    }
    if (result)
    {
        result = CorrectionThresholds.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, frameRateLevel, alignment)
    if (result)
    {
        result = colorBasedThresholding.Load(entry, alignment);
    }

    // Reading Array extensionParam from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        extensionParamCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, extensionParamCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            extensionParamID = pointerEntry->ID;
            DupObjInfo* extensionParamDupInfo = pointerEntry->GetDupObject(extensionParamCount, file, line);
            if (extensionParamDupInfo != nullptr && extensionParamDupInfo->Object != nullptr)
            {
                extensionParam = (statsglobalelements::statsExtensionParamType*)extensionParamDupInfo->Object;
                if (extensionParam == nullptr)
                {
                    if (extensionParamDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "extensionParam duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            extensionParamDupInfo->File, extensionParamDupInfo->Line, extensionParamDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "extensionParam duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            extensionParamDupInfo->Line, extensionParamDupInfo->RefCount);
                    }
                }
            }

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

    return result;
}

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

    PARAMETER_INITIALIZE(major_revision);
    PARAMETER_INITIALIZE(minor_revision);
    PARAMETER_INITIALIZE(incr_revision);

    SYMBOL_TABLE_ENTRY_READ(entry, result, major_revision, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, minor_revision, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, incr_revision, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(revision);


    // Reading String revision from symbol table
    {
        UINT32 count = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, count, alignment)
        ParameterFileSymbolTableEntry stringPointerEntryCls;
        ParameterFileSymbolTableEntry* const stringPointerEntry = &stringPointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(stringPointerEntryCls, entry, alignment);
        }
        SYMBOL_TABLE_ENTRY_READ_STRING(stringPointerEntry, result, revision, count, alignment)
    }

    return result;
}

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload CorrectionThresholdType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CorrectionThresholdType::Unload(ParameterFileSymbolTable* const __table)
{
    threshold.Unload(__table);
}

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload ColorBasedThresholdingType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ColorBasedThresholdingType::Unload(ParameterFileSymbolTable* const __table)
{
    CBTTable.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixStatsNNMLAWBType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixStatsNNMLAWBType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
    CorrectionThresholds.Unload(__table);
    colorBasedThresholding.Unload(__table);
    for (UINT32 i = 0; i < extensionParamCount; i++)
    {
        extensionParam[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(extensionParam))
    {
        PARAMETER_DELETE[] extensionParam;
    }
    extensionParam = nullptr;
}

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

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

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

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

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

        ParameterModule* const module = defModule->Find(id);
        if (module != nullptr)
        {
            cls = (chromatixStatsNNMLAWBTypeClass*)module;
        }
        else
        {
            cls = PARAMETER_NEW chromatixStatsNNMLAWBTypeClass(GetName(moduleData->Type), moduleData);
            cls->SymbolTableID = id;
            defModule->AddModule((ParameterModule*)cls);
        }
    }
    else if (Version.Value != moduleData->Version.Value)
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create chromatixStatsNNMLAWBTypeClass, binary version (%lld) does not match source version (%lld)\n",
            moduleData->Version.Value, Version.Value);
    }
    else
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create chromatixStatsNNMLAWBTypeClass, binary name (%s) does not match source name (%s)\n",
            moduleData->Type, Type);
    }

    return (ParameterModule*)cls;
}

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

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

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

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

        if (result)
        {
            result = cls->Load(entry, alignment);
        }
        Modified++;
        Loaded = true;
    }

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

    return result;
}

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

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

STATSNNMLAWB_NAMESPACE_END
