mirror of
https://gitlab.com/manzerbredes/paper-lowrate-iot.git
synced 2025-05-01 17:37:45 +00:00
Update simulator
This commit is contained in:
parent
32ccf612d0
commit
ceabb2d95d
4 changed files with 33 additions and 23 deletions
|
@ -2,9 +2,9 @@
|
|||
#include "modules.hpp"
|
||||
|
||||
void PktReceived(std::string nodeName,Ptr< const Packet > packet, const Address &address){
|
||||
NS_LOG_UNCOND("Node " << nodeName << " receive a packet");
|
||||
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");
|
||||
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