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

#include "afdepthafelements.h"
#include "parametersetmanager.h"

AFDEPTHAFELEMENTS_NAMESPACE_BEGIN

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

    return __result;
}

bool chromatixConcurrentDepthAF::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 = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "positionThreshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            positionThreshold = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "moveStep") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            moveStep = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "gyroThreshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            gyroThreshold = (float)dblValue; 
        }
    }

    return __result;
}

bool chromatixConcurrentDepthAF::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::UInt32, (double)enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt32, (double)enable, 0));
    }

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

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

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

    return __result;
}

bool chromatixDepthAFFocusEntryType::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, "startPosition") == 0)
    {
        ParameterUtils::DoubleToString((double)startPosition, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "endPosition") == 0)
    {
        ParameterUtils::DoubleToString((double)endPosition, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "focusDoneThreshold") == 0)
    {
        ParameterUtils::DoubleToString((double)focusDoneThreshold, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "fineScanStepSize") == 0)
    {
        ParameterUtils::DoubleToString((double)fineScanStepSize, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "stepsRangeNear") == 0)
    {
        ParameterUtils::DoubleToString((double)stepsRangeNear, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "stepsRangeFar") == 0)
    {
        ParameterUtils::DoubleToString((double)stepsRangeFar, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool chromatixDepthAFFocusEntryType::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, "startPosition") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            startPosition = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "endPosition") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            endPosition = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "focusDoneThreshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            focusDoneThreshold = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "fineScanStepSize") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            fineScanStepSize = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "stepsRangeNear") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            stepsRangeNear = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "stepsRangeFar") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            stepsRangeFar = (INT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

    return __result;
}

bool chromatixDepthAFConverge::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, "waitConfidenceRecoverCount") == 0)
    {
        ParameterUtils::DoubleToString((double)waitConfidenceRecoverCount, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "frameSkip") == 0)
    {
        ParameterUtils::DoubleToString((double)frameSkip, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "normalLight") == 0)
    {
        __result = normalLight.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "lowlight") == 0)
    {
        __result = lowlight.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "concurrentControl") == 0)
    {
        __result = concurrentControl.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool chromatixDepthAFConverge::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, "waitConfidenceRecoverCount") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            waitConfidenceRecoverCount = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "frameSkip") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            frameSkip = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "normalLight") == 0)
    {
        __result = normalLight.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "lowlight") == 0)
    {
        __result = lowlight.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "concurrentControl") == 0)
    {
        __result = concurrentControl.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

    return __result;
}

bool chromatixDepthAFWindowConfigure::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, "horizontalGridCount") == 0)
    {
        ParameterUtils::DoubleToString((double)horizontalGridCount, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "verticalGridCount") == 0)
    {
        ParameterUtils::DoubleToString((double)verticalGridCount, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "horizontalSkip") == 0)
    {
        ParameterUtils::DoubleToString((double)horizontalSkip, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "verticalSkip") == 0)
    {
        ParameterUtils::DoubleToString((double)verticalSkip, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "minConfidentPixelPercentage") == 0)
    {
        ParameterUtils::DoubleToString((double)minConfidentPixelPercentage, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "minConfidentGridPercentage") == 0)
    {
        ParameterUtils::DoubleToString((double)minConfidentGridPercentage, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "defocusPercentile") == 0)
    {
        ParameterUtils::DoubleToString((double)defocusPercentile, __value, __size);
        __result = true;
    }

    return __result;
}

bool chromatixDepthAFWindowConfigure::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, "horizontalGridCount") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            horizontalGridCount = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "verticalGridCount") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            verticalGridCount = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "horizontalSkip") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            horizontalSkip = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "verticalSkip") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            verticalSkip = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "minConfidentPixelPercentage") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            minConfidentPixelPercentage = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "minConfidentGridPercentage") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            minConfidentGridPercentage = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "defocusPercentile") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            defocusPercentile = (float)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

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

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

    return __result;
}

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

    return __result;
}

bool chromatixDepthAFConfidenceEntryType::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, "startLuxIndex") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            startLuxIndex = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "endLuxIndex") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            endLuxIndex = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "threshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            threshold = (INT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

    return __result;
}

bool chromatixDepthAFFOVMapType::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, "DepthSensorOrientation") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)DepthSensorOrientation, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "cameraAngleOfView") == 0)
    {
        ParameterUtils::DoubleToString((double)cameraAngleOfView, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "DepthSensorAngleOfView") == 0)
    {
        ParameterUtils::DoubleToString((double)DepthSensorAngleOfView, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "DepthSensorHorizontalShift") == 0)
    {
        ParameterUtils::DoubleToString((double)DepthSensorHorizontalShift, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "DepthSensorVerticalShift") == 0)
    {
        ParameterUtils::DoubleToString((double)DepthSensorVerticalShift, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "horizontalOffset") == 0)
    {
        ParameterUtils::DoubleToString((double)horizontalOffset, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "verticalOffset") == 0)
    {
        ParameterUtils::DoubleToString((double)verticalOffset, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "horizontalCoverage") == 0)
    {
        ParameterUtils::DoubleToString((double)horizontalCoverage, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "verticalCoverage") == 0)
    {
        ParameterUtils::DoubleToString((double)verticalCoverage, __value, __size);
        __result = true;
    }

    return __result;
}

