mirror of
https://gitlab.com/manzerbredes/paper-lowrate-iot.git
synced 2025-05-01 09:27:45 +00:00
Start some simulation tests
This commit is contained in:
parent
1399886f4d
commit
a6e70544bb
37 changed files with 53416 additions and 5509 deletions
|
@ -6,5 +6,11 @@ void PktReceived(std::string nodeName,Ptr< const Packet > packet, const Address
|
|||
}
|
||||
|
||||
void EnergyUpdated(std::string nodeName,double oldValue, double newValue){
|
||||
NS_LOG_UNCOND("Node " << nodeName << " consumes " << newValue-oldValue << "J" << " at time " << Simulator::Now ().GetSeconds () << "s");
|
||||
double currentTime=Simulator::Now ().GetSeconds ();
|
||||
double energyConsumes=newValue-oldValue;
|
||||
NS_LOG_UNCOND("Node " << nodeName << " consumes " << energyConsumes << "J" << " at time " << currentTime << "s");
|
||||
|
||||
NS_LOG_UNCOND("Node " << nodeName << " newVal " << newValue << "J" << " at time " << currentTime << "s");
|
||||
NS_LOG_UNCOND("Node " << nodeName << " oldValue " << oldValue << "J" << " at time " << currentTime << "s");
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue