| 319 | } |
| 320 | |
| 321 | void waitForMatch(const DataWriter_var& dw, int count = 1) |
| 322 | { |
| 323 | StatusCondition_var sc = dw->get_statuscondition(); |
| 324 | sc->set_enabled_statuses(PUBLICATION_MATCHED_STATUS); |
| 325 | WaitSet_var ws = new WaitSet; |
| 326 | ws->attach_condition(sc); |
| 327 | ConditionSeq active; |
| 328 | PublicationMatchedStatus pubmatched; |
| 329 | while (dw->get_publication_matched_status(pubmatched) == RETCODE_OK |
| 330 | && pubmatched.current_count != count) { |
| 331 | check_rc(ws->wait(active, max_wait), "wait for match"); |
| 332 | } |
| 333 | ws->detach_condition(sc); |
| 334 | } |
| 335 | |
| 336 | template <typename MessageType> |
| 337 | struct Writer { |
no test coverage detected