diff options
Diffstat (limited to 'CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener')
4 files changed, 118 insertions, 1 deletions
diff --git a/CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender.idl b/CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender.idl index 61e4cf7bb4d..02fa2305038 100644 --- a/CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender.idl +++ b/CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender.idl @@ -14,6 +14,7 @@ module QCLS_Test component Sender { port QueryConditionListenStateTestConnector::DDS_Update info_update; + provides CCM_DDS::ConnectorStatusListener connector_status; attribute unsigned short keys; attribute unsigned short iterations; diff --git a/CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender_exec.cpp index ef365c51481..40cd8886d03 100644 --- a/CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender_exec.cpp +++ b/CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender_exec.cpp @@ -32,6 +32,63 @@ namespace CIAO_QCLS_Test_Sender_Impl { /** + * ConnectorStatusListener_exec_i + */ + ConnectorStatusListener_exec_i::ConnectorStatusListener_exec_i ( + Sender_exec_i &callback) + : callback_ (callback) + { + } + + ConnectorStatusListener_exec_i::~ConnectorStatusListener_exec_i (void) + { + } + + // Operations from ::CCM_DDS::ConnectorStatusListener + void ConnectorStatusListener_exec_i::on_inconsistent_topic ( + ::DDS::Topic_ptr /*the_topic*/, + const DDS::InconsistentTopicStatus & /*status*/) + { + } + + void ConnectorStatusListener_exec_i::on_requested_incompatible_qos ( + ::DDS::DataReader_ptr /*the_reader*/, + const DDS::RequestedIncompatibleQosStatus & /*status*/) + { + } + + void ConnectorStatusListener_exec_i::on_sample_rejected ( + ::DDS::DataReader_ptr /*the_reader*/, + const DDS::SampleRejectedStatus & /*status*/) + { + } + + void ConnectorStatusListener_exec_i::on_offered_deadline_missed( + ::DDS::DataWriter_ptr /*the_writer*/, + const DDS::OfferedDeadlineMissedStatus & /*status*/) + { + } + + void ConnectorStatusListener_exec_i::on_offered_incompatible_qos( + ::DDS::DataWriter_ptr /*the_writer*/, + const DDS::OfferedIncompatibleQosStatus & /*status*/) + { + } + + void ConnectorStatusListener_exec_i::on_unexpected_status( + ::DDS::Entity_ptr /*the_entity*/, + ::DDS::StatusKind status_kind) + { + if (status_kind == ::DDS::PUBLICATION_MATCHED_STATUS) + { + ACE_DEBUG ((LM_DEBUG, "ConnectorStatusListener_exec_i::on_unexpected_status - " + "Publication matched received: starting the test\n")); + + this->callback_.start (); + } + } + + /** * Start Handler */ @@ -171,6 +228,11 @@ namespace CIAO_QCLS_Test_Sender_Impl } // Component attributes and port operations. + ::CCM_DDS::CCM_ConnectorStatusListener_ptr + Sender_exec_i::get_connector_status (void) + { + return new ConnectorStatusListener_exec_i (*this); + } ::CORBA::UShort Sender_exec_i::keys (void) @@ -222,7 +284,6 @@ namespace CIAO_QCLS_Test_Sender_Impl void Sender_exec_i::ccm_activate (void) { - start (); } void diff --git a/CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender_exec.h index 10085a93500..7912e57ea0b 100644 --- a/CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender_exec.h +++ b/CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender_exec.h @@ -43,6 +43,39 @@ namespace CIAO_QCLS_Test_Sender_Impl class Sender_exec_i; /** + * ConnectorStatusListener_exec_i + */ + class SENDER_EXEC_Export ConnectorStatusListener_exec_i + : public virtual ::CCM_DDS::CCM_ConnectorStatusListener, + public virtual ::CORBA::LocalObject + { + public: + ConnectorStatusListener_exec_i (Sender_exec_i &callback); + virtual ~ConnectorStatusListener_exec_i (void); + + virtual + void on_inconsistent_topic (::DDS::Topic_ptr the_topic, + const DDS::InconsistentTopicStatus & status); + virtual + void on_requested_incompatible_qos (::DDS::DataReader_ptr the_reader, + const DDS::RequestedIncompatibleQosStatus & status); + virtual + void on_sample_rejected (::DDS::DataReader_ptr the_reader, + const DDS::SampleRejectedStatus & status); + virtual + void on_offered_deadline_missed (::DDS::DataWriter_ptr the_writer, + const DDS::OfferedDeadlineMissedStatus & status); + virtual + void on_offered_incompatible_qos (::DDS::DataWriter_ptr the_writer, + const DDS::OfferedIncompatibleQosStatus & status); + virtual + void on_unexpected_status (::DDS::Entity_ptr the_entity, + ::DDS::StatusKind status_kind); + private: + Sender_exec_i &callback_; + }; + + /** * Start Handler */ @@ -90,6 +123,8 @@ namespace CIAO_QCLS_Test_Sender_Impl //@{ /** Component attributes and port operations. */ + virtual ::CCM_DDS::CCM_ConnectorStatusListener_ptr + get_connector_status (void); virtual ::CORBA::UShort keys (void); diff --git a/CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/descriptors/Plan.cdp index d248b9fe6c8..6b828fc9263 100644 --- a/CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/descriptors/Plan.cdp +++ b/CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/descriptors/Plan.cdp @@ -336,6 +336,26 @@ </internalEndpoint> </connection> + <connection> + <name>connector_status_connection</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>error_listener</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="QCLS_Test_ConnectorComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>connector_status</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SenderComponentInstance" /> + </internalEndpoint> + </connection> + <artifact xmi:id="Sender_ExecArtifact"> <name>Sender_exec</name> <source/> |