INET Framework for OMNeT++/OMNEST
Ieee80211Consts.h
Go to the documentation of this file.
00001 //
00002 // Copyright (C) 2006 Levente Mészáros
00003 //
00004 // This program is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public License
00006 // as published by the Free Software Foundation; either version 2
00007 // of the License, or (at your option) any later version.
00008 //
00009 // This program is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU Lesser General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU Lesser General Public License
00015 // along with this program; if not, see <http://www.gnu.org/licenses/>.
00016 //
00017 
00018 #ifndef IEEE80211_CONSTS_H
00019 #define IEEE80211_CONSTS_H
00020 
00021 // XXX these are taken over from Consts80211.h
00022 // the phy has recognized a bit error in the packet
00023 #define BITERROR -1
00024 // packet lost due to collision
00025 #define COLLISION 9
00026 
00027 // frame lengths in bits
00028 // XXX this is duplicate, it's already in Ieee80211Frame.msg
00029 const unsigned int LENGTH_RTS = 160;
00030 const unsigned int LENGTH_CTS = 112;
00031 const unsigned int LENGTH_ACK = 112;
00032 
00033 // time slot ST, short interframe space SIFS, distributed interframe
00034 // space DIFS, and extended interframe space EIFS
00035 
00036 const_simtime_t ST = 20E-6;
00037 const_simtime_t SIFS = 10E-6;
00038 const_simtime_t DIFS = 2 * ST + SIFS;
00039 const_simtime_t MAX_PROPAGATION_DELAY = 2E-6;  // 300 meters at the speed of light
00040 
00041 const int RETRY_LIMIT = 7;
00042 
00044 const int CW_MIN = 31;
00045 
00047 const int CW_MAX = 1023;
00048 
00049 const int PHY_HEADER_LENGTH = 192;
00050 const int HEADER_WITHOUT_PREAMBLE = 48;
00051 const double BITRATE_HEADER = 1E+6;
00052 const double BANDWIDTH = 2E+6;
00053 
00054 #endif
00055