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

ManagerImpl.hh

Go to the documentation of this file.
00001 /*
00002  * ManagerImpl.hh
00003  *
00004  * Copyright (c) 2003 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 ManagerImpl.hh
00014  *
00015  * Header file for the default implementation of the Broker::Manager interface.
00016  */
00017 
00018 #ifndef _manager_impl_hh
00019 #define _manager_impl_hh
00020 
00021 #include "BrokerS.h"
00022 
00023 #include <listNode.h>
00024 
00025 /**
00026  * A default implementation of the Broker::Manager interface.
00027  */
00028 class ManagerImpl : public virtual POA_Broker::Manager
00029 {
00030 
00031 public:
00032 
00033     /**
00034      * Construct a ManagerImpl.
00035      *
00036      * @param name The name of this manager.
00037      */
00038     ManagerImpl(const char *name);
00039 
00040     /**
00041      * Destruct a ManagerImpl.
00042      */
00043     virtual ~ManagerImpl();
00044 
00045     /** @copydoc Broker::Manager::CurrentPolicy */
00046     Broker::Policy_ptr CurrentPolicy(void)
00047         throw (CORBA::SystemException);
00048     
00049     /** @copydoc Broker::Manager::CurrentPolicy */
00050     void CurrentPolicy(Broker::Policy_ptr policy)
00051         throw (CORBA::SystemException);
00052 
00053     /** @copydoc Broker::Manager::AddTask */
00054     void AddTask(Broker::Task_ptr task)
00055         throw (CORBA::SystemException);
00056 
00057     /** @copydoc Broker::Manager::RemoveTask */
00058     void RemoveTask(Broker::Task_ptr task)
00059         throw (CORBA::SystemException);
00060 
00061     /** @copydoc Broker::Manager::ChangeTaskCPU */
00062     void ChangeTaskCPU(Broker::RealTimeTask_ptr task,
00063                        CORBA::ULong ct,
00064                        CORBA::ULong status,
00065                        CORBA::ULong advice)
00066         throw (CORBA::SystemException, Broker::InvalidState);
00067     
00068 private:
00069 
00070     /**
00071      * Get the index of the given task in the mi_Tasks sequence.
00072      *
00073      * @param task The task object to look up.
00074      * @return The index of the given task in the mi_Tasks sequence or -1 if
00075      *         the task is not in the sequence.
00076      */
00077     int TaskIndex(Broker::Task_ptr task);
00078     
00079     /**
00080      * The active policy object or nil.
00081      */
00082     Broker::Policy_var mi_CurrentPolicy;
00083 
00084     /**
00085      * The list of tasks currently being managed.  This list will be passed
00086      * to policies when they are Broker::Policy::Activate()'d.
00087      */
00088     Broker::TaskList mi_Tasks;
00089     
00090 };
00091 
00092 #endif

Generated on Mon Dec 1 16:21:56 2003 for CPUBroker by doxygen 1.3.4