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

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

#include "aecxhwstatsconfig.h"
#include "parametersetmanager.h"

AECXHWSTATSCONFIG_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool AECHistStatsConfigType::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, "HWInputID") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)HWInputID, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "binCount") == 0)
    {
        ParameterUtils::DoubleToString((double)binCount, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "binValuesCount") == 0)
    {
        ParameterUtils::DoubleToString((double)binValuesCount, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "binUniformity") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)binUniformity, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "channelEnable") == 0)
    {
        if (__index < 4)
        {
            ParameterUtils::DoubleToString((double)channelEnable[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 4; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)channelEnable[i], &__value[__valuePos], (INT32)(__size - __valuePos), 0);
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "siteSelection") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)siteSelection, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "pixelExpSelect") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)pixelExpSelect, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "ROIConfigControl") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)ROIConfigControl, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "hwConfig") == 0)
    {
        __result = hwConfig.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "exposureType") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)exposureType, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "values") == 0)
    {
        if (__index < valuesCount)
        {
            ParameterUtils::DoubleToString((double)values[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < valuesCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)values[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }

    return __result;
}

bool AECHistStatsConfigType::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, "HWInputID") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            HWInputID = (aecxglobalelements::AECHWStatsInputType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "binCount") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            binCount = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "binValuesCount") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            binValuesCount = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "binUniformity") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            binUniformity = (aecxglobalelements::AECStatsHistogramUniformityType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "channelEnable") == 0)
    {
        if (__index < 4)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                channelEnable[__index] = (BOOL)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    channelEnable[__index] = (BOOL)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "siteSelection") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            siteSelection = (aecxglobalelements::AECStatsSiteSelection)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "pixelExpSelect") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            pixelExpSelect = (aecxglobalelements::AECStatsPixelExpSelect)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "ROIConfigControl") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            ROIConfigControl = (aecxglobalelements::AECROIConfigControlType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "hwConfig") == 0)
    {
        __result = hwConfig.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "exposureType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            exposureType = (aecxglobalelements::AECXExposureSelection)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "values") == 0)
    {
        if (__index < valuesCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                values[__index] = (float)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

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

    return __result;
}

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

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

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

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

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

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

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

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

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

bool AECGridStatsConfigType::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, "HWInputID") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)HWInputID, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "numOfRegionsHorizontal") == 0)
    {
        ParameterUtils::DoubleToString((double)numOfRegionsHorizontal, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "numOfRegionsVertical") == 0)
    {
        ParameterUtils::DoubleToString((double)numOfRegionsVertical, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableStatsQuadSync") == 0)
    {
        ParameterUtils::DoubleToString((double)enableStatsQuadSync, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableSaturatedStats") == 0)
    {
        ParameterUtils::DoubleToString((double)enableSaturatedStats, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableYComputedStats") == 0)
    {
        ParameterUtils::DoubleToString((double)enableYComputedStats, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "YComputationColorWeight") == 0)
    {
        if (__index < 3)
        {
            ParameterUtils::DoubleToString((double)YComputationColorWeight[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 3; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)YComputationColorWeight[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "minStatsChannelThreshold") == 0)
    {
        if (__index < 4)
        {
            ParameterUtils::DoubleToString((double)minStatsChannelThreshold[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 4; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)minStatsChannelThreshold[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "maxStatsChannelThreshold") == 0)
    {
        if (__index < 4)
        {
            ParameterUtils::DoubleToString((double)maxStatsChannelThreshold[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 4; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)maxStatsChannelThreshold[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "HWStatsSkipFactor") == 0)
    {
        ParameterUtils::DoubleToString((double)HWStatsSkipFactor, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "ROIConfigControl") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)ROIConfigControl, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "bitDepth") == 0)
    {
        ParameterUtils::DoubleToString((double)bitDepth, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "siteSelection") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)siteSelection, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "pixelExpSelect") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)pixelExpSelect, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "regionSampling") == 0)
    {
        ParameterUtils::DoubleToString((double)regionSampling, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "exposureType") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)exposureType, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "hwConfig") == 0)
    {
        __result = hwConfig.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool AECGridStatsConfigType::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, "HWInputID") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            HWInputID = (aecxglobalelements::AECHWStatsInputType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "numOfRegionsHorizontal") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            numOfRegionsHorizontal = (UINT16)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "numOfRegionsVertical") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            numOfRegionsVertical = (UINT16)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableStatsQuadSync") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableStatsQuadSync = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableSaturatedStats") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableSaturatedStats = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableYComputedStats") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableYComputedStats = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "YComputationColorWeight") == 0)
    {
        if (__index < 3)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                YComputationColorWeight[__index] = (float)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

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

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

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

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

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

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

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    maxStatsChannelThreshold[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "HWStatsSkipFactor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            HWStatsSkipFactor = (UINT8)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "ROIConfigControl") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            ROIConfigControl = (aecxglobalelements::AECROIConfigControlType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "bitDepth") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            bitDepth = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "siteSelection") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            siteSelection = (aecxglobalelements::AECStatsSiteSelection)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "pixelExpSelect") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            pixelExpSelect = (aecxglobalelements::AECStatsPixelExpSelect)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "regionSampling") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            regionSampling = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "exposureType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            exposureType = (aecxglobalelements::AECXExposureSelection)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "hwConfig") == 0)
    {
        __result = hwConfig.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_version.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "parameter_version") == 0)
    {
        __result = parameter_version.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "moduleID") == 0)
    {
        ParameterUtils::DoubleToString((double)moduleID, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "gridStatsConfig") == 0)
    {
        if (__index < gridStatsConfigCount)
        {
            __result = gridStatsConfig[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "histStatsConfig") == 0)
    {
        if (__index < histStatsConfigCount)
        {
            __result = histStatsConfig[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_version.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "parameter_version") == 0)
    {
        __result = parameter_version.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "moduleID") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            moduleID = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "gridStatsConfig") == 0)
    {
        if (__index < gridStatsConfigCount)
        {
            __result = gridStatsConfig[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "histStatsConfig") == 0)
    {
        if (__index < histStatsConfigCount)
        {
            __result = histStatsConfig[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

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

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

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXHWStatsConfigTypeClass::AECXHWStatsConfigTypeClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(moduleID);
    PARAMETER_INITIALIZE(gridStatsConfigCount);
    PARAMETER_INITIALIZE(gridStatsConfig);
    PARAMETER_INITIALIZE(histStatsConfigCount);
    PARAMETER_INITIALIZE(histStatsConfig);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXHWStatsConfigTypeClass::AECXHWStatsConfigTypeClass(
    const CHAR* const name,
    ModuleData* const moduleData)
    : ParameterModule(name, MAJOR, MINOR, PATCH, moduleData)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(moduleID);
    PARAMETER_INITIALIZE(gridStatsConfig);
    PARAMETER_INITIALIZE(histStatsConfig);
}

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

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

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

    PARAMETER_INITIALIZE(HWInputID);
    PARAMETER_INITIALIZE(binCount);
    PARAMETER_INITIALIZE(binValuesCount);
    PARAMETER_INITIALIZE(binUniformity);
    PARAMETER_INITIALIZE(channelEnable);
    PARAMETER_INITIALIZE(siteSelection);
    PARAMETER_INITIALIZE(pixelExpSelect);
    PARAMETER_INITIALIZE(ROIConfigControl);
    PARAMETER_INITIALIZE(hwConfig);
    PARAMETER_INITIALIZE(exposureType);
    PARAMETER_INITIALIZE(values);

    result = aecxglobalelements::ReadEnum_AECHWStatsInputType(entry, HWInputID, alignment);
    SYMBOL_TABLE_ENTRY_READ(entry, result, binCount, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, binValuesCount, alignment)
    if (result)
    {
        result = aecxglobalelements::ReadEnum_AECStatsHistogramUniformityType(entry, binUniformity, alignment);
    }
    if (result)
    {
        result = entry->ReadArray(channelEnable, 4, alignment);
    }
    if (result)
    {
        result = aecxglobalelements::ReadEnum_AECStatsSiteSelection(entry, siteSelection, alignment);
    }
    if (result)
    {
        result = aecxglobalelements::ReadEnum_AECStatsPixelExpSelect(entry, pixelExpSelect, alignment);
    }
    if (result)
    {
        result = aecxglobalelements::ReadEnum_AECROIConfigControlType(entry, ROIConfigControl, alignment);
    }
    if (result)
    {
        result = hwConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = aecxglobalelements::ReadEnum_AECXExposureSelection(entry, exposureType, alignment);
    }

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

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

            if (values == nullptr)
            {
                if (result && valuesCount > 0)
                {
                    values = pointerEntry->ReadArray<float>(valuesCount, alignment);
                    result = values != nullptr;
                }
                if (!result || values == nullptr)
                {
                    if (valuesCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate values\n");
                    }
                    valuesCount = 0;
                }
            }
        }
        if (values == nullptr)
        {
            valuesCount = 0;
        }
    }

    return result;
}

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

    PARAMETER_INITIALIZE(data);


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

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

            if (data == nullptr)
            {
                if (result && dataCount > 0)
                {
                    data = pointerEntry->ReadArray<float>(dataCount, alignment);
                    result = data != nullptr;
                }
                if (!result || data == nullptr)
                {
                    if (dataCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate data\n");
                    }
                    dataCount = 0;
                }
            }
        }
        if (data == nullptr)
        {
            dataCount = 0;
        }
    }

    return result;
}

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

    PARAMETER_INITIALIZE(HWInputID);
    PARAMETER_INITIALIZE(numOfRegionsHorizontal);
    PARAMETER_INITIALIZE(numOfRegionsVertical);
    PARAMETER_INITIALIZE(enableStatsQuadSync);
    PARAMETER_INITIALIZE(enableSaturatedStats);
    PARAMETER_INITIALIZE(enableYComputedStats);
    PARAMETER_INITIALIZE(YComputationColorWeight);
    PARAMETER_INITIALIZE(minStatsChannelThreshold);
    PARAMETER_INITIALIZE(maxStatsChannelThreshold);
    PARAMETER_INITIALIZE(HWStatsSkipFactor);
    PARAMETER_INITIALIZE(ROIConfigControl);
    PARAMETER_INITIALIZE(bitDepth);
    PARAMETER_INITIALIZE(siteSelection);
    PARAMETER_INITIALIZE(pixelExpSelect);
    PARAMETER_INITIALIZE(regionSampling);
    PARAMETER_INITIALIZE(exposureType);
    PARAMETER_INITIALIZE(hwConfig);

    result = aecxglobalelements::ReadEnum_AECHWStatsInputType(entry, HWInputID, alignment);
    SYMBOL_TABLE_ENTRY_READ(entry, result, numOfRegionsHorizontal, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, numOfRegionsVertical, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableStatsQuadSync, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableSaturatedStats, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableYComputedStats, alignment)
    if (result)
    {
        result = entry->ReadArray(YComputationColorWeight, 3, alignment);
    }
    if (result)
    {
        result = entry->ReadArray(minStatsChannelThreshold, 4, alignment);
    }
    if (result)
    {
        result = entry->ReadArray(maxStatsChannelThreshold, 4, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, HWStatsSkipFactor, alignment)
    if (result)
    {
        result = aecxglobalelements::ReadEnum_AECROIConfigControlType(entry, ROIConfigControl, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, bitDepth, alignment)
    if (result)
    {
        result = aecxglobalelements::ReadEnum_AECStatsSiteSelection(entry, siteSelection, alignment);
    }
    if (result)
    {
        result = aecxglobalelements::ReadEnum_AECStatsPixelExpSelect(entry, pixelExpSelect, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, regionSampling, alignment)
    if (result)
    {
        result = aecxglobalelements::ReadEnum_AECXExposureSelection(entry, exposureType, alignment);
    }
    if (result)
    {
        result = hwConfig.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(data);


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

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

            if (data == nullptr)
            {
                if (result && dataCount > 0)
                {
                    data = pointerEntry->ReadArray<float>(dataCount, alignment);
                    result = data != nullptr;
                }
                if (!result || data == nullptr)
                {
                    if (dataCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate data\n");
                    }
                    dataCount = 0;
                }
            }
        }
        if (data == nullptr)
        {
            dataCount = 0;
        }
    }

    return result;
}

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

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(moduleID);
    PARAMETER_INITIALIZE(gridStatsConfig);
    PARAMETER_INITIALIZE(histStatsConfig);

    result = module_version.Load(entry, alignment);
    if (result)
    {
        result = parameter_version.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, moduleID, alignment)

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

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

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

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

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

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

    return result;
}

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

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

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

    return result;
}

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

    PARAMETER_INITIALIZE(revision);


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

    return result;
}

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECGridStatsConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECGridStatsConfigType::Unload(ParameterFileSymbolTable* const __table)
{
    hwConfig.Unload(__table);
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECXHWStatsConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECXHWStatsConfigType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
    for (UINT32 i = 0; i < gridStatsConfigCount; i++)
    {
        gridStatsConfig[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(gridStatsConfig))
    {
        PARAMETER_DELETE[] gridStatsConfig;
    }
    gridStatsConfig = nullptr;
    for (UINT32 i = 0; i < histStatsConfigCount; i++)
    {
        histStatsConfig[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(histStatsConfig))
    {
        PARAMETER_DELETE[] histStatsConfig;
    }
    histStatsConfig = nullptr;
}

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

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

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

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

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

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

    return (ParameterModule*)cls;
}

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

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

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

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

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

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

    return result;
}

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

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

AECXHWSTATSCONFIG_NAMESPACE_END
