当前位置: 首页>>代码示例>>C++>>正文


C++ DVBT_DEMOD_MODULE::GetSnrDb方法代码示例

本文整理汇总了C++中DVBT_DEMOD_MODULE::GetSnrDb方法的典型用法代码示例。如果您正苦于以下问题:C++ DVBT_DEMOD_MODULE::GetSnrDb方法的具体用法?C++ DVBT_DEMOD_MODULE::GetSnrDb怎么用?C++ DVBT_DEMOD_MODULE::GetSnrDb使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DVBT_DEMOD_MODULE的用法示例。


在下文中一共展示了DVBT_DEMOD_MODULE::GetSnrDb方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: dvbt_nim_default_GetSnrDb

/**
 * @see   DVBT_NIM_FP_GET_SNR_DB
 */
s32 dvbt_nim_default_GetSnrDb(DVBT_NIM_MODULE *pNim, s64 *pSnrDbNum, s64 *pSnrDbDen)
{
	DVBT_DEMOD_MODULE *pDemod;

	// Get demod module.
	pDemod = pNim->pDemod;

	// Get SNR in dB from demod.
	if(pDemod->GetSnrDb(pDemod, pSnrDbNum, pSnrDbDen) != FUNCTION_SUCCESS)
		goto error_status_execute_function;

	return FUNCTION_SUCCESS;

error_status_execute_function:
	return FUNCTION_ERROR;
}
开发者ID:ldy972,项目名称:Drone,代码行数:19,代码来源:dvbt_nim_base.c

示例2: fe_demod_info_ioctrl


//.........这里部分代码省略.........
            info_ctrl->data[INFO_DATA_VALUE]=(unsigned long)quality;
            info_ctrl->data[INFO_DATA_DEN]=1;
//				deb_info("rtl2832u ioctl (FE_GET_SIGN_QUALITY)- quality = %x (%x). \n",quality,info_ctrl->data[INFO_DATA_VALUE] );
        }

        break;
    case FE_GET_SIGN_LOCK:

        answer=NO;
        if (pDemod->IsSignalLocked(pDemod, &answer) != FUNCTION_SUCCESS)
        {
            ret=-10;
        }
        else
        {
            if (answer == YES) {
                info_ctrl->data[INFO_DATA_VALUE]=1;
            }
            else	info_ctrl->data[INFO_DATA_VALUE]=0;

            info_ctrl->data[INFO_DATA_DEN]=1;
            ret=10;
        }


        break;
    case FE_GET_DEMOD_BER:

        if(pDemod->GetBer(pDemod, &BerNum, &BerDen) != FUNCTION_SUCCESS)
        {
            ret=-10;
            info_ctrl->data[INFO_DATA_VALUE]=19616;
            info_ctrl->data[INFO_DATA_DEN]=1;
        }
        else
        {
            ret=10;
            info_ctrl->data[INFO_DATA_VALUE]=BerNum;
            info_ctrl->data[INFO_DATA_DEN]=BerDen;
        }

        break;
    case FE_GET_DEMOD_SNR_DB:
        if(pDemod->GetSnrDb(pDemod, &SnrDbNum, &SnrDbDen) != FUNCTION_SUCCESS)
        {
            ret=-10;
            info_ctrl->data[INFO_DATA_VALUE]=0;
            info_ctrl->data[INFO_DATA_DEN]=1;
        }
        else
        {
            ret=10;
            info_ctrl->data[INFO_DATA_VALUE]=SnrDbNum;
            info_ctrl->data[INFO_DATA_DEN]=SnrDbDen;
        }
        break;
    case FE_GET_DEMOD_TR_PPM:
        if(pDemod->GetTrOffsetPpm(pDemod, &tr_ppm) != FUNCTION_SUCCESS)
        {
            ret=-10;
            info_ctrl->data[INFO_DATA_VALUE]=0;
            info_ctrl->data[INFO_DATA_DEN]=1;
        }
        else
        {
            ret=10;
            info_ctrl->data[INFO_DATA_VALUE]=tr_ppm;
            info_ctrl->data[INFO_DATA_DEN]=1;
        }
        break;
    case FE_GET_DEMOD_CR_HZ:
        if(pDemod->GetCrOffsetHz(pDemod, &cr_hz) != FUNCTION_SUCCESS)
        {
            ret=-10;
            info_ctrl->data[INFO_DATA_VALUE]=0;
            info_ctrl->data[INFO_DATA_DEN]=1;
        }
        else
        {
            ret=10;
            info_ctrl->data[INFO_DATA_VALUE]=cr_hz;
            info_ctrl->data[INFO_DATA_DEN]=1;
        }
        break;
    default:
        deb_info("ERROR::rtl2832u ioctl - std info cmd ret= unknow info commond. \n" );
        ret=-1;
        break;
    }


    if ((info_cmd != FE_GET_SIGN_STRENGTH) && (info_cmd != FE_GET_SIGN_QUALITY)) {
        mutex_unlock(&p_state->i2c_repeater_mutex);
    }

//	deb_info("-%s :ioctl - std info cmd ret= %x,data=%x,den=%x\n", __FUNCTION__,ret,(int)info_ctrl->data[INFO_DATA_VALUE],info_ctrl->data[INFO_DATA_DEN]);

    return ret;

}
开发者ID:ambrosa,项目名称:DVB-Realtek-RTL2832U-2.2.2-4_tuner,代码行数:101,代码来源:rtl2832u_ioctl.c


注:本文中的DVBT_DEMOD_MODULE::GetSnrDb方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。