00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 #ifndef _stub_real_time_task_hh
00019 #define _stub_real_time_task_hh
00020 
00021 #include <time_util.h>
00022 
00023 #include "BrokerS.h"
00024 
00025 
00026 
00027 
00028 class StubRealTimeTask : public POA_Broker::RealTimeTask
00029 {
00030 
00031 public:
00032 
00033 
00034 
00035 
00036     StubRealTimeTask(const char *name)
00037     {
00038         this->srtt_Name = name;
00039     };
00040 
00041 
00042 
00043 
00044     virtual ~StubRealTimeTask()
00045     {
00046     };
00047 
00048 
00049 
00050 
00051     virtual char *Name()
00052         throw (CORBA::SystemException)
00053     {
00054         return( this->srtt_Name._retn() );
00055     };
00056 
00057 
00058     virtual void SetManager(Broker::Manager_ptr man)
00059         throw (CORBA::SystemException)
00060     {
00061         this->srtt_Manager = Broker::Manager::_duplicate(man);
00062     };
00063     
00064 
00065     virtual void BeginCPUScheduling(const Broker::ScheduleParameters &sp)
00066         throw (CORBA::SystemException,
00067                Broker::DuplicateScheduleParameter,
00068                Broker::InvalidScheduleParameter,
00069                Broker::MissingScheduleParameter)
00070     {
00071     };
00072     
00073 
00074     virtual void EndCPUScheduling(void)
00075         throw (CORBA::SystemException)
00076     {
00077     };
00078     
00079 
00080     virtual Broker::CPUReserve PassCPU(Broker::RealTimeTask_ptr rtt,
00081                                        const Broker::CPUReserve &status,
00082                                        const Broker::CPUReserve &advice,
00083                                        const Broker::KeyedReportParameters &krp)
00084         throw (CORBA::SystemException)
00085     {
00086         return this->srtt_Manager->ChangeTaskCPU(rtt, advice);
00087     };
00088 
00089 
00090     virtual Broker::CPUReserve ReportCPU(const Broker::CPUReserve &status,
00091                                          const Broker::CPUReserve &advice,
00092                                          const Broker::KeyedReportParameters &krp)
00093         throw (CORBA::SystemException)
00094     {
00095         return this->PassCPU(this->_this(), status, advice, krp);
00096     };
00097 
00098 private:
00099 
00100 
00101 
00102 
00103 
00104     Broker::Manager_var srtt_Manager;
00105     
00106 
00107 
00108 
00109     CORBA::String_var srtt_Name;
00110     
00111 };
00112 
00113 #endif