////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
// All rights reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// THIS IS AUTO-GENERATED CODE.  PLEASE DO NOT EDIT (File bug reports against tools).
///
/// Auto-generated by: Parameter Parser V7.4.1 (8cca6579792b9fcef3bc725ff070c5ec453c7c85)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

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

#include "aftofelements.h"
#include "parametersetmanager.h"

AFTOFELEMENTS_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool chromatixTOFFineScanType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

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

    if (PARAMETER_STRCMP(__name, "num_near_steps_near_direction") == 0)
    {
        ParameterUtils::DoubleToString((double)num_near_steps_near_direction, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "num_far_steps_near_direction") == 0)
    {
        ParameterUtils::DoubleToString((double)num_far_steps_near_direction, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "num_near_steps_far_direction") == 0)
    {
        ParameterUtils::DoubleToString((double)num_near_steps_far_direction, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "num_far_steps_far_direction") == 0)
    {
        ParameterUtils::DoubleToString((double)num_far_steps_far_direction, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "num_near_steps_far_converge_point") == 0)
    {
        ParameterUtils::DoubleToString((double)num_near_steps_far_converge_point, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "num_far_steps_far_converge_point") == 0)
    {
        ParameterUtils::DoubleToString((double)num_far_steps_far_converge_point, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "near_steps_far_direction_tof_conf") == 0)
    {
        ParameterUtils::DoubleToString((double)near_steps_far_direction_tof_conf, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "tof_step_size") == 0)
    {
        ParameterUtils::DoubleToString((double)tof_step_size, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "tof_step_size_low_light") == 0)
    {
        ParameterUtils::DoubleToString((double)tof_step_size_low_light, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "far_distance_fine_step_size") == 0)
    {
        ParameterUtils::DoubleToString((double)far_distance_fine_step_size, __value, __size, 0);
        __result = true;
    }

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "num_near_steps_near_direction") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            num_near_steps_near_direction = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "num_far_steps_near_direction") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            num_far_steps_near_direction = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "num_near_steps_far_direction") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            num_near_steps_far_direction = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "num_far_steps_far_direction") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            num_far_steps_far_direction = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "num_near_steps_far_converge_point") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            num_near_steps_far_converge_point = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "num_far_steps_far_converge_point") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            num_far_steps_far_converge_point = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "near_steps_far_direction_tof_conf") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            near_steps_far_direction_tof_conf = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "tof_step_size") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            tof_step_size = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "tof_step_size_low_light") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            tof_step_size_low_light = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "far_distance_fine_step_size") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            far_distance_fine_step_size = (INT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

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

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

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

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

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

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

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "jump_to_start_limit") == 0)
    {
        ParameterUtils::DoubleToString((double)jump_to_start_limit, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "jump_to_start_limit_low_light") == 0)
    {
        ParameterUtils::DoubleToString((double)jump_to_start_limit_low_light, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "start_pos_for_tof") == 0)
    {
        ParameterUtils::DoubleToString((double)start_pos_for_tof, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "far_converge_point") == 0)
    {
        ParameterUtils::DoubleToString((double)far_converge_point, __value, __size, 0);
        __result = true;
    }

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "jump_to_start_limit") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            jump_to_start_limit = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "jump_to_start_limit_low_light") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            jump_to_start_limit_low_light = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "start_pos_for_tof") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            start_pos_for_tof = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "far_converge_point") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            far_converge_point = (INT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "scene_change_distance_std_dev_thres") == 0)
    {
        ParameterUtils::DoubleToString((double)scene_change_distance_std_dev_thres, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "far_distance_unstable_cnt_factor") == 0)
    {
        ParameterUtils::DoubleToString((double)far_distance_unstable_cnt_factor, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "panning_stable_cnt") == 0)
    {
        ParameterUtils::DoubleToString((double)panning_stable_cnt, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "panning_stable_thres") == 0)
    {
        ParameterUtils::DoubleToString((double)panning_stable_thres, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "normal_light_cnt") == 0)
    {
        ParameterUtils::DoubleToString((double)normal_light_cnt, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "lowlight_cnt") == 0)
    {
        ParameterUtils::DoubleToString((double)lowlight_cnt, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "num_monitor_samples") == 0)
    {
        ParameterUtils::DoubleToString((double)num_monitor_samples, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "scene_change_distance_thres") == 0)
    {
        if (__index < scene_change_distance_thresCount)
        {
            ParameterUtils::DoubleToString((double)scene_change_distance_thres[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < scene_change_distance_thresCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)scene_change_distance_thres[i], &__value[__valuePos], (INT32)(__size - __valuePos), 0);
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "distance_region") == 0)
    {
        if (__index < distance_regionCount)
        {
            ParameterUtils::DoubleToString((double)distance_region[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < distance_regionCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)distance_region[i], &__value[__valuePos], (INT32)(__size - __valuePos), 0);
            }
            __result = true;
        }
    }

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "scene_change_distance_std_dev_thres") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            scene_change_distance_std_dev_thres = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "far_distance_unstable_cnt_factor") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            far_distance_unstable_cnt_factor = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "panning_stable_cnt") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            panning_stable_cnt = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "panning_stable_thres") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            panning_stable_thres = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "normal_light_cnt") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            normal_light_cnt = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "lowlight_cnt") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            lowlight_cnt = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "num_monitor_samples") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            num_monitor_samples = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "scene_change_distance_thres") == 0)
    {
        if (__index < scene_change_distance_thresCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                scene_change_distance_thres[__index] = (INT32)dblValue; 
            }
        }
        else
        {
            const SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __valuePos = 0;

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

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

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

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

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

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

    return __result;
}

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

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

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

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

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

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

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

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

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

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

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

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "frame_delay_focus_converge_bright_light") == 0)
    {
        ParameterUtils::DoubleToString((double)frame_delay_focus_converge_bright_light, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "frame_delay_focus_converge_low_light") == 0)
    {
        ParameterUtils::DoubleToString((double)frame_delay_focus_converge_low_light, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "frame_delay_fine_search_bright_light") == 0)
    {
        ParameterUtils::DoubleToString((double)frame_delay_fine_search_bright_light, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "frame_delay_fine_search_low_light") == 0)
    {
        ParameterUtils::DoubleToString((double)frame_delay_fine_search_low_light, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "frame_delay_outdoor_light") == 0)
    {
        ParameterUtils::DoubleToString((double)frame_delay_outdoor_light, __value, __size, 0);
        __result = true;
    }

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "frame_delay_focus_converge_bright_light") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            frame_delay_focus_converge_bright_light = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "frame_delay_focus_converge_low_light") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            frame_delay_focus_converge_low_light = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "frame_delay_fine_search_bright_light") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            frame_delay_fine_search_bright_light = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "frame_delay_fine_search_low_light") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            frame_delay_fine_search_low_light = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "frame_delay_outdoor_light") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            frame_delay_outdoor_light = (INT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

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

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "median_filter_enable") == 0)
    {
        ParameterUtils::DoubleToString((double)median_filter_enable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "median_filter_num_of_samples") == 0)
    {
        ParameterUtils::DoubleToString((double)median_filter_num_of_samples, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "average_filter_enable") == 0)
    {
        ParameterUtils::DoubleToString((double)average_filter_enable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "average_filter_num_of_samples") == 0)
    {
        ParameterUtils::DoubleToString((double)average_filter_num_of_samples, __value, __size, 0);
        __result = true;
    }

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "median_filter_enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            median_filter_enable = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "median_filter_num_of_samples") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            median_filter_num_of_samples = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "average_filter_enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            average_filter_enable = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "average_filter_num_of_samples") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            average_filter_num_of_samples = (INT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "use_custom_sensitivity") == 0)
    {
        ParameterUtils::DoubleToString((double)use_custom_sensitivity, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enable_sad_when_tof_is_conf") == 0)
    {
        ParameterUtils::DoubleToString((double)enable_sad_when_tof_is_conf, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "run_tof_in_outdoor_light_flag") == 0)
    {
        ParameterUtils::DoubleToString((double)run_tof_in_outdoor_light_flag, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "aec_wait_check_flag_enable") == 0)
    {
        ParameterUtils::DoubleToString((double)aec_wait_check_flag_enable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "far_scene_coarse_srch_enable") == 0)
    {
        ParameterUtils::DoubleToString((double)far_scene_coarse_srch_enable, __value, __size, 0);
        __result = true;
    }

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "use_custom_sensitivity") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            use_custom_sensitivity = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enable_sad_when_tof_is_conf") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enable_sad_when_tof_is_conf = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "run_tof_in_outdoor_light_flag") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            run_tof_in_outdoor_light_flag = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "aec_wait_check_flag_enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            aec_wait_check_flag_enable = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "far_scene_coarse_srch_enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            far_scene_coarse_srch_enable = (INT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

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

    return __result;
}

