Helper class for UAN CW MAC example. More...
#include <uan-animation.h>
Public Member Functions | |
NetAnimExperiment () | |
void | IncrementCw (uint32_t cw) |
void | ReceivePacket (Ptr< Socket > socket) |
void | ResetData () |
void | Run (UanHelper &uan) |
void | UpdatePositions (NodeContainer &nodes) |
Public Attributes | |
uint32_t | m_avgs |
double | m_boundary |
uint32_t | m_bytesTotal |
uint32_t | m_cwMax |
uint32_t | m_cwMin |
uint32_t | m_cwStep |
uint32_t | m_dataRate |
double | m_depth |
uint32_t | m_numNodes |
uint32_t | m_packetSize |
Time | m_simTime |
Time | m_slotTime |
std::vector< double > | m_throughputs |
Helper class for UAN CW MAC example.
Definition at line 34 of file uan-animation.h.
NetAnimExperiment::NetAnimExperiment | ( | ) |
Definition at line 53 of file uan-animation.cc.
void NetAnimExperiment::IncrementCw | ( | uint32_t | cw | ) |
Definition at line 78 of file uan-animation.cc.
References m_avgs, m_cwStep, m_throughputs, NS_ASSERT, NS_LOG_DEBUG, and ns3::Config::Set().
Referenced by Run().
Definition at line 113 of file uan-animation.cc.
References ns3::Packet::GetSize(), m_bytesTotal, and ns3::Socket::Recv().
Referenced by Run().
void NetAnimExperiment::ResetData | ( | ) |
Definition at line 70 of file uan-animation.cc.
References ns3::Time::GetSeconds(), m_bytesTotal, m_simTime, m_throughputs, ns3::Now(), and NS_LOG_DEBUG.
Referenced by Run().
void NetAnimExperiment::Run | ( | UanHelper & | uan | ) |
Definition at line 125 of file uan-animation.cc.
References ns3::ListPositionAllocator::Add(), ns3::Object::AggregateObject(), ns3::Socket::Bind(), ns3::NodeContainer::Create(), first::devices, 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(), 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::OnOffHelper::SetAttribute(), ns3::ObjectBase::SetAttribute(), ns3::UanHelper::SetMac(), ns3::MobilityHelper::SetMobilityModel(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::MobilityHelper::SetPositionAllocator(), ns3::PacketSocketAddress::SetProtocol(), ns3::Socket::SetRecvCallback(), ns3::PacketSocketAddress::SetSingleDevice(), ns3::ApplicationContainer::Start(), ns3::ApplicationContainer::Stop(), UpdatePositions(), and sample-rng-plot::x.
Referenced by main().
void NetAnimExperiment::UpdatePositions | ( | NodeContainer & | nodes | ) |
Definition at line 97 of file uan-animation.cc.
References ns3::NodeContainer::Begin(), ns3::NodeContainer::End(), ns3::Object::GetObject(), ns3::UniformRandomVariable::GetValue(), m_boundary, ns3::Now(), NS_LOG_DEBUG, ns3::ObjectBase::SetAttribute(), and ns3::MobilityModel::SetPosition().
Referenced by Run().
uint32_t NetAnimExperiment::m_avgs |
Definition at line 51 of file uan-animation.h.
Referenced by IncrementCw(), main(), and Run().
double NetAnimExperiment::m_boundary |
Definition at line 45 of file uan-animation.h.
Referenced by main(), Run(), and UpdatePositions().
uint32_t NetAnimExperiment::m_bytesTotal |
Definition at line 47 of file uan-animation.h.
Referenced by ReceivePacket(), ResetData(), and Run().
uint32_t NetAnimExperiment::m_cwMax |
Definition at line 49 of file uan-animation.h.
uint32_t NetAnimExperiment::m_cwMin |
Definition at line 48 of file uan-animation.h.
uint32_t NetAnimExperiment::m_cwStep |
Definition at line 50 of file uan-animation.h.
Referenced by IncrementCw(), and Run().
uint32_t NetAnimExperiment::m_dataRate |
Definition at line 43 of file uan-animation.h.
double NetAnimExperiment::m_depth |
Definition at line 44 of file uan-animation.h.
uint32_t NetAnimExperiment::m_numNodes |
Definition at line 42 of file uan-animation.h.
uint32_t NetAnimExperiment::m_packetSize |
Definition at line 46 of file uan-animation.h.
Time NetAnimExperiment::m_simTime |
Definition at line 54 of file uan-animation.h.
Referenced by ResetData(), and Run().
Time NetAnimExperiment::m_slotTime |
Definition at line 53 of file uan-animation.h.
std::vector<double> NetAnimExperiment::m_throughputs |
Definition at line 56 of file uan-animation.h.
Referenced by IncrementCw(), and ResetData().