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

📄 lcm_udpdrv.h

📁 abstract rtos
💻 H
字号:
#ifdef __cplusplus#if __cplusplusextern "C"{#endif #endif #ifndef __INC_LCM_UDPDRV_H__#define __INC_LCM_UDPDRV_H__#define LCM_MSG  0#define EIA_AUTHEN 1#if( CONFIG_BOARD_GMPU == TRUE )#define DRV_EIA_NUM ( MAX_DEV_EIA_NUM + MAX_SIP_TRUNK_NUM )#define DRV_EIA_LOOP_NUM 512#elif( CONFIG_BOARD_EIA == TRUE )#define DRV_EIA_NUM 1#define DRV_EIA_LOOP_NUM 1#else#error udp4eia not supported in this board!!! pls reomve it from your project.#endif#if( CONFIG_BOARD_GMPU == TRUE )#define drv_get_eia_cb( eia_no ) ( (eia_no) < MAX_DEV_EIA_NUM ? &eia_table[eia_no]:NULL )#define drv_get_siptrunk_cb( siptrunk_no ) ( (siptrunk_no) < MAX_SIP_TRUNK_NUM ? &eia_table[MAX_DEV_EIA_NUM+(siptrunk_no)]:NULL )#else#define drv_get_eia_cb( eia_no ) ( (eia_no) >=DRV_EIA_NUM ? &eia_table[0]:NULL )#define drv_get_siptrunk_cb( siptrunk_no ) ( NULL )#endiftypedef struct eia_table_s{    U8          status;    U8          is_rcving:1;    U8          is_eia:1;    U8          is_tcp_mode:1;    U8          is_tcp_connected:1;    U8          is_new_ver:1;    U8          reserv_bit:3;    U16          port_no;    SOCKADDRIN_S addr;    U32          rx_timestamp;    U32          rx_serialno;    U32          tx_serialno;    U32          rx_drop;    U32          tcpSeq;    U32          tcpAck;#if( CONFIG_BOARD_EIA == TRUE )    U32          tcpSynCnt;#endif    struct msg_blk_que rx_delay_que;}EIA_TABLE_S;#if( CONFIG_OS_WINDOWS == TRUE )#pragma pack(push,1)#elif( CONFIG_OS_VXWORKS == TRUE )#pragma pack(1)#endif#if( CONDIF_BIG_ENDIAN == TRUE )struct eia_msg_hdr{    U8 msg_type:1;    U8 not_ordered:1;    U8 is_siptrunk:1;    U8 is_new_ver:1;    U8 eia_no_hi:4;    U8 eia_no_lo;    U32 timestamp;    U32 tx_serialno;};struct new_eia_msg_hdr{    U8 msg_type:1;    U8 not_ordered:1;    U8 is_siptrunk:1;    U8 is_new_ver:1;    U8 resrv_0:4;    U8 resrv_1;    U32 timestamp;    U32 tx_serialno;    U16 eia_no;};#elsestruct eia_msg_hdr{    U8 eia_no_hi:4;    U8 is_new_ver:1;    U8 is_siptrunk:1;    U8 not_ordered:1;    U8 msg_type:1;    U8 eia_no_lo;    U32 timestamp;    U32 tx_serialno;};struct new_eia_msg_hdr{    U8 resrv_0:4;    U8 is_new_ver:1;    U8 is_siptrunk:1;    U8 not_ordered:1;    U8 msg_type:1;    U8 resrv_1;    U32 timestamp;    U32 tx_serialno;    U16 eia_no;};#endif#if( CONFIG_OS_WINDOWS == TRUE )#pragma pack(pop)#elif( CONFIG_OS_VXWORKS == TRUE )#pragma pack(4)#endifextern EIA_TABLE_S *eia_table;extern U16 g_lcm_rel_udp_port;void drv_udp_add( EIA_TABLE_S *pEia, SOCKADDRIN_S *pFrom, U32 tcpflag, U32 tcpSeq, U32 tcpAck, U32 new_lcm_ver );void drv_udp_delete( EIA_TABLE_S *pEia );VOID drv_udp_send( EIA_TABLE_S *pEia, U32 portno, struct msg_blk *mb );U32 lcm_get_tcp_iss();U32 lcm_is_keepalive_frame( U8 *ptr0 );#endif#ifdef __cplusplus#if __cplusplus}#endif #endif 

⌨️ 快捷键说明

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