00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef TAO_EC_KOKYU_DISPATCHING_H
00018 #define TAO_EC_KOKYU_DISPATCHING_H
00019 #include "ace/pre.h"
00020
00021 #include "orbsvcs/Event/EC_Dispatching.h"
00022 #include "orbsvcs/Event/EC_ProxySupplier.h"
00023
00024 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00025 # pragma once
00026 #endif
00027
00028 #include "orbsvcs/RtecSchedulerC.h"
00029 #include "orbsvcs/Event/rtkokyu_event_export.h"
00030
00031 #include "ace/Thread_Manager.h"
00032
00033 #include "Kokyu/Kokyu.h"
00034
00035 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00036
00037 class TAO_EC_Event_Channel_Base;
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 class TAO_RTKokyuEvent_Export TAO_EC_Kokyu_Dispatching : public TAO_EC_Dispatching
00056 {
00057 public:
00058
00059
00060 TAO_EC_Kokyu_Dispatching (TAO_EC_Event_Channel_Base* ec,
00061 int sched_policy,
00062 int sched_scope);
00063
00064
00065 virtual void activate (void);
00066 virtual void shutdown (void);
00067 virtual void push (TAO_EC_ProxyPushSupplier* proxy,
00068 RtecEventComm::PushConsumer_ptr consumer,
00069 const RtecEventComm::EventSet& event,
00070 TAO_EC_QOS_Info& qos_info
00071 ACE_ENV_ARG_DECL);
00072 virtual void push_nocopy (TAO_EC_ProxyPushSupplier* proxy,
00073 RtecEventComm::PushConsumer_ptr consumer,
00074 RtecEventComm::EventSet& event,
00075 TAO_EC_QOS_Info& qos_info
00076 ACE_ENV_ARG_DECL);
00077
00078 private:
00079 ACE_Allocator *allocator_;
00080
00081 void setup_lanes (void);
00082
00083
00084 Kokyu::Dispatcher_Auto_Ptr dispatcher_;
00085
00086
00087 RtecScheduler::Scheduler_var scheduler_;
00088
00089 int lanes_setup_;
00090 int disp_sched_policy_;
00091 int disp_sched_scope_;
00092 };
00093
00094
00095
00096 class TAO_RTKokyuEvent_Export TAO_EC_Kokyu_Shutdown_Command : public Kokyu::Dispatch_Command
00097 {
00098 public:
00099
00100 TAO_EC_Kokyu_Shutdown_Command (ACE_Allocator *allocator);
00101
00102
00103 virtual int execute (void);
00104
00105 protected:
00106
00107 virtual ~TAO_EC_Kokyu_Shutdown_Command (void);
00108
00109 };
00110
00111
00112
00113 class TAO_RTKokyuEvent_Export TAO_EC_Kokyu_Push_Command : public Kokyu::Dispatch_Command
00114 {
00115 public:
00116
00117 TAO_EC_Kokyu_Push_Command (TAO_EC_ProxyPushSupplier* proxy,
00118 RtecEventComm::PushConsumer_ptr consumer,
00119 RtecEventComm::EventSet& event,
00120 ACE_Allocator* allocator);
00121
00122
00123 virtual int execute (void);
00124
00125 protected:
00126
00127 virtual ~TAO_EC_Kokyu_Push_Command (void);
00128
00129 private:
00130
00131 TAO_EC_ProxyPushSupplier* proxy_;
00132
00133
00134 RtecEventComm::PushConsumer_var consumer_;
00135
00136
00137 RtecEventComm::EventSet event_;
00138 };
00139
00140 TAO_END_VERSIONED_NAMESPACE_DECL
00141
00142 #if defined (__ACE_INLINE__)
00143 #include "orbsvcs/Event/EC_Kokyu_Dispatching.i"
00144 #endif
00145
00146 #include "ace/post.h"
00147 #endif