📄 iclid.h
字号:
/*------------------------------------------------------------------------*
* *
* THIS IS AN UNPUBLISHED WORK CONTAINING CONFIDENTIAL AND PROPRIETARY *
* INFORMATION. IF PUBLICATION OCCURS, THE FOLLOWING NOTICE APPLIES: *
* "COPYRIGHT 2001 MIKET DSP SOLUTIONS, ALL RIGHTS RESERVED" *
* *
*-------------------------------------------------------------------------*/
#ifndef ICLID_
#define ICLID_
#include <std.h>
#include <ialg.h>
/*--------------------- public defs ---------------------------------------*/
#define ICLID_FR_SZ (40)
#define ICLID_MSG_SZ (256/2) /* bytes are packed 2 per 16 bit word,
ls=2*k, ms=2*k+1*/
typedef struct ICLID_Obj {
struct ICLID_Fxns *fxns;
} ICLID_Obj;
typedef struct ICLID_Obj *ICLID_Handle;
/*
* ------- control interface ---------
*
* use it while calling algControl()
*/
/* definition of Cmd param of _control(), to be or'ed
OFF:
disable detector from running.
function _process will return almost immediately.
RESET:
reset database variables, data saving buffers, statistics, etc.
preserves ptr to config data.
CFG:
points to config data to be used.
TYPE2:
detect CLID type 2 (otherwise it will type 1).
*/
#define ICLID_CMD_OFF (1)
#define ICLID_CMD_RESET (2)
#define ICLID_CMD_CFG (4)
#define ICLID_CMD_TYPE1 (8)
#define ICLID_CMD_TYPE2 (16)
#define ICLID_CMD_CAS (32)
#define ICLID_CMD_RESET_STTS (64)
/* Configuration of detector */
/* detector allows user to set several thresholds
to customize detector for particular circumstances.
The run-time configuration fields include:
sNormShift:
'Normalisation': number of left shifts to align data
so that 0dbm0 corresponds to 16384 rms (full scale signals).
*/
/* use these macro with constants */
#define ICLID_DB(x) ((Int)((x)*170))
#define ICLID_PERCENT(x) ((Int)((x)*170))
typedef struct ICLID_tCfg {
Int sNormShift;
Int sMinEn;
Int sMaxEn;
Int sMaxTwist;
Int sMaxFreqDev;
} ICLID_tCfg;
typedef struct ICLID_Status {
Int size; /* sizeof the whole parameter struct */
ICLID_tCfg Cfg; /* in: used if and only if CMD_CFG indicated */
} ICLID_Status;
/*
* ======== ICLID_Params ========
* This structure defines the parameters necessary to create an
* instance of a CLID object.
*
*/
typedef struct ICLID_Params {
Int size; /* sizeof the whole parameter struct */
const ICLID_tCfg *pCfg; /* in: */
} ICLID_Params;
/* definitions of the report word, returned by _process() */
/* MSByte of Report */
/* Normally, user shall get a sequence of
EV_START,
EV_END.
*/
/* no changes happened this frame */
#define ICLID_EV_NONE (0<<8)
/* clid may started */
#define ICLID_EV_EARLY_ON (1<<8)
#define ICLID_EV_EARLY_OFF (2<<8)
/* clid started, for sure */
#define ICLID_EV_START (3<<8)
/* over. Clean and clear finish. */
#define ICLID_EV_END (4<<8)
/* something is wrong with this message.
It started Ok, went on ok for several frames,
but something went wrong afterwards.
As the result, it did not end properly. */
#define ICLID_EV_ABORT (5<<8)
/* customer alerting signal detected */
#define ICLID_EV_CAS (6<<8)
/* LSByte of Report = 0 */
/*
* ======== ICLID_Fxns ========
* By convention the name of the variable is CLID_MIKET_ICLID, where
* MIKET is the vendor name.
*/
typedef struct ICLID_Fxns {
IALG_Fxns ialg;
/* functions returns report word described above */
Int (*algProcess)(IALG_Handle handle, Int pIn[]);
} ICLID_Fxns;
/*--------------------- local defs ----------------------------------------*/
/*--------------------- public vars ---------------------------------------*/
/*--------------------- local vars ----------------------------------------*/
/*--------------------- local functions -----------------------------------*/
/*--------------------- public functions ---------------------------------*/
#endif /* ICLID_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -