From 32ccf612d0ee2b167204f9b6191258ae890ccd7f Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Fri, 12 Apr 2019 16:05:29 +0200 Subject: Add ECOFEN --- ns3-simulator/modules/callbacks.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ns3-simulator/modules/callbacks.cc') diff --git a/ns3-simulator/modules/callbacks.cc b/ns3-simulator/modules/callbacks.cc index a552eb9..8016fbc 100644 --- a/ns3-simulator/modules/callbacks.cc +++ b/ns3-simulator/modules/callbacks.cc @@ -6,5 +6,5 @@ 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 << "J"); + NS_LOG_UNCOND("Node " << nodeName << " consumes " << newValue-oldValue << "J"); } -- cgit v1.2.3