aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2021-05-06 16:32:06 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2021-05-06 16:32:06 +0200
commit87dd4219138ec98999b50d08c7190a942072b33f (patch)
treeedbe133f0888808227d9cced510a1220ebc09fc9
parentfb38c4f0b773ad12c1e6c50862bd23d95a3c6ab1 (diff)
Debug energy and hints
-rw-r--r--inputs.json6
-rw-r--r--src/simulator.cc4
2 files changed, 5 insertions, 5 deletions
diff --git a/inputs.json b/inputs.json
index edb8e07..f391e00 100644
--- a/inputs.json
+++ b/inputs.json
@@ -3,7 +3,7 @@
"is_sender": true,
"power_off": 0,
"power_on":10,
- "use_hint": false,
+ "use_hint": true,
"wake_ts": [ 1, 7, 7 ],
"wake_duration": [ 5, 1, 2],
"data_size": 50
@@ -13,8 +13,8 @@
"power_off": 0,
"power_on":10,
"use_hint": false,
- "wake_ts": [ 1, 7, 7 ],
- "wake_duration": [ 5, 1, 2],
+ "wake_ts": [ 1, 7 ],
+ "wake_duration": [ 5, 1],
"data_size": 50
}
} \ No newline at end of file
diff --git a/src/simulator.cc b/src/simulator.cc
index d957471..0bf2d2f 100644
--- a/src/simulator.cc
+++ b/src/simulator.cc
@@ -96,6 +96,7 @@ static void obs_node(std::vector<std::string> args) {
if(isSender){ // If I am a sender
Payload *p=new Payload();
if(useHint&&i.HasNext()){
+ p->containsHint=true;
p->hint=i.GetNextTS();
p->duration=i.GetNextDuration();
}
@@ -132,8 +133,7 @@ static void obs_node(std::vector<std::string> args) {
i.GotoNextEvent();
nWakeUp++; // Increase the number of wake up
}
-
-
// Done
+ TURN_OFF()
XBT_INFO("Observation node %s finished (nWakeUp:%d|nDataRcv:%d)",selfName.c_str(),nWakeUp,nDataRcv);
} \ No newline at end of file