Start some simulation tests

This commit is contained in:
Loic Guegan 2019-04-25 15:51:05 +02:00
parent 1399886f4d
commit a6e70544bb
37 changed files with 53416 additions and 5509 deletions

View file

@ -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");
}