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

RKTask Class Reference

Inheritance diagram for RKTask:

Inheritance graph
[legend]
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.


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.

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

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

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

void BeginCPUScheduling (Broker::Manager_ptr manager, 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().


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


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


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



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
timeval rkt_LastReservationLog
ofstream * rkt_ReservationLog


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.


Member Data Documentation

rk_reserve_t RKTask::rkt_CPUReserve [protected]
 

The CPU reserve for the process.

Only valid between BeginCPUScheduling and EndCPUScheduling calls.

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

Broker::Manager_var RKTask::rkt_Manager [protected]
 

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

Only valid between BeginCPUScheduling and EndCPUScheduling calls.

CORBA::String_var RKTask::rkt_Name [protected]
 

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

Invariant:
!= NULL

rk_resource_set_t RKTask::rkt_ResourceSet [protected]
 

The resource set for the process.

Invariant:
!= NULL


The documentation for this class was generated from the following files:
Generated on Mon Dec 1 16:22:43 2003 for CPUBroker by doxygen 1.3.4