00001 /* 00002 * ExactTaskAdvocate_Quo.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 ExactTaskAdvocate_Quo.hh 00014 * 00015 * Header file for the ExactTaskAdvocate_Quo class. 00016 */ 00017 00018 #ifndef _exact_task_advocate_quo_hh 00019 #define _exact_task_advocate_quo_hh 00020 00021 #include <BrokerC.h> 00022 #include <quo/quoC.h> 00023 00024 #include "ExactTaskAdvocate.hh" 00025 00026 /** 00027 * An ExactTaskAdvocate that includes some support for Quo. 00028 * 00029 * XXX Make me a template. 00030 */ 00031 class ExactTaskAdvocate_Quo : public virtual ExactTaskAdvocate 00032 { 00033 00034 public: 00035 00036 /** 00037 * Construct an ExactTaskAdvocate_Quo object. In addition to the 00038 * parameters recognized by its parents, this implementation will 00039 * recognize: 00040 * 00041 * @li @e LastStatus A Quo system condition that will store the last 00042 * reported status value. (@e optional). 00043 * 00044 * @copydoc Broker::TaskFactory::CreateTask 00045 * 00046 * @sa RKTask::RKTask 00047 */ 00048 ExactTaskAdvocate_Quo(const Broker::TaskParameters &tp) 00049 throw (CORBA::SystemException, 00050 Broker::DuplicateTaskParameter, 00051 Broker::InvalidTaskParameter, 00052 Broker::MissingTaskParameter); 00053 00054 /** 00055 * @copydoc Broker::RealTimeAdvocate::ReportCPU 00056 * 00057 * The implementation in this subclass will call the parent's ReportCPU and 00058 * then set the LastStatus system condition. 00059 */ 00060 virtual void ReportCPU(CORBA::ULong status) 00061 throw (CORBA::SystemException, Broker::InvalidStatus); 00062 00063 /** 00064 * @return The Quo system condition that stores the last reported status 00065 * value. 00066 */ 00067 quo::ValueSC_ptr GetLastStatus(void); 00068 00069 protected: 00070 00071 /** 00072 * The Quo system condition that stores the last reported status value. 00073 */ 00074 quo::ValueSC_var eta_LastStatus; 00075 00076 }; 00077 00078 #endif