亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mac-802_16-fsm.cc

?? Its the source code for implementing WIMAX in NS-2
?? CC
?? 第 1 頁 / 共 5 頁
字號:
/*************************************************************************** * WiMAX module * * Copyright (C) 2008 Juliana Freitag Borin, Flavio Kubota and Nelson L. * S. da Fonseca - wimaxgroup@lrc.ic.unicamp.br * * This program is a free result: you can redistribute it and/or modify * it under the terms of the UOL Public License Version 1 or (at your * option) any later version. The license terms are available at * http://bolsapesquisa.uol.com.br/lpu.jhtm. * *   This file contains implementation of state machines for the three  *   types of service-flows * * * Revisions: *   $A0: 07/16/04: added look_at_queue method so we can examine the packets *                  wiating in the SS upstream queue. *                  And added filterACKPackets(Packet *pkt, char tbindex) *                  to support ACK suppresion. *                  Note:  ACK_SUPPRESSION must be 1 to enable this. * *   $A1: 08/11/04: added a print_short_map_list to dump the map contents  *                  in the SSMAP.out file. The following two defines are needed: *                       #define DUMPSSP 1:  enable dump *                       #define DUMPSSID 2 :  ss_id identifing the SS to watch *   $A2: 02/17/05: upstream rate control (Viraj) *   $A3: 03/23/05: Were deleting the MAP packet too early....only messed up *                  when multiple flows at a SS are active. *   $A4: 04/30/05: Added TIMINGS.dat trace.  See timingsTrace() in mac-802_16-ss.cc *                  For further details. Search for TIMINGS for all code changed. *   $A5: 03/15/06: (J. Freitag) included non-real-time service      *   $A6: 04/03/06: (J. Freitag) included downlink QoS scheduling services *   $A7: 09/19/06: (J. Freitag) included incremental bandwidth request *   $A8: 10/18/06: (J. Freitag) When a request timer is stopped, the event must *                  be deleted from the ReqList  *   $A9: 04/27/07: (J. Freitag) included the ertPS service in the uplink direction *   $A10:07/16/07: (J. Freitag) included the ertPS service in the downlink direction            *   $A11:08/13/07: (J. Freitag) excluded the DataGrantPending, since in the 802.16 standard *                  the SSs has no knowledge about the pending grants in the BS queues.  *   $A12:08/13/07: (J. Freitag) changed the back_off method in order to make the state *                  transitions inside the FSM wich has called it.      *   $A13:08/13/07: (J. Freitag) included the T16 timeout defined in the 802.16 standard.  **********************************************************************//*! \file mac-802_16-FSM.cc   This file contains implementation of state machines for the three types of service-flows *//*===============================INCLUDE HEADER FILES====================*/#include "mac-802_16.h"//#define WATCH_SSID 3 /*If not 0, we will do special tracing of events/data for this part. SS*/#define ACK_SUPPRESSION 0 /* If not 0, we will do ack suppression 			     for multiple ACKs for a TCP cx that 			     are waiting for an upstream transmission 			     opportunity */#define DUMPSSMAP 0 /* If set to > 0, then we will dump a MAP to the SSMAP.out file */#define DUMPSSID 0//$A2#define US_RATE_CONTROL 1//If defined, adds printf's//#define TRACE_ME 1//This will dump timing info//#define TIMINGS 1/*===========================END INCLUDE HEADER FILES====================*//*========================UGS STATE MACHINE FUNCTIONS===================*//************************************************************************* tbindex denotes the service-flow entry on which packet has been mapped*************************************************************************//*! \param tbindex denotes the service-flow entry on which packet has been mapped */int Mac802_16SS::ugs_idle(char tbindex, EventType e, Packet* p){  if (UpFlowTable[tbindex].debug)    printf("SS%d(flow-id %d) UGS_IDLE state \n",	   ss_id,UpFlowTable[tbindex].upstream_record.flow_id);    switch(e)     {    case PKT_ARRIVAL:      //insert_pkt(p,tbindex);      UpFlowTable[tbindex].state = UGS_DECISION;      UpFlowTable[tbindex].pkt = p;      ugs_decision(tbindex, PKT_ARRIVAL, p);      break;                case MAP_ARRIVAL:      UpdateAllocationTable(tbindex);      UpdateJitter(tbindex);      if (UpFlowTable[tbindex].debug)	{	  printf("SS%d(flow-id %d):ugs_idle(%lf): MAP arrived, new state: %d \n", 	       ss_id,UpFlowTable[tbindex].upstream_record.flow_id, 	       Scheduler::instance().clock(), UpFlowTable[tbindex].state);	  printf("SS%d(flow-id %d) Allocation table \n",		 ss_id,UpFlowTable[tbindex].upstream_record.flow_id);	  print_alloclist(tbindex);	}      //printf("\nAllocation table for flow %d\n",      //UpFlowTable[tbindex].upstream_record.flow_id);      //print_alloclist(tbindex);      break;          default:      printf("SS%d(flow-id %d)UGS-IDLE state error: Unknown event received\n",	     ss_id,UpFlowTable[tbindex].upstream_record.flow_id);        break;    }  return 1;}/**************************************************************************************************************************************************/	int Mac802_16SS::ugs_decision(char tbindex, EventType e, Packet* p){  if (UpFlowTable[tbindex].debug)    printf("SS%d(flow-id %d) UGS_DECISION state \n",	   ss_id,UpFlowTable[tbindex].upstream_record.flow_id);    switch(e)     {    case PKT_ARRIVAL:      if (!CanBeSent(UpFlowTable[tbindex].alloc_list,p,tbindex)){	UpFlowTable[tbindex].state = UGS_WAITFORMAP;	}      else 	{	  UpFlowTable[tbindex].state = UGS_TOSEND;	  ugs_tosend(tbindex, SEND_PKT, p);	}      break;          default:      printf("SS%d(flow-id %d)UGS-DECISION state error: Unknown event received\n",	     ss_id,UpFlowTable[tbindex].upstream_record.flow_id);      break;         }  return 1;}/*************************************************************************** Function: int Mac802_16SS::ugs_waitformap(char tbindex, EventType e, Packet* p)** Explanation:*    This is called when certain events occur while a UGS flow is waiting*    for a MAP.** Inputs:** Outputs:***************************************************************************//*!  This is called when certain events occur while a UGS flow is waiting for a MAP. */int Mac802_16SS::ugs_waitformap(char tbindex, EventType e, Packet* p){  if (UpFlowTable[tbindex].debug)    printf("SS%d(flow-id %d):ugs_waitformap(%lf) UGS_WAITFORMAP state (tbindex=%d)\n",	   ss_id,UpFlowTable[tbindex].upstream_record.flow_id,	   Scheduler::instance().clock(),(int)tbindex);    switch(e)     {    case PKT_ARRIVAL:      insert_pkt(p,tbindex);      break;          case MAP_ARRIVAL:      UpdateAllocationTable(tbindex);      UpdateJitter(tbindex);      if (UpFlowTable[tbindex].debug) {        printf("SS%d(flow-id %d):ugs_waitformap(%lf): MAP ARRIVAL \n",	   ss_id,UpFlowTable[tbindex].upstream_record.flow_id,	   Scheduler::instance().clock());        print_alloclist(tbindex);      }      if (CanBeSent(UpFlowTable[tbindex].alloc_list,p,tbindex))	{	  UpFlowTable[tbindex].state = UGS_TOSEND;	  ugs_tosend(tbindex, SEND_PKT, p);	}      break;          default:      printf("SS%d(flow-id %d)UGS-WAITFORMAP state error: Unknown event received\n",	     ss_id,UpFlowTable[tbindex].upstream_record.flow_id);      break;          }  return 1;}/**************************************************************************************************************************************************/int Mac802_16SS::ugs_tosend(char tbindex, EventType e, Packet* p){  double etime, current_time;  struct hdr_cmn *ch = HDR_CMN(p);  struct hdr_ip *chip = HDR_IP(p);  Packet* t;    current_time = Scheduler::instance().clock();  if (UpFlowTable[tbindex].debug)    printf("SS%d(%lf)(flow-id %d) UGS_TOSEND state \n",	   ss_id,current_time,UpFlowTable[tbindex].upstream_record.flow_id);    switch(e)     {    case SEND_PKT:      etime = timer_expiration(tbindex, p,DATA_GRANT);            if (etime == -1.0)	{	  printf("SS%d(flow-id %d) Timer expiration error: exiting..\n",		 ss_id,UpFlowTable[tbindex].upstream_record.flow_id);	  exit(1);	}            current_time = Scheduler::instance().clock();      //printf("Starting snd timer..\n");      mhSSSend_.start((Packet *) (&UpFlowTable[tbindex].intr), etime );      insert_sndlist(current_time + etime, tbindex);      break;          case PKT_ARRIVAL:            insert_pkt(p,tbindex);      break;          case MAP_ARRIVAL:      UpdateAllocationTable(tbindex);      UpdateJitter(tbindex);      if (UpFlowTable[tbindex].debug)         printf("SS%d(%lf)(flow-id %d) UGS_TOSEND MAP \n",	   ss_id,current_time,UpFlowTable[tbindex].upstream_record.flow_id);      //printf("\nAllocation table for flow %d\n",      //UpFlowTable[tbindex].upstream_record.flow_id);      //print_alloclist(tbindex);      break;          case SEND_TIMER:      //deque_pkt(tbindex);      SendData(p,tbindex);      UpFlowTable[tbindex].pkt = 0;            if ((len_queue(UpFlowTable[tbindex].packet_list)) > 0)	{	  UpFlowTable[tbindex].state = UGS_DECISION;	  t = deque_pkt(tbindex);	  struct hdr_cmn *ch = HDR_CMN(t);	  UpFlowTable[tbindex].pkt = t;	  ugs_decision(tbindex, PKT_ARRIVAL, t);	}	      else	UpFlowTable[tbindex].state = UGS_IDLE;       break;                default:      printf("SS%d(flow-id %d) UGS-TOSEND state error: Unknown event received\n",	     ss_id,UpFlowTable[tbindex].upstream_record.flow_id);      break;    }  return 1;}/*======================END UGS STATE MACHINE FUNCTIONS===================*/				/*======================RT-POLL STATE MACHINE FUNCTIONS===================*//*************************************************************************tbindex denotes the service-flow entry on which packet has been mapped*************************************************************************//*! \param tbindex denotes the service-flow entry on which packet has been mapped */int Mac802_16SS::rtpoll_idle(char tbindex, EventType e, Packet* p){  if (UpFlowTable[tbindex].debug)    printf("SS%d(flow-id %d) RTPOLL_IDLE state \n",	   ss_id,UpFlowTable[tbindex].upstream_record.flow_id);    switch(e)     {    case PKT_ARRIVAL:      //insert_pkt(p,tbindex);      UpFlowTable[tbindex].state = RTPOLL_DECISION;      UpFlowTable[tbindex].pkt = p;      rtpoll_decision(tbindex, PKT_ARRIVAL, p);      break;                case MAP_ARRIVAL:      UpdateAllocationTable(tbindex);      //printf("\nAllocation table for flow %d\n",      //UpFlowTable[tbindex].upstream_record.flow_id);      //print_alloclist(tbindex);      break;          default:      printf("SS%d(flow-id %d)RTPOLL-IDLE state error: Unknown event received\n",	     ss_id,UpFlowTable[tbindex].upstream_record.flow_id);      break;    }  return 1;}/**************************************************************************************************************************************************/	int Mac802_16SS::rtpoll_decision(char tbindex, EventType e, Packet* p){  if (UpFlowTable[tbindex].debug)    printf("SS%d(flow-id %d) RTPOLL_DECISION state \n",	   ss_id,UpFlowTable[tbindex].upstream_record.flow_id);    switch(e)     {    case PKT_ARRIVAL:      if (! CanBeSent(UpFlowTable[tbindex].alloc_list,p,tbindex))	{	  if (!CanUnicastReqBeSent(tbindex))	    UpFlowTable[tbindex].state = RTPOLL_WAITFORMAP;	  else 	    {	      UpFlowTable[tbindex].state = RTPOLL_TOSENDREQ;	      rtpoll_tosendreq(tbindex,SEND_UREQ, p);	    }	}      else 	{	  UpFlowTable[tbindex].state = RTPOLL_TOSEND;	  rtpoll_tosend(tbindex, SEND_PKT, p);	}      break;          default:      printf("SS%d(flow-id %d)RTPOLL-DECISION state error: Unknown event received\n",	     ss_id,UpFlowTable[tbindex].upstream_record.flow_id);      break;          }  return 1;}/**************************************************************************************************************************************************/int Mac802_16SS::rtpoll_waitformap(char tbindex, EventType e, Packet* p){  if (UpFlowTable[tbindex].debug)    printf("SS%d(flow-id %d) RTPOLL_WAITFORMAP state \n",	   ss_id,UpFlowTable[tbindex].upstream_record.flow_id);	  switch(e)     {    case PKT_ARRIVAL:      insert_pkt(p,tbindex);      break;          case MAP_ARRIVAL:      UpdateAllocationTable(tbindex);      //printf("\nAllocation table for flow %d\n",      //UpFlowTable[tbindex].upstream_record.flow_id);      //print_alloclist(tbindex);            if ( CanBeSent(UpFlowTable[tbindex].alloc_list,p,tbindex))	{	  UpFlowTable[tbindex].state = RTPOLL_TOSEND;	  rtpoll_tosend(tbindex, SEND_PKT, p);	}      else if ( CanUnicastReqBeSent(tbindex))	{	  UpFlowTable[tbindex].state = RTPOLL_TOSENDREQ;	  rtpoll_tosendreq(tbindex, SEND_UREQ, p);	}      break;          default:      printf("SS%d(flow-id %d)RTPOLL-WAITFORMAP state error: Unknown event received\n",	     ss_id,UpFlowTable[tbindex].upstream_record.flow_id);      break;          }  return 1;}/**************************************************************************************************************************************************/int Mac802_16SS::rtpoll_tosend(char tbindex, EventType e, Packet* p){

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品久久久久久久99樱桃| 欧美精品久久一区| 一区二区三区日韩欧美精品| 国产成人欧美日韩在线电影| 久久久精品tv| 成人黄色软件下载| 亚洲女同一区二区| 欧美精品第1页| 经典一区二区三区| 欧美激情在线观看视频免费| 99精品国产91久久久久久| 亚洲欧美日韩中文播放 | 亚洲综合免费观看高清完整版在线| 99天天综合性| 午夜精品免费在线| 久久网这里都是精品| 99免费精品视频| 亚洲电影第三页| 久久影院电视剧免费观看| 成人免费av网站| 天天影视涩香欲综合网| 久久麻豆一区二区| 91论坛在线播放| 久久精品国产99久久6| 国产精品国产自产拍在线| 欧美日韩午夜在线视频| 精品一区二区三区免费播放| 中文字幕一区二区三| 欧美一级精品大片| 成人高清免费观看| 全国精品久久少妇| 国产精品伦理在线| 日韩亚洲欧美在线| 97久久超碰国产精品电影| 久久成人免费日本黄色| 亚洲欧美国产毛片在线| 精品毛片乱码1区2区3区| 色婷婷综合五月| 国产在线不卡视频| 五月天网站亚洲| |精品福利一区二区三区| 精品精品欲导航| 欧美三级中文字幕| 成a人片国产精品| 久久成人免费网| 亚洲444eee在线观看| 自拍偷拍国产亚洲| 欧美精品一区二区在线播放| 欧美日韩中字一区| 色综合中文字幕| 国产不卡视频一区二区三区| 麻豆精品在线视频| 亚洲午夜视频在线观看| 亚洲色图20p| 国产日本亚洲高清| 久久综合网色—综合色88| 欧美日免费三级在线| 色先锋aa成人| 99re成人在线| 成人午夜激情视频| 国产精品亚洲а∨天堂免在线| 日韩国产在线一| 婷婷亚洲久悠悠色悠在线播放 | 99精品视频在线免费观看| 美女一区二区视频| 日韩精品三区四区| 亚洲电影欧美电影有声小说| 亚洲线精品一区二区三区八戒| 亚洲视频免费在线| 亚洲欧美在线aaa| 国产精品久久午夜| 国产精品色哟哟网站| 久久久久久久免费视频了| 精品国产乱码久久久久久久| 日韩三级免费观看| 日韩欧美精品在线视频| 日韩午夜中文字幕| 精品久久国产老人久久综合| 日韩一级精品视频在线观看| 日韩写真欧美这视频| 精品久久久久av影院| 欧美精品一区二区久久久| 久久伊人蜜桃av一区二区| 久久久美女毛片| 中文字幕高清不卡| 亚洲精品免费视频| 自拍偷拍国产亚洲| 亚洲午夜日本在线观看| 肉色丝袜一区二区| 九一九一国产精品| 国产乱一区二区| 波多野洁衣一区| 欧美性一级生活| 91精品久久久久久久久99蜜臂| 日韩小视频在线观看专区| 久久久久久久久久久黄色| 国产精品沙发午睡系列990531| 日韩一区中文字幕| 午夜精品福利久久久| 另类的小说在线视频另类成人小视频在线 | 日本欧洲一区二区| 狠狠v欧美v日韩v亚洲ⅴ| 国产成人精品综合在线观看| 91在线视频18| 欧美妇女性影城| 精品成人佐山爱一区二区| 国产精品你懂的| 亚洲午夜久久久久中文字幕久| 蜜桃精品视频在线| 成人动漫中文字幕| 欧美色图天堂网| 精品国产第一区二区三区观看体验| 国产欧美va欧美不卡在线| 一区二区三区四区在线免费观看 | 亚洲天堂免费看| 人妖欧美一区二区| 99精品视频一区| 欧美一区二区三区色| 国产精品欧美精品| 日韩av成人高清| 99久久婷婷国产| 日韩欧美电影一区| 亚洲欧美激情在线| 国产一区二区电影| 欧美在线观看视频在线| 国产午夜精品福利| 午夜不卡av在线| 91丝袜高跟美女视频| 精品国产污网站| 亚洲午夜免费视频| 成人三级伦理片| 日韩精品中文字幕在线一区| 亚洲九九爱视频| 粉嫩高潮美女一区二区三区| 欧美一区二区成人| 亚洲自拍与偷拍| 成人免费观看视频| 精品国产成人系列| 日韩精品亚洲一区二区三区免费| 一本久道久久综合中文字幕| 久久久久久麻豆| 久久福利视频一区二区| 欧美三日本三级三级在线播放| 中文字幕一区二区三区精华液| 久久国产精品99久久人人澡| 欧美日精品一区视频| 亚洲精品久久嫩草网站秘色| 国产成人精品三级麻豆| 精品sm捆绑视频| 麻豆精品新av中文字幕| 欧美久久婷婷综合色| 亚洲久草在线视频| 91丨porny丨蝌蚪视频| 国产精品久久久久影院老司| 国产精品亚洲专一区二区三区 | 亚洲福利视频导航| 91麻豆123| 亚洲黄色性网站| 91亚洲午夜精品久久久久久| 国产精品久久久久aaaa| 风间由美一区二区av101| 国产欧美日韩另类视频免费观看| 激情另类小说区图片区视频区| 欧美一区二区三区在线观看视频 | 欧美一级免费大片| 蜜臀久久99精品久久久画质超高清| 欧美日韩在线综合| 亚洲国产一区二区三区| 欧美日韩在线观看一区二区| 亚洲一区二区三区国产| 欧美无乱码久久久免费午夜一区 | 欧美日韩国产高清一区二区 | eeuss国产一区二区三区| 国产精品美女久久久久av爽李琼| 粉嫩绯色av一区二区在线观看| 国产欧美日韩不卡| 91亚洲国产成人精品一区二三| 中文字幕在线不卡国产视频| 91美女片黄在线观看| 一个色综合网站| 在线不卡免费欧美| 91丨porny丨中文| 亚洲狠狠丁香婷婷综合久久久| 色屁屁一区二区| 日韩精品电影一区亚洲| 欧美精品一区二区三区在线| 懂色av中文一区二区三区 | 伊人色综合久久天天人手人婷| 日本高清不卡视频| 日日欢夜夜爽一区| 精品国产乱码久久| 99久久久国产精品| 亚洲成人一区二区在线观看| 日韩欧美一区二区不卡| 国产精品538一区二区在线| 亚洲精品综合在线| 日韩一区二区三区视频在线观看| 国产一本一道久久香蕉| 亚洲美腿欧美偷拍| 欧美成人激情免费网|