00001 /* 00002 * QuoAdvocate.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 QuoAdvocate.hh 00014 * 00015 * Header file for the QuoAdvocate class. 00016 */ 00017 00018 #ifndef _quo_advocate_hh 00019 #define _quo_advocate_hh 00020 00021 #include <iostream> 00022 00023 #include <RealTimeTaskDelegateImpl.hh> 00024 #include <quo/quoC.h> 00025 00026 /** 00027 * A decorator that sends the status and advice values to QuO system 00028 * conditions. 00029 */ 00030 class QuoAdvocate : public virtual RealTimeTaskDelegateImpl 00031 { 00032 00033 public: 00034 00035 /** Default constructor. */ 00036 QuoAdvocate(void); 00037 00038 /** Destructor. */ 00039 virtual ~QuoAdvocate(void); 00040 00041 /** 00042 * @copydoc BrokerDelegates::Delegate::SetDelegateAttribute 00043 * 00044 * Currently supported 'id' values are: 00045 * 00046 * @li @e status-sc The syscond to send the status value to. 00047 * @li @e advice-sc The syscond to send the advice value to. 00048 */ 00049 virtual void SetDelegateAttribute(const char *id, 00050 const CORBA::Any &value) 00051 throw (CORBA::SystemException); 00052 00053 /** 00054 * @copydoc BrokerDelegates::Delegate::GetDelegateAttribute 00055 * 00056 * Currently supported 'id' values are: 00057 * 00058 * @li @e status-sc The syscond to send the status value to. 00059 * @li @e advice-sc The syscond to send the advice value to. 00060 */ 00061 virtual CORBA::Any *GetDelegateAttribute(const char *id) 00062 throw (CORBA::SystemException); 00063 00064 /** @copydoc Broker::RealTimeTask::PassCPU */ 00065 virtual Broker::CPUReserve PassCPU(Broker::RealTimeTask_ptr rtt, 00066 const Broker::CPUReserve &status, 00067 const Broker::CPUReserve &advice, 00068 const Broker::KeyedReportParameters &krp) 00069 throw (CORBA::SystemException); 00070 00071 protected: 00072 00073 /** 00074 * The QuO system condition that should be updated with the 'status' value 00075 * given in ReportCPU. 00076 */ 00077 quo::ValueSC_var eta_Status; 00078 00079 /** 00080 * The QuO system condition that should be updated with the 'advice' value 00081 * given in ReportCPU. 00082 */ 00083 quo::ValueSC_var eta_Advice; 00084 00085 }; 00086 00087 #endif