bool chromatixDepthAFFOVMapType::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, "DepthSensorOrientation") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            DepthSensorOrientation = (DepthSensorFlipType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "cameraAngleOfView") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            cameraAngleOfView = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "DepthSensorAngleOfView") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            DepthSensorAngleOfView = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "DepthSensorHorizontalShift") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            DepthSensorHorizontalShift = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "DepthSensorVerticalShift") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            DepthSensorVerticalShift = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "horizontalOffset") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            horizontalOffset = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "verticalOffset") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            verticalOffset = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "horizontalCoverage") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            horizontalCoverage = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "verticalCoverage") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            verticalCoverage = (float)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

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

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

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

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

    return __result;
}

bool chromatixDepthAFStats::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, "minimalDistance") == 0)
    {
        ParameterUtils::DoubleToString((double)minimalDistance, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "maximumDistance") == 0)
    {
        ParameterUtils::DoubleToString((double)maximumDistance, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "flatROIThreshold") == 0)
    {
        ParameterUtils::DoubleToString((double)flatROIThreshold, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableFlareRemoval") == 0)
    {
        ParameterUtils::DoubleToString((double)enableFlareRemoval, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "fovMap") == 0)
    {
        __result = fovMap.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "confidenceTable") == 0)
    {
        __result = confidenceTable.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "center") == 0)
    {
        __result = center.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "peripheral") == 0)
    {
        __result = peripheral.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "touch") == 0)
    {
        __result = touch.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "face") == 0)
    {
        __result = face.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool chromatixDepthAFStats::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, "minimalDistance") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            minimalDistance = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "maximumDistance") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            maximumDistance = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "flatROIThreshold") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            flatROIThreshold = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableFlareRemoval") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableFlareRemoval = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "fovMap") == 0)
    {
        __result = fovMap.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "confidenceTable") == 0)
    {
        __result = confidenceTable.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "center") == 0)
    {
        __result = center.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "peripheral") == 0)
    {
        __result = peripheral.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "touch") == 0)
    {
        __result = touch.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "face") == 0)
    {
        __result = face.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

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

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

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

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

    return __result;
}

