00001 // -*- C++ -*- 00002 00003 /** 00004 * @file EC_Priority_Scheduling.h 00005 * 00006 * $Id: EC_Priority_Scheduling.h 76589 2007-01-25 18:04:11Z elliott_c $ 00007 * 00008 * @author Carlos O'Ryan (coryan@cs.wustl.edu) 00009 * 00010 * Based on previous work by Tim Harrison (harrison@cs.wustl.edu) and 00011 * other members of the DOC group. More details can be found in: 00012 * 00013 * http://doc.ece.uci.edu/~coryan/EC/index.html 00014 */ 00015 00016 #ifndef TAO_EC_PRIORITY_SCHEDULING_H 00017 #define TAO_EC_PRIORITY_SCHEDULING_H 00018 #include /**/ "ace/pre.h" 00019 00020 #include "orbsvcs/Event/EC_Scheduling_Strategy.h" 00021 00022 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00023 # pragma once 00024 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00025 00026 #include "orbsvcs/RtecSchedulerC.h" 00027 #include "orbsvcs/Event/sched_event_export.h" 00028 00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00030 00031 /** 00032 * @class TAO_EC_Priority_Scheduling 00033 * 00034 * @brief A scheduling strategy that uses TAO's real-time scheduler 00035 * 00036 * This implementation of the Scheduling_Strategy uses TAO's 00037 * real-time scheduler. 00038 */ 00039 class TAO_RTSchedEvent_Export TAO_EC_Priority_Scheduling : public TAO_EC_Scheduling_Strategy 00040 { 00041 public: 00042 /// Constructor. 00043 TAO_EC_Priority_Scheduling (RtecScheduler::Scheduler_ptr scheduler); 00044 00045 /// Destructor 00046 virtual ~TAO_EC_Priority_Scheduling (void); 00047 00048 virtual void add_proxy_supplier_dependencies ( 00049 TAO_EC_ProxyPushSupplier *supplier, 00050 TAO_EC_ProxyPushConsumer *consumer); 00051 virtual void schedule_event (const RtecEventComm::EventSet &event, 00052 TAO_EC_ProxyPushConsumer *consumer, 00053 TAO_EC_Supplier_Filter *filter); 00054 00055 private: 00056 TAO_EC_Priority_Scheduling (const TAO_EC_Priority_Scheduling&); 00057 TAO_EC_Priority_Scheduling& operator= (const TAO_EC_Priority_Scheduling&); 00058 00059 /// Initialize our RT_Info handle and dependencies 00060 void init_rt_info (void); 00061 00062 private: 00063 /// The scheduler we are going to use 00064 RtecScheduler::Scheduler_var scheduler_; 00065 }; 00066 00067 TAO_END_VERSIONED_NAMESPACE_DECL 00068 00069 #if defined (__ACE_INLINE__) 00070 #include "orbsvcs/Event/EC_Priority_Scheduling.inl" 00071 #endif /* __ACE_INLINE__ */ 00072 00073 #include /**/ "ace/post.h" 00074 #endif /* TAO_EC_PRIORITY_SCHEDULING_H */