| 30 | bool shutdown_flag = false; |
| 31 | |
| 32 | bool |
| 33 | assert_subscription_matched(const Options& opts, const DDS::DataReaderListener_var& drl) |
| 34 | { |
| 35 | // Assert if pub/sub made a match ... |
| 36 | |
| 37 | DataReaderListenerImpl* drl_servant = |
| 38 | dynamic_cast<DataReaderListenerImpl*> (drl.in()); |
| 39 | if (!drl_servant) |
| 40 | { |
| 41 | ACE_ERROR_RETURN((LM_ERROR, |
| 42 | ACE_TEXT("(%P|%t) assert_subscription_matched ") |
| 43 | ACE_TEXT("failed to obtain DataReaderListenerImpl.\n")), |
| 44 | false); |
| 45 | } |
| 46 | // there is an error if we matched when not compatible (or vice-versa) |
| 47 | if (opts.compatible != drl_servant->subscription_matched() && opts.reliability_kind == DDS::RELIABLE_RELIABILITY_QOS) |
| 48 | { |
| 49 | ACE_ERROR_RETURN((LM_ERROR, |
| 50 | ACE_TEXT("(%P|%t) Expected publication_matched to be %C, but it was %C [") |
| 51 | ACE_TEXT(" durability_kind=%C, liveliness_kind=%C, liveliness_duration=%C, ") |
| 52 | ACE_TEXT("reliability_kind=%C]\n"), |
| 53 | (opts.compatible) ? "true" : "false", |
| 54 | (drl_servant->subscription_matched()) ? "true" : "false", |
| 55 | opts.durability_kind_str.c_str(), |
| 56 | opts.liveliness_kind_str.c_str(), |
| 57 | opts.LEASE_DURATION_STR.c_str(), |
| 58 | opts.reliability_kind_str.c_str()), |
| 59 | false); |
| 60 | } |
| 61 | |
| 62 | return true; |
| 63 | } |
| 64 | |
| 65 | |
| 66 |
no test coverage detected