bool chromatixTOFType::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, "sensitivity") == 0)
    {
        ParameterUtils::DoubleToString((double)sensitivity, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "outdoorLuxIdx") == 0)
    {
        ParameterUtils::DoubleToString((double)outdoorLuxIdx, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "TOFFlag") == 0)
    {
        __result = TOFFlag.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "Filter") == 0)
    {
        __result = Filter.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "FrameDelay") == 0)
    {
        __result = FrameDelay.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "SceneChange") == 0)
    {
        __result = SceneChange.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "FocusConverge") == 0)
    {
        __result = FocusConverge.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "FineScan") == 0)
    {
        __result = FineScan.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool chromatixTOFType::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, "sensitivity") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            sensitivity = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "outdoorLuxIdx") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            outdoorLuxIdx = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "TOFFlag") == 0)
    {
        __result = TOFFlag.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "Filter") == 0)
    {
        __result = Filter.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "FrameDelay") == 0)
    {
        __result = FrameDelay.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "SceneChange") == 0)
    {
        __result = SceneChange.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "FocusConverge") == 0)
    {
        __result = FocusConverge.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "FineScan") == 0)
    {
        __result = FineScan.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
chromatixTOFTypeClass::chromatixTOFTypeClass(
    const CHAR* name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(sensitivity);
    PARAMETER_INITIALIZE(outdoorLuxIdx);
    PARAMETER_INITIALIZE(TOFFlag);
    PARAMETER_INITIALIZE(Filter);
    PARAMETER_INITIALIZE(FrameDelay);
    PARAMETER_INITIALIZE(SceneChange);
    PARAMETER_INITIALIZE(FocusConverge);
    PARAMETER_INITIALIZE(FineScan);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
chromatixTOFTypeClass::chromatixTOFTypeClass(
    const CHAR*       name,
    ModuleData* const moduleData)
    : ParameterModule(name, MAJOR, MINOR, PATCH, moduleData)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(sensitivity);
    PARAMETER_INITIALIZE(outdoorLuxIdx);
    PARAMETER_INITIALIZE(TOFFlag);
    PARAMETER_INITIALIZE(Filter);
    PARAMETER_INITIALIZE(FrameDelay);
    PARAMETER_INITIALIZE(SceneChange);
    PARAMETER_INITIALIZE(FocusConverge);
    PARAMETER_INITIALIZE(FineScan);
}

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


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixTOFFineScanType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixTOFFineScanType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(num_near_steps_near_direction);
    PARAMETER_INITIALIZE(num_far_steps_near_direction);
    PARAMETER_INITIALIZE(num_near_steps_far_direction);
    PARAMETER_INITIALIZE(num_far_steps_far_direction);
    PARAMETER_INITIALIZE(num_near_steps_far_converge_point);
    PARAMETER_INITIALIZE(num_far_steps_far_converge_point);
    PARAMETER_INITIALIZE(near_steps_far_direction_tof_conf);
    PARAMETER_INITIALIZE(tof_step_size);
    PARAMETER_INITIALIZE(tof_step_size_low_light);
    PARAMETER_INITIALIZE(far_distance_fine_step_size);

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

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

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

        localParams.NameHash = 0xe807f049317243b4;
        entry->ReadSimpleTypeFixedArray(&num_near_steps_near_direction, 1, localParams);
        localParams.NameHash = 0xed6aaf6bbcb966c8;
        entry->ReadSimpleTypeFixedArray(&num_far_steps_near_direction, 1, localParams);
        localParams.NameHash = 0xb6c536d0ade22caa;
        entry->ReadSimpleTypeFixedArray(&num_near_steps_far_direction, 1, localParams);
        localParams.NameHash = 0xc94ec6e404c4b4eb;
        entry->ReadSimpleTypeFixedArray(&num_far_steps_far_direction, 1, localParams);
        localParams.NameHash = 0xdfd37f85e0408ae9;
        entry->ReadSimpleTypeFixedArray(&num_near_steps_far_converge_point, 1, localParams);
        localParams.NameHash = 0xe69780a33cef74cf;
        entry->ReadSimpleTypeFixedArray(&num_far_steps_far_converge_point, 1, localParams);
        localParams.NameHash = 0xba311b79212b571f;
        entry->ReadSimpleTypeFixedArray(&near_steps_far_direction_tof_conf, 1, localParams);
        localParams.NameHash = 0xcd280cae5512f3fb;
        entry->ReadSimpleTypeFixedArray(&tof_step_size, 1, localParams);
        localParams.NameHash = 0x873fa1c48186e13e;
        entry->ReadSimpleTypeFixedArray(&tof_step_size_low_light, 1, localParams);
        localParams.NameHash = 0xabc4e3db011b4f75;
        entry->ReadSimpleTypeFixedArray(&far_distance_fine_step_size, 1, localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixTOFFocusConvergeType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixTOFFocusConvergeType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(jump_to_start_limit);
    PARAMETER_INITIALIZE(jump_to_start_limit_low_light);
    PARAMETER_INITIALIZE(start_pos_for_tof);
    PARAMETER_INITIALIZE(far_converge_point);

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

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

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

        localParams.NameHash = 0x907246a91e871a76;
        entry->ReadSimpleTypeFixedArray(&jump_to_start_limit, 1, localParams);
        localParams.NameHash = 0xe952ffb5df7de136;
        entry->ReadSimpleTypeFixedArray(&jump_to_start_limit_low_light, 1, localParams);
        localParams.NameHash = 0xaa05b28e4fdd15d4;
        entry->ReadSimpleTypeFixedArray(&start_pos_for_tof, 1, localParams);
        localParams.NameHash = 0xc7d2b092475c5d44;
        entry->ReadSimpleTypeFixedArray(&far_converge_point, 1, localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixTOFSceneChangeType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixTOFSceneChangeType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(scene_change_distance_std_dev_thres);
    PARAMETER_INITIALIZE(far_distance_unstable_cnt_factor);
    PARAMETER_INITIALIZE(panning_stable_cnt);
    PARAMETER_INITIALIZE(panning_stable_thres);
    PARAMETER_INITIALIZE(normal_light_cnt);
    PARAMETER_INITIALIZE(lowlight_cnt);
    PARAMETER_INITIALIZE(num_monitor_samples);
    PARAMETER_INITIALIZE(scene_change_distance_thresCount);
    PARAMETER_INITIALIZE(scene_change_distance_thres);
    PARAMETER_INITIALIZE(distance_regionCount);
    PARAMETER_INITIALIZE(distance_region);

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

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

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

        localParams.NameHash = 0xc5893897964e481d;
        entry->ReadSimpleTypeFixedArray(&scene_change_distance_std_dev_thres, 1, localParams);
        localParams.NameHash = 0xf9f707134cf001c0;
        entry->ReadSimpleTypeFixedArray(&far_distance_unstable_cnt_factor, 1, localParams);
        localParams.NameHash = 0xd96df3d96f6d56f0;
        entry->ReadSimpleTypeFixedArray(&panning_stable_cnt, 1, localParams);
        localParams.NameHash = 0xbc5fda1ee2a5dec8;
        entry->ReadSimpleTypeFixedArray(&panning_stable_thres, 1, localParams);
        localParams.NameHash = 0xd6261dd6207ace46;
        entry->ReadSimpleTypeFixedArray(&normal_light_cnt, 1, localParams);
        localParams.NameHash = 0x93ca010e738257ba;
        entry->ReadSimpleTypeFixedArray(&lowlight_cnt, 1, localParams);
        localParams.NameHash = 0xa7629cb60fcc5ba8;
        entry->ReadSimpleTypeFixedArray(&num_monitor_samples, 1, localParams);
        localParams.NameHash = 0xe262d83f1caba121;
        entry->ReadSimpleTypeArray(scene_change_distance_thres, scene_change_distance_thresCount, scene_change_distance_thresID, 1,
            localParams, __COUNTER__);
        localParams.NameHash = 0xd3d31ec361a5ce3f;
        entry->ReadSimpleTypeArray(distance_region, distance_regionCount, distance_regionID, 1,
            localParams, __COUNTER__);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixTOFFrameDelayType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixTOFFrameDelayType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(frame_delay_focus_converge_bright_light);
    PARAMETER_INITIALIZE(frame_delay_focus_converge_low_light);
    PARAMETER_INITIALIZE(frame_delay_fine_search_bright_light);
    PARAMETER_INITIALIZE(frame_delay_fine_search_low_light);
    PARAMETER_INITIALIZE(frame_delay_outdoor_light);

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

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

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

        localParams.NameHash = 0xf65a6bfae82d26d6;
        entry->ReadSimpleTypeFixedArray(&frame_delay_focus_converge_bright_light, 1, localParams);
        localParams.NameHash = 0xf7ba79455743f475;
        entry->ReadSimpleTypeFixedArray(&frame_delay_focus_converge_low_light, 1, localParams);
        localParams.NameHash = 0xd4ee1d98fcbfa767;
        entry->ReadSimpleTypeFixedArray(&frame_delay_fine_search_bright_light, 1, localParams);
        localParams.NameHash = 0xba9f134377707bbc;
        entry->ReadSimpleTypeFixedArray(&frame_delay_fine_search_low_light, 1, localParams);
        localParams.NameHash = 0xa73d0176043d5f81;
        entry->ReadSimpleTypeFixedArray(&frame_delay_outdoor_light, 1, localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixTOFFilterType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixTOFFilterType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(median_filter_enable);
    PARAMETER_INITIALIZE(median_filter_num_of_samples);
    PARAMETER_INITIALIZE(average_filter_enable);
    PARAMETER_INITIALIZE(average_filter_num_of_samples);

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

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

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

        localParams.NameHash = 0xe99e64610b06b8a9;
        entry->ReadSimpleTypeFixedArray(&median_filter_enable, 1, localParams);
        localParams.NameHash = 0xc3469abff82068fc;
        entry->ReadSimpleTypeFixedArray(&median_filter_num_of_samples, 1, localParams);
        localParams.NameHash = 0x8f317746bbaad063;
        entry->ReadSimpleTypeFixedArray(&average_filter_enable, 1, localParams);
        localParams.NameHash = 0xff579c024b4fad18;
        entry->ReadSimpleTypeFixedArray(&average_filter_num_of_samples, 1, localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixTOFFlagType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixTOFFlagType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(use_custom_sensitivity);
    PARAMETER_INITIALIZE(enable_sad_when_tof_is_conf);
    PARAMETER_INITIALIZE(run_tof_in_outdoor_light_flag);
    PARAMETER_INITIALIZE(aec_wait_check_flag_enable);
    PARAMETER_INITIALIZE(far_scene_coarse_srch_enable);

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

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

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

        localParams.NameHash = 0xe5427fbc0e70d836;
        entry->ReadSimpleTypeFixedArray(&use_custom_sensitivity, 1, localParams);
        localParams.NameHash = 0x9e48c61045320f60;
        entry->ReadSimpleTypeFixedArray(&enable_sad_when_tof_is_conf, 1, localParams);
        localParams.NameHash = 0xb51c8fd1fb7ce9d6;
        entry->ReadSimpleTypeFixedArray(&run_tof_in_outdoor_light_flag, 1, localParams);
        localParams.NameHash = 0xcb77378c592192ee;
        entry->ReadSimpleTypeFixedArray(&aec_wait_check_flag_enable, 1, localParams);
        localParams.NameHash = 0x83c9317eb6a1e6be;
        entry->ReadSimpleTypeFixedArray(&far_scene_coarse_srch_enable, 1, localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load chromatixTOFType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixTOFType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(sensitivity);
    PARAMETER_INITIALIZE(outdoorLuxIdx);
    PARAMETER_INITIALIZE(TOFFlag);
    PARAMETER_INITIALIZE(Filter);
    PARAMETER_INITIALIZE(FrameDelay);
    PARAMETER_INITIALIZE(SceneChange);
    PARAMETER_INITIALIZE(FocusConverge);
    PARAMETER_INITIALIZE(FineScan);

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

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

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

        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0xe11cd9f365a2599f;
        module_version.Load(localParams);
        localParams.NameHash        = 0xca3106e199a12935;
        parameter_version.Load(localParams);
        localParams.NameHash = 0x8aa3592494dd1625;
        entry->ReadSimpleTypeFixedArray(&sensitivity, 1, localParams);
        localParams.NameHash = 0x880f6314612b5971;
        entry->ReadSimpleTypeFixedArray(&outdoorLuxIdx, 1, localParams);
        localParams.NameHash        = 0x80686cc909abf704;
        TOFFlag.Load(localParams);
        localParams.NameHash        = 0xc2b6309df6428ea9;
        Filter.Load(localParams);
        localParams.NameHash        = 0xed7780bcbd03a772;
        FrameDelay.Load(localParams);
        localParams.NameHash        = 0xff128083992e0c5b;
        SceneChange.Load(localParams);
        localParams.NameHash        = 0x9fe61d0a59e65c3f;
        FocusConverge.Load(localParams);
        localParams.NameHash        = 0xd6fd11a896471242;
        FineScan.Load(localParams);

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixTOFType::module_versionStruct::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(major_revision);
    PARAMETER_INITIALIZE(minor_revision);
    PARAMETER_INITIALIZE(incr_revision);

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

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

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

        localParams.NameHash = 0xcd66249477636693;
        entry->ReadSimpleTypeFixedArray(&major_revision, 1, localParams);
        localParams.NameHash = 0xc5497493137a9c25;
        entry->ReadSimpleTypeFixedArray(&minor_revision, 1, localParams);
        localParams.NameHash = 0xb27b8a668efb2a56;
        entry->ReadSimpleTypeFixedArray(&incr_revision, 1, localParams);

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

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

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

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

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

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

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

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

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload chromatixTOFSceneChangeType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixTOFSceneChangeType::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, scene_change_distance_thres);
    ParameterFileSymbolTable::ReleaseObject(__table, distance_region);
}

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

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

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

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

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

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

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

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

        ParameterModule* const module = defModule->Find(id);
        if (module != nullptr)
        {
            cls = (chromatixTOFTypeClass*)module;
        }
        else
        {
            cls = PARAMETER_NEW chromatixTOFTypeClass(Name, moduleData);
            cls->SymbolTableID = id;
            defModule->AddModule((ParameterModule*)cls);
        }
    }
    else if (Version.Value != moduleData->Version.Value)
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create chromatixTOFTypeClass, binary version (%lld) does not match source version (%lld)\n",
            moduleData->Version.Value, Version.Value);
    }
    else
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create chromatixTOFTypeClass, binary name hash (0x%016llx) does not match source name hash (0x%016llx)\n",
            moduleData->NameHash, NameHash);
    }

    return (ParameterModule*)cls;
}

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

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

    if (!Loaded)
    {
        chromatixTOFTypeClass* const cls = this;

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

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


        ParameterDefinitionElement* _element = nullptr;
        if (table->ModuleDefinitions != nullptr && !table->ModuleDefinitions->empty())
        {
            _element = table->BuildModuleElement(NameHash);
        }

        ParameterLoadParameters parentParams(entry, NameHash, true, true, _element, entry->Position, 0, ParameterFileSymbolTableEntry::LOAD_LIMIT_MAX);
        cls->Load(parentParams);
        PARAMETER_DELETE _element;
        Modified++;
        Loaded = true;
    }

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

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload module data
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void chromatixTOFTypeClass::UnloadModule()
{
#ifdef PARAMETER_USE_MUTEX
    ParameterMutexLocker lock(Mutex); // Unique LOCK
#endif

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

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

AFTOFELEMENTS_NAMESPACE_END
