⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ecm.h

📁 有线电视系统前端设备复用器原代码。 用语接受卫星信号
💻 H
字号:
/*-------------------------------------------------------------------------------------*/
/*ecm.h                                                                                */
/*-------------------------------------------------------------------------------------*/
#pragma	pack(1,1)

typedef struct CA_ECM_ITEM_TAG
{
	unsigned short ECM_channel_ID;
	unsigned short ECM_stream_ID;
	unsigned short CP_number;
	unsigned char  ECM_Data[1024];
	unsigned short ECM_Length;
}CA_ECM_ITEM;

typedef struct CA_ECM_DATA_TAG
{
	unsigned char ecmsendflag;
	unsigned char pqflag;
	CA_ECM_ITEM   ppEcmList[32];
	CA_ECM_ITEM   pqEcmList[32];
}CA_ECM_DATA;

typedef struct CA_ECMG_CHANNEL_STATUS_TAG
{
	unsigned short	ECM_channel_ID;
	unsigned char	section_TSpkt_flag;
	unsigned short  AC_delay_start;
	unsigned short  AC_delay_stop;
	unsigned short  delay_start;
	unsigned short  delay_stop;
	unsigned short  transition_delay_start;
	unsigned short  transition_delay_stop;
	unsigned short	ECM_rep_period;
	unsigned short	max_streams;
	unsigned short	min_cp_duration;
	unsigned char	lead_CW;
	unsigned char	CW_per_msg;
	unsigned short	max_comp_time;
	unsigned char   waitresponse;
}CA_ECMG_CHANNEL_STATUS;

typedef struct CA_ECMG_STREAM_STATUS_TAG
{
	unsigned short ECM_channel_ID;
	unsigned short ECM_stream_ID;
	unsigned char  access_criteria_transfer_mode;
	unsigned short pid;
	unsigned char  continue_counter;
	unsigned char  waitresponse;
}CA_ECMG_STREAM_STATUS;

typedef struct CA_ECMG_STREAM_STATUS_LIST_TAG
{
	unsigned char			streamcount;
	CA_ECMG_STREAM_STATUS	streamlist[32];
}CA_ECMG_STREAM_STATUS_LIST;

#pragma pack(0)
/*-------------------------------------------*/
/*message type form ECMG to SCS              */
/*-------------------------------------------*/
#define ECMG2SCS_CHANNEL_SET_UP          0x0001
#define ECMG2SCS_CHANNEL_TEST            0x0002
#define ECMG2SCS_CHANNEL_STATUS          0x0003
#define ECMG2SCS_CHANNEL_CLOSE           0x0004
#define ECMG2SCS_CHANNEL_ERROR           0x0005

#define ECMG2SCS_STREAM_SET_UP           0x0101
#define ECMG2SCS_STREAM_TEST             0x0102
#define ECMG2SCS_STREAM_STATUS           0x0103
#define ECMG2SCS_STREAM_CLOSE_REQUEST    0x0104
#define ECMG2SCS_STREAM_CLOSE_RESPONSE   0x0105
#define ECMG2SCS_STREAM_ERROR            0x0106

#define ECMG2SCS_NO_COMMAND              0xffff
#define ECMG2SCS_CW_PROVISION            0x0201
#define ECMG2SCS_ECM_RESPONSE            0x0202
/*-------------------------------------------*/
/* parameter type value ECMG to SCS defined  */
/*-------------------------------------------*/
#define ECMG2SCS_Reserved                0x0000
#define ECMG2SCS_Super_CAS_ID            0x0001
#define ECMG2SCS_section_TSpkt_flag      0x0002
#define ECMG2SCS_delay_start             0x0003
#define ECMG2SCS_delay_stop              0x0004
#define ECMG2SCS_transition_delay_start  0x0005
#define ECMG2SCS_transition_delay_stop   0x0006
#define ECMG2SCS_ECM_rep_period          0x0007
#define ECMG2SCS_max_streams             0x0008
#define ECMG2SCS_min_CP_duration         0x0009
#define ECMG2SCS_lead_CW                 0x000A
#define ECMG2SCS_CW_per_msg              0x000B
#define ECMG2SCS_max_comp_time           0x000C
#define ECMG2SCS_access_criteria         0x000D
#define ECMG2SCS_ECM_channel_ID          0x000E
#define ECMG2SCS_ECM_stream_ID           0x000F
#define ECMG2SCS_nominal_CP_duration     0x0010
#define ECMG2SCS_access_criteria_transfer_mode  0x0011
#define ECMG2SCS_CP_number               0x0012
#define ECMG2SCS_CP_duration             0x0013
#define ECMG2SCS_CP_CW_Combination       0x0014
#define ECMG2SCS_ECM_datagram            0x0015


/*-----------------------------------------------------*/
/* added 2003-04-18                                    */
/*-----------------------------------------------------*/
#define ECMG2SCS_AC_delay_start          0x0016
#define ECMG2SCS_AC_delay_stop           0x0017
#define ECMG2SCS_CW_encryption           0x0018
#define ECMG2SCS_ECM_id                  0x0019
/*-----------------------------------------------------*/
/* added 2003-04-18                                    */
/*-----------------------------------------------------*/


#define ECMG2SCS_Error_status            0x7000
#define ECMG2SCS_Error_information       0x7001

int ecmgRecv(int socket,unsigned short WantCmd,unsigned long para,unsigned char ucCACount);
int ecmgSend(int socket,unsigned short cmd,unsigned long para,unsigned char ucCACount);

void tk_ecmgMgr(void);
void tk_ecmgMgr1(void);
void tk_ecmgMgr2(void);

void tk_CWInt(void);


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -