From 24bb3a766fae26f2cd704647dfe6762ac95d717f Mon Sep 17 00:00:00 2001 From: dengg Date: Thu, 14 Apr 2005 15:22:03 +0000 Subject: Thu Apr 143 10:21:58 2005 Gan Deng --- TAO/CIAO/ChangeLog | 1 + TAO/CIAO/DAnCE/ciao/Container_Impl.cpp | 4 -- TAO/CIAO/DAnCE/examples/Hello/Sender/Sender.idl | 2 + .../DAnCE/examples/Hello/Sender/Sender_exec.cpp | 17 +++++++ TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec.h | 15 +++++- TAO/CIAO/DAnCE/examples/Hello/Sender/starter.cpp | 2 +- .../DAnCE/examples/Hello/descriptors/Hello.cid | 54 +++++++++++++++++++++- .../DAnCE/examples/Hello/descriptors/Receiver.cid | 13 +----- .../DAnCE/examples/Hello/descriptors/Sender.cid | 24 +--------- 9 files changed, 89 insertions(+), 43 deletions(-) diff --git a/TAO/CIAO/ChangeLog b/TAO/CIAO/ChangeLog index 6647ce83b53..f54ac927224 100644 --- a/TAO/CIAO/ChangeLog +++ b/TAO/CIAO/ChangeLog @@ -1,3 +1,4 @@ + Thu Apr 143 10:21:58 2005 Gan Deng * DAnCE/examples/Hello/Sender/Sender.idl diff --git a/TAO/CIAO/DAnCE/ciao/Container_Impl.cpp b/TAO/CIAO/DAnCE/ciao/Container_Impl.cpp index 3ff62b1d7c5..335c0ea2a1a 100644 --- a/TAO/CIAO/DAnCE/ciao/Container_Impl.cpp +++ b/TAO/CIAO/DAnCE/ciao/Container_Impl.cpp @@ -150,8 +150,6 @@ CIAO::Container_Impl::install ( // @@Todo: Currently I have to manually map the Deployment::Properties to // Components::ConfigValues, we should use a common data structure in // the future. - Gan - ACE_DEBUG ((LM_DEBUG, "Step 10\n")); - CORBA::ULong cur_len = comp_attributes.length (); comp_attributes.length (cur_len + 1); @@ -163,13 +161,11 @@ CIAO::Container_Impl::install ( comp_attributes[cur_len] = item; } - ACE_DEBUG ((LM_DEBUG, "Step 20\n")); //std_configurator.set_configuration ::Components::StandardConfigurator_var std_configurator = comp->get_standard_configurator (); std_configurator->set_configuration (comp_attributes); - ACE_DEBUG ((LM_DEBUG, "Step 30\n")); } } ACE_CATCHANY diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender.idl b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender.idl index e2c8ca64b0e..b13a5aaaa4b 100644 --- a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender.idl +++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender.idl @@ -22,6 +22,8 @@ module Hello provides ReadMessage push_message; publishes TimeOut click_out; attribute string local_message; + attribute long hertz; + // A test attribute to test setting attributes through XML }; home SenderHome manages Sender diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec.cpp b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec.cpp index 6fa52beb4de..036c1363750 100644 --- a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec.cpp +++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec.cpp @@ -20,6 +20,7 @@ Sender_Impl::Sender_exec_i::local_message (const char * local_message ACE_THROW_SPEC ((CORBA::SystemException)) { message_ = CORBA::string_dup (local_message); + ACE_DEBUG ((LM_DEBUG, "Executor::local_message:%s\n", message_)); } char * @@ -29,6 +30,22 @@ Sender_Impl::Sender_exec_i::local_message (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) return CORBA::string_dup(message_); } +void +Sender_Impl::Sender_exec_i::hertz (CORBA::Long hertz + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + this->hertz_ = hertz; + ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::Hertz:%d\n", this->hertz_)); +} + +CORBA::Long +Sender_Impl::Sender_exec_i::hertz (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + return this->hertz_; +} + Hello::CCM_ReadMessage_ptr Sender_Impl::Sender_exec_i::get_push_message (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec.h b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec.h index e8610a919c5..ba611c4072e 100644 --- a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec.h +++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_exec.h @@ -43,15 +43,24 @@ namespace Sender_Impl /// Default destructor. virtual ~Sender_exec_i (); - /// Operation to set the value of the attribute + /// Operation to set the value of the attribute "local_message" virtual void local_message (const char * local_message ACE_ENV_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((CORBA::SystemException)); - /// Operation to get the value of the attribute + /// Operation to get the value of the attribute "local_message" virtual char * local_message (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Operation to set the value of the attribute "hertz" + virtual void hertz (CORBA::Long hertz + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + /// Operation to get the value of the attribute "hertz" + virtual CORBA::Long hertz (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + /* Operations for obtaining the interface reference. */ /* This method will be used in the assembly face so the * ObjRef of this read_message facet will be sent to the @@ -100,6 +109,8 @@ namespace Sender_Impl private: CORBA::String_var message_; + CORBA::Long hertz_; + friend class Message_Impl; }; diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/starter.cpp b/TAO/CIAO/DAnCE/examples/Hello/Sender/starter.cpp index 2351d71dadc..3f5e43b89ea 100644 --- a/TAO/CIAO/DAnCE/examples/Hello/Sender/starter.cpp +++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/starter.cpp @@ -79,7 +79,7 @@ main (int argc, char *argv[]) -1); } - sender->local_message (message); + //sender->local_message (message); sender->start (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.cid b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.cid index fb3ae013432..f7abad71ded 100644 --- a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.cid +++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Hello.cid @@ -1,4 +1,4 @@ - + Sender_Instance + + + ComponentIOR + + + tk_string + + + Sender.ior + + + + + + local_message + + + tk_string + + + This is a test message passed in through XML. + + + + + + hertz + + + tk_long + + + 50 + + + + + + Receiver_Instance + + + ComponentIOR + + + tk_string + + + Receiver.ior + + + + Messages diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver.cid b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver.cid index 409baf5d65a..18d379e7eba 100644 --- a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver.cid +++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Receiver.cid @@ -1,4 +1,4 @@ - + - - ComponentIOR - - - tk_string - - - Receiver.ior - - - diff --git a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender.cid b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender.cid index 45a79ef23a9..c6e02fc2d25 100644 --- a/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender.cid +++ b/TAO/CIAO/DAnCE/examples/Hello/descriptors/Sender.cid @@ -1,4 +1,4 @@ - + - - local_message - - - tk_string - - - default_message - - - - - ComponentIOR - - - tk_string - - - Sender.ior - - - -- cgit v1.2.1