diff options
Diffstat (limited to 'CIAO/connectors/dds4ccm/examples')
7 files changed, 170 insertions, 166 deletions
diff --git a/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_1_to_5.pl b/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_1_to_5.pl index d911980de37..d4092b01729 100755 --- a/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_1_to_5.pl +++ b/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_1_to_5.pl @@ -105,33 +105,33 @@ sub kill_open_processes { } sub run_node_daemons { - for ($i = 0; $i < $nr_daemon; ++$i) { - $iorbase = $iorbases[$i]; - $iorfile = $iorfiles[$i]; - $port = $ports[$i]; - $nodename = $nodenames[$i]; - $iiop = "iiop://localhost:$port"; - $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; - - $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; - $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; - - print "Run dance_node_manager with $d_param\n"; - - $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); - $DEAMONS[$i]->Spawn (); - - if ($tg_daemons[$i]->WaitForFileTimed($iorbase, - $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { - print STDERR - "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; - for (; $i >= 0; --$i) { - $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); - } - return -1; - } - } - return 0; + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorbase = $iorbases[$i]; + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; + + $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; + + print "Run dance_node_manager with $d_param\n"; + + $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); + $DEAMONS[$i]->Spawn (); + + if ($tg_daemons[$i]->WaitForFileTimed($iorbase, + $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); + } + return -1; + } + } + return 0; } create_targets (); diff --git a/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_5_to_1.pl b/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_5_to_1.pl index 211282ad550..9d9c563e32c 100755 --- a/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_5_to_1.pl +++ b/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_5_to_1.pl @@ -105,33 +105,33 @@ sub kill_open_processes { } sub run_node_daemons { - for ($i = 0; $i < $nr_daemon; ++$i) { - $iorbase = $iorbases[$i]; - $iorfile = $iorfiles[$i]; - $port = $ports[$i]; - $nodename = $nodenames[$i]; - $iiop = "iiop://localhost:$port"; - $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; - - $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; - $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; - - print "Run dance_node_manager with $d_param\n"; - - $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); - $DEAMONS[$i]->Spawn (); - - if ($tg_daemons[$i]->WaitForFileTimed($iorbase, - $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { - print STDERR - "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; - for (; $i >= 0; --$i) { - $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); - } - return -1; - } - } - return 0; + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorbase = $iorbases[$i]; + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; + + $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; + + print "Run dance_node_manager with $d_param\n"; + + $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); + $DEAMONS[$i]->Spawn (); + + if ($tg_daemons[$i]->WaitForFileTimed($iorbase, + $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); + } + return -1; + } + } + return 0; } create_targets (); diff --git a/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_5_to_5.pl b/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_5_to_5.pl index 13493eeda40..93ad7725f66 100755 --- a/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_5_to_5.pl +++ b/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_5_to_5.pl @@ -107,33 +107,33 @@ sub kill_open_processes { } sub run_node_daemons { - for ($i = 0; $i < $nr_daemon; ++$i) { - $iorbase = $iorbases[$i]; - $iorfile = $iorfiles[$i]; - $port = $ports[$i]; - $nodename = $nodenames[$i]; - $iiop = "iiop://localhost:$port"; - $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; - - $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; - $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; - - print "Run dance_node_manager with $d_param\n"; - - $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); - $DEAMONS[$i]->Spawn (); - - if ($tg_daemons[$i]->WaitForFileTimed($iorbase, - $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { - print STDERR - "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; - for (; $i >= 0; --$i) { - $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); - } - return -1; - } - } - return 0; + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorbase = $iorbases[$i]; + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; + + $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; + + print "Run dance_node_manager with $d_param\n"; + + $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); + $DEAMONS[$i]->Spawn (); + + if ($tg_daemons[$i]->WaitForFileTimed($iorbase, + $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); + } + return -1; + } + } + return 0; } create_targets (); diff --git a/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_receiver.pl b/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_receiver.pl index 5f3e100ac60..7bc84250d5b 100755 --- a/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_receiver.pl +++ b/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_receiver.pl @@ -105,33 +105,33 @@ sub kill_open_processes { } sub run_node_daemons { - for ($i = 0; $i < $nr_daemon; ++$i) { - $iorbase = $iorbases[$i]; - $iorfile = $iorfiles[$i]; - $port = $ports[$i]; - $nodename = $nodenames[$i]; - $iiop = "iiop://localhost:$port"; - $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; - - $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; - $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; - - print "Run dance_node_manager with $d_param\n"; - - $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); - $DEAMONS[$i]->Spawn (); - - if ($tg_daemons[$i]->WaitForFileTimed($iorbase, - $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { - print STDERR - "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; - for (; $i >= 0; --$i) { - $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); - } - return -1; - } - } - return 0; + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorbase = $iorbases[$i]; + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; + + $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; + + print "Run dance_node_manager with $d_param\n"; + + $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); + $DEAMONS[$i]->Spawn (); + + if ($tg_daemons[$i]->WaitForFileTimed($iorbase, + $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); + } + return -1; + } + } + return 0; } create_targets (); diff --git a/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_sender.pl b/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_sender.pl index 049ebaac13f..14b8cd0008d 100755 --- a/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_sender.pl +++ b/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_sender.pl @@ -105,33 +105,33 @@ sub kill_open_processes { } sub run_node_daemons { - for ($i = 0; $i < $nr_daemon; ++$i) { - $iorbase = $iorbases[$i]; - $iorfile = $iorfiles[$i]; - $port = $ports[$i]; - $nodename = $nodenames[$i]; - $iiop = "iiop://localhost:$port"; - $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; - - $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; - $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; - - print "Run dance_node_manager with $d_param\n"; - - $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); - $DEAMONS[$i]->Spawn (); - - if ($tg_daemons[$i]->WaitForFileTimed($iorbase, - $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { - print STDERR - "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; - for (; $i >= 0; --$i) { - $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); - } - return -1; - } - } - return 0; + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorbase = $iorbases[$i]; + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; + + $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; + + print "Run dance_node_manager with $d_param\n"; + + $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); + $DEAMONS[$i]->Spawn (); + + if ($tg_daemons[$i]->WaitForFileTimed($iorbase, + $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); + } + return -1; + } + } + return 0; } create_targets (); diff --git a/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_test.pl index 95a60f9d061..ea9412714cb 100755 --- a/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_test.pl +++ b/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_test.pl @@ -105,33 +105,33 @@ sub kill_open_processes { } sub run_node_daemons { - for ($i = 0; $i < $nr_daemon; ++$i) { - $iorbase = $iorbases[$i]; - $iorfile = $iorfiles[$i]; - $port = $ports[$i]; - $nodename = $nodenames[$i]; - $iiop = "iiop://localhost:$port"; - $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; - - $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; - $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; - - print "Run dance_node_manager with $d_param\n"; - - $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); - $DEAMONS[$i]->Spawn (); - - if ($tg_daemons[$i]->WaitForFileTimed($iorbase, - $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { - print STDERR - "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; - for (; $i >= 0; --$i) { - $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); - } - return -1; - } - } - return 0; + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorbase = $iorbases[$i]; + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; + + $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; + + print "Run dance_node_manager with $d_param\n"; + + $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); + $DEAMONS[$i]->Spawn (); + + if ($tg_daemons[$i]->WaitForFileTimed($iorbase, + $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); + } + return -1; + } + } + return 0; } create_targets (); diff --git a/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_test_dds.pl b/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_test_dds.pl index 61a5f8967e5..bf405f718c9 100755 --- a/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_test_dds.pl +++ b/CIAO/connectors/dds4ccm/examples/Hello/descriptors/run_test_dds.pl @@ -6,19 +6,23 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{'ACE_ROOT'}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; $TAO_ROOT = "$ENV{'TAO_ROOT'}"; $DAnCE = "$ENV{'DANCE_ROOT'}"; +$tg_sender = PerlACE::TestTarget::create_target (1) || die "Create target for EM failed\n"; +$tg_receiver = PerlACE::TestTarget::create_target (1) || die "Create target for EM failed\n"; + + print "Start receiver\n"; -$R = new PerlACE::Process ("$CIAO_ROOT/connectors/dds4ccm/examples/Hello/DDS_Receiver/DDS_receiver", ""); +$R = $tg_receiver->CreateProcess ("$CIAO_ROOT/connectors/dds4ccm/examples/Hello/DDS_Receiver/DDS_receiver", ""); $R->Spawn(); print "Start sender\n"; -$S = new PerlACE::Process ("$CIAO_ROOT/connectors/dds4ccm/examples/Hello/DDS_Sender/DDS_Sender", +$S = $tg_sender->CreateProcess ("$CIAO_ROOT/connectors/dds4ccm/examples/Hello/DDS_Sender/DDS_Sender", "-i 10000 -t -s \"Hello, World\""); -$S->SpawnWaitKill (30); +$S->SpawnWaitKill ($tg_sender->ProcessStartWaitInterval ()); $R->Kill (); exit 0; |