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

Function wait_for_scenario_data

performance-tests/bench/node_controller/main.cpp:814–836  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

812}
813
814bool wait_for_scenario_data(AllocatedScenarioDataReader& allocated_scenario_reader_impl)
815{
816
817 DDS::ReadCondition_var read_condition = allocated_scenario_reader_impl.create_readcondition(
818 DDS::ANY_SAMPLE_STATE, DDS::ANY_VIEW_STATE, DDS::ALIVE_INSTANCE_STATE);
819 DDS::WaitSet_var ws(new DDS::WaitSet());
820 ws->attach_condition(read_condition);
821
822 while (!read_condition->get_trigger_value()) {
823 DDS::ConditionSeq active;
824 const DDS::Duration_t wake_interval = { 0, 500000000 };
825 const DDS::ReturnCode_t rc = ws->wait(active, wake_interval);
826 if (rc != DDS::RETCODE_OK && rc != DDS::RETCODE_TIMEOUT) {
827 std::cerr << "Wait for node config failed" << std::endl;
828 return false;
829 }
830 }
831
832 ws->detach_condition(read_condition);
833 allocated_scenario_reader_impl.delete_readcondition(read_condition);
834
835 return true;
836}
837
838void wait_for_full_scenario(
839 const std::string& name,

Callers 1

wait_for_full_scenarioFunction · 0.85

Calls 6

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

Tested by

no test coverage detected