TAO_EC_Gateway_Sched Class Reference

Extend the EC_Gateway_IIOP interface to support scheduling. More...

#include <EC_Gateway_Sched.h>

Inheritance diagram for TAO_EC_Gateway_Sched:

Inheritance graph
[legend]
Collaboration diagram for TAO_EC_Gateway_Sched:

Collaboration graph
[legend]
List of all members.

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 ACE_ENV_ARG_DECL)

Detailed Description

Extend the EC_Gateway_IIOP interface to support scheduling.

Definition at line 34 of file EC_Gateway_Sched.h.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_EC_Gateway_Sched::TAO_EC_Gateway_Sched void   ) 
 

Definition at line 12 of file EC_Gateway_Sched.cpp.

00013   :  TAO_EC_Gateway_IIOP ()
00014 {
00015 }

TAO_EC_Gateway_Sched::~TAO_EC_Gateway_Sched void   ) 
 

Definition at line 17 of file EC_Gateway_Sched.cpp.

00018 {
00019 }


Member Function Documentation

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  ACE_ENV_ARG_DECL
 

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.

Todo:
part of the RT_Info is hardcoded, we need to make it parametric.

Definition at line 22 of file EC_Gateway_Sched.cpp.

References ACE_CHECK, ACE_ENV_ARG_PARAMETER, ACE_GUARD, ACE_THROW, ACE_Time_Value, TAO_EC_Gateway_IIOP::init_i(), CORBA::is_nil(), and TAO_SYNCH_MUTEX.

00029 {
00030   ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_);
00031 
00032   this->init_i (supplier_ec, consumer_ec ACE_ENV_ARG_PARAMETER);
00033   ACE_CHECK;
00034 
00035   // @@ Should we throw a system exception here?
00036   if (CORBA::is_nil (supplier_sched)
00037       || CORBA::is_nil (consumer_sched)
00038       || consumer_name == 0
00039       || supplier_name == 0)
00040     ACE_THROW (CORBA::BAD_PARAM ());
00041 
00042   this->supplier_info_ =
00043     supplier_sched->create (supplier_name ACE_ENV_ARG_PARAMETER);
00044   ACE_CHECK;
00045 
00046   // @@ TODO Many things are hard-coded in the RT_Info here.
00047 
00048   // The worst case execution time is far less than 500 usecs, but
00049   // that is a safe estimate....
00050   ACE_Time_Value tv (0, 500);
00051   TimeBase::TimeT time;
00052   ORBSVCS_Time::Time_Value_to_TimeT (time, tv);
00053   supplier_sched->set (this->supplier_info_,
00054                        RtecScheduler::VERY_HIGH_CRITICALITY,
00055                        time, time, time,
00056                        25000 * 10,
00057                        RtecScheduler::VERY_LOW_IMPORTANCE,
00058                        time,
00059                        0,
00060                        RtecScheduler::OPERATION
00061                        ACE_ENV_ARG_PARAMETER);
00062   ACE_CHECK;
00063 
00064   this->consumer_info_ =
00065     consumer_sched->create (consumer_name ACE_ENV_ARG_PARAMETER);
00066   ACE_CHECK;
00067 
00068   tv = ACE_Time_Value (0, 500);
00069   ORBSVCS_Time::Time_Value_to_TimeT (time, tv);
00070   consumer_sched->set (this->consumer_info_,
00071                        RtecScheduler::VERY_HIGH_CRITICALITY,
00072                        time, time, time,
00073                        25000 * 10,
00074                        RtecScheduler::VERY_LOW_IMPORTANCE,
00075                        time,
00076                        1,
00077                        RtecScheduler::REMOTE_DEPENDANT
00078                        ACE_ENV_ARG_PARAMETER);
00079   ACE_CHECK;
00080 }


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:14:52 2006 for TAO_RTEvent by doxygen 1.3.6