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

ManagerImpl Class Reference

List of all members.

Detailed Description

A default implementation of the Broker::Manager interface.

Definition at line 28 of file ManagerImpl.hh.

Public Member Functions

 ManagerImpl (const char *name)
 Construct a ManagerImpl.

virtual ~ManagerImpl ()
 Destruct a ManagerImpl.

virtual Broker::Policy_ptr CurrentPolicy (void) throw (CORBA::SystemException)
 If this value is nil, the manager will implement a straightforward default policy.

virtual void CurrentPolicy (Broker::Policy_ptr policy) throw (CORBA::SystemException)
 If this value is nil, the manager will implement a straightforward default policy.

virtual void AddTask (Broker::Task_ptr task, const Broker::ScheduleParameters &sp) throw (CORBA::SystemException, Broker::DuplicateScheduleParameter, Broker::InvalidScheduleParameter, Broker::MissingScheduleParameter)
 

virtual void RemoveTask (Broker::Task_ptr task) throw (CORBA::SystemException)
 

virtual Broker::TaskListGetTaskList (void) throw (CORBA::SystemException)
 

virtual void ChangeTaskCPU (Broker::RealTimeTask_ptr task, CORBA::ULong ct, CORBA::ULong status, CORBA::ULong advice) throw (CORBA::SystemException, Broker::InvalidState)
 Note: If there is no policy set, the manager will simply call SetComputeTime() on the given task with the given advice.


Static Public Member Functions

Broker::Task_ptr ResolveTask (CORBA::ORB_ptr orb, Broker::TaskList &tl, const char *name) throw (CORBA::SystemException)
 Search of a task name in a Broker::TaskList.


Private Member Functions

void RepairTaskList (void)
 Repair the task list by removing any dead/unreachable objects.

int TaskIndex (Broker::Task_ptr task)
 Get the index of the given task in the mi_Tasks sequence.

void RemoveTaskAt (unsigned int index)
 Remove a task object at a given index.


Private Attributes

Broker::Policy_var mi_CurrentPolicy
 The active policy object or nil.

Broker::TaskList mi_Tasks
 The list of tasks currently being managed.


Constructor & Destructor Documentation

ManagerImpl::ManagerImpl const char *  name  ) 
 

Construct a ManagerImpl.

Parameters:
name The name of this manager.

Definition at line 24 of file ManagerImpl.cc.


Member Function Documentation

void ManagerImpl::RemoveTaskAt unsigned int  index  )  [private]
 

Remove a task object at a given index.

Parameters:
index The index in mi_Tasks to remove.

Definition at line 158 of file ManagerImpl.cc.

References mi_Tasks, and require.

Referenced by RepairTaskList().

Broker::Task_ptr ManagerImpl::ResolveTask CORBA::ORB_ptr  orb,
Broker::TaskList tl,
const char *  name
throw (CORBA::SystemException) [static]
 

Search of a task name in a Broker::TaskList.

Or, if the name is an IOR return a reference to that object.

Parameters:
orb A pointer to an active CORBA::ORB object.
tl The task list to search.
name The task name or task IOR.
Returns:
An object reference that matches the given name or IOR.
Exceptions:
CORBA::BAD_PARAM if the task could not be found.

Definition at line 250 of file ManagerImpl.cc.

References orb, require, and Broker::TaskList.

Referenced by bfManagerHey(), and pfStrictPolicyHey().

int ManagerImpl::TaskIndex Broker::Task_ptr  task  )  [private]
 

Get the index of the given task in the mi_Tasks sequence.

Parameters:
task The task object to look up.
Returns:
The index of the given task in the mi_Tasks sequence or -1 if the task is not in the sequence.

Definition at line 77 of file ManagerImpl.cc.

References mi_Tasks, and require.


Member Data Documentation

Broker::TaskList ManagerImpl::mi_Tasks [private]
 

The list of tasks currently being managed.

This list will be passed to policies when they are Broker::Policy::Activate()'d.

Definition at line 123 of file ManagerImpl.hh.

Referenced by RemoveTaskAt(), RepairTaskList(), and TaskIndex().


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