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

📄 hdr-802_16.h

📁 OPNET 中的Wimax模块, 主要用于wimax 无线网络仿真,以及普通无线网络仿真.
💻 H
📖 第 1 页 / 共 3 页
字号:
  inline int& dstaddr_()   {     return dstaddr;  }	  inline int& srcaddr_()   {     return srcaddr;  }	  inline u_char& type_()   {     return type;  }	};/*************************************************************************802_16 map packet headerThe information elements will be send in DATA portion of packet*************************************************************************//*! \brief 802_16 map packet headerThe information elements will be send in DATA portion of packet*/struct hdr_mac802_16map {  double allocstarttime;  double allocendtime;  double acktime;  u_char numIE;   u_char bkoff_start;  u_char bkoff_end;    static int offset_;   inline static int& offset()  {    return offset_;  }    inline static hdr_mac802_16map*	access(const Packet * p)   {    return (hdr_mac802_16map*) p->access(offset_);  }    /* per-field member functions */    inline double& allocstarttime_()  {    return allocstarttime;  }    inline double& allocendtime_()  {    return allocendtime;  }    inline double& acktime_()     {    return acktime;  }     inline u_char& numIE_()     {    return numIE;  }    inline u_char& bkoff_start_()  {    return bkoff_start;  }    inline u_char& bkoff_end_()        {    return bkoff_end;  }};/*=======================END PACKET HEADER DECLARATIONS================*//*========================DATA STRUCTURES DECLARATIONS=================*//*=======================Common data structures=========================*//************************************************************************/typedef struct pnode * plist;struct pnode {  Packet * pkt;  double enq_time; /* Time at which this pkt was enqued */  plist next;};/*************************************************************************/*************************************************************************This defines the classifier to be used for matching packets to upstream/downstream flows *************************************************************************//*! This defines the classifier to be used for matching packets to   upstream/downstream flows  */struct flow_classifier {  int32_t  src_ip;  int32_t  dst_ip;  packet_t pkt_type;};/**************************************************************************************************************************************************/typedef struct allocation_time * aptr;struct allocation_time {  double start_time;  double end_time;  u_int32_t num_slots;  aptr next;  u_char type; /* 0- Data, 1 - Unicast Req, 2- Contention-req */  u_char used; /* Indicates whether this slot has already been 		  allocated/used to some one */   };/*************************************************************************/************************************************************************* This structure defines attributes of downstream service flow of a SS *************************************************************************//*! This structure defines attributes of downstream service flow of a SS */struct downstream_flow_record {  struct flow_classifier classifier;  //$A6  SchedType sched_type; /* UGS, RT-VBR, NRT-POLL			     BEST-EFFORT*/  plist	packet_list; /* The bs must have one queue for each QoS service.                        Will not be used in SS code */  u_int16_t max_qsize;       /* variable indicates the maximum				queue size */  u_char state;     /* The current state for this service flow.                       Will not be used in SS code*/  Packet* pkt;  u_char    pending;           /* Denotes whether any data grant 				  is pending for this flow */    struct allocation_time* alloc_list;  double ugsjitter;         /* The jitter in the grant, 				  valid only for UGS flows */  int    jitterSamples;  double last_granttime;    /* Last grant observed at this time			       (to make sure that we do not use the 			       same data grant again in the calculation) */    double nominal_alloctime;    /* Grant should have ben allocated at this time */  double last_jittercaltime;   /* Last time avg jitter was calculated */  double ginterval;       /* Grant interval for UGS flow */    u_int16_t gsize;        /* Grant size(bytes) for UGS flow */  //$A7  double latency;         /*maximum latency requested by the connection*/  u_int32_t min_bw;       /*minimum bandwidth requested by the connection*/       //end $A6  u_int16_t flow_id; /* Downstream service flow id */  PhsType PHS_profile; /* PHS to be applied */  //#ifdef RATE_CONTROL//-------------------------------------------------  PacketQueue *tokenq_; /* Token bucket queue */  /* Will not be used in SS code as of now */  double tokens_;  double rate_;  int bucket_;  int tokenqlen_;  double lastupdatetime_;  int init_;  Event	intr;  char ratecontrol; /* To indicate whether rate-control is ON or not */  //#endif //-------------------------------------------------------------    /* Per SID stats */  double util_total_bytes_DS;  int util_total_pkts_DS;  int total_pkts_dropped;  int dropped_tokenq;    double dsq_delay; /* Queuing delay in DS queue */  int num_qsamples; /* Num of samples used to calculate dsq queuing delay */  int dropped_dsq;  /* Number of packets dropped in DS queue for this SID */};/*************************************************************************This structure defines attributes of an upstream service flow of a SS node*************************************************************************//*! This structure defines attributes of an upstream service flow of a SS node */struct upstream_flow_record {  struct flow_classifier classifier;  SchedType sched_type; /* UGS, RT-VBR, NRT-POLL			     BEST-EFFORT*/  PhsType PHS_profile;    /* PHS to be applied */    double ginterval;       /* Grant interval for UGS flow */    //$A7  double latency;         /*maximum latency requested by the connection*/  u_int32_t min_bw;       /*minimum bandwidth requested by the connection*/  u_int16_t flow_id;      /* Upstream service flow id */  u_int16_t gsize;        /* Grant size(bytes) for UGS flow */  u_char flag;};/************************************************************************* This structure defines all the user-configurable paramters for upstream channel*************************************************************************//*!  This structure defines all the user-configurable paramters for upstream channel */struct upstream_channel {  double data_rate;       /* (bits/sec) */  double prop_delay;  u_int32_t max_burst_size;  u_int32_t overhead_bytes;  u_char physlots_p_minislot;};/**************************************************************************************************************************************************/struct	downstream_channel {  double data_rate;       /* (bits/sec) */  double prop_delay;  u_int32_t overhead_bytes;};/*************************************************************************/*======================= End Common data structures====================*//*=========================BS DATA STRUCTURES=========================*//*************************************************************************This structure contains all the information excluding scheduling algorithm information   about a SS  at the BS node*************************************************************************//*! This structure contains all the information excluding scheduling algorithm information   about a SS  at the BS node */struct up_flow_record {  struct flow_classifier classifier;  Packet* frag_pkt;  SchedType sched_type;    /* UGS, RT-VBR, BEST-EFFORT*/  PhsType PHS_profile;     /* PHS to be applied */    double ginterval;        /* Grant interval for UGS flow */    u_int32_t frag_data;  u_int16_t flow_id;       /* Upstream service flow id */  u_int16_t gsize;         /* Grant size(bytes) for UGS flow */  u_int16_t seq_num;       /* The next seq_num for fragmentation*/  u_char flag;             /* last 4 bit positions are used as			     flags for concatenation/fragmentation */      //$A7  double latency;          /*maximum latency requested by the connection*/  u_int32_t min_bw;        /*minimum bandwidth requested by the connection*/  double last_granttime;   /*for UGS and rt-pool/nrt-pool periodic grants*/  u_int16_t backlogged;    /*number of slots backlogged for this flow*/  int16_t granted_bw;      /*number of slots granted for this flow during a time window T*/};/**************************************************************************************************************************************************/struct ss_record {  struct downstream_flow_record d_rec[MAX_NUM_DOWNFLOWS_PERSS];  struct up_flow_record 	u_rec[MAX_NUM_UPFLOWS_PERSS];    int ss_macaddr;  u_int16_t priority; /* Priority for best-effort flow */     u_char SizeDnFlTable;  u_char SizeUpFlTable;  u_char default_upstream_index_;  u_char default_downstream_index_;};/************************************************************************* The frequency of generation of management messages *************************************************************************//*!  The frequency of generation of management messages  */struct mgmt_conf_param {  double sync_msg_interval;  double rng_msg_interval;  double ucd_msg_interval;};/**************************************************************************************************************************************************/struct map_conf_param {  double time_covered;            /* Time covered by MAP(in ms), 				     0 inidcates varying, >0 indicates 				     the actual time to be covered by MAP */    double map_interval;            /* Interval between two maps(in s)*/    u_int32_t num_contention_slots; /* Number of contention slots per map */    u_int32_t num_sm_slots;         /* Number of station maintainence 				     slots per map */    //$A4  //u_int32_t sgrant_limit;         /* Max number of bytes that can be                                     //sent in short grant IE */    //  u_int32_t lgrant_limit;         /* Max number of bytes that can be                                        // sent in long grant IE */    u_char bkoff_start;             /* Initial back-off window for 				     contention data and request */  u_char bkoff_end;               /* Final back-off window for 

⌨️ 快捷键说明

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