/**
 * @file hv_res_OsdUserdata.c
 * @brief Auto Generate by HiView OSD Designer, Do Not Edit Manually !
 * @author HiView SoC Software Team
 * @version 1.0.0
 * @date 2023-11-09
 * @copyright Copyright(c),2023-11, HiView Software. All rights reserved.
 * @par History:
 * <table>
 * <tr><th>Author         <th>Date        <th>Change Description
 * <tr><td>OSD Group      <td>2023-11-09<td>create
 * </table>
 */

#include "hv_comm_DataBase.h"
#include "hv_res_OsdUserdata.h"

/********************************** ATTENTION!!! **********************************
请手动在 hv_app_Function.c 的 Hv_App_SetFuncInterface 函数中添加对应 E_USERDATA_XXX 的Set接口调用
请手动在 hv_app_Function.c 的 Hv_App_GetRealValue 函数中添加对应 E_USERDATA_XXX 的Get接口调用及default值获取
*/

static OsdUserdataParam s_stOsdUserdata;

#define OSD_USERDATA_SET(param, value)   (s_stOsdUserdata.param = value)
#define OSD_USERDATA_GET(param)          (s_stOsdUserdata.param)

VOID Hv_App_OsdSetUserdata(UserdataId enWhichData, SHORT16 sValue)
{
    switch (enWhichData)
    {
        case E_USERDATA_VIDEO_SOURCE:
        {
            OSD_USERDATA_SET(ucVideoSource, sValue);
            break;
        }
        case E_USERDATA_BRIGHTNESS:
        {
            OSD_USERDATA_SET(ucBrightness, sValue);
            break;
        }
#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_BLACK_LEVEL)
        case E_USERDATA_BLACK_LEVEL:
        {
            OSD_USERDATA_SET(ucBlackLevel, sValue);
            break;
        }
#endif
        case E_USERDATA_CONTRAST:
        {
            OSD_USERDATA_SET(ucContrast, sValue);
            break;
        }
#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_VARIABLEBACKLIGHT)
        case E_USERDATA_VARIABLE_BACK_LIGHT:
        {
            OSD_USERDATA_SET(bVariableBackLight, sValue);
            break;
        }
#endif
        case E_USERDATA_GAMMA:
        {
            OSD_USERDATA_SET(ucGamma, sValue);
            break;
        }
        case E_USERDATA_DISPLAY_MODE:
        {
            OSD_USERDATA_SET(ucDisplayMode, sValue);
            break;
        }
        case E_USERDATA_COLOR_TEMP:
        {
            OSD_USERDATA_SET(ucColorTemp, sValue);
            break;
        }
        case E_USERDATA_RED:
        {
            OSD_USERDATA_SET(ucRed, sValue);
            break;
        }
        case E_USERDATA_GREEN:
        {
            OSD_USERDATA_SET(ucGreen, sValue);
            break;
        }
        case E_USERDATA_BLUE:
        {
            OSD_USERDATA_SET(ucBlue, sValue);
            break;
        }
        case E_USERDATA_LOW_BLUE_LIGHT:
        {
            OSD_USERDATA_SET(ucLowBlueLight, sValue);
            break;
        }
        case E_USERDATA_HUE:
        {
            OSD_USERDATA_SET(ucHue, sValue);
            break;
        }
        case E_USERDATA_SATURATION:
        {
            OSD_USERDATA_SET(ucSaturation, sValue);
            break;
        }
        case E_USERDATA_COLOR_SPACE:
        {
            OSD_USERDATA_SET(ucColorSpace, sValue);
            break;
        }
        case E_USERDATA_SHARPNESS:
        {
            OSD_USERDATA_SET(ucSharpness, sValue);
            break;
        }
        case E_USERDATA_RESPONSE_TIME:
        {
            OSD_USERDATA_SET(ucResponseTime, sValue);
            break;
        }
#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_MPRT)
        case E_USERDATA_MPRT:
        {
            OSD_USERDATA_SET(ucMprt, sValue);
            break;
        }
#endif
        case E_USERDATA_DISPLAY_SIZE:
        {
            OSD_USERDATA_SET(ucDisplaySize, sValue);
            break;
        }
        case E_USERDATA_MUTE:
        {
            OSD_USERDATA_SET(ucMute, sValue);
            break;
        }
        case E_USERDATA_VOLUME:
        {
            OSD_USERDATA_SET(ucVolume, sValue);
            break;
        }
        case E_USERDATA_LANGUAGE:
        {
            OSD_USERDATA_SET(ucLanguage, sValue);
            break;
        }
        case E_USERDATA_MENU_HPOS:
        {
            OSD_USERDATA_SET(ucMenuHPos, sValue);
            break;
        }
        case E_USERDATA_MENU_VPOS:
        {
            OSD_USERDATA_SET(ucMenuVPos, sValue);
            break;
        }
        case E_USERDATA_OSD_TRANS:
        {
            OSD_USERDATA_SET(ucOsdTrans, sValue);
            break;
        }
        case E_USERDATA_OSD_TIME:
        {
            OSD_USERDATA_SET(ucOsdTime, sValue);
            break;
        }
#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_OSD_ROTATION)
        case E_USERDATA_ROTATION:
        {
            OSD_USERDATA_SET(ucRotation, sValue);
            break;
        }
#endif
#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_FREESYNC)
        case E_USERDATA_FREESYNC:
        {
            OSD_USERDATA_SET(ucFreesync, sValue);
            break;
        }
#endif
        case E_USERDATA_CROSSHAIR:
        {
            OSD_USERDATA_SET(ucCrosshair, sValue);
            break;
        }
        case E_USERDATA_REFRESH_RATE:
        {
            OSD_USERDATA_SET(ucRefreshRate, sValue);
            break;
        }
        case E_USERDATA_TIMER_COUNTER:
        {
            OSD_USERDATA_SET(ucTimerCounter, sValue);
            break;
        }
        case E_USERDATA_POWER_LED:
        {
            OSD_USERDATA_SET(ucPowerLed, sValue);
            break;
        }
        case E_USERDATA_CUSTOM_KEY1:
        {
            OSD_USERDATA_SET(ucCustomKey1, sValue);
            break;
        }
        case E_USERDATA_CUSTOM_KEY2:
        {
            OSD_USERDATA_SET(ucCustomKey2, sValue);
            break;
        }
        case E_USERDATA_CUSTOM_KEY3:
        {
            OSD_USERDATA_SET(ucCustomKey3, sValue);
            break;
        }
        case E_USERDATA_LIGHT_MODE:
        {
            OSD_USERDATA_SET(ucLightMode, sValue);
            break;
        }
        case E_USERDATA_STEADY_COLOR:
        {
            OSD_USERDATA_SET(ucSteadyColor, sValue);
            break;
        }
        case E_USERDATA_BREATHE_COLOR:
        {
            OSD_USERDATA_SET(ucBreatheColor, sValue);
            break;
        }
        case E_USERDATA_MARQUEEIN_COLOR:
        {
            OSD_USERDATA_SET(ucMarqueeInColor, sValue);
            break;
        }
        case E_USERDATA_MARQUEEOUT_COLOR:
        {
            OSD_USERDATA_SET(ucMarqueeOutColor, sValue);
            break;
        }
        case E_USERDATA_R_HUE:
        {
            OSD_USERDATA_SET(ucR_Hue, sValue);
            break;
        }
        case E_USERDATA_G_HUE:
        {
            OSD_USERDATA_SET(ucG_Hue, sValue);
            break;
        }
        case E_USERDATA_B_HUE:
        {
            OSD_USERDATA_SET(ucB_Hue, sValue);
            break;
        }
        case E_USERDATA_Y_HUE:
        {
            OSD_USERDATA_SET(ucY_Hue, sValue);
            break;
        }
        case E_USERDATA_M_HUE:
        {
            OSD_USERDATA_SET(ucM_Hue, sValue);
            break;
        }
        case E_USERDATA_C_HUE:
        {
            OSD_USERDATA_SET(ucC_Hue, sValue);
            break;
        }
        case E_USERDATA_R_SATURATE:
        {
            OSD_USERDATA_SET(ucR_Saturate, sValue);
            break;
        }
        case E_USERDATA_G_SATURATE:
        {
            OSD_USERDATA_SET(ucG_Saturate, sValue);
            break;
        }
        case E_USERDATA_B_SATURATE:
        {
            OSD_USERDATA_SET(ucB_Saturate, sValue);
            break;
        }
        case E_USERDATA_Y_SATURATE:
        {
            OSD_USERDATA_SET(ucY_Saturate, sValue);
            break;
        }
        case E_USERDATA_M_SATURATE:
        {
            OSD_USERDATA_SET(ucM_Saturate, sValue);
            break;
        }
        case E_USERDATA_C_SATURATE:
        {
            OSD_USERDATA_SET(ucC_Saturate, sValue);
            break;
        }
        default:
        {
            break;
        }
    }
}

#ifdef OSD_DEBUG_PRINT_NAME
static const CHAR8* s_apcUserdataNameTbl[E_USERDATA_MAX] = {
    [E_USERDATA_NONE] = "None",
    [E_USERDATA_VIDEO_SOURCE] = "ucVideoSource",
    [E_USERDATA_BRIGHTNESS] = "ucBrightness",
    [E_USERDATA_BLACK_LEVEL] = "ucBlackLevel",
    [E_USERDATA_CONTRAST] = "ucContrast",
    [E_USERDATA_VARIABLE_BACK_LIGHT] = "bVariableBackLight",
    [E_USERDATA_GAMMA] = "ucGamma",
    [E_USERDATA_DISPLAY_MODE] = "ucDisplayMode",
    [E_USERDATA_COLOR_TEMP] = "ucColorTemp",
    [E_USERDATA_RED] = "ucRed",
    [E_USERDATA_GREEN] = "ucGreen",
    [E_USERDATA_BLUE] = "ucBlue",
    [E_USERDATA_LOW_BLUE_LIGHT] = "ucLowBlueLight",
    [E_USERDATA_HUE] = "ucHue",
    [E_USERDATA_SATURATION] = "ucSaturation",
    [E_USERDATA_COLOR_SPACE] = "ucColorSpace",
    [E_USERDATA_SHARPNESS] = "ucSharpness",
    [E_USERDATA_RESPONSE_TIME] = "ucResponseTime",
    [E_USERDATA_MPRT] = "ucMprt",
    [E_USERDATA_DISPLAY_SIZE] = "ucDisplaySize",
    [E_USERDATA_MUTE] = "ucMute",
    [E_USERDATA_VOLUME] = "ucVolume",
    [E_USERDATA_LANGUAGE] = "ucLanguage",
    [E_USERDATA_MENU_HPOS] = "ucMenuHPos",
    [E_USERDATA_MENU_VPOS] = "ucMenuVPos",
    [E_USERDATA_OSD_TRANS] = "ucOsdTrans",
    [E_USERDATA_OSD_TIME] = "ucOsdTime",
    [E_USERDATA_ROTATION] = "ucRotation",
    [E_USERDATA_FREESYNC] = "ucFreesync",
    [E_USERDATA_CROSSHAIR] = "ucCrosshair",
    [E_USERDATA_REFRESH_RATE] = "ucRefreshRate",
    [E_USERDATA_TIMER_COUNTER] = "ucTimerCounter",
    [E_USERDATA_POWER_LED] = "ucPowerLed",
    [E_USERDATA_CUSTOM_KEY1] = "ucCustomKey1",
    [E_USERDATA_CUSTOM_KEY2] = "ucCustomKey2",
    [E_USERDATA_CUSTOM_KEY3] = "ucCustomKey3",
    [E_USERDATA_LIGHT_MODE] = "ucLightMode",
    [E_USERDATA_STEADY_COLOR] = "ucSteadyColor",
    [E_USERDATA_BREATHE_COLOR] = "ucBreatheColor",
    [E_USERDATA_MARQUEEIN_COLOR] = "ucMarqueeInColor",
    [E_USERDATA_MARQUEEOUT_COLOR] = "ucMarqueeOutColor",
    [E_USERDATA_R_HUE] = "ucR_Hue",
    [E_USERDATA_G_HUE] = "ucG_Hue",
    [E_USERDATA_B_HUE] = "ucB_Hue",
    [E_USERDATA_Y_HUE] = "ucY_Hue",
    [E_USERDATA_M_HUE] = "ucM_Hue",
    [E_USERDATA_C_HUE] = "ucC_Hue",
    [E_USERDATA_R_SATURATE] = "ucR_Saturate",
    [E_USERDATA_G_SATURATE] = "ucG_Saturate",
    [E_USERDATA_B_SATURATE] = "ucB_Saturate",
    [E_USERDATA_Y_SATURATE] = "ucY_Saturate",
    [E_USERDATA_M_SATURATE] = "ucM_Saturate",
    [E_USERDATA_C_SATURATE] = "ucC_Saturate",
};
#else
static CHAR8 s_acDefaultName[16];
#endif

const CHAR8* Hv_App_GetUserdataName(UserdataId enWhichData)
{
#ifdef OSD_DEBUG_PRINT_NAME
    return enWhichData < E_USERDATA_MAX ? s_apcUserdataNameTbl[enWhichData] : s_apcUserdataNameTbl[E_USERDATA_NONE];
#else
    if (enWhichData < E_USERDATA_MAX)
    {
        HV_SNPRINTF(s_acDefaultName, 16, "Userdata_%d", enWhichData);
    }
    else
    {
        HV_SNPRINTF(s_acDefaultName, 16, "Userdata_NONE");
    }
    return s_acDefaultName;
#endif
}

const static SHORT16 s_asRealValueMapVideoSource[UD_VIDEO_SOURCE_V_NUM] =
{
    /* UD_VIDEO_SOURCE_V_HDMI1 */
    LINK_PORT_INDEX_HDMI_RX0,
    /* UD_VIDEO_SOURCE_V_HDMI2 */
    LINK_PORT_INDEX_HDMI_RX1,
    /* UD_VIDEO_SOURCE_V_DP1 */
    LINK_PORT_INDEX_HDMI_RX1,
    /* UD_VIDEO_SOURCE_V_DP2 */
    LINK_PORT_INDEX_DP_RX1,
};

const static SHORT16 s_asRealValueMapGamma[UD_GAMMA_V_NUM] =
{
    /* UD_GAMMA_V_1_6 */
    PQ_GAMMA1_6,
    /* UD_GAMMA_V_1_8 */
    PQ_GAMMA1_8,
    /* UD_GAMMA_V_2_0 */
    PQ_GAMMA2_0,
    /* UD_GAMMA_V_2_2 */
    PQ_GAMMA2_2,
    /* UD_GAMMA_V_2_4 */
    PQ_GAMMA2_4,
    /* UD_GAMMA_V_2_6 */
    PQ_GAMMA2_6,
};

const static SHORT16 s_asRealValueMapColorTemp[UD_COLOR_TEMP_V_NUM] =
{
    /* UD_COLOR_TEMP_V_WARM */
    PQ_COLOR_TEMP_WARM,
    /* UD_COLOR_TEMP_V_COOL */
    PQ_COLOR_TEMP_COOL,
    /* UD_COLOR_TEMP_V_USER */
    PQ_COLOR_TEMP_CUSTOM,
};

const static SHORT16 s_asRealValueMapColorSpace[UD_COLOR_SPACE_V_NUM] =
{
    /* UD_COLOR_SPACE_V_NATIVE */
    PQ_GAMUT_NATIVE,
    /* UD_COLOR_SPACE_V_SRGB */
    PQ_GAMUT_SRGB,
    /* UD_COLOR_SPACE_V_BT709 */
    PQ_GAMUT_709,
    /* UD_COLOR_SPACE_V_DCIP3 */
    PQ_GAMUT_P3,
    /* UD_COLOR_SPACE_V_ADOBERGB */
    PQ_GAMUT_ADOBE,
};

const static SHORT16 s_asRealValueMapResponseTime[UD_RESPONSE_TIME_V_NUM] =
{
    /* UD_RESPONSE_TIME_V_OFF */
    PQ_OD_OFF,
    /* UD_RESPONSE_TIME_V_LOW */
    PQ_OD_FAST,
    /* UD_RESPONSE_TIME_V_MIDDLE */
    PQ_OD_FASTER,
    /* UD_RESPONSE_TIME_V_HIGH */
    PQ_OD_FASTEST,
};

const static SHORT16 s_asRealValueMapMprt[UD_MPRT_V_NUM] =
{
    /* UD_MPRT_V_OFF */
    MPRT_PWM_CLOSE,
    /* UD_MPRT_V_ON */
    MPRT_PWM_ENABLE,
    /* UD_MPRT_V_VRR */
    MPRT_PWM_VRR_ENABLE,
};

const static SHORT16 s_asRealValueMapDisplaySize[UD_DISPLAY_SIZE_V_NUM] =
{
    /* UD_DISPLAY_SIZE_V_AUTO */
    OUTPUTRATIO_AUTO,
    /* UD_DISPLAY_SIZE_V_16_9 */
    OUTPUTRATIO_16TO9,
    /* UD_DISPLAY_SIZE_V_4_3 */
    OUTPUTRATIO_4TO3,
};

const static SHORT16 s_asRealValueMapRotation[UD_ROTATION_V_NUM] =
{
    /* UD_ROTATION_V_OFF */
    OSD_ROTATION_NONE,
    /* UD_ROTATION_V_90 */
    OSD_ROTATION_90,
    /* UD_ROTATION_V_180 */
    OSD_ROTATION_180,
    /* UD_ROTATION_V_270 */
    OSD_ROTATION_270,
};

VOID Hv_App_OsdGetUserdata(UserdataId enWhichData, UserdataProp* pstProp)
{
    if (NULL == pstProp)
    {
        return;
    }

    pstProp->enUserdata = enWhichData;
    switch (enWhichData)
    {
        case E_USERDATA_VIDEO_SOURCE:
        {
            pstProp->sMinValue = USERDATA_VIDEO_SOURCE_MIN;
            pstProp->sMaxValue = USERDATA_VIDEO_SOURCE_MAX;
            pstProp->bCircle = USERDATA_VIDEO_SOURCE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucVideoSource);
            pstProp->enMappingType = E_ENUM_MAP;
            pstProp->stEnumMap.asRealValueMapTable = s_asRealValueMapVideoSource;
            pstProp->stEnumMap.usCount = UD_VIDEO_SOURCE_V_NUM;
            break;
        }
        case E_USERDATA_BRIGHTNESS:
        {
            pstProp->sMinValue = USERDATA_BRIGHTNESS_MIN;
            pstProp->sMaxValue = USERDATA_BRIGHTNESS_MAX;
            pstProp->bCircle = USERDATA_BRIGHTNESS_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucBrightness);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_BLACK_LEVEL)
        case E_USERDATA_BLACK_LEVEL:
        {
            pstProp->sMinValue = USERDATA_BLACK_LEVEL_MIN;
            pstProp->sMaxValue = USERDATA_BLACK_LEVEL_MAX;
            pstProp->bCircle = USERDATA_BLACK_LEVEL_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucBlackLevel);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
#endif
        case E_USERDATA_CONTRAST:
        {
            pstProp->sMinValue = USERDATA_CONTRAST_MIN;
            pstProp->sMaxValue = USERDATA_CONTRAST_MAX;
            pstProp->bCircle = USERDATA_CONTRAST_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucContrast);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_VARIABLEBACKLIGHT)
        case E_USERDATA_VARIABLE_BACK_LIGHT:
        {
            pstProp->sMinValue = USERDATA_VARIABLE_BACK_LIGHT_MIN;
            pstProp->sMaxValue = USERDATA_VARIABLE_BACK_LIGHT_MAX;
            pstProp->bCircle = USERDATA_VARIABLE_BACK_LIGHT_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(bVariableBackLight);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
#endif
        case E_USERDATA_GAMMA:
        {
            pstProp->sMinValue = USERDATA_GAMMA_MIN;
            pstProp->sMaxValue = USERDATA_GAMMA_MAX;
            pstProp->bCircle = USERDATA_GAMMA_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucGamma);
            pstProp->enMappingType = E_ENUM_MAP;
            pstProp->stEnumMap.asRealValueMapTable = s_asRealValueMapGamma;
            pstProp->stEnumMap.usCount = UD_GAMMA_V_NUM;
            break;
        }
        case E_USERDATA_DISPLAY_MODE:
        {
            pstProp->sMinValue = USERDATA_DISPLAY_MODE_MIN;
            pstProp->sMaxValue = USERDATA_DISPLAY_MODE_MAX;
            pstProp->bCircle = USERDATA_DISPLAY_MODE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucDisplayMode);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_COLOR_TEMP:
        {
            pstProp->sMinValue = USERDATA_COLOR_TEMP_MIN;
            pstProp->sMaxValue = USERDATA_COLOR_TEMP_MAX;
            pstProp->bCircle = USERDATA_COLOR_TEMP_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucColorTemp);
            pstProp->enMappingType = E_ENUM_MAP;
            pstProp->stEnumMap.asRealValueMapTable = s_asRealValueMapColorTemp;
            pstProp->stEnumMap.usCount = UD_COLOR_TEMP_V_NUM;
            break;
        }
        case E_USERDATA_RED:
        {
            pstProp->sMinValue = USERDATA_RED_MIN;
            pstProp->sMaxValue = USERDATA_RED_MAX;
            pstProp->bCircle = USERDATA_RED_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucRed);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_GREEN:
        {
            pstProp->sMinValue = USERDATA_GREEN_MIN;
            pstProp->sMaxValue = USERDATA_GREEN_MAX;
            pstProp->bCircle = USERDATA_GREEN_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucGreen);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_BLUE:
        {
            pstProp->sMinValue = USERDATA_BLUE_MIN;
            pstProp->sMaxValue = USERDATA_BLUE_MAX;
            pstProp->bCircle = USERDATA_BLUE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucBlue);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_LOW_BLUE_LIGHT:
        {
            pstProp->sMinValue = USERDATA_LOW_BLUE_LIGHT_MIN;
            pstProp->sMaxValue = USERDATA_LOW_BLUE_LIGHT_MAX;
            pstProp->bCircle = USERDATA_LOW_BLUE_LIGHT_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucLowBlueLight);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_HUE:
        {
            pstProp->sMinValue = USERDATA_HUE_MIN;
            pstProp->sMaxValue = USERDATA_HUE_MAX;
            pstProp->bCircle = USERDATA_HUE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucHue);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_SATURATION:
        {
            pstProp->sMinValue = USERDATA_SATURATION_MIN;
            pstProp->sMaxValue = USERDATA_SATURATION_MAX;
            pstProp->bCircle = USERDATA_SATURATION_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucSaturation);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_COLOR_SPACE:
        {
            pstProp->sMinValue = USERDATA_COLOR_SPACE_MIN;
            pstProp->sMaxValue = USERDATA_COLOR_SPACE_MAX;
            pstProp->bCircle = USERDATA_COLOR_SPACE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucColorSpace);
            pstProp->enMappingType = E_ENUM_MAP;
            pstProp->stEnumMap.asRealValueMapTable = s_asRealValueMapColorSpace;
            pstProp->stEnumMap.usCount = UD_COLOR_SPACE_V_NUM;
            break;
        }
        case E_USERDATA_SHARPNESS:
        {
            pstProp->sMinValue = USERDATA_SHARPNESS_MIN;
            pstProp->sMaxValue = USERDATA_SHARPNESS_MAX;
            pstProp->bCircle = USERDATA_SHARPNESS_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucSharpness);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_RESPONSE_TIME:
        {
            pstProp->sMinValue = USERDATA_RESPONSE_TIME_MIN;
            pstProp->sMaxValue = USERDATA_RESPONSE_TIME_MAX;
            pstProp->bCircle = USERDATA_RESPONSE_TIME_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucResponseTime);
            pstProp->enMappingType = E_ENUM_MAP;
            pstProp->stEnumMap.asRealValueMapTable = s_asRealValueMapResponseTime;
            pstProp->stEnumMap.usCount = UD_RESPONSE_TIME_V_NUM;
            break;
        }
#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_MPRT)
        case E_USERDATA_MPRT:
        {
            pstProp->sMinValue = USERDATA_MPRT_MIN;
            pstProp->sMaxValue = USERDATA_MPRT_MAX;
            pstProp->bCircle = USERDATA_MPRT_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucMprt);
            pstProp->enMappingType = E_ENUM_MAP;
            pstProp->stEnumMap.asRealValueMapTable = s_asRealValueMapMprt;
            pstProp->stEnumMap.usCount = UD_MPRT_V_NUM;
            break;
        }
#endif
        case E_USERDATA_DISPLAY_SIZE:
        {
            pstProp->sMinValue = USERDATA_DISPLAY_SIZE_MIN;
            pstProp->sMaxValue = USERDATA_DISPLAY_SIZE_MAX;
            pstProp->bCircle = USERDATA_DISPLAY_SIZE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucDisplaySize);
            pstProp->enMappingType = E_ENUM_MAP;
            pstProp->stEnumMap.asRealValueMapTable = s_asRealValueMapDisplaySize;
            pstProp->stEnumMap.usCount = UD_DISPLAY_SIZE_V_NUM;
            break;
        }
        case E_USERDATA_MUTE:
        {
            pstProp->sMinValue = USERDATA_MUTE_MIN;
            pstProp->sMaxValue = USERDATA_MUTE_MAX;
            pstProp->bCircle = USERDATA_MUTE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucMute);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_VOLUME:
        {
            pstProp->sMinValue = USERDATA_VOLUME_MIN;
            pstProp->sMaxValue = USERDATA_VOLUME_MAX;
            pstProp->bCircle = USERDATA_VOLUME_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucVolume);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_LANGUAGE:
        {
            pstProp->sMinValue = USERDATA_LANGUAGE_MIN;
            pstProp->sMaxValue = USERDATA_LANGUAGE_MAX;
            pstProp->bCircle = USERDATA_LANGUAGE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucLanguage);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_MENU_HPOS:
        {
            pstProp->sMinValue = USERDATA_MENU_HPOS_MIN;
            pstProp->sMaxValue = USERDATA_MENU_HPOS_MAX;
            pstProp->bCircle = USERDATA_MENU_HPOS_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucMenuHPos);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_MENU_VPOS:
        {
            pstProp->sMinValue = USERDATA_MENU_VPOS_MIN;
            pstProp->sMaxValue = USERDATA_MENU_VPOS_MAX;
            pstProp->bCircle = USERDATA_MENU_VPOS_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucMenuVPos);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_OSD_TRANS:
        {
            pstProp->sMinValue = USERDATA_OSD_TRANS_MIN;
            pstProp->sMaxValue = USERDATA_OSD_TRANS_MAX;
            pstProp->bCircle = USERDATA_OSD_TRANS_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucOsdTrans);
            pstProp->enMappingType = E_LINEAR_REVERT_MAP;
            pstProp->stLinerMap.sRealMinValue = USERDATA_OSD_TRANS_REAL_MIN;
            pstProp->stLinerMap.sRealMaxValue = USERDATA_OSD_TRANS_REAL_MAX;
            break;
        }
        case E_USERDATA_OSD_TIME:
        {
            pstProp->sMinValue = USERDATA_OSD_TIME_MIN;
            pstProp->sMaxValue = USERDATA_OSD_TIME_MAX;
            pstProp->bCircle = USERDATA_OSD_TIME_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucOsdTime);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_OSD_ROTATION)
        case E_USERDATA_ROTATION:
        {
            pstProp->sMinValue = USERDATA_ROTATION_MIN;
            pstProp->sMaxValue = USERDATA_ROTATION_MAX;
            pstProp->bCircle = USERDATA_ROTATION_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucRotation);
            pstProp->enMappingType = E_ENUM_MAP;
            pstProp->stEnumMap.asRealValueMapTable = s_asRealValueMapRotation;
            pstProp->stEnumMap.usCount = UD_ROTATION_V_NUM;
            break;
        }
#endif
#if (HV_CONFIG_ON == HV_PROJECT_CONFIG_FREESYNC)
        case E_USERDATA_FREESYNC:
        {
            pstProp->sMinValue = USERDATA_FREESYNC_MIN;
            pstProp->sMaxValue = USERDATA_FREESYNC_MAX;
            pstProp->bCircle = USERDATA_FREESYNC_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucFreesync);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
#endif
        case E_USERDATA_CROSSHAIR:
        {
            pstProp->sMinValue = USERDATA_CROSSHAIR_MIN;
            pstProp->sMaxValue = USERDATA_CROSSHAIR_MAX;
            pstProp->bCircle = USERDATA_CROSSHAIR_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucCrosshair);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_REFRESH_RATE:
        {
            pstProp->sMinValue = USERDATA_REFRESH_RATE_MIN;
            pstProp->sMaxValue = USERDATA_REFRESH_RATE_MAX;
            pstProp->bCircle = USERDATA_REFRESH_RATE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucRefreshRate);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_TIMER_COUNTER:
        {
            pstProp->sMinValue = USERDATA_TIMER_COUNTER_MIN;
            pstProp->sMaxValue = USERDATA_TIMER_COUNTER_MAX;
            pstProp->bCircle = USERDATA_TIMER_COUNTER_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucTimerCounter);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_POWER_LED:
        {
            pstProp->sMinValue = USERDATA_POWER_LED_MIN;
            pstProp->sMaxValue = USERDATA_POWER_LED_MAX;
            pstProp->bCircle = USERDATA_POWER_LED_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucPowerLed);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_CUSTOM_KEY1:
        {
            pstProp->sMinValue = USERDATA_CUSTOM_KEY1_MIN;
            pstProp->sMaxValue = USERDATA_CUSTOM_KEY1_MAX;
            pstProp->bCircle = USERDATA_CUSTOM_KEY1_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucCustomKey1);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_CUSTOM_KEY2:
        {
            pstProp->sMinValue = USERDATA_CUSTOM_KEY2_MIN;
            pstProp->sMaxValue = USERDATA_CUSTOM_KEY2_MAX;
            pstProp->bCircle = USERDATA_CUSTOM_KEY2_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucCustomKey2);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_CUSTOM_KEY3:
        {
            pstProp->sMinValue = USERDATA_CUSTOM_KEY3_MIN;
            pstProp->sMaxValue = USERDATA_CUSTOM_KEY3_MAX;
            pstProp->bCircle = USERDATA_CUSTOM_KEY3_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucCustomKey3);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_LIGHT_MODE:
        {
            pstProp->sMinValue = USERDATA_LIGHT_MODE_MIN;
            pstProp->sMaxValue = USERDATA_LIGHT_MODE_MAX;
            pstProp->bCircle = USERDATA_LIGHT_MODE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucLightMode);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_STEADY_COLOR:
        {
            pstProp->sMinValue = USERDATA_STEADY_COLOR_MIN;
            pstProp->sMaxValue = USERDATA_STEADY_COLOR_MAX;
            pstProp->bCircle = USERDATA_STEADY_COLOR_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucSteadyColor);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_BREATHE_COLOR:
        {
            pstProp->sMinValue = USERDATA_BREATHE_COLOR_MIN;
            pstProp->sMaxValue = USERDATA_BREATHE_COLOR_MAX;
            pstProp->bCircle = USERDATA_BREATHE_COLOR_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucBreatheColor);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_MARQUEEIN_COLOR:
        {
            pstProp->sMinValue = USERDATA_MARQUEEIN_COLOR_MIN;
            pstProp->sMaxValue = USERDATA_MARQUEEIN_COLOR_MAX;
            pstProp->bCircle = USERDATA_MARQUEEIN_COLOR_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucMarqueeInColor);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_MARQUEEOUT_COLOR:
        {
            pstProp->sMinValue = USERDATA_MARQUEEOUT_COLOR_MIN;
            pstProp->sMaxValue = USERDATA_MARQUEEOUT_COLOR_MAX;
            pstProp->bCircle = USERDATA_MARQUEEOUT_COLOR_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucMarqueeOutColor);
            pstProp->enMappingType = E_NO_MAP;
            break;
        }
        case E_USERDATA_R_HUE:
        {
            pstProp->sMinValue = USERDATA_R_HUE_MIN;
            pstProp->sMaxValue = USERDATA_R_HUE_MAX;
            pstProp->bCircle = USERDATA_R_HUE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucR_Hue);
            pstProp->enMappingType = E_LINEAR_MAP;
            pstProp->stLinerMap.sRealMinValue = USERDATA_R_HUE_REAL_MIN;
            pstProp->stLinerMap.sRealMaxValue = USERDATA_R_HUE_REAL_MAX;
            break;
        }
        case E_USERDATA_G_HUE:
        {
            pstProp->sMinValue = USERDATA_G_HUE_MIN;
            pstProp->sMaxValue = USERDATA_G_HUE_MAX;
            pstProp->bCircle = USERDATA_G_HUE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucG_Hue);
            pstProp->enMappingType = E_LINEAR_MAP;
            pstProp->stLinerMap.sRealMinValue = USERDATA_G_HUE_REAL_MIN;
            pstProp->stLinerMap.sRealMaxValue = USERDATA_G_HUE_REAL_MAX;
            break;
        }
        case E_USERDATA_B_HUE:
        {
            pstProp->sMinValue = USERDATA_B_HUE_MIN;
            pstProp->sMaxValue = USERDATA_B_HUE_MAX;
            pstProp->bCircle = USERDATA_B_HUE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucB_Hue);
            pstProp->enMappingType = E_LINEAR_MAP;
            pstProp->stLinerMap.sRealMinValue = USERDATA_B_HUE_REAL_MIN;
            pstProp->stLinerMap.sRealMaxValue = USERDATA_B_HUE_REAL_MAX;
            break;
        }
        case E_USERDATA_Y_HUE:
        {
            pstProp->sMinValue = USERDATA_Y_HUE_MIN;
            pstProp->sMaxValue = USERDATA_Y_HUE_MAX;
            pstProp->bCircle = USERDATA_Y_HUE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucY_Hue);
            pstProp->enMappingType = E_LINEAR_MAP;
            pstProp->stLinerMap.sRealMinValue = USERDATA_Y_HUE_REAL_MIN;
            pstProp->stLinerMap.sRealMaxValue = USERDATA_Y_HUE_REAL_MAX;
            break;
        }
        case E_USERDATA_M_HUE:
        {
            pstProp->sMinValue = USERDATA_M_HUE_MIN;
            pstProp->sMaxValue = USERDATA_M_HUE_MAX;
            pstProp->bCircle = USERDATA_M_HUE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucM_Hue);
            pstProp->enMappingType = E_LINEAR_MAP;
            pstProp->stLinerMap.sRealMinValue = USERDATA_M_HUE_REAL_MIN;
            pstProp->stLinerMap.sRealMaxValue = USERDATA_M_HUE_REAL_MAX;
            break;
        }
        case E_USERDATA_C_HUE:
        {
            pstProp->sMinValue = USERDATA_C_HUE_MIN;
            pstProp->sMaxValue = USERDATA_C_HUE_MAX;
            pstProp->bCircle = USERDATA_C_HUE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucC_Hue);
            pstProp->enMappingType = E_LINEAR_MAP;
            pstProp->stLinerMap.sRealMinValue = USERDATA_C_HUE_REAL_MIN;
            pstProp->stLinerMap.sRealMaxValue = USERDATA_C_HUE_REAL_MAX;
            break;
        }
        case E_USERDATA_R_SATURATE:
        {
            pstProp->sMinValue = USERDATA_R_SATURATE_MIN;
            pstProp->sMaxValue = USERDATA_R_SATURATE_MAX;
            pstProp->bCircle = USERDATA_R_SATURATE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucR_Saturate);
            pstProp->enMappingType = E_LINEAR_MAP;
            pstProp->stLinerMap.sRealMinValue = USERDATA_R_SATURATE_REAL_MIN;
            pstProp->stLinerMap.sRealMaxValue = USERDATA_R_SATURATE_REAL_MAX;
            break;
        }
        case E_USERDATA_G_SATURATE:
        {
            pstProp->sMinValue = USERDATA_G_SATURATE_MIN;
            pstProp->sMaxValue = USERDATA_G_SATURATE_MAX;
            pstProp->bCircle = USERDATA_G_SATURATE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucG_Saturate);
            pstProp->enMappingType = E_LINEAR_MAP;
            pstProp->stLinerMap.sRealMinValue = USERDATA_G_SATURATE_REAL_MIN;
            pstProp->stLinerMap.sRealMaxValue = USERDATA_G_SATURATE_REAL_MAX;
            break;
        }
        case E_USERDATA_B_SATURATE:
        {
            pstProp->sMinValue = USERDATA_B_SATURATE_MIN;
            pstProp->sMaxValue = USERDATA_B_SATURATE_MAX;
            pstProp->bCircle = USERDATA_B_SATURATE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucB_Saturate);
            pstProp->enMappingType = E_LINEAR_MAP;
            pstProp->stLinerMap.sRealMinValue = USERDATA_B_SATURATE_REAL_MIN;
            pstProp->stLinerMap.sRealMaxValue = USERDATA_B_SATURATE_REAL_MAX;
            break;
        }
        case E_USERDATA_Y_SATURATE:
        {
            pstProp->sMinValue = USERDATA_Y_SATURATE_MIN;
            pstProp->sMaxValue = USERDATA_Y_SATURATE_MAX;
            pstProp->bCircle = USERDATA_Y_SATURATE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucY_Saturate);
            pstProp->enMappingType = E_LINEAR_MAP;
            pstProp->stLinerMap.sRealMinValue = USERDATA_Y_SATURATE_REAL_MIN;
            pstProp->stLinerMap.sRealMaxValue = USERDATA_Y_SATURATE_REAL_MAX;
            break;
        }
        case E_USERDATA_M_SATURATE:
        {
            pstProp->sMinValue = USERDATA_M_SATURATE_MIN;
            pstProp->sMaxValue = USERDATA_M_SATURATE_MAX;
            pstProp->bCircle = USERDATA_M_SATURATE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucM_Saturate);
            pstProp->enMappingType = E_LINEAR_MAP;
            pstProp->stLinerMap.sRealMinValue = USERDATA_M_SATURATE_REAL_MIN;
            pstProp->stLinerMap.sRealMaxValue = USERDATA_M_SATURATE_REAL_MAX;
            break;
        }
        case E_USERDATA_C_SATURATE:
        {
            pstProp->sMinValue = USERDATA_C_SATURATE_MIN;
            pstProp->sMaxValue = USERDATA_C_SATURATE_MAX;
            pstProp->bCircle = USERDATA_C_SATURATE_CIRCLE;
            pstProp->sOsdValue = OSD_USERDATA_GET(ucC_Saturate);
            pstProp->enMappingType = E_LINEAR_MAP;
            pstProp->stLinerMap.sRealMinValue = USERDATA_C_SATURATE_REAL_MIN;
            pstProp->stLinerMap.sRealMaxValue = USERDATA_C_SATURATE_REAL_MAX;
            break;
        }
        default:
        {
            return;
        }
    }
    Hv_App_GetRealValue(enWhichData, &pstProp->sRealValue, &pstProp->sRealDefaultValue);
}

