summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-12-26 06:49:59 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-12-26 06:49:59 +0000
commit2b8154096bbc803712441f6fb7008318404d9c5a (patch)
tree04bf86752fb554217ff2f6e6a31a70c570e75dab
parent902033831247789f0e4b3ba93ec6aea5b07ec557 (diff)
downloadATCD-2b8154096bbc803712441f6fb7008318404d9c5a.tar.gz
ChangeLogTag:Tue Dec 25 22:48:32 2001 Carlos O'Ryan <coryan@uci.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a73
-rw-r--r--TAO/orbsvcs/examples/RtEC/MCast/MCast.cpp1
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Protocol.h75
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.cpp582
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.h164
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.inl8
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp5
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp436
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h148
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.i14
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Group_Scheduling.cpp33
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Group_Scheduling.h58
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Group_Scheduling.inl7
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Null_Scheduling.cpp22
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Null_Scheduling.h21
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp51
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.h6
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.cpp57
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.h13
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp2
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Sched_Factory.cpp8
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Scheduling_Strategy.h15
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Supplier_Filter.h11
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.cpp36
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.h6
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Type_Filter.cpp35
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Type_Filter.h5
-rw-r--r--TAO/orbsvcs/orbsvcs/Makefile.RTEvent4
-rw-r--r--TAO/orbsvcs/tests/EC_Basic/EC_Basic.cpp1162
-rw-r--r--TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsp96
-rw-r--r--TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsw29
-rw-r--r--TAO/orbsvcs/tests/EC_Basic/EC_Basic.h357
-rw-r--r--TAO/orbsvcs/tests/EC_Basic/EC_Basic.i15
-rw-r--r--TAO/orbsvcs/tests/EC_Basic/Makefile422
-rw-r--r--TAO/orbsvcs/tests/EC_Basic/Makefile.bor34
-rw-r--r--TAO/orbsvcs/tests/EC_Basic/README12
-rwxr-xr-xTAO/orbsvcs/tests/EC_Basic/run_test.pl20
-rw-r--r--TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h1
-rw-r--r--TAO/orbsvcs/tests/Event/Basic/BCast.cpp1
-rw-r--r--TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp1033
-rw-r--r--TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsp104
-rw-r--r--TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsw29
-rw-r--r--TAO/orbsvcs/tests/Event_Latency/Event_Latency.h299
-rw-r--r--TAO/orbsvcs/tests/Event_Latency/Makefile342
-rw-r--r--TAO/orbsvcs/tests/Event_Latency/Makefile.bor30
-rwxr-xr-xTAO/orbsvcs/tests/Event_Latency/run_test.pl60
-rwxr-xr-xTAO/orbsvcs/tests/Event_Latency/run_tests.sh76
-rw-r--r--TAO/orbsvcs/tests/Makefile2
-rw-r--r--TAO/orbsvcs/tests/Makefile.am2
-rw-r--r--TAO/orbsvcs/tests/Makefile.bor2
50 files changed, 1183 insertions, 4841 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 15b5e6de76a..a229648ab79 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,76 @@
+Tue Dec 25 22:48:32 2001 Carlos O'Ryan <coryan@uci.edu>
+
+ * orbsvcs/orbsvcs/Event/ECG_UDP_Protocol.h:
+ * orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h:
+ * orbsvcs/orbsvcs/Event/EC_Gateway_UDP.i:
+ * orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp:
+ * orbsvcs/orbsvcs/Event/ECG_UDP_Sender.h:
+ * orbsvcs/orbsvcs/Event/ECG_UDP_Sender.inl:
+ * orbsvcs/orbsvcs/Event/ECG_UDP_Sender.cpp:
+ Move the EC_UDP_Sender class to its own file.
+ Change the class to keep event sets in a single UDP packets.
+
+ * orbsvcs/orbsvcs/Event/EC_Scheduling_Strategy.h:
+ * orbsvcs/orbsvcs/Event/EC_Null_Scheduling.h:
+ * orbsvcs/orbsvcs/Event/EC_Null_Scheduling.cpp:
+ * orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.h:
+ * orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.cpp:
+ Change the responsabilities of this class, now it controls how
+ the events are group. For example, events of the same priority
+ should be sent in the same event set. This also allowed us to
+ save a lock in the criticial path.
+
+ * orbsvcs/orbsvcs/Event/EC_Group_Scheduling.h:
+ * orbsvcs/orbsvcs/Event/EC_Group_Scheduling.inl:
+ * orbsvcs/orbsvcs/Event/EC_Group_Scheduling.cpp:
+ Add new scheduling strategy to keep grouped events together.
+
+ * orbsvcs/orbsvcs/Event/EC_Type_Filter.h:
+ * orbsvcs/orbsvcs/Event/EC_Type_Filter.cpp:
+ Change class to keep event sets together.
+
+ * orbsvcs/orbsvcs/Event/EC_Supplier_Filter.h:
+ * orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.h:
+ * orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp:
+ * orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.h:
+ * orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.cpp:
+ Change the TAO_EC_Supplier_Filter class to receive already
+ scheduled events from the scheduling strategy.
+
+ * orbsvcs/orbsvcs/Makefile.RTEvent:
+ * orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp:
+ * orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp:
+ * orbsvcs/orbsvcs/Event/EC_Sched_Factory.cpp:
+ Change the supporting clases to use the new supplier strategy
+ interface.
+
+ * orbsvcs/tests/EC_Mcast/EC_Mcast.h:
+ * orbsvcs/tests/Event/Basic/BCast.cpp:
+ * orbsvcs/examples/RtEC/MCast/MCast.cpp:
+ Use the new header file for TAO_EC_UDP_Sender
+
+ * orbsvcs/tests/Makefile:
+ * orbsvcs/tests/Makefile.am:
+ * orbsvcs/tests/Makefile.bor:
+ * orbsvcs/tests/EC_Basic/EC_Basic.cpp:
+ * orbsvcs/tests/EC_Basic/EC_Basic.dsp:
+ * orbsvcs/tests/EC_Basic/EC_Basic.dsw:
+ * orbsvcs/tests/EC_Basic/EC_Basic.h:
+ * orbsvcs/tests/EC_Basic/EC_Basic.i:
+ * orbsvcs/tests/EC_Basic/Makefile:
+ * orbsvcs/tests/EC_Basic/Makefile.bor:
+ * orbsvcs/tests/EC_Basic/README:
+ * orbsvcs/tests/EC_Basic/run_test.pl:
+ * orbsvcs/tests/Event_Latency/Event_Latency.cpp:
+ * orbsvcs/tests/Event_Latency/Event_Latency.dsp:
+ * orbsvcs/tests/Event_Latency/Event_Latency.dsw:
+ * orbsvcs/tests/Event_Latency/Event_Latency.h:
+ * orbsvcs/tests/Event_Latency/Makefile:
+ * orbsvcs/tests/Event_Latency/Makefile.bor:
+ * orbsvcs/tests/Event_Latency/run_test.pl:
+ * orbsvcs/tests/Event_Latency/run_tests.sh:
+ Removed obsolete tests.
+
Tue Dec 25 22:58:48 2001 Balachandran Natarajan <bala@cs.wustl.edu>
* performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.h: Fixed
diff --git a/TAO/orbsvcs/examples/RtEC/MCast/MCast.cpp b/TAO/orbsvcs/examples/RtEC/MCast/MCast.cpp
index 3e1348e7544..d55b4e5d6ad 100644
--- a/TAO/orbsvcs/examples/RtEC/MCast/MCast.cpp
+++ b/TAO/orbsvcs/examples/RtEC/MCast/MCast.cpp
@@ -9,6 +9,7 @@
#include "orbsvcs/Event/EC_Default_Factory.h"
#include "orbsvcs/Event/EC_Gateway_UDP.h"
#include "orbsvcs/Event/ECG_Mcast_EH.h"
+#include "orbsvcs/Event/ECG_UDP_Sender.h"
#include "tao/ORB_Core.h"
#include "ace/Get_Opt.h"
diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Protocol.h b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Protocol.h
new file mode 100644
index 00000000000..c249fc4cbca
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Protocol.h
@@ -0,0 +1,75 @@
+/* -*- C++ -*- */
+/**
+ * @file ECG_UDP_Protocol.h
+ *
+ * @brief Document the protocol to federate multiple Real-time Event
+ * Channels via UDP.
+ *
+ * $Id$
+ *
+ * @author Carlos O'Ryan <coryan@uci.edu>
+ *
+ * http://doc.ece.uci.edu/~coryan/EC/index.html
+ *
+ */
+#ifndef TAO_ECG_UDP_PROTOCOL_H
+#define TAO_ECG_UDP_PROTOCOL_H
+#include "ace/pre.h"
+
+#include "ace/config-all.h"
+
+/**
+ * @class TAO_ECG_UDP_Protocol
+ *
+ * @brief Define the protocol parameters to federate TAO's Real-time
+ * Event Service via UDP.
+ *
+ * <H2>MESSAGE FORMAT</H2>
+ * The messages header are encapsulated using CDR, with the
+ * following format:
+ *
+ * <CODE>
+ * struct Header {
+ * octet byte_order_flags;<BR>
+ * // bit 0 represents the byte order as in GIOP 1.1<BR>
+ * // bit 1 is set if this is the last fragment<BR>
+ * unsigned long request_id;<BR>
+ * // The request ID, protocols must not send two requests with<BR>
+ * // the same ID, protocols can be distinguished using recvfrom..<BR>
+ * unsigned long request_size;<BR>
+ * // The size of this request, this can be used to pre-allocate<BR>
+ * // the request buffer.<BR>
+ * unsgined long fragment_size;<BR>
+ * // The size of this fragment, excluding the header...<BR>
+ * unsigned long fragment_offset;<BR>
+ * // Where does this fragment fit in the complete message...<BR>
+ * unsigned long fragment_id;<BR>
+ * // The ID of this fragment...<BR>
+ * unsigned long fragment_count;<BR>
+ * // The total number of fragments to expect in this request<BR>
+ *<BR>
+ * // @todo This could be eliminated if efficient reassembly<BR>
+ * // could be implemented without it.<BR>
+ * octet padding[4];<BR>
+ *<BR>
+ * // Ensures the header ends at an 8-byte boundary.<BR>
+ * }; // size (in CDR stream) = 32<BR>
+ *
+ */
+class TAO_RTEvent_Export TAO_ECG_UDP_Protocol
+{
+public:
+ enum {
+ ECG_HEADER_SIZE = 32,
+ ECG_MIN_MTU = 32 + 8,
+ ECG_MAX_MTU = 65536, // Really optimistic...
+ ECG_DEFAULT_MTU = 1024
+ };
+};
+
+#if defined(__ACE_INLINE__)
+#include "ECG_UDP_Protocol.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* TAO_ECG_UDP_PROTOCOL_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.cpp
new file mode 100644
index 00000000000..33a372afecc
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.cpp
@@ -0,0 +1,582 @@
+/**
+ * @file ECG_UDP_Sender.cpp
+ *
+ * $Id$
+ *
+ * @author Carlos O'Ryan <coryan@uci.edu>
+ *
+ * http://doc.ece.uci.edu/~coryan/EC/index.html
+ *
+ */
+
+#include "orbsvcs/Event/ECG_UDP_Sender.h"
+#include "orbsvcs/Event/ECG_UDP_Protocol.h"
+#include "orbsvcs/Event/EC_Gateway_UDP.h"
+
+#include "ace/Unbounded_Set.h"
+#include "ace/Hash_Map_Manager.h"
+
+#if !defined(__ACE_INLINE__)
+#include "ECG_UDP_Sender.inl"
+#endif /* __ACE_INLINE__ */
+
+ACE_RCSID(Event, ECG_UDP_Sender, "$Id$")
+
+ACE_TEMPLATE_SPECIALIZATION
+class ACE_Equal_To<RtecUDPAdmin::UDP_Addr>
+{
+public:
+ inline int operator () (const RtecUDPAdmin::UDP_Addr &lhs,
+ const RtecUDPAdmin::UDP_Addr &rhs) const
+ {
+ return lhs.ipaddr == rhs.ipaddr
+ && lhs.port == rhs.port;
+ }
+};
+
+ACE_TEMPLATE_SPECIALIZATION
+class ACE_Hash<RtecUDPAdmin::UDP_Addr>
+{
+public:
+ inline u_long operator () (const RtecUDPAdmin::UDP_Addr &x) const
+ {
+ return (x.ipaddr << 16) | x.port;
+ }
+};
+
+TAO_ECG_UDP_Sender::TAO_ECG_UDP_Sender (void)
+ : mtu_ (TAO_ECG_UDP_Protocol::ECG_DEFAULT_MTU)
+{
+}
+
+int
+TAO_ECG_UDP_Sender::get_local_addr (ACE_INET_Addr& addr)
+{
+ if (this->endpoint_ == 0)
+ return -1;
+ return this->endpoint_->dgram ().get_local_addr (addr);
+}
+
+void
+TAO_ECG_UDP_Sender::init (RtecEventChannelAdmin::EventChannel_ptr lcl_ec,
+ RtecUDPAdmin::AddrServer_ptr addr_server,
+ TAO_ECG_UDP_Out_Endpoint* endpoint
+ TAO_ENV_ARG_DECL_NOT_USED)
+{
+ this->lcl_ec_ =
+ RtecEventChannelAdmin::EventChannel::_duplicate (lcl_ec);
+
+ this->addr_server_ =
+ RtecUDPAdmin::AddrServer::_duplicate (addr_server);
+
+ this->endpoint_ = endpoint;
+}
+
+int
+TAO_ECG_UDP_Sender::mtu (CORBA::ULong new_mtu)
+{
+ if (new_mtu < TAO_ECG_UDP_Protocol::ECG_MIN_MTU
+ || new_mtu >= TAO_ECG_UDP_Protocol::ECG_MAX_MTU)
+ return -1;
+ this->mtu_ = new_mtu;
+ return 0;
+}
+
+void
+TAO_ECG_UDP_Sender::shutdown (TAO_ENV_SINGLE_ARG_DECL)
+{
+ this->close (TAO_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+ this->lcl_ec_ = RtecEventChannelAdmin::EventChannel::_nil ();
+}
+
+void
+TAO_ECG_UDP_Sender::open (RtecEventChannelAdmin::ConsumerQOS& sub
+ TAO_ENV_ARG_DECL)
+{
+ // ACE_DEBUG ((LM_DEBUG, "ECG (%t) Open gateway\n"));
+ if (CORBA::is_nil (this->lcl_ec_.in ()))
+ return;
+
+ if (!CORBA::is_nil (this->supplier_proxy_.in ()))
+ this->close (TAO_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (sub.dependencies.length () == 0)
+ return;
+
+ //ACE_DEBUG ((LM_DEBUG, "ECG (%t) Gateway/Supplier "));
+ //ACE_SupplierQOS_Factory::debug (pub);
+
+ RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin =
+ this->lcl_ec_->for_consumers (TAO_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->supplier_proxy_ =
+ consumer_admin->obtain_push_supplier (TAO_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ RtecEventComm::PushConsumer_var consumer_ref =
+ this->_this (TAO_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ //ACE_DEBUG ((LM_DEBUG, "ECG (%t) Gateway/Consumer "));
+ //ACE_ConsumerQOS_Factory::debug (sub);
+
+ this->supplier_proxy_->connect_push_consumer (consumer_ref.in (),
+ sub
+ TAO_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_ECG_UDP_Sender::close (TAO_ENV_SINGLE_ARG_DECL)
+{
+ // ACE_DEBUG ((LM_DEBUG, "ECG (%t) Closing gateway\n"));
+ if (CORBA::is_nil (this->supplier_proxy_.in ()))
+ return;
+
+ this->supplier_proxy_->disconnect_push_supplier (TAO_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->supplier_proxy_ =
+ RtecEventChannelAdmin::ProxyPushSupplier::_nil ();
+
+ PortableServer::POA_var poa =
+ this->_default_POA (TAO_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+ PortableServer::ObjectId_var id =
+ poa->servant_to_id (this TAO_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ poa->deactivate_object (id.in () TAO_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+}
+
+void
+TAO_ECG_UDP_Sender::disconnect_push_consumer (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "ECG (%t): Supplier-consumer received "
+ "disconnect from channel.\n"));
+}
+
+void
+TAO_ECG_UDP_Sender::push (const RtecEventComm::EventSet &events
+ TAO_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // ACE_DEBUG ((LM_DEBUG, "ECG_UDP_Sender::push - \n"));
+
+ if (events.length () == 0)
+ {
+ // ACE_DEBUG ((LM_DEBUG, "no events\n"));
+ return;
+ }
+
+ // ACE_DEBUG ((LM_DEBUG, "%d event(s) - ", events.length ()));
+
+ if (events.length () == 1)
+ {
+ // Optimize for the common case: no sense in trying to build
+ // complex data structures to discover all the multicast groups
+ // in this case. Because it is also the most common case we
+ // treat it specially...
+ const RtecEventComm::Event& e = events[0];
+
+ RtecEventComm::EventHeader header = e.header;
+ // To avoid loops we keep a TTL field on the events and skip the
+ // events with TTL <= 0
+ if (header.ttl <= 0)
+ return;
+
+ RtecUDPAdmin::UDP_Addr udp_addr;
+ this->addr_server_->get_addr (header, udp_addr
+ TAO_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->send_event (udp_addr, e
+ TAO_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ // That's it, no need to continue...
+ return;
+ }
+
+ typedef ACE_Unbounded_Set<CORBA::ULong> Index_Set;
+ typedef ACE_Hash_Map_Manager<RtecUDPAdmin::UDP_Addr,Index_Set,ACE_Null_Mutex> Destination_Map;
+
+ Destination_Map destination_map;
+ for (CORBA::ULong i = 0; i != events.length (); ++i)
+ {
+ // To avoid loops we keep a TTL field on the events and skip the
+ // events with TTL <= 0
+ if (events[i].header.ttl <= 0)
+ continue;
+
+ const RtecEventComm::Event& e = events[i];
+
+ // Grab the right mcast group for this event...
+ RtecUDPAdmin::UDP_Addr udp_addr;
+ this->addr_server_->get_addr (e.header, udp_addr
+ TAO_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ Destination_Map::ENTRY *entry;
+ if (destination_map.find (udp_addr, entry) == -1)
+ {
+ Index_Set empty;
+ (void) destination_map.bind (udp_addr, empty);
+ (void) destination_map.find (udp_addr, entry);
+ }
+ entry->int_id_.insert (i);
+ }
+
+
+ for (Destination_Map::ITERATOR j = destination_map.begin ();
+ j != destination_map.end ();
+ ++j)
+ {
+ ACE_TRY
+ {
+ Index_Set &index_set = (*j).int_id_;
+ CORBA::ULong length = index_set.size ();
+
+ TAO_OutputCDR cdr;
+ cdr.write_ulong (length);
+ for (Index_Set::iterator k = index_set.begin ();
+ k != index_set.end ();
+ ++k)
+ {
+ this->marshal_one_event (events[(*k)], cdr
+ TAO_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ this->send_cdr_stream ((*j).ext_id_, cdr
+ TAO_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ // Ignore exceptions raised while trying on one address,
+ // gives the other addresses a chance to succeed
+ // @@ TODO Log the error....
+ }
+ ACE_ENDTRY;
+ }
+}
+
+void
+TAO_ECG_UDP_Sender::marshal_one_event (const RtecEventComm::Event& e,
+ TAO_OutputCDR &cdr
+ TAO_ENV_ARG_DECL)
+{
+ // We need to modify the TTL field, but copying the entire event
+ // would be wasteful; instead we create a new header and only
+ // modify the header portion.
+ RtecEventComm::EventHeader header = e.header;
+ header.ttl--;
+
+ if (!(cdr << header)
+ || !(cdr << e.data))
+ ACE_THROW (CORBA::MARSHAL ());
+}
+
+void
+TAO_ECG_UDP_Sender::send_event (const RtecUDPAdmin::UDP_Addr& udp_addr,
+ const RtecEventComm::Event& e
+ TAO_ENV_ARG_DECL)
+{
+ // This is the CDR stream used to marshal the event...
+ TAO_OutputCDR cdr;
+
+ // Marshal as if it was a sequence of one element, notice how we
+ // marshal a modified version of the header, but the payload is
+ // marshal without any extra copies.
+ cdr.write_ulong (1);
+
+ this->marshal_one_event (e, cdr TAO_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ this->send_cdr_stream (udp_addr, cdr
+ TAO_ENV_ARG_PARAMETER);
+}
+
+void
+TAO_ECG_UDP_Sender::send_cdr_stream (const RtecUDPAdmin::UDP_Addr& udp_addr,
+ TAO_OutputCDR &cdr
+ TAO_ENV_ARG_DECL)
+{
+ // @@ TODO precompute this when the MTU changes...
+ CORBA::ULong max_fragment_payload = this->mtu () -
+ TAO_ECG_UDP_Protocol::ECG_HEADER_SIZE;
+ // ACE_ASSERT (max_fragment_payload != 0);
+
+#if defined (ACE_HAS_BROKEN_DGRAM_SENDV)
+ const int TAO_WRITEV_MAX = IOV_MAX - 1;
+#else
+ const int TAO_WRITEV_MAX = IOV_MAX;
+#endif /* ACE_HAS_BROKEN_DGRAM_SENDV */
+ iovec iov[TAO_WRITEV_MAX];
+
+ CORBA::ULong total_length;
+ CORBA::ULong fragment_count =
+ this->compute_fragment_count (cdr.begin (),
+ cdr.end (),
+ TAO_WRITEV_MAX,
+ max_fragment_payload,
+ total_length);
+
+ CORBA::ULong request_id = this->endpoint_->next_request_id ();
+
+ // Reserve the first iovec for the header...
+ int iovcnt = 1;
+ CORBA::ULong fragment_id = 0;
+ CORBA::ULong fragment_offset = 0;
+ CORBA::ULong fragment_size = 0;
+ for (const ACE_Message_Block* b = cdr.begin ();
+ b != cdr.end ();
+ b = b->cont ())
+ {
+ CORBA::ULong l = b->length ();
+
+ char* rd_ptr = b->rd_ptr ();
+
+ iov[iovcnt].iov_base = rd_ptr;
+ iov[iovcnt].iov_len = l;
+ fragment_size += l;
+ iovcnt++;
+ while (fragment_size > max_fragment_payload)
+ {
+ // This fragment is full, we have to send it...
+
+ // First adjust the last iov entry:
+ CORBA::ULong last_mb_length =
+ max_fragment_payload - (fragment_size - l);
+ iov[iovcnt - 1].iov_len = last_mb_length;
+
+ this->send_fragment (udp_addr,
+ request_id,
+ total_length,
+ max_fragment_payload,
+ fragment_offset,
+ fragment_id,
+ fragment_count,
+ iov,
+ iovcnt
+ TAO_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ fragment_id++;
+ fragment_offset += max_fragment_payload;
+
+ // Reset, but don't forget that the last Message_Block
+ // may need to be sent in multiple fragments..
+ l -= last_mb_length;
+ rd_ptr += last_mb_length;
+ iov[1].iov_base = rd_ptr;
+ iov[1].iov_len = l;
+ fragment_size = l;
+ iovcnt = 2;
+ }
+ if (fragment_size == max_fragment_payload)
+ {
+ // We filled a fragment, but this time it was filled
+ // exactly, the treatment is a little different from the
+ // loop above...
+ this->send_fragment (udp_addr,
+ request_id,
+ total_length,
+ max_fragment_payload,
+ fragment_offset,
+ fragment_id,
+ fragment_count,
+ iov,
+ iovcnt
+ TAO_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ fragment_id++;
+ fragment_offset += max_fragment_payload;
+
+ iovcnt = 1;
+ fragment_size = 0;
+ }
+ if (iovcnt == TAO_WRITEV_MAX)
+ {
+ // Now we ran out of space in the iovec, we must send a
+ // fragment to work around that....
+ this->send_fragment (udp_addr,
+ request_id,
+ total_length,
+ fragment_size,
+ fragment_offset,
+ fragment_id,
+ fragment_count,
+ iov,
+ iovcnt
+ TAO_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ fragment_id++;
+ fragment_offset += fragment_size;
+
+ iovcnt = 1;
+ fragment_size = 0;
+ }
+ }
+ // There is something left in the iovvec that we must send
+ // also...
+ if (iovcnt != 1)
+ {
+ // Now we ran out of space in the iovec, we must send a
+ // fragment to work around that....
+ this->send_fragment (udp_addr,
+ request_id,
+ total_length,
+ fragment_size,
+ fragment_offset,
+ fragment_id,
+ fragment_count,
+ iov,
+ iovcnt
+ TAO_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ fragment_id++;
+ fragment_offset += fragment_size;
+
+ // reset, not needed here...
+ // iovcnt = 1;
+ // fragment_size = 0;
+ }
+ // ACE_ASSERT (total_length == fragment_offset);
+ // ACE_ASSERT (fragment_id == fragment_count);
+}
+
+void
+TAO_ECG_UDP_Sender::send_fragment (const RtecUDPAdmin::UDP_Addr& udp_addr,
+ CORBA::ULong request_id,
+ CORBA::ULong request_size,
+ CORBA::ULong fragment_size,
+ CORBA::ULong fragment_offset,
+ CORBA::ULong fragment_id,
+ CORBA::ULong fragment_count,
+ iovec iov[],
+ int iovcnt
+ TAO_ENV_ARG_DECL)
+{
+ CORBA::ULong header[TAO_ECG_UDP_Protocol::ECG_HEADER_SIZE
+ / sizeof(CORBA::ULong)
+ + ACE_CDR::MAX_ALIGNMENT];
+ char* buf = ACE_reinterpret_cast(char*,header);
+ TAO_OutputCDR cdr (buf, sizeof(header));
+ cdr.write_boolean (TAO_ENCAP_BYTE_ORDER);
+ cdr.write_ulong (request_id);
+ cdr.write_ulong (request_size);
+ cdr.write_ulong (fragment_size);
+ cdr.write_ulong (fragment_offset);
+ cdr.write_ulong (fragment_id);
+ cdr.write_ulong (fragment_count);
+ CORBA::Octet padding[4];
+ cdr.write_octet_array (padding, 4);
+
+ iov[0].iov_base = cdr.begin ()->rd_ptr ();
+ iov[0].iov_len = cdr.begin ()->length ();
+
+ ACE_INET_Addr inet_addr (udp_addr.port,
+ udp_addr.ipaddr);
+
+ // ACE_DEBUG ((LM_DEBUG,
+ // "ECG_UDP_Sender (%P|%t): msg = %d, fragment %d/%d, "
+ // "dest = (%u:%d)\n",
+ // request_id,
+ // fragment_id, fragment_count,
+ // udp_addr.ipaddr, udp_addr.port));
+
+ ssize_t n = this->endpoint_->dgram ().send (iov,
+ iovcnt,
+ inet_addr);
+ if (n == -1)
+ {
+ // @@ TODO Use a Event Channel specific exception
+ ACE_DEBUG ((LM_DEBUG,
+ "ECG_UDP (%t) send failed %p\n", ""));
+ ACE_THROW (CORBA::COMM_FAILURE ());
+ }
+ else if (n == 0)
+ {
+ // @@ TODO Use a Event Channel specific exception
+ ACE_DEBUG ((LM_DEBUG,
+ "ECG_UDP (%t) EOF on send \n"));
+ ACE_THROW (CORBA::COMM_FAILURE ());
+ }
+}
+
+
+CORBA::ULong
+TAO_ECG_UDP_Sender::compute_fragment_count (const ACE_Message_Block* begin,
+ const ACE_Message_Block* end,
+ int iov_size,
+ CORBA::ULong max_fragment_payload,
+ CORBA::ULong& total_length)
+{
+ CORBA::ULong fragment_count = 0;
+ total_length = 0;
+
+ CORBA::ULong fragment_size = 0;
+ // Reserve the first iovec for the header...
+ int iovcnt = 1;
+ for (const ACE_Message_Block* b = begin;
+ b != end;
+ b = b->cont ())
+ {
+ CORBA::ULong l = b->length ();
+ total_length += l;
+ fragment_size += l;
+ iovcnt++;
+ while (fragment_size > max_fragment_payload)
+ {
+ // Ran out of space, must create a fragment...
+ fragment_count++;
+
+ // The next iovector will contain what remains of this
+ // buffer, but also consider
+ iovcnt = 2;
+ l -= max_fragment_payload - (fragment_size - l);
+ fragment_size = l;
+ }
+ if (fragment_size == max_fragment_payload)
+ {
+ fragment_count++;
+ iovcnt = 1;
+ fragment_size = 0;
+ }
+ if (iovcnt >= iov_size)
+ {
+ // Ran out of space in the iovector....
+ fragment_count++;
+ iovcnt = 1;
+ fragment_size = 0;
+ }
+ }
+ if (iovcnt != 1)
+ {
+ // Send the remaining data in another fragment
+ fragment_count++;
+ }
+ return fragment_count;
+}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+typedef ACE_Unbounded_Set<CORBA::ULong> Index_Set;
+template class ACE_Node<CORBA::ULong>;
+template class ACE_Unbounded_Set<CORBA::ULong>;
+template class ACE_Unbounded_Set_Iterator<CORBA::ULong>;
+template class ACE_Hash_Map_Entry<RtecUDPAdmin::UDP_Addr,Index_Set>;
+template class ACE_Hash_Map_Manager<RtecUDPAdmin::UDP_Addr,Index_Set,ACE_Null_Mutex>;
+template class ACE_Hash_Map_Manager_Ex<RtecUDPAdmin::UDP_Addr, Index_Set, ACE_Hash<RtecUDPAdmin::UDP_Addr>, ACE_Equal_To<RtecUDPAdmin::UDP_Addr>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Ex<RtecUDPAdmin::UDP_Addr, Index_Set, ACE_Hash<RtecUDPAdmin::UDP_Addr>, ACE_Equal_To<RtecUDPAdmin::UDP_Addr>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Reverse_Iterator_Ex<RtecUDPAdmin::UDP_Addr, Index_Set, ACE_Hash<RtecUDPAdmin::UDP_Addr>, ACE_Equal_To<RtecUDPAdmin::UDP_Addr>, ACE_Null_Mutex>;
+template class ACE_Hash_Map_Iterator_Base_Ex<RtecUDPAdmin::UDP_Addr, Index_Set, ACE_Hash<RtecUDPAdmin::UDP_Addr>, ACE_Equal_To<RtecUDPAdmin::UDP_Addr>, ACE_Null_Mutex>;
+
+#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.h b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.h
new file mode 100644
index 00000000000..7757cbce581
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.h
@@ -0,0 +1,164 @@
+/* -*- C++ -*- */
+/**
+ * @file ECG_UDP_Sender.h
+ *
+ * $Id$
+ *
+ * @author Carlos O'Ryan <coryan@uci.edu>
+ *
+ * http://doc.ece.uci.edu/~coryan/EC/index.html
+ *
+ */
+#ifndef TAO_ECG_UDP_SENDER_H
+#define TAO_ECG_UDP_SENDER_H
+#include "ace/pre.h"
+
+#include "orbsvcs/RtecEventCommS.h"
+#include "orbsvcs/RtecEventChannelAdminC.h"
+#include "orbsvcs/RtecUDPAdminC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+class ACE_INET_Addr;
+class ACE_SOCK_Dgram;
+class ACE_Message_Block;
+class TAO_ECG_UDP_Out_Endpoint;
+
+/**
+ * @class TAO_ECG_UDP_Sender
+ *
+ * @brief Send events received from a "local" EC using UDP.
+ *
+ * This class connect as a consumer to an EventChannel
+ * and it sends the events using UDP, the UDP address can be a
+ * normal IP address or it can be a multicast group.
+ * The UDP address is obtained from a RtecUDPAdmin::AddrServer
+ * class.
+ * It marshalls the events using TAO CDR classes.
+ *
+ */
+class TAO_RTEvent_Export TAO_ECG_UDP_Sender : public POA_RtecEventComm::PushConsumer
+{
+public:
+ TAO_ECG_UDP_Sender (void);
+
+ /// Get the local endpoint used to send the events.
+ int get_local_addr (ACE_INET_Addr& addr);
+
+ /**
+ * To do its job this class requires to know the local EC it will
+ * connect to; it also requires to build an RT_Info for the local
+ * scheduler.
+ * It only keeps a copy of its SupplierProxy, used for later
+ * connection and disconnections.
+ * @todo part of the RT_Info is hardcoded, we need to make it
+ * parametric.
+ */
+ void init (RtecEventChannelAdmin::EventChannel_ptr lcl_ec,
+ RtecUDPAdmin::AddrServer_ptr addr_server,
+ TAO_ECG_UDP_Out_Endpoint *endpoint
+ TAO_ENV_ARG_DECL_WITH_DEFAULTS);
+
+ /**
+ * The sender may need to fragment the message, otherwise the
+ * network may drop the packets.
+ * Setting the MTU can fail if the value is too small (at least the
+ * header + 8 bytes must fit).
+ */
+ int mtu (CORBA::ULong mtu);
+ CORBA::ULong mtu (void) const;
+
+ /// Disconnect and shutdown the sender, no further connections will
+ /// work unless init() is called again.
+ void shutdown (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
+
+ /// Connect (or reconnect) to the EC with the given subscriptions.
+ void open (RtecEventChannelAdmin::ConsumerQOS &sub
+ TAO_ENV_ARG_DECL_WITH_DEFAULTS);
+
+ /// Disconnect from the EC, but reconnection is still possible.
+ void close (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
+
+ /// The PushConsumer methods.
+ virtual void disconnect_push_consumer (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual void push (const RtecEventComm::EventSet &events
+ TAO_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+private:
+ /// Marshal one event
+ /**
+ * The event TTL field is adjusted during marshaling, but without
+ * performing expensive copying.
+ */
+ void marshal_one_event (const RtecEventComm::Event& e,
+ TAO_OutputCDR &cdr
+ TAO_ENV_ARG_DECL);
+
+ /// Helper function to marshal and send a single event.
+ void send_event (const RtecUDPAdmin::UDP_Addr& udp_addr,
+ const RtecEventComm::Event& e
+ TAO_ENV_ARG_DECL);
+
+ /// Helper function to send one or more events once they have been
+ /// marshaled into a CDR stream.
+ void send_cdr_stream (const RtecUDPAdmin::UDP_Addr& udp_addr,
+ TAO_OutputCDR &cdr
+ TAO_ENV_ARG_DECL);
+
+ /**
+ * Send one fragment, the first entry in the iovec is used to send
+ * the header, the rest of the iovec array should contain pointers
+ * to the actual data.
+ */
+ void send_fragment (const RtecUDPAdmin::UDP_Addr& udp_addr,
+ CORBA::ULong request_id,
+ CORBA::ULong request_size,
+ CORBA::ULong fragment_size,
+ CORBA::ULong fragment_offset,
+ CORBA::ULong fragment_id,
+ CORBA::ULong fragment_count,
+ iovec iov[],
+ int iovcnt
+ TAO_ENV_ARG_DECL_WITH_DEFAULTS);
+
+ /**
+ * Count the number of fragments that will be required to send the
+ * message blocks in the range [begin,end)
+ * The maximum fragment payload (i.e. the size without the header is
+ * also required); <total_length> returns the total message size.
+ */
+ CORBA::ULong compute_fragment_count (const ACE_Message_Block* begin,
+ const ACE_Message_Block* end,
+ int iov_size,
+ CORBA::ULong max_fragment_payload,
+ CORBA::ULong& total_length);
+
+private:
+ /// The remote and the local EC, so we can reconnect when the
+ /// subscription list changes.
+ RtecEventChannelAdmin::EventChannel_var lcl_ec_;
+
+ /// We talk to the EC (as a consumer) using this proxy.
+ RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_;
+
+ /// We query this object to determine where are the events sent.
+ RtecUDPAdmin::AddrServer_var addr_server_;
+
+ /// The datagram used to sendto(), this object is *not* owned by the
+ /// UDP_Sender.
+ TAO_ECG_UDP_Out_Endpoint *endpoint_;
+
+ /// The MTU for this sender...
+ CORBA::ULong mtu_;
+};
+
+#if defined(__ACE_INLINE__)
+#include "ECG_UDP_Sender.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* TAO_ECG_UDP_SENDER_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.inl b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.inl
new file mode 100644
index 00000000000..ad574c8fd3f
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.inl
@@ -0,0 +1,8 @@
+// $Id$
+
+ACE_INLINE CORBA::ULong
+TAO_ECG_UDP_Sender::mtu (void) const
+{
+ return this->mtu_;
+}
+
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp
index cc4d0ee876b..9c1e3e902ba 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp
@@ -12,6 +12,7 @@
#include "EC_Per_Supplier_Filter.h"
#include "EC_ObserverStrategy.h"
#include "EC_Null_Scheduling.h"
+#include "EC_Group_Scheduling.h"
#include "EC_Reactive_Timeout_Generator.h"
#include "EC_Event_Channel.h"
#include "EC_Reactive_ConsumerControl.h"
@@ -185,6 +186,8 @@ TAO_EC_Default_Factory::init (int argc, char* argv[])
const char* opt = arg_shifter.get_current ();
if (ACE_OS::strcasecmp (opt, "null") == 0)
this->scheduling_ = 0;
+ else if (ACE_OS::strcasecmp (opt, "group") == 0)
+ this->scheduling_ = 1;
else
ACE_ERROR ((LM_ERROR,
"EC_Default_Factory - "
@@ -612,6 +615,8 @@ TAO_EC_Default_Factory::create_scheduling_strategy (TAO_EC_Event_Channel*)
{
if (this->scheduling_ == 0)
return new TAO_EC_Null_Scheduling;
+ else if (this->scheduling_ == 1)
+ return new TAO_EC_Group_Scheduling;
return 0;
}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp
index 6794818b7a5..7b447516105 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "orbsvcs/Event/EC_Gateway_UDP.h"
+#include "orbsvcs/Event/ECG_UDP_Protocol.h"
#include "orbsvcs/Event_Utilities.h"
#include "orbsvcs/Time_Utilities.h"
#include "ace/Reactor.h"
@@ -9,436 +10,7 @@
#include "EC_Gateway_UDP.i"
#endif /* __ACE_INLINE__ */
-ACE_RCSID (Event,
- EC_Gateway_UDP,
- "$Id$")
-
-// ****************************************************************
-
-TAO_ECG_UDP_Sender::TAO_ECG_UDP_Sender (void)
- : mtu_ (TAO_ECG_UDP_Sender::ECG_DEFAULT_MTU)
-{
-}
-
-int
-TAO_ECG_UDP_Sender::get_local_addr (ACE_INET_Addr& addr)
-{
- if (this->endpoint_ == 0)
- return -1;
- return this->dgram ().get_local_addr (addr);
-}
-
-void
-TAO_ECG_UDP_Sender::init (RtecEventChannelAdmin::EventChannel_ptr lcl_ec,
- RtecUDPAdmin::AddrServer_ptr addr_server,
- TAO_ECG_UDP_Out_Endpoint* endpoint
- TAO_ENV_ARG_DECL_NOT_USED)
-{
- this->lcl_ec_ =
- RtecEventChannelAdmin::EventChannel::_duplicate (lcl_ec);
-
- this->addr_server_ =
- RtecUDPAdmin::AddrServer::_duplicate (addr_server);
-
- this->endpoint_ = endpoint;
-}
-
-int
-TAO_ECG_UDP_Sender::mtu (CORBA::ULong new_mtu)
-{
- if (new_mtu < TAO_ECG_UDP_Sender::ECG_MIN_MTU
- || new_mtu >= TAO_ECG_UDP_Sender::ECG_MAX_MTU)
- return -1;
- this->mtu_ = new_mtu;
- return 0;
-}
-
-void
-TAO_ECG_UDP_Sender::shutdown (TAO_ENV_SINGLE_ARG_DECL)
-{
- this->close (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->lcl_ec_ = RtecEventChannelAdmin::EventChannel::_nil ();
-}
-
-void
-TAO_ECG_UDP_Sender::open (RtecEventChannelAdmin::ConsumerQOS& sub
- TAO_ENV_ARG_DECL)
-{
- // ACE_DEBUG ((LM_DEBUG, "ECG (%t) Open gateway\n"));
- if (CORBA::is_nil (this->lcl_ec_.in ()))
- return;
-
- if (!CORBA::is_nil (this->supplier_proxy_.in ()))
- this->close (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- if (sub.dependencies.length () == 0)
- return;
-
- //ACE_DEBUG ((LM_DEBUG, "ECG (%t) Gateway/Supplier "));
- //ACE_SupplierQOS_Factory::debug (pub);
-
- RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin =
- this->lcl_ec_->for_consumers (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->supplier_proxy_ =
- consumer_admin->obtain_push_supplier (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- RtecEventComm::PushConsumer_var consumer_ref =
- this->_this (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- //ACE_DEBUG ((LM_DEBUG, "ECG (%t) Gateway/Consumer "));
- //ACE_ConsumerQOS_Factory::debug (sub);
-
- this->supplier_proxy_->connect_push_consumer (consumer_ref.in (),
- sub
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_ECG_UDP_Sender::close (TAO_ENV_SINGLE_ARG_DECL)
-{
- // ACE_DEBUG ((LM_DEBUG, "ECG (%t) Closing gateway\n"));
- if (CORBA::is_nil (this->supplier_proxy_.in ()))
- return;
-
- this->supplier_proxy_->disconnect_push_supplier (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->supplier_proxy_ =
- RtecEventChannelAdmin::ProxyPushSupplier::_nil ();
-
- PortableServer::POA_var poa =
- this->_default_POA (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- PortableServer::ObjectId_var id =
- poa->servant_to_id (this TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- poa->deactivate_object (id.in () TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-TAO_ECG_UDP_Sender::disconnect_push_consumer (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG,
- "ECG (%t): Supplier-consumer received "
- "disconnect from channel.\n"));
-}
-
-void
-TAO_ECG_UDP_Sender::push (const RtecEventComm::EventSet &events
- TAO_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "ECG_UDP_Sender::push - \n"));
-
- if (events.length () == 0)
- {
- // ACE_DEBUG ((LM_DEBUG, "no events\n"));
- return;
- }
-
- // @@ TODO precompute this when the MTU changes...
- CORBA::ULong max_fragment_payload = this->mtu () -
- TAO_ECG_UDP_Sender::ECG_HEADER_SIZE;
- // ACE_ASSERT (max_fragment_payload != 0);
-
- // ACE_DEBUG ((LM_DEBUG, "%d event(s) - ", events.length ()));
-
- // Send each event in a separate message.
- // @@ TODO It is interesting to group events destined to the
- // same mcast group in a single message.
- for (u_int i = 0; i < events.length (); ++i)
- {
- // To avoid loops we keep a TTL field on the events and skip the
- // events with TTL <= 0
- if (events[i].header.ttl <= 0)
- continue;
-
- const RtecEventComm::Event& e = events[i];
-
- // We need to modify the TTL field, but copying the entire event
- // would be wasteful; instead we create a new header and only
- // modify the header portion.
- RtecEventComm::EventHeader header = e.header;
- header.ttl--;
-
- // Grab the right mcast group for this event...
- RtecUDPAdmin::UDP_Addr udp_addr;
- this->addr_server_->get_addr (header, udp_addr TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Start building the message
- TAO_OutputCDR cdr;
-
- // Marshal as if it was a sequence of one element, notice how we
- // marshal a modified version of the header, but the payload is
- // marshal without any extra copies.
- cdr.write_ulong (1);
- if (!(cdr << header)
- || !(cdr << e.data))
- ACE_THROW (CORBA::MARSHAL ());
-
-#if defined (ACE_HAS_BROKEN_DGRAM_SENDV)
- const int TAO_WRITEV_MAX = IOV_MAX - 1;
-#else
- const int TAO_WRITEV_MAX = IOV_MAX;
-#endif /* ACE_HAS_BROKEN_DGRAM_SENDV */
- iovec iov[TAO_WRITEV_MAX];
-
- CORBA::ULong total_length;
- CORBA::ULong fragment_count =
- this->compute_fragment_count (cdr.begin (),
- cdr.end (),
- TAO_WRITEV_MAX,
- max_fragment_payload,
- total_length);
-
- CORBA::ULong request_id = this->endpoint_->next_request_id ();
-
- // Reserve the first iovec for the header...
- int iovcnt = 1;
- CORBA::ULong fragment_id = 0;
- CORBA::ULong fragment_offset = 0;
- CORBA::ULong fragment_size = 0;
- for (const ACE_Message_Block* b = cdr.begin ();
- b != cdr.end ();
- b = b->cont ())
- {
- CORBA::ULong l = b->length ();
-
- char* rd_ptr = b->rd_ptr ();
-
- iov[iovcnt].iov_base = rd_ptr;
- iov[iovcnt].iov_len = l;
- fragment_size += l;
- iovcnt++;
- while (fragment_size > max_fragment_payload)
- {
- // This fragment is full, we have to send it...
-
- // First adjust the last iov entry:
- CORBA::ULong last_mb_length =
- max_fragment_payload - (fragment_size - l);
- iov[iovcnt - 1].iov_len = last_mb_length;
-
- this->send_fragment (udp_addr,
- request_id,
- total_length,
- max_fragment_payload,
- fragment_offset,
- fragment_id,
- fragment_count,
- iov,
- iovcnt
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- fragment_id++;
- fragment_offset += max_fragment_payload;
-
- // Reset, but don't forget that the last Message_Block
- // may need to be sent in multiple fragments..
- l -= last_mb_length;
- rd_ptr += last_mb_length;
- iov[1].iov_base = rd_ptr;
- iov[1].iov_len = l;
- fragment_size = l;
- iovcnt = 2;
- }
- if (fragment_size == max_fragment_payload)
- {
- // We filled a fragment, but this time it was filled
- // exactly, the treatment is a little different from the
- // loop above...
- this->send_fragment (udp_addr,
- request_id,
- total_length,
- max_fragment_payload,
- fragment_offset,
- fragment_id,
- fragment_count,
- iov,
- iovcnt
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- fragment_id++;
- fragment_offset += max_fragment_payload;
-
- iovcnt = 1;
- fragment_size = 0;
- }
- if (iovcnt == TAO_WRITEV_MAX)
- {
- // Now we ran out of space in the iovec, we must send a
- // fragment to work around that....
- this->send_fragment (udp_addr,
- request_id,
- total_length,
- fragment_size,
- fragment_offset,
- fragment_id,
- fragment_count,
- iov,
- iovcnt
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- fragment_id++;
- fragment_offset += fragment_size;
-
- iovcnt = 1;
- fragment_size = 0;
- }
- }
- // There is something left in the iovvec that we must send
- // also...
- if (iovcnt != 1)
- {
- // Now we ran out of space in the iovec, we must send a
- // fragment to work around that....
- this->send_fragment (udp_addr,
- request_id,
- total_length,
- fragment_size,
- fragment_offset,
- fragment_id,
- fragment_count,
- iov,
- iovcnt
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- fragment_id++;
- fragment_offset += fragment_size;
-
- // reset, not needed here...
- // iovcnt = 1;
- // fragment_size = 0;
- }
- // ACE_ASSERT (total_length == fragment_offset);
- // ACE_ASSERT (fragment_id == fragment_count);
-
- }
-}
-
-void
-TAO_ECG_UDP_Sender::send_fragment (const RtecUDPAdmin::UDP_Addr& udp_addr,
- CORBA::ULong request_id,
- CORBA::ULong request_size,
- CORBA::ULong fragment_size,
- CORBA::ULong fragment_offset,
- CORBA::ULong fragment_id,
- CORBA::ULong fragment_count,
- iovec iov[],
- int iovcnt
- TAO_ENV_ARG_DECL)
-{
- CORBA::ULong header[TAO_ECG_UDP_Sender::ECG_HEADER_SIZE
- / sizeof(CORBA::ULong)
- + ACE_CDR::MAX_ALIGNMENT];
- char* buf = ACE_reinterpret_cast(char*,header);
- TAO_OutputCDR cdr (buf, sizeof(header));
- cdr.write_boolean (TAO_ENCAP_BYTE_ORDER);
- cdr.write_ulong (request_id);
- cdr.write_ulong (request_size);
- cdr.write_ulong (fragment_size);
- cdr.write_ulong (fragment_offset);
- cdr.write_ulong (fragment_id);
- cdr.write_ulong (fragment_count);
- CORBA::Octet padding[4];
- cdr.write_octet_array (padding, 4);
-
- iov[0].iov_base = cdr.begin ()->rd_ptr ();
- iov[0].iov_len = cdr.begin ()->length ();
-
- ACE_INET_Addr inet_addr (udp_addr.port,
- udp_addr.ipaddr);
-
- // ACE_DEBUG ((LM_DEBUG,
- // "ECG_UDP_Sender (%P|%t): msg = %d, fragment %d/%d, "
- // "dest = (%u:%d)\n",
- // request_id,
- // fragment_id, fragment_count,
- // udp_addr.ipaddr, udp_addr.port));
-
- ssize_t n = this->dgram ().send (iov,
- iovcnt,
- inet_addr);
- if (n == -1)
- {
- // @@ TODO Use a Event Channel specific exception
- ACE_DEBUG ((LM_DEBUG,
- "ECG_UDP (%t) send failed %p\n", ""));
- ACE_THROW(CORBA::COMM_FAILURE ());
- }
- else if (n == 0)
- {
- // @@ TODO Use a Event Channel specific exception
- ACE_DEBUG ((LM_DEBUG,
- "ECG_UDP (%t) EOF on send \n"));
- ACE_THROW(CORBA::COMM_FAILURE ());
- }
-}
-
-
-CORBA::ULong
-TAO_ECG_UDP_Sender::compute_fragment_count (const ACE_Message_Block* begin,
- const ACE_Message_Block* end,
- int iov_size,
- CORBA::ULong max_fragment_payload,
- CORBA::ULong& total_length)
-{
- CORBA::ULong fragment_count = 0;
- total_length = 0;
-
- CORBA::ULong fragment_size = 0;
- // Reserve the first iovec for the header...
- int iovcnt = 1;
- for (const ACE_Message_Block* b = begin;
- b != end;
- b = b->cont ())
- {
- CORBA::ULong l = b->length ();
- total_length += l;
- fragment_size += l;
- iovcnt++;
- while (fragment_size > max_fragment_payload)
- {
- // Ran out of space, must create a fragment...
- fragment_count++;
-
- // The next iovector will contain what remains of this
- // buffer, but also consider
- iovcnt = 2;
- l -= max_fragment_payload - (fragment_size - l);
- fragment_size = l;
- }
- if (fragment_size == max_fragment_payload)
- {
- fragment_count++;
- iovcnt = 1;
- fragment_size = 0;
- }
- if (iovcnt >= iov_size)
- {
- // Ran out of space in the iovector....
- fragment_count++;
- iovcnt = 1;
- fragment_size = 0;
- }
- }
- if (iovcnt != 1)
- {
- // Send the remaining data in another fragment
- fragment_count++;
- }
- return fragment_count;
-}
+ACE_RCSID (Event, EC_Gateway_UDP, "$Id$")
// ****************************************************************
@@ -767,7 +339,7 @@ int
TAO_ECG_UDP_Receiver::handle_input (ACE_SOCK_Dgram& dgram)
{
// Use ULong so the alignment is right.
- CORBA::ULong header[TAO_ECG_UDP_Sender::ECG_HEADER_SIZE
+ CORBA::ULong header[TAO_ECG_UDP_Protocol::ECG_HEADER_SIZE
/ sizeof(CORBA::ULong)
+ ACE_CDR::MAX_ALIGNMENT];
ACE_INET_Addr from;
@@ -913,7 +485,7 @@ TAO_ECG_UDP_Receiver::handle_input (ACE_SOCK_Dgram& dgram)
// into the bit bucket and the payload into the entry's buffer:
const int iovcnt = 2;
iovec iov[iovcnt];
- char drop_header[TAO_ECG_UDP_Sender::ECG_HEADER_SIZE];
+ char drop_header[TAO_ECG_UDP_Protocol::ECG_HEADER_SIZE];
iov[0].iov_base = drop_header;
iov[0].iov_len = sizeof(drop_header);
iov[1].iov_base = entry->int_id_->fragment_buffer (fragment_offset);
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h
index 8b01c24f5ad..ca2b9d534a3 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h
@@ -69,154 +69,6 @@
class TAO_ECG_UDP_Out_Endpoint;
-/**
- * @class TAO_ECG_UDP_Sender
- *
- * @brief Send events received from a "local" EC using UDP.
- *
- * This class connect as a consumer to an EventChannel
- * and it sends the events using UDP, the UDP address can be a
- * normal IP address or it can be a multicast group.
- * The UDP address is obtained from a RtecUDPAdmin::AddrServer
- * class.
- * It marshalls the events using TAO CDR classes.
- *
- * <H2>MESSAGE FORMAT</H2>
- * The messages header are encapsulated using CDR, with the
- * following format:
- * struct Header {
- * octet byte_order_flags;
- * // bit 0 represents the byte order as in GIOP 1.1
- * // bit 1 is set if this is the last fragment
- * unsigned long request_id;
- * // The request ID, senders must not send two requests with
- * // the same ID, senders can be distinguished using recvfrom..
- * unsigned long request_size;
- * // The size of this request, this can be used to pre-allocate
- * // the request buffer.
- * unsgined long fragment_size;
- * // The size of this fragment, excluding the header...
- * unsigned long fragment_offset;
- * // Where does this fragment fit in the complete message...
- * unsigned long fragment_id;
- * // The ID of this fragment...
- * unsigned long fragment_count;
- * // The total number of fragments to expect in this request
- *
- * // @todo This could be eliminated if efficient reassembly
- * // could be implemented without it.
- * octet padding[4];
- *
- * // Ensures the header ends at an 8-byte boundary.
- * }; // size (in CDR stream) = 32
- */
-class TAO_RTEvent_Export TAO_ECG_UDP_Sender : public POA_RtecEventComm::PushConsumer
-{
-public:
- TAO_ECG_UDP_Sender (void);
-
- enum {
- ECG_HEADER_SIZE = 32,
- ECG_MIN_MTU = 32 + 8,
- ECG_MAX_MTU = 65536, // Really optimistic...
- ECG_DEFAULT_MTU = 1024
- };
-
- /// Get the local endpoint used to send the events.
- int get_local_addr (ACE_INET_Addr& addr);
-
- /**
- * To do its job this class requires to know the local EC it will
- * connect to; it also requires to build an RT_Info for the local
- * scheduler.
- * It only keeps a copy of its SupplierProxy, used for later
- * connection and disconnections.
- * @todo part of the RT_Info is hardcoded, we need to make it
- * parametric.
- */
- void init (RtecEventChannelAdmin::EventChannel_ptr lcl_ec,
- RtecUDPAdmin::AddrServer_ptr addr_server,
- TAO_ECG_UDP_Out_Endpoint *endpoint
- TAO_ENV_ARG_DECL_WITH_DEFAULTS);
-
- /**
- * The sender may need to fragment the message, otherwise the
- * network may drop the packets.
- * Setting the MTU can fail if the value is too small (at least the
- * header + 8 bytes must fit).
- */
- int mtu (CORBA::ULong mtu);
- CORBA::ULong mtu (void) const;
-
- /// Disconnect and shutdown the sender, no further connections will
- /// work unless init() is called again.
- void shutdown (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
-
- /// Connect (or reconnect) to the EC with the given subscriptions.
- void open (RtecEventChannelAdmin::ConsumerQOS &sub
- TAO_ENV_ARG_DECL_WITH_DEFAULTS);
-
- /// Disconnect from the EC, but reconnection is still possible.
- void close (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
-
- /// The PushConsumer methods.
- virtual void disconnect_push_consumer (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void push (const RtecEventComm::EventSet &events
- TAO_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- /// Return the datagram...
- ACE_SOCK_Dgram& dgram (void);
-
- /**
- * Send one fragment, the first entry in the iovec is used to send
- * the header, the rest of the iovec array should contain pointers
- * to the actual data.
- */
- void send_fragment (const RtecUDPAdmin::UDP_Addr& udp_addr,
- CORBA::ULong request_id,
- CORBA::ULong request_size,
- CORBA::ULong fragment_size,
- CORBA::ULong fragment_offset,
- CORBA::ULong fragment_id,
- CORBA::ULong fragment_count,
- iovec iov[],
- int iovcnt
- TAO_ENV_ARG_DECL_WITH_DEFAULTS);
-
- /**
- * Count the number of fragments that will be required to send the
- * message blocks in the range [begin,end)
- * The maximum fragment payload (i.e. the size without the header is
- * also required); <total_length> returns the total message size.
- */
- CORBA::ULong compute_fragment_count (const ACE_Message_Block* begin,
- const ACE_Message_Block* end,
- int iov_size,
- CORBA::ULong max_fragment_payload,
- CORBA::ULong& total_length);
-
-private:
- /// The remote and the local EC, so we can reconnect when the
- /// subscription list changes.
- RtecEventChannelAdmin::EventChannel_var lcl_ec_;
-
- /// We talk to the EC (as a consumer) using this proxy.
- RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_;
-
- /// We query this object to determine where are the events sent.
- RtecUDPAdmin::AddrServer_var addr_server_;
-
- /// The datagram used to sendto(), this object is *not* owned by the
- /// UDP_Sender.
- TAO_ECG_UDP_Out_Endpoint *endpoint_;
-
- /// The MTU for this sender...
- CORBA::ULong mtu_;
-};
-
// ****************************************************************
/**
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.i b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.i
index c9c8279f64d..ed0c0aee308 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.i
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.i
@@ -24,20 +24,6 @@ TAO_ECG_UDP_Out_Endpoint::next_request_id (void)
// ****************************************************************
-ACE_INLINE ACE_SOCK_Dgram&
-TAO_ECG_UDP_Sender::dgram (void)
-{
- return this->endpoint_->dgram ();
-}
-
-ACE_INLINE CORBA::ULong
-TAO_ECG_UDP_Sender::mtu (void) const
-{
- return this->mtu_;
-}
-
-// ****************************************************************
-
ACE_INLINE
TAO_ECG_UDP_Request_Index::TAO_ECG_UDP_Request_Index (void)
: request_id (0)
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Group_Scheduling.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Group_Scheduling.cpp
new file mode 100644
index 00000000000..40323210aa1
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Group_Scheduling.cpp
@@ -0,0 +1,33 @@
+// $Id$
+
+#include "EC_Group_Scheduling.h"
+#include "EC_QOS_Info.h"
+#include "EC_Supplier_Filter.h"
+
+#if ! defined (__ACE_INLINE__)
+#include "EC_Group_Scheduling.inl"
+#endif /* __ACE_INLINE__ */
+
+ACE_RCSID(Event, EC_Group_Scheduling, "$Id$")
+
+void
+TAO_EC_Group_Scheduling::add_proxy_supplier_dependencies (
+ TAO_EC_ProxyPushSupplier *,
+ TAO_EC_ProxyPushConsumer *
+ TAO_ENV_ARG_DECL_NOT_USED)
+{
+}
+
+void
+TAO_EC_Group_Scheduling::schedule_event (const RtecEventComm::EventSet &event,
+ TAO_EC_ProxyPushConsumer *,
+ TAO_EC_Supplier_Filter *filter
+ TAO_ENV_ARG_DECL)
+{
+ TAO_EC_QOS_Info event_info;
+ // @@ yuck...
+ filter->push_scheduled_event (ACE_const_cast (RtecEventComm::EventSet&,
+ event),
+ event_info
+ TAO_ENV_ARG_PARAMETER);
+}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Group_Scheduling.h b/TAO/orbsvcs/orbsvcs/Event/EC_Group_Scheduling.h
new file mode 100644
index 00000000000..dc2eeb96d49
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Group_Scheduling.h
@@ -0,0 +1,58 @@
+/* -*- C++ -*- */
+/**
+ * @file EC_Group_Scheduling.h
+ *
+ * $Id$
+ *
+ * @author Carlos O'Ryan (coryan@cs.wustl.edu)
+ *
+ * Based on previous work by Tim Harrison (harrison@cs.wustl.edu) and
+ * other members of the DOC group. More details can be found in:
+ *
+ * http://doc.ece.uci.edu/~coryan/EC/index.html
+ */
+
+#ifndef TAO_EC_GROUP_SCHEDULING_H
+#define TAO_EC_GROUP_SCHEDULING_H
+#include "ace/pre.h"
+
+#include "EC_Scheduling_Strategy.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+/**
+ * @class TAO_EC_Group_Scheduling
+ *
+ * @brief A scheduling strategy that preserves event groups.
+ */
+class TAO_RTEvent_Export TAO_EC_Group_Scheduling : public TAO_EC_Scheduling_Strategy
+{
+public:
+ /// Constructor.
+ TAO_EC_Group_Scheduling (void);
+
+ // Read EC_Scheduling_Strategy.h for more details
+ virtual void add_proxy_supplier_dependencies (
+ TAO_EC_ProxyPushSupplier *supplier,
+ TAO_EC_ProxyPushConsumer *consumer
+ TAO_ENV_ARG_DECL);
+ virtual void schedule_event (const RtecEventComm::EventSet &event,
+ TAO_EC_ProxyPushConsumer *consumer,
+ TAO_EC_Supplier_Filter *filter
+ TAO_ENV_ARG_DECL);
+
+private:
+ ACE_UNIMPLEMENTED_FUNC (TAO_EC_Group_Scheduling
+ (const TAO_EC_Group_Scheduling&))
+ ACE_UNIMPLEMENTED_FUNC (TAO_EC_Group_Scheduling& operator=
+ (const TAO_EC_Group_Scheduling&))
+};
+
+#if defined (__ACE_INLINE__)
+#include "EC_Group_Scheduling.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* TAO_EC_GROUP_SCHEDULING_H */
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Group_Scheduling.inl b/TAO/orbsvcs/orbsvcs/Event/EC_Group_Scheduling.inl
new file mode 100644
index 00000000000..e918d295929
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Group_Scheduling.inl
@@ -0,0 +1,7 @@
+// $Id$
+
+ACE_INLINE
+TAO_EC_Group_Scheduling::TAO_EC_Group_Scheduling (void)
+{
+}
+
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Null_Scheduling.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Null_Scheduling.cpp
index 10260d6fbc0..5c78bc13fbf 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Null_Scheduling.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Null_Scheduling.cpp
@@ -2,6 +2,7 @@
#include "EC_Null_Scheduling.h"
#include "EC_QOS_Info.h"
+#include "EC_Supplier_Filter.h"
#if ! defined (__ACE_INLINE__)
#include "EC_Null_Scheduling.i"
@@ -18,10 +19,21 @@ TAO_EC_Null_Scheduling::add_proxy_supplier_dependencies (
}
void
-TAO_EC_Null_Scheduling::init_event_qos (
- const RtecEventComm::EventHeader&,
- TAO_EC_ProxyPushConsumer *,
- TAO_EC_QOS_Info&
- TAO_ENV_ARG_DECL_NOT_USED)
+TAO_EC_Null_Scheduling::schedule_event (const RtecEventComm::EventSet &event,
+ TAO_EC_ProxyPushConsumer *,
+ TAO_EC_Supplier_Filter *filter
+ TAO_ENV_ARG_DECL)
{
+ for (CORBA::ULong j = 0; j < event.length (); ++j)
+ {
+ const RtecEventComm::Event& e = event[j];
+ RtecEventComm::Event* buffer =
+ ACE_const_cast(RtecEventComm::Event*, &e);
+ RtecEventComm::EventSet single_event (1, 1, buffer, 0);
+
+ TAO_EC_QOS_Info event_info;
+ filter->push_scheduled_event (single_event, event_info
+ TAO_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Null_Scheduling.h b/TAO/orbsvcs/orbsvcs/Event/EC_Null_Scheduling.h
index b5ee1c9b97a..afcb63f7a0b 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Null_Scheduling.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Null_Scheduling.h
@@ -17,7 +17,6 @@
#include "ace/pre.h"
#include "EC_Scheduling_Strategy.h"
-#include "event_export.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
@@ -26,10 +25,8 @@
/**
* @class TAO_EC_Null_Scheduling
*
- * @brief A scheduling strategy that uses TAO's real-time scheduler
- *
- * This implementation of the Scheduling_Strategy uses TAO's
- * real-time scheduler.
+ * @brief A scheduling strategy that separates event groups and
+ * delivers one event at a time.
*/
class TAO_RTEvent_Export TAO_EC_Null_Scheduling : public TAO_EC_Scheduling_Strategy
{
@@ -37,19 +34,15 @@ public:
/// Constructor.
TAO_EC_Null_Scheduling (void);
- /// Add all the dependencies between <supplier> and <consumer>
+ // Read EC_Scheduling_Strategy.h for more details
virtual void add_proxy_supplier_dependencies (
TAO_EC_ProxyPushSupplier *supplier,
TAO_EC_ProxyPushConsumer *consumer
TAO_ENV_ARG_DECL);
-
- /// Initializes <qos_info> based on the QoS information for
- /// <consumer> and the event header.
- virtual void init_event_qos (
- const RtecEventComm::EventHeader& header,
- TAO_EC_ProxyPushConsumer *consumer,
- TAO_EC_QOS_Info& qos_info
- TAO_ENV_ARG_DECL);
+ virtual void schedule_event (const RtecEventComm::EventSet &event,
+ TAO_EC_ProxyPushConsumer *consumer,
+ TAO_EC_Supplier_Filter *filter
+ TAO_ENV_ARG_DECL);
private:
ACE_UNIMPLEMENTED_FUNC (TAO_EC_Null_Scheduling
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp
index 05db009ac83..59415cd120a 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp
@@ -153,46 +153,25 @@ TAO_EC_Per_Supplier_Filter::shutdown (TAO_ENV_SINGLE_ARG_DECL)
}
void
-TAO_EC_Per_Supplier_Filter::push (const RtecEventComm::EventSet& event
- TAO_ENV_ARG_DECL)
+TAO_EC_Per_Supplier_Filter::push (const RtecEventComm::EventSet& event,
+ TAO_EC_ProxyPushConsumer *consumer
+ TAO_ENV_ARG_DECL)
{
TAO_EC_Scheduling_Strategy* scheduling_strategy =
this->event_channel_->scheduling_strategy ();
- for (CORBA::ULong j = 0; j < event.length (); ++j)
- {
- const RtecEventComm::Event& e = event[j];
- RtecEventComm::Event* buffer =
- ACE_const_cast(RtecEventComm::Event*, &e);
- RtecEventComm::EventSet single_event (1, 1, buffer, 0);
-
- TAO_EC_QOS_Info event_info;
- {
- // We need to grab the mutex to check that we are not
- // disconnected.
- // @@ This lock could be optimized if we knew that the
- // scheduling strategy is trivial...
- ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_);
-
- if (this->consumer_ == 0)
- return;
+ scheduling_strategy->schedule_event (event,
+ consumer,
+ this
+ TAO_ENV_ARG_PARAMETER);
+}
- scheduling_strategy->init_event_qos (e.header,
- this->consumer_,
- event_info
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // We don't use the consumer_ field anymore, just the
- // collection_, and that one is safe until we reach the
- // destructor. However, the caller has to increase the
- // reference count before calling us, i.e. we won't be destroyed
- // until push() returns.
-
- TAO_EC_Filter_Worker worker (single_event, event_info);
- this->collection_->for_each (&worker TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
+void
+TAO_EC_Per_Supplier_Filter::push_scheduled_event (RtecEventComm::EventSet &event,
+ const TAO_EC_QOS_Info &event_info
+ TAO_ENV_ARG_DECL)
+{
+ TAO_EC_Filter_Worker worker (event, event_info);
+ this->collection_->for_each (&worker TAO_ENV_ARG_PARAMETER);
}
CORBA::ULong
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.h b/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.h
index efa599a3dc4..3c66a711b74 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.h
@@ -57,8 +57,12 @@ public:
virtual void disconnected (TAO_EC_ProxyPushSupplier* supplier
TAO_ENV_ARG_DECL);
virtual void shutdown (TAO_ENV_SINGLE_ARG_DECL);
- virtual void push (const RtecEventComm::EventSet& event
+ virtual void push (const RtecEventComm::EventSet& event,
+ TAO_EC_ProxyPushConsumer *consumer
TAO_ENV_ARG_DECL_NOT_USED);
+ virtual void push_scheduled_event (RtecEventComm::EventSet &event,
+ const TAO_EC_QOS_Info &event_info
+ TAO_ENV_ARG_DECL);
virtual CORBA::ULong _decr_refcnt (void);
virtual CORBA::ULong _incr_refcnt (void);
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.cpp
index 047a20fa5c6..68aab6c9f9c 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.cpp
@@ -4,6 +4,7 @@
#include "EC_QOS_Info.h"
#include "EC_ProxyConsumer.h"
#include "EC_ProxySupplier.h"
+#include "EC_Supplier_Filter.h"
#if ! defined (__ACE_INLINE__)
#include "EC_Priority_Scheduling.i"
@@ -49,33 +50,47 @@ TAO_EC_Priority_Scheduling::add_proxy_supplier_dependencies (
}
void
-TAO_EC_Priority_Scheduling::init_event_qos (
- const RtecEventComm::EventHeader &header,
- TAO_EC_ProxyPushConsumer *consumer,
- TAO_EC_QOS_Info &qos_info
- TAO_ENV_ARG_DECL)
+TAO_EC_Priority_Scheduling::schedule_event (const RtecEventComm::EventSet &event,
+ TAO_EC_ProxyPushConsumer *consumer,
+ TAO_EC_Supplier_Filter *filter
+ TAO_ENV_ARG_DECL)
{
- const RtecEventChannelAdmin::SupplierQOS& qos =
+ RtecEventChannelAdmin::SupplierQOS qos =
consumer->publications ();
- for (CORBA::ULong i = 0; i < qos.publications.length (); ++i)
+
+ for (CORBA::ULong j = 0; j != event.length (); ++j)
{
- const RtecEventComm::EventHeader &qos_header =
- qos.publications[i].event.header;
+ const RtecEventComm::Event& e = event[j];
+ RtecEventComm::Event* buffer =
+ ACE_const_cast(RtecEventComm::Event*, &e);
+ RtecEventComm::EventSet single_event (1, 1, buffer, 0);
- if (TAO_EC_Filter::matches (header, qos_header) == 0)
- continue;
+ TAO_EC_QOS_Info qos_info;
- qos_info.rt_info = qos.publications[i].dependency_info.rt_info;
+ for (CORBA::ULong i = 0; i != qos.publications.length (); ++i)
+ {
+ const RtecEventComm::EventHeader &qos_header =
+ qos.publications[i].event.header;
- RtecScheduler::OS_Priority os_priority;
- RtecScheduler::Preemption_Subpriority_t p_subpriority;
- RtecScheduler::Preemption_Priority_t p_priority;
- this->scheduler_->priority (qos_info.rt_info,
- os_priority,
- p_subpriority,
- p_priority
- TAO_ENV_ARG_PARAMETER);
+ if (TAO_EC_Filter::matches (e.header, qos_header) == 0)
+ continue;
+
+ qos_info.rt_info = qos.publications[i].dependency_info.rt_info;
+
+ RtecScheduler::OS_Priority os_priority;
+ RtecScheduler::Preemption_Subpriority_t p_subpriority;
+ RtecScheduler::Preemption_Priority_t p_priority;
+ this->scheduler_->priority (qos_info.rt_info,
+ os_priority,
+ p_subpriority,
+ p_priority
+ TAO_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ qos_info.preemption_priority = p_priority;
+ }
+
+ filter->push_scheduled_event (single_event, qos_info
+ TAO_ENV_ARG_PARAMETER);
ACE_CHECK;
- qos_info.preemption_priority = p_priority;
}
}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.h b/TAO/orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.h
index 4a3acc9369d..1bce35148a8 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.h
@@ -42,19 +42,14 @@ public:
/// Destructor
virtual ~TAO_EC_Priority_Scheduling (void);
- /// Add all the dependencies between <supplier> and <consumer>
virtual void add_proxy_supplier_dependencies (
TAO_EC_ProxyPushSupplier *supplier,
TAO_EC_ProxyPushConsumer *consumer
TAO_ENV_ARG_DECL);
-
- /// Initializes <qos_info> based on the QoS information for
- /// <consumer> and the event header.
- virtual void init_event_qos (
- const RtecEventComm::EventHeader& header,
- TAO_EC_ProxyPushConsumer *consumer,
- TAO_EC_QOS_Info& qos_info
- TAO_ENV_ARG_DECL);
+ virtual void schedule_event (const RtecEventComm::EventSet &event,
+ TAO_EC_ProxyPushConsumer *consumer,
+ TAO_EC_Supplier_Filter *filter
+ TAO_ENV_ARG_DECL);
private:
ACE_UNIMPLEMENTED_FUNC (TAO_EC_Priority_Scheduling
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp
index d8ab620c32b..e8ac866557a 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxyConsumer.cpp
@@ -328,7 +328,7 @@ TAO_EC_ProxyPushConsumer::push (const RtecEventComm::EventSet& event
// No need to keep the lock, the filter_ class is supposed to be
// thread safe....
- ace_mon.filter->push (event TAO_ENV_ARG_PARAMETER);
+ ace_mon.filter->push (event, this TAO_ENV_ARG_PARAMETER);
ACE_CHECK;
}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Factory.cpp
index c5d6001a101..b07adb15751 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Factory.cpp
@@ -132,10 +132,14 @@ TAO_EC_Sched_Factory::init (int argc, char* argv[])
{
this->scheduling_ = 0;
}
- else if (ACE_OS::strcasecmp (opt, "priority") == 0)
+ else if (ACE_OS::strcasecmp (opt, "group") == 0)
{
this->scheduling_ = 1;
}
+ else if (ACE_OS::strcasecmp (opt, "priority") == 0)
+ {
+ this->scheduling_ = 2;
+ }
else
{
ACE_ERROR ((LM_ERROR,
@@ -195,7 +199,7 @@ TAO_EC_Sched_Factory::create_timeout_generator (TAO_EC_Event_Channel *ec)
TAO_EC_Scheduling_Strategy*
TAO_EC_Sched_Factory::create_scheduling_strategy (TAO_EC_Event_Channel* ec)
{
- if (this->scheduling_ == 1)
+ if (this->scheduling_ == 2)
{
CORBA::Object_var tmp = ec->scheduler ();
RtecScheduler::Scheduler_var scheduler =
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Scheduling_Strategy.h b/TAO/orbsvcs/orbsvcs/Event/EC_Scheduling_Strategy.h
index c48249cfa81..9c9714884d2 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Scheduling_Strategy.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Scheduling_Strategy.h
@@ -25,6 +25,7 @@
class TAO_EC_ProxyPushConsumer;
class TAO_EC_ProxyPushSupplier;
+class TAO_EC_Supplier_Filter;
class TAO_EC_QOS_Info;
/**
@@ -50,13 +51,12 @@ public:
TAO_EC_ProxyPushConsumer *consumer
TAO_ENV_ARG_DECL) = 0;
- /// Initializes <qos_info> based on the QoS information for
- /// <consumer> and the event header.
- virtual void init_event_qos (
- const RtecEventComm::EventHeader& header,
- TAO_EC_ProxyPushConsumer *consumer,
- TAO_EC_QOS_Info& qos_info
- TAO_ENV_ARG_DECL) = 0;
+ /// Schedule an event set and deliver them to the filter in the
+ /// desired order and grouping.
+ virtual void schedule_event (const RtecEventComm::EventSet &event,
+ TAO_EC_ProxyPushConsumer *consumer,
+ TAO_EC_Supplier_Filter *filter
+ TAO_ENV_ARG_DECL) = 0;
};
@@ -66,3 +66,4 @@ public:
#include "ace/post.h"
#endif /* TAO_EC_SCHEDULING_STRATEGY_H */
+\
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Supplier_Filter.h b/TAO/orbsvcs/orbsvcs/Event/EC_Supplier_Filter.h
index 5f91240be13..890f916d85d 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Supplier_Filter.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Supplier_Filter.h
@@ -101,8 +101,15 @@ public:
/// The ProxyPushConsumer delegates on this class to actually send
/// the event.
- virtual void push (const RtecEventComm::EventSet &event
- TAO_ENV_ARG_DECL_NOT_USED) = 0;
+ virtual void push (const RtecEventComm::EventSet &event,
+ TAO_EC_ProxyPushConsumer *consumer
+ TAO_ENV_ARG_DECL) = 0;
+
+ /// Events are first scheduled by the TAO_EC_Scheduling_Strategy,
+ /// and then pushed through this class again.
+ virtual void push_scheduled_event (RtecEventComm::EventSet &event,
+ const TAO_EC_QOS_Info &event_info
+ TAO_ENV_ARG_DECL) = 0;
/// Increment and decrement the reference count, locking must be
/// provided by the user.
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.cpp
index 53fb0cb99cf..f4182620759 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.cpp
@@ -5,6 +5,7 @@
#include "EC_ConsumerAdmin.h"
#include "EC_ProxySupplier.h"
#include "EC_QOS_Info.h"
+#include "EC_Scheduling_Strategy.h"
#include "EC_ProxyConsumer.h" // @@ MSVC 6 bug
#if ! defined (__ACE_INLINE__)
@@ -55,25 +56,26 @@ TAO_EC_Trivial_Supplier_Filter::shutdown (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
}
void
-TAO_EC_Trivial_Supplier_Filter::push (const RtecEventComm::EventSet& event
+TAO_EC_Trivial_Supplier_Filter::push (const RtecEventComm::EventSet& event,
+ TAO_EC_ProxyPushConsumer *consumer
TAO_ENV_ARG_DECL)
{
- TAO_EC_ConsumerAdmin* consumer_admin =
- this->event_channel_->consumer_admin ();
-
- for (CORBA::ULong j = 0; j < event.length (); ++j)
- {
- const RtecEventComm::Event& e = event[j];
- RtecEventComm::Event* buffer =
- ACE_const_cast(RtecEventComm::Event*, &e);
- RtecEventComm::EventSet single_event (1, 1, buffer, 0);
-
- TAO_EC_QOS_Info qos_info;
-
- TAO_EC_Filter_Worker worker (single_event, qos_info);
- consumer_admin->for_each (&worker TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
+ TAO_EC_Scheduling_Strategy* scheduling_strategy =
+ this->event_channel_->scheduling_strategy ();
+ scheduling_strategy->schedule_event (event,
+ consumer,
+ this
+ TAO_ENV_ARG_PARAMETER);
+}
+
+void
+TAO_EC_Trivial_Supplier_Filter::push_scheduled_event (RtecEventComm::EventSet &event,
+ const TAO_EC_QOS_Info &event_info
+ TAO_ENV_ARG_DECL)
+{
+ TAO_EC_Filter_Worker worker (event, event_info);
+ this->event_channel_->consumer_admin ()->for_each (&worker
+ TAO_ENV_ARG_PARAMETER);
}
CORBA::ULong
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.h b/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.h
index d1cc5818e4c..b39fe982298 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.h
@@ -54,8 +54,12 @@ public:
virtual void disconnected (TAO_EC_ProxyPushSupplier* supplier
TAO_ENV_ARG_DECL);
virtual void shutdown (TAO_ENV_SINGLE_ARG_DECL);
- virtual void push (const RtecEventComm::EventSet& event
+ virtual void push (const RtecEventComm::EventSet& event,
+ TAO_EC_ProxyPushConsumer *consumer
TAO_ENV_ARG_DECL_NOT_USED);
+ virtual void push_scheduled_event (RtecEventComm::EventSet &event,
+ const TAO_EC_QOS_Info &event_info
+ TAO_ENV_ARG_DECL);
virtual CORBA::ULong _decr_refcnt (void);
virtual CORBA::ULong _incr_refcnt (void);
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Type_Filter.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Type_Filter.cpp
index cdda4fefccd..5ea4a8cd2b2 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Type_Filter.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Type_Filter.cpp
@@ -18,9 +18,8 @@ TAO_EC_Type_Filter::filter (const RtecEventComm::EventSet& event,
TAO_EC_QOS_Info& qos_info
TAO_ENV_ARG_DECL)
{
- // @@ It this the right way to do this?
if (event.length () != 1)
- return 0;
+ return this->filter_set (event, qos_info TAO_ENV_ARG_PARAMETER);
if (this->can_match (event[0].header))
{
@@ -36,9 +35,8 @@ TAO_EC_Type_Filter::filter_nocopy (RtecEventComm::EventSet& event,
TAO_EC_QOS_Info& qos_info
TAO_ENV_ARG_DECL)
{
- // @@ It this the right way to do this?
if (event.length () != 1)
- return 0;
+ return this->filter_set (event, qos_info TAO_ENV_ARG_PARAMETER);
if (this->can_match (event[0].header))
{
@@ -122,3 +120,32 @@ TAO_EC_Type_Filter::add_dependencies (
{
return this->can_match (header);
}
+
+int
+TAO_EC_Type_Filter::filter_set (const RtecEventComm::EventSet& event,
+ TAO_EC_QOS_Info& qos_info
+ TAO_ENV_ARG_DECL)
+{
+ CORBA::ULong maximum = event.length ();
+ if (event.maximum () == 0)
+ return 0;
+
+ RtecEventComm::EventSet matched (maximum);
+ CORBA::ULong next_slot = 0;
+ for (CORBA::ULong i = 0; i != maximum; ++i)
+ {
+ if (!this->can_match (event[i].header))
+ continue;
+ matched.length (next_slot + 1);
+ matched[next_slot] = event[i];
+ next_slot++;
+ }
+ if (matched.length () == 0)
+ return 0;
+
+ this->push (matched, qos_info TAO_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ return 1;
+}
+
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Type_Filter.h b/TAO/orbsvcs/orbsvcs/Event/EC_Type_Filter.h
index 70e0434fc83..9780fab0fd6 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Type_Filter.h
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Type_Filter.h
@@ -64,6 +64,11 @@ private:
ACE_UNIMPLEMENTED_FUNC (TAO_EC_Type_Filter& operator=
(const TAO_EC_Type_Filter&))
+ /// Filter an EventSet that contains more than one event.
+ int filter_set (const RtecEventComm::EventSet& event,
+ TAO_EC_QOS_Info& qos_info
+ TAO_ENV_ARG_DECL);
+
private:
/// Encapsulate the type/source that we must match.
RtecEventComm::EventHeader header_;
diff --git a/TAO/orbsvcs/orbsvcs/Makefile.RTEvent b/TAO/orbsvcs/orbsvcs/Makefile.RTEvent
index d21f65fc4bb..f3f6ac4d30d 100644
--- a/TAO/orbsvcs/orbsvcs/Makefile.RTEvent
+++ b/TAO/orbsvcs/orbsvcs/Makefile.RTEvent
@@ -71,6 +71,7 @@ CPP_SRCS += \
Event/EC_Dispatching_Task \
Event/EC_Scheduling_Strategy \
Event/EC_Null_Scheduling \
+ Event/EC_Group_Scheduling \
Event/EC_ConsumerControl \
Event/EC_SupplierControl \
Event/EC_Reactive_ConsumerControl \
@@ -86,7 +87,8 @@ CPP_SRCS += \
Event/EC_Gateway \
Event/EC_Gateway_UDP \
Event/ECG_Mcast_EH \
- Event/EC_UDP_Admin \
+ Event/ECG_UDP_Sender \
+ Event/EC_UDP_Admin
IDL_SRC = \
$(addsuffix S.cpp, $(IDL_FILES)) \
diff --git a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.cpp b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.cpp
deleted file mode 100644
index 38e9df2019e..00000000000
--- a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.cpp
+++ /dev/null
@@ -1,1162 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/Auto_Ptr.h"
-#include "ace/Sched_Params.h"
-
-#include "orbsvcs/Event_Utilities.h"
-#include "orbsvcs/Event_Service_Constants.h"
-#include "orbsvcs/Time_Utilities.h"
-#include "orbsvcs/RtecEventChannelAdminC.h"
-#include "orbsvcs/Sched/Config_Scheduler.h"
-#include "orbsvcs/Runtime_Scheduler.h"
-#include "orbsvcs/Event/Event_Channel.h"
-#include "orbsvcs/Event/Module_Factory.h"
-#include "EC_Basic.h"
-
-#if !defined (__ACE_INLINE__)
-#include "EC_Basic.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(EC_Basic, EC_Basic, "$Id$")
-
-// ****************************************************************
-
-int
-main (int argc, char *argv [])
-{
- ECB_Driver driver;
- return driver.run (argc, argv);
-}
-
-// ****************************************************************
-
-ECB_Driver::ECB_Driver (void)
- : pid_filename_ (0)
-{
-}
-
-int
-ECB_Driver::run (int argc, char* argv[])
-{
- TAO_ENV_DECLARE_NEW_ENV;
- ACE_TRY
- {
- this->orb_ =
- CORBA::ORB_init (argc,
- argv,
- ""
- TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- this->orb_->resolve_initial_references ("RootPOA"
- TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ()
- TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (this->parse_args (argc, argv))
- return 1;
-
- ACE_DEBUG ((LM_DEBUG,
- "EC_Basic: Execution parameters:\n"
- " pid file name = <%s>\n",
- this->pid_filename_ ? this->pid_filename_ : "nil"));
-
- if (this->pid_filename_ != 0)
- {
- FILE *pid = ACE_OS::fopen (this->pid_filename_,
- "w");
- if (pid != 0)
- {
- ACE_OS::fprintf (pid,
- "%ld\n",
- ACE_static_cast (long, ACE_OS::getpid ()));
- ACE_OS::fclose (pid);
- }
- }
-
- ACE_Config_Scheduler scheduler_impl;
- RtecScheduler::Scheduler_var scheduler =
- scheduler_impl._this (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::String_var str =
- this->orb_->object_to_string (scheduler.in ()
- TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG,
- "EC_Basic: The (local) scheduler IOR is <%s>\n",
- str.in ()));
-
- // Create the EventService implementation, but don't start its
- // internal threads.
- TAO_Reactive_Module_Factory module_factory;
- ACE_EventChannel ec_impl (scheduler.in (),
- 0,
- ACE_DEFAULT_EVENT_CHANNEL_TYPE,
- &module_factory);
-
- // Register Event_Service with the Naming Service.
- RtecEventChannelAdmin::EventChannel_var ec =
- ec_impl._this (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- str = this->orb_->object_to_string (ec.in ()
- TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "EC_Basic: The (local) EC IOR is <%s>\n",
- str.in ()));
-
- poa_manager->activate (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RtecEventChannelAdmin::EventChannel_var local_ec =
- ec_impl._this (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ec_impl.activate ();
-
- ACE_DEBUG ((LM_DEBUG,
- "EC_Basic: local EC objref ready\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "EC_Basic: start supplier_id_test\n"));
-
- ECB_SupplierID_Test supplier_id_test;
- supplier_id_test.run (this->orb_.in (),
- local_ec.in (),
- scheduler.in ()
- TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (supplier_id_test.dump_results () != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "EC_Basic: supplier_id test failed\n"),
- -1);
- ACE_DEBUG ((LM_DEBUG,
- "EC_Basic: end supplier_id_test\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "EC_Basic: start correlation_test\n"));
-
- ECB_Correlation_Test correlation_test;
- correlation_test.run (this->orb_.in (),
- local_ec.in (),
- scheduler.in ()
- TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (correlation_test.dump_results () != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "EC_Basic: correlation test failed\n"),
- -1);
- ACE_DEBUG ((LM_DEBUG,
- "EC_Basic: end correlation_test\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "EC_Basic: shutdown the EC\n"));
- ec_impl.shutdown ();
- }
- ACE_CATCH (CORBA::SystemException, sys_ex)
- {
- ACE_PRINT_EXCEPTION (sys_ex, "SYS_EX");
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "NON SYS EX");
- }
- ACE_ENDTRY;
- return 0;
-}
-
-// ****************************************************************
-
-int
-ECB_Driver::parse_args (int argc, char *argv [])
-{
- ACE_Get_Opt get_opt (argc, argv, "p:");
- int opt;
-
- while ((opt = get_opt ()) != EOF)
- {
- switch (opt)
- {
- case 'p':
- this->pid_filename_ = get_opt.optarg;
- break;
- case '?':
- default:
- ACE_DEBUG ((LM_DEBUG,
- "Usage: %s "
- "[ORB options] "
- "-p <pid file name> "
- "\n",
- argv[0]));
- return -1;
- }
- }
-
- return 0;
-}
-
-// ****************************************************************
-
-ECB_Test::~ECB_Test (void)
-{
-}
-
-// ****************************************************************
-
-ECB_Consumer::ECB_Consumer (ECB_Test *test,
- int consumer_id)
- : test_ (test),
- consumer_id_ (consumer_id)
-{
-}
-
-void
-ECB_Consumer::open (const char* name,
- RtecEventChannelAdmin::EventChannel_ptr ec,
- RtecScheduler::Scheduler_ptr scheduler
- TAO_ENV_ARG_DECL)
-{
- this->rt_info_ =
- scheduler->create (name TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // The worst case execution time is far less than 2
- // milliseconds, but that is a safe estimate....
- ACE_Time_Value tv (0, 2000);
- TimeBase::TimeT time;
- ORBSVCS_Time::Time_Value_to_TimeT (time, tv);
- scheduler->set (this->rt_info_,
- RtecScheduler::VERY_HIGH_CRITICALITY,
- time, time, time,
- 0,
- RtecScheduler::VERY_LOW_IMPORTANCE,
- time,
- 0,
- RtecScheduler::OPERATION
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // = Connect as a consumer.
- this->consumer_admin_ = ec->for_consumers (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-ECB_Consumer::connect (const RtecEventChannelAdmin::ConsumerQOS& qos
- TAO_ENV_ARG_DECL)
-{
- if (CORBA::is_nil (this->consumer_admin_.in ()))
- return;
-
- RtecEventComm::PushConsumer_var objref = this->_this (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->supplier_proxy_ =
- this->consumer_admin_->obtain_push_supplier (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->supplier_proxy_->connect_push_consumer (objref.in (),
- qos
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-ECB_Consumer::disconnect (TAO_ENV_SINGLE_ARG_DECL)
-{
- if (CORBA::is_nil (this->supplier_proxy_.in ())
- || CORBA::is_nil (this->consumer_admin_.in ()))
- return;
-
- RtecEventChannelAdmin::ProxyPushSupplier_var tmp =
- this->supplier_proxy_._retn ();
- tmp->disconnect_push_supplier (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-ECB_Consumer::close (TAO_ENV_SINGLE_ARG_DECL)
-{
- this->disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->consumer_admin_ =
- RtecEventChannelAdmin::ConsumerAdmin::_nil ();
-}
-
-void
-ECB_Consumer::push (const RtecEventComm::EventSet& events
- TAO_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->test_->push (this->consumer_id_,
- events
- TAO_ENV_ARG_PARAMETER);
-}
-
-void
-ECB_Consumer::disconnect_push_consumer (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
-
-// ****************************************************************
-
-ECB_Supplier::ECB_Supplier (ECB_Test *test,
- int supplier_id)
- : test_ (test),
- supplier_id_ (supplier_id)
-{
-}
-
-void
-ECB_Supplier::open (const char* name,
- RtecEventChannelAdmin::EventChannel_ptr ec,
- RtecScheduler::Scheduler_ptr scheduler
- TAO_ENV_ARG_DECL)
-{
- this->rt_info_ =
- scheduler->create (name TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // The execution times are set to reasonable values, but actually
- // they are changed on the real execution, i.e. we lie to the
- // scheduler to obtain right priorities; but we don't care if the
- // set is schedulable.
- ACE_Time_Value tv (0, 2000);
- TimeBase::TimeT time;
- ORBSVCS_Time::Time_Value_to_TimeT (time, tv);
-
- scheduler->set (this->rt_info_,
- RtecScheduler::VERY_HIGH_CRITICALITY,
- time, time, time,
- 0,
- RtecScheduler::VERY_LOW_IMPORTANCE,
- time,
- 1,
- RtecScheduler::OPERATION
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // = Connect as a consumer.
- this->supplier_admin_ = ec->for_suppliers (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-ECB_Supplier::connect (const RtecEventChannelAdmin::SupplierQOS& qos
- TAO_ENV_ARG_DECL)
-{
- if (CORBA::is_nil (this->supplier_admin_.in ()))
- return;
-
- this->consumer_proxy_ =
- this->supplier_admin_->obtain_push_consumer (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- RtecEventComm::PushSupplier_var objref = this->_this (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->consumer_proxy_->connect_push_supplier (objref.in (),
- qos
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-ECB_Supplier::disconnect (TAO_ENV_SINGLE_ARG_DECL)
-{
- if (CORBA::is_nil (this->consumer_proxy_.in ()))
- return;
-
- RtecEventChannelAdmin::ProxyPushConsumer_var proxy =
- this->consumer_proxy_._retn ();
- proxy->disconnect_push_consumer (TAO_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-ECB_Supplier::close (TAO_ENV_SINGLE_ARG_DECL)
-{
- if (CORBA::is_nil (this->supplier_admin_.in ()))
- return;
-
- this->supplier_admin_ =
- RtecEventChannelAdmin::SupplierAdmin::_nil ();
-
- this->disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-ECB_Supplier::send_event (RtecEventComm::EventSet& events
- TAO_ENV_ARG_DECL)
-{
- // RtecEventComm::EventSet copy = events;
- this->consumer_proxy_->push (events TAO_ENV_ARG_PARAMETER);
-}
-
-void
-ECB_Supplier::disconnect_push_supplier (TAO_ENV_SINGLE_ARG_DECL_NOT_USED /* TAO_ENV_SINGLE_ARG_PARAMETER */)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // this->supplier_proxy_->disconnect_push_supplier (TAO_ENV_SINGLE_ARG_PARAMETER);
-}
-
-// ****************************************************************
-
-ECB_SupplierID_Test::ECB_SupplierID_Test (void)
- : consumer0_ (this, 0),
- consumer1_ (this, 1),
- supplier0_ (this, 0),
- supplier1_ (this, 1)
-{
-}
-
-void
-ECB_SupplierID_Test::run (CORBA::ORB_ptr orb,
- RtecEventChannelAdmin::EventChannel_ptr ec,
- RtecScheduler::Scheduler_ptr scheduler
- TAO_ENV_ARG_DECL)
-{
- ACE_UNUSED_ARG (orb);
-
- int i;
-
- for (i = 0; i <= ECB_SupplierID_Test::PHASE_END; ++i)
- {
- this->event_count_[i] = 0;
- this->error_count_[i] = 0;
- }
-
- // Startup
- this->consumer0_.open ("SupplierID/consumer0",
- ec,
- scheduler
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->consumer1_.open ("SupplierID/consumer1",
- ec,
- scheduler
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier0_.open ("SupplierID/supplier0",
- ec,
- scheduler
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.open ("SupplierID/supplier1",
- ec,
- scheduler
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Precompute the QoS for the consumers and suppliers.
- ACE_ConsumerQOS_Factory consumer0_qos;
- consumer0_qos.start_disjunction_group ();
- consumer0_qos.insert_source (ECB_SupplierID_Test::SUPPLIER_ID,
- this->consumer0_.rt_info ());
-
- ACE_ConsumerQOS_Factory consumer1_qos;
- consumer1_qos.start_disjunction_group ();
- consumer1_qos.insert_source (ECB_SupplierID_Test::SUPPLIER_ID,
- this->consumer1_.rt_info ());
-
- ACE_SupplierQOS_Factory supplier0_qos;
- supplier0_qos.insert (ECB_SupplierID_Test::SUPPLIER_ID,
- ACE_ES_EVENT_UNDEFINED + 1,
- this->supplier0_.rt_info (),
- 1);
-
- ACE_SupplierQOS_Factory supplier1_qos;
- supplier1_qos.insert (ECB_SupplierID_Test::SUPPLIER_ID,
- ACE_ES_EVENT_UNDEFINED + 1,
- this->supplier1_.rt_info (),
- 1);
-
- // Precompute the event set
- RtecEventComm::EventSet events (1);
- events.length (1);
-
- RtecEventComm::Event& e = events[0];
- e.header.source = ECB_SupplierID_Test::SUPPLIER_ID;
- e.header.ttl = 1;
- e.header.type = ACE_ES_EVENT_UNDEFINED + 1;
-
- ACE_hrtime_t t = ACE_OS::gethrtime ();
- ORBSVCS_Time::hrtime_to_TimeT (e.header.creation_time, t);
-
- // Start the real test.
-
- // PHASE 0, test filtering by supplier ID in the presence of
- // multiple suppliers with the same ID...
- this->phase_ = ECB_SupplierID_Test::PHASE_0;
-
- this->consumer0_.connect (consumer0_qos.get_ConsumerQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->consumer1_.connect (consumer1_qos.get_ConsumerQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->supplier0_.connect (supplier0_qos.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.connect (supplier1_qos.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i)
- {
- this->supplier0_.send_event (events TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.send_event (events TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // PHASE 1, test disconnection of a single supplier.
- this->phase_ = ECB_SupplierID_Test::PHASE_1;
- this->supplier1_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i)
- {
- this->supplier0_.send_event (events TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // PHASE 2, test reconnection of the supplier.
- this->phase_ = ECB_SupplierID_Test::PHASE_2;
- this->supplier1_.connect (supplier1_qos.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i)
- {
- this->supplier0_.send_event (events TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.send_event (events TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // PHASE 3, test disconnect of one consumer
- this->phase_ = ECB_SupplierID_Test::PHASE_3;
- this->consumer1_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i)
- {
- this->supplier0_.send_event (events TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.send_event (events TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // PHASE 4, test reconnection of one consumer
- this->phase_ = ECB_SupplierID_Test::PHASE_4;
- this->consumer1_.connect (consumer1_qos.get_ConsumerQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i)
- {
- this->supplier0_.send_event (events TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.send_event (events TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // PHASE 5, test disconnection of two consumers.
- this->phase_ = ECB_SupplierID_Test::PHASE_5;
- this->consumer0_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->consumer1_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i)
- {
- this->supplier0_.send_event (events TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.send_event (events TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // PHASE 6, test reconnection of two consumers.
- this->phase_ = ECB_SupplierID_Test::PHASE_6;
- this->consumer0_.connect (consumer0_qos.get_ConsumerQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->consumer1_.connect (consumer1_qos.get_ConsumerQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i)
- {
- this->supplier0_.send_event (events TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.send_event (events TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // PHASE 7, test disconnect/reconnect of both suppliers.
- this->phase_ = ECB_SupplierID_Test::PHASE_7;
- this->supplier0_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier0_.connect (supplier0_qos.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.connect (supplier1_qos.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i)
- {
- this->supplier0_.send_event (events TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.send_event (events TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // PHASE END, any events received after this are errors.
- this->phase_ = ECB_SupplierID_Test::PHASE_END;
-
- // Finish
- this->supplier1_.close (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier0_.close (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->consumer1_.close (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->consumer0_.close (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-int
-ECB_SupplierID_Test::dump_results (void)
-{
- static CORBA::ULong expected_count[PHASE_END]={
- 4 * ECB_SupplierID_Test::EVENTS_SENT,
- 2 * ECB_SupplierID_Test::EVENTS_SENT,
- 4 * ECB_SupplierID_Test::EVENTS_SENT,
- 2 * ECB_SupplierID_Test::EVENTS_SENT,
- 4 * ECB_SupplierID_Test::EVENTS_SENT,
- 0,
- 4 * ECB_SupplierID_Test::EVENTS_SENT,
- 4 * ECB_SupplierID_Test::EVENTS_SENT
- };
-
- int result = 0;
-
- for (int i = 0;
- i < ECB_SupplierID_Test::PHASE_END;
- ++i)
- {
- if (this->error_count_[i] != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "SupplierID_Test: Error count for phase %d "
- "is not zero\n",
- i));
- result = -1;
- }
- if (this->event_count_[i] != expected_count[i])
- {
- ACE_ERROR ((LM_ERROR,
- "SupplierID_Test: Mismatched event count in phase %d, "
- "expected %d, count is %d\n",
- i,
- expected_count[i],
- this->event_count_[i]));
- result = -1;
- }
- }
- if (this->error_count_[ECB_SupplierID_Test::PHASE_END] != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "SupplierID_Test: Events received after final phase\n"));
- result = -1;
- }
- if (result == 0)
- ACE_DEBUG ((LM_DEBUG,
- "SupplierID_Test: All phases successful\n"));
-
- return result;
-}
-
-void
-ECB_SupplierID_Test::push (int consumer_id,
- const RtecEventComm::EventSet &
- TAO_ENV_ARG_DECL_NOT_USED)
-{
- switch (this->phase_)
- {
- case ECB_SupplierID_Test::PHASE_END:
- default:
- this->error_count_[ECB_SupplierID_Test::PHASE_END]++;
- break;
-
- case ECB_SupplierID_Test::PHASE_0:
- this->event_count_[ECB_SupplierID_Test::PHASE_0]++;
- break;
-
- case ECB_SupplierID_Test::PHASE_1:
- this->event_count_[ECB_SupplierID_Test::PHASE_1]++;
- break;
-
- case ECB_SupplierID_Test::PHASE_2:
- this->event_count_[ECB_SupplierID_Test::PHASE_2]++;
- break;
-
- case ECB_SupplierID_Test::PHASE_3:
- if (consumer_id == 0)
- this->event_count_[ECB_SupplierID_Test::PHASE_3]++;
- else
- this->error_count_[ECB_SupplierID_Test::PHASE_3]++;
- break;
-
- case ECB_SupplierID_Test::PHASE_4:
- this->event_count_[ECB_SupplierID_Test::PHASE_4]++;
- break;
-
- case ECB_SupplierID_Test::PHASE_5:
- this->error_count_[ECB_SupplierID_Test::PHASE_5]++;
- break;
-
- case ECB_SupplierID_Test::PHASE_6:
- this->event_count_[ECB_SupplierID_Test::PHASE_6]++;
- break;
-
- case ECB_SupplierID_Test::PHASE_7:
- this->event_count_[ECB_SupplierID_Test::PHASE_7]++;
- break;
- }
-}
-
-// ****************************************************************
-
-ECB_Correlation_Test::ECB_Correlation_Test (void)
- : consumer_ (this, 0),
- supplier0_ (this, 0),
- supplier1_ (this, 1)
-{
-}
-
-void
-ECB_Correlation_Test::run (CORBA::ORB_ptr orb,
- RtecEventChannelAdmin::EventChannel_ptr ec,
- RtecScheduler::Scheduler_ptr scheduler
- TAO_ENV_ARG_DECL)
-{
- ACE_UNUSED_ARG (orb);
-
- int i;
-
- for (i = 0; i <= ECB_Correlation_Test::PHASE_END; ++i)
- {
- this->event_count_[i] = 0;
- this->error_count_[i] = 0;
- }
-
- // Startup
- this->consumer_.open ("Correlation/consumer",
- ec,
- scheduler
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier0_.open ("Correlation/supplier0",
- ec,
- scheduler
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.open ("Correlation/supplier1",
- ec,
- scheduler
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- // Precompute the QoS for the consumers and suppliers.
- ACE_ConsumerQOS_Factory consumer_qos;
- consumer_qos.start_conjunction_group ();
- consumer_qos.insert_type (ECB_Correlation_Test::EVENT_A,
- this->consumer_.rt_info ());
- consumer_qos.insert_type (ECB_Correlation_Test::EVENT_B,
- this->consumer_.rt_info ());
-
- ACE_SupplierQOS_Factory supplier0_qos;
- supplier0_qos.insert (ECB_Correlation_Test::SUPPLIER_ID_0,
- ECB_Correlation_Test::EVENT_A,
- this->supplier0_.rt_info (),
- 1);
- supplier0_qos.insert (ECB_Correlation_Test::SUPPLIER_ID_0,
- ECB_Correlation_Test::EVENT_B,
- this->supplier0_.rt_info (),
- 1);
-
- ACE_SupplierQOS_Factory supplier1_qos;
- supplier1_qos.insert (ECB_Correlation_Test::SUPPLIER_ID_1,
- ECB_Correlation_Test::EVENT_A,
- this->supplier1_.rt_info (),
- 1);
- supplier1_qos.insert (ECB_Correlation_Test::SUPPLIER_ID_1,
- ECB_Correlation_Test::EVENT_B,
- this->supplier1_.rt_info (),
- 1);
-
- // Precompute the events
- RtecEventComm::EventSet event_a (1);
- event_a.length (1);
- {
- RtecEventComm::Event& e = event_a[0];
- e.header.source = ECB_Correlation_Test::SUPPLIER_ID_0;
- e.header.ttl = 1;
- e.header.type = ECB_Correlation_Test::EVENT_A;
-
- ACE_hrtime_t t = ACE_OS::gethrtime ();
- ORBSVCS_Time::hrtime_to_TimeT (e.header.creation_time, t);
- }
-
- RtecEventComm::EventSet event_b (1);
- event_b.length (1);
- {
- RtecEventComm::Event& e = event_b[0];
- e.header.source = ECB_Correlation_Test::SUPPLIER_ID_0;
- e.header.ttl = 1;
- e.header.type = ECB_Correlation_Test::EVENT_B;
-
- ACE_hrtime_t t = ACE_OS::gethrtime ();
- ORBSVCS_Time::hrtime_to_TimeT (e.header.creation_time, t);
- }
-
- RtecEventComm::EventSet event_ab (2);
- event_ab.length (2);
- {
- RtecEventComm::Event& e = event_ab[0];
- e.header.source = ECB_Correlation_Test::SUPPLIER_ID_0;
- e.header.ttl = 1;
- e.header.type = ECB_Correlation_Test::EVENT_A;
-
- ACE_hrtime_t t = ACE_OS::gethrtime ();
- ORBSVCS_Time::hrtime_to_TimeT (e.header.creation_time, t);
- }
- {
- RtecEventComm::Event& e = event_ab[1];
- e.header.source = ECB_Correlation_Test::SUPPLIER_ID_0;
- e.header.ttl = 1;
- e.header.type = ECB_Correlation_Test::EVENT_B;
-
- ACE_hrtime_t t = ACE_OS::gethrtime ();
- ORBSVCS_Time::hrtime_to_TimeT (e.header.creation_time, t);
- }
-
- // Start the real test.
-
- // PHASE 0
- this->phase_ = ECB_Correlation_Test::PHASE_0;
-
- this->consumer_.connect (consumer_qos.get_ConsumerQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->supplier0_.connect (supplier0_qos.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.connect (supplier1_qos.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- for (i = 0; i < ECB_Correlation_Test::EVENTS_SENT; ++i)
- {
- this->supplier0_.send_event (event_a TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.send_event (event_b TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // PHASE 1, test disconnection of a single supplier.
- this->phase_ = ECB_Correlation_Test::PHASE_1;
- this->consumer_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier0_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->consumer_.connect (consumer_qos.get_ConsumerQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->supplier0_.connect (supplier0_qos.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.connect (supplier1_qos.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- for (i = 0; i < ECB_Correlation_Test::EVENTS_SENT; ++i)
- {
- this->supplier0_.send_event (event_ab TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.send_event (event_ab TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // PHASE 2, test reconnection of the supplier.
- this->phase_ = ECB_Correlation_Test::PHASE_2;
- this->consumer_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier0_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->consumer_.connect (consumer_qos.get_ConsumerQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->supplier0_.connect (supplier0_qos.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.connect (supplier1_qos.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- for (i = 0; i < ECB_Correlation_Test::EVENTS_SENT; ++i)
- {
- this->supplier0_.send_event (event_a TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.send_event (event_b TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier0_.send_event (event_b TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.send_event (event_a TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // PHASE 3
- this->phase_ = ECB_Correlation_Test::PHASE_3;
- this->consumer_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier0_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->consumer_.connect (consumer_qos.get_ConsumerQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->supplier0_.connect (supplier0_qos.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.connect (supplier1_qos.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- for (i = 0; i < ECB_Correlation_Test::EVENTS_SENT; ++i)
- {
- this->supplier0_.send_event (event_a TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.send_event (event_ab TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // PHASE 4
- this->phase_ = ECB_Correlation_Test::PHASE_4;
- this->consumer_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier0_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->consumer_.connect (consumer_qos.get_ConsumerQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->supplier0_.connect (supplier0_qos.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.connect (supplier1_qos.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- for (i = 0; i < ECB_Correlation_Test::EVENTS_SENT; ++i)
- {
- this->supplier0_.send_event (event_a TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.send_event (event_a TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.send_event (event_b TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // PHASE 5
- this->phase_ = ECB_Correlation_Test::PHASE_5;
- this->consumer_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier0_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->consumer_.connect (consumer_qos.get_ConsumerQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- this->supplier0_.connect (supplier0_qos.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.connect (supplier1_qos.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- for (i = 0; i < ECB_Correlation_Test::EVENTS_SENT; ++i)
- {
- this->supplier0_.send_event (event_a TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier1_.send_event (event_a TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- // PHASE END, any events received after this are errors.
- this->phase_ = ECB_Correlation_Test::PHASE_END;
-
- // Finish
- this->supplier1_.close (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->supplier0_.close (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- this->consumer_.close (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-int
-ECB_Correlation_Test::dump_results (void)
-{
- static CORBA::ULong expected_count[PHASE_END] =
- {
- 1 * ECB_Correlation_Test::EVENTS_SENT,
- 2 * ECB_Correlation_Test::EVENTS_SENT,
- 2 * ECB_Correlation_Test::EVENTS_SENT,
- 1 * ECB_Correlation_Test::EVENTS_SENT,
- 1 * ECB_Correlation_Test::EVENTS_SENT,
- 0
- };
-
- int result = 0;
-
- for (int i = 0;
- i < ECB_Correlation_Test::PHASE_END;
- ++i)
- {
- if (this->error_count_[i] != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "Correlation_Test: Error count for phase %d "
- "is not zero\n",
- i));
- result = -1;
- }
- if (this->event_count_[i] != expected_count[i])
- {
- ACE_ERROR ((LM_ERROR,
- "Correlation_Test: Mismatched event count in phase %d, "
- "expected %d, count is %d\n",
- i,
- expected_count[i],
- this->event_count_[i]));
- result = -1;
- }
- }
- if (this->error_count_[ECB_Correlation_Test::PHASE_END] != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "Correlation_Test: Events received after final phase\n"));
- result = -1;
- }
- if (result == 0)
- ACE_DEBUG ((LM_DEBUG,
- "Correlation_Test: All phases successful\n"));
-
- return result;
-}
-
-void
-ECB_Correlation_Test::push (int,
- const RtecEventComm::EventSet& events
- TAO_ENV_ARG_DECL_NOT_USED)
-{
- if (events.length () != 2)
- {
- ACE_ERROR ((LM_ERROR,
- "Correlation_Test::push - "
- "event length (%d) in phase %d\n",
- events.length (), this->phase_));
- this->error_count_[this->phase_]++;
- return;
- }
-
- // If the types do not match we have an error.
- if (!((events[0].header.type == ECB_Correlation_Test::EVENT_A
- && events[1].header.type == ECB_Correlation_Test::EVENT_B)
- || (events[0].header.type == ECB_Correlation_Test::EVENT_B
- && events[1].header.type == ECB_Correlation_Test::EVENT_A)))
- {
- ACE_ERROR ((LM_ERROR,
- "Correlation_Test::push - event type\n"));
- this->error_count_[this->phase_]++;
- return;
- }
-
- switch (this->phase_)
- {
- case ECB_Correlation_Test::PHASE_END:
- default:
- this->error_count_[ECB_Correlation_Test::PHASE_END]++;
- break;
-
- case ECB_Correlation_Test::PHASE_0:
- this->event_count_[ECB_Correlation_Test::PHASE_0]++;
- break;
-
- case ECB_Correlation_Test::PHASE_1:
- this->event_count_[ECB_Correlation_Test::PHASE_1]++;
- break;
-
- case ECB_Correlation_Test::PHASE_2:
- this->event_count_[ECB_Correlation_Test::PHASE_2]++;
- break;
-
- case ECB_Correlation_Test::PHASE_3:
- this->event_count_[ECB_Correlation_Test::PHASE_3]++;
- break;
-
- case ECB_Correlation_Test::PHASE_4:
- this->event_count_[ECB_Correlation_Test::PHASE_4]++;
- break;
-
- case ECB_Correlation_Test::PHASE_5:
- this->error_count_[ECB_Correlation_Test::PHASE_5]++;
- break;
- }
-}
-
-// ****************************************************************
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsp b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsp
deleted file mode 100644
index 233a44619a1..00000000000
--- a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsp
+++ /dev/null
@@ -1,96 +0,0 @@
-# Microsoft Developer Studio Project File - Name="EC_Basic" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=EC_Basic - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "EC_Basic.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "EC_Basic.mak" CFG="EC_Basic - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "EC_Basic - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "EC_Basic - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "EC_Basic - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 TAO.lib ace.lib TAO_PortableServer.lib TAO_CosNaming.lib TAO_RTOLDEvent.lib TAO_RTEvent.lib TAO_RTSched.lib TAO_Svc_Utils.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\..\ace"
-
-!ELSEIF "$(CFG)" == "EC_Basic - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 TAOd.lib aced.lib TAO_PortableServerd.lib TAO_CosNamingd.lib TAO_RTEventd.lib TAO_RTOLDEventd.lib TAO_RTSchedd.lib TAO_Svc_Utilsd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "EC_Basic - Win32 Release"
-# Name "EC_Basic - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\EC_Basic.cpp
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsw b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsw
deleted file mode 100644
index a9f492f94d6..00000000000
--- a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "EC_Basic"=.\EC_Basic.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.h b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.h
deleted file mode 100644
index b2d0f9b64b7..00000000000
--- a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.h
+++ /dev/null
@@ -1,357 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-//
-// ============================================================================
-//
-// = TITLE
-// A simple test for the Event Channel.
-//
-// = DESCRIPTION
-// This test exercises the basic features of the EC, such as
-// filtering, correlation, timeouts, etc.
-// The test creates a colocated EC, some suppliers, some consumers
-// and exercises each feature, one at a time.
-//
-// ============================================================================
-
-#ifndef EC_BASIC_H
-#define EC_BASIC_H
-
-#include "ace/SString.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/High_Res_Timer.h"
-#include "orbsvcs/RtecEventChannelAdminC.h"
-#include "orbsvcs/RtecEventCommS.h"
-#include "orbsvcs/Channel_Clients_T.h"
-
-class ECB_Driver
-{
- //
- // = TITLE
- // A class to control the tests.
- //
- // = DESCRIPTION
- // This class creates multiple tests and runs them in sequence,
- // providing proper environment for each one (the event channel,
- // the ORB configuration, etc.
- //
-public:
- ECB_Driver (void);
-
- int run (int argc, char* argv[]);
- // Run the test.
-
-private:
- int shutdown (TAO_ENV_SINGLE_ARG_DECL_NOT_USED);
- // Called when the main thread is about to shutdown.
-
- int parse_args (int argc, char* argv[]);
- // parse the command line arguments
-
- void dump_results (void);
- // Dump the results to the standard output.
-
-private:
- const char* pid_filename_;
- // The name of a file where the process stores its pid
-
- ACE_hrtime_t test_start_;
- ACE_hrtime_t test_stop_;
- // Measure the test elapsed time as well as mark the beginning of
- // the frames.
-
- CORBA::ORB_var orb_;
- // The ORB, so we can shut it down.
-};
-
-// ****************************************************************
-
-class ECB_Test
-{
- // = TITLE
- // The base class for all the tests.
- //
- // = DESCRIPTION
- // All the tests inherit from this class, it is used by the
- // consumer and suppliers as callbacks.
- //
-public:
- virtual ~ECB_Test (void);
- // Destructor
-
- virtual void push (int consumer_number,
- const RtecEventComm::EventSet& events
- TAO_ENV_ARG_DECL) = 0;
- // The callback from the Consumer....
-};
-
-class ECB_Consumer : public POA_RtecEventComm::PushConsumer
-{
-public:
- // = TITLE
- // The consumers for all the tests.
- //
- // = DESCRIPTION
- // To simplify each test implementation a generic consumer class
- // is provided.
- // It dispatches the events back to a Base_Test.
- //
- ECB_Consumer (ECB_Test* test,
- int consumer_id);
-
- void open (const char* name,
- RtecEventChannelAdmin::EventChannel_ptr event_channel,
- RtecScheduler::Scheduler_ptr scheduler
- TAO_ENV_ARG_DECL);
- // This method connects the consumer to the EC.
-
- void close (TAO_ENV_SINGLE_ARG_DECL);
- // Disconnect from the EC.
-
- RtecScheduler::handle_t rt_info (void) const;
- // The RT_Info for this object
-
- void connect (const RtecEventChannelAdmin::ConsumerQOS& qos
- TAO_ENV_ARG_DECL);
- void disconnect (TAO_ENV_SINGLE_ARG_DECL);
- // Disconnect from the supplier, but do not forget about it or close
- // it.
-
- // = The POA_RtecEventComm::PushComsumer methods.
- virtual void push (const RtecEventComm::EventSet& events
- TAO_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void disconnect_push_consumer (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- ECB_Test* test_;
- // To callback.
-
- int consumer_id_;
- // So we can give our identity back to the test.
-
- RtecScheduler::handle_t rt_info_;
- // The handle for our RT_Info description.
-
- RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_;
- // We talk to the EC using this proxy.
-
- RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin_;
- // We talk to the EC using this proxy.
-};
-
-class ECB_Supplier : public POA_RtecEventComm::PushSupplier
-{
-public:
- // = TITLE
- // Implement one of the consumers in this test.
- //
- ECB_Supplier (ECB_Test* test,
- int supplier_id);
- // We generate an id based on the name....
-
- void open (const char* name,
- RtecEventChannelAdmin::EventChannel_ptr event_channel,
- RtecScheduler::Scheduler_ptr scheduler
- TAO_ENV_ARG_DECL);
- // This method connects the supplier to the EC.
-
- void close (TAO_ENV_SINGLE_ARG_DECL);
- // Disconnect from the EC.
-
- RtecScheduler::handle_t rt_info (void) const;
- // The RT_Info for this object
-
- void connect (const RtecEventChannelAdmin::SupplierQOS& qos
- TAO_ENV_ARG_DECL);
- void disconnect (TAO_ENV_SINGLE_ARG_DECL);
- // Disconnect from the EC, but do not forget about it or close
- // it.
-
- void send_event (RtecEventComm::EventSet& events
- TAO_ENV_ARG_DECL);
- // Send one event, the supplier provides the SourceID
-
- // = The POA_RtecEventComm::PushSupplier methods.
- virtual void disconnect_push_supplier (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-private:
- ECB_Test* test_;
- // To callback.
-
- int supplier_id_;
- // This is NOT the supplier ID for the EC, just a number for the
-
- RtecScheduler::handle_t rt_info_;
- // The handle for our RT_Info description.
-
- RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_;
- // We talk to the EC using this proxy.
-
- RtecEventChannelAdmin::SupplierAdmin_var supplier_admin_;
- // We talk to the EC using this proxy.
-};
-
-// ****************************************************************
-
-// @@ TODO WE may need to split each test to its own file, but only
-// once the number of tests justifies that change.
-
-class ECB_SupplierID_Test : public ECB_Test
-{
- //
- // = TITLE
- // Verifies that multiple suppliers can have the same ID.
- //
- // = DESCRIPTION
- // This class creates two consumers and two suppliers, the
- // suppliers connect with the same ID, but send out different
- // events. The consumers subscribe by supplier ID.
- //
- // The test executes several phases (see the enum below).
- //
- // = TODO
- // The test could be more flexible, but functionality is more
- // important than flexiblitity.
- //
-public:
- ECB_SupplierID_Test (void);
-
- enum
- {
- PHASE_0, // Verifies filtering for two suppliers with the same ID
- PHASE_1, // Disconnect one of the suppliers
- PHASE_2, // Reconnect the supplier
- PHASE_3, // Disconnect a consumer
- PHASE_4, // Reconnect the consumer
- PHASE_5, // Disconnect both consumers
- PHASE_6, // Reconnect both consumers
- PHASE_7, // Disconnect both suppliers and reconnect them
- PHASE_END // To check that no events are received after the test ends.
- };
-
- enum
- {
- EVENTS_SENT = 10, // How many events we send on each test
- SUPPLIER_ID = 1
- };
-
- void run (CORBA::ORB_ptr orb,
- RtecEventChannelAdmin::EventChannel_ptr event_channel,
- RtecScheduler::Scheduler_ptr scheduler
- TAO_ENV_ARG_DECL);
- // Start the test.
-
- int dump_results (void);
- // Print out the results, returns -1 if an error was detected.
-
- virtual void push (int consumer_id,
- const RtecEventComm::EventSet& events
- TAO_ENV_ARG_DECL);
- // The callback from the Consumer....
-
-
-private:
- ECB_Consumer consumer0_;
- ECB_Consumer consumer1_;
- // The consumers...
-
- ECB_Supplier supplier0_;
- ECB_Supplier supplier1_;
- // The suppliers...
-
- CORBA::ULong event_count_[ECB_SupplierID_Test::PHASE_END + 1];
- // Count the correctly received events.
-
- CORBA::ULong error_count_[ECB_SupplierID_Test::PHASE_END + 1];
- // Store the number of errors for each phase.
-
- int phase_;
- // Keep track of the test we are running...
-};
-
-// ****************************************************************
-
-class ECB_Correlation_Test : public ECB_Test
-{
- //
- // = TITLE
- // Verifies that correlation works.
- //
- // = DESCRIPTION
- // This class creates one consumers and two suppliers, the
- // consumer subscribe for several event correlations.
- // The correlations are satisfied in several different ways by
- // both suppliers (see below).by:
- //
- // = TODO
- //
-public:
- ECB_Correlation_Test (void);
-
- enum
- {
- PHASE_0, // One supplier sends A the other sends B
- PHASE_1, // Both suppliers send event A and B (in a single event)
- PHASE_2, // Both suppliers alternate A and B
- PHASE_3, // One supplier sends A the other sends A and B (in a
- // single event)
- PHASE_4, // One supplier sends A the other alternates A and B
- PHASE_5, // Both suppliers send A
- PHASE_END // To check that no events are received after the test ends.
- };
-
- enum
- {
- EVENTS_SENT = 10, // How many events we send on each test
- EVENT_A = 100, // The event "A"
- EVENT_B = 200, // The event "B"
- SUPPLIER_ID_0 = 100, // The supplier ID for supplier0
- SUPPLIER_ID_1 = 200 // The supplier ID for supplier1
- };
-
- void run (CORBA::ORB_ptr orb,
- RtecEventChannelAdmin::EventChannel_ptr event_channel,
- RtecScheduler::Scheduler_ptr scheduler
- TAO_ENV_ARG_DECL);
- // Start the test.
-
- int dump_results (void);
- // Print out the results, returns -1 if an error was detected.
-
- virtual void push (int consumer_id,
- const RtecEventComm::EventSet& events
- TAO_ENV_ARG_DECL);
- // The callback from the Consumer....
-
-private:
- ECB_Consumer consumer_;
- // The consumer...
-
- ECB_Supplier supplier0_;
- ECB_Supplier supplier1_;
- // The suppliers...
-
- CORBA::ULong event_count_[ECB_Correlation_Test::PHASE_END + 1];
- // Count the correctly received events.
-
- CORBA::ULong error_count_[ECB_Correlation_Test::PHASE_END + 1];
- // Store the number of errors for each phase.
-
- int phase_;
- // Keep track of the test we are running...
-};
-
-// ****************************************************************
-
-#if defined (__ACE_INLINE__)
-#include "EC_Basic.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* EC_BASIC_H */
diff --git a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.i b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.i
deleted file mode 100644
index 1688f03c423..00000000000
--- a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.i
+++ /dev/null
@@ -1,15 +0,0 @@
-// $Id$
-
-RtecScheduler::handle_t
-ECB_Consumer::rt_info (void) const
-{
- return this->rt_info_;
-}
-
-RtecScheduler::handle_t
-ECB_Supplier::rt_info (void) const
-{
- return this->rt_info_;
-}
-
-
diff --git a/TAO/orbsvcs/tests/EC_Basic/Makefile b/TAO/orbsvcs/tests/EC_Basic/Makefile
deleted file mode 100644
index f6bde6a26dd..00000000000
--- a/TAO/orbsvcs/tests/EC_Basic/Makefile
+++ /dev/null
@@ -1,422 +0,0 @@
-# $Id$
-
-SRC = $(BIN:%=%$(VAR).cpp)
-LDLIBS= -lTAO_RTOLDEvent -lTAO_RTEvent -lTAO_RTSched -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_IORTable -lTAO_PortableServer -lTAO
-
-ifndef TAO_ROOT
- TAO_ROOT = $(ACE_ROOT)/TAO
-endif
-
-CPPFLAGS += -I$(TAO_ROOT)/orbsvcs \
- -I$(TAO_ROOT)
-
-BIN2 = EC_Basic
-
-#### If the TAO orbsvcs library wasn't built with sufficient components,
-#### don't try to build here.
-TAO_ORBSVCS := $(shell sh $(ACE_ROOT)/bin/ace_components --orbsvcs)
-ifeq (Event,$(findstring Event,$(TAO_ORBSVCS)))
- BIN = $(BIN2)
-endif # Event
-
-PSRC=EC_Basic.cpp
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(TAO_ROOT)/rules.tao.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-
-#### Local rules and variables...
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-
-.obj/EC_Basic.o .obj/EC_Basic.so .shobj/EC_Basic.o .shobj/EC_Basic.so: EC_Basic.cpp \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ace_wchar.inl \
- $(ACE_ROOT)/ace/OS_Errno.h \
- $(ACE_ROOT)/ace/OS_Export.h \
- $(ACE_ROOT)/ace/OS_Errno.inl \
- $(ACE_ROOT)/ace/OS_Dirent.h \
- $(ACE_ROOT)/ace/OS_Dirent.inl \
- $(ACE_ROOT)/ace/OS_String.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS_String.inl \
- $(ACE_ROOT)/ace/OS_Memory.h \
- $(ACE_ROOT)/ace/OS_Memory.inl \
- $(ACE_ROOT)/ace/OS_TLI.h \
- $(ACE_ROOT)/ace/OS_TLI.inl \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Flag_Manip.h \
- $(ACE_ROOT)/ace/Flag_Manip.i \
- $(ACE_ROOT)/ace/Handle_Ops.h \
- $(ACE_ROOT)/ace/Handle_Ops.i \
- $(ACE_ROOT)/ace/Lib_Find.h \
- $(ACE_ROOT)/ace/Lib_Find.i \
- $(ACE_ROOT)/ace/Init_ACE.h \
- $(ACE_ROOT)/ace/Init_ACE.i \
- $(ACE_ROOT)/ace/Sock_Connect.h \
- $(ACE_ROOT)/ace/Sock_Connect.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/String_Base.h \
- $(ACE_ROOT)/ace/String_Base_Const.h \
- $(ACE_ROOT)/ace/String_Base.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/String_Base.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \
- $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread_Adapter.h \
- $(ACE_ROOT)/ace/Base_Thread_Adapter.h \
- $(ACE_ROOT)/ace/Base_Thread_Adapter.inl \
- $(ACE_ROOT)/ace/Thread_Adapter.inl \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Malloc_Allocator.h \
- $(ACE_ROOT)/ace/Malloc_Allocator.i \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Unbounded_Set.h \
- $(ACE_ROOT)/ace/Node.h \
- $(ACE_ROOT)/ace/Node.cpp \
- $(ACE_ROOT)/ace/Unbounded_Set.inl \
- $(ACE_ROOT)/ace/Unbounded_Set.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Auto_Ptr.h \
- $(ACE_ROOT)/ace/Auto_Ptr.i \
- $(ACE_ROOT)/ace/Auto_Ptr.cpp \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Array_Base.h \
- $(ACE_ROOT)/ace/Array_Base.inl \
- $(ACE_ROOT)/ace/Array_Base.cpp \
- $(ACE_ROOT)/ace/Unbounded_Queue.h \
- $(ACE_ROOT)/ace/Unbounded_Queue.inl \
- $(ACE_ROOT)/ace/Unbounded_Queue.cpp \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/Sched_Params.h \
- $(ACE_ROOT)/ace/Sched_Params.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(TAO_ROOT)/tao/corbafwd.h \
- $(ACE_ROOT)/ace/CDR_Base.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/CDR_Base.inl \
- $(TAO_ROOT)/tao/try_macros.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(ACE_ROOT)/ace/CORBA_macros.h \
- $(TAO_ROOT)/tao/varbase.h \
- $(TAO_ROOT)/tao/TAO_Export.h \
- $(TAO_ROOT)/tao/corbafwd.i \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(ACE_ROOT)/ace/CDR_Stream.h \
- $(ACE_ROOT)/ace/CDR_Stream.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/Environment.h \
- $(TAO_ROOT)/tao/Environment.i \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Object_Proxy_Broker.h \
- $(TAO_ROOT)/tao/Object_Proxy_Impl.h \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/LocalObject.h \
- $(TAO_ROOT)/tao/LocalObject.i \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/OctetSeqC.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Managed_Types.h \
- $(TAO_ROOT)/tao/Managed_Types.i \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Sequence_T.cpp \
- $(TAO_ROOT)/tao/OctetSeqC.i \
- $(TAO_ROOT)/tao/Principal.i \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Services.h \
- $(TAO_ROOT)/tao/Services.i \
- $(TAO_ROOT)/tao/CORBA_String.h \
- $(TAO_ROOT)/tao/CORBA_String.inl \
- $(TAO_ROOT)/tao/PolicyC.h \
- $(TAO_ROOT)/tao/Encodable.h \
- $(TAO_ROOT)/tao/Remote_Object_Proxy_Impl.h \
- $(TAO_ROOT)/tao/CurrentC.h \
- $(TAO_ROOT)/tao/CurrentC.i \
- $(TAO_ROOT)/tao/PolicyC.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/BoundsC.h \
- $(TAO_ROOT)/tao/BoundsC.i \
- $(TAO_ROOT)/tao/ValueBase.h \
- $(TAO_ROOT)/tao/ValueBase.i \
- $(TAO_ROOT)/tao/ValueFactory.h \
- $(TAO_ROOT)/tao/ValueFactory.i \
- $(TAO_ROOT)/tao/DomainC.h \
- $(TAO_ROOT)/tao/DomainC.i \
- $(TAO_ROOT)/tao/WrongTransactionC.h \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/ObjectIDList.h \
- $(TAO_ROOT)/tao/ObjectIDList.i \
- $(TAO_ROOT)/tao/StringSeqC.h \
- $(TAO_ROOT)/tao/StringSeqC.i \
- $(TAO_ROOT)/tao/PortableInterceptorC.h \
- $(TAO_ROOT)/tao/DynamicC.h \
- $(TAO_ROOT)/tao/DynamicC.i \
- $(TAO_ROOT)/tao/MessagingC.h \
- $(TAO_ROOT)/tao/TimeBaseC.h \
- $(TAO_ROOT)/tao/SmartProxies/Smart_Proxies.h \
- $(TAO_ROOT)/tao/SmartProxies/smartproxies_export.h \
- $(TAO_ROOT)/tao/TAO_Singleton.h \
- $(TAO_ROOT)/tao/TAO_Singleton.inl \
- $(TAO_ROOT)/tao/TAO_Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(TAO_ROOT)/tao/TAO_Singleton_Manager.h \
- $(TAO_ROOT)/tao/TAO_Singleton_Manager.inl \
- $(TAO_ROOT)/tao/SmartProxies/Smart_Proxies.inl \
- $(TAO_ROOT)/tao/TimeBaseC.i \
- $(TAO_ROOT)/tao/IOPC.h \
- $(TAO_ROOT)/tao/IOPC.i \
- $(TAO_ROOT)/tao/PollableC.h \
- $(TAO_ROOT)/tao/PollableC.i \
- $(TAO_ROOT)/tao/MessagingC.i \
- $(TAO_ROOT)/tao/PortableInterceptorC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/event_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/svc_utils_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecDefaultEventDataC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecDefaultEventDataC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS.h \
- $(TAO_ROOT)/tao/TimeBaseS.h \
- $(TAO_ROOT)/tao/TimeBaseS_T.h \
- $(TAO_ROOT)/tao/TimeBaseS_T.i \
- $(TAO_ROOT)/tao/TimeBaseS_T.cpp \
- $(TAO_ROOT)/tao/TimeBaseS.i \
- $(TAO_ROOT)/tao/PortableServer/PortableServer.h \
- $(TAO_ROOT)/tao/PortableServer/portableserver_export.h \
- $(TAO_ROOT)/tao/PortableServer/PortableServerC.h \
- $(TAO_ROOT)/tao/PortableServer/PortableServerC.i \
- $(TAO_ROOT)/tao/PortableServer/Servant_Base.h \
- $(TAO_ROOT)/tao/Abstract_Servant_Base.h \
- $(ACE_ROOT)/ace/Atomic_Op.h \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Atomic_Op.cpp \
- $(TAO_ROOT)/tao/PortableServer/Servant_Base.i \
- $(TAO_ROOT)/tao/PortableServer/Collocated_Object.h \
- $(TAO_ROOT)/tao/PortableServer/Collocated_Object.i \
- $(TAO_ROOT)/tao/PortableServer/ThruPOA_Object_Proxy_Impl.h \
- $(TAO_ROOT)/tao/PortableServer/Direct_Object_Proxy_Impl.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS_T.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS_T.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS_T.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecBaseS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecBaseS_T.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecBaseS_T.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecBaseS_T.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/sched_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Map_Manager.cpp \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Test_and_Set.h \
- $(ACE_ROOT)/ace/Test_and_Set.i \
- $(ACE_ROOT)/ace/Test_and_Set.cpp \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/naming_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(TAO_ROOT)/tao/Timeprobe.h \
- $(ACE_ROOT)/ace/Timeprobe.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecDefaultEventDataS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecDefaultEventDataS_T.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecDefaultEventDataS_T.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecDefaultEventDataS_T.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecDefaultEventDataS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Notification_Strategy.h \
- $(ACE_ROOT)/ace/Notification_Strategy.inl \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Task_T.cpp \
- $(ACE_ROOT)/ace/Module.h \
- $(ACE_ROOT)/ace/Module.i \
- $(ACE_ROOT)/ace/Module.cpp \
- $(ACE_ROOT)/ace/Stream_Modules.h \
- $(ACE_ROOT)/ace/Stream_Modules.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/old_event_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/ReactorTask.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Fast_Reactor.h \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Select_Reactor_T.h \
- $(ACE_ROOT)/ace/Select_Reactor_Base.h \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Select_Reactor_Base.i \
- $(ACE_ROOT)/ace/Select_Reactor_T.cpp \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.cpp \
- $(ACE_ROOT)/ace/Select_Reactor_T.i \
- $(ACE_ROOT)/ace/Timer_List.h \
- $(ACE_ROOT)/ace/Timer_List_T.h \
- $(ACE_ROOT)/ace/Timer_List_T.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Manip.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Module_Factory.h \
- EC_Basic.h \
- $(ACE_ROOT)/ace/High_Res_Timer.h \
- $(ACE_ROOT)/ace/High_Res_Timer.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.cpp \
- EC_Basic.i
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/tests/EC_Basic/Makefile.bor b/TAO/orbsvcs/tests/EC_Basic/Makefile.bor
deleted file mode 100644
index e029777dbc7..00000000000
--- a/TAO/orbsvcs/tests/EC_Basic/Makefile.bor
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# $Id$
-#
-
-NAME = EC_Basic
-
-OBJFILES = \
- $(OBJDIR)\EC_Basic.obj
-
-CFLAGS = \
- $(TAO_RTOLDEVENT_CFLAGS) \
- $(TAO_RTSCHED_CFLAGS) \
- $(TAO_RTEVENT_CFLAGS) \
- $(TAO_NAMING_CFLAGS) \
- $(TAO_SVC_UTILS_CFLAGS) \
- $(TAO_IORTABLE_CFLAGS) \
- $(TAO_PORTABLESERVER_CFLAGS) \
- $(TAO_CFLAGS) \
- $(ACE_CFLAGS)
-
-LIBFILES = \
- $(TAO_RTOLDEVENT_LIB) \
- $(TAO_RTSCHED_LIB) \
- $(TAO_RTEVENT_LIB) \
- $(TAO_NAMING_LIB) \
- $(TAO_SVC_UTILS_LIB) \
- $(TAO_IORTABLE_LIB) \
- $(TAO_PORTABLESERVER_LIB) \
- $(TAO_LIB) \
- $(ACE_LIB)
-
-CPPDIR = .
-
-!include <$(ACE_ROOT)\include\makeinclude\build_exe.bor>
diff --git a/TAO/orbsvcs/tests/EC_Basic/README b/TAO/orbsvcs/tests/EC_Basic/README
deleted file mode 100644
index 18159740f60..00000000000
--- a/TAO/orbsvcs/tests/EC_Basic/README
+++ /dev/null
@@ -1,12 +0,0 @@
-# $Id$
-
-A regression test for TAO's Real-time Event Channel.
-
-This program will be used to test the basic features of the Event
-Channel. The current tests are:
-
- + SupplierID_Test: verify that several suppliers can can the
- same supplier ID.
-
- + Correlation_Test: verify that a consumer can subscribe to a
- correlation.
diff --git a/TAO/orbsvcs/tests/EC_Basic/run_test.pl b/TAO/orbsvcs/tests/EC_Basic/run_test.pl
deleted file mode 100755
index c51f890d4fc..00000000000
--- a/TAO/orbsvcs/tests/EC_Basic/run_test.pl
+++ /dev/null
@@ -1,20 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$T = new PerlACE::Process ("EC_Basic");
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- exit 1;
-}
-
-exit 0;
diff --git a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h
index b952ae65529..2deaef26ab4 100644
--- a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h
+++ b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h
@@ -59,6 +59,7 @@
#include "orbsvcs/Event/EC_Gateway_UDP.h"
#include "orbsvcs/Event/EC_UDP_Admin.h"
#include "orbsvcs/Event/ECG_Mcast_EH.h"
+#include "orbsvcs/Event/ECG_UDP_Sender.h"
class ECM_Driver;
diff --git a/TAO/orbsvcs/tests/Event/Basic/BCast.cpp b/TAO/orbsvcs/tests/Event/Basic/BCast.cpp
index 72b4e7a42ac..c5587bc8de6 100644
--- a/TAO/orbsvcs/tests/Event/Basic/BCast.cpp
+++ b/TAO/orbsvcs/tests/Event/Basic/BCast.cpp
@@ -5,6 +5,7 @@
#include "Supplier.h"
#include "orbsvcs/Event/EC_Event_Channel.h"
#include "orbsvcs/Event/EC_Gateway_UDP.h"
+#include "orbsvcs/Event/ECG_UDP_Sender.h"
#include "tao/ORB_Core.h"
#include "ace/Arg_Shifter.h"
diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp
deleted file mode 100644
index da32b0c1dcc..00000000000
--- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp
+++ /dev/null
@@ -1,1033 +0,0 @@
-// $Id$
-
-#if defined (ACE_HAS_QUANTIFY)
-# include <quantify.h>
-#endif /* ACE_HAS_QUANTIFY */
-
-#include "ace/Get_Opt.h"
-#include "ace/Sched_Params.h"
-#include "ace/Profile_Timer.h"
-
-#include "orbsvcs/Event_Utilities.h"
-#include "orbsvcs/Event_Service_Constants.h"
-#include "orbsvcs/Time_Utilities.h"
-#include "orbsvcs/RtecEventChannelAdminC.h"
-#include "orbsvcs/CosNamingC.h"
-#include "orbsvcs/Event/EC_Event_Channel.h"
-#include "orbsvcs/Event/EC_Basic_Factory.h"
-#include "Event_Latency.h"
-
-#include "tao/Timeprobe.h"
-
-ACE_RCSID(Event_Latency, Event_Latency, "$Id$")
-
-#if defined (ACE_ENABLE_TIMEPROBES)
-
-static const char *Event_Latency_Timeprobe_Description[] =
-{
- "push event to consumer",
- "start with new event in Supplier",
- "supplier starts pushing event",
- "supplier ends pushing event"
-};
-
-enum
-{
- // Timeprobe description table start key
- EVENT_LATENCY_PUSH_EVENT_TO_CONSUMER = 20000,
- EVENT_LATENCY_START_WITH_NEW_EVENT_IN_SUPPLIER,
- EVENT_LATENCY_SUPPLIER_STARTS_PUSHING_EVENT,
- EVENT_LATENCY_SUPPLIER_ENDS_PUSHING_EVENT
-};
-
-// Setup Timeprobes
-ACE_TIMEPROBE_EVENT_DESCRIPTIONS (Event_Latency_Timeprobe_Description,
- EVENT_LATENCY_PUSH_EVENT_TO_CONSUMER);
-
-#endif /* ACE_ENABLE_TIMEPROBES */
-
-static const char usage [] = "[-? |\n"
-" [-c <consumers> [1]]\n"
-" [-d directly connect all consumers/suppliers\n"
-" [-j to collect jitter statistics]\n"
-" [-m <count> of messages to send [10]]\n"
-" [-s <suppliers>, [1]]\n"
-" [-t <timeout interval>, msec [250]]]";
-
-// Configuration parameters.
-static u_int consumers = 1;
-static u_int suppliers = 1;
-static u_int total_messages = 10;
-static int measure_jitter = 0;
-static u_int timeout_interval = 250; // msec
-
-static int short_circuit_EC = 0;
-static int shutting_down = 0;
-
-// This is global to allow the Supplier to short circuit the EC
-// and talk directly to consumers. For testing only :-)
-static Latency_Consumer **consumer;
-
-// ************************************************************
-
-Latency_Consumer::Latency_Consumer (const int measure_jitter)
- : measure_jitter_ (measure_jitter),
- min_latency_ (INT_MAX),
- max_latency_ (INT_MIN),
- total_latency_ (0),
- total_pushes_ (0),
- min_to_ec_ (INT_MAX),
- max_to_ec_ (INT_MIN),
- sum_to_ec_ (0),
- min_in_ec_ (INT_MAX),
- max_in_ec_ (INT_MIN),
- sum_in_ec_ (0),
- min_from_ec_ (INT_MAX),
- max_from_ec_ (INT_MIN),
- sum_from_ec_ (0)
-{
-}
-
-int
-Latency_Consumer::open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec,
- const char *my_name)
-{
- entry_point (my_name);
- TAO_ENV_DECLARE_NEW_ENV;
- ACE_TRY
- {
- // No scheduling for this test...
- this->rt_info_ = 0;
-
- // Create the event that we're registering for.
- ACE_ConsumerQOS_Factory dependencies;
- dependencies.start_disjunction_group ();
- dependencies.insert_type (ACE_ES_EVENT_NOTIFICATION, rt_info_);
- dependencies.insert_type (ACE_ES_EVENT_SHUTDOWN, rt_info_);
-
- this->channel_admin_ =
- RtecEventChannelAdmin::EventChannel::_duplicate (ec);
-
- // = Connect as a consumer.
- this->consumer_admin_ =
- channel_admin_->for_consumers (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->suppliers_ =
- consumer_admin_->obtain_push_supplier (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RtecEventComm::PushConsumer_var objref =
- this->_this (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->suppliers_->connect_push_consumer (objref.in (),
- dependencies.get_ConsumerQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (RtecEventChannelAdmin::EventChannel::SUBSCRIPTION_ERROR, se)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Latency_Consumer::open: "
- "subscribe failed.\n"), -1);
- }
- ACE_CATCHANY
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Latency_Consumer::open: "
- "unexpected exception.\n"), -1);
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-void
-Latency_Consumer::close (TAO_ENV_SINGLE_ARG_DECL)
-{
- ACE_DEBUG ((LM_DEBUG, "(%t) %s closing down.\n",
- this->entry_point ()));
-
- this->suppliers_->disconnect_push_supplier (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::POA_var poa =
- this->_default_POA (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::ObjectId_var id =
- poa->servant_to_id (this TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- poa->deactivate_object (id.in () TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-}
-
-void
-Latency_Consumer::disconnect_push_consumer (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_DEBUG ((LM_DEBUG, "Consumer received disconnect from channel.\n"));
-}
-
-void
-Latency_Consumer::push (const RtecEventComm::EventSet &events
- TAO_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // ACE_DEBUG ((LM_DEBUG, "Latency_Consumer:push - "));
- ACE_TIMEPROBE (EVENT_LATENCY_PUSH_EVENT_TO_CONSUMER);
-
- // ACE_DEBUG ((LM_DEBUG, "%d event(s)\n", events.length ()));
- if (events.length () == 0)
- {
- return;
- }
-
-#if defined (ACE_HAS_QUANTIFY)
- // If measuring jitter, just Quantify the supplier-consumer path.
- if (measure_jitter_)
- {
- quantify_stop_recording_data ();
- }
-#endif /* ACE_HAS_QUANTIFY */
-
- for (CORBA::ULong i = 0; i < events.length (); ++i)
- {
- if (events[i].header.type == ACE_ES_EVENT_SHUTDOWN)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Latency Consumer: received shutdown event\n"));
- this->shutdown ();
- }
- else
- {
- if (measure_jitter_)
- {
- ACE_hrtime_t creation;
- ORBSVCS_Time::TimeT_to_hrtime (creation,
- events[i].header.creation_time);
-
- const ACE_hrtime_t now = ACE_OS::gethrtime ();
- const ACE_hrtime_t elapsed = now - creation;
- ACE_Time_Value latency (ACE_static_cast (long,
- elapsed / ACE_ONE_SECOND_IN_NSECS),
- ACE_static_cast (long,
- ACE_CU64_TO_CU32 (elapsed) % ACE_ONE_SECOND_IN_NSECS / 1000));
-
- if (! shutting_down)
- {
- ++total_pushes_;
- if (min_latency_ > latency) min_latency_ = latency;
- if (max_latency_ < latency) max_latency_ = latency;
- total_latency_ += latency;
- }
-
-#if !defined(TAO_LACKS_EVENT_CHANNEL_TIMESTAMPS)
- ACE_hrtime_t ec_recv;
- ORBSVCS_Time::TimeT_to_hrtime (ec_recv,
- events[i].header.ec_recv_time);
-
- ACE_hrtime_t ec_send;
- ORBSVCS_Time::TimeT_to_hrtime (ec_send,
- events[i].header.ec_send_time);
-
- const long to_ec_nsecs = ACE_CU64_TO_CU32 (ec_recv - creation);
- ACE_Time_Value to_ec (to_ec_nsecs / ACE_ONE_SECOND_IN_NSECS,
- to_ec_nsecs % ACE_ONE_SECOND_IN_NSECS /
- 1000);
-
- ACE_Time_Value in_ec;
- ACE_Time_Value from_ec;
- if (! short_circuit_EC)
- {
- const ACE_hrtime_t in_ec_nsecs = ec_send - ec_recv;
- in_ec =
- ACE_Time_Value (ACE_static_cast (long,
- in_ec_nsecs / ACE_ONE_SECOND_IN_NSECS),
- ACE_static_cast (long,
- ACE_CU64_TO_CU32 (in_ec_nsecs) %
- ACE_ONE_SECOND_IN_NSECS / 1000));
-
- const ACE_hrtime_t from_ec_nsecs = now - ec_send;
- from_ec =
- ACE_Time_Value (ACE_static_cast (long,
- from_ec_nsecs / ACE_ONE_SECOND_IN_NSECS),
- ACE_static_cast (long,
- ACE_CU64_TO_CU32 (from_ec_nsecs) %
- ACE_ONE_SECOND_IN_NSECS / 1000));
-
- if (! shutting_down)
- {
- if (min_to_ec_ > to_ec) min_to_ec_ = to_ec;
- if (max_to_ec_ < to_ec) max_to_ec_ = to_ec;
- sum_to_ec_ += to_ec;
- if (min_in_ec_ > in_ec) min_in_ec_ = in_ec;
- if (max_in_ec_ < in_ec) max_in_ec_ = in_ec;
- sum_in_ec_ += in_ec;
- if (min_from_ec_ > from_ec) min_from_ec_ = from_ec;
- if (max_from_ec_ < from_ec) max_from_ec_ = from_ec;
- sum_from_ec_ += from_ec;
- }
- }
-#endif /* TAO_LACKS_EVENT_CHANNEL_TIMESTAMPS */
-
- }
- }
-
- }
-}
-
-void
-Latency_Consumer::shutdown (void)
-{
- ACE_DEBUG ((LM_DEBUG, "(%t) %s shutting down.\n", entry_point ()));
-}
-
-
-void
-Latency_Consumer::print_stats () /* const */
-{
- if (measure_jitter_)
- {
- double lat_min =
- (min_latency_.sec () * 1000000.0 + min_latency_.usec ()) / 1000.0;
- double lat_max =
- (max_latency_.sec () * 1000000.0 + max_latency_.usec ()) / 1000.0;
- double lat_avg =
- (total_latency_.sec () * 1000000.0 +total_latency_.usec ()) /
- total_pushes_ / 1000.0;
- ACE_DEBUG ((LM_TRACE,
- "%s: Latency in msec (min/max/avg): "
- "%5.3f/%5.3f/%5.3f\n",
- entry_point (), lat_min, lat_max, lat_avg));
-
- if (! short_circuit_EC)
- {
- double to_ec_min =
- (min_to_ec_.sec () * 1000000.0 + min_to_ec_.usec ()) / 1000.0;
- double to_ec_max =
- (max_to_ec_.sec () * 1000000.0 + max_to_ec_.usec ()) / 1000.0;
- double to_ec_avg =
- (sum_to_ec_.sec () * 1000000.0 + sum_to_ec_.usec ()) /
- total_pushes_ / 1000.0;
- ACE_DEBUG ((LM_TRACE,
- "%s: From test to EC (min/max/avg): "
- "%5.3f/%5.3f/%5.3f\n",
- entry_point (), to_ec_min, to_ec_max, to_ec_avg));
-
- double in_ec_min =
- (min_in_ec_.sec () * 1000000.0 + min_in_ec_.usec ()) / 1000.0;
- double in_ec_max =
- (max_in_ec_.sec () * 1000000.0 + max_in_ec_.usec ()) / 1000.0;
- double in_ec_avg =
- (sum_in_ec_.sec () * 1000000.0 + sum_in_ec_.usec ()) /
- total_pushes_ / 1000.0;
- ACE_DEBUG ((LM_TRACE,
- "%s: In the EC (min/max/avg): "
- "%5.3f/%5.3f/%5.3f\n",
- entry_point (), in_ec_min, in_ec_max, in_ec_avg));
-
- double from_ec_min =
- (min_from_ec_.sec () * 1000000.0 + min_from_ec_.usec ()) / 1000.0;
- double from_ec_max =
- (max_from_ec_.sec () * 1000000.0 + max_from_ec_.usec ()) / 1000.0;
- double from_ec_avg =
- (sum_from_ec_.sec () * 1000000.0 + sum_from_ec_.usec ()) /
- total_pushes_ / 1000.0;
- ACE_DEBUG ((LM_TRACE,
- "%s: From EC to test (min/max/avg): "
- "%5.3f/%5.3f/%5.3f\n",
- entry_point (), from_ec_min, from_ec_max, from_ec_avg));
- }
- }
-}
-
-
-// ************************************************************
-
-Latency_Supplier::Supplier::Supplier (Latency_Supplier* impl)
- : impl_ (impl)
-{
-}
-
-void
-Latency_Supplier::Supplier::disconnect_push_supplier (
- TAO_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->impl_->disconnect_push_supplier (TAO_ENV_SINGLE_ARG_PARAMETER);
-}
-
-Latency_Supplier::Consumer::Consumer (Latency_Supplier* impl)
- : impl_ (impl)
-{
-}
-
-void
-Latency_Supplier::Consumer::disconnect_push_consumer (
- TAO_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->impl_->disconnect_push_consumer (TAO_ENV_SINGLE_ARG_PARAMETER);
-}
-
-void
-Latency_Supplier::Consumer::push (
- const RtecEventComm::EventSet &events
- TAO_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- this->impl_->push (events TAO_ENV_ARG_PARAMETER);
-}
-
-// ************************************************************
-
-Latency_Supplier::Latency_Supplier (const u_int total_messages,
- CORBA::Long supplier_id,
- const int timestamp)
- : total_messages_ (total_messages),
- supplier_id_ (supplier_id),
- timestamp_ (timestamp),
- total_sent_ (0),
- master_ (0),
- supplier_ (this),
- consumer_ (this)
-{
-}
-
-int
-Latency_Supplier::open_supplier (RtecEventChannelAdmin::EventChannel_ptr ec,
- const char *name, int master)
-{
- this->entry_point (name);
- master_ = master;
- TAO_ENV_DECLARE_NEW_ENV;
- ACE_TRY
- {
- this->channel_admin_ =
- RtecEventChannelAdmin::EventChannel::_duplicate (ec);
-
- this->rt_info_ = 0;
-
- ACE_SupplierQOS_Factory publications;
- publications.insert (supplier_id_,
- ACE_ES_EVENT_NOTIFICATION,
- rt_info_, 1);
- publications.insert (supplier_id_,
- ACE_ES_EVENT_SHUTDOWN,
- rt_info_, 1);
-
- // = Connect as a supplier.
- this->supplier_admin_ =
- channel_admin_->for_suppliers (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->consumers_ =
- supplier_admin_->obtain_push_consumer (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RtecEventComm::PushSupplier_var objref =
- this->supplier_._this (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- consumers_->connect_push_supplier (objref.in (),
- publications.get_SupplierQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Latency_Supplier::open");
- return -1;
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-void
-Latency_Supplier::close (TAO_ENV_SINGLE_ARG_DECL)
-{
- ACE_DEBUG ((LM_DEBUG, "(%t) %s closing down.\n",
- this->entry_point ()));
-
- this->suppliers_->disconnect_push_supplier (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->consumers_->disconnect_push_consumer (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- {
- PortableServer::POA_var poa =
- this->supplier_._default_POA (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::ObjectId_var id =
- poa->servant_to_id (&this->supplier_ TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- poa->deactivate_object (id.in () TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- {
- PortableServer::POA_var poa =
- this->consumer_._default_POA (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- PortableServer::ObjectId_var id =
- poa->servant_to_id (&this->consumer_ TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- poa->deactivate_object (id.in () TAO_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-}
-
-void
-Latency_Supplier::disconnect_push_consumer (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- ACE_DEBUG ((LM_DEBUG,
- "Supplier-consumer received disconnect from channel.\n"));
-}
-
-void
-Latency_Supplier::disconnect_push_supplier (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
-{
- ACE_DEBUG ((LM_DEBUG, "Supplier received disconnect from channel.\n"));
-}
-
-int
-Latency_Supplier::start_generating_events (void)
-{
- const ACE_hrtime_t now = ACE_OS::gethrtime ();
- test_start_time_.set (ACE_static_cast (long, now / 1000000000),
- ACE_static_cast (long,
- ACE_CU64_TO_CU32 (now) % 1000000000 /
- 1000));
-
- TAO_ENV_DECLARE_NEW_ENV;
- ACE_TRY
- {
- ACE_Time_Value tv_timeout (0, timeout_interval * 1000);
- TimeBase::TimeT timeout;
- ORBSVCS_Time::Time_Value_to_TimeT (timeout, tv_timeout);
-
- ACE_DEBUG ((LM_DEBUG,
- "start generating events: "
- "timeout = %d "
- "interval = %d "
- "tv.msec () = %d\n",
- ACE_U64_TO_U32 (timeout),
- timeout_interval,
- tv_timeout.msec ()));
-
- ACE_ConsumerQOS_Factory dependencies;
- dependencies.start_disjunction_group ();
- dependencies.insert_time (ACE_ES_EVENT_INTERVAL_TIMEOUT,
- timeout,
- rt_info_);
- if (!master_)
- dependencies.insert_type (ACE_ES_EVENT_SHUTDOWN, rt_info_);
-
- // = Connect as a consumer.
- consumer_admin_ =
- channel_admin_->for_consumers (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- suppliers_ =
- consumer_admin_->obtain_push_supplier (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RtecEventComm::PushConsumer_var objref =
- this->consumer_._this (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- this->suppliers_->connect_push_consumer (objref.in (),
- dependencies.get_ConsumerQOS ()
- TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Latency_Supplier::generate_events:"
- " unexpected exception.\n"), -1);
- }
- ACE_ENDTRY;
-
- return 0;
-}
-
-void
-Latency_Supplier::push (const RtecEventComm::EventSet &events
- TAO_ENV_ARG_DECL)
-{
- // ACE_DEBUG ((LM_DEBUG, "Latency_Supplier::push - "));
-
- // ACE_DEBUG ((LM_DEBUG, "%d event(s)\n", events.length ()));
- if (events.length () == 0)
- {
- return;
- }
-
- for (CORBA::ULong i = 0; i < events.length (); ++i)
- {
- if (!master_ && events[i].header.type == ACE_ES_EVENT_SHUTDOWN)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Latency Supplier: received shutdown event\n"));
- this->shutdown ();
- }
- else if (events[i].header.type == ACE_ES_EVENT_INTERVAL_TIMEOUT)
- {
- // Create the event to send.
- RtecEventComm::Event event;
- event.header.source = this->supplier_id_;
- event.header.type = ACE_ES_EVENT_NOTIFICATION;
- ++total_sent_;
-
- if (this->timestamp_)
- {
- ACE_hrtime_t now = ACE_OS::gethrtime ();
- ORBSVCS_Time::hrtime_to_TimeT (event.header.creation_time,
- now);
- }
-
- // @@ ACE_TIMEPROBE_RESET;
- // @@ ACE_TIMEPROBE (EVENT_LATENCY_START_WITH_NEW_EVENT_IN_SUPPLIER);
-
- ACE_TRY
- {
- if (short_circuit_EC)
- {
- for (u_int cons = 0; cons < consumers; ++cons)
- {
- // This constructor is fast.
- const RtecEventComm::EventSet es (1, 1, &event);
- consumer [cons]->push (es TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- else
- {
-#if defined (ACE_HAS_QUANTIFY)
- // If measuring jitter, just Quantify the
- // supplier-consumer path.
- if (measure_jitter)
- {
- quantify_start_recording_data ();
- }
-#endif /* ACE_HAS_QUANTIFY */
-
- ACE_TIMEPROBE (EVENT_LATENCY_SUPPLIER_STARTS_PUSHING_EVENT);
-
- RtecEventComm::EventSet events (1);
- events.length (1);
- events[0] = event;
- consumers_->push (events TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_TIMEPROBE (EVENT_LATENCY_SUPPLIER_ENDS_PUSHING_EVENT);
- }
- }
- ACE_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "(%t) %s Latency_Supplier::push:"
- " unexpected exception.\n",
- entry_point ()));
- }
- ACE_ENDTRY;
-
- // Check if we're done.
- if (master_ && (total_sent_ >= total_messages_))
- this->shutdown ();
- }
- else
- {
- ACE_ERROR ((LM_ERROR, "(%t) %s received unexpected events: %d\n",
- entry_point (), events[i].header.type));
- // ::dump_sequence (events);
- return;
- }
- }
-}
-
-void
-Latency_Supplier::shutdown (void)
-{
- shutting_down = 1;
-
-#if defined (ACE_HAS_QUANTIFY)
- // Need to stop recording here even if testing for jitter, because
- // recording is still probably enabled.
- quantify_stop_recording_data ();
- if (! measure_jitter)
- {
- ACE_DEBUG ((LM_DEBUG, "(%t) stopped Quantify recording\n"));
- }
-#endif /* ACE_HAS_QUANTIFY */
-
- const ACE_hrtime_t now = ACE_OS::gethrtime ();
- test_stop_time_.set (ACE_static_cast (long, now / ACE_ONE_SECOND_IN_NSECS),
- ACE_static_cast (long, ACE_CU64_TO_CU32 (now) %
- ACE_ONE_SECOND_IN_NSECS /
- 1000));
-
- static int total_iterations = 1;
- if (--total_iterations > 0)
- {
- total_sent_ = 0;
- return;
- }
-
- TAO_ENV_DECLARE_NEW_ENV;
- ACE_TRY
- {
- if (master_)
- {
- // Create the shutdown message.
- RtecEventComm::Event event;
- event.header.source = this->supplier_id_;
- event.header.type = ACE_ES_EVENT_SHUTDOWN;
-
- // Push the shutdown event.
- RtecEventComm::EventSet events (1);
- events.length (1);
- events[0] = event;
- consumers_->push (events TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "(%t) %s Latency_Supplier::shutdown:"
- " unexpected exception.\n",
- entry_point ()));
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Latency_Supplier::shutdown");
- }
- ACE_ENDTRY;
-}
-
-
-void
-Latency_Supplier::print_stats () /* const */
-{
- ACE_Time_Value test_elapsed_time (test_stop_time_ - test_start_time_);
- const u_int elapsed = test_elapsed_time.sec () * 1000000 +
- test_elapsed_time.usec (); // usec
-
- ACE_DEBUG ((LM_TRACE,
- "%s: delivered %u events to %u consumer(s) in %u msec;\n"
- " per-event average was %8.3f msec.\n",
- entry_point (),
- total_sent_,
- consumers / suppliers + consumers % suppliers,
- elapsed / 1000,
- ACE_static_cast (ACE_CAST_CONST double, elapsed) / total_sent_ /
- 1000.0));
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-// function get_options
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-
-static
-unsigned int
-get_options (int argc, char *argv [])
-{
- ACE_Get_Opt get_opt (argc, argv, "Oc:djm:s:t:?");
- int opt;
- int temp;
-
- while ((opt = get_opt ()) != EOF)
- {
- switch (opt) {
- case 'c':
- if ((temp = ACE_OS::atoi (get_opt.optarg)) > 0)
- {
- consumers = ACE_static_cast (u_int, temp);
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s: number of consumers must be > 0",
- argv[0]), 1);
- }
- break;
- case 'd':
- short_circuit_EC = 1;
- break;
- case 'j':
- measure_jitter = 1;
- break;
- case 'm':
- if ((temp = ACE_OS::atoi (get_opt.optarg)) > 0)
- {
- total_messages = ACE_static_cast (u_int, temp);
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s: count must be > 0",
- argv[0]), 1);
- }
- break;
- case 's':
- if ((temp = ACE_OS::atoi (get_opt.optarg)) > 0)
- {
- suppliers = ACE_static_cast (u_int, temp);
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s: number of suppliers must be > 0",
- argv[0]), 1);
- }
- break;
- case 't':
- if (ACE_OS::atoi (get_opt.optarg) >= 0)
- {
- timeout_interval = ACE_OS::atoi (get_opt.optarg);
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s: timeout must be >= 0",
- argv[0]), 1);
- }
- break;
- case '?':
- ACE_DEBUG ((LM_DEBUG,
- "Usage: %s %s\n",
- argv[0], usage));
- ACE_OS::exit (0);
- break;
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s: unknown arg, -%c\n"
- "Usage: %s %s\n",
- argv[0], ACE_static_cast (char, opt),
- argv[0], usage), 1);
- }
- }
-
- if (argc != get_opt.optind)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s: too many arguments\n"
- "Usage: %s %s\n",
- argv[0], argv[0], usage), 1);
- }
-
- return 0;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-// function main
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-
-int
-main (int argc, char *argv [])
-{
- if (ACE_OS::sched_params (
- ACE_Sched_Params (
- ACE_SCHED_FIFO,
- ACE_Sched_Params::priority_min (ACE_SCHED_FIFO),
- ACE_SCOPE_PROCESS)) != 0)
- {
- if (ACE_OS::last_error () == EPERM)
- {
- ACE_DEBUG ((LM_MAX, "Latency: user is not superuser, "
- "so remain in time-sharing class\n"));
- }
- else
- {
- ACE_DEBUG ((LM_ERROR, "%p\n", "Latency"));
- }
- }
-
- u_int i;
-
- TAO_ENV_DECLARE_NEW_ENV;
- ACE_TRY
- {
- // Initialize ORB.
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA" TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- poa_manager->activate (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- CORBA::Object_var naming_obj =
- orb->resolve_initial_references ("NameService" TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (naming_obj.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to get the Naming Service.\n"),
- 1);
-
- CosNaming::NamingContext_var naming_context =
- CosNaming::NamingContext::_narrow (naming_obj.in () TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (get_options (argc, argv))
- ACE_OS::exit (-1);
-
- // Allocate the timeprobe instance now, so we don't measure
- // the cost of doing it later.
- ACE_TIMEPROBE_RESET;
-
-#if 1
- CosNaming::Name channel_name (1);
- channel_name.length (1);
- channel_name[0].id = CORBA::string_dup ("EventService");
-
- CORBA::Object_var ec_obj =
- naming_context->resolve (channel_name TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RtecEventChannelAdmin::EventChannel_var ec =
- RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in ()
- TAO_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#else
- TAO_EC_Event_Channel_Attributes attr(root_poa.in (),
- root_poa.in ());
- TAO_EC_Event_Channel ec_impl (attr);
- ec_impl.activate (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- RtecEventChannelAdmin::EventChannel_var ec =
- ec_impl._this (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-#endif /* 0 */
-
- // Create supplier(s).
- Latency_Supplier **supplier;
- ACE_NEW_RETURN (supplier, Latency_Supplier *[suppliers], -1);
- for (i = 0; i < suppliers; ++i)
- {
- int supplier_timestamps = (i==0);
- ACE_NEW_RETURN (supplier [i],
- Latency_Supplier (total_messages,
- ACE_static_cast (CORBA::Long, i),
- supplier_timestamps),
- -1);
- char supplier_name [BUFSIZ];
- sprintf (supplier_name, "supplier-%d", i+1);
- // Only the first supplier timestamps its messages.
- int master = (i==0);
- if (supplier [i]->open_supplier (ec.in (),
- supplier_name,
- master) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "Supplier open failed.\n"), -1);
- }
-
- // Create consumers.
- ACE_NEW_RETURN (consumer, Latency_Consumer *[consumers], -1);
- for (i = 0; i < consumers; ++i)
- {
- ACE_NEW_RETURN (consumer [i], Latency_Consumer (measure_jitter), -1);
- char buf [BUFSIZ];
- sprintf (buf, "consumer-%d", i+1);
-
- if (consumer [i]->open_consumer (ec.in (), buf) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "Someone was feeling introverted.\n"),
- -1);
- }
-
-#if defined (ACE_HAS_QUANTIFY)
- if (! measure_jitter)
- {
- ACE_DEBUG ((LM_DEBUG, "(%t) start Quantify recording\n"));
- quantify_start_recording_data ();
- }
-#endif /* ACE_HAS_QUANTIFY */
-
- // Tell supplier(s) to generate events.
- for (i = 0; i < suppliers; ++i)
- {
- if (supplier [i]->start_generating_events () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "generate_events failed.\n"), -1);
- }
-
- while (!shutting_down)
- orb->perform_work ();
-
- for (i = 0; i < suppliers; ++i)
- supplier [i]->print_stats ();
-
- for (i = 0; i < consumers; ++i)
- consumer [i]->print_stats ();
-
- for (i = 0; i < suppliers; ++i)
- {
- supplier[i]->close (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- for (i = 0; i < consumers; ++i)
- {
- consumer [i]->close (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
-
- for (i = 0; i < suppliers; ++i)
- {
- delete supplier[i];
- ACE_TRY_CHECK;
- }
- delete [] supplier;
-
- for (i = 0; i < consumers; ++i)
- {
- delete consumer [i];
- ACE_TRY_CHECK;
- }
- delete [] consumer;
-
- ec->destroy (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- ACE_TIMEPROBE_PRINT;
-
- orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "SYS_EX");
- }
- ACE_ENDTRY;
-
-
- return 0;
-}
diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsp b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsp
deleted file mode 100644
index 62e14500bb8..00000000000
--- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsp
+++ /dev/null
@@ -1,104 +0,0 @@
-# Microsoft Developer Studio Project File - Name="Event_Latency" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Event_Latency - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Event_Latency.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Event_Latency.mak" CFG="Event_Latency - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Event_Latency - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "Event_Latency - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Event_Latency - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 TAO_CosNaming.lib TAO_RTEvent.lib TAO_RTSched.lib TAO_Svc_Utils.lib ace.lib TAO.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\..\ace"
-
-!ELSEIF "$(CFG)" == "Event_Latency - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 TAO_CosNamingd.lib TAO_RTEventd.lib TAO_RTSchedd.lib TAO_Svc_Utilsd.lib aced.lib TAOd.lib TAO_PortableServerd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Event_Latency - Win32 Release"
-# Name "Event_Latency - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Event_Latency.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Event_Latency.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsw b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsw
deleted file mode 100644
index 3188c9cb9c8..00000000000
--- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Event_Latency"=.\Event_Latency.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h
deleted file mode 100644
index 15abe63a525..00000000000
--- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h
+++ /dev/null
@@ -1,299 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-/**
- * @file Event_Latency.h
- *
- * @author David Levine (levine@cs.wustl.edu)
- * @author Tim Harrison (harrison@cs.wustl.edu)
- */
-
-#ifndef EVENT_LATENCY_H
-#define EVENT_LATENCY_H
-
-#include "ace/SString.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbsvcs/RtecEventChannelAdminC.h"
-#include "orbsvcs/RtecEventCommS.h"
-
-#if defined(_MSC_VER)
-#if (_MSC_VER >= 1200)
-#pragma warning(push)
-#endif /* _MSC_VER >= 1200 */
-#pragma warning(disable:4250)
-#endif /* _MSC_VER */
-
-/// Latency Consumer
-/**
- * Simple example of a consumer that registers for supplier
- * notifications.
- */
-class Latency_Consumer
- : public POA_RtecEventComm::PushConsumer
- , public PortableServer::RefCountServantBase
-{
-public:
- /// Default constructor
- /**
- * Construction. The default of not measuring jitter provides
- * a "null" push routine, for measuring aggregate timing.
- */
- Latency_Consumer (const int measure_jitter = 0);
-
- /**
- * Uses the name server to obtain a reference to the <supplier_name>
- * and registers with channel to receive notifications from the
- * supplier. Also registers to receive shutdown messages from the
- * supplier. Stores <my_name> for printing out messages. Returns 0
- * on success, -1 on failure.
- */
- int open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec,
- const char *my_name);
-
- /// Disconnect from the Event Service and deactivate the object
- void close (TAO_ENV_SINGLE_ARG_DECL_NOT_USED);
-
- void entry_point (const char*);
- const char *entry_point () const;
-
- /// Print timing statistics.
- void print_stats () /* const */;
-
- virtual void disconnect_push_consumer (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /**
- * If the <events>[0] is a notification, prints out the data from
- * the supplier. If its a shutdown message, the consumer
- * disconnects from the channel.
- */
- virtual void push (const RtecEventComm::EventSet &events
- TAO_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-protected:
- void shutdown (void);
-
- //@{
- /// Event channel adminstration references.
- RtecEventChannelAdmin::EventChannel_var channel_admin_;
- RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin_;
- RtecEventChannelAdmin::ProxyPushSupplier_var suppliers_;
- //@}
-
-private:
- RtecBase::handle_t rt_info_;
-
- int measure_jitter_;
-
- //@{
- /// Registers and counters for keeping track of latency statistics.
- ACE_Time_Value min_latency_;
- ACE_Time_Value max_latency_;
- ACE_Time_Value total_latency_;
- u_long total_pushes_;
- //@}
-
- //@{
- /// Statitics on time to get to the EC.
- ACE_Time_Value min_to_ec_;
- ACE_Time_Value max_to_ec_;
- ACE_Time_Value sum_to_ec_;
- //@}
-
- //@{
- /// Statitics on time spent in the EC.
- ACE_Time_Value min_in_ec_;
- ACE_Time_Value max_in_ec_;
- ACE_Time_Value sum_in_ec_;
- //@}
-
- //@{
- /// Statitics on time spent since the EC put the event on the wire
- /// and it gets here.
- ACE_Time_Value min_from_ec_;
- ACE_Time_Value max_from_ec_;
- ACE_Time_Value sum_from_ec_;
- //@}
-
- /// The name for the Scheduling service
- ACE_CString entry_point_;
-};
-
-// ************************************************************
-
-/// Latency Supplier
-/**
- * Generates event nofications and a shutdown message.
- */
-class Latency_Supplier
-{
-public:
-
- /**
- * This class provides IS-A Consumer and Supplier of events. But
- * inheritance from two skeleton classes is non-complaint (or at
- * least won't work with TAO). We use smaller implementation classes
- * that delegate on Latency_Supplier to do the job.
- */
- class Supplier
- : public POA_RtecEventComm::PushSupplier
- , public PortableServer::RefCountServantBase
- {
- public:
- virtual void disconnect_push_supplier (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- private:
- /// Constructor
- Supplier (Latency_Supplier* impl);
-
- /// Only the Latency_Supplier can create instances of this class
- friend class Latency_Supplier;
-
- private:
- Latency_Supplier* impl_;
- };
-
- class Consumer
- : public POA_RtecEventComm::PushConsumer
- , public PortableServer::RefCountServantBase
- {
- public:
- virtual void push (const RtecEventComm::EventSet &events
- TAO_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void disconnect_push_consumer (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- private:
- /// Constructor
- Consumer (Latency_Supplier* impl);
-
- /// Only the Latency_Supplier can create instances of this class
- friend class Latency_Supplier;
-
- private:
- Latency_Supplier* impl_;
- };
-
- /**
- * Construction. Requires the total number of messages to be
- * sent. If the timestamp flag is enabled, then events are
- * timestamped, e.g., for use in measuring jitter.
- */
- Latency_Supplier (const u_int total_messages,
- CORBA::Long supplier_id,
- const int timestamp = 0);
-
- /**
- * Registers with the name server under the given <name>. Also
- * connects to the Event Channel as a supplier of notifications and
- * shutdown messages. If <master> != 0, then the supplier will
- * destroy the channel upon shutting down. Returns 0 on success, -1
- * on failure.
- */
- int open_supplier (RtecEventChannelAdmin::EventChannel_ptr event_channel,
- const char *name, int master);
-
- /// Disconnect from the Event Service, deactivate the supplier and
- /// consumer personalities
- void close (TAO_ENV_SINGLE_ARG_DECL);
-
- /// The channel is disconnecting.
- void disconnect_push_supplier (TAO_ENV_SINGLE_ARG_DECL_NOT_USED);
-
- /// The channel is disconnecting.
- void disconnect_push_consumer (TAO_ENV_SINGLE_ARG_DECL_NOT_USED);
-
- /// Takes a timestamp and then pushes event_ to all consumers, either
- /// directly, or via a channel.
- void push (const RtecEventComm::EventSet &events
- TAO_ENV_ARG_DECL_NOT_USED);
-
- /**
- * Called when the supplier should start generating events.
- * Registers with the Event Channel to receive timeouts every .25
- * seconds. Will generate some number of events and then send a
- * shutdown message. Returns 0 on success, -1 on failure.
- */
- int start_generating_events (void);
-
- void entry_point (const char *);
- const char *entry_point () const;
-
- /// Print timing statistics.
- void print_stats () /* const */;
-
-protected:
- void shutdown (void);
-
- //@{
- /// Event Channel adminstration references.
- RtecEventChannelAdmin::EventChannel_var channel_admin_;
- RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin_;
- RtecEventChannelAdmin::ProxyPushConsumer_var consumers_;
- RtecEventChannelAdmin::SupplierAdmin_var supplier_admin_;
- RtecEventChannelAdmin::ProxyPushSupplier_var suppliers_;
- //@}
-
-private:
- RtecBase::handle_t rt_info_;
-
- /// How many events to push before ending the test.
- u_int total_messages_;
-
- /// Our supplier ID.
- CORBA::Long supplier_id_;
-
- /// Flag indicating whether or not to timestamp outgoing events.
- int timestamp_;
-
- /// How many events we've pushed.
- u_int total_sent_;
-
- //@{
- /// Start/stop times, marking the time period when events are
- /// sent to consumers.
- ACE_Time_Value test_start_time_;
- ACE_Time_Value test_stop_time_;
- //@}
-
- int master_;
-
- ACE_CString entry_point_;
-
- Supplier supplier_;
- Consumer consumer_;
-};
-
-void Latency_Consumer::entry_point(const char* s)
-{
- entry_point_ = s;
-}
-
-const char* Latency_Consumer::entry_point (void) const
-{
- return entry_point_.fast_rep ();
-}
-
-void Latency_Supplier::entry_point(const char* s)
-{
- entry_point_ = s;
-}
-
-const char* Latency_Supplier::entry_point (void) const
-{
- return entry_point_.fast_rep ();
-}
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-#pragma warning(pop)
-#endif /* _MSC_VER */
-
-#endif /* EVENT_LATENCY_H */
diff --git a/TAO/orbsvcs/tests/Event_Latency/Makefile b/TAO/orbsvcs/tests/Event_Latency/Makefile
deleted file mode 100644
index ccfa4f74cad..00000000000
--- a/TAO/orbsvcs/tests/Event_Latency/Makefile
+++ /dev/null
@@ -1,342 +0,0 @@
-# $Id$
-
-EVENT_LATENCY_SRCS = Event_Latency.cpp
-LSRC = $(EVENT_LATENCY_SRCS)
-EVENT_LATENCY_OBJS = $(EVENT_LATENCY_SRCS:.cpp=.o)
-
-LDLIBS = -lTAO_RTEvent -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_IORTable -lTAO_PortableServer -lTAO
-
-BIN2 = Event_Latency
-
-#### If the TAO orbsvcs library wasn't built with sufficient components,
-#### don't try to build here.
-TAO_ORBSVCS := $(shell sh $(ACE_ROOT)/bin/ace_components --orbsvcs)
-ifeq (Event,$(findstring Event,$(TAO_ORBSVCS)))
- BIN = $(BIN2)
-endif # Event
-
-ifndef TAO_ROOT
- TAO_ROOT = $(ACE_ROOT)/TAO
-endif
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(TAO_ROOT)/rules.tao.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-#### Local rules and variables...
-
-LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao
-CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT)
-
-# Leave the scheduler output out if this is a config run.
-ifeq ($(runtime),1)
-EVENT_LATENCY_CONFIG_OBJS=Event_Latency_Scheduler_Runtime.o
-endif # runtime
-
-Event_Latency: $(addprefix $(VDIR),$(EVENT_LATENCY_OBJS) $(EVENT_LATENCY_CONFIG_OBJS))
- $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK)
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-
-.obj/Event_Latency.o .obj/Event_Latency.so .shobj/Event_Latency.o .shobj/Event_Latency.so: Event_Latency.cpp \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ace_wchar.inl \
- $(ACE_ROOT)/ace/OS_Errno.h \
- $(ACE_ROOT)/ace/OS_Export.h \
- $(ACE_ROOT)/ace/OS_Errno.inl \
- $(ACE_ROOT)/ace/OS_Dirent.h \
- $(ACE_ROOT)/ace/OS_Dirent.inl \
- $(ACE_ROOT)/ace/OS_String.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS_String.inl \
- $(ACE_ROOT)/ace/OS_Memory.h \
- $(ACE_ROOT)/ace/OS_Memory.inl \
- $(ACE_ROOT)/ace/OS_TLI.h \
- $(ACE_ROOT)/ace/OS_TLI.inl \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Flag_Manip.h \
- $(ACE_ROOT)/ace/Flag_Manip.i \
- $(ACE_ROOT)/ace/Handle_Ops.h \
- $(ACE_ROOT)/ace/Handle_Ops.i \
- $(ACE_ROOT)/ace/Lib_Find.h \
- $(ACE_ROOT)/ace/Lib_Find.i \
- $(ACE_ROOT)/ace/Init_ACE.h \
- $(ACE_ROOT)/ace/Init_ACE.i \
- $(ACE_ROOT)/ace/Sock_Connect.h \
- $(ACE_ROOT)/ace/Sock_Connect.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/String_Base.h \
- $(ACE_ROOT)/ace/String_Base_Const.h \
- $(ACE_ROOT)/ace/String_Base.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/String_Base.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \
- $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread_Adapter.h \
- $(ACE_ROOT)/ace/Base_Thread_Adapter.h \
- $(ACE_ROOT)/ace/Base_Thread_Adapter.inl \
- $(ACE_ROOT)/ace/Thread_Adapter.inl \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Malloc_Allocator.h \
- $(ACE_ROOT)/ace/Malloc_Allocator.i \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Unbounded_Set.h \
- $(ACE_ROOT)/ace/Node.h \
- $(ACE_ROOT)/ace/Node.cpp \
- $(ACE_ROOT)/ace/Unbounded_Set.inl \
- $(ACE_ROOT)/ace/Unbounded_Set.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Auto_Ptr.h \
- $(ACE_ROOT)/ace/Auto_Ptr.i \
- $(ACE_ROOT)/ace/Auto_Ptr.cpp \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Array_Base.h \
- $(ACE_ROOT)/ace/Array_Base.inl \
- $(ACE_ROOT)/ace/Array_Base.cpp \
- $(ACE_ROOT)/ace/Unbounded_Queue.h \
- $(ACE_ROOT)/ace/Unbounded_Queue.inl \
- $(ACE_ROOT)/ace/Unbounded_Queue.cpp \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/Sched_Params.h \
- $(ACE_ROOT)/ace/Sched_Params.i \
- $(ACE_ROOT)/ace/Profile_Timer.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/High_Res_Timer.h \
- $(ACE_ROOT)/ace/High_Res_Timer.i \
- $(ACE_ROOT)/ace/Profile_Timer.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \
- $(TAO_ROOT)/tao/corba.h \
- $(TAO_ROOT)/tao/corbafwd.h \
- $(ACE_ROOT)/ace/CDR_Base.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/CDR_Base.inl \
- $(TAO_ROOT)/tao/try_macros.h \
- $(TAO_ROOT)/tao/orbconf.h \
- $(ACE_ROOT)/ace/CORBA_macros.h \
- $(TAO_ROOT)/tao/varbase.h \
- $(TAO_ROOT)/tao/TAO_Export.h \
- $(TAO_ROOT)/tao/corbafwd.i \
- $(TAO_ROOT)/tao/Typecode.h \
- $(TAO_ROOT)/tao/Exception.h \
- $(TAO_ROOT)/tao/Exception.i \
- $(TAO_ROOT)/tao/Typecode.i \
- $(TAO_ROOT)/tao/Any.h \
- $(TAO_ROOT)/tao/CDR.h \
- $(ACE_ROOT)/ace/CDR_Stream.h \
- $(ACE_ROOT)/ace/CDR_Stream.i \
- $(TAO_ROOT)/tao/CDR.i \
- $(TAO_ROOT)/tao/Environment.h \
- $(TAO_ROOT)/tao/Environment.i \
- $(TAO_ROOT)/tao/Object.h \
- $(TAO_ROOT)/tao/Object_Proxy_Broker.h \
- $(TAO_ROOT)/tao/Object_Proxy_Impl.h \
- $(TAO_ROOT)/tao/Object.i \
- $(TAO_ROOT)/tao/Any.i \
- $(TAO_ROOT)/tao/NVList.h \
- $(TAO_ROOT)/tao/NVList.i \
- $(TAO_ROOT)/tao/LocalObject.h \
- $(TAO_ROOT)/tao/LocalObject.i \
- $(TAO_ROOT)/tao/Principal.h \
- $(TAO_ROOT)/tao/OctetSeqC.h \
- $(TAO_ROOT)/tao/Sequence.h \
- $(TAO_ROOT)/tao/Managed_Types.h \
- $(TAO_ROOT)/tao/Managed_Types.i \
- $(TAO_ROOT)/tao/Sequence.i \
- $(TAO_ROOT)/tao/Sequence_T.h \
- $(TAO_ROOT)/tao/Sequence_T.i \
- $(TAO_ROOT)/tao/Sequence_T.cpp \
- $(TAO_ROOT)/tao/OctetSeqC.i \
- $(TAO_ROOT)/tao/Principal.i \
- $(TAO_ROOT)/tao/ORB.h \
- $(TAO_ROOT)/tao/Services.h \
- $(TAO_ROOT)/tao/Services.i \
- $(TAO_ROOT)/tao/CORBA_String.h \
- $(TAO_ROOT)/tao/CORBA_String.inl \
- $(TAO_ROOT)/tao/PolicyC.h \
- $(TAO_ROOT)/tao/Encodable.h \
- $(TAO_ROOT)/tao/Remote_Object_Proxy_Impl.h \
- $(TAO_ROOT)/tao/CurrentC.h \
- $(TAO_ROOT)/tao/CurrentC.i \
- $(TAO_ROOT)/tao/PolicyC.i \
- $(TAO_ROOT)/tao/ORB.i \
- $(TAO_ROOT)/tao/BoundsC.h \
- $(TAO_ROOT)/tao/BoundsC.i \
- $(TAO_ROOT)/tao/ValueBase.h \
- $(TAO_ROOT)/tao/ValueBase.i \
- $(TAO_ROOT)/tao/ValueFactory.h \
- $(TAO_ROOT)/tao/ValueFactory.i \
- $(TAO_ROOT)/tao/DomainC.h \
- $(TAO_ROOT)/tao/DomainC.i \
- $(TAO_ROOT)/tao/WrongTransactionC.h \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/Object_KeyC.i \
- $(TAO_ROOT)/tao/ObjectIDList.h \
- $(TAO_ROOT)/tao/ObjectIDList.i \
- $(TAO_ROOT)/tao/StringSeqC.h \
- $(TAO_ROOT)/tao/StringSeqC.i \
- $(TAO_ROOT)/tao/PortableInterceptorC.h \
- $(TAO_ROOT)/tao/DynamicC.h \
- $(TAO_ROOT)/tao/DynamicC.i \
- $(TAO_ROOT)/tao/MessagingC.h \
- $(TAO_ROOT)/tao/TimeBaseC.h \
- $(TAO_ROOT)/tao/SmartProxies/Smart_Proxies.h \
- $(TAO_ROOT)/tao/SmartProxies/smartproxies_export.h \
- $(TAO_ROOT)/tao/TAO_Singleton.h \
- $(TAO_ROOT)/tao/TAO_Singleton.inl \
- $(TAO_ROOT)/tao/TAO_Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(TAO_ROOT)/tao/TAO_Singleton_Manager.h \
- $(TAO_ROOT)/tao/TAO_Singleton_Manager.inl \
- $(TAO_ROOT)/tao/SmartProxies/Smart_Proxies.inl \
- $(TAO_ROOT)/tao/TimeBaseC.i \
- $(TAO_ROOT)/tao/IOPC.h \
- $(TAO_ROOT)/tao/IOPC.i \
- $(TAO_ROOT)/tao/PollableC.h \
- $(TAO_ROOT)/tao/PollableC.i \
- $(TAO_ROOT)/tao/MessagingC.i \
- $(TAO_ROOT)/tao/PortableInterceptorC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/event_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/svc_utils_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecDefaultEventDataC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecDefaultEventDataC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecBaseC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecBaseC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/naming_export.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Event_Channel.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Factory.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Factory.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Defaults.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS.h \
- $(TAO_ROOT)/tao/TimeBaseS.h \
- $(TAO_ROOT)/tao/TimeBaseS_T.h \
- $(TAO_ROOT)/tao/TimeBaseS_T.i \
- $(TAO_ROOT)/tao/TimeBaseS_T.cpp \
- $(TAO_ROOT)/tao/TimeBaseS.i \
- $(TAO_ROOT)/tao/PortableServer/PortableServer.h \
- $(TAO_ROOT)/tao/PortableServer/portableserver_export.h \
- $(TAO_ROOT)/tao/PortableServer/PortableServerC.h \
- $(TAO_ROOT)/tao/PortableServer/PortableServerC.i \
- $(TAO_ROOT)/tao/PortableServer/Servant_Base.h \
- $(TAO_ROOT)/tao/Abstract_Servant_Base.h \
- $(ACE_ROOT)/ace/Atomic_Op.h \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Atomic_Op.cpp \
- $(TAO_ROOT)/tao/PortableServer/Servant_Base.i \
- $(TAO_ROOT)/tao/PortableServer/Collocated_Object.h \
- $(TAO_ROOT)/tao/PortableServer/Collocated_Object.i \
- $(TAO_ROOT)/tao/PortableServer/ThruPOA_Object_Proxy_Impl.h \
- $(TAO_ROOT)/tao/PortableServer/Direct_Object_Proxy_Impl.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS_T.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS_T.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS_T.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecDefaultEventDataS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecDefaultEventDataS_T.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecDefaultEventDataS_T.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecDefaultEventDataS_T.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecDefaultEventDataS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecBaseS.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecBaseS_T.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecBaseS_T.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecBaseS_T.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecBaseS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.cpp \
- $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Event_Channel.i \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Basic_Factory.h \
- $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Basic_Factory.i \
- Event_Latency.h \
- $(TAO_ROOT)/tao/Timeprobe.h \
- $(ACE_ROOT)/ace/Timeprobe.h
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/tests/Event_Latency/Makefile.bor b/TAO/orbsvcs/tests/Event_Latency/Makefile.bor
deleted file mode 100644
index 2a9c9a05635..00000000000
--- a/TAO/orbsvcs/tests/Event_Latency/Makefile.bor
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# $Id$
-#
-
-NAME = Event_Latency
-
-OBJFILES = \
- $(OBJDIR)\Event_Latency.obj
-
-CFLAGS = \
- $(TAO_RTEVENT_CFLAGS) \
- $(TAO_NAMING_CFLAGS) \
- $(TAO_SVC_UTILS_CFLAGS) \
- $(TAO_IORTABLE_CFLAGS) \
- $(TAO_PORTABLESERVER_CFLAGS) \
- $(TAO_CFLAGS) \
- $(ACE_CFLAGS)
-
-LIBFILES = \
- $(TAO_RTEVENT_LIB) \
- $(TAO_NAMING_LIB) \
- $(TAO_SVC_UTILS_LIB) \
- $(TAO_IORTABLE_LIB) \
- $(TAO_PORTABLESERVER_LIB) \
- $(TAO_LIB) \
- $(ACE_LIB)
-
-CPPDIR = .
-
-!include <$(ACE_ROOT)\include\makeinclude\build_exe.bor>
diff --git a/TAO/orbsvcs/tests/Event_Latency/run_test.pl b/TAO/orbsvcs/tests/Event_Latency/run_test.pl
deleted file mode 100755
index ee3c858f981..00000000000
--- a/TAO/orbsvcs/tests/Event_Latency/run_test.pl
+++ /dev/null
@@ -1,60 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
-
-$NS_ior = PerlACE::LocalFile ("NameService.ior");
-$sleeptime = 10;
-$status = 0;
-
-unlink $NS_ior;
-
-$NS = new PerlACE::Process ("../../Naming_Service/Naming_Service",
- "-o $NS_ior ");
-$ES = new PerlACE::Process ("../../Event_Service/Event_Service",
- "-ORBInitRef NameService=file://$NS_ior -t new");
-$T = new PerlACE::Process ("Event_Latency",
- "-ORBInitRef NameService=file://$NS_ior"
- . " -j -m 100");
-
-$NS->Spawn ();
-
-if (PerlACE::waitforfile_timed ($NS_ior, 10) == -1) {
- print STDERR "ERROR: waiting for naming service IOR file\n";
- $NS->Kill ();
- exit 1;
-}
-
-$ES->Spawn ();
-
-sleep $sleeptime;
-
-$test = $T->SpawnWaitKill (60);
-
-if ($test != 0) {
- print STDERR "ERROR: test returned $test\n";
- $status = 1;
-}
-
-$nserver = $NS->TerminateWaitKill (5);
-
-if ($nserver != 0) {
- print STDERR "ERROR: name server returned $nserver\n";
- $status = 1;
-}
-
-$eserver = $ES->TerminateWaitKill (5);
-
-if ($eserver != 0) {
- print STDERR "ERROR: event server returned $eserver\n";
- $status = 1;
-}
-
-unlink $NS_ior;
-
-exit $status;
diff --git a/TAO/orbsvcs/tests/Event_Latency/run_tests.sh b/TAO/orbsvcs/tests/Event_Latency/run_tests.sh
deleted file mode 100755
index 483261ba02f..00000000000
--- a/TAO/orbsvcs/tests/Event_Latency/run_tests.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#! /bin/sh
-# $Id$
-#
-# Runs Event_Latency test.
-
-usage="Usage: $0 [-m <messages>] [-s <suppliers>]"
-messages=1000
-suppliers=1
-
-########
-######## Interpret command arguments.
-########
-skip_arg=0
-for arg in "$@"; do
- if [ $skip_arg -eq 0 ]; then
- case $arg in
- -m ) messages=$2
- skip_arg=1
- ;;
- -s ) suppliers=$2
- skip_arg=1
- ;;
- -* ) echo undefined option: $arg
- echo $usage
- exit 1
- ;;
- * ) echo $usage
- exit 1
- ;;
- esac
- else
- skip_arg=0
- fi
- shift
-done
-
-whoami=`whoami`
-
-#### Get the user name
-if [ "$LOGNAME" ]; then
- #### LOGNAME is preserved across su
- login=$LOGNAME
-else
- #### whoami returns the users login, which changes across su
- login=$whoami
-fi
-
-run ()
-#### Run the process in the RT class, if root on Solaris.
-{
- if [ `uname -s` = 'SunOS' -a "$whoami" = 'root' ]; then
- LD_BIND_NOW=1 priocntl -e -c RT -p 0 $@
- else
- $@
- fi
-}
-
-
-########
-######## Clean up on normal or abnormal termination.
-########
-trap '../start_services clean' 0 1 2 3 15
-
-
-########
-######## Start NameService, etc.
-########
-run ../start_services
-NameService=`cat /tmp/nameserviceior_$login`
-export NameService
-
-
-########
-######## Run the Event_Latency test.
-########
-./Event_Latency -j -t 50 -m $messages -s $suppliers -c $suppliers
diff --git a/TAO/orbsvcs/tests/Makefile b/TAO/orbsvcs/tests/Makefile
index e08c13bbe98..f07da22394e 100644
--- a/TAO/orbsvcs/tests/Makefile
+++ b/TAO/orbsvcs/tests/Makefile
@@ -10,12 +10,10 @@
DIRS = \
Simple_Naming \
- Event_Latency \
EC_Multiple \
EC_Throughput \
EC_Mcast \
EC_Custom_Marshal \
- EC_Basic \
Property \
Sched \
Sched_Conf \
diff --git a/TAO/orbsvcs/tests/Makefile.am b/TAO/orbsvcs/tests/Makefile.am
index 4683ba2c7c2..50e9cc61195 100644
--- a/TAO/orbsvcs/tests/Makefile.am
+++ b/TAO/orbsvcs/tests/Makefile.am
@@ -18,12 +18,10 @@ SUBDIRS = \
Concurrency \
CosEC_Basic \
CosEC_Multiple \
- EC_Basic \
EC_Custom_Marshal \
EC_Mcast \
EC_Multiple \
EC_Throughput \
- Event_Latency \
ImplRepo \
Logger \
Property \
diff --git a/TAO/orbsvcs/tests/Makefile.bor b/TAO/orbsvcs/tests/Makefile.bor
index 406a4ad8a70..aa942b74fc4 100644
--- a/TAO/orbsvcs/tests/Makefile.bor
+++ b/TAO/orbsvcs/tests/Makefile.bor
@@ -10,10 +10,8 @@ DIRS = \
Event \
EC_Throughput \
EC_Multiple \
- EC_Basic \
EC_Mcast \
EC_Custom_Marshal \
- Event_Latency \
ior_corbaname \
IOR_MCast \
LoadBalancing \