A Discrete-Event Network Simulator
API
Experiment Class Reference

Helper class for UAN CW MAC example. More...

#include "uan-cw-example.h"

+ Collaboration diagram for Experiment:

Public Member Functions

 Experiment ()
 
 Experiment (std::string name)
 
 Experiment ()
 
 Experiment (std::string name)
 
 Experiment ()
 
 Experiment (std::string name)
 
 Experiment ()
 Default constructor. More...
 
 Experiment ()
 
 Experiment ()
 Default constructor. More...
 
bool CommandSetup (int argc, char **argv)
 
void CreateDualModes (uint32_t fc)
 Create m_numRates matching control and data modes. More...
 
UanTxMode CreateMode (uint32_t kass, uint32_t fc, bool upperblock, std::string name)
 Create a UanTxMode. More...
 
std::string GetOutputFileName ()
 
std::string GetRateManager ()
 
std::string GetRtsThreshold ()
 
uint32_t GetScenario ()
 
void IncrementCw (uint32_t cw)
 Compute average throughput for a set of runs, then increment CW. More...
 
bool IsMobility ()
 
bool IsRouting ()
 
void ReceivePacket (Ptr< Socket > socket)
 Receive all available packets from a socket. More...
 
void ReceivePacket (Ptr< Socket > socket)
 Callback to receive a packet. More...
 
void ResetData ()
 Save the throughput from a single run. More...
 
uint32_t Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy, const WifiMacHelper &wifiMac, const YansWifiChannelHelper &wifiChannel)
 
Gnuplot2dDataset Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy, const WifiMacHelper &wifiMac, const YansWifiChannelHelper &wifiChannel)
 
Gnuplot2dDataset Run (UanHelper &uan)
 Run an experiment across a range of congestion window values. More...
 
Gnuplot2dDataset Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy, const WifiMacHelper &wifiMac, const YansWifiChannelHelper &wifiChannel, const MobilityHelper &mobility)
 
double Run (Parameters params)
 
uint32_t Run (uint32_t param)
 Run a parametrized experiment. More...
 
void UpdatePositions (NodeContainer &nodes)
 Assign new random positions to a set of nodes. More...
 

Public Attributes

std::string m_asciitracefile
 Name for ascii trace file, default uan-cw-example.asc. More...
 
uint32_t m_avgs
 Number of topologies to test for each cw point. More...
 
std::string m_bhCfgFile
 (Unused) More...
 
double m_boundary
 Size of boundary in meters. More...
 
UanModesList m_controlModes
 List of UanTxModes used for control channels. More...
 
uint32_t m_cwMax
 Max CW to simulate. More...
 
uint32_t m_cwMin
 Min CW to simulate. More...
 
uint32_t m_cwStep
 CW step size, default 10. More...
 
Gnuplot2dDataset m_data
 Container for the simulation data. More...
 
UanModesList m_dataModes
 List of UanTxModes used for data channels. More...
 
uint32_t m_dataRate
 DataRate in bps. More...
 
double m_depth
 Depth of transmitting and sink nodes. More...
 
bool m_doNode
 1 for do max nodes simulation (invalidates AMin and AMax values). More...
 
std::string m_gnudatfile
 Name for GNU Plot output, default uan-cw-example.gpl. More...
 
std::string m_gnuplotfile
 Filename for GnuPlot. More...
 
uint32_t m_maxRange
 Maximum range between gateway and acoustic node. More...
 
uint32_t m_numNodes
 Number of transmitting nodes. More...
 
uint32_t m_numRates
 Number of divided rates ( (NumberRates+1)TotalRate should be 0). More...
 
uint32_t m_packetSize
 Generated packet size in bytes. More...
 
uint32_t m_pktSize
 Packet size in bytes. More...
 
Time m_sifs
 SIFS time duration. More...
 
uint32_t m_simMax
 Maximum parameter to test. More...
 
uint32_t m_simMin
 Minimum parameter to test. More...
 
uint32_t m_simStep
 Amount to increment param per trial. More...
 
Time m_simTime
 Simulation run time, default 1000 s. More...
 
Time m_slotTime
 Slot time duration. More...
 
std::vector< double > m_throughputs
 Throughput for each run. More...
 
uint32_t m_totalRate
 Total channel capacity. More...
 

Private Member Functions

void AdvancePosition (Ptr< Node > node)
 
void ApplicationSetup (Ptr< Node > client, Ptr< Node > server, double start, double stop)
 
void AssignNeighbors (NodeContainer c)
 Take the grid map, divide it into 4 quadrants Assign all nodes from each quadrant to a specific container. More...
 
void CheckThroughput ()
 
NodeContainer GenerateNeighbors (NodeContainer c, uint32_t senderId)
 Generate 1-hop and 2-hop neighbors of a node in grid topology. More...
 
void GenerateTraffic (Ptr< Socket > socket, uint32_t pktSize, uint32_t pktCount, Time pktInterval)
 
Vector GetPosition (Ptr< Node > node)
 
Vector GetPosition (Ptr< Node > node)
 
void ReceivePacket (Ptr< Socket > socket)
 
void ReceivePacket (Ptr< Socket > socket)
 
void ReceivePacket (Ptr< Socket > socket)
 
void SelectSrcDest (NodeContainer c)
 Sources and destinations are randomly selected such that a node may be the source for multiple destinations and a node maybe a destination for multiple sources. More...
 
void SendMultiDestinations (Ptr< Node > sender, NodeContainer c)
 A sender node will set up a flow to each of the its neighbors in its quadrant randomly. More...
 
void SetPosition (Ptr< Node > node, Vector position)
 
void SetPosition (Ptr< Node > node, Vector position)
 
Ptr< SocketSetupPacketReceive (Ptr< Node > node)
 
Ptr< SocketSetupPacketReceive (Ptr< Node > node)
 
Ptr< SocketSetupPacketReceive (Ptr< Node > node)
 

Private Attributes

uint32_t bytesTotal
 
NodeContainer containerA
 
NodeContainer containerB
 
NodeContainer containerC
 
NodeContainer containerD
 
bool enableFlowMon
 
bool enableMobility
 
bool enablePcap
 
bool enableRouting
 
bool enableTracing
 
double expMean
 
uint32_t gridSize
 
uint32_t m_bytesTotal
 Total bytes received. More...
 
Gnuplot2dDataset m_output
 
uint32_t m_pktsTotal
 
uint32_t nodeDistance
 
std::string outputFileName
 
uint32_t packetSize
 
uint32_t port
 
std::string rateManager
 
std::string rtsThreshold
 
double samplingPeriod
 
uint32_t scenario
 
double totalTime
 

Detailed Description

Helper class for UAN CW MAC example.

Container for the parameters describing a single experiment.

An experiment measures the average throughput for a series of CW values.

See also
uan-cw-example.cc

An experiment samples a range of parameter values. The parameter controls the number of nodes (if m_doNode is true), or the UanMacRcGw MaxReservations attribute.

See also
uan-rc-example.cc

Definition at line 95 of file mixed-network.cc.

Constructor & Destructor Documentation

Experiment::Experiment ( )

Definition at line 102 of file mixed-network.cc.

Referenced by CommandSetup().

+ Here is the caller graph for this function:

Experiment::Experiment ( )
Experiment::Experiment ( std::string  name)

Definition at line 150 of file multirate.cc.

References m_output, and ns3::Gnuplot2dDataset::SetStyle().

+ Here is the call graph for this function:

Experiment::Experiment ( )
Experiment::Experiment ( std::string  name)
Experiment::Experiment ( )
Experiment::Experiment ( std::string  name)
Experiment::Experiment ( )

Default constructor.

Experiment::Experiment ( )

Default constructor.

Member Function Documentation

void Experiment::AdvancePosition ( Ptr< Node node)
private
void Experiment::ApplicationSetup ( Ptr< Node client,
Ptr< Node server,
double  start,
double  stop 
)
private
void Experiment::AssignNeighbors ( NodeContainer  c)
private

Take the grid map, divide it into 4 quadrants Assign all nodes from each quadrant to a specific container.

Definition at line 216 of file multirate.cc.

References ns3::NodeContainer::Add(), containerA, containerB, containerC, containerD, ns3::NodeContainer::Get(), ns3::NodeContainer::GetN(), and gridSize.

Referenced by Run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Experiment::CheckThroughput ( )
private

Definition at line 199 of file multirate.cc.

References ns3::Gnuplot2dDataset::Add(), bytesTotal, m_output, ns3::Now(), samplingPeriod, and ns3::Seconds().

Referenced by Run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Experiment::CreateDualModes ( uint32_t  fc)

Create m_numRates matching control and data modes.

Parameters
fcMode center frequency offset.

Definition at line 132 of file uan-rc-example.cc.

Referenced by Run().

+ Here is the caller graph for this function:

UanTxMode Experiment::CreateMode ( uint32_t  kass,
uint32_t  fc,
bool  upperblock,
std::string  name 
)

Create a UanTxMode.

The mode physical rate is set equal to m_totalRate. The data rate and bandwidth are set to

\[{\rm{rate, bandwidth}} = {\rm{kass}}\frac{{{\rm{m\_totalRate}}}}{{{\rm{m\_numRates}} + 1}}\]

The center frequency is set to

\[{f_{center}} = {\rm{fc}} + \frac{{ \pm {\rm{m\_totalRate}} \mp {\rm{rate}}}}{2}\]

where the upper sign is taken if upperblock is true.

Parameters
kassFraction of total bandwidth assigned to mode.
fcMode center frequency offset.
upperblockSign choice in setting the center frequency.
nameMode name.
Returns
The new mode.

Definition at line 98 of file uan-rc-example.cc.

NodeContainer Experiment::GenerateNeighbors ( NodeContainer  c,
uint32_t  senderId 
)
private

Generate 1-hop and 2-hop neighbors of a node in grid topology.

Definition at line 257 of file multirate.cc.

References ns3::NodeContainer::Add(), and ns3::NodeContainer::Get().

Referenced by Run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Experiment::GenerateTraffic ( Ptr< Socket socket,
uint32_t  pktSize,
uint32_t  pktCount,
Time  pktInterval 
)
private

Definition at line 103 of file wifi-clear-channel-cmu.cc.

References ns3::ListPositionAllocator::Add(), ns3::Gnuplot2dDataset::Add(), ns3::Gnuplot::AddDataset(), ns3::YansWifiChannelHelper::AddPropagationLoss(), ns3::Ipv4AddressHelper::Assign(), ns3::Socket::Close(), second::cmd, ns3::Socket::Connect(), ns3::YansWifiChannelHelper::Create(), ns3::NodeContainer::Create(), ns3::Socket::CreateSocket(), ns3::YansWifiPhyHelper::Default(), ns3::Simulator::Destroy(), first::devices, experiment(), ns3::Gnuplot::GenerateOutput(), ns3::NodeContainer::Get(), ns3::InternetStackHelper::Install(), ns3::MobilityHelper::Install(), ns3::WifiHelper::Install(), ns3::Gnuplot2dDataset::LINES, ns3::TypeId::LookupByName(), third::mac, third::mobility, NS_LOG_DEBUG, NS_LOG_INFO, packetSize, ns3::CommandLine::Parse(), third::phy, Run(), ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::Seconds(), ns3::Socket::Send(), ns3::WifiPhyHelper::Set(), ns3::Socket::SetAllowBroadcast(), ns3::Ipv4AddressHelper::SetBase(), ns3::YansWifiPhyHelper::SetChannel(), ns3::Config::SetDefault(), ns3::Gnuplot::SetExtra(), ns3::Gnuplot::SetLegend(), ns3::MobilityHelper::SetMobilityModel(), ns3::MobilityHelper::SetPositionAllocator(), ns3::YansWifiChannelHelper::SetPropagationDelay(), ns3::WifiHelper::SetRemoteStationManager(), ns3::WifiHelper::SetStandard(), ns3::Gnuplot2dDataset::SetStyle(), ns3::Gnuplot::SetTerminal(), ns3::WifiMacHelper::SetType(), SetupPacketReceive(), third::wifi, and ns3::WIFI_PHY_STANDARD_80211b.

+ Here is the call graph for this function:

std::string Experiment::GetOutputFileName ( )
inline

Definition at line 103 of file multirate.cc.

Referenced by CommandSetup(), and Run().

+ Here is the caller graph for this function:

Vector Experiment::GetPosition ( Ptr< Node node)
private
Vector Experiment::GetPosition ( Ptr< Node node)
private

Definition at line 76 of file wifi-adhoc.cc.

References ns3::Object::GetObject(), ns3::MobilityModel::GetPosition(), and third::mobility.

Referenced by PrintPosition().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string Experiment::GetRateManager ( )
inline

Definition at line 107 of file multirate.cc.

References ReceivePacket(), SetupPacketReceive(), and visualizer.core::start().

Referenced by CommandSetup().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string Experiment::GetRtsThreshold ( )
inline

Definition at line 99 of file multirate.cc.

Referenced by CommandSetup().

+ Here is the caller graph for this function:

uint32_t Experiment::GetScenario ( )
inline

Definition at line 94 of file multirate.cc.

Referenced by CommandSetup().

+ Here is the caller graph for this function:

void Experiment::IncrementCw ( uint32_t  cw)

Compute average throughput for a set of runs, then increment CW.

Parameters
cwCW value for completed runs.

Definition at line 86 of file uan-cw-example.cc.

References NS_ASSERT, NS_LOG_DEBUG, and ns3::Config::Set().

Referenced by Run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Experiment::IsMobility ( )
inline

Definition at line 89 of file multirate.cc.

Referenced by CommandSetup().

+ Here is the caller graph for this function:

bool Experiment::IsRouting ( )
inline

Definition at line 85 of file multirate.cc.

Referenced by CommandSetup().

+ Here is the caller graph for this function:

void Experiment::ReceivePacket ( Ptr< Socket socket)
private
void Experiment::ReceivePacket ( Ptr< Socket socket)
private
void Experiment::ReceivePacket ( Ptr< Socket socket)

Receive all available packets from a socket.

Parameters
socketThe receive socket.
void Experiment::ReceivePacket ( Ptr< Socket socket)

Callback to receive a packet.

Parameters
socketThe socket receiving packets.
void Experiment::ReceivePacket ( Ptr< Socket socket)
private

Definition at line 189 of file multirate.cc.

References bytesTotal, ns3::Packet::GetSize(), and ns3::Socket::Recv().

Referenced by AdvancePosition(), Run(), SetupPacketReceive(), and UpdatePositions().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Experiment::ResetData ( )

Save the throughput from a single run.

Definition at line 78 of file uan-cw-example.cc.

References ns3::Now(), and NS_LOG_DEBUG.

Referenced by Run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t Experiment::Run ( const WifiHelper wifi,
const YansWifiPhyHelper wifiPhy,
const WifiMacHelper wifiMac,
const YansWifiChannelHelper wifiChannel 
)
uint32_t Experiment::Run ( const WifiHelper wifi,
const YansWifiPhyHelper wifiPhy,
const WifiMacHelper wifiMac,
const YansWifiChannelHelper wifiChannel 
)
Gnuplot2dDataset Experiment::Run ( UanHelper uan)

Run an experiment across a range of congestion window values.

Parameters
uanThe Uan stack helper to configure nodes in the model.
Returns
The data set of CW values and measured throughput

Definition at line 132 of file uan-cw-example.cc.

