summaryrefslogtreecommitdiff
path: root/ns3-simulator/modules/callbacks.cc
diff options
context:
space:
mode:
authorLoic Guegan <manzerberdes@gmx.com>2019-04-12 13:52:06 +0200
committerLoic Guegan <manzerberdes@gmx.com>2019-04-12 13:52:06 +0200
commit927283437161307a23a954b42297412ba03a619c (patch)
tree38c0abc5ae8df4edd428b3662d733882d76ebdf3 /ns3-simulator/modules/callbacks.cc
parent23e8f7f688da3df8d5b4d47e881865717141325c (diff)
Init final simulator source
Diffstat (limited to 'ns3-simulator/modules/callbacks.cc')
-rw-r--r--ns3-simulator/modules/callbacks.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/ns3-simulator/modules/callbacks.cc b/ns3-simulator/modules/callbacks.cc
new file mode 100644
index 0000000..a552eb9
--- /dev/null
+++ b/ns3-simulator/modules/callbacks.cc
@@ -0,0 +1,10 @@
+
+#include "modules.hpp"
+
+void PktReceived(std::string nodeName,Ptr< const Packet > packet, const Address &address){
+ NS_LOG_UNCOND("Node " << nodeName << " receive a packet");
+}
+
+void EnergyUpdated(std::string nodeName,double oldValue, double newValue){
+ NS_LOG_UNCOND("Node " << nodeName << " consumes " << newValue << "J");
+}