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

Function check_bits

tests/DCPS/MultiTopic/MultiTopicTest.cpp:369–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367};
368
369bool check_bits(const Publisher_var& pub)
370{
371#ifdef DDS_HAS_MINIMUM_BIT
372 ACE_UNUSED_ARG(pub);
373 return true;
374#else
375 DomainParticipant_var pub_dp = pub->get_participant();
376 Subscriber_var bit_sub = pub_dp->get_builtin_subscriber();
377 DataReader_var bit_dr = bit_sub->lookup_datareader(BUILT_IN_SUBSCRIPTION_TOPIC);
378 Utils::waitForSample(bit_dr);
379 SubscriptionBuiltinTopicDataDataReader_var dr =
380 SubscriptionBuiltinTopicDataDataReader::_narrow(bit_dr);
381 SubscriptionBuiltinTopicDataSeq data;
382 SampleInfoSeq info;
383 check_rc(dr->read(data, info, LENGTH_UNLIMITED, ANY_SAMPLE_STATE, ANY_VIEW_STATE, ALIVE_INSTANCE_STATE),
384 "read builtin subscription topic");
385 for (unsigned int i = 0; i < data.length(); ++i) {
386 if (std::strcmp(data[i].topic_name, "Location") == 0) {
387 if (data[i].latency_budget.duration.sec != 1) {
388 std::cerr << "ERROR: Built-In DataReader Location topic unexpected QoS\n";
389 return false;
390 }
391 return true;
392 }
393 }
394 std::cerr << "ERROR: Built-In DataReader Location topic not found\n";
395 return false;
396#endif
397}
398
399bool run_multitopic_test(const Publisher_var& pub, const Subscriber_var& sub)
400{

Callers 1

run_multitopic_testFunction · 0.85

Calls 7

check_rcFunction · 0.70
waitForSampleFunction · 0.50
get_participantMethod · 0.45
lookup_datareaderMethod · 0.45
readMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected