Update simulators

This commit is contained in:
Loic Guegan 2019-05-16 14:32:18 +02:00
parent 9305e544d3
commit 026a84902c
505 changed files with 3375873 additions and 5912458 deletions

View file

@ -0,0 +1,12 @@
#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){
double currentTime=Simulator::Now ().GetSeconds ();
:q! double energyConsumes=newValue-oldValue;
NS_LOG_UNCOND("Node " << nodeName << " consumes " << energyConsumes << "J" << " at time " << currentTime << "s");
}