dmd.h
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:4k
- #ifndef __DMD_H
- #define __DMD_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- /* Includes --------------------------------------------------------------- */
- #include "gendef.h"
- typedef enum
- {
- DMD_TYPE_NONE,
- DMD_TYPE_QPSK,
- DMD_TYPE_QAM,
- DMD_TYPE_OFDM
- } KB_DMDType;
- typedef enum
- {
- INVERSION_OFF,
- INVERSION_ON,
- INVERSION_AUTO
- } KB_DMDSpectralInversion;
- typedef enum
- {
- FEC_NONE = 0,
- FEC_1_2,
- FEC_2_3,
- FEC_3_4,
- FEC_4_5,
- FEC_5_6,
- FEC_6_7,
- FEC_7_8,
- FEC_8_9,
- FEC_AUTO
- } KB_DMDCodeRate;
- typedef enum
- {
- QPSK,
- QAM_16,
- QAM_32,
- QAM_64,
- QAM_128,
- QAM_256,
- QAM_AUTO
- } KB_DMDModulation;
- /* These parameters for OFDM */
- typedef enum
- {
- TRANSMISSION_MODE_2K,
- TRANSMISSION_MODE_8K,
- TRANSMISSION_MODE_AUTO
- } KB_DMDTransmitMode;
- typedef enum
- {
- BANDWIDTH_8_MHZ,
- BANDWIDTH_7_MHZ,
- BANDWIDTH_6_MHZ,
- BANDWIDTH_AUTO
- } KB_DMDBandwidth;
- typedef enum
- {
- GUARD_INTERVAL_1_32,
- GUARD_INTERVAL_1_16,
- GUARD_INTERVAL_1_8,
- GUARD_INTERVAL_1_4,
- GUARD_INTERVAL_AUTO
- } KB_DMDGuardInterval;
- typedef enum
- {
- HIERARCHY_NONE,
- HIERARCHY_1,
- HIERARCHY_2,
- HIERARCHY_4,
- HIERARCHY_AUTO
- } KB_DMDHierarchy;
- typedef struct _KB_DMDQPSKParameters
- {
- UINT32 symbolRatekSs; /* In ksymbols/s */
- KB_DMDCodeRate fec_inner; /* forward error correction (see above) */
- } KB_DMDQPSKParameters;
- typedef struct _KB_DMDQAMParameters
- {
- UINT32 symbolRatekSs; /* In ksymbols/s */
- KB_DMDCodeRate fec_inner; /* forward error correction (see above) */
- KB_DMDModulation modulation; /* modulation type (see above) */
- } KB_DMDQAMParameters;
- typedef struct _KB_DMDOFDMParameters
- {
- KB_DMDBandwidth bandwidth;
- KB_DMDCodeRate code_rate_HP; /* high priority stream code rate */
- KB_DMDCodeRate code_rate_LP; /* low priority stream code rate */
- KB_DMDModulation constellation; /* modulation type (see above) */
- KB_DMDTransmitMode transmission_mode;
- KB_DMDGuardInterval guard_interval;
- KB_DMDHierarchy hierarchy_information;
- } KB_DMDOFDMParameters;
- typedef struct _KB_DMDTunerParameters
- {
- KB_DMDType type; /* Demode type: QPSK, QAM, OFDM */
- UINT32 frequency; /* frequency in KHz for QAM/OFDM */
- /* frequency in MHz for QPSK */
- KB_DMDSpectralInversion inversion;
- union
- {
- KB_DMDQPSKParameters qpsk;
- KB_DMDQAMParameters qam;
- KB_DMDOFDMParameters ofdm;
- } details;
- } KB_DMDTunerParameters;
- //QAM输入信号的参数
- typedef struct _KB_DMDSendQAMSignal
- {
- INT32 qamvafc; //QAM的频偏,有正负偏差,单位为KHZ,-127~+127
- UINT32 qamagc; //QAM输入的AGC电平,此值越大信号越强,反之亦然,0~255
- UINT32 qamquality; //QAM的输入信号质量,此值越大信号质量越好,反之亦然,0~255
- UINT32 qamsroffset; //QAM时钟环的偏差(ppm),此值越大表示时钟环偏差越大,0~255,单位PPM
- UINT32 qamuncor;
- UINT32 qamber; //QAM的误码率,此值0~3,=0,信号很差;=1,信号较差;=2信号可以使用;=3信号很好
- UINT32 qamnoise;
- } KB_DMDSendQAMSignal;
- /***************************************************************************
- ** Parameter for DMDRegisterCallback()
- ***************************************************************************/
- typedef enum
- {
- DMD_CALLBACK_SIGNAL_CONNECTED, /* Successful signal connection */
- DMD_CALLBACK_SIGNAL_DROPPED, /* Successful signal disconnect */
- DMD_CALLBACK_SIGNAL_LOST, /* Signal accidentally lost */
- DMD_CALLBACK_PARAM_ERROR, /* The parameters were error */
- CA_DISPLAY,
- CA_CLEAR,
- MAILDsp,
- MAILHIDE
- }KB_DMDCallbackEvents;
- typedef void (*KB_DMD_CallbackFunc)(KB_DMDCallbackEvents);
- KB_DMDTunerParameters CurrentSignal;
- /****************************************************************************
- ** API and public function prototypes
- ****************************************************************************/
- INT32 KB_DMDInit(void);
- INT32 KB_DMDConnectSignal(KB_DMDTunerParameters *dmdParam);
- INT32 KB_DMDDropSignal(void);
- INT32 KB_DMDQuerySignalStatus(void);
- void KB_DMDCallBack(KB_DMD_CallbackFunc callback);
- INT32 KB_DMDGetSignalParameters(KB_DMDTunerParameters *ptParameters);
- #ifdef __cplusplus
- }
- #endif
- #endif