This example showcases the "CW-MAC" described in System Design Considerations for Undersea Networks article in the IEEE Journal on Selected Areas of Communications 2008 by Nathan Parrish, Leonard Tracy and Sumit Roy. More...
#include "uan-animation.h"
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/netanim-module.h"
#include "ns3/mobility-module.h"
#include "ns3/applications-module.h"
#include <fstream>
Go to the source code of this file.
This example showcases the "CW-MAC" described in System Design Considerations for Undersea Networks article in the IEEE Journal on Selected Areas of Communications 2008 by Nathan Parrish, Leonard Tracy and Sumit Roy.
The MAC protocol is implemented in the class UanMacCw. CW-MAC is similar in nature to the IEEE 802.11 DCF with a constant backoff window. It requires two parameters to be set, the slot time and the contention window size. The contention window size is the backoff window size in slots, and the slot time is the duration of each slot. These parameters should be set according to the overall network size, internode spacing and the number of nodes in the network.
This example deploys nodes randomly (according to RNG seed of course) in a finite square region with the X and Y coordinates of the nodes distributed uniformly. The CW parameter is varied throughout the simulation in order to show the variation in throughput with respect to changes in CW.
Definition in file uan-animation.cc.