Add simulation scripts

This commit is contained in:
Loic Guegan 2019-04-24 16:49:40 +02:00
parent 39507e0bb5
commit 1da73fb609
18 changed files with 4043 additions and 2 deletions

View file

@ -1,10 +0,0 @@
#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");
}