References ns3::ListPositionAllocator::Add(), ns3::Gnuplot::AddDataset(), ns3::CommandLine::AddValue(), ns3::Object::AggregateObject(), ns3::UanModesList::AppendMode(), ns3::Socket::Bind(), third::channel, second::cmd, ns3::ObjectFactory::Create(), ns3::NodeContainer::Create(), first::devices, ns3::UanHelper::EnableAsciiAll(), ns3::Gnuplot::GenerateOutput(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::NetDeviceContainer::GetN(), ns3::NodeContainer::GetN(), ns3::Object::GetObject(), GetPosition(), ns3::UniformRandomVariable::GetValue(), IncrementCw(), ns3::PacketSocketHelper::Install(), ns3::OnOffHelper::Install(), ns3::MobilityHelper::Install(), ns3::UanHelper::Install(), ns3::LOG_LEVEL_ALL, ns3::LogComponentEnable(), m_avgs, m_boundary, m_cwMax, m_cwMin, m_dataRate, m_depth, m_gnudatfile, m_numNodes, m_packetSize, m_slotTime, ns3::MakeCallback(), min, third::mobility, NS_FATAL_ERROR, NS_LOG_DEBUG, ns3::CommandLine::Parse(), ReceivePacket(), ResetData(), Run(), ns3::Seconds(), ns3::OnOffHelper::SetAttribute(), ns3::UanHelper::SetMac(), ns3::MobilityHelper::SetMobilityModel(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::MobilityHelper::SetPositionAllocator(), ns3::PacketSocketAddress::SetProtocol(), ns3::Socket::SetRecvCallback(), ns3::PacketSocketAddress::SetSingleDevice(), ns3::ObjectFactory::SetTypeId(), sink, ns3::ApplicationContainer::Start(), ns3::ApplicationContainer::Stop(), UpdatePositions(), and sample-rng-plot::x.

+ Here is the call graph for this function:

double Experiment::Run ( Parameters  params)

Definition at line 107 of file mixed-network.cc.

References ns3::ListPositionAllocator::Add(), ns3::ApplicationContainer::Add(), ns3::YansWifiChannelHelper::AddPropagationLoss(), first::address, ns3::CommandLine::AddValue(), Parameters::apSupportsGreenfield, Parameters::apType, ns3::Ipv4AddressHelper::Assign(), Parameters::bHasTraffic, third::channel, first::clientApps, second::cmd, ns3::YansWifiChannelHelper::Create(), ns3::NodeContainer::Create(), ns3::YansWifiChannelHelper::Default(), ns3::YansWifiPhyHelper::Default(), ns3::Simulator::Destroy(), ns3::WifiPhyHelper::DLT_IEEE802_11_RADIO, Parameters::enableErpProtection, Parameters::enableShortPlcpPreamble, Parameters::enableShortSlotTime, Parameters::erpProtectionMode, experiment(), ns3::PointerValue::Get(), ns3::ApplicationContainer::Get(), ns3::NodeContainer::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::Ipv4Address::GetAny(), ns3::Node::GetDevice(), ns3::WifiNetDevice::GetMac(), Parameters::gHasTraffic, ns3::PacketSinkHelper::Install(), ns3::UdpServerHelper::Install(), ns3::OnOffHelper::Install(), ns3::InternetStackHelper::Install(), ns3::MobilityHelper::Install(), ns3::WifiHelper::Install(), Parameters::isUdp, third::mac, ns3::MicroSeconds(), third::mobility, Parameters::nGreenfieldHasTraffic, Parameters::nNonGreenfieldHasTraffic, NS_LOG_ERROR, Parameters::nWifiB, Parameters::nWifiG, Parameters::nWifiNGreenfield, Parameters::nWifiNNonGreenfield, ns3::CommandLine::Parse(), Parameters::payloadSize, third::phy, port, Parameters::rifsMode, Parameters::rifsSupported, Run(), ns3::Simulator::Run(), ns3::Seconds(), ns3::WifiPhyHelper::Set(), ns3::OnOffHelper::SetAttribute(), ns3::UdpClientHelper::SetAttribute(), ns3::Ipv4AddressHelper::SetBase(), ns3::YansWifiPhyHelper::SetChannel(), ns3::Config::SetDefault(), ns3::MobilityHelper::SetMobilityModel(), ns3::WifiPhyHelper::SetPcapDataLinkType(), ns3::MobilityHelper::SetPositionAllocator(), ns3::WifiHelper::SetRemoteStationManager(), ns3::WifiHelper::SetStandard(), ns3::Txop::SetTxopLimit(), ns3::WifiMacHelper::SetType(), Parameters::simulationTime, third::ssid, first::stack, ns3::ApplicationContainer::Start(), ns3::Simulator::Stop(), ns3::ApplicationContainer::Stop(), Parameters::testName, third::wifi, ns3::WIFI_PHY_STANDARD_80211b, ns3::WIFI_PHY_STANDARD_80211g, ns3::WIFI_PHY_STANDARD_80211n_2_4GHZ, and third::wifiApNode.

Referenced by CommandSetup(), GenerateTraffic(), and Run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t Experiment::Run ( uint32_t  param)

Run a parametrized experiment.

The parameter sets either the number of nodes (if m_doNode is true) or the "a" parameter, which controls the UanMacRcGw MaxReservations attribute.

Parameters
paramThe parameter value.
Returns
The total number of bytes delivered.

Definition at line 147 of file uan-rc-example.cc.

References ns3::ListPositionAllocator::Add(), ns3::Gnuplot2dDataset::Add(), ns3::Gnuplot::AddDataset(), ns3::CommandLine::AddValue(), ns3::Socket::Bind(), second::cmd, ns3::NodeContainer::Create(), CreateDualModes(), first::devices, ns3::Gnuplot::GenerateOutput(), ns3::NetDeviceContainer::Get(), ns3::Time::GetSeconds(), ns3::PacketSocketHelper::Install(), ns3::OnOffHelper::Install(), ns3::MobilityHelper::Install(), ns3::UanHelper::Install(), ns3::LOG_LEVEL_ALL, ns3::LogComponentEnable(), m_doNode, m_gnuplotfile, m_maxRange, m_numNodes, m_numRates, m_pktSize, m_sifs, m_simMax, m_simMin, m_simStep, m_simTime, m_totalRate, ns3::MakeCallback(), third::mobility, first::nodes, NS_FATAL_ERROR, NS_LOG_DEBUG, ns3::CommandLine::Parse(), ReceivePacket(), Run(), ns3::Seconds(), ns3::OnOffHelper::SetAttribute(), ns3::UanHelper::SetMac(), ns3::MobilityHelper::SetMobilityModel(), ns3::UanHelper::SetPhy(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::MobilityHelper::SetPositionAllocator(), ns3::PacketSocketAddress::SetProtocol(), ns3::Socket::SetRecvCallback(), ns3::PacketSocketAddress::SetSingleDevice(), sink, ns3::ApplicationContainer::Start(), ns3::ApplicationContainer::Stop(), and sample-rng-plot::x.

+ Here is the call graph for this function:

void Experiment::SelectSrcDest ( NodeContainer  c)
private

Sources and destinations are randomly selected such that a node may be the source for multiple destinations and a node maybe a destination for multiple sources.

Definition at line 279 of file multirate.cc.

References ApplicationSetup(), ns3::NodeContainer::Get(), ns3::RandomVariableStream::GetInteger(), ns3::NodeContainer::GetN(), ns3::ObjectBase::SetAttribute(), and totalTime.

Referenced by Run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Experiment::SendMultiDestinations ( Ptr< Node sender,
NodeContainer  c 
)
private

A sender node will set up a flow to each of the its neighbors in its quadrant randomly.

All the flows are exponentially distributed

Definition at line 302 of file multirate.cc.

References ApplicationSetup(), expMean, ns3::NodeContainer::Get(), ns3::Node::GetId(), ns3::NodeContainer::GetN(), ns3::UniformRandomVariable::GetValue(), ns3::ExponentialRandomVariable::GetValue(), NS_LOG_DEBUG, ns3::ObjectBase::SetAttribute(), visualizer.core::start(), and totalTime.

Referenced by Run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Experiment::SetPosition ( Ptr< Node node,
Vector  position 
)
private
void Experiment::SetPosition ( Ptr< Node node,
Vector  position 
)
private

Definition at line 69 of file wifi-adhoc.cc.

References ns3::Object::GetObject(), third::mobility, and ns3::MobilityModel::SetPosition().

+ Here is the call graph for this function:

Ptr<Socket> Experiment::SetupPacketReceive ( Ptr< Node node)
private
Ptr<Socket> Experiment::SetupPacketReceive ( Ptr< Node node)
private
Ptr< Socket > Experiment::SetupPacketReceive ( Ptr< Node node)
private

Definition at line 177 of file multirate.cc.

References ns3::Socket::Bind(), ns3::MakeCallback(), port, ReceivePacket(), ns3::Socket::SetRecvCallback(), and sink.

Referenced by AdvancePosition(), and ApplicationSetup().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Experiment::UpdatePositions ( NodeContainer nodes)

Assign new random positions to a set of nodes.

New positions are randomly assigned within the bounding box.

Parameters
nodesThe nodes to reposition.

Definition at line 106 of file uan-cw-example.cc.

References ns3::NodeContainer::Begin(), ns3::NodeContainer::End(), ns3::Object::GetObject(), ns3::Packet::GetSize(), ns3::UniformRandomVariable::GetValue(), ns3::Now(), NS_LOG_DEBUG, ReceivePacket(), ns3::Socket::Recv(), and ns3::MobilityModel::SetPosition().

Referenced by Run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

uint32_t Experiment::bytesTotal
private

Definition at line 129 of file multirate.cc.

Referenced by CheckThroughput(), and ReceivePacket().

NodeContainer Experiment::containerA
private

Definition at line 142 of file multirate.cc.

Referenced by AssignNeighbors(), and Run().

NodeContainer Experiment::containerB
private

Definition at line 142 of file multirate.cc.

Referenced by AssignNeighbors(), and Run().

NodeContainer Experiment::containerC
private

Definition at line 142 of file multirate.cc.

Referenced by AssignNeighbors(), and Run().

NodeContainer Experiment::containerD
private

Definition at line 142 of file multirate.cc.

Referenced by AssignNeighbors(), and Run().

bool Experiment::enableFlowMon
private

Definition at line 138 of file multirate.cc.

Referenced by Run().

bool Experiment::enableMobility
private

Definition at line 140 of file multirate.cc.

Referenced by CommandSetup(), and Run().

bool Experiment::enablePcap
private

Definition at line 136 of file multirate.cc.

Referenced by Run().

bool Experiment::enableRouting
private

Definition at line 139 of file multirate.cc.

Referenced by CommandSetup(), and Run().

bool Experiment::enableTracing
private

Definition at line 137 of file multirate.cc.

Referenced by Run().

double Experiment::expMean
private

Definition at line 126 of file multirate.cc.

Referenced by SendMultiDestinations().

uint32_t Experiment::gridSize
private

Definition at line 131 of file multirate.cc.

Referenced by AssignNeighbors(), and Run().

std::string Experiment::m_asciitracefile

Name for ascii trace file, default uan-cw-example.asc.

Definition at line 85 of file uan-cw-example.h.

uint32_t Experiment::m_avgs

Number of topologies to test for each cw point.

Definition at line 79 of file uan-cw-example.h.

Referenced by Run().

std::string Experiment::m_bhCfgFile

(Unused)

Definition at line 86 of file uan-cw-example.h.

double Experiment::m_boundary

Size of boundary in meters.

Definition at line 73 of file uan-cw-example.h.

Referenced by Run().

uint32_t Experiment::m_bytesTotal
private

Total bytes received.

Total number of bytes received in a simulation run.

Definition at line 54 of file wifi-adhoc.cc.

UanModesList Experiment::m_controlModes

List of UanTxModes used for control channels.

Definition at line 62 of file uan-rc-example.h.

uint32_t Experiment::m_cwMax

Max CW to simulate.

Definition at line 77 of file uan-cw-example.h.

Referenced by Run().

uint32_t Experiment::m_cwMin

Min CW to simulate.

Definition at line 76 of file uan-cw-example.h.

Referenced by Run().

uint32_t Experiment::m_cwStep

CW step size, default 10.

Definition at line 78 of file uan-cw-example.h.

Gnuplot2dDataset Experiment::m_data

Container for the simulation data.

Definition at line 88 of file uan-cw-example.h.

UanModesList Experiment::m_dataModes

List of UanTxModes used for data channels.

Definition at line 61 of file uan-rc-example.h.

uint32_t Experiment::m_dataRate

DataRate in bps.

Definition at line 71 of file uan-cw-example.h.

Referenced by Run().

double Experiment::m_depth

Depth of transmitting and sink nodes.

Definition at line 72 of file uan-cw-example.h.

Referenced by Run().

bool Experiment::m_doNode

1 for do max nodes simulation (invalidates AMin and AMax values).

Definition at line 53 of file uan-rc-example.h.

Referenced by Run().

std::string Experiment::m_gnudatfile

Name for GNU Plot output, default uan-cw-example.gpl.

Definition at line 84 of file uan-cw-example.h.

Referenced by Run().

std::string Experiment::m_gnuplotfile

Filename for GnuPlot.

Definition at line 57 of file uan-rc-example.h.

Referenced by Run().

uint32_t Experiment::m_maxRange

Maximum range between gateway and acoustic node.

Definition at line 50 of file uan-rc-example.h.

Referenced by Run().

uint32_t Experiment::m_numNodes

Number of transmitting nodes.

Number of nodes (invalid for m_doNode true).

Definition at line 70 of file uan-cw-example.h.

Referenced by Run().

uint32_t Experiment::m_numRates

Number of divided rates ( (NumberRates+1)TotalRate should be 0).

Definition at line 48 of file uan-rc-example.h.

Referenced by Run().

Gnuplot2dDataset Experiment::m_output
private

Definition at line 123 of file multirate.cc.

Referenced by CheckThroughput(), Experiment(), and Run().

uint32_t Experiment::m_packetSize

Generated packet size in bytes.

Definition at line 74 of file uan-cw-example.h.

Referenced by Run().

uint32_t Experiment::m_pktSize

Packet size in bytes.

Definition at line 52 of file uan-rc-example.h.

Referenced by Run().

uint32_t Experiment::m_pktsTotal
private

Definition at line 53 of file wifi-clear-channel-cmu.cc.

Time Experiment::m_sifs

SIFS time duration.

Definition at line 54 of file uan-rc-example.h.

Referenced by Run().

uint32_t Experiment::m_simMax

Maximum parameter to test.

Definition at line 46 of file uan-rc-example.h.

Referenced by Run().

uint32_t Experiment::m_simMin

Minimum parameter to test.

Definition at line 45 of file uan-rc-example.h.

Referenced by Run().

uint32_t Experiment::m_simStep

Amount to increment param per trial.

Definition at line 47 of file uan-rc-example.h.

Referenced by Run().

Time Experiment::m_simTime

Simulation run time, default 1000 s.

Simulation time per trial.

Definition at line 82 of file uan-cw-example.h.

Referenced by Run().

Time Experiment::m_slotTime

Slot time duration.

Definition at line 81 of file uan-cw-example.h.

Referenced by Run().

std::vector<double> Experiment::m_throughputs

Throughput for each run.

Definition at line 89 of file uan-cw-example.h.

uint32_t Experiment::m_totalRate

Total channel capacity.

Definition at line 49 of file uan-rc-example.h.

Referenced by Run().

uint32_t Experiment::nodeDistance
private

Definition at line 132 of file multirate.cc.

Referenced by Run().

std::string Experiment::outputFileName
private

Definition at line 143 of file multirate.cc.

Referenced by CommandSetup().

uint32_t Experiment::packetSize
private

Definition at line 130 of file multirate.cc.

Referenced by ApplicationSetup(), and CommandSetup().

uint32_t Experiment::port
private

Definition at line 133 of file multirate.cc.

Referenced by ApplicationSetup(), and SetupPacketReceive().

std::string Experiment::rateManager
private

Definition at line 143 of file multirate.cc.

Referenced by CommandSetup().

std::string Experiment::rtsThreshold
private

Definition at line 143 of file multirate.cc.

Referenced by CommandSetup().

double Experiment::samplingPeriod
private

Definition at line 127 of file multirate.cc.

Referenced by CheckThroughput(), and CommandSetup().

uint32_t Experiment::scenario
private

Definition at line 134 of file multirate.cc.

Referenced by CommandSetup(), and Run().

double Experiment::totalTime
private

Definition at line 125 of file multirate.cc.

Referenced by CommandSetup(), Run(), SelectSrcDest(), and SendMultiDestinations().


The documentation for this class was generated from the following files: