#include <ns3/core-module.h>
#include <ns3/energy-module.h>
#include <ns3/internet-module.h>
#include <ns3/mobility-module.h>
#include <ns3/network-module.h>
#include <ns3/wifi-module.h>
#include <sstream>
#include <string>
Go to the source code of this file.
Functions | |
static void | GenerateTraffic (Ptr< Socket > socket, uint32_t pktSize, Ptr< Node > n, uint32_t pktCount, Time pktInterval) |
std::string | PrintReceivedPacket (Address &from) |
Print a received packet. | |
void | ReceivePacket (Ptr< Socket > socket) |
void | RemainingEnergy (double oldValue, double remainingEnergy) |
Trace function for remaining energy at node. | |
|
static |
socket | Pointer to socket. |
pktSize | Packet size. |
n | Pointer to node. |
pktCount | Number of packets to generate. |
pktInterval | Packet sending interval. |
Generate Traffic
Definition at line 91 of file generic-battery-wifiradio-example.cc.
References ns3::Create(), GenerateTraffic(), pktSize, and ns3::Simulator::Schedule().
Referenced by GenerateTraffic().
|
inline |
Print a received packet.
from | sender address |
Definition at line 51 of file generic-battery-wifiradio-example.cc.
References ns3::InetSocketAddress::ConvertFrom(), ns3::InetSocketAddress::GetIpv4(), and ns3::InetSocketAddress::GetPort().
Referenced by ReceivePacket().
socket | Pointer to socket. |
Packet receiving sink.
Definition at line 68 of file generic-battery-wifiradio-example.cc.
References NS_LOG_DEBUG, and PrintReceivedPacket().
Trace function for remaining energy at node.
oldValue | Old value |
remainingEnergy | New value |
Definition at line 121 of file generic-battery-wifiradio-example.cc.
References NS_LOG_DEBUG.