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

#include "afsoftwarestatelements.h"
#include "parametersetmanager.h"

AFSOFTWARESTATELEMENTS_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixAFVFESoftwareIIRHighPassType::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, "filterCoeffA") == 0)
    {
        if (__index < filterCoeffAFixedCount)
        {
            ParameterUtils::DoubleToString((double)filterCoeffA[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < filterCoeffAFixedCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)filterCoeffA[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "filterCoeffB") == 0)
    {
        if (__index < filterCoeffBFixedCount)
        {
            ParameterUtils::DoubleToString((double)filterCoeffB[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < filterCoeffBFixedCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)filterCoeffB[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "FVMinHigh") == 0)
    {
        ParameterUtils::DoubleToString((double)FVMinHigh, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "FVMinLow") == 0)
    {
        ParameterUtils::DoubleToString((double)FVMinLow, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "coefficientlength") == 0)
    {
        ParameterUtils::DoubleToString((double)coefficientlength, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool chromatixAFVFESoftwareIIRHighPassType::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, "filterCoeffA") == 0)
    {
        if (__index < filterCoeffAFixedCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                filterCoeffA[__index] = (float)dblValue; 
            }
        }
        else
        {
            const SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __valuePos = 0;

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

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

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

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

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

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    filterCoeffB[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "FVMinHigh") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            FVMinHigh = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "FVMinLow") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            FVMinLow = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "coefficientlength") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            coefficientlength = (INT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

    return __result;
}

bool chromatixAFVFESoftwareFIRHighPassType::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, "filterCoeffA") == 0)
    {
        if (__index < filterCoeffAFixedCount)
        {
            ParameterUtils::DoubleToString((double)filterCoeffA[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < filterCoeffAFixedCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)filterCoeffA[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "FVMinHigh") == 0)
    {
        ParameterUtils::DoubleToString((double)FVMinHigh, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "FVMinLow") == 0)
    {
        ParameterUtils::DoubleToString((double)FVMinLow, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "coefficientlength") == 0)
    {
        ParameterUtils::DoubleToString((double)coefficientlength, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool chromatixAFVFESoftwareFIRHighPassType::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, "filterCoeffA") == 0)
    {
        if (__index < filterCoeffAFixedCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                filterCoeffA[__index] = (float)dblValue; 
            }
        }
        else
        {
            const SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __valuePos = 0;

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

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

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    filterCoeffA[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "FVMinHigh") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            FVMinHigh = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "FVMinLow") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            FVMinLow = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "coefficientlength") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            coefficientlength = (INT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

    return __result;
}

bool chromatixAFVFESoftwareHighPassType::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, "filterType") == 0)
    {
        ParameterUtils::DoubleToString((double)filterType, __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);
    }

    return __result;
}

