////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 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 BFWFOVScaleFactorsConfigType::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, "scaleX") == 0)
    {
        ParameterUtils::DoubleToString((double)scaleX, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "scaleY") == 0)
    {
        ParameterUtils::DoubleToString((double)scaleY, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool BFWFOVScaleFactorsConfigType::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, "scaleX") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            scaleX = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "scaleY") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            scaleY = (INT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

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

    return __result;
}

bool BFWROIProcessingConfigType::BFWSyncConfigStruct::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, "BFWType") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)BFWType, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "calibrationMethod") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)calibrationMethod, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool BFWROIProcessingConfigType::BFWSyncConfigStruct::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, "BFWType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            BFWType = (BFWROIType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "calibrationMethod") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            calibrationMethod = (BFWCalibrationMethod)(UINT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

    return __result;
}

bool BFWROIProcessingConfigType::offlineTuningCalibrationConfigStruct::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, "shrinkPercentage") == 0)
    {
        ParameterUtils::DoubleToString((double)shrinkPercentage, __value, __size);
        __result = true;
    }

    return __result;
}

bool BFWROIProcessingConfigType::offlineTuningCalibrationConfigStruct::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, "shrinkPercentage") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            shrinkPercentage = (float)dblValue; 
        }
    }

    return __result;
}

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

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

    return __result;
}

bool BFWBlackLevelConfigType::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, "enable") == 0)
    {
        ParameterUtils::DoubleToString((double)enable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "blackLevelOffset") == 0)
    {
        ParameterUtils::DoubleToString((double)blackLevelOffset, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool BFWBlackLevelConfigType::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, "enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enable = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "blackLevelOffset") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            blackLevelOffset = (INT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

    return __result;
}

bool BFWROI::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, "left") == 0)
    {
        ParameterUtils::DoubleToString((double)left, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "top") == 0)
    {
        ParameterUtils::DoubleToString((double)top, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "width") == 0)
    {
        ParameterUtils::DoubleToString((double)width, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "height") == 0)
    {
        ParameterUtils::DoubleToString((double)height, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool BFWROI::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, "left") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            left = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "top") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            top = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "width") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            width = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "height") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            height = (INT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

bool SensorResolutionType::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, "width") == 0)
    {
        ParameterUtils::DoubleToString((double)width, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "height") == 0)
    {
        ParameterUtils::DoubleToString((double)height, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool SensorResolutionType::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, "width") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            width = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "height") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            height = (INT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

    return __result;
}

bool AECBFWStatsConfigType::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, "SensorResolution") == 0)
    {
        __result = SensorResolution.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "BFWROICombo") == 0)
    {
        if (__index < BFWROIComboCount)
        {
            __result = BFWROICombo[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    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 < 5)
        {
            ParameterUtils::DoubleToString((double)minStatsChannelThreshold[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 5; 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 < 5)
        {
            ParameterUtils::DoubleToString((double)maxStatsChannelThreshold[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 5; 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, "bitDepth") == 0)
    {
        ParameterUtils::DoubleToString((double)bitDepth, __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, "exposureType") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)exposureType, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "BFWBlackLevelConfig") == 0)
    {
        __result = BFWBlackLevelConfig.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "BFWROIProcessingConfig") == 0)
    {
        __result = BFWROIProcessingConfig.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "hwConfig") == 0)
    {
        __result = hwConfig.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool AECBFWStatsConfigType::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, "SensorResolution") == 0)
    {
        __result = SensorResolution.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "BFWROICombo") == 0)
    {
        if (__index < BFWROIComboCount)
        {
            __result = BFWROICombo[__index].SetValue(&__path[__pos], __value);
        }
    }
    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 < 5)
        {
            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 < 5)
            {
                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 < 5)
        {
            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 < 5)
            {
                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, "bitDepth") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            bitDepth = (INT32)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, "exposureType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            exposureType = (aecxglobalelements::AECXExposureSelection)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "BFWBlackLevelConfig") == 0)
    {
        __result = BFWBlackLevelConfig.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "BFWROIProcessingConfig") == 0)
    {
        __result = BFWROIProcessingConfig.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "hwConfig") == 0)
    {
        __result = hwConfig.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

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

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

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

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

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

    // 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 AECBFWStatsConfigType::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 AECBFWStatsConfigType::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 AECBFWStatsConfigType::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 FeatureRoiType::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, "featureRoiConfigType") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)featureRoiConfigType, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "hParam") == 0)
    {
        ParameterUtils::DoubleToString((double)hParam, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "vParam") == 0)
    {
        ParameterUtils::DoubleToString((double)vParam, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "weight") == 0)
    {
        ParameterUtils::DoubleToString((double)weight, __value, __size);
        __result = true;
    }

    return __result;
}

