mirror of
https://gitlab.com/manzerbredes/paper-lowrate-iot.git
synced 2025-05-01 09:27:45 +00:00
Add simulation scripts
This commit is contained in:
parent
39507e0bb5
commit
1da73fb609
18 changed files with 4043 additions and 2 deletions
10
ns3-simulations/ns3-simulator/modules/callbacks.cc
Normal file
10
ns3-simulations/ns3-simulator/modules/callbacks.cc
Normal file
|
@ -0,0 +1,10 @@
|
|||
|
||||
#include "modules.hpp"
|
||||
|
||||
void PktReceived(std::string nodeName,Ptr< const Packet > packet, const Address &address){
|
||||
NS_LOG_UNCOND("Node " << nodeName << " receive a packet" << " at time " << Simulator::Now ().GetSeconds () << "s");
|
||||
}
|
||||
|
||||
void EnergyUpdated(std::string nodeName,double oldValue, double newValue){
|
||||
NS_LOG_UNCOND("Node " << nodeName << " consumes " << newValue-oldValue << "J" << " at time " << Simulator::Now ().GetSeconds () << "s");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue