mirror of
https://gitlab.com/manzerbredes/paper-lowrate-iot.git
synced 2025-06-07 23:27:39 +00:00
Nix integration
This commit is contained in:
parent
89a5ee979d
commit
f6d01996eb
18 changed files with 616 additions and 24 deletions
|
@ -1,12 +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){
|
||||
double currentTime=Simulator::Now ().GetSeconds ();
|
||||
double energyConsumes=newValue-oldValue;
|
||||
NS_LOG_UNCOND("Node " << nodeName << " consumes " << energyConsumes << "J" << " at time " << currentTime << "s");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue