diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-12-26 06:49:59 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-12-26 06:49:59 +0000 |
commit | 2b8154096bbc803712441f6fb7008318404d9c5a (patch) | |
tree | 04bf86752fb554217ff2f6e6a31a70c570e75dab /TAO/orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.cpp | |
parent | 902033831247789f0e4b3ba93ec6aea5b07ec557 (diff) | |
download | ATCD-2b8154096bbc803712441f6fb7008318404d9c5a.tar.gz |
ChangeLogTag:Tue Dec 25 22:48:32 2001 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.cpp | 57 |
1 files changed, 36 insertions, 21 deletions
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; } } |