summaryrefslogtreecommitdiff
path: root/ns3-simulator/modules/callbacks.cc
diff options
context:
space:
mode:
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");
+}