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

#include "aecface.h"
#include "parametersetmanager.h"

AECFACE_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FaceConvergenceType::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, "convSpeedAdjRatio") == 0)
    {
        ParameterUtils::DoubleToString((double)convSpeedAdjRatio, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "speedAdjDelayTimeEnter") == 0)
    {
        ParameterUtils::DoubleToString((double)speedAdjDelayTimeEnter, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "speedAdjDelayTimeExit") == 0)
    {
        ParameterUtils::DoubleToString((double)speedAdjDelayTimeExit, __value, __size);
        __result = true;
    }

    return __result;
}

bool FaceConvergenceType::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, "convSpeedAdjRatio") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            convSpeedAdjRatio = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "speedAdjDelayTimeEnter") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            speedAdjDelayTimeEnter = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "speedAdjDelayTimeExit") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            speedAdjDelayTimeExit = (float)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

    return __result;
}

bool FaceMeteringType::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, "enableFaceROI") == 0)
    {
        ParameterUtils::DoubleToString((double)enableFaceROI, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "weightTemporalFilter") == 0)
    {
        ParameterUtils::DoubleToString((double)weightTemporalFilter, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "centerWeightStrength") == 0)
    {
        ParameterUtils::DoubleToString((double)centerWeightStrength, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableLuxFaceTarget") == 0)
    {
        ParameterUtils::DoubleToString((double)enableLuxFaceTarget, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "luxFaceLumaTarget") == 0)
    {
        __result = luxFaceLumaTarget.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "statsUpdateDelayTimeEnter") == 0)
    {
        ParameterUtils::DoubleToString((double)statsUpdateDelayTimeEnter, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "statsUpdateDelayTimeExit") == 0)
    {
        ParameterUtils::DoubleToString((double)statsUpdateDelayTimeExit, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableEtrColor") == 0)
    {
        ParameterUtils::DoubleToString((double)enableEtrColor, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableBackLitComp") == 0)
    {
        ParameterUtils::DoubleToString((double)enableBackLitComp, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "backlitWeighttAdjSettings") == 0)
    {
        __result = backlitWeighttAdjSettings.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "thresBackLitLumaRatio") == 0)
    {
        __result = thresBackLitLumaRatio.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "SensorHDRFaceMeteringType") == 0)
    {
        __result = SensorHDRFaceMeteringType.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "enableHistLumaTargetSuppression") == 0)
    {
        ParameterUtils::DoubleToString((double)enableHistLumaTargetSuppression, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "faceWeight") == 0)
    {
        __result = faceWeight.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "faceLumaWeightLuxIndexTrigger") == 0)
    {
        __result = faceLumaWeightLuxIndexTrigger.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "faceSize") == 0)
    {
        __result = faceSize.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "faceSizeWeightLuxIndexTrigger") == 0)
    {
        __result = faceSizeWeightLuxIndexTrigger.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "ROIShape") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)ROIShape, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool FaceMeteringType::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, "enableFaceROI") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableFaceROI = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "weightTemporalFilter") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            weightTemporalFilter = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "centerWeightStrength") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            centerWeightStrength = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableLuxFaceTarget") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableLuxFaceTarget = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "luxFaceLumaTarget") == 0)
    {
        __result = luxFaceLumaTarget.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "statsUpdateDelayTimeEnter") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            statsUpdateDelayTimeEnter = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "statsUpdateDelayTimeExit") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            statsUpdateDelayTimeExit = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableEtrColor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableEtrColor = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableBackLitComp") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableBackLitComp = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "backlitWeighttAdjSettings") == 0)
    {
        __result = backlitWeighttAdjSettings.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "thresBackLitLumaRatio") == 0)
    {
        __result = thresBackLitLumaRatio.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "SensorHDRFaceMeteringType") == 0)
    {
        __result = SensorHDRFaceMeteringType.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "enableHistLumaTargetSuppression") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableHistLumaTargetSuppression = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "faceWeight") == 0)
    {
        __result = faceWeight.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "faceLumaWeightLuxIndexTrigger") == 0)
    {
        __result = faceLumaWeightLuxIndexTrigger.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "faceSize") == 0)
    {
        __result = faceSize.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "faceSizeWeightLuxIndexTrigger") == 0)
    {
        __result = faceSizeWeightLuxIndexTrigger.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "ROIShape") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            ROIShape = (aecglobalelements::AECMeteringROIShapeType)(UINT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    return __result;
}

