Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

RealTimeTaskImpl.hh

Go to the documentation of this file.
00001 /*
00002  * RealTimeTaskImpl.hh
00003  *
00004  * Copyright (c) 2003, 2004 The University of Utah and the Flux Group.
00005  * All rights reserved.
00006  *
00007  * This file is licensed under the terms of the GNU Public License.  
00008  * See the file "license.terms" for restrictions on redistribution 
00009  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
00010  */
00011 
00012 /**
00013  * @file RealTimeTaskImpl.hh
00014  *
00015  * Header file for the basic implementation of Broker::RealTimeTask.
00016  */
00017 
00018 #ifndef _real_time_task_impl_hh
00019 #define _real_time_task_impl_hh
00020 
00021 #include <rk.h>
00022 
00023 #include "BrokerS.h"
00024 
00025 /**
00026  * A base implementation of the Broker::RealTimeTask interface.  An instance of
00027  * this object should be the last link in an advocate chain since it will be
00028  * responsible for passing the report on to the manager through the
00029  * ChangeTaskCPU method.
00030  */
00031 class RealTimeTaskImpl : public virtual POA_Broker::RealTimeTask
00032 {
00033     
00034 public:
00035 
00036     /**
00037      * Construct an RealTimeTaskImpl from the given parameters.  The current
00038      * set of recognized parameters are:
00039      *
00040      * @li @e name A string to be used as the name of the task.  (@e required)
00041      *
00042      * @param tp The list of parameters.
00043      *
00044      * @exception CORBA::SystemException for CORBA related errors.
00045      * @exception Broker::InvalidTaskParameter if one of the parameters is
00046      *            invalid.
00047      * @exception Broker::MissingTaskParameter if one of the required
00048      *            parameters is missing.
00049      */
00050     RealTimeTaskImpl(const Broker::TaskParameters &tp)
00051         throw (CORBA::SystemException,
00052                Broker::DuplicateTaskParameter,
00053                Broker::InvalidTaskParameter,
00054                Broker::MissingTaskParameter);
00055 
00056     /**
00057      * Destruct an RealTimeTaskImpl.
00058      */
00059     virtual ~RealTimeTaskImpl();
00060 
00061     /** @copydoc Broker::Task::Name */
00062     virtual char *Name(void)
00063         throw (CORBA::SystemException);
00064 
00065     /** @copydoc Broker::Task::SetManager */
00066     virtual void SetManager(Broker::Manager_ptr man)
00067         throw (CORBA::SystemException);
00068 
00069     /** @copydoc Broker::Task::BeginCPUScheduling */
00070     virtual void BeginCPUScheduling(const Broker::ScheduleParameters &sp)
00071         throw (CORBA::SystemException,
00072                Broker::DuplicateScheduleParameter,
00073                Broker::InvalidScheduleParameter,
00074                Broker::MissingScheduleParameter)
00075     {
00076     };
00077     
00078     /** @copydoc Broker::Task::EndCPUScheduling */
00079     virtual void EndCPUScheduling(void)
00080         throw (CORBA::SystemException)
00081     {
00082     };
00083     
00084     /** @copydoc Broker::RealTimeTask::PassCPU */
00085     virtual Broker::CPUReserve PassCPU(Broker::RealTimeTask_ptr rtt,
00086                                        const Broker::CPUReserve &status,
00087                                        const Broker::CPUReserve &advice,
00088                                        const Broker::KeyedReportParameters &krp)
00089         throw (CORBA::SystemException);
00090 
00091     /** @copydoc Broker::RealTimeTask::ReportCPU */
00092     virtual Broker::CPUReserve ReportCPU(const Broker::CPUReserve &status,
00093                                          const Broker::CPUReserve &advice,
00094                                          const Broker::KeyedReportParameters &krp)
00095         throw (CORBA::SystemException)
00096     {
00097         return this->PassCPU(this->_this(), status, advice, krp);
00098     };
00099 
00100 protected:
00101 
00102     /**
00103      * The name of the task and the resource set created for it.
00104      *
00105      * @invariant != NULL
00106      */
00107     CORBA::String_var rtti_Name;
00108 
00109     /**
00110      * The Broker::Manager used to handle scheduling during contention.  Only
00111      * valid between #BeginCPUScheduling and #EndCPUScheduling calls.
00112      */
00113     Broker::Manager_var rtti_Manager;
00114     
00115 };
00116 
00117 #endif

Generated on Tue Jun 22 14:50:09 2004 for CPU Broker by doxygen 1.3.6