00001 /** 00002 * \ingroup devices 00003 * \defgroup Wifi Wifi Models 00004 * 00005 * \section WifiModelOverview Wifi Models Overview 00006 * 00007 * The set of 802.11 models provided in ns-3 attempts to provide 00008 * an accurate MAC-level implementation of the 802.11 specification 00009 * and to provide a not-so-slow PHY-level model of the 802.11a 00010 * specification. 00011 * 00012 * The current implementation provides roughly 4 levels of models: 00013 * - the PHY layer models 00014 * - the so-called MAC low models: they implement DCF 00015 * - the so-called MAC high models: they implement the MAC-level 00016 * beacon generation, probing, and association state machines. 00017 * - a set of Rate control algorithms used by the MAC low models. 00018 * 00019 * We have today 3 MAC high models: 00020 * - a simple adhoc state machine which does not perform any 00021 * kind of beacon generation, probing, or association. This 00022 * state machine is implemented by the ns3::AdhocWifiNetDevice 00023 * and ns3::MacHighAdhoc classes. 00024 * - an active probing and association state machine which handles 00025 * automatic re-association whenever too many beacons are missed 00026 * is implemented by the ns3::NqstaWifiNetDevice and 00027 * ns3::MacHighNqsta classes. 00028 * - an access point which generates periodic beacons, and which 00029 * accepts every attempt to associate. This AP state machine 00030 * is implemented by the ns3::NqapWifiNetDevice and 00031 * ns3::MacHighNqap classes. 00032 * 00033 * The MAC low layer is split in 3 components: 00034 * - ns3::MacLow which takes care of RTS/CTS/DATA/ACK transactions. 00035 * - ns3::DcfManager and ns3::DcfState which implements the DCF function. 00036 * - ns3::DcaTxop which handles the packet queue, packet fragmentation, 00037 * and packet retransmissions if they are needed. 00038 * 00039 * The PHY layer implements a single model in the ns3::WifiPhy class: the 00040 * physical layer model implemented there is described fully in a paper titled 00041 * "Yet Another Network Simulator", available there: http://cutebugs.net/files/wns2-yans.pdf 00042 * 00043 * It also provides a set of Rate control algorithms: 00044 * - ns3::ArfMacStations 00045 * - ns3::AArfMacStations 00046 * - ns3::IdealMacStations 00047 * - ns3::CrMacStations 00048 * - ns3::OnoeMacStations 00049 * - ns3::AmrrMacStations 00050 * 00051 * \section WifiTracingModel Wifi Tracing Model 00052 * 00053 * Like all ns-3 devices, the Wifi Model provides a number of trace sources. 00054 * These trace sources can be hooked using your own custom trace code, or you 00055 * can use our helper functions to arrange for tracing to be enabled on devices 00056 * you specify. 00057 * 00058 * \subsection WifiTracingModelUpperHooks Upper-Level (MAC) Hooks 00059 * 00060 * From the point of view of tracing in the net device, there are several 00061 * interesting points to insert trace hooks. The first is at the interface 00062 * between the device and higher layers. We provide trace hooks at this point 00063 * in packet flow, which corresponds to a transition from the network to data 00064 * link layer, and call them collectively the device MAC hooks. 00065 * 00066 * The first trace hook is called "Rx" and is fired using the 00067 * ns3::WifiNetDevice::m_rxLogger trace hook. The perspective here is looking 00068 * down into the WifiNetDevice so a receive indicates a packet being sent up 00069 * from the channel to be forwarded up to higher layers. 00070 * 00071 * The second trace hook is called "Tx" and is fired using the 00072 * ns3::WifiNetDevice::m_txLogger trace hook. This trace hook indicates a 00073 * packet has been sent from higher layers down to the net device for 00074 * transmission onto the network. 00075 * 00076 * \subsection WifiTracingModelLowerHooks Low-Level (PHY) Hooks 00077 * 00078 * Another interesting place to insert trace hooks is in the state machine 00079 * that is driving the actual device transmission and reception logic. We 00080 * provide the following hooks to instrument the lower levels of the device. 00081 * 00082 * First, we provide a trace hook to indicate state changes. This trace 00083 * source is called "State" and is fired using the 00084 * ns3::WifiPhyStateHelper::m_stateLogger trace source. 00085 * 00086 * We also provide a trace hook to indicate the successful reception of a 00087 * packet from the channel. This trace source is called "RxOk" and is 00088 * accessed using the ns3::WifiPhyStateHelper::m_rxOkTrace trace source. 00089 * 00090 * There also exists a trace hook to indicate an unsuccessful reception of a 00091 * packet from the channel. This trace source is called "RxError" and is 00092 * accessed using the ns3::WifiPhyStateHelper::m_rxErrorTrace trace source. 00093 * 00094 * There is a trace hook to indicate that transmission of a packet is 00095 * starting onto the channel. This trace source is called "Tx" (don't 00096 * confuse it with the higher layer "Tx" hook) and is 00097 * fired using the ns3::WifiPhyStateHelper::m_txTrace trace source. 00098 * 00099 * \subsection WifiTracingModelRemoteHooks Remote Station Hooks 00100 * 00101 * We provide access to changes in the the per-remote-station RTS counter 00102 * through the "Ssrc" trace source which is fired using the 00103 * ns3::WifiRemoteStation::m_ssrc trace hook. 00104 * 00105 * Finally, we provide access to the per-remote-station SLRC couter that 00106 * indications the number of retransmissions of data. Changes to this 00107 * counter are traced using the ns3::WifiRemoteStation::m_slrc source. 00108 */