bool is_cond1_triggered = false;
bool is_cond2_triggered = false;
retcode = waitset->
wait(active_conditions, timeout);
} else {
} else {
for(int i = 0; i < active_conditions.length(); ++i) {
if (active_conditions[i] == cond1) {
printf("Cond1 was triggered!");
is_cond1_triggered = true;
}
if (active_conditions[i] == cond2) {
printf("Cond2 was triggered!");
is_cond2_triggered = true;
}
if (is_cond1_triggered && is_cond2_triggered) {
break;
}
}
}
if (is_cond1_triggered) {
}
if (is_cond2_triggered) {
}
return retcode;
virtual DDS_ReturnCode_t wait(DDSConditionSeq &active_conditions, const DDS_Duration_t &timeout)
Allows an application thread to wait for the occurrence of certain conditions.
@ DDS_RETCODE_TIMEOUT
The operation timed out.
Definition: infrastructure.ifc:1394
Instantiates FooSeq < DDSCondition >
Definition: dds_cpp.1.0/interface/infrastructure.ifcxx:126
Type for duration representation.
Definition: infrastructure.ifc:444