diff options
author | Marijke Hengstmengel <MHengstmengel@users.noreply.github.com> | 2011-12-13 13:08:54 +0000 |
---|---|---|
committer | Marijke Hengstmengel <MHengstmengel@users.noreply.github.com> | 2011-12-13 13:08:54 +0000 |
commit | e32568686a7893e5d922cba89eea3b30fd3d7f20 (patch) | |
tree | a376ee257175d56e12fb0422bd37b14371b73f43 | |
parent | 8a3887c3103772e5b09b3ec221f7ca5adfc1fb32 (diff) | |
download | ATCD-e32568686a7893e5d922cba89eea3b30fd3d7f20.tar.gz |
Tue Dec 13 13:00:07 UTC 2011 Marijke Hengstmengel <hengstmengel_m@remedy.nl>
* connectors/dds4ccm/tests/HomeTest/HomeComp/HomeT_Home.mpc:
* connectors/dds4ccm/tests/HomeTest/HomeComp/HomeT_HomeC.idl:
* connectors/dds4ccm/tests/HomeTest/HomeComp/HomeT_HomeC_exec.cpp:
* connectors/dds4ccm/tests/HomeTest/HomeComp/controller.cpp:
* connectors/dds4ccm/tests/HomeTest/descriptors/run_test.pl:
Home created now a connector instance, without activating it.
6 files changed, 57 insertions, 90 deletions
diff --git a/CIAO/ChangeLog.BRANCH b/CIAO/ChangeLog.BRANCH index b4a93bb62cb..96d3c1d5b04 100644 --- a/CIAO/ChangeLog.BRANCH +++ b/CIAO/ChangeLog.BRANCH @@ -1,3 +1,12 @@ +Tue Dec 13 13:00:07 UTC 2011 Marijke Hengstmengel <hengstmengel_m@remedy.nl> + + * connectors/dds4ccm/tests/HomeTest/HomeComp/HomeT_Home.mpc: + * connectors/dds4ccm/tests/HomeTest/HomeComp/HomeT_HomeC.idl: + * connectors/dds4ccm/tests/HomeTest/HomeComp/HomeT_HomeC_exec.cpp: + * connectors/dds4ccm/tests/HomeTest/HomeComp/controller.cpp: + * connectors/dds4ccm/tests/HomeTest/descriptors/run_test.pl: + Home created now a connector instance, without activating it. + Mon Dec 12 10:59:27 UTC 2011 Marijke Hengstmengel <hengstmengel_m@remedy.nl> * connectors/dds4ccm/tests/HomeTest/HomeComp/HomeT_Home.mpc: @@ -6,7 +15,7 @@ Mon Dec 12 10:59:27 UTC 2011 Marijke Hengstmengel <hengstmengel_m@remedy.nl> * connectors/dds4ccm/tests/HomeTest/HomeComp/controller.cpp: * connectors/dds4ccm/tests/HomeTest/descriptors/DeploymentPlanConnOnly.cdp: * connectors/dds4ccm/tests/HomeTest/descriptors/run_test.pl: - Add controller, acting on Home component + Add controller, acting on Home component * connectors/dds4ccm/tests/HomeTest/HomeComp/client.cpp: Removed this file. diff --git a/CIAO/connectors/dds4ccm/tests/HomeTest/HomeComp/HomeT_Home.mpc b/CIAO/connectors/dds4ccm/tests/HomeTest/HomeComp/HomeT_Home.mpc index ee9a29ec9f8..fc782330b22 100644 --- a/CIAO/connectors/dds4ccm/tests/HomeTest/HomeComp/HomeT_Home.mpc +++ b/CIAO/connectors/dds4ccm/tests/HomeTest/HomeComp/HomeT_Home.mpc @@ -86,7 +86,11 @@ project(HomeT_HomeC_stub): ccm_stub, dds4ccm_base { project(HomeT_HomeC_exec) : ciao_executor, dds4ccm_lem_stub { after += HomeT_HomeC_lem_stub HomeT_HomeC_stub HomeT_Connector_lem_stub HomeT_Connector_stub sharedname = HomeT_HomeC_exec - libs += HomeT_HomeC_stub HomeT_HomeC_lem_stub HomeT_Base_stub HomeT_Connector_lem_stub HomeT_Connector_stub + libs += HomeT_HomeC_stub \ + HomeT_HomeC_lem_stub \ + HomeT_Base_stub \ + HomeT_Connector_lem_stub \ + HomeT_Connector_stub includes += .. libout = ../lib libpaths += ../lib @@ -116,7 +120,10 @@ project(HomeT_HomeC_svnt) : ciao_servant, dds4ccm_base { sharedname = HomeT_HomeC_svnt libs += HomeT_HomeC_stub HomeT_HomeC_exec - libs += HomeT_Base_stub + libs += HomeT_Base_stub \ + HomeT_Connector_exec \ + HomeT_Connector_svnt + dynamicflags += HOMET_HOMEC_SVNT_BUILD_DLL libout = ../lib libpaths += ../lib @@ -136,7 +143,7 @@ project(HomeT_HomeC_svnt) : ciao_servant, dds4ccm_base { } } -project (HomeT_HomeC_control) : ccm_stub , dds4ccm_base{ +project (HomeT_HomeC_control) : ccm_stub, dds4ccm_base{ after += HomeT_HomeC_stub exename = controller libs += HomeT_HomeC_stub HomeT_Base_stub HomeT_Connector_stub diff --git a/CIAO/connectors/dds4ccm/tests/HomeTest/HomeComp/HomeT_HomeC_exec.cpp b/CIAO/connectors/dds4ccm/tests/HomeTest/HomeComp/HomeT_HomeC_exec.cpp index 86fc7207259..fdd6554d712 100644 --- a/CIAO/connectors/dds4ccm/tests/HomeTest/HomeComp/HomeT_HomeC_exec.cpp +++ b/CIAO/connectors/dds4ccm/tests/HomeTest/HomeComp/HomeT_HomeC_exec.cpp @@ -46,7 +46,17 @@ namespace CIAO_ConnComp_DDS_Event_Impl ConnHome_exec_i::new_ConnComp (void) { /* Your code here. */ - return ::ConnComp::CCM_DDS_Event::_nil (); + ACE_DEBUG ((LM_DEBUG, "ConnHome_exec_i::new_ConnComp: create connector.\n")); + + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + CIAO_ConnComp_DDS_Event_Impl::DDS_Event_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; } // Implicit operations. diff --git a/CIAO/connectors/dds4ccm/tests/HomeTest/HomeComp/client.cpp b/CIAO/connectors/dds4ccm/tests/HomeTest/HomeComp/client.cpp deleted file mode 100644 index af9edf56c7c..00000000000 --- a/CIAO/connectors/dds4ccm/tests/HomeTest/HomeComp/client.cpp +++ /dev/null @@ -1,56 +0,0 @@ -// $Id$ - -//============================================================== -/** - * @file client.cpp - * - * This is a simple client test program that interact with the EC - * component implementation. This test uses the explicit factory - * operation in the home interface to create a EC component - * instance, run it for a while, and destroy the component instance. - */ -//============================================================== - -#include "HomeT_HomeCC.h" -#include "ace/streams.h" -#include "ace/OS_NS_unistd.h" - -int -ACE_TMAIN (int argc, ACE_TCHAR *argv[]) -{ - try - { - // Initialize orb - CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - - // Resolve HomeFinder interface - - CORBA::Object_var obj - = orb->string_to_object ("file://Receiver.ior"); - - ConnHome_var home - = ConnHome::_narrow (obj.in ()); - - if (CORBA::is_nil (home.in ())) - ACE_ERROR_RETURN ((LM_ERROR, "Unable to acquire ConnHome objref\n"), -1); - - home->new_ConnComp (); - - // Place to plug in the rate - - ACE_OS::sleep (15); - - // home->remove_component (); - - orb->destroy (); - } - catch (const CORBA::Exception& ex) - { - ex._tao_print_exception ("Who is the culprit\n"); - ACE_ERROR_RETURN ((LM_ERROR, - "Uncaught CORBA exception\n"), - 1); - } - - return 0; -} diff --git a/CIAO/connectors/dds4ccm/tests/HomeTest/HomeComp/controller.cpp b/CIAO/connectors/dds4ccm/tests/HomeTest/HomeComp/controller.cpp index de3bd67a2d2..b1b99d20f3e 100644 --- a/CIAO/connectors/dds4ccm/tests/HomeTest/HomeComp/controller.cpp +++ b/CIAO/connectors/dds4ccm/tests/HomeTest/HomeComp/controller.cpp @@ -4,7 +4,7 @@ /** * @file controller.cpp * - * This is a controller tat interact with the Home-component implementation. + * This is a controller that interact with the Home-component implementation. * This test uses the explicit factory * operation in the home interface to create a connector component * instance, run it for a while, and destroy the component instance. @@ -12,6 +12,7 @@ //============================================================== #include "HomeT_HomeCC.h" +#include "Connector/HomeT_ConnectorEC.h" #include "ace/streams.h" #include "ace/OS_NS_unistd.h" #include "ace/Get_Opt.h" @@ -79,26 +80,33 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) ACE_ERROR_RETURN ((LM_ERROR, "Unable to acquire ConnHome objref\n"), -1); // starting Connector component - ACE_DEBUG ((LM_DEBUG, "Controller: Starting Connector component home->new_ConnComp ()\n")); + ACE_DEBUG ((LM_DEBUG, "Controller: Start create Connector component\n")); - CORBA::Object * tmp = home_comp->new_ConnComp (); + CORBA::Object_var tmp = home_comp->new_ConnComp (); + ConnComp::DDS_Event_var ce = ConnComp::DDS_Event::_narrow (tmp.in ()); - if (CORBA::is_nil (tmp)) - ACE_ERROR((LM_ERROR, "Unable to start home_comp->new_ConnComp\n")); + if (CORBA::is_nil (ce.in ())) + ACE_ERROR((LM_ERROR, "Unable to start create Connector component\n")); - ACE_DEBUG ((LM_DEBUG, "Controller: Started Connector component home->new_ConnComp ()\n")); + ACE_DEBUG ((LM_DEBUG, "Controller: Started Connector component\n")); - // Place to plug in the rate + // Place to plug in some connector settings + ce->topic_name ("Shapes"); + ce->configuration_complete(); + // activate not possible + //ce->ccm_activate (); ACE_OS::sleep (5); - // home->remove_component (); + ce->remove (); + + ACE_DEBUG ((LM_DEBUG, "Controller: removed Connector component\n")); orb->destroy (); } catch (const CORBA::Exception& ex) { - ex._tao_print_exception ("Who is the culprit\n"); + ex._tao_print_exception ("Exception\n"); ACE_ERROR_RETURN ((LM_ERROR, "Uncaught CORBA exception\n"), 1); diff --git a/CIAO/connectors/dds4ccm/tests/HomeTest/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/HomeTest/descriptors/run_test.pl index b1f0244c65b..8c590c20d72 100755 --- a/CIAO/connectors/dds4ccm/tests/HomeTest/descriptors/run_test.pl +++ b/CIAO/connectors/dds4ccm/tests/HomeTest/descriptors/run_test.pl @@ -14,20 +14,20 @@ $DANCE_ROOT = "$ENV{'DANCE_ROOT'}"; $DDS4CCM_TRACE_ENABLE = "$ENV{'DDS4CCM_TRACE_ENABLE'}"; -$ENV{'DANCE_LOG_LEVEL'}=10; -$ENV{'CIAO_LOG_LEVEL'}=10; -$ENV{'DANCE_TRACE_ENABLE'}=1; -$ENV{'CIAO_TRACE_ENABLE'}=1; +$ENV{'DANCE_LOG_LEVEL'}=0; +$ENV{'CIAO_LOG_LEVEL'}=0; +$ENV{'DANCE_TRACE_ENABLE'}=0; +$ENV{'CIAO_TRACE_ENABLE'}=0; $daemons_running = 0; $em_running = 0; $ns_running = 0; -$nr_daemon = 2; -@ports = ( 60001, 60002 ); -@iorbases = ( "HomeC.ior", "Sender.ior" ); +$nr_daemon = 1; +@ports = ( 60001 ); +@iorbases = ( "HomeC.ior" ); @iorfiles = 0; -@nodenames = ("ReceiverNode" , "SenderNode"); +@nodenames = ("ReceiverNode"); $controller_exec = "$CIAO_ROOT/connectors/dds4ccm/tests/HomeTest/HomeComp/controller"; @@ -239,22 +239,11 @@ if ($result != 0) { } # put some delay here. -sleep (30); - -# invoking the controller again to stop the rategen -print "Invoking the controller to stop RateGen\n"; -$controller = $tg_executor->CreateProcess ("$controller_exec", "-k file://HomeC.ior -f"); -$result = $controller->SpawnWaitKill ($tg_executor->ProcessStopWaitInterval ()); -if ($result != 0) { - print STDERR "ERROR: The controller returned $result\n"; - $status = 1; -} -print "Sleeping 5 seconds to allow task to complete\n"; +print "Sleeping 10 seconds to allow task to complete\n"; sleep (5); - # Invoke executor - stop the application -. print "Invoking executor - stop the application -\n"; print "by running dance_plan_launcher.exe with -k file://$ior_emfile -x $cdp_file\n"; |