summaryrefslogtreecommitdiff
path: root/CIAO/connectors/dds4ccm
diff options
context:
space:
mode:
authormsmit <msmit@remedy.nl>2010-11-18 12:46:14 +0000
committermsmit <msmit@remedy.nl>2010-11-18 12:46:14 +0000
commitb31320f6d77f9e64263967aaf687e663b7035d5e (patch)
treeeb828a544d08893d84e581e4be771fcb2f6a44d6 /CIAO/connectors/dds4ccm
parent2343cfc9a31417c46cb82df2b9f947421673634f (diff)
downloadATCD-b31320f6d77f9e64263967aaf687e663b7035d5e.tar.gz
Thu Nov 18 12:46:17 UTC 2010 Marcel Smit <msmit@remedy.nl>
* connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver.mpc: * connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver_exec.h: * connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver_exec.cpp: * connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Sender/ReadGet_Test_Sender_exec.h: * connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Sender/ReadGet_Test_Sender_exec.cpp: Re-implemented test using the -Gexr option on the TAO IDL compiler.
Diffstat (limited to 'CIAO/connectors/dds4ccm')
-rwxr-xr-xCIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver.mpc3
-rw-r--r--CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver_exec.cpp288
-rw-r--r--CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver_exec.h202
-rw-r--r--CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Sender/ReadGet_Test_Sender_exec.cpp141
-rw-r--r--CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Sender/ReadGet_Test_Sender_exec.h116
5 files changed, 589 insertions, 161 deletions
diff --git a/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver.mpc b/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver.mpc
index 4daad9c57dd..16d7855838f 100755
--- a/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver.mpc
+++ b/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver.mpc
@@ -10,7 +10,8 @@ project(CFT_ReadGet_Test_Receiver_idl_gen) : componentidldefaults, dds4ccm {
-Wb,svnt_export_macro=RECEIVER_SVNT_Export \
-Wb,svnt_export_include=Receiver_svnt_export.h \
-Wb,exec_export_macro=RECEIVER_EXEC_Export \
- -Wb,exec_export_include=Receiver_exec_export.h -I..
+ -Wb,exec_export_include=Receiver_exec_export.h \
+ -I..
IDL_Files {
ReadGet_Test_Receiver.idl
diff --git a/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver_exec.cpp
index 30b70ba5657..b445784aaed 100644
--- a/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver_exec.cpp
@@ -1,12 +1,33 @@
// -*- C++ -*-
// $Id$
-#include "ReadGet_Test_Receiver_exec.h"
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
-#include "ace/OS_NS_unistd.h"
+#include "ReadGet_Test_Receiver_exec.h"
#include "tao/ORB_Core.h"
#include "ace/Reactor.h"
-#include "ace/Log_Msg.h"
#include "dds4ccm/impl/dds4ccm_conf.h"
@@ -30,7 +51,6 @@
// (see constructor Receiver_exec_i).
#define SAMPLES_PER_KEY_GETTER (2 + 11)
-
// Samples received on the Reader port depend on the
// number of iterations send. The sender informs the
// Receiver about this number by invoking set_reader_properties.
@@ -40,13 +60,14 @@
// result in the same amount of samples of the read on the getter
// port.
-
namespace CIAO_ReadGet_Test_Receiver_Impl
{
- //============================================================
- // read_action_Generator
- //============================================================
- read_action_Generator::read_action_Generator (Receiver_exec_i &callback, int run)
+ /**
+ * read_action_Generator
+ */
+
+ read_action_Generator::read_action_Generator (Receiver_exec_i &callback,
+ int run)
: callback_ (callback),
run_ (run)
{
@@ -68,35 +89,105 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
return 0;
}
- //============================================================
- // Starter_exec_i
- //============================================================
- Starter_exec_i::Starter_exec_i (Receiver_exec_i & callback)
- : callback_ (callback)
+ /**
+ * Facet Executor Implementation Class: get_port_status_exec_i
+ */
+
+ get_port_status_exec_i::get_port_status_exec_i (
+ ::ReadGet_Test::CCM_Receiver_Context_ptr ctx)
+ : ciao_context_ (
+ ::ReadGet_Test::CCM_Receiver_Context::_duplicate (ctx))
+ {
+ }
+
+ get_port_status_exec_i::~get_port_status_exec_i (void)
+ {
+ }
+
+ // Operations from ::CCM_DDS::PortStatusListener
+
+ void
+ get_port_status_exec_i::on_requested_deadline_missed (::DDS::DataReader_ptr /* the_reader */,
+ const ::DDS::RequestedDeadlineMissedStatus & /* status */)
+ {
+ /* Your code here. */
+ }
+
+ void
+ get_port_status_exec_i::on_sample_lost (::DDS::DataReader_ptr /* the_reader */,
+ const ::DDS::SampleLostStatus & /* status */)
+ {
+ /* Your code here. */
+ }
+
+ /**
+ * Facet Executor Implementation Class: read_port_status_exec_i
+ */
+
+ read_port_status_exec_i::read_port_status_exec_i (
+ ::ReadGet_Test::CCM_Receiver_Context_ptr ctx)
+ : ciao_context_ (
+ ::ReadGet_Test::CCM_Receiver_Context::_duplicate (ctx))
{
}
- Starter_exec_i::~Starter_exec_i (void)
+ read_port_status_exec_i::~read_port_status_exec_i (void)
+ {
+ }
+
+ // Operations from ::CCM_DDS::PortStatusListener
+
+ void
+ read_port_status_exec_i::on_requested_deadline_missed (::DDS::DataReader_ptr /* the_reader */,
+ const ::DDS::RequestedDeadlineMissedStatus & /* status */)
{
+ /* Your code here. */
}
void
- Starter_exec_i::set_reader_properties (CORBA::UShort nr_keys,
- CORBA::UShort nr_iterations)
+ read_port_status_exec_i::on_sample_lost (::DDS::DataReader_ptr /* the_reader */,
+ const ::DDS::SampleLostStatus & /* status */)
+ {
+ /* Your code here. */
+ }
+
+ /**
+ * Facet Executor Implementation Class: reader_start_exec_i
+ */
+
+ reader_start_exec_i::reader_start_exec_i (
+ ::ReadGet_Test::CCM_Receiver_Context_ptr ctx,
+ Receiver_exec_i & callback)
+ : ciao_context_ (
+ ::ReadGet_Test::CCM_Receiver_Context::_duplicate (ctx))
+ , callback_ (callback)
+ {
+ }
+
+ reader_start_exec_i::~reader_start_exec_i (void)
+ {
+ }
+
+ // Operations from ::ReadGetStarter
+
+ void
+ reader_start_exec_i::set_reader_properties (::CORBA::UShort nr_keys,
+ ::CORBA::UShort nr_iterations)
{
this->callback_.keys (nr_keys);
this->callback_.iterations (nr_iterations);
}
void
- Starter_exec_i::start_read (CORBA::UShort run)
+ reader_start_exec_i::start_read (::CORBA::UShort run)
{
this->callback_.start_read (run);
}
- //============================================================
- // Receiver_exec_i
- //============================================================
+ /**
+ * Component Executor Implementation Class: Receiver_exec_i
+ */
+
Receiver_exec_i::Receiver_exec_i (void)
: iterations_ (20),
keys_ (5),
@@ -113,8 +204,30 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
Receiver_exec_i::~Receiver_exec_i (void)
{
+ delete this->ticker_;
}
+ // Supported operations and attributes.
+ ACE_Reactor*
+ Receiver_exec_i::reactor (void)
+ {
+ ACE_Reactor* reactor = 0;
+ ::CORBA::Object_var ccm_object =
+ this->ciao_context_->get_CCM_object();
+ if (! ::CORBA::is_nil (ccm_object.in ()))
+ {
+ ::CORBA::ORB_var orb = ccm_object->_get_orb ();
+ if (! ::CORBA::is_nil (orb.in ()))
+ {
+ reactor = orb->orb_core ()->reactor ();
+ }
+ }
+ if (reactor == 0)
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ return reactor;
+ }
bool
Receiver_exec_i::check_last ()
@@ -122,7 +235,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
try
{
::ReadGet_Test::QueryConditionTestConnector::Reader_var get_reader =
- this->context_->get_connection_get_port_data ();
+ this->ciao_context_->get_connection_get_port_data ();
if (::CORBA::is_nil (get_reader.in ()))
{
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver_exec_i::check_last - ")
@@ -209,7 +322,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
Receiver_exec_i::read_all_on_reader_port (void)
{
::ReadGet_Test::QueryConditionTestConnector::Reader_var read_reader =
- this->context_->get_connection_read_port_data ();
+ this->ciao_context_->get_connection_read_port_data ();
if (::CORBA::is_nil (read_reader))
{
@@ -236,7 +349,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
Receiver_exec_i::read_all_on_getter_port (void)
{
::ReadGet_Test::QueryConditionTestConnector::Reader_var get_reader =
- this->context_->get_connection_get_port_data ();
+ this->ciao_context_->get_connection_get_port_data ();
if (::CORBA::is_nil (get_reader))
{
@@ -263,7 +376,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
Receiver_exec_i::get_all_on_getter_port (void)
{
::ReadGet_Test::QueryConditionTestConnector::Getter_var get_getter =
- this->context_->get_connection_get_port_fresh_data ();
+ this->ciao_context_->get_connection_get_port_fresh_data ();
if (::CORBA::is_nil (get_getter))
{
@@ -356,8 +469,6 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
void
Receiver_exec_i::check_filter ()
{
-
-
this->check_filter_getter ();
this->check_filter_reader ();
}
@@ -372,7 +483,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
try
{
::ReadGet_Test::QueryConditionTestConnector::Getter_var get_getter =
- this->context_->get_connection_get_port_fresh_data ();
+ this->ciao_context_->get_connection_get_port_fresh_data ();
if (::CORBA::is_nil (get_getter.in ()))
{
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver_exec_i::check_filter <GETTER> - ")
@@ -426,12 +537,13 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
//check query
bool error = false;
- if (ACE_OS::strcmp (filter->expression, QUERY_GETTER_PORT) != 0)
+ ::CORBA::String_var expression = filter->expression.in ();
+ if (ACE_OS::strcmp (expression.in (), QUERY_GETTER_PORT) != 0)
{
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver_exec_i::check_filter <GETTER> - ")
ACE_TEXT ("Unexpected query when retrieving filter: ")
ACE_TEXT ("expected <%C> - received <%C>\n"),
- QUERY_GETTER_PORT, filter->expression.in ()));
+ QUERY_GETTER_PORT, expression.in ()));
error = true;
}
//check current parameters.
@@ -446,25 +558,27 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
if (filter->parameters.length () >= 1)
{
- if (ACE_OS::atoi (filter->parameters[0]) != this->current_iter_value1_)
+ CORBA::String_var param = ::CORBA::string_dup (filter->parameters[0].in ());
+ if (ACE_OS::atoi (param.in ()) != this->current_iter_value1_)
{
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver_exec_i::check_filter <GETTER> - ")
ACE_TEXT ("Unexpected param value: ")
ACE_TEXT ("expected <%d> - received <%C>\n"),
this->current_iter_value1_,
- filter->parameters[0].in ()));
+ param.in ()));
error = true;
}
}
if (filter->parameters.length () >= 2)
{
- if (ACE_OS::atoi (filter->parameters[1]) != this->current_iter_value2_)
+ CORBA::String_var param = ::CORBA::string_dup (filter->parameters[1].in ());
+ if (ACE_OS::atoi (param.in ()) != this->current_iter_value2_)
{
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver_exec_i::check_filter <GETTER> - ")
ACE_TEXT ("Unexpected param value: ")
ACE_TEXT ("expected <%d> - received <%C>\n"),
this->current_iter_value2_,
- filter->parameters[1].in ()));
+ param.in ()));
error = true;
}
}
@@ -485,7 +599,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
try
{
::ReadGet_Test::QueryConditionTestConnector::Reader_var reader =
- this->context_->get_connection_read_port_data ();
+ this->ciao_context_->get_connection_read_port_data ();
if (::CORBA::is_nil (reader.in ()))
{
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver_exec_i::check_filter <READER> - ")
@@ -539,12 +653,13 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
//check query
bool error = false;
- if (ACE_OS::strcmp (filter->expression, QUERY_READER_PORT) != 0)
+ ::CORBA::String_var expression = ::CORBA::string_dup (filter->expression.in ());
+ if (ACE_OS::strcmp (expression.in (), QUERY_READER_PORT) != 0)
{
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver_exec_i::check_filter <READER> - ")
ACE_TEXT ("Unexpected query when retrieving filter: ")
ACE_TEXT ("expected <%C> - received <%C>\n"),
- QUERY_READER_PORT, filter->expression.in ()));
+ QUERY_READER_PORT, expression.in ()));
error = true;
}
//check current parameters.
@@ -559,25 +674,27 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
if (filter->parameters.length () >= 1)
{
- if (ACE_OS::atoi (filter->parameters[0]) != this->current_iter_value1_)
+ CORBA::String_var param = ::CORBA::string_dup (filter->parameters[0].in ());
+ if (ACE_OS::atoi (param.in ()) != this->current_iter_value1_)
{
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver_exec_i::check_filter <READER> - ")
ACE_TEXT ("Unexpected param value: ")
ACE_TEXT ("expected <%d> - received <%C>\n"),
this->current_iter_value1_,
- filter->parameters[0].in ()));
+ param.in ()));
error = true;
}
}
if (filter->parameters.length () >= 2)
{
- if (ACE_OS::atoi (filter->parameters[1]) != this->current_iter_value2_)
+ CORBA::String_var param = ::CORBA::string_dup (filter->parameters[1].in ());
+ if (ACE_OS::atoi (param.in ()) != this->current_iter_value2_)
{
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver_exec_i::check_filter <READER> - ")
ACE_TEXT ("Unexpected param value: ")
ACE_TEXT ("expected <%d> - received <%C>\n"),
this->current_iter_value2_,
- filter->parameters[1].in ()));
+ param.in ()));
error = true;
}
}
@@ -594,7 +711,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
try
{
::CCM_DDS::ContentFilterSetting_var get_filter_setting =
- this->context_->get_connection_get_port_filter_config ();
+ this->ciao_context_->get_connection_get_port_filter_config ();
if (::CORBA::is_nil (get_filter_setting.in ()))
{
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver_exec_i::test_set_query_parameters - ")
@@ -602,7 +719,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
throw ::CCM_DDS::InternalError ();
}
::CCM_DDS::ContentFilterSetting_var read_filter_setting =
- this->context_->get_connection_read_port_filter_config ();
+ this->ciao_context_->get_connection_read_port_filter_config ();
if (::CORBA::is_nil (read_filter_setting.in ()))
{
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver_exec_i::test_set_query_parameters - ")
@@ -613,8 +730,8 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Receiver_exec_i::test_set_query_parameters: Set parameters\n")));
::DDS::StringSeq parameters;
parameters.length (2);
- parameters[0] = CORBA::string_dup (ITER2_VALUE1);
- parameters[1] = CORBA::string_dup (ITER2_VALUE2);
+ parameters[0] = ::CORBA::string_dup (ITER2_VALUE1);
+ parameters[1] = ::CORBA::string_dup (ITER2_VALUE2);
get_filter_setting->set_filter_parameters (parameters);
read_filter_setting->set_filter_parameters (parameters);
@@ -650,8 +767,8 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
ACE_NEW_THROW_EX (this->ticker_,
read_action_Generator (*this, run),
::CORBA::INTERNAL ());
- if (this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->schedule_timer (
- this->ticker_,
+
+ if (this->reactor ()->schedule_timer (this->ticker_,
0,
ACE_Time_Value(1, 0),
ACE_Time_Value(1, 0)) == -1)
@@ -665,12 +782,12 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
{
if (this->ticker_)
{
- this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->cancel_timer (this->ticker_);
+ this->reactor ()->cancel_timer (this->ticker_);
delete this->ticker_;
this->ticker_ = 0;
}
- ReadGetRestarter_var restarter = this->context_->get_connection_writer_restart ();
+ ReadGetRestarter_var restarter = this->ciao_context_->get_connection_writer_restart ();
if (::CORBA::is_nil (restarter.in ()))
{
ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver_exec_i::run - ")
@@ -734,31 +851,79 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
this->samples_expected_getter_ = (keys_ - 1) * SAMPLES_PER_KEY_GETTER;
}
- // Port operations.
+ // Component attributes and port operations.
+
::CCM_DDS::CCM_PortStatusListener_ptr
Receiver_exec_i::get_get_port_status (void)
{
- return ::CCM_DDS::CCM_PortStatusListener::_nil ();
+ if ( ::CORBA::is_nil (this->ciao_get_port_status_.in ()))
+ {
+ get_port_status_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ get_port_status_exec_i (
+ this->ciao_context_.in ()),
+ ::CCM_DDS::CCM_PortStatusListener::_nil ());
+
+ this->ciao_get_port_status_ = tmp;
+ }
+
+ return
+ ::CCM_DDS::CCM_PortStatusListener::_duplicate (
+ this->ciao_get_port_status_.in ());
}
::CCM_DDS::CCM_PortStatusListener_ptr
- Receiver_exec_i::get_read_port_status(void)
+ Receiver_exec_i::get_read_port_status (void)
{
- return ::CCM_DDS::CCM_PortStatusListener::_nil ();
+ if ( ::CORBA::is_nil (this->ciao_read_port_status_.in ()))
+ {
+ read_port_status_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ read_port_status_exec_i (
+ this->ciao_context_.in ()),
+ ::CCM_DDS::CCM_PortStatusListener::_nil ());
+
+ this->ciao_read_port_status_ = tmp;
+ }
+
+ return
+ ::CCM_DDS::CCM_PortStatusListener::_duplicate (
+ this->ciao_read_port_status_.in ());
}
::CCM_ReadGetStarter_ptr
- Receiver_exec_i::get_reader_start ()
+ Receiver_exec_i::get_reader_start (void)
{
- return new Starter_exec_i (*this);
+ if ( ::CORBA::is_nil (this->ciao_reader_start_.in ()))
+ {
+ reader_start_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ reader_start_exec_i (
+ this->ciao_context_.in (),
+ *this),
+ ::CCM_ReadGetStarter::_nil ());
+
+ this->ciao_reader_start_ = tmp;
+ }
+
+ return
+ ::CCM_ReadGetStarter::_duplicate (
+ this->ciao_reader_start_.in ());
}
// Operations from Components::SessionComponent.
+
void
- Receiver_exec_i::set_session_context (::Components::SessionContext_ptr ctx)
+ Receiver_exec_i::set_session_context (
+ ::Components::SessionContext_ptr ctx)
{
- this->context_ = ::ReadGet_Test::CCM_Receiver_Context::_narrow (ctx);
- if ( ::CORBA::is_nil (this->context_.in ()))
+ this->ciao_context_ =
+ ::ReadGet_Test::CCM_Receiver_Context::_narrow (ctx);
+
+ if ( ::CORBA::is_nil (this->ciao_context_.in ()))
{
throw ::CORBA::INTERNAL ();
}
@@ -767,11 +932,13 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
void
Receiver_exec_i::configuration_complete (void)
{
+ /* Your code here. */
}
void
Receiver_exec_i::ccm_activate (void)
{
+ /* Your code here. */
}
void
@@ -779,9 +946,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
{
if (this->ticker_)
{
- this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->cancel_timer (this->ticker_);
- delete this->ticker_;
- this->ticker_ = 0;
+ this->reactor ()->cancel_timer (this->ticker_);
}
}
@@ -835,4 +1000,3 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
return retval;
}
}
-
diff --git a/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver_exec.h b/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver_exec.h
index d163624fd15..f3a935f7632 100644
--- a/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver_exec.h
+++ b/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Receiver/ReadGet_Test_Receiver_exec.h
@@ -1,26 +1,51 @@
// -*- C++ -*-
// $Id$
-#ifndef CIAO_RECEIVER_EXEC_H_
-#define CIAO_RECEIVER_EXEC_H_
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+#ifndef CIAO_READGET_TEST_RECEIVER_EXEC_MX3XMT_H_
+#define CIAO_READGET_TEST_RECEIVER_EXEC_MX3XMT_H_
+
+#include /**/ "ace/pre.h"
#include "ReadGet_Test_ReceiverEC.h"
-#include /**/ "Receiver_exec_export.h"
-
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+#include /**/ "Receiver_exec_export.h"
#include "tao/LocalObject.h"
namespace CIAO_ReadGet_Test_Receiver_Impl
{
class Receiver_exec_i;
- //============================================================
- // read_action_Generator
- //============================================================
+ /**
+ * read_action_Generator
+ */
+
class read_action_Generator
: public ACE_Event_Handler
{
@@ -30,36 +55,107 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
~read_action_Generator ();
- virtual int handle_timeout (const ACE_Time_Value &tv, const void *arg);
+ virtual int handle_timeout (const ACE_Time_Value &tv,
+ const void *arg);
private:
Receiver_exec_i &callback_;
int run_;
};
- //============================================================
- // Starter_exec_i
- //============================================================
- class Starter_exec_i
+ /**
+ * Provider Executor Implementation Class: get_port_status_exec_i
+ */
+
+ class get_port_status_exec_i
+ : public virtual ::CCM_DDS::CCM_PortStatusListener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ get_port_status_exec_i (
+ ::ReadGet_Test::CCM_Receiver_Context_ptr ctx);
+ virtual ~get_port_status_exec_i (void);
+
+ //@{
+ /** Operations and attributes from ::CCM_DDS::PortStatusListener. */
+
+ virtual
+ void on_requested_deadline_missed (::DDS::DataReader_ptr the_reader,
+ const ::DDS::RequestedDeadlineMissedStatus & status);
+
+ virtual
+ void on_sample_lost (::DDS::DataReader_ptr the_reader,
+ const ::DDS::SampleLostStatus & status);
+ //@}
+
+ private:
+ ::ReadGet_Test::CCM_Receiver_Context_var ciao_context_;
+ };
+
+ /**
+ * Provider Executor Implementation Class: read_port_status_exec_i
+ */
+
+ class read_port_status_exec_i
+ : public virtual ::CCM_DDS::CCM_PortStatusListener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ read_port_status_exec_i (
+ ::ReadGet_Test::CCM_Receiver_Context_ptr ctx);
+ virtual ~read_port_status_exec_i (void);
+
+ //@{
+ /** Operations and attributes from ::CCM_DDS::PortStatusListener. */
+
+ virtual
+ void on_requested_deadline_missed (::DDS::DataReader_ptr the_reader,
+ const ::DDS::RequestedDeadlineMissedStatus & status);
+
+ virtual
+ void on_sample_lost (::DDS::DataReader_ptr the_reader,
+ const ::DDS::SampleLostStatus & status);
+ //@}
+
+ private:
+ ::ReadGet_Test::CCM_Receiver_Context_var ciao_context_;
+ };
+
+ /**
+ * Provider Executor Implementation Class: reader_start_exec_i
+ */
+
+ class reader_start_exec_i
: public virtual ::CCM_ReadGetStarter,
public virtual ::CORBA::LocalObject
{
public:
- Starter_exec_i (Receiver_exec_i & callback);
- virtual ~Starter_exec_i (void);
+ reader_start_exec_i (
+ ::ReadGet_Test::CCM_Receiver_Context_ptr ctx,
+ Receiver_exec_i & callback);
+ virtual ~reader_start_exec_i (void);
+
+ //@{
+ /** Operations and attributes from ::ReadGetStarter. */
- virtual void set_reader_properties (CORBA::UShort nr_keys,
- CORBA::UShort nr_iterations);
- virtual void start_read (CORBA::UShort run);
+ virtual
+ void set_reader_properties (::CORBA::UShort nr_keys,
+ ::CORBA::UShort nr_iterations);
+
+ virtual
+ void start_read (::CORBA::UShort run);
+ //@}
private:
+ ::ReadGet_Test::CCM_Receiver_Context_var ciao_context_;
Receiver_exec_i &callback_;
};
- //============================================================
- // Receiver_exec_i
- //============================================================
- class RECEIVER_EXEC_Export Receiver_exec_i
+ /**
+ * Component Executor Implementation Class: Receiver_exec_i
+ */
+
+ class Receiver_exec_i
: public virtual Receiver_Exec,
public virtual ::CORBA::LocalObject
{
@@ -67,35 +163,55 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
Receiver_exec_i (void);
virtual ~Receiver_exec_i (void);
- // Supported operations and attributes.
- void iterations (::CORBA::UShort iterations);
- void keys (::CORBA::UShort keys);
- // Component attributes.
+ //@{
+ /** Supported operations and attributes. */
- // Port operations.
- virtual ::CCM_ReadGetStarter_ptr get_reader_start ();
+ //@}
- virtual ::CCM_DDS::CCM_PortStatusListener_ptr get_get_port_status (void);
+ //@{
+ /** Component attributes and port operations. */
- virtual ::CCM_DDS::CCM_PortStatusListener_ptr get_read_port_status(void);
+ virtual ::CCM_DDS::CCM_PortStatusListener_ptr
+ get_get_port_status (void);
- bool check_last ();
- void start_read (CORBA::UShort run);
- void run (CORBA::UShort run);
+ virtual ::CCM_DDS::CCM_PortStatusListener_ptr
+ get_read_port_status (void);
- // Operations from Components::SessionComponent.
- virtual void
- set_session_context ( ::Components::SessionContext_ptr ctx);
+ virtual ::CCM_ReadGetStarter_ptr
+ get_reader_start (void);
+ //@}
+ //@{
+ /** Operations from Components::SessionComponent. */
+ virtual void set_session_context (::Components::SessionContext_ptr ctx);
virtual void configuration_complete (void);
-
virtual void ccm_activate (void);
virtual void ccm_passivate (void);
virtual void ccm_remove (void);
+ //@}
+
+ //@{
+ /** User defined public operations. */
+ void iterations (::CORBA::UShort iterations);
+ void keys (::CORBA::UShort keys);
+
+ bool check_last ();
+ void start_read (CORBA::UShort run);
+ void run (CORBA::UShort run);
+ //@}
private:
- ::ReadGet_Test::CCM_Receiver_Context_var context_;
+ ::ReadGet_Test::CCM_Receiver_Context_var ciao_context_;
+ //@{
+ /** Component attributes. */
+ ::CCM_DDS::CCM_PortStatusListener_var ciao_get_port_status_;
+ ::CCM_DDS::CCM_PortStatusListener_var ciao_read_port_status_;
+ ::CCM_ReadGetStarter_var ciao_reader_start_;
+ //@}
+
+ //@{
+ /** User defined members. */
CORBA::UShort iterations_;
CORBA::UShort keys_;
bool has_run_;
@@ -110,6 +226,10 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
CORBA::ULong samples_expected_getter_;
CORBA::ULong samples_received_getter_;
+ //@}
+
+ //@{
+ /** User defined private operations. */
void test_all (void);
void read_all_on_getter_port (void);
void get_all_on_getter_port (void);
@@ -122,11 +242,17 @@ namespace CIAO_ReadGet_Test_Receiver_Impl
void check_filter_reader (void);
void check_filter_getter (void);
void test_set_query_parameters (void);
+
+ //@}
+
+ /// Get the ACE_Reactor
+ ACE_Reactor* reactor (void);
};
extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr
create_ReadGet_Test_Receiver_Impl (void);
}
-#endif /* ifndef */
+#include /**/ "ace/post.h"
+#endif /* ifndef */
diff --git a/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Sender/ReadGet_Test_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Sender/ReadGet_Test_Sender_exec.cpp
index ff6b300d38d..c7d47f08f9e 100644
--- a/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Sender/ReadGet_Test_Sender_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Sender/ReadGet_Test_Sender_exec.cpp
@@ -1,18 +1,42 @@
// -*- C++ -*-
// $Id$
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+
#include "ReadGet_Test_Sender_exec.h"
#include "tao/ORB_Core.h"
#include "ace/Reactor.h"
-#include "ace/Log_Msg.h"
#define ITERATIONS 20
namespace CIAO_ReadGet_Test_Sender_Impl
{
- //============================================================
- // WriteHandler
- //============================================================
+ /**
+ * WriteHandler
+ */
+
WriteHandler::WriteHandler (Sender_exec_i &callback)
: callback_ (callback)
{
@@ -25,32 +49,40 @@ namespace CIAO_ReadGet_Test_Sender_Impl
return 0;
}
- //============================================================
- // Restarter_exec_i
- //============================================================
- Restarter_exec_i::Restarter_exec_i (Sender_exec_i & callback)
- : callback_ (callback)
+ /**
+ * Facet Executor Implementation Class: restart_writer_exec_i
+ */
+
+ restart_writer_exec_i::restart_writer_exec_i (
+ ::ReadGet_Test::CCM_Sender_Context_ptr ctx,
+ Sender_exec_i & callback)
+ : ciao_context_ (
+ ::ReadGet_Test::CCM_Sender_Context::_duplicate (ctx))
+ , callback_ (callback)
{
}
- Restarter_exec_i::~Restarter_exec_i (void)
+ restart_writer_exec_i::~restart_writer_exec_i (void)
{
}
+ // Operations from ::ReadGetRestarter
+
void
- Restarter_exec_i::restart_write ()
+ restart_writer_exec_i::restart_write (void)
{
this->callback_.restart ();
}
- //============================================================
- // Component Executor Implementation Class: Sender_exec_i
- //============================================================
+ /**
+ * Component Executor Implementation Class: Sender_exec_i
+ */
+
Sender_exec_i::Sender_exec_i (void)
- : iterations_ (ITERATIONS),
- keys_ (5),
- run_ (1),
- wh_ (0)
+ : keys_ (5)
+ , iterations_ (ITERATIONS)
+ , run_ (1)
+ , wh_ (0)
{
}
@@ -58,6 +90,49 @@ namespace CIAO_ReadGet_Test_Sender_Impl
{
}
+ // Component attributes and port operations.
+ ACE_Reactor*
+ Sender_exec_i::reactor (void)
+ {
+ ACE_Reactor* reactor = 0;
+ ::CORBA::Object_var ccm_object =
+ this->ciao_context_->get_CCM_object();
+ if (! ::CORBA::is_nil (ccm_object.in ()))
+ {
+ ::CORBA::ORB_var orb = ccm_object->_get_orb ();
+ if (! ::CORBA::is_nil (orb.in ()))
+ {
+ reactor = orb->orb_core ()->reactor ();
+ }
+ }
+ if (reactor == 0)
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ return reactor;
+ }
+
+ ::CCM_ReadGetRestarter_ptr
+ Sender_exec_i::get_restart_writer (void)
+ {
+ if ( ::CORBA::is_nil (this->ciao_restart_writer_.in ()))
+ {
+ restart_writer_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ restart_writer_exec_i (
+ this->ciao_context_.in (),
+ *this),
+ ::CCM_ReadGetRestarter::_nil ());
+
+ this->ciao_restart_writer_ = tmp;
+ }
+
+ return
+ ::CCM_ReadGetRestarter::_duplicate (
+ this->ciao_restart_writer_.in ());
+ }
+
void
Sender_exec_i::restart (void)
{
@@ -66,16 +141,16 @@ namespace CIAO_ReadGet_Test_Sender_Impl
ACE_NEW_THROW_EX (this->wh_,
WriteHandler (*this),
CORBA::INTERNAL ());
- this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->notify (this->wh_);
+ this->reactor ()->notify (this->wh_);
}
void
Sender_exec_i::start (void)
{
::ReadGet_Test::QueryConditionTestConnector::Writer_var writer =
- this->context_->get_connection_info_write_data ();
+ this->ciao_context_->get_connection_info_write_data ();
ReadGetStarter_var starter =
- this->context_->get_connection_start_reader ();
+ this->ciao_context_->get_connection_start_reader ();
if (::CORBA::is_nil (starter.in ()) ||
::CORBA::is_nil (writer.in ()))
@@ -84,9 +159,6 @@ namespace CIAO_ReadGet_Test_Sender_Impl
ACE_TEXT ("Unable to start the reader\n")));
return;
}
- else
- {
- }
starter->set_reader_properties (this->keys_, this->iterations_);
if (this->run_ > 1)
@@ -123,23 +195,22 @@ namespace CIAO_ReadGet_Test_Sender_Impl
}
void
- Sender_exec_i::keys (::CORBA::UShort keys)
+ Sender_exec_i::keys (
+ const ::CORBA::UShort keys)
{
this->keys_ = keys;
}
- ::CCM_ReadGetRestarter_ptr
- Sender_exec_i::get_restart_writer (void)
- {
- return new Restarter_exec_i (*this);
- }
+ // Operations from Components::SessionComponent.
void
- Sender_exec_i::set_session_context (::Components::SessionContext_ptr ctx)
+ Sender_exec_i::set_session_context (
+ ::Components::SessionContext_ptr ctx)
{
- this->context_ = ::ReadGet_Test::CCM_Sender_Context::_narrow (ctx);
+ this->ciao_context_ =
+ ::ReadGet_Test::CCM_Sender_Context::_narrow (ctx);
- if ( ::CORBA::is_nil (this->context_.in ()))
+ if ( ::CORBA::is_nil (this->ciao_context_.in ()))
{
throw ::CORBA::INTERNAL ();
}
@@ -148,6 +219,7 @@ namespace CIAO_ReadGet_Test_Sender_Impl
void
Sender_exec_i::configuration_complete (void)
{
+ /* Your code here. */
}
void
@@ -158,7 +230,7 @@ namespace CIAO_ReadGet_Test_Sender_Impl
ACE_NEW_THROW_EX (this->wh_,
WriteHandler (*this),
CORBA::INTERNAL ());
- this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->notify (this->wh_);
+ this->reactor ()->notify (this->wh_);
}
catch (const ::CORBA::Exception& ex)
{
@@ -176,6 +248,7 @@ namespace CIAO_ReadGet_Test_Sender_Impl
void
Sender_exec_i::ccm_passivate (void)
{
+ /* Your code here. */
}
void
diff --git a/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Sender/ReadGet_Test_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Sender/ReadGet_Test_Sender_exec.h
index 075b2bf11d8..0f498589c14 100644
--- a/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Sender/ReadGet_Test_Sender_exec.h
+++ b/CIAO/connectors/dds4ccm/tests/ContentFilteredTopic/ReadGet/Sender/ReadGet_Test_Sender_exec.h
@@ -1,27 +1,50 @@
// -*- C++ -*-
// $Id$
-#ifndef CIAO_SENDER_EXEC_H_
-#define CIAO_SENDER_EXEC_H_
-
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+#ifndef CIAO_READGET_TEST_SENDER_EXEC_2M2XYF_H_
+#define CIAO_READGET_TEST_SENDER_EXEC_2M2XYF_H_
+
+#include /**/ "ace/pre.h"
#include "ReadGet_Test_SenderEC.h"
-#include /**/ "Sender_exec_export.h"
-
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+#include /**/ "Sender_exec_export.h"
#include "tao/LocalObject.h"
namespace CIAO_ReadGet_Test_Sender_Impl
{
class Sender_exec_i;
- //============================================================
- // WriteHandler
- //============================================================
+ /**
+ * WriteHandler
+ */
class WriteHandler :
public ACE_Event_Handler
{
@@ -32,26 +55,36 @@ namespace CIAO_ReadGet_Test_Sender_Impl
Sender_exec_i &callback_;
};
- //============================================================
- // Restarter_exec_i
- //============================================================
- class Restarter_exec_i
+ /**
+ * Provider Executor Implementation Class: restart_writer_exec_i
+ */
+
+ class restart_writer_exec_i
: public virtual ::CCM_ReadGetRestarter,
public virtual ::CORBA::LocalObject
{
public:
- Restarter_exec_i (Sender_exec_i & callback);
- virtual ~Restarter_exec_i (void);
+ restart_writer_exec_i (
+ ::ReadGet_Test::CCM_Sender_Context_ptr ctx,
+ Sender_exec_i & callback);
+ virtual ~restart_writer_exec_i (void);
+
+ //@{
+ /** Operations and attributes from ::ReadGetRestarter. */
- virtual void restart_write ();
+ virtual
+ void restart_write (void);
+ //@}
private:
- Sender_exec_i &callback_;
+ ::ReadGet_Test::CCM_Sender_Context_var ciao_context_;
+ Sender_exec_i & callback_;
};
- //============================================================
- // Sender_exec_i
- //============================================================
+ /**
+ * Component Executor Implementation Class: Sender_exec_i
+ */
+
class Sender_exec_i
: public virtual Sender_Exec,
public virtual ::CORBA::LocalObject
@@ -60,36 +93,67 @@ namespace CIAO_ReadGet_Test_Sender_Impl
Sender_exec_i (void);
virtual ~Sender_exec_i (void);
- virtual ::CORBA::UShort keys (void);
+ //@{
+ /** Supported operations and attributes. */
- virtual void keys (::CORBA::UShort keys);
+ //@}
+
+ //@{
+ /** Component attributes and port operations. */
virtual ::CCM_ReadGetRestarter_ptr
get_restart_writer (void);
- virtual void set_session_context (::Components::SessionContext_ptr ctx);
+ virtual ::CORBA::UShort keys (void);
- virtual void configuration_complete (void);
+ virtual void keys (::CORBA::UShort keys);
+ //@}
+ //@{
+ /** Operations from Components::SessionComponent. */
+ virtual void set_session_context (::Components::SessionContext_ptr ctx);
+ virtual void configuration_complete (void);
virtual void ccm_activate (void);
virtual void ccm_passivate (void);
virtual void ccm_remove (void);
+ //@}
+ //@{
+ /** User defined public operations. */
void start (void);
void restart (void);
+ //@}
private:
- ::ReadGet_Test::CCM_Sender_Context_var context_;
+ ::ReadGet_Test::CCM_Sender_Context_var ciao_context_;
+
+ //@{
+ /** Component attributes. */
+ ::CCM_ReadGetRestarter_var ciao_restart_writer_;
+ ::CORBA::UShort keys_;
+ //@}
+
+ //@{
+ /** User defined members. */
CORBA::UShort iterations_;
- CORBA::UShort keys_;
CORBA::UShort run_;
WriteHandler *wh_;
+ //@}
+
+ //@{
+ /** User defined private operations. */
+
+ //@}
+
+ /// Get the ACE_Reactor
+ ACE_Reactor* reactor (void);
};
extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
create_ReadGet_Test_Sender_Impl (void);
}
-#endif /* ifndef */
+#include /**/ "ace/post.h"
+#endif /* ifndef */