bool chromatixAFVFESoftwareHighPassType::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, "filterType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            filterType = (INT32)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);
    }

    return __result;
}

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

    // filterType
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("filterType", ParameterParserDataType::Int32, (double)filterType, 0));
    }
    else if (PARAMETER_STRCMP(__name, "filterType") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)filterType, 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);
    }

    return __result;
}

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

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_version.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "parameter_version") == 0)
    {
        __result = parameter_version.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "SWFilterDefault") == 0)
    {
        __result = SWFilterDefault.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "SWFilterFace") == 0)
    {
        __result = SWFilterFace.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "SWFilterLowLight") == 0)
    {
        __result = SWFilterLowLight.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "SWFVMinimumLuxTriggerHigh") == 0)
    {
        ParameterUtils::DoubleToString((double)SWFVMinimumLuxTriggerHigh, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "SWFVMinimumLuxTriggerLow") == 0)
    {
        ParameterUtils::DoubleToString((double)SWFVMinimumLuxTriggerLow, __value, __size);
        __result = true;
    }

    return __result;
}

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

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_version.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "parameter_version") == 0)
    {
        __result = parameter_version.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "SWFilterDefault") == 0)
    {
        __result = SWFilterDefault.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "SWFilterFace") == 0)
    {
        __result = SWFilterFace.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "SWFilterLowLight") == 0)
    {
        __result = SWFilterLowLight.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "SWFVMinimumLuxTriggerHigh") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            SWFVMinimumLuxTriggerHigh = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "SWFVMinimumLuxTriggerLow") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            SWFVMinimumLuxTriggerLow = (float)dblValue; 
        }
    }

    return __result;
}

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

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

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

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

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

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

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

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

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

    return __result;
}

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

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
chromatixAFTuningSoftwareStatisticsTypeClass::chromatixAFTuningSoftwareStatisticsTypeClass(
    const CHAR* name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(SWFilterDefault);
    PARAMETER_INITIALIZE(SWFilterFace);
    PARAMETER_INITIALIZE(SWFilterLowLight);
    PARAMETER_INITIALIZE(SWFVMinimumLuxTriggerHigh);
    PARAMETER_INITIALIZE(SWFVMinimumLuxTriggerLow);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
chromatixAFTuningSoftwareStatisticsTypeClass::chromatixAFTuningSoftwareStatisticsTypeClass(
    const CHAR*       name,
    ModuleData* const moduleData)
    : ParameterModule(name, MAJOR, MINOR, PATCH, moduleData)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(SWFilterDefault);
    PARAMETER_INITIALIZE(SWFilterFace);
    PARAMETER_INITIALIZE(SWFilterLowLight);
    PARAMETER_INITIALIZE(SWFVMinimumLuxTriggerHigh);
    PARAMETER_INITIALIZE(SWFVMinimumLuxTriggerLow);
}

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


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixAFVFESoftwareIIRHighPassType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixAFVFESoftwareIIRHighPassType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(filterCoeffA);
    PARAMETER_INITIALIZE(filterCoeffB);
    PARAMETER_INITIALIZE(FVMinHigh);
    PARAMETER_INITIALIZE(FVMinLow);
    PARAMETER_INITIALIZE(coefficientlength);

    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 = 0xc4dd05375f8cb418;
        entry->ReadSimpleTypeFixedArray<float>(filterCoeffA, filterCoeffAFixedCount,
            localParams);
        localParams.NameHash = 0x8df1ba5642c04816;
        entry->ReadSimpleTypeFixedArray<float>(filterCoeffB, filterCoeffBFixedCount,
            localParams);
        localParams.NameHash = 0xe33659772a05ab1a;
        entry->ReadSimpleTypeFixedArray(&FVMinHigh, 1, localParams);
        localParams.NameHash = 0xc53639a539d97d5e;
        entry->ReadSimpleTypeFixedArray(&FVMinLow, 1, localParams);
        localParams.NameHash = 0xdf4ca48b38346188;
        entry->ReadSimpleTypeFixedArray(&coefficientlength, 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 chromatixAFVFESoftwareIIRHighPassType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixAFVFESoftwareIIRHighPassType* arrayPtr = (chromatixAFVFESoftwareIIRHighPassType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixAFVFESoftwareFIRHighPassType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixAFVFESoftwareFIRHighPassType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(filterCoeffA);
    PARAMETER_INITIALIZE(FVMinHigh);
    PARAMETER_INITIALIZE(FVMinLow);
    PARAMETER_INITIALIZE(coefficientlength);

    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 = 0xc4dd05375f8cb418;
        entry->ReadSimpleTypeFixedArray<float>(filterCoeffA, filterCoeffAFixedCount,
            localParams);
        localParams.NameHash = 0xe33659772a05ab1a;
        entry->ReadSimpleTypeFixedArray(&FVMinHigh, 1, localParams);
        localParams.NameHash = 0xc53639a539d97d5e;
        entry->ReadSimpleTypeFixedArray(&FVMinLow, 1, localParams);
        localParams.NameHash = 0xdf4ca48b38346188;
        entry->ReadSimpleTypeFixedArray(&coefficientlength, 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 chromatixAFVFESoftwareFIRHighPassType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixAFVFESoftwareFIRHighPassType* arrayPtr = (chromatixAFVFESoftwareFIRHighPassType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixAFVFESoftwareHighPassType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixAFVFESoftwareHighPassType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(filterType);
    PARAMETER_INITIALIZE(FIR);
    PARAMETER_INITIALIZE(IIR);

    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.NameHash = 0xd0fccf186ec908c0;
        entry->ReadSimpleTypeFixedArray(&filterType, 1, localParams);
        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0x8b301cd3783519fc;
        FIR.Load(localParams);
        localParams.NameHash        = 0x902c5c1d0645b1d0;
        IIR.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 chromatixAFVFESoftwareHighPassType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixAFVFESoftwareHighPassType* arrayPtr = (chromatixAFVFESoftwareHighPassType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixAFTuningSoftwareStatisticsType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixAFTuningSoftwareStatisticsType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(SWFilterDefault);
    PARAMETER_INITIALIZE(SWFilterFace);
    PARAMETER_INITIALIZE(SWFilterLowLight);
    PARAMETER_INITIALIZE(SWFVMinimumLuxTriggerHigh);
    PARAMETER_INITIALIZE(SWFVMinimumLuxTriggerLow);

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

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

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

        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0xe11cd9f365a2599f;
        module_version.Load(localParams);
        localParams.NameHash        = 0xca3106e199a12935;
        parameter_version.Load(localParams);
        localParams.NameHash        = 0x91498489bb597e15;
        SWFilterDefault.Load(localParams);
        localParams.NameHash        = 0x9f65c06c4adb5de1;
        SWFilterFace.Load(localParams);
        localParams.NameHash        = 0xf87df9bef4f087ad;
        SWFilterLowLight.Load(localParams);
        localParams.NameHash = 0xcb84955ce2c08889;
        entry->ReadSimpleTypeFixedArray(&SWFVMinimumLuxTriggerHigh, 1, localParams);
        localParams.NameHash = 0xc2dfb8c464773157;
        entry->ReadSimpleTypeFixedArray(&SWFVMinimumLuxTriggerLow, 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 chromatixAFTuningSoftwareStatisticsType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        chromatixAFTuningSoftwareStatisticsType* arrayPtr = (chromatixAFTuningSoftwareStatisticsType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixAFTuningSoftwareStatisticsType::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 chromatixAFTuningSoftwareStatisticsType::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* chromatixAFTuningSoftwareStatisticsType::module_versionStruct::AllocArray(
    UINT32 __count)
{
    module_versionStruct* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW module_versionStruct[__count];
    }
    return result;
}

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

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

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

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

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

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixAFTuningSoftwareStatisticsType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixAFTuningSoftwareStatisticsType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
}

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

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

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Create module, and return a new object
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ParameterModule* chromatixAFTuningSoftwareStatisticsTypeClass::Create(
    ModuleData* const    moduleData,
    DefaultModule* const defModule) const
{
    chromatixAFTuningSoftwareStatisticsTypeClass* 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 = (chromatixAFTuningSoftwareStatisticsTypeClass*)module;
        }
        else
        {
            cls = PARAMETER_NEW chromatixAFTuningSoftwareStatisticsTypeClass(Name, moduleData);
            cls->SymbolTableID = id;
            defModule->AddModule((ParameterModule*)cls);
        }
    }
    else if (Version.Value != moduleData->Version.Value)
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create chromatixAFTuningSoftwareStatisticsTypeClass, binary version (%lld) does not match source version (%lld)\n",
            moduleData->Version.Value, Version.Value);
    }
    else
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create chromatixAFTuningSoftwareStatisticsTypeClass, 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 chromatixAFTuningSoftwareStatisticsTypeClass::LoadModule(
    ParameterFileSymbolTable* const table)
{
    bool result = true;

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

    if (!Loaded)
    {
        chromatixAFTuningSoftwareStatisticsTypeClass* 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, "chromatixAFTuningSoftwareStatisticsTypeClass::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 chromatixAFTuningSoftwareStatisticsTypeClass::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 chromatixAFTuningSoftwareStatisticsTypeClass::Release()
{
    ParameterModule::Release();
}

AFSOFTWARESTATELEMENTS_NAMESPACE_END