bool FaceMeteringType::SensorHDRFaceMeteringTypeStruct::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, "FaceROIFactor") == 0)
    {
        ParameterUtils::DoubleToString((double)FaceROIFactor, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableFrontLitComp") == 0)
    {
        ParameterUtils::DoubleToString((double)enableFrontLitComp, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "frontlitWeighttAdjSettings") == 0)
    {
        __result = frontlitWeighttAdjSettings.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "thresFrontLitLumaRatio") == 0)
    {
        __result = thresFrontLitLumaRatio.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool FaceMeteringType::SensorHDRFaceMeteringTypeStruct::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, "FaceROIFactor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            FaceROIFactor = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableFrontLitComp") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableFrontLitComp = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "frontlitWeighttAdjSettings") == 0)
    {
        __result = frontlitWeighttAdjSettings.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "thresFrontLitLumaRatio") == 0)
    {
        __result = thresFrontLitLumaRatio.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

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

    return __result;
}

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

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

    return __result;
}

bool AECFaceType::statsROIProcessStruct::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, "statsROIProcessEnable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            statsROIProcessEnable = (statsglobalelements::glbEnableFlagType)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "statsROIPriority") == 0)
    {
        __result = statsROIPriority.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "statsROIStable") == 0)
    {
        __result = statsROIStable.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

    return __result;
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECFaceTypeClass::AECFaceTypeClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(faceMtr);
    PARAMETER_INITIALIZE(faceConv);
    PARAMETER_INITIALIZE(statsROIProcess);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECFaceTypeClass::AECFaceTypeClass(
    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(faceMtr);
    PARAMETER_INITIALIZE(faceConv);
    PARAMETER_INITIALIZE(statsROIProcess);
}

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

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

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

    PARAMETER_INITIALIZE(convSpeedAdjRatio);
    PARAMETER_INITIALIZE(speedAdjDelayTimeEnter);
    PARAMETER_INITIALIZE(speedAdjDelayTimeExit);

    SYMBOL_TABLE_ENTRY_READ(entry, result, convSpeedAdjRatio, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, speedAdjDelayTimeEnter, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, speedAdjDelayTimeExit, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(enableFaceROI);
    PARAMETER_INITIALIZE(weightTemporalFilter);
    PARAMETER_INITIALIZE(centerWeightStrength);
    PARAMETER_INITIALIZE(enableLuxFaceTarget);
    PARAMETER_INITIALIZE(luxFaceLumaTarget);
    PARAMETER_INITIALIZE(statsUpdateDelayTimeEnter);
    PARAMETER_INITIALIZE(statsUpdateDelayTimeExit);
    PARAMETER_INITIALIZE(enableEtrColor);
    PARAMETER_INITIALIZE(enableBackLitComp);
    PARAMETER_INITIALIZE(backlitWeighttAdjSettings);
    PARAMETER_INITIALIZE(thresBackLitLumaRatio);
    PARAMETER_INITIALIZE(SensorHDRFaceMeteringType);
    PARAMETER_INITIALIZE(enableHistLumaTargetSuppression);
    PARAMETER_INITIALIZE(faceWeight);
    PARAMETER_INITIALIZE(faceLumaWeightLuxIndexTrigger);
    PARAMETER_INITIALIZE(faceSize);
    PARAMETER_INITIALIZE(faceSizeWeightLuxIndexTrigger);
    PARAMETER_INITIALIZE(ROIShape);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableFaceROI, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, weightTemporalFilter, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, centerWeightStrength, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableLuxFaceTarget, alignment)
    if (result)
    {
        result = luxFaceLumaTarget.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, statsUpdateDelayTimeEnter, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, statsUpdateDelayTimeExit, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableEtrColor, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableBackLitComp, alignment)
    if (result)
    {
        result = backlitWeighttAdjSettings.Load(entry, alignment);
    }
    if (result)
    {
        result = thresBackLitLumaRatio.Load(entry, alignment);
    }
    if (result)
    {
        result = SensorHDRFaceMeteringType.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableHistLumaTargetSuppression, alignment)
    if (result)
    {
        result = faceWeight.Load(entry, alignment);
    }
    if (result)
    {
        result = faceLumaWeightLuxIndexTrigger.Load(entry, alignment);
    }
    if (result)
    {
        result = faceSize.Load(entry, alignment);
    }
    if (result)
    {
        result = faceSizeWeightLuxIndexTrigger.Load(entry, alignment);
    }
    if (result)
    {
        result = aecglobalelements::ReadEnum_AECMeteringROIShapeType(entry, ROIShape, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(FaceROIFactor);
    PARAMETER_INITIALIZE(enableFrontLitComp);
    PARAMETER_INITIALIZE(frontlitWeighttAdjSettings);
    PARAMETER_INITIALIZE(thresFrontLitLumaRatio);

    SYMBOL_TABLE_ENTRY_READ(entry, result, FaceROIFactor, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableFrontLitComp, alignment)
    if (result)
    {
        result = frontlitWeighttAdjSettings.Load(entry, alignment);
    }
    if (result)
    {
        result = thresFrontLitLumaRatio.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(enableFaceLumaTrigger);
    PARAMETER_INITIALIZE(LuxFaceLumaWeight);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableFaceLumaTrigger, alignment)
    if (result)
    {
        result = LuxFaceLumaWeight.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(enableFaceSizeTrigger);
    PARAMETER_INITIALIZE(LuxFaceSizeWeight);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableFaceSizeTrigger, alignment)
    if (result)
    {
        result = LuxFaceSizeWeight.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(faceMtr);
    PARAMETER_INITIALIZE(faceConv);
    PARAMETER_INITIALIZE(statsROIProcess);

    result = module_version.Load(entry, alignment);
    if (result)
    {
        result = parameter_version.Load(entry, alignment);
    }
    if (result)
    {
        result = faceMtr.Load(entry, alignment);
    }
    if (result)
    {
        result = faceConv.Load(entry, alignment);
    }
    if (result)
    {
        result = statsROIProcess.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool AECFaceType::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 AECFaceType::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;
}

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

    PARAMETER_INITIALIZE(statsROIProcessEnable);
    PARAMETER_INITIALIZE(statsROIPriority);
    PARAMETER_INITIALIZE(statsROIStable);

    SYMBOL_TABLE_ENTRY_READ(entry, result, statsROIProcessEnable, alignment)
    if (result)
    {
        result = statsROIPriority.Load(entry, alignment);
    }
    if (result)
    {
        result = statsROIStable.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload FaceMeteringType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void FaceMeteringType::Unload(ParameterFileSymbolTable* const __table)
{
    luxFaceLumaTarget.Unload(__table);
    faceLumaWeightLuxIndexTrigger.Unload(__table);
    faceSizeWeightLuxIndexTrigger.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload FaceMeteringType_faceLumaWeightLuxIndexTriggerStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void FaceMeteringType::faceLumaWeightLuxIndexTriggerStruct::Unload(ParameterFileSymbolTable* const __table)
{
    LuxFaceLumaWeight.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload FaceMeteringType_faceSizeWeightLuxIndexTriggerStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void FaceMeteringType::faceSizeWeightLuxIndexTriggerStruct::Unload(ParameterFileSymbolTable* const __table)
{
    LuxFaceSizeWeight.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECFaceType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECFaceType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
    faceMtr.Unload(__table);
    statsROIProcess.Unload(__table);
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload statsROIProcessStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECFaceType::statsROIProcessStruct::Unload(ParameterFileSymbolTable* const __table)
{
    statsROIPriority.Unload(__table);
    statsROIStable.Unload(__table);
}

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Create module, and return a new object
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ParameterModule* AECFaceTypeClass::Create(
    ModuleData*    moduleData,
    DefaultModule* const defModule) const
{
    AECFaceTypeClass* 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 = (AECFaceTypeClass*)module;
        }
        else
        {
            cls = PARAMETER_NEW AECFaceTypeClass(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 AECFaceTypeClass, binary version (%lld) does not match source version (%lld)\n",
            moduleData->Version.Value, Version.Value);
    }
    else
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create AECFaceTypeClass, binary name (%s) does not match source name (%s)\n",
            moduleData->Type, Type);
    }

    return (ParameterModule*)cls;
}

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

    if (!Loaded)
    {
        BYTE const alignment = table->Alignment;
        AECFaceTypeClass* 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, "AECFaceTypeClass::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 AECFaceTypeClass::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 AECFaceTypeClass::Release()
{
    ParameterModule::Release();
}

AECFACE_NAMESPACE_END
