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 virtual void push_nocopy (TAO_EC_ProxyPushSupplier* proxy,
00072 RtecEventComm::PushConsumer_ptr consumer,
00073 RtecEventComm::EventSet& event,
00074 TAO_EC_QOS_Info& qos_info);
00075
00076 private:
00077 ACE_Allocator *allocator_;
00078
00079 void setup_lanes (void);
00080
00081
00082 Kokyu::Dispatcher_Auto_Ptr dispatcher_;
00083
00084
00085 RtecScheduler::Scheduler_var scheduler_;
00086
00087 int lanes_setup_;
00088 int disp_sched_policy_;
00089 int disp_sched_scope_;
00090 };
00091
00092
00093
00094 class TAO_RTKokyuEvent_Export TAO_EC_Kokyu_Shutdown_Command : public Kokyu::Dispatch_Command
00095 {
00096 public:
00097
00098 TAO_EC_Kokyu_Shutdown_Command (ACE_Allocator *allocator);
00099
00100
00101 virtual int execute (void);
00102
00103 protected:
00104
00105 virtual ~TAO_EC_Kokyu_Shutdown_Command (void);
00106
00107 };
00108
00109
00110
00111 class TAO_RTKokyuEvent_Export TAO_EC_Kokyu_Push_Command : public Kokyu::Dispatch_Command
00112 {
00113 public:
00114
00115 TAO_EC_Kokyu_Push_Command (TAO_EC_ProxyPushSupplier* proxy,
00116 RtecEventComm::PushConsumer_ptr consumer,
00117 RtecEventComm::EventSet& event,
00118 ACE_Allocator* allocator);
00119
00120
00121 virtual int execute (void);
00122
00123 protected:
00124
00125 virtual ~TAO_EC_Kokyu_Push_Command (void);
00126
00127 private:
00128
00129 TAO_EC_ProxyPushSupplier* proxy_;
00130
00131
00132 RtecEventComm::PushConsumer_var consumer_;
00133
00134
00135 RtecEventComm::EventSet event_;
00136 };
00137
00138 TAO_END_VERSIONED_NAMESPACE_DECL
00139
00140 #if defined (__ACE_INLINE__)
00141 #include "orbsvcs/Event/EC_Kokyu_Dispatching.inl"
00142 #endif
00143
00144 #include "ace/post.h"
00145 #endif