Helper class for UAN CW MAC example. More...
#include "uan-animation.h"
Public Member Functions | |
NetAnimExperiment () | |
the experiment | |
void | IncrementCw (uint32_t cw) |
Increment CW function. | |
void | ReceivePacket (Ptr< Socket > socket) |
Receive packet function. | |
void | ResetData () |
Reset data function. | |
void | Run (UanHelper &uan) |
Run function. | |
void | UpdatePositions (NodeContainer &nodes) const |
Update positions function. | |
Public Attributes | |
uint32_t | m_avgs |
averages | |
double | m_boundary |
boundary | |
uint32_t | m_bytesTotal |
bytes total | |
uint32_t | m_cwMax |
CW maximum. | |
uint32_t | m_cwMin |
CW minimum. | |
uint32_t | m_cwStep |
CW step. | |
uint32_t | m_dataRate |
data rate | |
double | m_depth |
depth | |
uint32_t | m_numNodes |
number of nodes | |
uint32_t | m_packetSize |
packet size | |
Time | m_simTime |
simulation time | |
Time | m_slotTime |
slot time | |
std::vector< double > | m_throughputs |
throughputs | |
Helper class for UAN CW MAC example.
Definition at line 22 of file uan-animation.h.
NetAnimExperiment::NetAnimExperiment | ( | ) |
the experiment
Definition at line 42 of file uan-animation.cc.
void NetAnimExperiment::IncrementCw | ( | uint32_t | cw | ) |
Increment CW function.
cw | the CW |
Definition at line 67 of file uan-animation.cc.
References ns3::RngSeedManager::GetRun(), m_avgs, m_cwStep, m_throughputs, NS_ASSERT, NS_LOG_DEBUG, ns3::Config::Set(), and ns3::RngSeedManager::SetRun().
Referenced by Run().
Receive packet function.
socket | the socket to receive from |
Definition at line 102 of file uan-animation.cc.
References m_bytesTotal.
Referenced by Run().
void NetAnimExperiment::ResetData | ( | ) |
Reset data function.
Definition at line 59 of file uan-animation.cc.
References ns3::Time::GetSeconds(), m_bytesTotal, m_simTime, m_throughputs, ns3::Simulator::Now(), NS_LOG_DEBUG, and ns3::Time::S.
Referenced by Run().
void NetAnimExperiment::Run | ( | UanHelper & | uan | ) |
Run function.
uan | the UAN helper |
Definition at line 114 of file uan-animation.cc.
References anim, ns3::NodeContainer::Create(), ns3::CreateObject(), ns3::CreateObjectWithAttributes(), ns3::Socket::CreateSocket(), ns3::Simulator::Destroy(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::NetDeviceContainer::GetN(), ns3::NodeContainer::GetN(), ns3::MobilityModel::GetPosition(), IncrementCw(), ns3::PacketSocketHelper::Install(), ns3::UanHelper::Install(), ns3::TypeId::LookupByName(), m_avgs, m_boundary, m_bytesTotal, m_cwMax, m_cwMin, m_cwStep, m_dataRate, m_depth, m_numNodes, m_packetSize, m_simTime, m_slotTime, ns3::MakeCallback(), NS_LOG_DEBUG, ReceivePacket(), ResetData(), ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::Seconds(), ns3::UanHelper::SetMac(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), ns3::PacketSocketAddress::SetSingleDevice(), sink, ns3::ApplicationContainer::Start(), ns3::ApplicationContainer::Stop(), and UpdatePositions().
void NetAnimExperiment::UpdatePositions | ( | NodeContainer & | nodes | ) | const |
Update positions function.
nodes | the collection of nodes |
Definition at line 87 of file uan-animation.cc.
References ns3::NodeContainer::Begin(), ns3::CreateObject(), ns3::NodeContainer::End(), m_boundary, nodes, ns3::Simulator::Now(), NS_LOG_DEBUG, and ns3::Time::S.
Referenced by Run().
uint32_t NetAnimExperiment::m_avgs |
double NetAnimExperiment::m_boundary |
uint32_t NetAnimExperiment::m_bytesTotal |
bytes total
Definition at line 52 of file uan-animation.h.
Referenced by ReceivePacket(), ResetData(), and Run().
uint32_t NetAnimExperiment::m_cwMax |
uint32_t NetAnimExperiment::m_cwMin |
uint32_t NetAnimExperiment::m_cwStep |
uint32_t NetAnimExperiment::m_dataRate |
double NetAnimExperiment::m_depth |
uint32_t NetAnimExperiment::m_numNodes |
uint32_t NetAnimExperiment::m_packetSize |
Time NetAnimExperiment::m_simTime |
simulation time
Definition at line 59 of file uan-animation.h.
Referenced by ResetData(), and Run().
Time NetAnimExperiment::m_slotTime |
std::vector<double> NetAnimExperiment::m_throughputs |
throughputs
Definition at line 61 of file uan-animation.h.
Referenced by IncrementCw(), and ResetData().