From: Michal Sojka Date: Wed, 11 Feb 2009 07:57:41 +0000 (+0100) Subject: Bitrate increased to 22 Mbps, added utilization export for GUI X-Git-Url: http://rtime.felk.cvut.cz/gitweb/frescor/fwp.git/commitdiff_plain/10bf00655eb35fb6d4838eb8aef1f2e520dab865 Bitrate increased to 22 Mbps, added utilization export for GUI --- diff --git a/fwp/mngr/fwp_admctrl.c b/fwp/mngr/fwp_admctrl.c index 889f845..575a8b4 100644 --- a/fwp/mngr/fwp_admctrl.c +++ b/fwp/mngr/fwp_admctrl.c @@ -61,15 +61,11 @@ #define CTS_FRAME_SIZE 14 #define ACK_FRAME_SIZE 14 -#define BITRATE_BPS (1000*1000) #define ASLOTTIME_USEC 20 /* 802.11g-2003 p. 46 */ #define ASIFSTIME_USEC 10 #define ADIFSTIME_USEC (ASIFSTIME_USEC + 2*ASLOTTIME_USEC) #define AAIFSTIME_USEC(n) (ASIFSTIME_USEC + (n)*ASLOTTIME_USEC) -#define TXTIME_USEC(bytes) ((int64_t)(bytes) * 8 * SEC_TO_USEC / BITRATE_BPS) - - /* Default values from 802.11e */ const int aifsn[FWP_AC_NUM] = { 2, 2, 3, 7 }; const int cwmin[FWP_AC_NUM] = { 3, 7, 15, 15 }; @@ -149,7 +145,7 @@ int fwp_admctrl_utilization(struct fres_sa_scenario *scenario, void *priv, { int utilization = 0; - const int rate = 1*1000*1000; + const int rate = 22*1000*1000; const bool erp_ofdm = false; const bool short_preamble = false; struct fres_sa_contract *c, *c_new = NULL; @@ -217,7 +213,9 @@ int fwp_admctrl_utilization(struct fres_sa_scenario *scenario, void *priv, } if (utilization >= 10000 * 96/100) { goto not_schedulable; - } + } + + scenario->utilization = utilization/100; /* For GUI */ basic = fres_contract_get_basic(c_new->contract); /*int d = c->deadline_usec;*/