bool FeatureRoiType::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, "featureRoiConfigType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            featureRoiConfigType = (featureRoiConfigTypeEnum)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "hParam") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            hParam = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "vParam") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            vParam = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "weight") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            weight = (float)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "enableFlag") == 0)
    {
        ParameterUtils::DoubleToString((double)enableFlag, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "featureRoiThreshold") == 0)
    {
        ParameterUtils::DoubleToString((double)featureRoiThreshold, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "featureRoi") == 0)
    {
        __result = featureRoi.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "enableOuterRoiAutoConfig") == 0)
    {
        ParameterUtils::DoubleToString((double)enableOuterRoiAutoConfig, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "outerRoi") == 0)
    {
        if (__index < outerRoiCount)
        {
            __result = outerRoi[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "enableFlag") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableFlag = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "featureRoiThreshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            featureRoiThreshold = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "featureRoi") == 0)
    {
        __result = featureRoi.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "enableOuterRoiAutoConfig") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableOuterRoiAutoConfig = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "outerRoi") == 0)
    {
        if (__index < outerRoiCount)
        {
            __result = outerRoi[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

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

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

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

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

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

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

    return __result;
}

bool DynamicRoiConfigType::outerRoiStruct::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, "offsetH") == 0)
    {
        ParameterUtils::DoubleToString((double)offsetH, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "offsetV") == 0)
    {
        ParameterUtils::DoubleToString((double)offsetV, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "weight") == 0)
    {
        ParameterUtils::DoubleToString((double)weight, __value, __size);
        __result = true;
    }

    return __result;
}

bool DynamicRoiConfigType::outerRoiStruct::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, "offsetH") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            offsetH = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "offsetV") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            offsetV = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "weight") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            weight = (float)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

    return __result;
}

bool StaticRoiType::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, "offsetH") == 0)
    {
        ParameterUtils::DoubleToString((double)offsetH, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "offsetV") == 0)
    {
        ParameterUtils::DoubleToString((double)offsetV, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "width") == 0)
    {
        ParameterUtils::DoubleToString((double)width, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "height") == 0)
    {
        ParameterUtils::DoubleToString((double)height, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "weight") == 0)
    {
        ParameterUtils::DoubleToString((double)weight, __value, __size);
        __result = true;
    }

    return __result;
}

bool StaticRoiType::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, "offsetH") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            offsetH = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "offsetV") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            offsetV = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "width") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            width = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "height") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            height = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "weight") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            weight = (float)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

    return __result;
}

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 < channelEnableCount)
        {
            ParameterUtils::DoubleToString((double)channelEnable[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < channelEnableCount; 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, "segmentControl") == 0)
    {
        __result = segmentControl.GetValue(&__path[__pos], __value, __size);
    }
    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, "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;
        }
    }
    else if (PARAMETER_STRCMP(__name, "dataID") == 0)
    {
        ParameterUtils::DoubleToString((double)dataID, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "inputBitDepth") == 0)
    {
        ParameterUtils::DoubleToString((double)inputBitDepth, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableSpatialRoiConfig") == 0)
    {
        ParameterUtils::DoubleToString((double)enableSpatialRoiConfig, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "staticRoiConfig") == 0)
    {
        __result = staticRoiConfig.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "dynamicRoiConfig") == 0)
    {
        __result = dynamicRoiConfig.GetValue(&__path[__pos], __value, __size);
    }

    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 < channelEnableCount)
        {
            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 < channelEnableCount)
            {
                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, "segmentControl") == 0)
    {
        __result = segmentControl.SetValue(&__path[__pos], __value);
    }
    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, "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;
        }
    }
    else if (PARAMETER_STRCMP(__name, "dataID") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            dataID = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "inputBitDepth") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            inputBitDepth = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableSpatialRoiConfig") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableSpatialRoiConfig = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "staticRoiConfig") == 0)
    {
        __result = staticRoiConfig.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "dynamicRoiConfig") == 0)
    {
        __result = dynamicRoiConfig.SetValue(&__path[__pos], __value);
    }

    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, channelEnableCount));
    }

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

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

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

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

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

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

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

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

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

    return __result;
}

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

    return __result;
}

bool AECHistStatsConfigType::segmentControlStruct::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, "baseTable") == 0)
    {
        __result = baseTable.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "slopeTable") == 0)
    {
        __result = slopeTable.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "startBinTable") == 0)
    {
        __result = startBinTable.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "enableSegmentConfig") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableSegmentConfig = (BOOL)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

    return __result;
}

bool AECHistStatsConfigType::segmentControlStruct::baseTableStruct::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, "values") == 0)
    {
        if (__index < 8)
        {
            ParameterUtils::DoubleToString((double)values[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 8; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)values[i], &__value[__valuePos], (INT32)(__size - __valuePos), 0);
            }
            __result = true;
        }
    }

    return __result;
}

bool AECHistStatsConfigType::segmentControlStruct::baseTableStruct::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, "values") == 0)
    {
        if (__index < 8)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                values[__index] = (UINT32)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

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

    return __result;
}

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

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

    return __result;
}

bool AECHistStatsConfigType::segmentControlStruct::slopeTableStruct::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, "values") == 0)
    {
        if (__index < 8)
        {
            ParameterUtils::DoubleToString((double)values[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 8; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)values[i], &__value[__valuePos], (INT32)(__size - __valuePos), 0);
            }
            __result = true;
        }
    }

    return __result;
}

bool AECHistStatsConfigType::segmentControlStruct::slopeTableStruct::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, "values") == 0)
    {
        if (__index < 8)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                values[__index] = (UINT32)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

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

    return __result;
}

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

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

    return __result;
}

bool AECHistStatsConfigType::segmentControlStruct::startBinTableStruct::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, "values") == 0)
    {
        if (__index < 7)
        {
            ParameterUtils::DoubleToString((double)values[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 7; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)values[i], &__value[__valuePos], (INT32)(__size - __valuePos), 0);
            }
            __result = true;
        }
    }

    return __result;
}

bool AECHistStatsConfigType::segmentControlStruct::startBinTableStruct::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, "values") == 0)
    {
        if (__index < 7)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                values[__index] = (UINT32)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

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

    return __result;
}

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

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

    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);
    }
    else if (PARAMETER_STRCMP(__name, "dataID") == 0)
    {
        ParameterUtils::DoubleToString((double)dataID, __value, __size, 0);
        __result = true;
    }

    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);
    }
    else if (PARAMETER_STRCMP(__name, "dataID") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            dataID = (UINT32)dblValue; 
        }
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(FeatureRoiType::featureRoiConfigTypeEnum::defaultRoi):
            enumValue = FeatureRoiType::featureRoiConfigTypeEnum::defaultRoi;
            result    = true;
            break;
        case static_cast<UINT32>(FeatureRoiType::featureRoiConfigTypeEnum::fixedRoi):
            enumValue = FeatureRoiType::featureRoiConfigTypeEnum::fixedRoi;
            result    = true;
            break;
        case static_cast<UINT32>(FeatureRoiType::featureRoiConfigTypeEnum::scaledRoi):
            enumValue = FeatureRoiType::featureRoiConfigTypeEnum::scaledRoi;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to FeatureRoiType::featureRoiConfigTypeEnum", uintValue);
            break;
        }
    }
    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);
    PARAMETER_INITIALIZE(bfwStatsConfigCount);
    PARAMETER_INITIALIZE(bfwStatsConfig);
    PARAMETER_INITIALIZE(enableDynamicGridResolution);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// 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);
    PARAMETER_INITIALIZE(bfwStatsConfig);
    PARAMETER_INITIALIZE(enableDynamicGridResolution);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// 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 BFWFOVScaleFactorsConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool BFWFOVScaleFactorsConfigType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(scaleX);
    PARAMETER_INITIALIZE(scaleY);

    SYMBOL_TABLE_ENTRY_READ(entry, result, scaleX, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, scaleY, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(BFWSyncConfig);
    PARAMETER_INITIALIZE(offlineTuningCalibrationConfig);
    PARAMETER_INITIALIZE(dynamicCalibrationConfig);

    result = BFWSyncConfig.Load(entry, alignment);
    if (result)
    {
        result = offlineTuningCalibrationConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = dynamicCalibrationConfig.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(BFWType);
    PARAMETER_INITIALIZE(calibrationMethod);

    result = aecxhwstatsconfig::ReadEnum_BFWROIType(entry, BFWType, alignment);
    if (result)
    {
        result = aecxhwstatsconfig::ReadEnum_BFWCalibrationMethod(entry, calibrationMethod, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(shrinkPercentage);

    SYMBOL_TABLE_ENTRY_READ(entry, result, shrinkPercentage, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(minConfidencePercentage);
    PARAMETER_INITIALIZE(maxDeltaPercentage);
    PARAMETER_INITIALIZE(absoluteFOVScales);

    SYMBOL_TABLE_ENTRY_READ(entry, result, minConfidencePercentage, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxDeltaPercentage, alignment)
    if (result)
    {
        result = absoluteFOVScales.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(blackLevelOffset);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, blackLevelOffset, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(left);
    PARAMETER_INITIALIZE(top);
    PARAMETER_INITIALIZE(width);
    PARAMETER_INITIALIZE(height);

    SYMBOL_TABLE_ENTRY_READ(entry, result, left, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, top, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, width, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, height, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(BFWReferenceROI);
    PARAMETER_INITIALIZE(BFWMappedROI);

    result = BFWReferenceROI.Load(entry, alignment);
    if (result)
    {
        result = BFWMappedROI.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(width);
    PARAMETER_INITIALIZE(height);

    SYMBOL_TABLE_ENTRY_READ(entry, result, width, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, height, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(HWInputID);
    PARAMETER_INITIALIZE(SensorResolution);
    PARAMETER_INITIALIZE(BFWROICombo);
    PARAMETER_INITIALIZE(enableStatsQuadSync);
    PARAMETER_INITIALIZE(enableSaturatedStats);
    PARAMETER_INITIALIZE(enableYComputedStats);
    PARAMETER_INITIALIZE(YComputationColorWeight);
    PARAMETER_INITIALIZE(minStatsChannelThreshold);
    PARAMETER_INITIALIZE(maxStatsChannelThreshold);
    PARAMETER_INITIALIZE(bitDepth);
    PARAMETER_INITIALIZE(pixelExpSelect);
    PARAMETER_INITIALIZE(exposureType);
    PARAMETER_INITIALIZE(BFWBlackLevelConfig);
    PARAMETER_INITIALIZE(BFWROIProcessingConfig);
    PARAMETER_INITIALIZE(hwConfig);

    result = aecxglobalelements::ReadEnum_AECHWStatsInputType(entry, HWInputID, alignment);
    if (result)
    {
        result = SensorResolution.Load(entry, alignment);
    }

    // Reading Array BFWROICombo from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        BFWROIComboCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, BFWROIComboCount, 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)
        {
            BFWROIComboID = pointerEntry->ID;
            DupObjInfo* BFWROIComboDupInfo = pointerEntry->GetDupObject(BFWROIComboCount, file, line);
            if (BFWROIComboDupInfo != nullptr && BFWROIComboDupInfo->Object != nullptr)
            {
                BFWROICombo = (BFWROIConfigType*)BFWROIComboDupInfo->Object;
                if (BFWROICombo == nullptr)
                {
                    if (BFWROIComboDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "BFWROICombo duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            BFWROIComboDupInfo->File, BFWROIComboDupInfo->Line, BFWROIComboDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "BFWROICombo duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            BFWROIComboDupInfo->Line, BFWROIComboDupInfo->RefCount);
                    }
                }
            }

            if (BFWROICombo == nullptr)
            {
                if (result && BFWROIComboCount > 0)
                {
                    BFWROICombo = PARAMETER_NEW BFWROIConfigType[BFWROIComboCount];
                    (void)pointerEntry->SetDupObject(BFWROICombo, BFWROIComboCount, file, line);
                }
                if (!result || BFWROICombo == nullptr)
                {
                    if (BFWROIComboCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate BFWROICombo\n");
                    }
                    BFWROIComboCount = 0;
                }
                for (UINT32 i = 0; result && i < BFWROIComboCount; i++)
                {
                    result = BFWROICombo[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (BFWROICombo == nullptr)
        {
            BFWROIComboCount = 0;
        }
    }
    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, 5, alignment);
    }
    if (result)
    {
        result = entry->ReadArray(maxStatsChannelThreshold, 5, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, bitDepth, alignment)
    if (result)
    {
        result = aecxglobalelements::ReadEnum_AECStatsPixelExpSelect(entry, pixelExpSelect, alignment);
    }
    if (result)
    {
        result = aecxglobalelements::ReadEnum_AECXExposureSelection(entry, exposureType, alignment);
    }
    if (result)
    {
        result = BFWBlackLevelConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = BFWROIProcessingConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = hwConfig.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load AECBFWStatsConfigType_hwConfigStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool AECBFWStatsConfigType::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 FeatureRoiType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FeatureRoiType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(featureRoiConfigType);
    PARAMETER_INITIALIZE(hParam);
    PARAMETER_INITIALIZE(vParam);
    PARAMETER_INITIALIZE(weight);

    result = FeatureRoiType::ReadEnum_featureRoiConfigTypeEnum(entry, featureRoiConfigType, alignment);
    SYMBOL_TABLE_ENTRY_READ(entry, result, hParam, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, vParam, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, weight, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(enableFlag);
    PARAMETER_INITIALIZE(featureRoiThreshold);
    PARAMETER_INITIALIZE(featureRoi);
    PARAMETER_INITIALIZE(enableOuterRoiAutoConfig);
    PARAMETER_INITIALIZE(outerRoi);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableFlag, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, featureRoiThreshold, alignment)
    if (result)
    {
        result = featureRoi.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableOuterRoiAutoConfig, alignment)

    // Reading Array outerRoi from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        outerRoiCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, outerRoiCount, 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)
        {
            outerRoiID = pointerEntry->ID;
            DupObjInfo* outerRoiDupInfo = pointerEntry->GetDupObject(outerRoiCount, file, line);
            if (outerRoiDupInfo != nullptr && outerRoiDupInfo->Object != nullptr)
            {
                outerRoi = (DynamicRoiConfigType::outerRoiStruct*)outerRoiDupInfo->Object;
                if (outerRoi == nullptr)
                {
                    if (outerRoiDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "outerRoi duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            outerRoiDupInfo->File, outerRoiDupInfo->Line, outerRoiDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "outerRoi duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            outerRoiDupInfo->Line, outerRoiDupInfo->RefCount);
                    }
                }
            }

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

    return result;
}

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

    PARAMETER_INITIALIZE(offsetH);
    PARAMETER_INITIALIZE(offsetV);
    PARAMETER_INITIALIZE(weight);

    SYMBOL_TABLE_ENTRY_READ(entry, result, offsetH, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, offsetV, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, weight, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(offsetH);
    PARAMETER_INITIALIZE(offsetV);
    PARAMETER_INITIALIZE(width);
    PARAMETER_INITIALIZE(height);
    PARAMETER_INITIALIZE(weight);

    SYMBOL_TABLE_ENTRY_READ(entry, result, offsetH, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, offsetV, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, width, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, height, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, weight, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(Roi);


    // Reading Array Roi from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        RoiCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, RoiCount, 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)
        {
            RoiID = pointerEntry->ID;
            DupObjInfo* RoiDupInfo = pointerEntry->GetDupObject(RoiCount, file, line);
            if (RoiDupInfo != nullptr && RoiDupInfo->Object != nullptr)
            {
                Roi = (StaticRoiType*)RoiDupInfo->Object;
                if (Roi == nullptr)
                {
                    if (RoiDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Roi duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            RoiDupInfo->File, RoiDupInfo->Line, RoiDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Roi duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            RoiDupInfo->Line, RoiDupInfo->RefCount);
                    }
                }
            }

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

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// 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(segmentControl);
    PARAMETER_INITIALIZE(YComputationColorWeight);
    PARAMETER_INITIALIZE(hwConfig);
    PARAMETER_INITIALIZE(exposureType);
    PARAMETER_INITIALIZE(values);
    PARAMETER_INITIALIZE(dataID);
    PARAMETER_INITIALIZE(inputBitDepth);
    PARAMETER_INITIALIZE(enableSpatialRoiConfig);
    PARAMETER_INITIALIZE(staticRoiConfig);
    PARAMETER_INITIALIZE(dynamicRoiConfig);

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

    // Reading Array channelEnable from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        channelEnableCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, channelEnableCount, 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)
        {
            channelEnableID = pointerEntry->ID;
            DupObjInfo* channelEnableDupInfo = pointerEntry->GetDupObject(channelEnableCount, file, line);
            if (channelEnableDupInfo != nullptr && channelEnableDupInfo->Object != nullptr)
            {
                channelEnable = (BOOL*)channelEnableDupInfo->Object;
                if (channelEnable == nullptr)
                {
                    if (channelEnableDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "channelEnable duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            channelEnableDupInfo->File, channelEnableDupInfo->Line, channelEnableDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "channelEnable duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            channelEnableDupInfo->Line, channelEnableDupInfo->RefCount);
                    }
                }
            }

            if (channelEnable == nullptr)
            {
                if (result && channelEnableCount > 0)
                {
                    channelEnable = pointerEntry->ReadArray<BOOL>(channelEnableCount, alignment);
                    result = channelEnable != nullptr;
                }
                if (!result || channelEnable == nullptr)
                {
                    if (channelEnableCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate channelEnable\n");
                    }
                    channelEnableCount = 0;
                }
            }
        }
        if (channelEnable == nullptr)
        {
            channelEnableCount = 0;
        }
    }
    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 = segmentControl.Load(entry, alignment);
    }
    if (result)
    {
        result = entry->ReadArray(YComputationColorWeight, 3, 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;
        }
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, dataID, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, inputBitDepth, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableSpatialRoiConfig, alignment)
    if (result)
    {
        result = staticRoiConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = dynamicRoiConfig.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(baseTable);
    PARAMETER_INITIALIZE(slopeTable);
    PARAMETER_INITIALIZE(startBinTable);
    PARAMETER_INITIALIZE(enableSegmentConfig);

    result = baseTable.Load(entry, alignment);
    if (result)
    {
        result = slopeTable.Load(entry, alignment);
    }
    if (result)
    {
        result = startBinTable.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableSegmentConfig, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(values);

    result = entry->ReadArray(values, 8, alignment);

    return result;
}

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

    PARAMETER_INITIALIZE(values);

    result = entry->ReadArray(values, 8, alignment);

    return result;
}

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

    PARAMETER_INITIALIZE(values);

    result = entry->ReadArray(values, 7, alignment);

    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);
    PARAMETER_INITIALIZE(dataID);

    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);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, dataID, 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);
    PARAMETER_INITIALIZE(bfwStatsConfig);
    PARAMETER_INITIALIZE(enableDynamicGridResolution);

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

    // Reading Array bfwStatsConfig from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        bfwStatsConfigCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, bfwStatsConfigCount, 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)
        {
            bfwStatsConfigID = pointerEntry->ID;
            DupObjInfo* bfwStatsConfigDupInfo = pointerEntry->GetDupObject(bfwStatsConfigCount, file, line);
            if (bfwStatsConfigDupInfo != nullptr && bfwStatsConfigDupInfo->Object != nullptr)
            {
                bfwStatsConfig = (AECBFWStatsConfigType*)bfwStatsConfigDupInfo->Object;
                if (bfwStatsConfig == nullptr)
                {
                    if (bfwStatsConfigDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "bfwStatsConfig duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            bfwStatsConfigDupInfo->File, bfwStatsConfigDupInfo->Line, bfwStatsConfigDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "bfwStatsConfig duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            bfwStatsConfigDupInfo->Line, bfwStatsConfigDupInfo->RefCount);
                    }
                }
            }

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

    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 AECBFWStatsConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECBFWStatsConfigType::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(BFWROICombo))
    {
        PARAMETER_DELETE[] BFWROICombo;
    }
    BFWROICombo = nullptr;
    hwConfig.Unload(__table);
}

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

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// 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;
    for (UINT32 i = 0; i < bfwStatsConfigCount; i++)
    {
        bfwStatsConfig[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(bfwStatsConfig))
    {
        PARAMETER_DELETE[] bfwStatsConfig;
    }
    bfwStatsConfig = 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
