diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2009-10-06 07:05:13 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2009-10-06 07:05:13 +0000 |
commit | 815c031aed419bdf46f27b8761e78cf58313c28f (patch) | |
tree | 4ed0a6efe0f52017b09f1e197b4056dfc2865c6f | |
parent | 11668dcc1e156be7dab2ca89814847154b802309 (diff) | |
download | ATCD-dds_ports.tar.gz |
Tue Oct 6 07:04:13 UTC 2009 William R. Otte <wotte@dre.vanderbilt.edu>dds_ports
9 files changed, 472 insertions, 259 deletions
diff --git a/modules/CIAO/ChangeLog b/modules/CIAO/ChangeLog index 613be0f7562..2f263556021 100644 --- a/modules/CIAO/ChangeLog +++ b/modules/CIAO/ChangeLog @@ -1,9 +1,22 @@ -Mon Oct 5 11:55:20 UTC 2009 William R. Otte <wotte@dre.vanderbilt.edu> +Tue Oct 6 07:04:13 UTC 2009 William R. Otte <wotte@dre.vanderbilt.edu> + * connectors/dds4ccm/examples/Quoter/Broker/Broker_exec.cpp: + * connectors/dds4ccm/examples/Quoter/Connector/Quoter_Connector_exec.h: + * connectors/dds4ccm/examples/Quoter/Connector/Quoter_Connector_exec.cpp: + * connectors/dds4ccm/examples/Quoter/Distributor/Distributor.mpc: * connectors/dds4ccm/examples/Quoter/descriptors/Plan.cdp: + * connectors/dds4ccm/impl/ndds/ListenerControl.h: + * connectors/dds4ccm/impl/ndds/ListenerControl.cpp: + * connectors/dds4ccm/impl/ndds/ndds_impl.mpc: - Deploment plan. + Completed implementation. +Mon Oct 5 11:55:20 UTC 2009 William R. Otte <wotte@dre.vanderbilt.edu> + + * connectors/dds4ccm/examples/Quoter/descriptors/Plan.cdp: + + Deploment plan. + Thu Oct 1 02:40:40 UTC 2009 William R. Otte <wotte@dre.vanderbilt.edu> * MPC/config/dds4ccm_base.mpb: diff --git a/modules/CIAO/connectors/dds4ccm/examples/Quoter/Broker/Broker_exec.cpp b/modules/CIAO/connectors/dds4ccm/examples/Quoter/Broker/Broker_exec.cpp index 0958d9882c3..87cfacb0845 100644 --- a/modules/CIAO/connectors/dds4ccm/examples/Quoter/Broker/Broker_exec.cpp +++ b/modules/CIAO/connectors/dds4ccm/examples/Quoter/Broker/Broker_exec.cpp @@ -112,6 +112,7 @@ namespace CIAO_Quoter_Broker_Impl Broker_exec_i::get_info_out_listener (void) { /* Your code here. */ + printf ("*************** out listener\n"); return new Stock_Info_RawListener_exec_i (); } @@ -148,7 +149,17 @@ namespace CIAO_Quoter_Broker_Impl void Broker_exec_i::ccm_activate (void) { - /* Your code here. */ + ::CCM_DDS::ListenerControl_var lc = + this->context_->get_connection_info_out_control (); + + if (CORBA::is_nil (lc)) + { + printf ("Error: Listener control receptacle is null!\n"); + throw CORBA::INTERNAL (); + } + + lc->enabled (true); + } void diff --git a/modules/CIAO/connectors/dds4ccm/examples/Quoter/Connector/Quoter_Connector_exec.cpp b/modules/CIAO/connectors/dds4ccm/examples/Quoter/Connector/Quoter_Connector_exec.cpp index 099d7e6a1c3..5eab90d13c7 100644 --- a/modules/CIAO/connectors/dds4ccm/examples/Quoter/Connector/Quoter_Connector_exec.cpp +++ b/modules/CIAO/connectors/dds4ccm/examples/Quoter/Connector/Quoter_Connector_exec.cpp @@ -35,30 +35,31 @@ #include "dds4ccm/impl/ndds/NDDS_Traits.h" #include "dds4ccm/impl/ndds/DomainParticipantFactory.h" +#include "dds4ccm/impl/ndds/DomainParticipant.h" // should be removed after lem fix #include "../Broker/BrokerEC.h" // should be removed after we refactor stuff back into ndds impl. #include "dds4ccm/impl/ndds/DataReader.h" - +#include "dds4ccm/impl/ndds/ListenerControl.h" namespace CIAO_Quoter_Quoter_Connector_Impl { //============================================================ // Facet Executor Implementation Class: Stock_Info_Reader_exec_i //============================================================ - + Stock_Info_Reader_exec_i::Stock_Info_Reader_exec_i (void) { } - + Stock_Info_Reader_exec_i::~Stock_Info_Reader_exec_i (void) { } - + // Operations from ::CCM_DDS::Stock_Info_Reader - + void Stock_Info_Reader_exec_i::read_all ( ::CCM_DDS::Stock_Info_Reader::Stock_InfoSeq_out /* instances */, @@ -66,7 +67,7 @@ namespace CIAO_Quoter_Quoter_Connector_Impl { /* Your code here. */ } - + void Stock_Info_Reader_exec_i::read_all_history ( ::CCM_DDS::Stock_Info_Reader::Stock_InfoSeq_out /* instances */, @@ -74,7 +75,7 @@ namespace CIAO_Quoter_Quoter_Connector_Impl { /* Your code here. */ } - + void Stock_Info_Reader_exec_i::read_one ( ::Quoter::Stock_Info & /* an_instance */, @@ -82,7 +83,7 @@ namespace CIAO_Quoter_Quoter_Connector_Impl { /* Your code here. */ } - + void Stock_Info_Reader_exec_i::read_one_history ( const ::Quoter::Stock_Info & /* an_instance */, @@ -91,51 +92,52 @@ namespace CIAO_Quoter_Quoter_Connector_Impl { /* Your code here. */ } - + ::CCM_DDS::QueryFilter * Stock_Info_Reader_exec_i::filter (void) { /* Your code here. */ return 0; } - + void Stock_Info_Reader_exec_i::filter ( const ::CCM_DDS::QueryFilter & /* filter */) { /* Your code here. */ } - + //============================================================ // Component Executor Implementation Class: Quoter_Connector_exec_i //============================================================ - + Quoter_Connector_exec_i::Quoter_Connector_exec_i (void) : default_domain_configured_ (false), domain_id_ (0), default_topic_configured_ (false), topic_name_ ("Quoter_Topic"), __info_in_configured_ (false), - __info_out_configured_ (false) + __info_out_configured_ (false), + __info_out_rawlistener_enabled_ (false) { } - + Quoter_Connector_exec_i::~Quoter_Connector_exec_i (void) { } - + // Supported operations and attributes. - + // Component attributes. - + char * Quoter_Connector_exec_i::topic_name (void) { // @from DDS_TopicBase return CORBA::string_dup (this->topic_name_.in ()); } - + void Quoter_Connector_exec_i::topic_name ( const char * topic_name) @@ -143,38 +145,38 @@ namespace CIAO_Quoter_Quoter_Connector_Impl // @from DDS_TopicBase this->topic_name_ = topic_name; } - + ::DDS::StringSeq * Quoter_Connector_exec_i::key_fields (void) { // @from DDS_TopicBase - ::DDS::StringSeq *retval = + ::DDS::StringSeq *retval = new ::DDS::StringSeq (this->key_fields_.length ()); - + for (CORBA::ULong i = 0; i < this->key_fields_.length (); ++i) (*retval)[i] = CORBA::string_dup (this->key_fields_[i]); - + return retval; } - + void Quoter_Connector_exec_i::key_fields ( const ::DDS::StringSeq & key_fields) { // @from DDS_TopicBase this->key_fields_.length (key_fields.length ()); - + for (CORBA::ULong i = 0; i < this->key_fields_.length (); ++i) this->key_fields_[i] = CORBA::string_dup (key_fields[i]); } - + ::DDS::DomainId_t Quoter_Connector_exec_i::domain_id (void) { // @from DDS_Base return this->domain_id_; } - + void Quoter_Connector_exec_i::domain_id ( ::DDS::DomainId_t domain_id) @@ -182,14 +184,14 @@ namespace CIAO_Quoter_Quoter_Connector_Impl // @from DDS_Base this->domain_id_ = domain_id; } - + char * Quoter_Connector_exec_i::qos_profile (void) { // @from DDS_Base return CORBA::string_dup (this->qos_profile_.in ()); } - + void Quoter_Connector_exec_i::qos_profile ( const char * qos_profile) @@ -197,7 +199,7 @@ namespace CIAO_Quoter_Quoter_Connector_Impl // @from DDS_Base this->qos_profile_ = qos_profile; } - + // Port operations. void @@ -205,16 +207,19 @@ namespace CIAO_Quoter_Quoter_Connector_Impl { CIAO_DEBUG ((LM_TRACE, CLINFO "Quoter_Connector_exec_i::configure_default_domain_ - " "Configuring default domain\n")); - + if (this->default_domain_configured_) return; try { + NDDSConfigLogger::get_instance()->set_verbosity_by_category(NDDS_CONFIG_LOG_CATEGORY_API, + NDDS_CONFIG_LOG_VERBOSITY_STATUS_ALL ); + // Generic code this->domain_factory_ = new ::CIAO::DDS4CCM::RTI::RTI_DomainParticipantFactory_i (); - + ::DDS::DomainParticipantQos qos; - this->domain_ = + this->domain_ = this->domain_factory_->create_participant (this->domain_id_, qos, 0, @@ -227,26 +232,36 @@ namespace CIAO_Quoter_Quoter_Connector_Impl } } - void + void Quoter_Connector_exec_i::configure_default_topic_ (void) { CIAO_DEBUG ((LM_TRACE, CLINFO "Quoter_Connector_exec_i::configure_default_topic_ - " "Configuring default topic\n")); if (this->default_topic_configured_) return; - + this->configure_default_domain_ (); - + try { if (CORBA::is_nil (this->topic_)) { - ::DDS::TopicQos tqos; - this->topic_ = - this->domain_->create_topic (this->topic_name_.in (), - Stock_Info_Traits::type_support::get_type_name (), - tqos, - 0, - 0); + CIAO::DDS4CCM::RTI::RTI_DomainParticipant_i *part = dynamic_cast< CIAO::DDS4CCM::RTI::RTI_DomainParticipant_i * > (this->domain_.in ()); + DDS_ReturnCode_t retcode = Stock_Info_Traits::type_support::register_type( + part->get_participant (), Stock_Info_Traits::type_support::get_type_name ()); + if (retcode == DDS_RETCODE_OK) + { + ::DDS::TopicQos tqos; + this->topic_ = + this->domain_->create_topic (this->topic_name_.in (), + Stock_Info_Traits::type_support::get_type_name (), + tqos, + 0, + 0); + } + else + { + throw CORBA::INTERNAL (); + } } } catch (...) @@ -254,16 +269,16 @@ namespace CIAO_Quoter_Quoter_Connector_Impl CIAO_ERROR ((LM_ERROR, "Caught unknown error while configuring default topic\n")); throw CORBA::INTERNAL (); } - } - - void + } + + void Quoter_Connector_exec_i::configure_port_info_in_ (void) { if (this->__info_in_configured_) return; - + this->configure_default_topic_ (); - + try { if (CORBA::is_nil (this->__info_in_publisher_.in ())) @@ -273,7 +288,7 @@ namespace CIAO_Quoter_Quoter_Connector_Impl 0, 0); } - + if (CORBA::is_nil (this->__info_in_datawriter_.in ())) { ::DDS::DataWriterQos dwqos; @@ -282,7 +297,7 @@ namespace CIAO_Quoter_Quoter_Connector_Impl 0, 0); this->__info_in_datawriter_ = ::DDS::CCM_DataWriter::_narrow (dwv_tmp); - } + } } catch (...) { @@ -290,23 +305,25 @@ namespace CIAO_Quoter_Quoter_Connector_Impl throw CORBA::INTERNAL (); } } - - + + class info_out_Listener : public virtual ::DDS::DataReaderListener { public: info_out_Listener (::CCM_DDS::Stock_Info_RawListener_ptr listen, - ::CCM_DDS::PortStatusListener_ptr psl) - : enable_ (false), - listener_ (::CCM_DDS::Stock_Info_RawListener::_duplicate (listen)), - portlistener_ (::CCM_DDS::PortStatusListener::_duplicate (psl)) + ::CCM_DDS::PortStatusListener_ptr psl, + ACE_Atomic_Op <TAO_SYNCH_MUTEX, bool> &enabled) + : listener_ (::CCM_DDS::Stock_Info_RawListener::_duplicate (listen)), + portlistener_ (::CCM_DDS::PortStatusListener::_duplicate (psl)), + enable_ (enabled) { }; // from DataReaderListener virtual void on_data_available( ::DDS::DataReader *rdr) { + printf ("*** on data available\n"); if (!this->enable_.value ()) return; @@ -318,7 +335,7 @@ namespace CIAO_Quoter_Quoter_Connector_Impl ACE_ERROR ((LM_ERROR, ACE_TEXT ("Stock_InfoDataReader::narrow failed.\n"))); return; } - + /* Loop until there are messages available in the queue */ for(;;) { ::Quoter::Stock_Info instance; @@ -326,6 +343,7 @@ namespace CIAO_Quoter_Quoter_Connector_Impl ::DDS::ReturnCode_t result = reader->take_next_sample(instance, sampleinfo); if (result == DDS_RETCODE_NO_DATA) { + printf ("no more samples\n"); /* No more samples */ break; } else if (result != DDS_RETCODE_OK) { @@ -333,47 +351,42 @@ namespace CIAO_Quoter_Quoter_Connector_Impl return; } if (sampleinfo.valid_data) { + printf ("got valid data\n"); ::CCM_DDS::ReadInfo empty; listener_->on_data (instance, empty); } - + } - + }; - + virtual void on_requested_deadline_missed (::DDS::DataReader_ptr the_reader, const ::DDS::RequestedDeadlineMissedStatus & status) { this->portlistener_->on_requested_deadline_missed (the_reader, status); }; - - + + virtual void on_sample_lost (::DDS::DataReader_ptr the_reader, const ::DDS::SampleLostStatus & status) { this->portlistener_->on_sample_lost (the_reader, status); }; - - - - // From ListenerControl - bool enabled () const; - void enabled (bool enable); - + private: ::CCM_DDS::Stock_Info_RawListener_var listener_; ::CCM_DDS::PortStatusListener_var portlistener_; - ACE_Atomic_Op <TAO_SYNCH_MUTEX, bool> enable_;; + ACE_Atomic_Op <TAO_SYNCH_MUTEX, bool> &enable_; }; - + void Quoter_Connector_exec_i::configure_port_info_out_ (void) { if (this->__info_out_configured_) return; - + this->configure_default_topic_ (); - + try { if (CORBA::is_nil (this->__info_out_subscriber_.in ())) @@ -383,22 +396,23 @@ namespace CIAO_Quoter_Quoter_Connector_Impl 0, 0); } - + if (CORBA::is_nil (this->__info_out_datareader_.in ())) { this->__info_out_portstatus_ = this->context_->get_connection_info_out_status (); - + this->__info_out_datareaderlistener = new info_out_Listener (this->context_->get_connection_info_out_listener (), - this->context_->get_connection_info_out_status ()); - + this->context_->get_connection_info_out_status (), + this->__info_out_rawlistener_enabled_); + ::DDS::DataReaderQos drqos; - this->__info_out_datareader_ = + this->__info_out_datareader_ = this->__info_out_subscriber_->create_datareader (this->topic_.in (), drqos, this->__info_out_datareaderlistener.in (), DDS_DATA_AVAILABLE_STATUS); } - + } catch (...) { @@ -406,97 +420,102 @@ namespace CIAO_Quoter_Quoter_Connector_Impl throw CORBA::INTERNAL (); } } - + ::CCM_DDS::CCM_Stock_Info_Writer_ptr Quoter_Connector_exec_i::get_info_in_data (void) { std::cerr << "get_info_in_data" << std::endl; - + this->configure_port_info_in_ (); - + return new CIAO::DDS4CCM::RTI::Writer_T<Stock_Info_Traits, ::CCM_DDS::CCM_Stock_Info_Writer> (this->__info_in_datawriter_.in ()); } - + ::DDS::CCM_DataWriter_ptr Quoter_Connector_exec_i::get_info_in_dds_entity (void) { this->configure_port_info_in_ (); - + return this->__info_in_datawriter_.in (); } - + ::CCM_DDS::CCM_Stock_Info_Reader_ptr Quoter_Connector_exec_i::get_info_out_data (void) { /* Your code here. */ return ::CCM_DDS::CCM_Stock_Info_Reader::_nil (); } - + ::CCM_DDS::CCM_ListenerControl_ptr Quoter_Connector_exec_i::get_info_out_control (void) { /* Your code here. */ - return ::CCM_DDS::CCM_ListenerControl::_nil (); + return new CCM_DDS_ListenerControl_i (this->__info_out_rawlistener_enabled_); } - + ::DDS::CCM_DataReader_ptr Quoter_Connector_exec_i::get_info_out_dds_entity (void) { /* Your code here. */ return ::DDS::CCM_DataReader::_nil (); } - + // Operations from Components::SessionComponent. - + void Quoter_Connector_exec_i::set_session_context ( ::Components::SessionContext_ptr ctx) { - ::Quoter::CCM_Quoter_Connector_Context_var lctx = + ::Quoter::CCM_Quoter_Connector_Context_var lctx = ::Quoter::CCM_Quoter_Connector_Context::_narrow (ctx); - + if ( ::CORBA::is_nil (lctx.in ())) { throw ::CORBA::INTERNAL (); } - + this->context_ = lctx; } - + void Quoter_Connector_exec_i::configuration_complete (void) { } - + void Quoter_Connector_exec_i::ccm_activate (void) { /* Your code here. */ + if (!CORBA::is_nil (this->context_->get_connection_info_out_listener ()) || + !CORBA::is_nil (this->context_->get_connection_info_out_status ())) + { + this->configure_port_info_out_ (); + } } - + void Quoter_Connector_exec_i::ccm_passivate (void) { /* Your code here. */ } - + void Quoter_Connector_exec_i::ccm_remove (void) { /* Your code here. */ } - + extern "C" QUOTER_CONNECTOR_EXEC_Export ::Components::EnterpriseComponent_ptr create_Quoter_Quoter_Connector_Impl (void) { ::Components::EnterpriseComponent_ptr retval = ::Components::EnterpriseComponent::_nil (); - + ACE_NEW_NORETURN ( retval, Quoter_Connector_exec_i); - + return retval; } } diff --git a/modules/CIAO/connectors/dds4ccm/examples/Quoter/Connector/Quoter_Connector_exec.h b/modules/CIAO/connectors/dds4ccm/examples/Quoter/Connector/Quoter_Connector_exec.h index fe53f7ad2fb..cd57f6ae092 100644 --- a/modules/CIAO/connectors/dds4ccm/examples/Quoter/Connector/Quoter_Connector_exec.h +++ b/modules/CIAO/connectors/dds4ccm/examples/Quoter/Connector/Quoter_Connector_exec.h @@ -241,6 +241,7 @@ namespace CIAO_Quoter_Quoter_Connector_Impl void configure_port_info_out_ (void); bool __info_out_configured_; CCM_DDS::Stock_Info_RawListener_var __info_out_rawlistener_; + ACE_Atomic_Op <TAO_SYNCH_MUTEX, bool> __info_out_rawlistener_enabled_; CCM_DDS::PortStatusListener_var __info_out_portstatus_; ::DDS::Subscriber_var __info_out_subscriber_; ::DDS::DataReaderListener_var __info_out_listener_; diff --git a/modules/CIAO/connectors/dds4ccm/examples/Quoter/Distributor/Distributor.mpc b/modules/CIAO/connectors/dds4ccm/examples/Quoter/Distributor/Distributor.mpc index 33b5e228ed0..2a407065115 100644 --- a/modules/CIAO/connectors/dds4ccm/examples/Quoter/Distributor/Distributor.mpc +++ b/modules/CIAO/connectors/dds4ccm/examples/Quoter/Distributor/Distributor.mpc @@ -111,7 +111,7 @@ project(DDS_Distributor_svnt) : ciao_servant, dds4ccm_base { after += DDS_Quoter_Base_skel DDS_Distributor_lem_stub sharedname = Distributor_svnt libs += Distributor_stub Distributor_lem_stub \ - DDS_Quoter_Base_skel \ + \ DDS_Quoter_Base_stub libpaths += ../lib libout = ../lib diff --git a/modules/CIAO/connectors/dds4ccm/examples/Quoter/descriptors/Plan.cdp b/modules/CIAO/connectors/dds4ccm/examples/Quoter/descriptors/Plan.cdp index 36f86d0c51f..17d283b5b68 100644 --- a/modules/CIAO/connectors/dds4ccm/examples/Quoter/descriptors/Plan.cdp +++ b/modules/CIAO/connectors/dds4ccm/examples/Quoter/descriptors/Plan.cdp @@ -1,127 +1,274 @@ <Deployment:DeploymentPlan - xmlns:Deployment="http://www.omg.org/Deployment" - xmlns:xmi="http://www.omg.org/XMI" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + xmlns:Deployment="http://www.omg.org/Deployment" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> <label>Quoter_Depl_1</label> <UUID>Quoter_Depl_1</UUID> -<implementation xmi:id="Quoter_ConnectorComponentImplementation"> - <name>Quoter_ConnectorComponentImplementation</name> - <source/> - <artifact xmi:idref="Quoter_Connector_ExecArtifact" /> - <artifact xmi:idref="Quoter_Connector_SvntArtifact" /> - <execParameter> - <!-- entrypoint as exec parameter (see 10.6.1) --> - <name>component factory</name> - <value> - <type> - <kind>tk_string</kind> - </type> + <implementation xmi:id="BrokerComponentImplementation"> + <name>BrokerComponentImplementation</name> + <source/> + <artifact xmi:idref="Broker_ExecArtifact" /> + <artifact xmi:idref="Broker_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>component factory</name> <value> - <string>create_Quoter_Quoter_Connector_Impl</string> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_Broker_Impl</string> + </value> </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> <value> - <string>create_Quoter_Quoter_Connector_Servant</string> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_Broker_Servant</string> + </value> </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> <value> - <string>Quoter_Connector_svnt</string> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Broker_svnt</string> + </value> </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> <value> - <string>Quoter_Connector_exec</string> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Broker_exec</string> + </value> </value> - </value> - </execParameter> -</implementation> -<implementation xmi:id="DistributorComponentImplementation"> - <name>DistributorComponentImplementation</name> - <source/> - <artifact xmi:idref="Distributor_ExecArtifact" /> - <artifact xmi:idref="Distributor_SvntArtifact" /> - <execParameter> - <!-- entrypoint as exec parameter (see 10.6.1) --> - <name>component factory</name> - <value> - <type> - <kind>tk_string</kind> - </type> + </execParameter> + </implementation> + + <implementation xmi:id="Quoter_ConnectorComponentImplementation"> + <name>Quoter_ConnectorComponentImplementation</name> + <source/> + <artifact xmi:idref="Quoter_Connector_ExecArtifact" /> + <artifact xmi:idref="Quoter_Connector_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_Quoter_Connector_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_Quoter_Connector_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Quoter_Connector_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Quoter_Connector_exec</string> + </value> + </value> + </execParameter> + </implementation> + <implementation xmi:id="DistributorComponentImplementation"> + <name>DistributorComponentImplementation</name> + <source/> + <artifact xmi:idref="Distributor_ExecArtifact" /> + <artifact xmi:idref="Distributor_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>component factory</name> <value> - <string>create_Quoter_Distributor_Impl</string> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_Distributor_Impl</string> + </value> </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> <value> - <string>create_Quoter_Distributor_Servant</string> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Quoter_Distributor_Servant</string> + </value> </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> <value> - <string>Distributor_svnt</string> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Distributor_svnt</string> + </value> </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> <value> - <string>Distributor_exec</string> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Distributor_exec</string> + </value> </value> - </value> - </execParameter> -</implementation> -<instance xmi:id="Quoter_ConnectorComponentInstance"> - <name>Quoter_ConnectorComponent</name> - <node>DistributorNode</node> - <!-- hostname --> - <source/> - <implementation xmi:idref="Quoter_ConnectorComponentImplementation" /> -</instance> -<instance xmi:id="DistributorComponentInstance"> - <name>DistributorComponent</name> - <node>DistributorNode</node> - <!-- hostname --> - <source/> - <implementation xmi:idref="DistributorComponentImplementation" /> -</instance> + </execParameter> + </implementation> + <instance xmi:id="BrokerComponentInstance"> + <name>BrokerComponent</name> + <node>BrokerNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="BrokerComponentImplementation" /> + </instance> + <instance xmi:id="Quoter_ConnectorComponentInstance"> + <name>Quoter_ConnectorComponent</name> + <node>DistributorNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="Quoter_ConnectorComponentImplementation" /> + </instance> + <instance xmi:id="Quoter_ConnectorComponentInstance2"> + <name>Quoter_ConnectorComponent2</name> + <node>BrokerNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="Quoter_ConnectorComponentImplementation" /> + </instance> + <instance xmi:id="DistributorComponentInstance"> + <name>DistributorComponent</name> + <node>DistributorNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="DistributorComponentImplementation" /> + </instance> + + + <connection> + <name>info_out_data</name> + <internalEndpoint> + <portName>info_out_data</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="BrokerComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>info_out_data</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="Quoter_ConnectorComponentInstance2" /> + </internalEndpoint> + </connection> + + <connection> + <name>_listenercontrol</name> + <internalEndpoint> + <portName>info_out_control</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="BrokerComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>info_out_control</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="Quoter_ConnectorComponentInstance2" /> + </internalEndpoint> + </connection> + + <connection> + <name>_rawlistner</name> + <internalEndpoint> + <portName>info_out_listener</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="BrokerComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>info_out_listener</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Quoter_ConnectorComponentInstance2" /> + </internalEndpoint> + </connection> + + <connection> + <name>_datareader</name> + <internalEndpoint> + <portName>info_out_dds_entity</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="BrokerComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>info_out_dds_entity</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="Quoter_ConnectorComponentInstance2" /> + </internalEndpoint> + </connection> + + <connection> + <name>_portstatuslistener</name> + <internalEndpoint> + <portName>info_out_status</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="BrokerComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>info_out_status</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Quoter_ConnectorComponentInstance2" /> + </internalEndpoint> + </connection> <connection> <name>writer_connection</name> @@ -140,40 +287,58 @@ </connection> -<artifact xmi:id="Distributor_ExecArtifact"> - <name>Distributor_exec</name> - <source/> - <node/> - <location>Distributor_exec</location> -</artifact> -<artifact xmi:id="Distributor_SvntArtifact"> - <name>Distributor_svnt</name> - <source/> - <node/> - <location>Distributor_svnt</location> -</artifact> -<artifact xmi:id="Distributor_StubArtifact"> - <name>Distributor_stub</name> - <source/> - <node/> - <location>Distributor_stub</location> -</artifact> -<artifact xmi:id="Quoter_Connector_ExecArtifact"> - <name>Quoter_Connector_exec</name> - <source/> - <node/> - <location>DDS_Quoter_Connector_exec</location> -</artifact> -<artifact xmi:id="Quoter_Connector_SvntArtifact"> - <name>Quoter_Connector_svnt</name> - <source/> - <node/> - <location>DDS_Quoter_Connector_svnt</location> -</artifact> -<artifact xmi:id="Quoter_Connector_StubArtifact"> - <name>Quoter_Connector_stub</name> - <source/> - <node/> - <location>DDS_Quoter_Connector_stub</location> -</artifact> -</Deployment:DeploymentPlan>
\ No newline at end of file + <artifact xmi:id="Distributor_ExecArtifact"> + <name>Distributor_exec</name> + <source/> + <node/> + <location>Distributor_exec</location> + </artifact> + <artifact xmi:id="Distributor_SvntArtifact"> + <name>Distributor_svnt</name> + <source/> + <node/> + <location>Distributor_svnt</location> + </artifact> + <artifact xmi:id="Distributor_StubArtifact"> + <name>Distributor_stub</name> + <source/> + <node/> + <location>Distributor_stub</location> + </artifact> + <artifact xmi:id="Quoter_Connector_ExecArtifact"> + <name>Quoter_Connector_exec</name> + <source/> + <node/> + <location>DDS_Quoter_Connector_exec</location> + </artifact> + <artifact xmi:id="Quoter_Connector_SvntArtifact"> + <name>Quoter_Connector_svnt</name> + <source/> + <node/> + <location>DDS_Quoter_Connector_svnt</location> + </artifact> + <artifact xmi:id="Quoter_Connector_StubArtifact"> + <name>Quoter_Connector_stub</name> + <source/> + <node/> + <location>DDS_Quoter_Connector_stub</location> + </artifact> + <artifact xmi:id="Broker_ExecArtifact"> + <name>Broker_exec</name> + <source/> + <node/> + <location>Broker_exec</location> + </artifact> + <artifact xmi:id="Broker_SvntArtifact"> + <name>Broker_svnt</name> + <source/> + <node/> + <location>Broker_svnt</location> + </artifact> + <artifact xmi:id="Broker_StubArtifact"> + <name>Broker_stub</name> + <source/> + <node/> + <location>Broker_stub</location> + </artifact> +</Deployment:DeploymentPlan> diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/ListenerControl.cpp b/modules/CIAO/connectors/dds4ccm/impl/ndds/ListenerControl.cpp index 1f0b4e95321..361e9442880 100644 --- a/modules/CIAO/connectors/dds4ccm/impl/ndds/ListenerControl.cpp +++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/ListenerControl.cpp @@ -28,10 +28,11 @@ // TAO_IDL - Generated from // be/be_codegen.cpp:1422 -#include "dds4ccm_ListnerControlI.h" +#include "ListenerControl.h" // Implementation skeleton constructor -CCM_DDS_ListenerControl_i::CCM_DDS_ListenerControl_i (void) +CCM_DDS_ListenerControl_i::CCM_DDS_ListenerControl_i (ACE_Atomic_Op <TAO_SYNCH_MUTEX, bool> &flag) + : flag_ (flag) { } @@ -42,13 +43,12 @@ CCM_DDS_ListenerControl_i::~CCM_DDS_ListenerControl_i (void) ::CORBA::Boolean CCM_DDS_ListenerControl_i::enabled (void) { - // Add your implementation here + return flag_.value (); } -void CCM_DDS_ListenerControl_i::enabled ( - ::CORBA::Boolean enabled) +void CCM_DDS_ListenerControl_i::enabled (::CORBA::Boolean enabled) { - // Add your implementation here + this->flag_ = enabled; } diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/ListenerControl.h b/modules/CIAO/connectors/dds4ccm/impl/ndds/ListenerControl.h index a698d55a0ed..cf05037bee9 100644 --- a/modules/CIAO/connectors/dds4ccm/impl/ndds/ListenerControl.h +++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/ListenerControl.h @@ -31,28 +31,31 @@ #ifndef DDS4CCM_LISTNERCONTROLI_H_ #define DDS4CCM_LISTNERCONTROLI_H_ -#include "dds4ccm_ListnerControlS.h" +#include "dds4ccm/impl/ndds/dds4ccm_ndds_impl_export.h" +#include "dds4ccm/idl/dds4ccm_ListenerControlEC.h" +#include "tao/LocalObject.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) #pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -class CCM_DDS_ListenerControl_i - : public virtual POA_CCM_DDS::ListenerControl +class DDS4CCM_NDDS_IMPL_Export CCM_DDS_ListenerControl_i + : public virtual CCM_DDS::CCM_ListenerControl, + public virtual ::CORBA::LocalObject { public: // Constructor - CCM_DDS_ListenerControl_i (void); + CCM_DDS_ListenerControl_i (ACE_Atomic_Op <TAO_SYNCH_MUTEX, bool> &flag); // Destructor virtual ~CCM_DDS_ListenerControl_i (void); - virtual - ::CORBA::Boolean enabled (void); + virtual ::CORBA::Boolean enabled (void); - virtual - void enabled ( - ::CORBA::Boolean enabled); + virtual void enabled (::CORBA::Boolean enabled); + +private: + ACE_Atomic_Op <TAO_SYNCH_MUTEX, bool> &flag_; }; diff --git a/modules/CIAO/connectors/dds4ccm/impl/ndds/ndds_impl.mpc b/modules/CIAO/connectors/dds4ccm/impl/ndds/ndds_impl.mpc index 9fbe81b294b..da2d2d7ebd9 100644 --- a/modules/CIAO/connectors/dds4ccm/impl/ndds/ndds_impl.mpc +++ b/modules/CIAO/connectors/dds4ccm/impl/ndds/ndds_impl.mpc @@ -28,5 +28,6 @@ project(CIAO_DDS4CCM_NDDS_Impl) : dds4ccm_skel, taolib, ciao_output, nddslib, cc ReadCondition.cpp QueryCondition.cpp Utils.cpp + ListenerControl.cpp } } |