summaryrefslogtreecommitdiff
path: root/CIAO/connectors/dds4ccm/tests
diff options
context:
space:
mode:
authormsmit <msmit@remedy.nl>2012-06-28 07:05:08 +0000
committermsmit <msmit@remedy.nl>2012-06-28 07:05:08 +0000
commit2e1b4a6bf8c08d64c1ca2423504fa695a36a458e (patch)
tree520d23d262ae8fcd5def65b14722535908cbcdf0 /CIAO/connectors/dds4ccm/tests
parentb55d4f1c6f4f7c103c673aa84fd1c086cb365301 (diff)
downloadATCD-2e1b4a6bf8c08d64c1ca2423504fa695a36a458e.tar.gz
Thu Jun 28 07:04:33 UTC 2012 Marcel Smit <msmit@remedy.nl>
* connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender.idl: * connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender_exec.h: * connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender_exec.cpp: * connectors/dds4ccm/tests/QueryCondition/EventListener/descriptors/Plan.cdp: Start the writing of samples upon a publication matched event. * connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender.idl: * connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.h: * connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.cpp: * connectors/dds4ccm/tests/QueryCondition/ReadGet/descriptors/Plan.cdp: Start the writing of samples upon a publication matched event. * connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender.idl: * connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender_exec.h: * connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender_exec.cpp: * connectors/dds4ccm/tests/QueryCondition/StateListener/descriptors/Plan.cdp: Start the writing of samples upon a publication matched event.
Diffstat (limited to 'CIAO/connectors/dds4ccm/tests')
-rw-r--r--CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender.idl1
-rw-r--r--CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender_exec.cpp96
-rw-r--r--CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender_exec.h38
-rw-r--r--CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/descriptors/Plan.cdp20
-rw-r--r--CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender.idl1
-rw-r--r--CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.cpp99
-rw-r--r--CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.h38
-rw-r--r--CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/descriptors/Plan.cdp20
-rw-r--r--CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender.idl1
-rw-r--r--CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender_exec.cpp63
-rw-r--r--CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/Sender/QCLS_Test_Sender_exec.h35
-rw-r--r--CIAO/connectors/dds4ccm/tests/QueryCondition/StateListener/descriptors/Plan.cdp20
12 files changed, 400 insertions, 32 deletions
diff --git a/CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender.idl b/CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender.idl
index 352d40b6042..d79d083c370 100644
--- a/CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender.idl
+++ b/CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender.idl
@@ -14,6 +14,7 @@ module QCLE_Test
component Sender
{
port QueryConditionListenEventTestConnector::DDS_Write info_write;
+ provides CCM_DDS::ConnectorStatusListener connector_status;
attribute unsigned short keys;
attribute unsigned short iterations;
diff --git a/CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender_exec.cpp
index 9bcf6442810..af7467be2a8 100644
--- a/CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender_exec.cpp
@@ -34,6 +34,63 @@ namespace CIAO_QCLE_Test_Sender_Impl
/**
* Write ticker
*/
+ 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_.get_started ();
+ }
+ }
+
+ /**
+ * Write ticker
+ */
WriteTicker::WriteTicker (Sender_exec_i &callback)
: callback_ (callback)
@@ -134,6 +191,25 @@ namespace CIAO_QCLE_Test_Sender_Impl
}
}
+ void
+ Sender_exec_i::get_started (void)
+ {
+ try
+ {
+ this->start ();
+ }
+ catch (const ::CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Exception caught:");
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("ERROR: Sender_exec_i::get_started: Exception caught\n")));
+ }
+ catch (...)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("ERROR: Sender_exec_i::get_started: Unknown exception caught\n")));
+ }
+ }
void
Sender_exec_i::start (void)
@@ -164,6 +240,11 @@ namespace CIAO_QCLE_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)
@@ -215,21 +296,6 @@ namespace CIAO_QCLE_Test_Sender_Impl
void
Sender_exec_i::ccm_activate (void)
{
- try
- {
- start ();
- }
- catch (const ::CORBA::Exception& ex)
- {
- ex._tao_print_exception ("Exception caught:");
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ERROR: Sender_exec_i::ccm_activate: Exception caught\n")));
- }
- catch (...)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ERROR: Sender_exec_i::ccm_activate: Unknown exception caught\n")));
- }
}
void
diff --git a/CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender_exec.h
index 9427a4123eb..24ae8e26540 100644
--- a/CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender_exec.h
+++ b/CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/Sender/QCLE_Test_Sender_exec.h
@@ -45,6 +45,39 @@ namespace CIAO_QCLE_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_;
+ };
+
+ /**
* Write ticker
*/
@@ -78,6 +111,8 @@ namespace CIAO_QCLE_Test_Sender_Impl
//@{
/** Component attributes and port operations. */
+ virtual ::CCM_DDS::CCM_ConnectorStatusListener_ptr
+ get_connector_status (void);
virtual ::CORBA::UShort keys (void);
@@ -99,7 +134,7 @@ namespace CIAO_QCLE_Test_Sender_Impl
//@{
/** User defined public operations. */
- void start (void);
+ void get_started (void);
void write_one (void);
//@}
@@ -129,6 +164,7 @@ namespace CIAO_QCLE_Test_Sender_Impl
//@{
/** User defined private operations. */
+ void start (void);
//@}
diff --git a/CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/descriptors/Plan.cdp
index 33d90fab66a..733a97bccb7 100644
--- a/CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/descriptors/Plan.cdp
+++ b/CIAO/connectors/dds4ccm/tests/QueryCondition/EventListener/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="QCLE_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/>
diff --git a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender.idl b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender.idl
index 8c5b7d5908f..b26e38606f5 100644
--- a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender.idl
+++ b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender.idl
@@ -15,6 +15,7 @@ module ReadGet_Test
component Sender
{
port ReadGet_Test::QueryConditionTestConnector::DDS_Write info_write;
+ provides CCM_DDS::ConnectorStatusListener connector_status;
uses ReadGetStarter start_reader;
provides ReadGetRestarter restart_writer;
diff --git a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.cpp
index 149e08018ee..e73ae2df7a3 100644
--- a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.cpp
@@ -34,6 +34,65 @@
namespace CIAO_ReadGet_Test_Sender_Impl
{
/**
+ * ConnectorStatusListener_exec_i
+ */
+ ConnectorStatusListener_exec_i::ConnectorStatusListener_exec_i (
+ Sender_exec_i &callback)
+ : callback_ (callback)
+ , started_ (false)
+ {
+ }
+
+ 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 (!this->started_ && status_kind == ::DDS::PUBLICATION_MATCHED_STATUS)
+ {
+ this->started_ = true;
+ ACE_DEBUG ((LM_DEBUG, "ConnectorStatusListener_exec_i::on_unexpected_status - "
+ "Publication matched received: starting the test\n"));
+
+ this->callback_.get_started ();
+ }
+ }
+
+ /**
* Writehandler
*/
@@ -131,6 +190,26 @@ namespace CIAO_ReadGet_Test_Sender_Impl
}
void
+ Sender_exec_i::get_started (void)
+ {
+ try
+ {
+ this->reactor ()->notify (this->wh_);
+ }
+ catch (const ::CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Exception caught:");
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("ERROR: get_started : Exception caught\n")));
+ }
+ catch (...)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("ERROR: get_started : Unknown exception caught\n")));
+ }
+ }
+
+ void
Sender_exec_i::start (void)
{
::ReadGet_Test::QueryConditionTestConnector::Writer_var writer =
@@ -175,6 +254,11 @@ namespace CIAO_ReadGet_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);
+ }
::CCM_ReadGetRestarter_ptr
Sender_exec_i::get_restart_writer (void)
@@ -234,21 +318,6 @@ namespace CIAO_ReadGet_Test_Sender_Impl
void
Sender_exec_i::ccm_activate (void)
{
- try
- {
- this->reactor ()->notify (this->wh_);
- }
- catch (const ::CORBA::Exception& ex)
- {
- ex._tao_print_exception ("Exception caught:");
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ERROR: GET_CONNECTION_START_READER : Exception caught\n")));
- }
- catch (...)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ERROR: GET_CONNECTION_START_READER : Unknown exception caught\n")));
- }
}
void
diff --git a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.h
index 08d141131ee..61aec62c29c 100644
--- a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.h
+++ b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.h
@@ -41,6 +41,41 @@
namespace CIAO_ReadGet_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_;
+ bool started_;
+ };
+
/**
* Write Handler
*/
@@ -99,6 +134,8 @@ namespace CIAO_ReadGet_Test_Sender_Impl
//@{
/** Component attributes and port operations. */
+ virtual ::CCM_DDS::CCM_ConnectorStatusListener_ptr
+ get_connector_status (void);
virtual ::CCM_ReadGetRestarter_ptr
get_restart_writer (void);
@@ -119,6 +156,7 @@ namespace CIAO_ReadGet_Test_Sender_Impl
//@{
/** User defined public operations. */
+ void get_started (void);
void start (void);
void restart (void);
diff --git a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/descriptors/Plan.cdp
index e00be85ad85..5d4ee2e783d 100644
--- a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/descriptors/Plan.cdp
+++ b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/descriptors/Plan.cdp
@@ -439,6 +439,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="ReadGet_Test_SenderConnectorInstance" />
+ </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/>
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/>