summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-10-26 04:20:52 +0000
committerdengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-10-26 04:20:52 +0000
commitd14694751aed983f826a6a32b9124f4d9f01069f (patch)
tree877dd73d625ef9face0f3989a5bd7b751e46891c
parent8193d7d6e3178127a572a8850a52e328192b3f46 (diff)
downloadATCD-EC_integration_03.tar.gz
Modified to send and receive valuetype data.EC_integration_03
-rw-r--r--TAO/orbsvcs/examples/RtEC/MCast/Consumer.cpp17
-rw-r--r--TAO/orbsvcs/examples/RtEC/MCast/RtEC_MCast.mpc3
-rw-r--r--TAO/orbsvcs/examples/RtEC/MCast/Supplier.cpp7
-rw-r--r--TAO/orbsvcs/examples/RtEC/MCast/Test.idl11
4 files changed, 38 insertions, 0 deletions
diff --git a/TAO/orbsvcs/examples/RtEC/MCast/Consumer.cpp b/TAO/orbsvcs/examples/RtEC/MCast/Consumer.cpp
index b85abca57ee..0dad294cfd0 100644
--- a/TAO/orbsvcs/examples/RtEC/MCast/Consumer.cpp
+++ b/TAO/orbsvcs/examples/RtEC/MCast/Consumer.cpp
@@ -4,6 +4,8 @@
#include "orbsvcs/RtecEventChannelAdminS.h"
#include "orbsvcs/Event_Service_Constants.h"
+#include "TestC.h"
+
ACE_RCSID (EC_Examples,
Consumer,
"$Id$")
@@ -88,6 +90,21 @@ Consumer::push (const RtecEventComm::EventSet& events
}
this->event_count_ += events.length ();
+
+ for (size_t i = 0; i < events.length (); ++i)
+ {
+ ValueTypeData * test_data = 0;
+ if (events[i].data.any_value >>= test_data)
+ {
+ ACE_ERROR ((LM_ERROR, "Consumer (%P|%t): Received a message: %s\n",
+ test_data->data ()));
+ }
+ else
+ {
+ ACE_ERROR ((LM_ERROR, "Consumer (%P|%t): failed to extract valuetype data\n"));
+ }
+ }
+
if (this->event_count_ % 100 == 0)
{
ACE_DEBUG ((LM_DEBUG,
diff --git a/TAO/orbsvcs/examples/RtEC/MCast/RtEC_MCast.mpc b/TAO/orbsvcs/examples/RtEC/MCast/RtEC_MCast.mpc
index ebe69a8ddbc..f1bcd3bc85a 100644
--- a/TAO/orbsvcs/examples/RtEC/MCast/RtEC_MCast.mpc
+++ b/TAO/orbsvcs/examples/RtEC/MCast/RtEC_MCast.mpc
@@ -2,4 +2,7 @@
// $Id$
project : orbsvcsexe, rtevent_serv, rtsched {
+ IDL_Files {
+ Test.idl
+ }
}
diff --git a/TAO/orbsvcs/examples/RtEC/MCast/Supplier.cpp b/TAO/orbsvcs/examples/RtEC/MCast/Supplier.cpp
index f835dcb6daa..b077fdf1cbd 100644
--- a/TAO/orbsvcs/examples/RtEC/MCast/Supplier.cpp
+++ b/TAO/orbsvcs/examples/RtEC/MCast/Supplier.cpp
@@ -4,6 +4,8 @@
#include "orbsvcs/RtecEventChannelAdminS.h"
#include "orbsvcs/Event_Service_Constants.h"
+#include "TestC.h"
+
ACE_RCSID (EC_Examples,
Supplier,
"$Id$")
@@ -77,6 +79,11 @@ Supplier::perform_push (ACE_ENV_SINGLE_ARG_DECL)
// Avoid loops throught the event channel federations
event[0].header.ttl = 1;
+ OBV_ValueTypeData * test_data;
+ ACE_NEW (test_data, OBV_ValueTypeData ());
+ test_data->data ("This is a test message");
+ event[0].data.any_value <<= test_data;
+
this->proxy_->push (event ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
diff --git a/TAO/orbsvcs/examples/RtEC/MCast/Test.idl b/TAO/orbsvcs/examples/RtEC/MCast/Test.idl
new file mode 100644
index 00000000000..fc7e50d4fd2
--- /dev/null
+++ b/TAO/orbsvcs/examples/RtEC/MCast/Test.idl
@@ -0,0 +1,11 @@
+//$Id$:
+
+#ifndef TAO_RTEC_MCAST_TEST_IDL
+#define TAO_RTEC_MCAST_TEST_IDL
+
+valuetype ValueTypeData
+{
+ public string data;
+};
+
+#endif /* TAO_RTEC_MCAST_TEST_IDL */