diff options
Diffstat (limited to 'CIAO/ciaosvcs')
-rw-r--r-- | CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.cpp | 90 | ||||
-rw-r--r-- | CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.h | 78 | ||||
-rw-r--r-- | CIAO/ciaosvcs/Events/CIAO_Events.mpc | 20 | ||||
-rw-r--r-- | CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.cpp | 23 | ||||
-rw-r--r-- | CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.h | 139 | ||||
-rw-r--r-- | CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_Events.idl | 69 | ||||
-rw-r--r-- | CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_Events_Base.mpc | 26 | ||||
-rw-r--r-- | CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_Events_Export.h | 53 | ||||
-rw-r--r-- | CIAO/ciaosvcs/Events/CIAO_Events_Export.h | 53 | ||||
-rw-r--r-- | CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEVENT_Export.h | 58 | ||||
-rw-r--r-- | CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.cpp | 624 | ||||
-rw-r--r-- | CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.h | 332 | ||||
-rw-r--r-- | CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.idl | 38 | ||||
-rw-r--r-- | CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.mpc | 25 |
14 files changed, 0 insertions, 1628 deletions
diff --git a/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.cpp b/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.cpp deleted file mode 100644 index a4a5fbf9c90..00000000000 --- a/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.cpp +++ /dev/null @@ -1,90 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file CIAO_EventService_Factory_impl.cpp - * - * $Id$ - * - * @author Gan Deng <dengg@dre.vanderbilt.edu> - * @author George Edwards <g.edwards@vanderbilt.edu> - */ -//============================================================================= - -#include "CIAO_EventService_Factory_impl.h" -#include "ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.h" - -namespace CIAO -{ - EventService_Factory_impl::EventService_Factory_impl (void) - { - } - - EventService_Factory_impl::EventService_Factory_impl ( - CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa) : - orb_ (CORBA::ORB::_duplicate (orb)), - poa_ (PortableServer::POA::_duplicate (poa)) - { - } - - EventService_Factory_impl::~EventService_Factory_impl (void) - { - } - - CIAO_Event_Service_ptr - EventService_Factory_impl::create (EventServiceType type) - { - ACE_DEBUG ((LM_DEBUG, "CIAO::EventService_Factory_impl::create_event_service\n")); - - EventServiceBase * event_service = 0; - - switch (type) - { - case RTEC: - ACE_NEW_RETURN (event_service, - RTEventService (this->orb_.in (), - this->poa_.in ()), - 0); - break; - - default: - ACE_ERROR_RETURN ((LM_ERROR, "CIAO::EventService_Factory_impl::" - "create_event_service: unsuppoted type.\n"), - 0); - - } - - // Activate the servant - CIAO_Event_Service_var service = event_service->_this (); - return service._retn (); - } - - int - EventService_Factory_impl::Initializer (void) - { - return - ACE_Service_Config::process_directive ( - ace_svc_desc_EventService_Factory_impl - ); - } - - void EventService_Factory_impl::initialize ( - CORBA::ORB_ptr orb, PortableServer::POA_ptr poa) - { - this->orb_ = CORBA::ORB::_duplicate (orb); - this->poa_ = PortableServer::POA::_duplicate (poa); - } - -ACE_STATIC_SVC_DEFINE ( - EventService_Factory_impl, - ACE_TEXT ("CIAO_EventService_Factory"), - ACE_SVC_OBJ_T, - &ACE_SVC_NAME (EventService_Factory_impl), - ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, - 0 - ) - -ACE_FACTORY_DEFINE (CIAO_EVENTS, EventService_Factory_impl) - -} // namespace CIAO diff --git a/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.h b/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.h deleted file mode 100644 index 349a48aa09a..00000000000 --- a/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.h +++ /dev/null @@ -1,78 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file CIAO_EventService_Factory_impl.h - * - * $Id$ - * - * @author Gan Deng <dengg@dre.vanderbilt.edu> - * @author George Edwards <g.edwards@vanderbilt.edu> - */ -//============================================================================= - -#ifndef CIAO_EVENTSERVICE_FACTORY_IMPL_H -#define CIAO_EVENTSERVICE_FACTORY_IMPL_H -#include /**/ "ace/pre.h" - -#include "tao/PortableServer/PortableServer.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "CIAO_Events_Export.h" -#include "ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.h" - -namespace CIAO -{ - class CIAO_EVENTS_Export EventService_Factory_impl : - public ACE_Service_Object - { - public: - EventService_Factory_impl (void); - - EventService_Factory_impl (CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa); - - virtual ~EventService_Factory_impl (void); - - /// A factory method which creates an CIAO_Event_Service object - virtual CIAO_Event_Service_ptr create (EventServiceType type); - - virtual void initialize (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa); - - /// Used to force the initialization. - static int Initializer (void); - - private: - /// Reference to the ORB - CORBA::ORB_var orb_; - - /// Reference to the Root POA - PortableServer::POA_var poa_; - }; - -ACE_STATIC_SVC_DECLARE (EventService_Factory_impl) -ACE_FACTORY_DECLARE (CIAO_EVENTS, EventService_Factory_impl) - -} - -#if defined (ACE_HAS_BROKEN_STATIC_CONSTRUCTORS) - -typedef int (*CIAO_Module_Initializer) (void); - -static CIAO_Module_Initializer -CIAO_Requires_EventService_Initializer = - &CIAO::EventService_Factory_impl::Initializer; - -#else - -static int -CIAO_Requires_EventService_Initializer = - CIAO::EventService_Factory_impl::Initializer (); - -#endif /* ACE_HAS_BROKEN_STATIC_CONSTRUCTORS */ - -#include /**/ "ace/post.h" -#endif /* CIAO_EVENTSERVICE_FACTORY_IMPL_H */ diff --git a/CIAO/ciaosvcs/Events/CIAO_Events.mpc b/CIAO/ciaosvcs/Events/CIAO_Events.mpc deleted file mode 100644 index a5a1417673e..00000000000 --- a/CIAO/ciaosvcs/Events/CIAO_Events.mpc +++ /dev/null @@ -1,20 +0,0 @@ -// -*- MPC -*- -// $Id$ - -project (CIAO_DnC_Events) : orbsvcslib, ciao_rtevent_dnc { - - sharedname = CIAO_DnC_Events - idlflags += -Wb,export_include=CIAO_Events_Export.h -Wb,export_macro=CIAO_EVENTS_Export - dynamicflags = CIAO_EVENTS_BUILD_DLL - - Source_Files { - CIAO_EventService_Factory_impl.cpp - } - - Header_Files { - CIAO_EventService_Factory_impl.h - } - - IDL_Files { - } -} diff --git a/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.cpp b/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.cpp deleted file mode 100644 index 6c06c5c8f27..00000000000 --- a/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//============================================================================= -/** - * @file CIAO_EventServiceBase.cpp - * - * $Id$ - * - * @author Gan Deng <dengg@dre.vanderbilt.edu> - */ -//============================================================================= - -#include "CIAO_EventServiceBase.h" - -namespace CIAO -{ - EventServiceBase:: - EventServiceBase (void) - { - } - - EventServiceBase::~EventServiceBase (void) - { - } -} diff --git a/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.h b/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.h deleted file mode 100644 index 90b9f872ca6..00000000000 --- a/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.h +++ /dev/null @@ -1,139 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file CIAO_EventServiceBase.h - * - * $Id$ - * - * @author Gan Deng <dengg@dre.vanderbilt.edu> - * @author George Edwards <g.edwards@vanderbilt.edu> - */ -//============================================================================= - -#ifndef CIAO_EVENTSERVICEBASE_H -#define CIAO_EVENTSERVICEBASE_H -#include /**/ "ace/pre.h" - -#include "CIAO_EventsS.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -namespace CIAO -{ - /** - * @class EventServiceBase - * - * An abstract base servant class to implement the CIAO_Event_Service - * interface. The derived classes will provide appropriate - * implementations of the connect, disconnect, and push methods depending on - * the event mechanism used. - */ - class CIAO_EVENTS_Export EventServiceBase : - public virtual POA_CIAO::CIAO_Event_Service - { - public: - EventServiceBase (void); - - virtual ~EventServiceBase (void); - - /// A factory method for Supplier_Config objects - virtual Supplier_Config_ptr - create_supplier_config (void) - ACE_THROW_SPEC ((CORBA::SystemException)) = 0; - - /// A factory method for Consumer_Config objects - virtual Consumer_Config_ptr - create_consumer_config (void) - ACE_THROW_SPEC ((CORBA::SystemException)) = 0; - - /** - * @fn void connect_event_supplier (Supplier_Config_ptr supplier_config) - * - * Connects an event supplier using the options specified by - * @c supplier_config. - */ - virtual void connect_event_supplier ( - Supplier_Config_ptr supplier_config - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - CORBA::SystemException)) = 0; - - /** - * @fn void connect_event_consumer (Consumer_Config_ptr consumer_config) - * - * Connects an event consumer using the options specified by - * @c consumer_config. - */ - virtual void connect_event_consumer ( - Consumer_Config_ptr consumer_config - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - CORBA::SystemException)) = 0; - - /** - * @fn void disconnect_event_supplier () - * - * Disconnects the event supplier associated with this object. - */ - virtual void disconnect_event_supplier ( - const char * consumer_id - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - CORBA::SystemException, - Components::InvalidConnection)) = 0; - - /** - * @fn void disconnect_event_consumer (CONNECTION_ID consumer_id) - * - * Disconnects the event consumer with UUID @c consumer_id. - */ - virtual void disconnect_event_consumer ( - const char * consumer_id - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - CORBA::SystemException, - Components::InvalidConnection)) = 0; - - /** - * @fn void push_event (Components::EventBase * ev) - * - * Pushes event @c ev to all consumers. - */ - virtual void push_event ( - Components::EventBase * ev - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - CORBA::SystemException)) = 0; - }; - - class Event_Consumer_Config_Base : - public virtual POA_CIAO::Consumer_Config - { - public: - virtual void start_conjunction_group ( - ::CORBA::Long size - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) = 0; - - virtual void start_disjunction_group ( - ::CORBA::Long size - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) = 0; - - virtual void insert_source ( - const char * source_id - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) = 0; - - virtual void insert_type ( - ::CORBA::Long event_type - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)) = 0; - }; -} - -#include /**/ "ace/post.h" -#endif /* CIAO_EVENTSERVICEBASE_H */ diff --git a/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_Events.idl b/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_Events.idl deleted file mode 100644 index bcfcca9ef93..00000000000 --- a/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_Events.idl +++ /dev/null @@ -1,69 +0,0 @@ -// $Id$ - -/** - * @file CIAO_Events.idl - * - * @author George Edwards <g.edwards@vanderbilt.edu> - * @author Gan Deng <dengg@dre.vanderbilt.edu> - * - * @brief Interfaces for configuring CIAO's event mechanism. - */ - -#include "ciao/CCM_Event.idl" - -module CIAO -{ - /// A component's UUID + port name. - typedef string CONNECTION_ID; - - enum EventServiceType - { - DIRECT, - EC, - RTEC, - NOTIFY, - RTNOTIFY - }; - - interface Supplier_Config - { - attribute CONNECTION_ID supplier_id; - - readonly attribute EventServiceType service_type; - - void destroy (); - }; - - interface Consumer_Config : Supplier_Config - { - attribute CONNECTION_ID consumer_id; - attribute Components::EventConsumerBase consumer; - - void start_conjunction_group (in long size); - - void start_disjunction_group (in long size); - - void insert_source (in CONNECTION_ID source_id); - - void insert_type (in long event_type); - }; - - interface CIAO_Event_Service : Components::EventConsumerBase - { - Supplier_Config create_supplier_config (); - - Consumer_Config create_consumer_config (); - - void connect_event_supplier (in Supplier_Config supplier_conf); - - void connect_event_consumer (in Consumer_Config consumer_conf); - - void disconnect_event_supplier (in CONNECTION_ID conn_id) - raises (Components::InvalidConnection); - - void disconnect_event_consumer (in CONNECTION_ID conn_id) - raises (Components::InvalidConnection); - - //void push_event (in Components::EventBase ev); - }; -}; diff --git a/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_Events_Base.mpc b/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_Events_Base.mpc deleted file mode 100644 index ef9688d0d5b..00000000000 --- a/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_Events_Base.mpc +++ /dev/null @@ -1,26 +0,0 @@ -// -*- MPC -*- -// $Id$ - - -project (CIAO_DnC_Events_Base) : orbsvcslib, ciao_client_dnc, ciao_container_dnc { - - sharedname = CIAO_DnC_Events_Base - idlflags += -Wb,export_include=CIAO_Events_Export.h -Wb,export_macro=CIAO_EVENTS_Export - dynamicflags = CIAO_EVENTS_BUILD_DLL - - IDL_Files { - CIAO_Events.idl - } - - Source_Files { - CIAO_EventServiceBase.cpp - CIAO_EventsC.cpp - CIAO_EventsS.cpp - } - - Header_Files { - CIAO_EventsC.h - CIAO_EventsS.h - CIAO_EventServiceBase.h - } -} diff --git a/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_Events_Export.h b/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_Events_Export.h deleted file mode 100644 index 6678cef4bcc..00000000000 --- a/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_Events_Export.h +++ /dev/null @@ -1,53 +0,0 @@ -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl CIAO_EVENTS -// ------------------------------ -#ifndef CIAO_EVENTS_EXPORT_H -#define CIAO_EVENTS_EXPORT_H - -#include "ace/config-all.h" - -#if !defined (CIAO_EVENTS_HAS_DLL) -# define CIAO_EVENTS_HAS_DLL 1 -#endif /* ! CIAO_EVENTS_HAS_DLL */ - -#if defined (CIAO_EVENTS_HAS_DLL) && (CIAO_EVENTS_HAS_DLL == 1) -# if defined (CIAO_EVENTS_BUILD_DLL) -# define CIAO_EVENTS_Export ACE_Proper_Export_Flag -# define CIAO_EVENTS_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define CIAO_EVENTS_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* CIAO_EVENTS_BUILD_DLL */ -# define CIAO_EVENTS_Export ACE_Proper_Import_Flag -# define CIAO_EVENTS_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define CIAO_EVENTS_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* CIAO_EVENTS_BUILD_DLL */ -#else /* CIAO_EVENTS_HAS_DLL == 1 */ -# define CIAO_EVENTS_Export -# define CIAO_EVENTS_SINGLETON_DECLARATION(T) -# define CIAO_EVENTS_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* CIAO_EVENTS_HAS_DLL == 1 */ - -// Set CIAO_EVENTS_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (CIAO_EVENTS_NTRACE) -# if (ACE_NTRACE == 1) -# define CIAO_EVENTS_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define CIAO_EVENTS_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !CIAO_EVENTS_NTRACE */ - -#if (CIAO_EVENTS_NTRACE == 1) -# define CIAO_EVENTS_TRACE(X) -#else /* (CIAO_EVENTS_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define CIAO_EVENTS_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (CIAO_EVENTS_NTRACE == 1) */ - -#endif /* CIAO_EVENTS_EXPORT_H */ - -// End of auto generated file. diff --git a/CIAO/ciaosvcs/Events/CIAO_Events_Export.h b/CIAO/ciaosvcs/Events/CIAO_Events_Export.h deleted file mode 100644 index 6678cef4bcc..00000000000 --- a/CIAO/ciaosvcs/Events/CIAO_Events_Export.h +++ /dev/null @@ -1,53 +0,0 @@ -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl CIAO_EVENTS -// ------------------------------ -#ifndef CIAO_EVENTS_EXPORT_H -#define CIAO_EVENTS_EXPORT_H - -#include "ace/config-all.h" - -#if !defined (CIAO_EVENTS_HAS_DLL) -# define CIAO_EVENTS_HAS_DLL 1 -#endif /* ! CIAO_EVENTS_HAS_DLL */ - -#if defined (CIAO_EVENTS_HAS_DLL) && (CIAO_EVENTS_HAS_DLL == 1) -# if defined (CIAO_EVENTS_BUILD_DLL) -# define CIAO_EVENTS_Export ACE_Proper_Export_Flag -# define CIAO_EVENTS_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define CIAO_EVENTS_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* CIAO_EVENTS_BUILD_DLL */ -# define CIAO_EVENTS_Export ACE_Proper_Import_Flag -# define CIAO_EVENTS_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define CIAO_EVENTS_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* CIAO_EVENTS_BUILD_DLL */ -#else /* CIAO_EVENTS_HAS_DLL == 1 */ -# define CIAO_EVENTS_Export -# define CIAO_EVENTS_SINGLETON_DECLARATION(T) -# define CIAO_EVENTS_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* CIAO_EVENTS_HAS_DLL == 1 */ - -// Set CIAO_EVENTS_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (CIAO_EVENTS_NTRACE) -# if (ACE_NTRACE == 1) -# define CIAO_EVENTS_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define CIAO_EVENTS_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !CIAO_EVENTS_NTRACE */ - -#if (CIAO_EVENTS_NTRACE == 1) -# define CIAO_EVENTS_TRACE(X) -#else /* (CIAO_EVENTS_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define CIAO_EVENTS_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (CIAO_EVENTS_NTRACE == 1) */ - -#endif /* CIAO_EVENTS_EXPORT_H */ - -// End of auto generated file. diff --git a/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEVENT_Export.h b/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEVENT_Export.h deleted file mode 100644 index d79e4a4581f..00000000000 --- a/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEVENT_Export.h +++ /dev/null @@ -1,58 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl CIAO_RTEVENT -// ------------------------------ -#ifndef CIAO_RTEVENT_EXPORT_H -#define CIAO_RTEVENT_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (CIAO_RTEVENT_HAS_DLL) -# define CIAO_RTEVENT_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && CIAO_RTEVENT_HAS_DLL */ - -#if !defined (CIAO_RTEVENT_HAS_DLL) -# define CIAO_RTEVENT_HAS_DLL 1 -#endif /* ! CIAO_RTEVENT_HAS_DLL */ - -#if defined (CIAO_RTEVENT_HAS_DLL) && (CIAO_RTEVENT_HAS_DLL == 1) -# if defined (CIAO_RTEVENT_BUILD_DLL) -# define CIAO_RTEVENT_Export ACE_Proper_Export_Flag -# define CIAO_RTEVENT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define CIAO_RTEVENT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* CIAO_RTEVENT_BUILD_DLL */ -# define CIAO_RTEVENT_Export ACE_Proper_Import_Flag -# define CIAO_RTEVENT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define CIAO_RTEVENT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* CIAO_RTEVENT_BUILD_DLL */ -#else /* CIAO_RTEVENT_HAS_DLL == 1 */ -# define CIAO_RTEVENT_Export -# define CIAO_RTEVENT_SINGLETON_DECLARATION(T) -# define CIAO_RTEVENT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* CIAO_RTEVENT_HAS_DLL == 1 */ - -// Set CIAO_RTEVENT_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (CIAO_RTEVENT_NTRACE) -# if (ACE_NTRACE == 1) -# define CIAO_RTEVENT_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define CIAO_RTEVENT_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !CIAO_RTEVENT_NTRACE */ - -#if (CIAO_RTEVENT_NTRACE == 1) -# define CIAO_RTEVENT_TRACE(X) -#else /* (CIAO_RTEVENT_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define CIAO_RTEVENT_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (CIAO_RTEVENT_NTRACE == 1) */ - -#endif /* CIAO_RTEVENT_EXPORT_H */ - -// End of auto generated file. diff --git a/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.cpp b/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.cpp deleted file mode 100644 index e85c8f0ee4f..00000000000 --- a/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.cpp +++ /dev/null @@ -1,624 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file CIAO_RTEvent.cpp - * - * $Id$ - * - * @author Gan Deng <dengg@dre.vanderbilt.edu> - * @author George Edwards <g.edwards@vanderbilt.edu> - */ -//============================================================================= - -#include "CIAO_RTEvent.h" -#include "ciao/CIAO_common.h" - -namespace CIAO -{ - - RTEventService::RTEventService (CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa) : - orb_ (CORBA::ORB::_duplicate (orb)), - root_poa_ (PortableServer::POA::_duplicate (poa)), - type_id_ (ACE_ES_EVENT_ANY), - source_id_ (ACE_ES_EVENT_SOURCE_ANY) - { - this->create_rt_event_channel (); - } - - - RTEventService::~RTEventService (void) - { - } - - - Supplier_Config_ptr - RTEventService::create_supplier_config (void) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - RTEvent_Supplier_Config_impl * supplier_config = 0; - ACE_NEW_RETURN (supplier_config, - RTEvent_Supplier_Config_impl (this->root_poa_.in ()), - Supplier_Config::_nil ()); - RTEvent_Supplier_Config_var return_rtec = - supplier_config->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - return return_rtec._retn (); - } - - - Consumer_Config_ptr - RTEventService::create_consumer_config (void) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - RTEvent_Consumer_Config_impl * consumer_config = 0; - ACE_NEW_RETURN (consumer_config, - RTEvent_Consumer_Config_impl (this->root_poa_.in ()), - Consumer_Config::_nil ()); - RTEvent_Consumer_Config_var return_rtec = - consumer_config->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - return return_rtec._retn (); - } - - - void - RTEventService::connect_event_supplier ( - Supplier_Config_ptr supplier_config - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - if (CIAO::debug_level () > 9) - { - ACE_DEBUG ((LM_DEBUG, "CIAO::RTEventService::connect_event_supplier\n")); - } - - RTEvent_Supplier_Config_ptr rt_config = - RTEvent_Supplier_Config::_narrow (supplier_config - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - if (CORBA::is_nil (rt_config)) - { - ACE_THROW (CORBA::BAD_PARAM ()); - } - - ACE_Hash<ACE_CString> hasher; - this->source_id_ = hasher (supplier_config->supplier_id (ACE_ENV_SINGLE_ARG_PARAMETER)); - ACE_CHECK; - this->type_id_ = this->source_id_; - - if (CIAO::debug_level () > 11) - { - ACE_DEBUG ((LM_DEBUG, "connect source id: %i\n", this->source_id_)); - } - - RtecEventChannelAdmin::SupplierAdmin_var supplier_admin = - this->rt_event_channel_->for_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->proxy_consumer_ = - supplier_admin->obtain_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - // Create and register supplier servant - RTEventServiceSupplier_impl * supplier_servant = 0; - ACE_NEW (supplier_servant, - RTEventServiceSupplier_impl (root_poa_.in ())); - RtecEventComm::PushSupplier_var push_supplier = - supplier_servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - RtecEventChannelAdmin::SupplierQOS_var qos = - rt_config->rt_event_qos (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->proxy_consumer_->connect_push_supplier (push_supplier.in (), - qos.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - - void - RTEventService::connect_event_consumer ( - Consumer_Config_ptr consumer_config - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - if (CIAO::debug_level () > 9) - { - ACE_DEBUG ((LM_DEBUG, "CIAO::RTEventService::connect_event_consumer\n")); - } - - RTEvent_Consumer_Config_ptr rt_config = - RTEvent_Consumer_Config::_narrow (consumer_config - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - if (CORBA::is_nil (rt_config)) - { - ACE_THROW (CORBA::BAD_PARAM ()); - } - - Components::EventConsumerBase_var consumer = - consumer_config->consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - if (CORBA::is_nil (consumer.in ())) - ACE_DEBUG ((LM_DEBUG, "nil event consumer\n")); - - RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin = - this->rt_event_channel_->for_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - RtecEventChannelAdmin::ProxyPushSupplier_var proxy_supplier = - consumer_admin->obtain_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - // Create and register consumer servant - RTEventServiceConsumer_impl * consumer_servant = 0; - ACE_NEW (consumer_servant, - RTEventServiceConsumer_impl ( - root_poa_.in (), - consumer.in ())); - RtecEventComm::PushConsumer_var push_consumer = - consumer_servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - //@@@ - rt_config->start_disjunction_group (1); - - rt_config->insert_type (ACE_ES_EVENT_ANY); - - RtecEventChannelAdmin::ConsumerQOS_var qos = - rt_config->rt_event_qos (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - proxy_supplier->connect_push_consumer (push_consumer.in (), - qos.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - ACE_CString consumer_id = - consumer_config->consumer_id (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->proxy_supplier_map_.bind (consumer_id.c_str (), proxy_supplier._retn ()); - } - - void - RTEventService::disconnect_event_supplier ( - const char * connection_id - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException, - Components::InvalidConnection)) - { - ACE_UNUSED_ARG (connection_id); - - this->proxy_consumer_->disconnect_push_consumer ( - ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - // What to do with the consumers?! - } - - void - RTEventService::disconnect_event_consumer ( - const char * connection_id - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException, - Components::InvalidConnection)) - { - RtecEventChannelAdmin::ProxyPushSupplier_var proxy_supplier; - - this->proxy_supplier_map_.unbind (connection_id, proxy_supplier); - - proxy_supplier->disconnect_push_supplier ( - ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - } - - void - RTEventService::push_event ( - Components::EventBase * ev - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - if (CIAO::debug_level () > 10) - { - ACE_DEBUG ((LM_DEBUG, "------CIAO::RTEventService::push_event------\n")); - } - - RtecEventComm::EventSet events (1); - events.length (1); - events[0].header.source = ACE_ES_EVENT_SOURCE_ANY; //this->source_id_; - events[0].header.type = ACE_ES_EVENT_ANY; //this->type_id_; - events[0].data.any_value <<= ev; - - this->proxy_consumer_->push (events ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - - void - RTEventService::create_rt_event_channel ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - if (CIAO::debug_level () > 10) - { - ACE_DEBUG ((LM_DEBUG, "CIAO::EventService_Factory_impl::create_rt_event_channel\n")); - } - - // @@ (GD) Anything else to do to get the svc.conf file options? - TAO_EC_Default_Factory::init_svcs (); - - TAO_EC_Event_Channel_Attributes attributes (this->root_poa_.in (), - this->root_poa_.in ()); - TAO_EC_Event_Channel * ec_servant = 0; - ACE_NEW (ec_servant, TAO_EC_Event_Channel (attributes)); - ec_servant->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - this->rt_event_channel_ = ec_servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - } - - - ////////////////////////////////////////////////////////////////////// - /// Supplier Servant Implementation - ////////////////////////////////////////////////////////////////////// - - RTEventServiceSupplier_impl::RTEventServiceSupplier_impl ( - PortableServer::POA_ptr poa) : - poa_ (PortableServer::POA::_duplicate (poa)) - { - } - - void - RTEventServiceSupplier_impl::disconnect_push_supplier (void) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - PortableServer::ObjectId_var oid = this->poa_->servant_to_id (this); - this->poa_->deactivate_object (oid); - this->_remove_ref (); - } - - ////////////////////////////////////////////////////////////////////// - /// Consumer Servant Implementation - ////////////////////////////////////////////////////////////////////// - - RTEventServiceConsumer_impl::RTEventServiceConsumer_impl ( - PortableServer::POA_ptr poa, - Components::EventConsumerBase_ptr consumer) : - poa_ (PortableServer::POA::_duplicate (poa)), - event_consumer_ (Components::EventConsumerBase::_duplicate (consumer)) - { - } - - void - RTEventServiceConsumer_impl::push (const RtecEventComm::EventSet& events) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - if (CIAO::debug_level () > 10) - { - ACE_DEBUG ((LM_DEBUG, "CIAO::RTEventServiceConsumer_impl::push\n")); - } - - for (size_t i = 0; i < events.length (); ++i) - { - Components::EventBase * ev = 0; - if (events[i].data.any_value >>= ev) - { - ev->_add_ref (); - this->event_consumer_->push_event (ev - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - } - - } - - void - RTEventServiceConsumer_impl::disconnect_push_consumer (void) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - if (CIAO::debug_level () > 10) - { - ACE_DEBUG ((LM_DEBUG, "CIAO::RTEventServiceConsumer_impl::disconnect_push_consumer\n")); - } - - PortableServer::ObjectId_var oid = this->poa_->servant_to_id (this); - this->poa_->deactivate_object (oid); - this->_remove_ref (); - } - - - ////////////////////////////////////////////////////////////////////// - /// Supplier Config Implementation - ////////////////////////////////////////////////////////////////////// - - RTEvent_Supplier_Config_impl::RTEvent_Supplier_Config_impl (PortableServer::POA_ptr poa) : - service_type_ (RTEC), - poa_ (PortableServer::POA::_duplicate (poa)) - { - } - - RTEvent_Supplier_Config_impl::~RTEvent_Supplier_Config_impl (void) - { - if (CIAO::debug_level () > 10) - { - ACE_DEBUG - ((LM_DEBUG, "RTEvent_Supplier_Config_impl::~RTEvent_Supplier_Config_impl\n")); - } - } - - void - RTEvent_Supplier_Config_impl::supplier_id ( - const char * supplier_id - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - if (CIAO::debug_level () > 11) - { - ACE_DEBUG ((LM_DEBUG, "supplier's id: %s\n", supplier_id)); - - } - - this->supplier_id_ = supplier_id; - - ACE_Hash<ACE_CString> hasher; - RtecEventComm::EventSourceID source_id = - hasher (this->supplier_id_.c_str ()); - - this->qos_.insert (source_id, - source_id, - 0, - 1); - } - - CONNECTION_ID - RTEvent_Supplier_Config_impl::supplier_id ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - return CORBA::string_dup (this->supplier_id_.c_str ()); - } - - EventServiceType - RTEvent_Supplier_Config_impl::service_type ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - return this->service_type_; - } - - RtecEventChannelAdmin::SupplierQOS * - RTEvent_Supplier_Config_impl::rt_event_qos ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - RtecEventChannelAdmin::SupplierQOS * supplier_qos = 0; - ACE_NEW_RETURN (supplier_qos, - RtecEventChannelAdmin::SupplierQOS (this->qos_.get_SupplierQOS ()), - 0); - return supplier_qos; - } - - void - RTEvent_Supplier_Config_impl::destroy ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - PortableServer::ObjectId_var oid = this->poa_->servant_to_id (this); - this->poa_->deactivate_object (oid); - this->_remove_ref (); - } - - ////////////////////////////////////////////////////////////////////// - /// Consumer Config Implementation - ////////////////////////////////////////////////////////////////////// - - RTEvent_Consumer_Config_impl::RTEvent_Consumer_Config_impl (PortableServer::POA_ptr poa) : - service_type_ (RTEC), - poa_ (PortableServer::POA::_duplicate (poa)) - { - } - - RTEvent_Consumer_Config_impl::~RTEvent_Consumer_Config_impl (void) - { - ACE_DEBUG - ((LM_DEBUG, "RTEvent_Consumer_Config_impl::~RTEvent_Consumer_Config_impl\n")); - } - - void - RTEvent_Consumer_Config_impl::start_conjunction_group ( - CORBA::Long size ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - this->qos_.start_conjunction_group (size); - } - - void - RTEvent_Consumer_Config_impl::start_disjunction_group ( - CORBA::Long size - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - this->qos_.start_disjunction_group (size); - } - - void - RTEvent_Consumer_Config_impl::insert_source ( - const char * source_id - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - - ACE_Hash<ACE_CString> hasher; - RtecEventComm::EventSourceID int_source_id = - hasher (source_id); - - this->qos_.insert_source (int_source_id, - 0); - } - - void - RTEvent_Consumer_Config_impl::insert_type ( - ::CORBA::Long event_type - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((::CORBA::SystemException)) - { - this->qos_.insert_type (event_type, - 0); - } - - void - RTEvent_Consumer_Config_impl::consumer_id ( - const char * consumer_id - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - if (CIAO::debug_level () > 10) - { - ACE_DEBUG ((LM_DEBUG, - "RTEvent_Consumer_Config_impl::set_consumer_id:%s\n", - consumer_id)); - } - - this->consumer_id_ = consumer_id; - } - - void - RTEvent_Consumer_Config_impl::supplier_id ( - const char * supplier_id - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - if (CIAO::debug_level () > 10) - { - ACE_DEBUG ((LM_DEBUG, - "RTEvent_Consumer_Config_impl::set_supplier_id:%s\n", - supplier_id)); - } - - this->supplier_id_ = supplier_id; - - ACE_Hash<ACE_CString> hasher; - RtecEventComm::EventSourceID source_id = - hasher (this->supplier_id_.c_str ()); - - this->qos_.start_disjunction_group (1); - this->qos_.insert (source_id, - source_id, - 0); - } - - void - RTEvent_Consumer_Config_impl::consumer ( - Components::EventConsumerBase_ptr consumer - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - this->consumer_ = Components::EventConsumerBase::_duplicate (consumer); - } - - CONNECTION_ID - RTEvent_Consumer_Config_impl::consumer_id ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - return CORBA::string_dup (this->consumer_id_.c_str ()); - } - - CONNECTION_ID - RTEvent_Consumer_Config_impl::supplier_id ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - if (CIAO::debug_level () > 10) - { - ACE_DEBUG ((LM_DEBUG, "RTEvent_Consumer_Config_impl::get_supplier_id\n")); - } - - return CORBA::string_dup (this->supplier_id_.c_str ()); - } - - EventServiceType - RTEvent_Consumer_Config_impl::service_type ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - return this->service_type_; - } - - Components::EventConsumerBase_ptr - RTEvent_Consumer_Config_impl::consumer ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - if (CIAO::debug_level () > 10) - { - ACE_DEBUG ((LM_DEBUG, "RTEvent_Consumer_Config_impl::get_consumer\n")); - } - - return Components::EventConsumerBase::_duplicate (this->consumer_.in ()); - } - - RtecEventChannelAdmin::ConsumerQOS * - RTEvent_Consumer_Config_impl::rt_event_qos ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - RtecEventChannelAdmin::ConsumerQOS * consumer_qos = 0; - ACE_NEW_RETURN (consumer_qos, - RtecEventChannelAdmin::ConsumerQOS (this->qos_.get_ConsumerQOS ()), - 0); - - - // @@@ Hard coded - this->qos_.start_disjunction_group (1); - this->qos_.insert_type (ACE_ES_EVENT_ANY, 0); - - return consumer_qos; - } - - void - RTEvent_Consumer_Config_impl::destroy ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - if (CIAO::debug_level () > 10) - { - ACE_DEBUG - ((LM_DEBUG, "RTEvent_Consumer_Config_impl::destroy\n")); - } - - PortableServer::ObjectId_var oid = this->poa_->servant_to_id (this); - this->poa_->deactivate_object (oid); - this->_remove_ref (); - } -} diff --git a/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.h b/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.h deleted file mode 100644 index 0ba65234b21..00000000000 --- a/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.h +++ /dev/null @@ -1,332 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file CIAO_RTEvent.h - * - * $Id$ - * - * @author Gan Deng <dengg@dre.vanderbilt.edu> - * @author George Edwards <g.edwards@vanderbilt.edu> - */ -//============================================================================= - -#ifndef CIAO_RTEVENT_H -#define CIAO_RTEVENT_H -#include /**/ "ace/pre.h" - -#include "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "CIAO_RTEVENT_Export.h" -#include "ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.h" -#include "CIAO_RTEventS.h" - -#include "orbsvcs/orbsvcs/Event_Utilities.h" -#include "orbsvcs/orbsvcs/Event/EC_Event_Channel.h" -#include "orbsvcs/orbsvcs/Event/EC_Default_Factory.h" -#include "ace/Hash_Map_Manager.h" - -namespace CIAO -{ - - /** - * @class RTEventService - * - * An implementation of EventServiceBase using the RT event channel. - * - * @@ (GD) There should be a place where the deployment tool could - * specify the RT Event Channel service configuration file. - * This should be the place where the RtecEventChannel servant was - * first time initialized. - */ - class CIAO_RTEVENT_Export RTEventService : - public virtual EventServiceBase - { - public: - - RTEventService (CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa); - - virtual ~RTEventService (void); - - virtual Supplier_Config_ptr - create_supplier_config (void) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual Consumer_Config_ptr - create_consumer_config (void) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void connect_event_supplier ( - CIAO::Supplier_Config_ptr supplier_config - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)); - - virtual void connect_event_consumer ( - CIAO::Consumer_Config_ptr consumer_config - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)); - - virtual void - disconnect_event_supplier ( - const char * consumer_id - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - CORBA::SystemException, - Components::InvalidConnection)); - - virtual void disconnect_event_consumer ( - const char * connection_id - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException, - Components::InvalidConnection)); - - virtual void push_event ( - Components::EventBase * ev - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)); - - private: - // @@ (GD) This is the place where use could provide a parameter - // which specifies the event channel service configuration file. - void create_rt_event_channel ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)); - - private: - - /// Reference to the ORB - CORBA::ORB_var orb_; - - /// Reference to the Root POA - PortableServer::POA_var root_poa_; - - /** - * @var RtecEventChannelAdmin::EventChannel_var rt_event_channel_ - * - * Reference to the RT event channel. - */ - RtecEventChannelAdmin::EventChannel_var rt_event_channel_; - - /** - * @var RtecEventComm::EventType type_id_ - * - * The type of event. - */ - RtecEventComm::EventType type_id_; - - /** - * @var RtecEventComm::EventSourceID source_id_ - * @@@ Need to change this into a map, since multiple sources - * could be connected to the event channel. - * - * The supplier id. - */ - RtecEventComm::EventSourceID source_id_; - - /** - * @var RtecEventChannelAdmin::ProxyPushConsumer_var proxy_consumer_ - * - * The proxy consumer to which events are pushed. - */ - RtecEventChannelAdmin::ProxyPushConsumer_var proxy_consumer_; - - /** - * @var ACE_Hash_Map_Manager<> proxy_supplier_map_ - * - * Mapping of each event sink to a proxy supplier for disconnect purposes. - */ - ACE_Hash_Map_Manager_Ex<ACE_CString, - RtecEventChannelAdmin::ProxyPushSupplier_ptr, - ACE_Hash<ACE_CString>, - ACE_Equal_To<ACE_CString>, - ACE_Null_Mutex> proxy_supplier_map_; - - }; - - /** - * @class RTEventServiceSupplier_impl - * - * An implementation of the PushSupplier interface. - */ - class RTEventServiceSupplier_impl : - public virtual POA_RtecEventComm::PushSupplier - { - public: - - RTEventServiceSupplier_impl ( - PortableServer::POA_ptr poa); - - virtual void disconnect_push_supplier ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)); - - private: - - PortableServer::POA_var poa_; - }; - - /** - * @class RTEventServiceConsumer_impl - * - * An implementation of the PushConsumer interface. - */ - class RTEventServiceConsumer_impl : - public virtual POA_RtecEventComm::PushConsumer - { - public: - - RTEventServiceConsumer_impl ( - PortableServer::POA_ptr poa, - Components::EventConsumerBase_ptr consumer); - - virtual void push ( - const RtecEventComm::EventSet& events) - ACE_THROW_SPEC (( - CORBA::SystemException)); - - virtual void disconnect_push_consumer ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)); - - private: - - PortableServer::POA_var poa_; - - Components::EventConsumerBase_var event_consumer_; - }; - - /** - * @class RTEvent_Consumer_Config_impl - * - * Implementation of the RTEvent_Consumer_Config IDL interface that - * configures TAO's RT event channel. An object of this type will be returned - * from @c CIAO::Container::create_consumer_config () when @c RTEC is - * specified as the event service type. - */ - class RTEvent_Consumer_Config_impl : - public virtual POA_CIAO::RTEvent_Consumer_Config, - public virtual Event_Consumer_Config_Base - { - - public: - RTEvent_Consumer_Config_impl (PortableServer::POA_ptr poa); - - virtual ~RTEvent_Consumer_Config_impl (void); - - virtual void start_conjunction_group (CORBA::Long size ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void start_disjunction_group (CORBA::Long size ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void insert_source (const char * source_id ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void insert_type (::CORBA::Long event_type - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((::CORBA::SystemException)); - - virtual void consumer_id (const char * consumer_id ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual CONNECTION_ID consumer_id (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void supplier_id (const char * supplier_id ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual CONNECTION_ID supplier_id (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void consumer (Components::EventConsumerBase_ptr consumer ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual Components::EventConsumerBase_ptr consumer (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual EventServiceType service_type (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - //@@ (GD) There should be a place where the deployment tool could - // set up the rt_event_qos properties for Consumer Config. - - virtual RtecEventChannelAdmin::ConsumerQOS * rt_event_qos (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void destroy (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - private: - - ACE_CString consumer_id_; - - ACE_CString supplier_id_; - - Components::EventConsumerBase_var consumer_; - - EventServiceType service_type_; - - ACE_ConsumerQOS_Factory qos_; - - PortableServer::POA_var poa_; - }; - - /** - * @class RTEvent_Supplier_Config_impl - * - * Implementation of the RTEvent_Supplier_Config IDL interface that - * configures TAO's RT event channel. An object of this type will be returned - * from @c CIAO::Container::create_supplier_config () when @c RTEC is - * specified as the event service type. - */ - class RTEvent_Supplier_Config_impl : - public virtual POA_CIAO::RTEvent_Supplier_Config - { - public: - RTEvent_Supplier_Config_impl (PortableServer::POA_ptr poa); - - virtual ~RTEvent_Supplier_Config_impl (void); - - void supplier_id (const char * supplier_id ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - CONNECTION_ID supplier_id (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - EventServiceType service_type (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - //@@ (GD) There should be a place where the deployment tool could - // set up the rt_event_qos properties for Supplier Config. - - RtecEventChannelAdmin::SupplierQOS * rt_event_qos (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void destroy (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - private: - ACE_CString supplier_id_; - - EventServiceType service_type_; - - ACE_SupplierQOS_Factory qos_; - - PortableServer::POA_var poa_; - }; -} - -#include /**/ "ace/post.h" -#endif /* CIAO_RTEVENT_H */ diff --git a/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.idl b/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.idl deleted file mode 100644 index b51d00ec07d..00000000000 --- a/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.idl +++ /dev/null @@ -1,38 +0,0 @@ -// $Id$ - -/** - * @file CIAO_RTEvent.idl - * - * @author Gan Deng <dengg@dre.vanderbilt.edu> - * @author George Edwards - * - * @brief Interfaces for configuring CIAO's RT event channel. - */ - -#include <ciaosvcs/Events/CIAO_Events_Base/CIAO_Events.idl> -#include <orbsvcs/orbsvcs/RtecEventChannelAdmin.idl> - -module CIAO -{ - interface RTEvent_Consumer_Config : - Consumer_Config - { - //void start_logical_and_group (in long size); - - //void start_negation (); - - //void insert_bitmasked_value (in long source_mask, - // in long type_mask, - // in long source_value, - // in long type_value); - - readonly attribute RtecEventChannelAdmin::ConsumerQOS rt_event_qos; - }; - - interface RTEvent_Supplier_Config : - Supplier_Config - { - readonly attribute RtecEventChannelAdmin::SupplierQOS rt_event_qos; - }; - -}; diff --git a/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.mpc b/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.mpc deleted file mode 100644 index 457806b3ffb..00000000000 --- a/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.mpc +++ /dev/null @@ -1,25 +0,0 @@ -// -*- MPC -*- -// $Id$ - -project (CIAO_RTEvent) : rtevent_serv, ciao_events_base_dnc { - - sharedname = CIAO_RTEvent - idlflags += -Wb,export_include=CIAO_RTEVENT_Export.h -Wb,export_macro=CIAO_RTEVENT_Export - dynamicflags = CIAO_RTEVENT_BUILD_DLL - - IDL_Files { - CIAO_RTEvent.idl - } - - Source_Files { - CIAO_RTEvent.cpp - CIAO_RTEventC.cpp - CIAO_RTEventS.cpp - } - - Header_Files { - CIAO_RTEvent.h - CIAO_RTEventC.h - CIAO_RTEventS.h - } -} |