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

LoggingAdvocate Class Reference

Inheritance diagram for LoggingAdvocate:

Inheritance graph
[legend]
Collaboration diagram for LoggingAdvocate:

Collaboration graph
[legend]
List of all members.

Detailed Description

A decorator that logs the status, advice, period completion, and deadline hit/misses to individual file.

Definition at line 29 of file LoggingAdvocate.hh.

Public Member Functions

 LoggingAdvocate (void)
 Default constructor.
virtual ~LoggingAdvocate (void)
 Destructor.
virtual void SetDelegateAttribute (const char *id, const CORBA::Any &value) throw (CORBA::SystemException)
 
Parameters:
id The attribute identifier.
value The new attribute value.

virtual CORBA::Any * GetDelegateAttribute (const char *id) throw (CORBA::SystemException)
 
Parameters:
id The attribute identifier.
Returns:
The attribute's current value.

virtual Broker::CPUReserve PassCPU (Broker::RealTimeTask_ptr rtt, const Broker::CPUReserve &status, const Broker::CPUReserve &advice, const Broker::KeyedReportParameters &krp) throw (CORBA::SystemException)
 This method would then be used by adaptation proxies to change the advice parameter to their liking.

Parameters:
rtt The task object that was actually added to the manager.
status The CPU usage of the task in microseconds.
advice The amount of CPU time, in microseconds, that the application would like for the next period.
krp Non-standard report parameters that are indexed by key name.
Returns:
The actual CPU reserve given to the task.
See also:
ChangeTaskCPU


Protected Attributes

CORBA::ULong la_LastPeriod
 The length of the last period in microseconds.
timeval la_StartTime
 The time that this object was constructed.
timeval la_LastLog
 The last time a log enty was generated.
timeval la_LastCPULog
 The last time that the CPU usage was logged.
ofstream * la_CPULog
 The output stream for the CPU usage log.
timeval la_LastAdviceLog
 The last time the advice was logged.
ofstream * la_AdviceLog
 The output stream for the advice log.
ofstream * la_CompleteLog
 The output stream for the completion log.
ofstream * la_HitLog
 The output stream for the deadline hit log.
ofstream * la_MissLog
 The output stream for the deadline miss log.
CORBA::ULong la_LastAdvice
 The last advice given by this advocate.


Member Function Documentation

CORBA::Any_ptr LoggingAdvocate::GetDelegateAttribute const char *  id  )  throw (CORBA::SystemException) [virtual]
 

Parameters:
id The attribute identifier.
Returns:
The attribute's current value.

Currently supported 'id' values are:

  • last-advice The last advice given by the advocate.

Reimplemented from DelegateMixin< Broker::RealTimeTask, Broker::RealTimeTask_var >.

Definition at line 199 of file LoggingAdvocate.cc.

References DelegateMixin< Broker::RealTimeTask, Broker::RealTimeTask_var >::GetDelegateAttribute().

Here is the call graph for this function:

void LoggingAdvocate::SetDelegateAttribute const char *  id,
const CORBA::Any &  value
throw (CORBA::SystemException) [virtual]
 

Parameters:
id The attribute identifier.
value The new attribute value.

Currently supported 'id' values are:

  • cpu-log The file name where the status value should be logged.
  • advice-log The file name where the advice value should be logged.
  • complete-log The file name where the period completion times should be logged.
  • hit-log The file name where period hits should be logged.
  • miss-log The file name where period misses should be logged.

Reimplemented from DelegateMixin< Broker::RealTimeTask, Broker::RealTimeTask_var >.

Definition at line 59 of file LoggingAdvocate.cc.

References DelegateMixin< Broker::RealTimeTask, Broker::RealTimeTask_var >::SetDelegateAttribute().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Fri Oct 22 07:51:02 2004 for CPU Broker by  doxygen 1.3.9.1