MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / waitForSample

Function waitForSample

tests/DCPS/QueryCondition/QueryConditionTest.cpp:347–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347bool waitForSample(const DataReader_var& dr)
348{
349 ReadCondition_var dr_rc = dr->create_readcondition(ANY_SAMPLE_STATE,
350 ANY_VIEW_STATE, ALIVE_INSTANCE_STATE);
351 WaitSet_var ws = new WaitSet;
352 ws->attach_condition(dr_rc);
353 Duration_t infinite = {DURATION_INFINITE_SEC, DURATION_INFINITE_NSEC};
354 ConditionSeq active;
355 ReturnCode_t ret = ws->wait(active, infinite);
356 ws->detach_condition(dr_rc);
357 dr->delete_readcondition(dr_rc);
358 if (ret != RETCODE_OK) {
359 cerr << "ERROR: wait(rc) failed" << endl;
360 return false;
361 }
362 return true;
363}
364
365bool run_filtering_test(const MessageTypeSupport_var& ts, const Publisher_var& pub,
366 const Subscriber_var& sub)

Callers 14

run_filtering_testFunction · 0.70
test_bit_participantFunction · 0.50
test_bit_topicFunction · 0.50
test_bit_publicationFunction · 0.50
test_bit_subscriptionFunction · 0.50
check_bitsFunction · 0.50
ACE_TMAINFunction · 0.50
ACE_TMAINFunction · 0.50
read_multipleMethod · 0.50
read_oneMethod · 0.50

Calls 5

attach_conditionMethod · 0.80
detach_conditionMethod · 0.80
create_readconditionMethod · 0.45
waitMethod · 0.45
delete_readconditionMethod · 0.45

Tested by

no test coverage detected