summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsmit <msmit@remedy.nl>2012-06-27 13:07:57 +0000
committermsmit <msmit@remedy.nl>2012-06-27 13:07:57 +0000
commit65c6e09af58ce80d078ff792c783823cde924945 (patch)
tree3ec050629f3e00c43d590d4f3ab3d658ab0bd197
parent4eb9c452e3fd2f27ac7e2ec9d53893165708d80e (diff)
downloadATCD-65c6e09af58ce80d078ff792c783823cde924945.tar.gz
Wed Jun 27 13:07:31 UTC 2012 Marcel Smit <msmit@remedy.nl>
* connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender.idl: * connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender_exec.h: * connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender_exec.cpp: * connectors/dds4ccm/tests/SLDisabled/descriptors/Plan.cdp: Start the writing of samples upon a publication matched event.
-rw-r--r--CIAO/ChangeLog8
-rw-r--r--CIAO/connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender.idl3
-rw-r--r--CIAO/connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender_exec.cpp73
-rw-r--r--CIAO/connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender_exec.h37
-rw-r--r--CIAO/connectors/dds4ccm/tests/SLDisabled/descriptors/Plan.cdp20
5 files changed, 137 insertions, 4 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog
index 1d4fb0853ee..6cd67f1b8f7 100644
--- a/CIAO/ChangeLog
+++ b/CIAO/ChangeLog
@@ -1,3 +1,11 @@
+Wed Jun 27 13:07:31 UTC 2012 Marcel Smit <msmit@remedy.nl>
+
+ * connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender.idl:
+ * connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender_exec.h:
+ * connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender_exec.cpp:
+ * connectors/dds4ccm/tests/SLDisabled/descriptors/Plan.cdp:
+ Start the writing of samples upon a publication matched event.
+
Wed Jun 27 12:58:23 UTC 2012 Marcel Smit <msmit@remedy.nl>
* connectors/dds4ccm/tests/KeyedWriter/Sender/Writer_Sender_exec.h:
diff --git a/CIAO/connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender.idl b/CIAO/connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender.idl
index 1d750048096..a9f1efb9676 100644
--- a/CIAO/connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender.idl
+++ b/CIAO/connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender.idl
@@ -13,7 +13,8 @@ module SL_Disabled
{
component Sender
{
- port SL_DisabledConnector::DDS_Update test_topic_update;
+ port SL_DisabledConnector::DDS_Update test_topic_update;
+ provides CCM_DDS::ConnectorStatusListener connector_status;
};
};
diff --git a/CIAO/connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender_exec.cpp
index 4a8202259d8..daf84e16bbd 100644
--- a/CIAO/connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender_exec.cpp
@@ -32,6 +32,63 @@
namespace CIAO_SL_Disabled_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_.get_started ();
+ }
+ }
+
+ /**
* Write action generator
*/
@@ -88,6 +145,12 @@ namespace CIAO_SL_Disabled_Sender_Impl
return reactor;
}
+ ::CCM_DDS::CCM_ConnectorStatusListener_ptr
+ Sender_exec_i::get_connector_status (void)
+ {
+ return new ConnectorStatusListener_exec_i (*this);
+ }
+
::CORBA::Boolean
Sender_exec_i::create_one (void)
{
@@ -365,6 +428,14 @@ namespace CIAO_SL_Disabled_Sender_Impl
}
}
}
+
+ void
+ Sender_exec_i::get_started (void)
+ {
+ this->add_instances_of_topic ();
+ this->start ();
+ }
+
void
Sender_exec_i::start (void)
{
@@ -415,8 +486,6 @@ namespace CIAO_SL_Disabled_Sender_Impl
void
Sender_exec_i::ccm_activate (void)
{
- this->add_instances_of_topic ();
- this->start ();
}
void
diff --git a/CIAO/connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender_exec.h
index 7bcf65c8865..a6c7cb7ad40 100644
--- a/CIAO/connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender_exec.h
+++ b/CIAO/connectors/dds4ccm/tests/SLDisabled/Sender/SL_Disabled_Sender_exec.h
@@ -56,6 +56,39 @@ namespace CIAO_SL_Disabled_Sender_Impl
};
/**
+ * 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 action generator
*/
@@ -89,6 +122,8 @@ namespace CIAO_SL_Disabled_Sender_Impl
//@{
/** Component attributes and port operations. */
+ virtual ::CCM_DDS::CCM_ConnectorStatusListener_ptr
+ get_connector_status (void);
//@}
//@{
@@ -103,7 +138,7 @@ namespace CIAO_SL_Disabled_Sender_Impl
//@{
/** User defined public operations. */
void tick (void);
-
+ void get_started (void);
//@}
private:
diff --git a/CIAO/connectors/dds4ccm/tests/SLDisabled/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/SLDisabled/descriptors/Plan.cdp
index 5118b034adc..05891c078b0 100644
--- a/CIAO/connectors/dds4ccm/tests/SLDisabled/descriptors/Plan.cdp
+++ b/CIAO/connectors/dds4ccm/tests/SLDisabled/descriptors/Plan.cdp
@@ -309,6 +309,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="SL_Disabled_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/>