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

Broker::Policy Interface Reference

Inheritance diagram for Broker::Policy:

Inheritance graph
[legend]
List of all members.

Detailed Description

A Policy provides an interface for objects that can manage contention for a resource.

See also:
StrictPolicy

Definition at line 268 of file Broker.idl.

Public Member Functions

void AddTask (in Task new_task, in ScheduleParameters sp) raises (DuplicateScheduleParameter, InvalidScheduleParameter, MissingScheduleParameter)
 Add a task to an active policy.
void RemoveTask (in Task added_task)
 Remove a task from an active policy.
TaskList GetTaskList ()
void Activate (in TaskList tasks)
 Activate the policy.
void Deactivate ()
 Deactivate an active policy.
CPUReserve ChangeTaskCPU (in RealTimeTask task, in CPUReserve advice) raises (InvalidState)
float GetMaxCPUAllocation ()
void SetMaxCPUAllocation (in float amount)

Public Attributes

readonly attribute string Name
 The name of the policy.
const float CPU_ALLOCATION_MIN = 0.01
 The minimum value that can be passed to SetMaxCPUAllocation.
const float CPU_ALLOCATION_MAX = 0.99
 The maximum value that can be passed to SetMaxCPUAllocation.


Member Function Documentation

void Broker::Policy::Activate in TaskList  tasks  ) 
 

Activate the policy.

NOTE: The policy is expected to discover and adjust the scheduling parameters of any currently executing tasks.

See also:
Deactivate
Parameters:
tasks The list of tasks the policy needs to manage.
Exceptions:
CORBA::BAD_INV_ORDER if the method is called without intervening calls to Deactivate().

void Broker::Policy::AddTask in Task  new_task,
in ScheduleParameters  sp
raises (DuplicateScheduleParameter, InvalidScheduleParameter, MissingScheduleParameter)
 

Add a task to an active policy.

NOTE: This method will be called before the reservation is made, giving the policy a chance to adjust any values.

See also:
RemoveTask
Parameters:
new_task The newly created Task object.
sp The tasks's scheduling parameters.
Exceptions:
CORBA::BAD_PARAM if task is nil.
CORBA::BAD_PARAM if task has already been added.
CORBA::BAD_INV_ORDER if the method is called without Activate() being called first.

CPUReserve Broker::Policy::ChangeTaskCPU in RealTimeTask  task,
in CPUReserve  advice
raises (InvalidState)
 

Parameters:
task The Task object requesting a CPU time change.
advice The CPU time advice from the Task object.
Returns:
The actual CPU reserve given to the task.

void Broker::Policy::Deactivate  ) 
 

Deactivate an active policy.

NOTE: The policy should change any scheduling parameters of the currently executing tasks, the next policy to be activated will handle any changes.

See also:
Deactivate
Exceptions:
CORBA::BAD_INV_ORDER if the method is called on an inactive policy.

float Broker::Policy::GetMaxCPUAllocation  ) 
 

Returns:
The maximum percentage of CPU that can be allocated to all of the tasks.

TaskList Broker::Policy::GetTaskList  ) 
 

Returns:
The list of task's managed by this policy.

void Broker::Policy::RemoveTask in Task  added_task  ) 
 

Remove a task from an active policy.

NOTE: This method will be called after the reservation has been destroyed, so it can safely reallocate the newly freed CPU time.

See also:
AddTask
Parameters:
added_task The task to remove.
Exceptions:
CORBA::BAD_PARAM if task is nil.
CORBA::BAD_PARAM if task has already been removed.
CORBA::BAD_INV_ORDER if the method is called without Activate() being called first.

void Broker::Policy::SetMaxCPUAllocation in float  amount  ) 
 

Parameters:
amount The maximum percentage of CPU that can be allocated to all of the tasks.


Member Data Documentation

const float Broker::Policy::CPU_ALLOCATION_MAX = 0.99
 

The maximum value that can be passed to SetMaxCPUAllocation.

Definition at line 370 of file Broker.idl.

const float Broker::Policy::CPU_ALLOCATION_MIN = 0.01
 

The minimum value that can be passed to SetMaxCPUAllocation.

Definition at line 365 of file Broker.idl.

readonly attribute string Broker::Policy::Name
 

The name of the policy.

Mostly useful for debugging.

Definition at line 273 of file Broker.idl.


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