|
INET Framework for OMNeT++/OMNEST
|
00001 #ifndef CONSTANTS_802_11 00002 #define CONSTANTS_802_11 00003 00004 //frame kinds 00005 enum _802_11frameType { 00006 00007 //between MAC layers of two nodes 00008 DATA = 1,//data 00009 BROADCAST = 2,//broadcast 00010 RTS = 3,//request to send 00011 CTS = 4,//clear to send 00012 ACK = 5,//acknowledgement 00013 ACKRTS = 6,//cut through packet 00014 00015 //between the PHY and the MAC layer of one node 00016 BEGIN_RECEPTION = 7,//carrier sensing from the phy to the mac : 00017 //beginning of reception 00018 00019 //used in the phy layer to indicate unrocognizable frames, and 00020 //between the decider and the MAC 00021 BITERROR = -1,//the phy has recognized a bit error in the packet 00022 COLLISION = 9//packet lost due to collision 00023 }; 00024 00025 //frame lengths in bits 00026 const unsigned int LENGTH_RTS = 160; 00027 const unsigned int LENGTH_CTS = 112; 00028 const unsigned int LENGTH_ACK = 112; 00029 00030 //time slot ST, short interframe space SIFS, distributed interframe 00031 //space DIFS, and extended interframe space EIFS 00032 const double ST = 20E-6; 00033 const double SIFS = 10E-6; 00034 const double DIFS = 2*ST + SIFS; 00035 00036 const int RETRY_LIMIT = 7; 00037 00039 const int CW_MIN = 7; 00040 00042 const int CW_MAX = 255; 00043 00044 const int PHY_HEADER_LENGTH=192; 00045 const int HEADER_WITHOUT_PREAMBLE=48; 00046 const double BITRATE_HEADER=1E+6; 00047 const double BANDWIDTH=2E+6; 00048 00049 00050 const int MAC_GENERATOR = 5; 00051 00052 const double PROCESSING_TIMEOUT = 0.001; 00053 00054 #endif