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

RKTask Class Reference

Collaboration diagram for RKTask:

Collaboration graph
[legend]
List of all members.

Detailed Description

An implementation of Broker::RealTimeTask for the TimeSys resource kernel.

The class will create an rk_resource_set for every process on construction and maintain it until destruction.

Definition at line 30 of file RKTask.hh.

Public Member Functions

 RKTask (const Broker::TaskParameters &tp) throw (CORBA::SystemException, Broker::DuplicateTaskParameter, Broker::InvalidTaskParameter, Broker::MissingTaskParameter)
 Construct an RKTask from the given parameters.

virtual ~RKTask ()
 Destruct an RKTask.

virtual char * Name (void) throw (CORBA::SystemException)
 Mostly useful for debugging.

virtual CORBA::ULong Period (void) throw (CORBA::SystemException)
 

virtual CORBA::ULong Deadline (void) throw (CORBA::SystemException)
 

virtual void BeginCPUScheduling (Broker::Manager_ptr man, const Broker::ScheduleParameters &cs) throw (CORBA::SystemException, Broker::DuplicateScheduleParameter, Broker::InvalidScheduleParameter, Broker::MissingScheduleParameter)
 
Parameters:
man The resource manager that will handle scheduling during contention.
cs The high level scheduling parameters.
Exceptions:
DuplicateScheduleParameter if the given schedule has a duplicate parameter.
InvalidScheduleParameter if the given schedule has an invalid parameter.
MissingScheduleParameter if the given schedule is missing a required parameter.
CORBA::BAD_INV_ORDER if the method is called without intervening calls to EndCPUScheduling().


virtual void EndCPUScheduling (void) throw (CORBA::SystemException)
 
Exceptions:
CORBA::BAD_INV_ORDER if the method is called without BeginCPUScheduling() being called first.


virtual CORBA::ULong GetComputeTime (void) throw (CORBA::SystemException)
 
Returns:
The number of microseconds of compute time.


virtual void SetComputeTime (CORBA::ULong usecs) throw (CORBA::SystemException)
 
Parameters:
usecs The number of microseconds of compute time.


virtual void ReportCPU (Broker::RealTimeTask_ptr rtt, CORBA::ULong status, CORBA::ULong advice) 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.
See also:
ChangeTaskCPU



Protected Attributes

CORBA::String_var rkt_Name
 The name of the task and the resource set created for it.

rk_resource_set_t rkt_ResourceSet
 The resource set for the process.

cpu_reserve_attr rkt_CPUReserveSpec
 Caches the value of the CPU reservation when scheduling is active and maintains the values when not active.

Broker::Manager_var rkt_Manager
 The Broker::Manager used to handle scheduling during contention.

rk_reserve_t rkt_CPUReserve
 The CPU reserve for the process.

timeval rkt_StartTime
 The time of day that this object was constructed.

timeval rkt_LastReservationLog
 The last time a reservation change was logged.

ofstream * rkt_ReservationLog
 The output stream for the reservation log file.


Constructor & Destructor Documentation

RKTask::RKTask const Broker::TaskParameters tp  )  throw (CORBA::SystemException, Broker::DuplicateTaskParameter, Broker::InvalidTaskParameter, Broker::MissingTaskParameter)
 

Construct an RKTask from the given parameters.

The current set of recognized parameters are:

  • name A string to be used as the name of the task. (required)
  • pid A long that contains the process ID to manage. (required)
Parameters:
tp The list of parameters.
Exceptions:
CORBA::SystemException for CORBA related errors.
Broker::InvalidTaskParameter if one of the parameters is invalid.
Broker::MissingTaskParameter if one of the required parameters is missing.

Definition at line 69 of file RKTask.cc.

References __XSTRING, microsec_to_timespec(), NULL_RESERVE, RK_NAME_LEN, and Broker::TaskParameters.

Here is the call graph for this function:


Member Data Documentation

rk_reserve_t RKTask::rkt_CPUReserve [protected]
 

The CPU reserve for the process.

Only valid between BeginCPUScheduling and EndCPUScheduling calls.

Definition at line 134 of file RKTask.hh.

struct cpu_reserve_attr RKTask::rkt_CPUReserveSpec [protected]
 

Caches the value of the CPU reservation when scheduling is active and maintains the values when not active.

Invariant:
.compute_time <= .period

.deadline <= .period

Definition at line 122 of file RKTask.hh.

Broker::Manager_var RKTask::rkt_Manager [protected]
 

The Broker::Manager used to handle scheduling during contention.

Only valid between BeginCPUScheduling and EndCPUScheduling calls.

Definition at line 128 of file RKTask.hh.

CORBA::String_var RKTask::rkt_Name [protected]
 

The name of the task and the resource set created for it.

Invariant:
!= NULL

Definition at line 106 of file RKTask.hh.

rk_resource_set_t RKTask::rkt_ResourceSet [protected]
 

The resource set for the process.

Invariant:
!= NULL

Definition at line 113 of file RKTask.hh.


The documentation for this class was generated from the following files:
Generated on Mon Dec 1 16:30:38 2003 for CPU Broker by doxygen 1.3.4