📄 gw_common.h
字号:
/******************************************************************************
**
** Copyright (c) 2007, UTStarcom, Inc.
** All Rights Reserved.
**
** Subsystem : Wimax BS
** File : gw_common.h
** Created By: Scott.wang
** Created On: 1/15/2007
**
** Purpose:
** This file defines GW common, such as TIMER message, UP message and SAP.
** History:
** Programmer Date Rev Description
** Scott.wang 1/15/2007 0.0 Creating file
** Joeblack.zheng 1/16/2007 0.1 _GW_UDPLINK_H-->_GW_COMMON_H
** Add macros -- GW_MAX_MS_NUM and GW_MS_MAC_ADDR_LEN
** Add struct -- ETHER_ADDR_S
** Scott.wang 1/16/2007 0.2 add enum definition for logical entity such as anchor_dp, anchor_ep
******************************************************************************/
#ifndef _GW_COMMON_H
#define _GW_COMMON_H
#include <xCommon.h>
#include "global.h"
#include "common.h"
#include "gw_log.h"
/* Max message len and max message num definition for message queue */
#define GW_CP_MAX_MSG_LEN 8000
#define GW_CP_MAX_MSG_NUM 1000
/* SAP definition */
#define GW_UDP_SAP 0x10
#define GW_OAM_SAP 0x11
#define GW_UP_SAP 0x12
#define GW_ANCHOR_DP_TIMER_SAP 0x13
#define GW_ANCHOR_EP_TIMER_SAP 0x14
#define GW_SERVING_EP_TIMER_SAP 0x15
#define GW_MAX_MS_NUM 1024
#define GW_MS_MAC_ADDR_LEN 6
/* Ethernet address - 6 octets */
typedef struct _ETHER_ADDR_S {
BYTE b_enaddr[GW_MS_MAC_ADDR_LEN];
} ETHER_ADDR_S;
/* TIMER message definition */
typedef struct _GW_TIMER_MSG_S{
ENVELOP st_env;
DWORD dw_data;
}GW_TIMER_MSG_S;
/* UP Trigger message definition */
typedef struct _GW_UP_TRIG_MSG_S{
ENVELOP st_env;
}GW_UP_TRIG_MSG_S;
typedef enum {
GW_LOGICAL_ENTITY_ANCHOR_DP = 1,
GW_LOGICAL_ENTITY_ANCHOR_EP,
GW_LOGICAL_ENTITY_SERVING_EP,
GW_LOGICAL_ENTITY_TARGET_EP,
GW_LOGICAL_ENTITY_BS
}LOGICAL_ENTITY_ID_E;
#if defined(VXWORKS)
#ifdef _DEBUG
#define GW_ASSERT(x) \
{ \
if(!(x)) \
{ \
gw_log_err("Assertion failed at %s(%d)",__FUNCTION__,__LINE__); \
taskSuspend(0); \
exit(0); \
} \
}
#else
#define GW_ASSERT(x) void()
#endif
#else
#define GW_ASSERT(x) ASSERT(x)
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -