mirror of
https://gitlab.com/manzerbredes/loosely-coupled-dss-extended.git
synced 2025-06-26 23:37:41 +00:00
Tests
This commit is contained in:
parent
f7c6f8ad56
commit
738f22d12f
8 changed files with 3896 additions and 38436 deletions
|
@ -125,6 +125,7 @@ static void obs_node(std::vector<std::string> args) {
|
|||
u32 nSendFail=0;
|
||||
u32 nRcvFail=0;
|
||||
u32 nSend=0;
|
||||
u32 hint_added=0;
|
||||
double totalUptime=0;
|
||||
Payload *hint_forward=NULL;
|
||||
while(i.ShouldContinue()){
|
||||
|
@ -210,6 +211,7 @@ static void obs_node(std::vector<std::string> args) {
|
|||
if(CLOCK < p->hint){
|
||||
i.AddEvent(p->hint, p->duration);
|
||||
hint_forward=new Payload(*p);
|
||||
hint_added++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -237,8 +239,10 @@ static void obs_node(std::vector<std::string> args) {
|
|||
}catch(...){
|
||||
XBT_INFO("%s could not receive any data",CNAME);
|
||||
nRcvFail++;
|
||||
if(hintReceived)
|
||||
if(hintReceived){
|
||||
i.AddEvent(hint->hint, hint->duration); // Add the hint to the event list
|
||||
hint_added++;
|
||||
}
|
||||
}
|
||||
}
|
||||
forward_mode=!forward_mode; // Toggle mode (go back and forth between receiving and forwarding)
|
||||
|
@ -262,5 +266,5 @@ static void obs_node(std::vector<std::string> args) {
|
|||
}
|
||||
// Done
|
||||
MODE_OFF()
|
||||
XBT_INFO("Observation node %s finished [LOG2PARSE](node:%s|isSender:%d|nSend:%d|nWakeUp:%d|nDataRcv:%d|nSendFail:%d|nRcvFail:%d|totalUptime:%f|seed:%d)",CNAME,CNAME,i.is_sender,nSend,nWakeUp,nDataRcv,nSendFail,nRcvFail,totalUptime,i.seed);
|
||||
XBT_INFO("Observation node %s finished [LOG2PARSE](node:%s|isSender:%d|nSend:%d|nWakeUp:%d|nDataRcv:%d|nSendFail:%d|nRcvFail:%d|totalUptime:%f|seed:%d|hint_added:%d)",CNAME,CNAME,i.is_sender,nSend,nWakeUp,nDataRcv,nSendFail,nRcvFail,totalUptime,i.seed,hint_added);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue