A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
28
using namespace
ns3
;
29
38
class
Experiment
39
{
40
public
:
47
Gnuplot2dDataset
Run (
UanHelper
&uan);
53
void
ReceivePacket
(
Ptr<Socket>
socket);
60
void
UpdatePositions (
NodeContainer
&
nodes
);
62
void
ResetData ();
68
void
IncrementCw (uint32_t cw);
69
70
uint32_t
m_numNodes
;
71
uint32_t
m_dataRate
;
72
double
m_depth
;
73
double
m_boundary
;
74
uint32_t
m_packetSize
;
75
uint32_t m_bytesTotal;
76
uint32_t
m_cwMin
;
77
uint32_t
m_cwMax
;
78
uint32_t
m_cwStep
;
79
uint32_t
m_avgs
;
80
81
Time
m_slotTime
;
82
Time
m_simTime
;
83
84
std::string
m_gnudatfile
;
85
std::string
m_asciitracefile
;
86
std::string
m_bhCfgFile
;
87
88
Gnuplot2dDataset
m_data
;
89
std::vector<double>
m_throughputs
;
90
92
Experiment
();
93
};
94
95
#endif
/* UAN_CW_EXAMPLE_H */
Experiment
Helper class for UAN CW MAC example.
Definition:
wifi-adhoc.cc:41
Experiment::m_packetSize
uint32_t m_packetSize
Generated packet size in bytes.
Definition:
uan-cw-example.h:74
Experiment::m_depth
double m_depth
Depth of transmitting and sink nodes.
Definition:
uan-cw-example.h:72
Experiment::m_asciitracefile
std::string m_asciitracefile
Name for ascii trace file, default uan-cw-example.asc.
Definition:
uan-cw-example.h:85
Experiment::m_cwMin
uint32_t m_cwMin
Min CW to simulate.
Definition:
uan-cw-example.h:76
Experiment::Experiment
Experiment()
Default constructor.
Experiment::m_simTime
Time m_simTime
Simulation run time, default 1000 s.
Definition:
uan-cw-example.h:82
Experiment::m_cwMax
uint32_t m_cwMax
Max CW to simulate.
Definition:
uan-cw-example.h:77
Experiment::m_avgs
uint32_t m_avgs
Number of topologies to test for each cw point.
Definition:
uan-cw-example.h:79
Experiment::m_dataRate
uint32_t m_dataRate
DataRate in bps.
Definition:
uan-cw-example.h:71
Experiment::m_data
Gnuplot2dDataset m_data
Container for the simulation data.
Definition:
uan-cw-example.h:88
Experiment::ReceivePacket
void ReceivePacket(Ptr< Socket > socket)
Receive all available packets from a socket.
Experiment::m_slotTime
Time m_slotTime
Slot time duration.
Definition:
uan-cw-example.h:81
Experiment::m_bhCfgFile
std::string m_bhCfgFile
(Unused)
Definition:
uan-cw-example.h:86
Experiment::m_gnudatfile
std::string m_gnudatfile
Name for GNU Plot output, default uan-cw-example.gpl.
Definition:
uan-cw-example.h:84
Experiment::m_throughputs
std::vector< double > m_throughputs
Throughput for each run.
Definition:
uan-cw-example.h:89
Experiment::m_numNodes
uint32_t m_numNodes
Number of transmitting nodes.
Definition:
uan-cw-example.h:70
Experiment::m_boundary
double m_boundary
Size of boundary in meters.
Definition:
uan-cw-example.h:73
Experiment::m_cwStep
uint32_t m_cwStep
CW step size, default 10.
Definition:
uan-cw-example.h:78
ns3::Gnuplot2dDataset
Class to represent a 2D points plot.
Definition:
gnuplot.h:118
ns3::NodeContainer
keep track of a set of node pointers.
Definition:
node-container.h:39
ns3::Ptr< Socket >
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:103
ns3::UanHelper
UAN configuration helper.
Definition:
uan-helper.h:41
first.nodes
nodes
Definition:
first.py:32
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
uan
examples
uan-cw-example.h
Generated on Tue Feb 6 2024 19:21:28 for ns-3 by
1.9.1