bool chromatixDepthAFType::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 chromatixDepthAFType::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 chromatixDepthAFType::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 chromatixDepthAFType::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 chromatixDepthAFType::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 chromatixDepthAFType::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_DepthSensorFlipType(
    ParameterFileSymbolTableEntry* const entry,
    DepthSensorFlipType& enumValue,
    BYTE const alignment)
{
    bool result {false};

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

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


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
chromatixDepthAFTypeClass::chromatixDepthAFTypeClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(stats);
    PARAMETER_INITIALIZE(monitor);
    PARAMETER_INITIALIZE(converge);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
chromatixDepthAFTypeClass::chromatixDepthAFTypeClass(
    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(stats);
    PARAMETER_INITIALIZE(monitor);
    PARAMETER_INITIALIZE(converge);
}

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

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

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

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(positionThreshold);
    PARAMETER_INITIALIZE(moveStep);
    PARAMETER_INITIALIZE(gyroThreshold);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, positionThreshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, moveStep, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, gyroThreshold, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(startPosition);
    PARAMETER_INITIALIZE(endPosition);
    PARAMETER_INITIALIZE(focusDoneThreshold);
    PARAMETER_INITIALIZE(fineScanStepSize);
    PARAMETER_INITIALIZE(stepsRangeNear);
    PARAMETER_INITIALIZE(stepsRangeFar);

    SYMBOL_TABLE_ENTRY_READ(entry, result, startPosition, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, endPosition, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, focusDoneThreshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, fineScanStepSize, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, stepsRangeNear, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, stepsRangeFar, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(entries);


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

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

    return result;
}

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

    PARAMETER_INITIALIZE(waitConfidenceRecoverCount);
    PARAMETER_INITIALIZE(frameSkip);
    PARAMETER_INITIALIZE(normalLight);
    PARAMETER_INITIALIZE(lowlight);
    PARAMETER_INITIALIZE(concurrentControl);

    SYMBOL_TABLE_ENTRY_READ(entry, result, waitConfidenceRecoverCount, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, frameSkip, alignment)
    if (result)
    {
        result = normalLight.Load(entry, alignment);
    }
    if (result)
    {
        result = lowlight.Load(entry, alignment);
    }
    if (result)
    {
        result = concurrentControl.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(normalizedLensPosition);
    PARAMETER_INITIALIZE(DOFScaler);

    SYMBOL_TABLE_ENTRY_READ(entry, result, normalizedLensPosition, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, DOFScaler, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(entries);


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

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

    return result;
}

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

    PARAMETER_INITIALIZE(DOFScalerTable);

    result = DOFScalerTable.Load(entry, alignment);

    return result;
}

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

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(horizontalGridCount);
    PARAMETER_INITIALIZE(verticalGridCount);
    PARAMETER_INITIALIZE(horizontalSkip);
    PARAMETER_INITIALIZE(verticalSkip);
    PARAMETER_INITIALIZE(minConfidentPixelPercentage);
    PARAMETER_INITIALIZE(minConfidentGridPercentage);
    PARAMETER_INITIALIZE(defocusPercentile);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, horizontalGridCount, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, verticalGridCount, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, horizontalSkip, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, verticalSkip, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, minConfidentPixelPercentage, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, minConfidentGridPercentage, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, defocusPercentile, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(startLuxIndex);
    PARAMETER_INITIALIZE(endLuxIndex);
    PARAMETER_INITIALIZE(threshold);

    SYMBOL_TABLE_ENTRY_READ(entry, result, startLuxIndex, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, endLuxIndex, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, threshold, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(entries);


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

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

    return result;
}

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

    PARAMETER_INITIALIZE(DepthSensorOrientation);
    PARAMETER_INITIALIZE(cameraAngleOfView);
    PARAMETER_INITIALIZE(DepthSensorAngleOfView);
    PARAMETER_INITIALIZE(DepthSensorHorizontalShift);
    PARAMETER_INITIALIZE(DepthSensorVerticalShift);
    PARAMETER_INITIALIZE(horizontalOffset);
    PARAMETER_INITIALIZE(verticalOffset);
    PARAMETER_INITIALIZE(horizontalCoverage);
    PARAMETER_INITIALIZE(verticalCoverage);

    result = afdepthafelements::ReadEnum_DepthSensorFlipType(entry, DepthSensorOrientation, alignment);
    SYMBOL_TABLE_ENTRY_READ(entry, result, cameraAngleOfView, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, DepthSensorAngleOfView, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, DepthSensorHorizontalShift, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, DepthSensorVerticalShift, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, horizontalOffset, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, verticalOffset, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, horizontalCoverage, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, verticalCoverage, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(minimalDistance);
    PARAMETER_INITIALIZE(maximumDistance);
    PARAMETER_INITIALIZE(flatROIThreshold);
    PARAMETER_INITIALIZE(enableFlareRemoval);
    PARAMETER_INITIALIZE(fovMap);
    PARAMETER_INITIALIZE(confidenceTable);
    PARAMETER_INITIALIZE(center);
    PARAMETER_INITIALIZE(peripheral);
    PARAMETER_INITIALIZE(touch);
    PARAMETER_INITIALIZE(face);

    SYMBOL_TABLE_ENTRY_READ(entry, result, minimalDistance, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maximumDistance, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, flatROIThreshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableFlareRemoval, alignment)
    if (result)
    {
        result = fovMap.Load(entry, alignment);
    }
    if (result)
    {
        result = confidenceTable.Load(entry, alignment);
    }
    if (result)
    {
        result = center.Load(entry, alignment);
    }
    if (result)
    {
        result = peripheral.Load(entry, alignment);
    }
    if (result)
    {
        result = touch.Load(entry, alignment);
    }
    if (result)
    {
        result = face.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(stats);
    PARAMETER_INITIALIZE(monitor);
    PARAMETER_INITIALIZE(converge);

    result = module_version.Load(entry, alignment);
    if (result)
    {
        result = parameter_version.Load(entry, alignment);
    }
    if (result)
    {
        result = stats.Load(entry, alignment);
    }
    if (result)
    {
        result = monitor.Load(entry, alignment);
    }
    if (result)
    {
        result = converge.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixDepthAFType::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 chromatixDepthAFType::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 chromatixDepthAFFocusType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixDepthAFFocusType::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(entries))
    {
        PARAMETER_DELETE[] entries;
    }
    entries = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixDepthAFConverge
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixDepthAFConverge::Unload(ParameterFileSymbolTable* const __table)
{
    normalLight.Unload(__table);
    lowlight.Unload(__table);
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixDepthAFMonitor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixDepthAFMonitor::Unload(ParameterFileSymbolTable* const __table)
{
    DOFScalerTable.Unload(__table);
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixDepthAFStats
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixDepthAFStats::Unload(ParameterFileSymbolTable* const __table)
{
    confidenceTable.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixDepthAFType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixDepthAFType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
    stats.Unload(__table);
    monitor.Unload(__table);
    converge.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload parameter_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixDepthAFType::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 chromatixDepthAFType::Release()
{
    ((chromatixDepthAFTypeClass*)this)->Release();
}

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

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

    return (ParameterModule*)cls;
}

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

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

AFDEPTHAFELEMENTS_NAMESPACE_END
