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

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

#include "ispglobalelements.h"
#include "parametersetmanager.h"

ISPGLOBALELEMENTS_NAMESPACE_BEGIN

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

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

    if (PARAMETER_STRCMP(__name, "exp_time_start") == 0)
    {
        ParameterUtils::DoubleToString((double)exp_time_start, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "exp_time_end") == 0)
    {
        ParameterUtils::DoubleToString((double)exp_time_end, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "aec_sensitivity_start") == 0)
    {
        ParameterUtils::DoubleToString((double)aec_sensitivity_start, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "aec_sensitivity_end") == 0)
    {
        ParameterUtils::DoubleToString((double)aec_sensitivity_end, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "exp_gain_start") == 0)
    {
        ParameterUtils::DoubleToString((double)exp_gain_start, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "exp_gain_end") == 0)
    {
        ParameterUtils::DoubleToString((double)exp_gain_end, __value, __size);
        __result = true;
    }

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "exp_time_start") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            exp_time_start = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "exp_time_end") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            exp_time_end = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "aec_sensitivity_start") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            aec_sensitivity_start = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "aec_sensitivity_end") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            aec_sensitivity_end = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "exp_gain_start") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            exp_gain_start = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "exp_gain_end") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            exp_gain_end = (float)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "start") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            start = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "end") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            end = (float)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "start1") == 0)
    {
        ParameterUtils::DoubleToString((double)start1, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "end1") == 0)
    {
        ParameterUtils::DoubleToString((double)end1, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "start2") == 0)
    {
        ParameterUtils::DoubleToString((double)start2, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "end2") == 0)
    {
        ParameterUtils::DoubleToString((double)end2, __value, __size);
        __result = true;
    }

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "start1") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            start1 = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "end1") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            end1 = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "start2") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            start2 = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "end2") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            end2 = (float)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

    return __result;
}

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

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(control_var_type::control_lux_idx):
            enumValue = control_var_type::control_lux_idx;
            result    = true;
            break;
        case static_cast<UINT32>(control_var_type::control_gain):
            enumValue = control_var_type::control_gain;
            result    = true;
            break;
        case static_cast<UINT32>(control_var_type::control_drc_gain):
            enumValue = control_var_type::control_drc_gain;
            result    = true;
            break;
        case static_cast<UINT32>(control_var_type::control_exp_time_ratio):
            enumValue = control_var_type::control_exp_time_ratio;
            result    = true;
            break;
        case static_cast<UINT32>(control_var_type::control_aec_exp_sensitivity_ratio):
            enumValue = control_var_type::control_aec_exp_sensitivity_ratio;
            result    = true;
            break;
        case static_cast<UINT32>(control_var_type::control_exp_gain_ratio):
            enumValue = control_var_type::control_exp_gain_ratio;
            result    = true;
            break;
        case static_cast<UINT32>(control_var_type::control_cct):
            enumValue = control_var_type::control_cct;
            result    = true;
            break;
        case static_cast<UINT32>(control_var_type::control_total_scale_ratio):
            enumValue = control_var_type::control_total_scale_ratio;
            result    = true;
            break;
        case static_cast<UINT32>(control_var_type::control_lens_position):
            enumValue = control_var_type::control_lens_position;
            result    = true;
            break;
        case static_cast<UINT32>(control_var_type::control_led_idx):
            enumValue = control_var_type::control_led_idx;
            result    = true;
            break;
        case static_cast<UINT32>(control_var_type::control_led_sensitivity):
            enumValue = control_var_type::control_led_sensitivity;
            result    = true;
            break;
        case static_cast<UINT32>(control_var_type::control_post_scale_ratio):
            enumValue = control_var_type::control_post_scale_ratio;
            result    = true;
            break;
        case static_cast<UINT32>(control_var_type::control_effective_gain):
            enumValue = control_var_type::control_effective_gain;
            result    = true;
            break;
        case static_cast<UINT32>(control_var_type::control_lens_zoom):
            enumValue = control_var_type::control_lens_zoom;
            result    = true;
            break;
        case static_cast<UINT32>(control_var_type::control_pre_scale_ratio):
            enumValue = control_var_type::control_pre_scale_ratio;
            result    = true;
            break;
        case static_cast<UINT32>(control_var_type::control_pass):
            enumValue = control_var_type::control_pass;
            result    = true;
            break;
        case static_cast<UINT32>(control_var_type::control_sr_scale_ratio):
            enumValue = control_var_type::control_sr_scale_ratio;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to control_var_type", uintValue);
            break;
        }
    }
    return result;
}

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

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

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

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

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

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

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

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

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

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

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(trigger_types::trigger_type_lux_idx):
            enumValue = trigger_types::trigger_type_lux_idx;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_gain):
            enumValue = trigger_types::trigger_type_gain;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_drc_gain):
            enumValue = trigger_types::trigger_type_drc_gain;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_exp_time_ratio):
            enumValue = trigger_types::trigger_type_exp_time_ratio;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_exp_gain_ratio):
            enumValue = trigger_types::trigger_type_exp_gain_ratio;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_aec_exp_sensitivity_ratio):
            enumValue = trigger_types::trigger_type_aec_exp_sensitivity_ratio;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_cct):
            enumValue = trigger_types::trigger_type_cct;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_hdr_mode):
            enumValue = trigger_types::trigger_type_hdr_mode;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_lens_position):
            enumValue = trigger_types::trigger_type_lens_position;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_lens_zoom):
            enumValue = trigger_types::trigger_type_lens_zoom;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_led_sensitivity):
            enumValue = trigger_types::trigger_type_led_sensitivity;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_ife_scale_ratio):
            enumValue = trigger_types::trigger_type_ife_scale_ratio;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_effective_gain):
            enumValue = trigger_types::trigger_type_effective_gain;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_pre_nr_scale_ratio):
            enumValue = trigger_types::trigger_type_pre_nr_scale_ratio;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_post_nr_scale_ratio):
            enumValue = trigger_types::trigger_type_post_nr_scale_ratio;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_sr_scale_ratio):
            enumValue = trigger_types::trigger_type_sr_scale_ratio;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_total_scale_ratio):
            enumValue = trigger_types::trigger_type_total_scale_ratio;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_t2t3_aec_exp_sensitivity_ratio):
            enumValue = trigger_types::trigger_type_t2t3_aec_exp_sensitivity_ratio;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_t1t2_aec_exp_sensitivity_ratio):
            enumValue = trigger_types::trigger_type_t1t2_aec_exp_sensitivity_ratio;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_instance):
            enumValue = trigger_types::trigger_type_instance;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_color_format):
            enumValue = trigger_types::trigger_type_color_format;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_led_idx):
            enumValue = trigger_types::trigger_type_led_idx;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_aec1):
            enumValue = trigger_types::trigger_type_custom_aec1;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_awb1):
            enumValue = trigger_types::trigger_type_custom_awb1;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_af1):
            enumValue = trigger_types::trigger_type_custom_af1;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_reserved1):
            enumValue = trigger_types::trigger_type_custom_reserved1;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_aec2):
            enumValue = trigger_types::trigger_type_custom_aec2;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_awb2):
            enumValue = trigger_types::trigger_type_custom_awb2;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_af2):
            enumValue = trigger_types::trigger_type_custom_af2;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_reserved2):
            enumValue = trigger_types::trigger_type_custom_reserved2;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_aec3):
            enumValue = trigger_types::trigger_type_custom_aec3;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_awb3):
            enumValue = trigger_types::trigger_type_custom_awb3;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_af3):
            enumValue = trigger_types::trigger_type_custom_af3;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_reserved3):
            enumValue = trigger_types::trigger_type_custom_reserved3;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_aec4):
            enumValue = trigger_types::trigger_type_custom_aec4;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_awb4):
            enumValue = trigger_types::trigger_type_custom_awb4;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_af4):
            enumValue = trigger_types::trigger_type_custom_af4;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_reserved4):
            enumValue = trigger_types::trigger_type_custom_reserved4;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_aec5):
            enumValue = trigger_types::trigger_type_custom_aec5;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_awb5):
            enumValue = trigger_types::trigger_type_custom_awb5;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_af5):
            enumValue = trigger_types::trigger_type_custom_af5;
            result    = true;
            break;
        case static_cast<UINT32>(trigger_types::trigger_type_custom_reserved5):
            enumValue = trigger_types::trigger_type_custom_reserved5;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to trigger_types", uintValue);
            break;
        }
    }
    return result;
}

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

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

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

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

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

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

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

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

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

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

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

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



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

    PARAMETER_INITIALIZE(exp_time_start);
    PARAMETER_INITIALIZE(exp_time_end);
    PARAMETER_INITIALIZE(aec_sensitivity_start);
    PARAMETER_INITIALIZE(aec_sensitivity_end);
    PARAMETER_INITIALIZE(exp_gain_start);
    PARAMETER_INITIALIZE(exp_gain_end);

    SYMBOL_TABLE_ENTRY_READ(entry, result, exp_time_start, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, exp_time_end, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, aec_sensitivity_start, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, aec_sensitivity_end, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, exp_gain_start, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, exp_gain_end, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(start);
    PARAMETER_INITIALIZE(end);

    SYMBOL_TABLE_ENTRY_READ(entry, result, start, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, end, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(start1);
    PARAMETER_INITIALIZE(end1);
    PARAMETER_INITIALIZE(start2);
    PARAMETER_INITIALIZE(end2);

    SYMBOL_TABLE_ENTRY_READ(entry, result, start1, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, end1, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, start2, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, end2, alignment)

    return result;
}
ISPGLOBALELEMENTS_NAMESPACE_END
