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

Method verify_coherent_changes_completion

dds/DCPS/DataReaderImpl.cpp:2720–2753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2718
2719#ifndef OPENDDS_NO_OBJECT_MODEL_PROFILE
2720bool DataReaderImpl::verify_coherent_changes_completion(WriterInfo* writer)
2721{
2722 Coherent_State state = COMPLETED;
2723 bool accept_here = true;
2724
2725 const GUID_t writer_id = writer->writer_id();
2726 const GUID_t publisher_id = writer->publisher_id();
2727
2728 if (subqos_.presentation.access_scope != ::DDS::INSTANCE_PRESENTATION_QOS &&
2729 subqos_.presentation.coherent_access) {
2730 // verify current coherent changes from single writer
2731 state = writer->coherent_change_received();
2732 if (writer->group_coherent()) { // GROUP coherent any state
2733 RcHandle<SubscriberImpl> subscriber = get_subscriber_servant();
2734 if (subscriber && state != NOT_COMPLETED_YET) {
2735 // verify if all readers received complete coherent changes in a group.
2736 subscriber->coherent_change_received(publisher_id, this, state);
2737 accept_here = false; // coherent_change_received does that itself
2738 }
2739 } else if (state != NOT_COMPLETED_YET) { // TOPIC coherent with final state
2740 if (state == REJECTED) {
2741 reject_coherent(writer_id, publisher_id);
2742 }
2743 writer->reset_coherent_info();
2744 }
2745 }
2746
2747 if (state == COMPLETED && accept_here) {
2748 accept_coherent(writer_id, publisher_id);
2749 coherent_changes_completed(this);
2750 }
2751
2752 return state == COMPLETED;
2753}
2754
2755
2756void DataReaderImpl::accept_coherent(const GUID_t& writer_id,

Callers 1

data_receivedMethod · 0.95

Calls 3

writer_idMethod · 0.45
reset_coherent_infoMethod · 0.45

Tested by

no test coverage detected