#include <EC_Gateway_Sched.h>
Inheritance diagram for TAO_EC_Gateway_Sched:
Public Member Functions | |
TAO_EC_Gateway_Sched (void) | |
~TAO_EC_Gateway_Sched (void) | |
void | init (RtecEventChannelAdmin::EventChannel_ptr supplier_ec, RtecEventChannelAdmin::EventChannel_ptr consumer_ec, RtecScheduler::Scheduler_ptr supplier_sched, RtecScheduler::Scheduler_ptr consumer_sched, const char *consumer_name, const char *supplier_name) |
Definition at line 34 of file EC_Gateway_Sched.h.
TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_EC_Gateway_Sched::TAO_EC_Gateway_Sched | ( | void | ) |
TAO_EC_Gateway_Sched::~TAO_EC_Gateway_Sched | ( | void | ) |
void TAO_EC_Gateway_Sched::init | ( | RtecEventChannelAdmin::EventChannel_ptr | supplier_ec, | |
RtecEventChannelAdmin::EventChannel_ptr | consumer_ec, | |||
RtecScheduler::Scheduler_ptr | supplier_sched, | |||
RtecScheduler::Scheduler_ptr | consumer_sched, | |||
const char * | consumer_name, | |||
const char * | supplier_name | |||
) |
To do its job this class requires to know the local and remote ECs it will connect to; furthermore it also requires to build RT_Infos for the local and remote schedulers.
Definition at line 22 of file EC_Gateway_Sched.cpp.
References ACE_GUARD, TAO_EC_Gateway_IIOP::consumer_info_, TAO_EC_Gateway_IIOP::init_i(), CORBA::is_nil(), TAO_EC_Gateway_IIOP::supplier_info_, TAO_SYNCH_MUTEX, and time().
00028 { 00029 ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_); 00030 00031 this->init_i (supplier_ec, consumer_ec); 00032 00033 // @@ Should we throw a system exception here? 00034 if (CORBA::is_nil (supplier_sched) 00035 || CORBA::is_nil (consumer_sched) 00036 || consumer_name == 0 00037 || supplier_name == 0) 00038 throw CORBA::BAD_PARAM (); 00039 00040 this->supplier_info_ = 00041 supplier_sched->create (supplier_name); 00042 00043 // @@ TODO Many things are hard-coded in the RT_Info here. 00044 00045 // The worst case execution time is far less than 500 usecs, but 00046 // that is a safe estimate.... 00047 ACE_Time_Value tv (0, 500); 00048 TimeBase::TimeT time; 00049 ORBSVCS_Time::Time_Value_to_TimeT (time, tv); 00050 supplier_sched->set (this->supplier_info_, 00051 RtecScheduler::VERY_HIGH_CRITICALITY, 00052 time, time, time, 00053 25000 * 10, 00054 RtecScheduler::VERY_LOW_IMPORTANCE, 00055 time, 00056 0, 00057 RtecScheduler::OPERATION); 00058 00059 this->consumer_info_ = 00060 consumer_sched->create (consumer_name); 00061 00062 tv = ACE_Time_Value (0, 500); 00063 ORBSVCS_Time::Time_Value_to_TimeT (time, tv); 00064 consumer_sched->set (this->consumer_info_, 00065 RtecScheduler::VERY_HIGH_CRITICALITY, 00066 time, time, time, 00067 25000 * 10, 00068 RtecScheduler::VERY_LOW_IMPORTANCE, 00069 time, 00070 1, 00071 RtecScheduler::REMOTE_DEPENDANT); 00072 }