#include "ns3/core-module.h"#include "ns3/network-module.h"#include "ns3/mobility-module.h"#include "ns3/config-store-module.h"#include "ns3/wifi-module.h"#include "ns3/energy-module.h"#include "ns3/internet-module.h"#include <iostream>#include <fstream>#include <vector>#include <string> Include dependency graph for energy-model-with-harvesting-example.cc:
 Include dependency graph for energy-model-with-harvesting-example.cc: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) | 
| void | HarvestedPower (double oldValue, double harvestedPower) | 
| Trace function for the power harvested by the energy harvester.  More... | |
| static std::string | PrintReceivedPacket (Address &from) | 
| void | ReceivePacket (Ptr< Socket > socket) | 
| void | RemainingEnergy (double oldValue, double remainingEnergy) | 
| Trace function for remaining energy at node.  More... | |
| void | TotalEnergy (double oldValue, double totalEnergy) | 
| Trace function for total energy consumption at node.  More... | |
| void | TotalEnergyHarvested (double oldValue, double TotalEnergyHarvested) | 
| Trace function for the total energy harvested by the node.  More... | |
| 
 | static | 
| socket | Pointer to socket. | 
| pktSize | Packet size. | 
| n | Pointer to node. | 
| pktCount | Number of packets to generate. | 
| pktInterval | Packet sending interval. | 
Traffic generator.
Definition at line 110 of file energy-model-with-harvesting-example.cc.
References ns3::Socket::Close(), ns3::Simulator::Schedule(), and ns3::Socket::Send().
 Here is the call graph for this function:
 Here is the call graph for this function:| void HarvestedPower | ( | double | oldValue, | 
| double | harvestedPower | ||
| ) | 
Trace function for the power harvested by the energy harvester.
Definition at line 143 of file energy-model-with-harvesting-example.cc.
References ns3::Time::GetSeconds(), and ns3::Simulator::Now().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | inlinestatic | 
Definition at line 68 of file energy-model-with-harvesting-example.cc.
References ns3::InetSocketAddress::ConvertFrom(), ns3::InetSocketAddress::GetIpv4(), ns3::InetSocketAddress::GetPort(), ns3::Time::GetSeconds(), and ns3::Simulator::Now().
Referenced by ReceivePacket().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| socket | Pointer to socket. | 
Packet receiving sink.
Definition at line 87 of file energy-model-with-harvesting-example.cc.
References ns3::Packet::GetSize(), NS_LOG_UNCOND, PrintReceivedPacket(), and ns3::Socket::RecvFrom().
 Here is the call graph for this function:
 Here is the call graph for this function:| void RemainingEnergy | ( | double | oldValue, | 
| double | remainingEnergy | ||
| ) | 
Trace function for remaining energy at node.
Definition at line 127 of file energy-model-with-harvesting-example.cc.
References ns3::Time::GetSeconds(), and ns3::Simulator::Now().
 Here is the call graph for this function:
 Here is the call graph for this function:| void TotalEnergy | ( | double | oldValue, | 
| double | totalEnergy | ||
| ) | 
Trace function for total energy consumption at node.
Definition at line 135 of file energy-model-with-harvesting-example.cc.
References ns3::Time::GetSeconds(), and ns3::Simulator::Now().
 Here is the call graph for this function:
 Here is the call graph for this function:| void TotalEnergyHarvested | ( | double | oldValue, | 
| double | TotalEnergyHarvested | ||
| ) | 
Trace function for the total energy harvested by the node.
Definition at line 151 of file energy-model-with-harvesting-example.cc.
References ns3::Time::GetSeconds(), and ns3::Simulator::Now().
 Here is the call graph for this function:
 Here is the call graph for this function: