A Discrete-Event Network Simulator
API
uan-cw-example.h
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2009 University of Washington
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Leonard Tracy <lentracy@gmail.com>
19 */
20
21#ifndef UAN_CW_EXAMPLE_H
22#define UAN_CW_EXAMPLE_H
23
24#include "ns3/network-module.h"
25#include "ns3/stats-module.h"
26#include "ns3/uan-module.h"
27
28using namespace ns3;
29
38class Experiment
39{
40public:
62 void ResetData ();
68 void IncrementCw (uint32_t cw);
69
72 double m_depth;
73 double m_boundary;
80
83
84 std::string m_gnudatfile;
85 std::string m_asciitracefile;
86 std::string m_bhCfgFile;
87
89 std::vector<double> m_throughputs;
90
93};
94
95#endif /* UAN_CW_EXAMPLE_H */
WiFi adhoc experiment class.
Definition: wifi-adhoc.cc:46
uint32_t m_packetSize
Packet size.
double m_depth
Depth of transmitting and sink nodes.
Gnuplot2dDataset Run(const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy, const WifiMacHelper &wifiMac, const YansWifiChannelHelper &wifiChannel)
Run an experiment.
Definition: wifi-adhoc.cc:160
std::string m_asciitracefile
Name for ascii trace file, default uan-cw-example.asc.
void UpdatePositions(NodeContainer &nodes)
Assign new random positions to a set of nodes.
uint32_t m_cwMin
Min CW to simulate.
uint32_t m_bytesTotal
The number of received bytes.
Definition: wifi-adhoc.cc:95
Experiment()
Default constructor.
Time m_simTime
Simulation run time, default 1000 s.
uint32_t m_cwMax
Max CW to simulate.
uint32_t m_avgs
Number of topologies to test for each cw point.
void ResetData()
Save the throughput from a single run.
uint32_t m_dataRate
DataRate in bps.
Gnuplot2dDataset m_data
Container for the simulation data.
void ReceivePacket(Ptr< Socket > socket)
Receive all available packets from a socket.
Time m_slotTime
Slot time duration.
std::string m_bhCfgFile
(Unused)
std::string m_gnudatfile
Name for GNU Plot output, default uan-cw-example.gpl.
std::vector< double > m_throughputs
Throughput for each run.
void IncrementCw(uint32_t cw)
Compute average throughput for a set of runs, then increment CW.
uint32_t m_numNodes
Number of transmitting nodes.
double m_boundary
Size of boundary in meters.
uint32_t m_cwStep
CW step size, default 10.
Class to represent a 2D points plot.
Definition: gnuplot.h:118
keep track of a set of node pointers.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
UAN configuration helper.
Definition: uan-helper.h:41
nodes
Definition: first.py:32
Every class exported by the ns3 library is enclosed in the ns3 namespace.