📄 prov.h
字号:
/* * This piece of code is totally free. If any pitfalls found, * please feel free to contact me at jetmotor@21cn.com * THANKS A LOT! */#ifndef PROV_H_#define PROV_H_#include <net/if.h>#include "types.h"const static UINT16 frame_duration_code[];#define FRM_DUR_BASE 10typedef struct{ char tx_dev[IFNAMSIZ]; char rx_dev[IFNAMSIZ]; unsigned int tick_unit; UINT8 cs_type; UINT16 bs_code; /* used to distinguish different bs frames */ UINT16 ms_code; /* the recognized frame type of ms *//* ------ start the provision about phy ------ */ UINT8 phy_mode;#define PHY_MODE_TDD 1#define PHY_MODE_FDD 2 UINT8 phy_type;#define PHY_TYPE_OFDMA 4 UINT16 bandwidth; /* bandwidth of a channel, unit: kHz */ UINT16 nsubcr; /* number of subcarriers */ UINT8 frm_dur_code; UINT8 phy_usc;#define PHY_PUSC 1#define PHY_FUSC 2 /*<-- below parameters are calculated by system --> */ UINT32 frm_dur; /* frame duration */ UINT8 nsubchan; /* 1 ~ 60 */ UINT8 ncr_per_sc; /* how many subcarriers per subchanner */ UINT16 ncr_all; UINT32 nhz_per_cr; /* one carrier's hz, subcarrier spacing: delta(f) = Fs / Nfft */ UINT32 nhz_per_sc; UINT32 nhz_per_sec; /* per second, i.e through put capacity of raw data */ UINT32 nhz_per_frm; UINT16 nsym_per_cr; /* the overall number of symbols a frame*/ UINT16 dl_nsym_per_cr; /* the number of symbols in dl frame per carrier */ UINT16 ul_nsym_per_cr; /* the number of symbols in ul frame per carrier */ UINT16 dl_nsym_per_sc; /* the number of symbols in dl frame per subchannel */ UINT16 ul_nsym_per_sc; /* the number of symbols in ul frame per subchannel */ UINT16 dl_nsym; /* the number of symbols in dl frame */ UINT16 ul_nsym; /* the number of symbols in ul frame */ /*<-- end --> *//* ------ end the provision about phy ------ */} PROVISION;extern PROVISION prov;void init_prov();#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -