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

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

#include "modscconvv1.h"
#include "parametersetmanager.h"

MODSCCONVV1_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool modSmartSCDThrDataType::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 modSmartSCDThrDataType::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 modSmartSCDThrDataType::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 FIRFilterConfigType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

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

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

    return __result;
}

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

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

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

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

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

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

    return __result;
}

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

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

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

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    coeffInput[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "samplesOutput") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            samplesOutput = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "coeffOutput") == 0)
    {
        if (__index < coeffOutputCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                coeffOutput[__index] = (float)dblValue; 
            }
        }
        else
        {
            const SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __valuePos = 0;

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

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

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

    return __result;
}

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

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

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

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

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

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

    return __result;
}

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

    return __result;
}

bool FilterConfigType::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, "type") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            type = (awbFilterType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "fir") == 0)
    {
        __result = fir.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "iir") == 0)
    {
        __result = iir.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "median") == 0)
    {
        __result = median.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "type") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)type, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "fixedBaselineEn") == 0)
    {
        ParameterUtils::DoubleToString((double)fixedBaselineEn, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "fixedBaselineValue") == 0)
    {
        ParameterUtils::DoubleToString((double)fixedBaselineValue, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "triggerTh") == 0)
    {
        ParameterUtils::DoubleToString((double)triggerTh, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "consCountTh") == 0)
    {
        ParameterUtils::DoubleToString((double)consCountTh, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "postSCDFramesTh") == 0)
    {
        ParameterUtils::DoubleToString((double)postSCDFramesTh, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "postSCDStableTh") == 0)
    {
        ParameterUtils::DoubleToString((double)postSCDStableTh, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "holdTime") == 0)
    {
        ParameterUtils::DoubleToString((double)holdTime, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "strictHoldTime") == 0)
    {
        ParameterUtils::DoubleToString((double)strictHoldTime, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "postSCDStableTypeAbs") == 0)
    {
        ParameterUtils::DoubleToString((double)postSCDStableTypeAbs, __value, __size, 0);
        __result = true;
    }

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "type") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            type = (awbSCDTriggerType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "fixedBaselineEn") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            fixedBaselineEn = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "fixedBaselineValue") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            fixedBaselineValue = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "triggerTh") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            triggerTh = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "consCountTh") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            consCountTh = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "postSCDFramesTh") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            postSCDFramesTh = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "postSCDStableTh") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            postSCDStableTh = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "holdTime") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            holdTime = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "strictHoldTime") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            strictHoldTime = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "postSCDStableTypeAbs") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            postSCDStableTypeAbs = (BOOL)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

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

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

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

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

    return __result;
}

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

    return __result;
}

bool SceneChangeDetectorConfigType::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, "Aggregate") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            Aggregate = (awbAggregateType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "filterDetector") == 0)
    {
        if (__index < filterDetectorCount)
        {
            __result = filterDetector[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

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

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

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "slowConvReduceFactor") == 0)
    {
        ParameterUtils::DoubleToString((double)slowConvReduceFactor, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "fastConvBoostFactor") == 0)
    {
        ParameterUtils::DoubleToString((double)fastConvBoostFactor, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "fastConvergePercTh") == 0)
    {
        ParameterUtils::DoubleToString((double)fastConvergePercTh, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "waitFramesBeforeSCStart") == 0)
    {
        ParameterUtils::DoubleToString((double)waitFramesBeforeSCStart, __value, __size, 0);
        __result = true;
    }

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "slowConvReduceFactor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            slowConvReduceFactor = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "fastConvBoostFactor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            fastConvBoostFactor = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "fastConvergePercTh") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            fastConvergePercTh = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "waitFramesBeforeSCStart") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            waitFramesBeforeSCStart = (INT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

    return __result;
}

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

    return __result;
}

bool SmartSCDType::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, "SmartSCDEn") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            SmartSCDEn = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "SmartSCDSampling") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            SmartSCDSampling = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "DeltaEColorChangeThr") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            DeltaEColorChangeThr = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "TempFoVChangeRatio") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            TempFoVChangeRatio = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "FinalSmartSCDThreshold") == 0)
    {
        __result = FinalSmartSCDThreshold.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

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

    return __result;
}

