A Discrete-Event Network Simulator
API
uan-rc-example.cc File Reference

This example uses UanMacRc and UanMacRcGw which combined form a system using what is referred to as RC-MAC. More...

#include "uan-rc-example.h"
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/log.h"
#include "ns3/config.h"
#include "ns3/callback.h"
#include "ns3/stats-module.h"
#include <fstream>
+ Include dependency graph for uan-rc-example.cc:

Go to the source code of this file.

Detailed Description

This example uses UanMacRc and UanMacRcGw which combined form a system using what is referred to as RC-MAC.

Details of RC-MAC will be published soon. In brief terms, RC-MAC is a dual channel protocol wherein the available bandwidth is dynamically divided into two channels, a reservation channel and a data channel. The network is assumed to consist of a single gateway node which services several non-gateway nodes.

Time is divided into cycles. The non-gateway nodes transmit RTS packets on the reservation channel in parallel to scheduled data transmissions (scheduled in the previous cycle), and the gateway stores these requests for the duration of the cycle. At the start of the next cycle the gateway node transmits a CTS which contains packet transmission times for reserved packets as well as bandwidth allocation information

This script deploys a single gateway node (current UanMacRc only supports a single gateway) in the center of a region and then distributes non-gateway nodes around the gateway with a uniformly distributed range between each node and the gateway.

The script supports two simulation types. By default the gateway dynamically determines the optimal parameter settings and simulations are run with varying number of nodes (SimMin to SimMax as set by the command line). If DoNode=0 is given as a command line option then the mac parameter "a" (approximate expected number of successful RTS arrivals per cycle) is varied as the simulation parameter.

For questions about this MAC protocol email "lentracy@gmail.com"

Usage

$ ./ns3 run "uan-rc-example [Program Options]"

Program Options

–TotalRate
Total channel capacity [4096]
–NumberRates
Number of divided rates ( (NumberRates+1)TotalRate should be 0) [1023]
–MaxRange
Maximum range between gateway and acoustic node [3000]
–SimMin
Minimum parameter to test (nodes if DoNode=1, "a" param otherwise) [1]
–SimMax
Maximum parameter to test (nodes if DoNode=1, "a" param otherwise) [1]
–SimStep
Amount to increment param per trial [1]
–DataFile
Filename for GnuPlot [uan-rc-example.gpl]
–NumberNodes
Number of nodes (invalid for doNode=1) [15]
–SIFS
SIFS time duration [+50ms]
–PktSize
Packet size in bytes [1000]
–SimTime
Simulation time per trial [+1.38889h]
–DoNode
1 for do max nodes simulation (invalidates AMin and AMax values) [true]
–Quiet
Run in quiet mode (disable logging) [false]

Definition in file uan-rc-example.cc.