summaryrefslogtreecommitdiff
path: root/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp')
-rw-r--r--CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp278
1 files changed, 0 insertions, 278 deletions
diff --git a/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp
deleted file mode 100644
index 4ccbc02a680..00000000000
--- a/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp
+++ /dev/null
@@ -1,278 +0,0 @@
-// -*- C++ -*-
-/**
- * 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.dre.vanderbilt.edu/~schmidt/TAO.html
- **/
-
-#include "Updater_Receiver_exec.h"
-
-#include "dds4ccm/impl/dds4ccm_conf.h"
-
-namespace CIAO_Updater_Receiver_Impl
-{
-
- /**
- * Facet Executor Implementation Class: info_out_data_listener_exec_i
- */
-
- info_out_data_listener_exec_i::info_out_data_listener_exec_i (
- ::Updater::CCM_Receiver_Context_ptr ctx,
- ACE_Thread_ID &thread_id)
- : ciao_context_ (
- ::Updater::CCM_Receiver_Context::_duplicate (ctx))
- , thread_id_ (thread_id)
- {
- }
-
- info_out_data_listener_exec_i::~info_out_data_listener_exec_i (void)
- {
- }
-
- // Operations from ::Updater::UpdaterConnector::Listener
-
- void
- info_out_data_listener_exec_i::on_one_data (const ::TestTopic & datum,
- const ::CCM_DDS::ReadInfo & info)
- {
- ACE_Thread_ID t_id;
- this->thread_id_ = t_id;
-
- ACE_DEBUG ((LM_DEBUG, "ListenOneByOneTest_Listener_exec_i::on_one_data: "
- "key <%C> - iteration <%d>\n",
- datum.key.in (),
- datum.x));
- if (::DDS::HANDLE_NIL == info.instance_handle)
- {
- ACE_ERROR ((LM_ERROR, "ERROR: ListenOneByOneTest_Listener_exec_i::on_one_data: "
- "instance handle seems to be invalid "
- "key <%C> - iteration <%d>\n",
- datum.key.in (),
- datum.x));
- }
- if (info.source_timestamp.sec == 0 &&
- info.source_timestamp.nanosec == 0)
- {
- ACE_ERROR ((LM_ERROR, "ERROR: ListenOneByOneTest_Listener_exec_i::on_one_data: "
- "source timestamp seems to be invalid (nil) "
- "key <%C> - iteration <%d>\n",
- datum.key.in (),
- datum.x));
- }
- }
-
- void
- info_out_data_listener_exec_i::on_many_data (const ::TestTopicSeq & /* data */,
- const ::CCM_DDS::ReadInfoSeq & /* infos */)
- {
- /* Your code here. */
- }
-
- /**
- * Facet Executor Implementation Class: info_out_status_exec_i
- */
-
- info_out_status_exec_i::info_out_status_exec_i (
- ::Updater::CCM_Receiver_Context_ptr ctx)
- : ciao_context_ (
- ::Updater::CCM_Receiver_Context::_duplicate (ctx))
- {
- }
-
- info_out_status_exec_i::~info_out_status_exec_i (void)
- {
- }
-
- // Operations from ::CCM_DDS::PortStatusListener
-
- void
- info_out_status_exec_i::on_requested_deadline_missed (::DDS::DataReader_ptr /* the_reader */,
- const ::DDS::RequestedDeadlineMissedStatus & /* status */)
- {
- /* Your code here. */
- }
-
- void
- info_out_status_exec_i::on_sample_lost (::DDS::DataReader_ptr /* the_reader */,
- const ::DDS::SampleLostStatus & /* status */)
- {
- /* Your code here. */
- }
-
- /**
- * Component Executor Implementation Class: Receiver_exec_i
- */
-
- Receiver_exec_i::Receiver_exec_i (void)
- : thread_id_listener_ (0, 0)
- {
- }
-
- Receiver_exec_i::~Receiver_exec_i (void)
- {
- }
-
- // Supported operations and attributes.
-
- // Component attributes and port operations.
-
- ::Updater::UpdaterConnector::CCM_Listener_ptr
- Receiver_exec_i::get_info_out_data_listener (void)
- {
- if ( ::CORBA::is_nil (this->ciao_info_out_data_listener_.in ()))
- {
- info_out_data_listener_exec_i *tmp = 0;
- ACE_NEW_RETURN (
- tmp,
- info_out_data_listener_exec_i (
- this->ciao_context_.in (),
- this->thread_id_listener_),
- ::Updater::UpdaterConnector::CCM_Listener::_nil ());
-
- this->ciao_info_out_data_listener_ = tmp;
- }
-
- return
- ::Updater::UpdaterConnector::CCM_Listener::_duplicate (
- this->ciao_info_out_data_listener_.in ());
- }
-
- ::CCM_DDS::CCM_PortStatusListener_ptr
- Receiver_exec_i::get_info_out_status (void)
- {
- if ( ::CORBA::is_nil (this->ciao_info_out_status_.in ()))
- {
- info_out_status_exec_i *tmp = 0;
- ACE_NEW_RETURN (
- tmp,
- info_out_status_exec_i (
- this->ciao_context_.in ()),
- ::CCM_DDS::CCM_PortStatusListener::_nil ());
-
- this->ciao_info_out_status_ = tmp;
- }
-
- return
- ::CCM_DDS::CCM_PortStatusListener::_duplicate (
- this->ciao_info_out_status_.in ());
- }
-
- // Operations from Components::SessionComponent.
-
- void
- Receiver_exec_i::set_session_context (
- ::Components::SessionContext_ptr ctx)
- {
- this->ciao_context_ =
- ::Updater::CCM_Receiver_Context::_narrow (ctx);
-
- if ( ::CORBA::is_nil (this->ciao_context_.in ()))
- {
- throw ::CORBA::INTERNAL ();
- }
- }
-
- void
- Receiver_exec_i::configuration_complete (void)
- {
- /* Your code here. */
- }
-
- void
- Receiver_exec_i::ccm_activate (void)
- {
- ::CCM_DDS::DataListenerControl_var dlc =
- this->ciao_context_->get_connection_info_out_data_control ();
- dlc->mode (::CCM_DDS::ONE_BY_ONE);
- }
-
- void
- Receiver_exec_i::ccm_passivate (void)
- {
- /* Your code here. */
- }
-
- void
- Receiver_exec_i::ccm_remove (void)
- {
- char ccm_buf [65];
- ACE_Thread_ID ccm_thread_id;
- ccm_thread_id.to_string (ccm_buf);
-
- char list_buf [65];
- this->thread_id_listener_.to_string(list_buf);
- if (this->thread_id_listener_.id() == 0)
- {
- ACE_ERROR ((LM_ERROR, "ERROR: "
- "Thread ID for ReaderListener not set!\n"));
- }
-#if (CIAO_DDS4CCM_CONTEXT_SWITCH == 1)
- else if (this->thread_id_listener_ == ccm_thread_id)
- {
- ACE_DEBUG ((LM_DEBUG, "ONE_BY_ONE: "
- "Thread switch for ReaderListener seems OK. "
- "(DDS uses the CCM thread for its callback) "
- "listener <%C> - component <%C>\n",
- list_buf,
- ccm_buf));
- }
- else
- {
- ACE_ERROR ((LM_ERROR, "ERROR: ONE_BY_ONE: "
- "Thread switch for ReaderListener "
- "doesn't seem to work! "
- "listener <%C> - component <%C>\n",
- list_buf,
- ccm_buf));
- }
- #else
- else if (this->thread_id_listener_ == ccm_thread_id)
- {
- ACE_ERROR ((LM_ERROR, "ERROR: ONE_BY_ONE: ReaderListener: "
- "DDS seems to use a CCM thread for its callback: "
- "listener <%C> - component <%C>\n",
- list_buf,
- ccm_buf));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "ONE_BY_ONE: ReaderListener: "
- "DDS seems to use its own thread for its callback: "
- "listener <%C> - component <%C>\n",
- list_buf,
- ccm_buf));
- }
- #endif
- }
-
- extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr
- create_Updater_Receiver_Impl (void)
- {
- ::Components::EnterpriseComponent_ptr retval =
- ::Components::EnterpriseComponent::_nil ();
-
- ACE_NEW_NORETURN (
- retval,
- Receiver_exec_i);
-
- return retval;
- }
-}