bool chromatixSCConvV1Type::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, "moduleID") == 0)
    {
        __result = moduleID.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_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, "detector") == 0)
    {
        __result = detector.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "converge") == 0)
    {
        __result = converge.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "smartconverge") == 0)
    {
        __result = smartconverge.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool chromatixSCConvV1Type::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, "moduleID") == 0)
    {
        __result = moduleID.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_version.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enable = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "detector") == 0)
    {
        __result = detector.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "converge") == 0)
    {
        __result = converge.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "smartconverge") == 0)
    {
        __result = smartconverge.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

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

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

    return __result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
chromatixSCConvV1TypeClass::chromatixSCConvV1TypeClass(
    const CHAR* name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(moduleID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(detector);
    PARAMETER_INITIALIZE(converge);
    PARAMETER_INITIALIZE(smartconverge);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
chromatixSCConvV1TypeClass::chromatixSCConvV1TypeClass(
    const CHAR*       name,
    ModuleData* const moduleData)
    : ParameterModule(name, MAJOR, MINOR, PATCH, moduleData)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(moduleID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(detector);
    PARAMETER_INITIALIZE(converge);
    PARAMETER_INITIALIZE(smartconverge);
}

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


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load modSmartSCDThrDataType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void modSmartSCDThrDataType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(triggerPt);
    PARAMETER_INITIALIZE(triggerDataCount);
    PARAMETER_INITIALIZE(triggerData);

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

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

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

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

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FIRFilterConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void FIRFilterConfigType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(samples);
    PARAMETER_INITIALIZE(coefficientCount);
    PARAMETER_INITIALIZE(coefficient);

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

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

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

        localParams.NameHash = 0xe17e05a4e6c4eae8;
        entry->ReadSimpleTypeFixedArray(&samples, 1, localParams);
        localParams.NameHash = 0xcf574790f5576f42;
        entry->ReadSimpleTypeArray(coefficient, coefficientCount, coefficientID, 1,
            localParams, __COUNTER__);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load MedianFilterConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void MedianFilterConfigType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(samples);

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

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

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

        localParams.NameHash = 0xe17e05a4e6c4eae8;
        entry->ReadSimpleTypeFixedArray(&samples, 1, localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load IIRFilterConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void IIRFilterConfigType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(samplesInput);
    PARAMETER_INITIALIZE(coeffInputCount);
    PARAMETER_INITIALIZE(coeffInput);
    PARAMETER_INITIALIZE(samplesOutput);
    PARAMETER_INITIALIZE(coeffOutputCount);
    PARAMETER_INITIALIZE(coeffOutput);

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

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

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

        localParams.NameHash = 0x891c0d0444914fb0;
        entry->ReadSimpleTypeFixedArray(&samplesInput, 1, localParams);
        localParams.NameHash = 0xdd697e37bfb48b66;
        entry->ReadSimpleTypeArray(coeffInput, coeffInputCount, coeffInputID, 1,
            localParams, __COUNTER__);
        localParams.NameHash = 0xf72225839c376bf7;
        entry->ReadSimpleTypeFixedArray(&samplesOutput, 1, localParams);
        localParams.NameHash = 0xa11170d2049fe8cf;
        entry->ReadSimpleTypeArray(coeffOutput, coeffOutputCount, coeffOutputID, 1,
            localParams, __COUNTER__);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FilterConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void FilterConfigType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(type);
    PARAMETER_INITIALIZE(fir);
    PARAMETER_INITIALIZE(iir);
    PARAMETER_INITIALIZE(median);

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

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

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

        localParams.NameHash = 0xd7a23f43d1e0d686;
        entry->ReadEnumFixedArray(&type, 1, localParams);
        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0xfa04a8dbdff7bc97;
        fir.Load(localParams);
        localParams.NameHash        = 0xe118e815a18714bb;
        iir.Load(localParams);
        localParams.NameHash        = 0xeb953e4750eccea4;
        median.Load(localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load SCDetectorConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void SCDetectorConfigType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(type);
    PARAMETER_INITIALIZE(fixedBaselineEn);
    PARAMETER_INITIALIZE(fixedBaselineValue);
    PARAMETER_INITIALIZE(triggerTh);
    PARAMETER_INITIALIZE(consCountTh);
    PARAMETER_INITIALIZE(postSCDFramesTh);
    PARAMETER_INITIALIZE(postSCDStableTh);
    PARAMETER_INITIALIZE(holdTime);
    PARAMETER_INITIALIZE(strictHoldTime);
    PARAMETER_INITIALIZE(postSCDStableTypeAbs);

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

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

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

        localParams.NameHash = 0xd7a23f43d1e0d686;
        entry->ReadEnumFixedArray(&type, 1, localParams);
        localParams.NameHash = 0x95450d8d49a4c752;
        entry->ReadSimpleTypeFixedArray(&fixedBaselineEn, 1, localParams);
        localParams.NameHash = 0xb82d88fe85312aee;
        entry->ReadSimpleTypeFixedArray(&fixedBaselineValue, 1, localParams);
        localParams.NameHash = 0x8ca0fc6396b7c287;
        entry->ReadSimpleTypeFixedArray(&triggerTh, 1, localParams);
        localParams.NameHash = 0x9fbc7e3782a43111;
        entry->ReadSimpleTypeFixedArray(&consCountTh, 1, localParams);
        localParams.NameHash = 0xdacc59a1aa3f8719;
        entry->ReadSimpleTypeFixedArray(&postSCDFramesTh, 1, localParams);
        localParams.NameHash = 0xcda3821891d420d7;
        entry->ReadSimpleTypeFixedArray(&postSCDStableTh, 1, localParams);
        localParams.NameHash = 0xc3084eea3ee9025a;
        entry->ReadSimpleTypeFixedArray(&holdTime, 1, localParams);
        localParams.NameHash = 0xe1e78ff8542303df;
        entry->ReadSimpleTypeFixedArray(&strictHoldTime, 1, localParams);
        localParams.NameHash = 0xbb8571bb2a583f75;
        entry->ReadSimpleTypeFixedArray(&postSCDStableTypeAbs, 1, localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FilterDetectorConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void FilterDetectorConfigType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(filter);
    PARAMETER_INITIALIZE(detector);

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

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

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

        localParams.NameHash = 0xb3c00adf8e304e57;
        entry->ReadSimpleTypeFixedArray(&enable, 1, localParams);
        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0xa577a15aebfca3e6;
        filter.Load(localParams);
        localParams.NameHash        = 0xed41e408b4e54d1e;
        detector.Load(localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load SceneChangeDetectorConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void SceneChangeDetectorConfigType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(Aggregate);
    PARAMETER_INITIALIZE(filterDetectorCount);
    PARAMETER_INITIALIZE(filterDetector);

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

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

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

        localParams.NameHash = 0x811f596b74133182;
        entry->ReadEnumFixedArray(&Aggregate, 1, localParams);
        localParams.NameHash = 0xf0ee068ad6360139;
        entry->ReadStructureArray(filterDetector, filterDetectorCount, filterDetectorID, 1, localParams, __COUNTER__);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load SCConvType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void SCConvType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(slowConvReduceFactor);
    PARAMETER_INITIALIZE(fastConvBoostFactor);
    PARAMETER_INITIALIZE(fastConvergePercTh);
    PARAMETER_INITIALIZE(waitFramesBeforeSCStart);

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

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

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

        localParams.NameHash = 0xf0f455c6903d15d4;
        entry->ReadSimpleTypeFixedArray(&slowConvReduceFactor, 1, localParams);
        localParams.NameHash = 0x84829ad9807d1e37;
        entry->ReadSimpleTypeFixedArray(&fastConvBoostFactor, 1, localParams);
        localParams.NameHash = 0xe6865cea13cdbb1a;
        entry->ReadSimpleTypeFixedArray(&fastConvergePercTh, 1, localParams);
        localParams.NameHash = 0xf40290756db767d2;
        entry->ReadSimpleTypeFixedArray(&waitFramesBeforeSCStart, 1, localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load SmartSCDType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void SmartSCDType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(SmartSCDEn);
    PARAMETER_INITIALIZE(SmartSCDSampling);
    PARAMETER_INITIALIZE(DeltaEColorChangeThr);
    PARAMETER_INITIALIZE(TempFoVChangeRatio);
    PARAMETER_INITIALIZE(FinalSmartSCDThreshold);

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

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

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

        localParams.NameHash = 0xc1c0af35a14f3b75;
        entry->ReadSimpleTypeFixedArray(&SmartSCDEn, 1, localParams);
        localParams.NameHash = 0xfe037b5cabca23eb;
        entry->ReadSimpleTypeFixedArray(&SmartSCDSampling, 1, localParams);
        localParams.NameHash = 0x91a001eef688a369;
        entry->ReadSimpleTypeFixedArray(&DeltaEColorChangeThr, 1, localParams);
        localParams.NameHash = 0xb8cce547623259bb;
        entry->ReadSimpleTypeFixedArray(&TempFoVChangeRatio, 1, localParams);
        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0xd1bd44e77fdd00e5;
        FinalSmartSCDThreshold.Load(localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixSCConvV1Type
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixSCConvV1Type::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(moduleID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(detector);
    PARAMETER_INITIALIZE(converge);
    PARAMETER_INITIALIZE(smartconverge);

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

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

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

        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0xb5bb6c7a408ed007;
        moduleID.Load(localParams);
        localParams.NameHash        = 0xe11cd9f365a2599f;
        module_version.Load(localParams);
        localParams.NameHash = 0xb3c00adf8e304e57;
        entry->ReadSimpleTypeFixedArray(&enable, 1, localParams);
        localParams.NameHash        = 0xed41e408b4e54d1e;
        detector.Load(localParams);
        localParams.NameHash        = 0xd1180fb13ada6d71;
        converge.Load(localParams);
        localParams.NameHash        = 0xcdd6ef0bc3931161;
        smartconverge.Load(localParams);

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

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

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

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

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

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

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

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

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

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload FIRFilterConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void FIRFilterConfigType::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, coefficient);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload IIRFilterConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void IIRFilterConfigType::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, coeffInput);
    ParameterFileSymbolTable::ReleaseObject(__table, coeffOutput);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload FilterConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void FilterConfigType::Unload(ParameterFileSymbolTable* const __table)
{
    fir.Unload(__table);
    iir.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload FilterDetectorConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void FilterDetectorConfigType::Unload(ParameterFileSymbolTable* const __table)
{
    filter.Unload(__table);
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload SmartSCDType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void SmartSCDType::Unload(ParameterFileSymbolTable* const __table)
{
    FinalSmartSCDThreshold.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixSCConvV1Type
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixSCConvV1Type::Unload(ParameterFileSymbolTable* const __table)
{
    detector.Unload(__table);
    smartconverge.Unload(__table);
}

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

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

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

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

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

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

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

    return (ParameterModule*)cls;
}

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

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

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

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

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


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

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

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

    return result;
}

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

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

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

MODSCCONVV1_NAMESPACE_END
