cast::ManagedComponent Class Reference

#include <ManagedComponent.hpp>

Inheritance diagram for cast::ManagedComponent:

cast::WorkingMemoryReaderComponent cast::interfaces::ManagedComponent cast::WorkingMemoryWriterComponent cast::interfaces::WorkingMemoryReaderComponent cast::interfaces::WorkingMemoryReaderComponent cast::WorkingMemoryAttachedComponent cast::interfaces::WorkingMemoryAttachedComponent cast::interfaces::WorkingMemoryAttachedComponent cast::SubarchitectureComponent cast::interfaces::WorkingMemoryAttachedComponent cast::interfaces::CASTComponent cast::interfaces::CASTComponent cast::CASTComponent cast::interfaces::CASTComponent cast::interfaces::CASTComponent AssistantDirector AudienceMember cast::AbstractTester DirectAccessReader DirectAccessWriter Director ExampleManagedComponent FunnyMan PriorityTester

List of all members.

Public Member Functions

 ManagedComponent ()
virtual ~ManagedComponent ()
virtual void taskDecision (const ::std::string &,::cast::cdl::TaskManagementDecision, const ::Ice::Current &)
virtual void setTaskManager (const interfaces::TaskManagerPrx &_tm, const Ice::Current &_current)

Protected Member Functions

void stopInternal ()
virtual std::string newTaskID ()
void waitForNotifications ()

Protected Attributes

int m_taskCounter


Detailed Description

An abstract class to represent a component in a subarchitecture that can read and write to a working memory, and has its operations controlled by a task manager.

Author:
nah

Definition at line 40 of file ManagedComponent.hpp.


Constructor & Destructor Documentation

cast::ManagedComponent::ManagedComponent (  ) 

Constructor.

Parameters:
_id Unique component id.

Definition at line 31 of file ManagedComponent.cpp.

cast::ManagedComponent::~ManagedComponent (  )  [virtual]

Destructor, cleans up proposed tasks.

Definition at line 43 of file ManagedComponent.cpp.


Member Function Documentation

string cast::ManagedComponent::newTaskID (  )  [protected, virtual]

Propose the componenting of a task.

Parameters:
_taskID The id used to refer to this task.
_taskName The name of the task. Retract the proposal of componenting a task.
_taskID The id of the task. Receive a signal that an information componenting task has been accepted.
_taskID Receive a signal that an information componenting goal has been rejected.
_taskID Signal the outcome of goal componenting to the sub-architecture goal manager.
_taskID The task id.
_outcome The task outcome. Register a list of tasks that this component can perform. Input memory is consumed.
_pTaskList A sequence of task descriptions. Generate a new unique task id.
Returns:
A unique task id.

Definition at line 158 of file ManagedComponent.cpp.

virtual void cast::ManagedComponent::setTaskManager ( const interfaces::TaskManagerPrx _tm,
const Ice::Current &  _current 
) [inline, virtual]

Definition at line 83 of file ManagedComponent.hpp.

void cast::ManagedComponent::stopInternal (  )  [protected, virtual]

Reimplemented from cast::WorkingMemoryReaderComponent.

Definition at line 59 of file ManagedComponent.cpp.

virtual void cast::ManagedComponent::taskDecision ( const ::std::string &  ,
::cast::cdl::TaskManagementDecision  ,
const ::Ice::Current &   
) [inline, virtual]

Implements cast::interfaces::ManagedComponent.

Definition at line 75 of file ManagedComponent.hpp.

void cast::ManagedComponent::waitForNotifications (  )  [protected]

Mutex for controlling thread access to GDP data, not to derived class data Put the component to sleep until a new task notification is received. This method will sleep until either the taskAdopted or taskRejected functions next exit, unless these methods have exited more times than this method has been called. In this case the method does not block, as the assumption is that the component has to component these outstanding notifications first. This latter behaviour was added to fixed bug #31.

Definition at line 76 of file ManagedComponent.cpp.


Member Data Documentation

stl map of proposed tasks Counter for generating task ids.

Definition at line 167 of file ManagedComponent.hpp.


The documentation for this class was generated from the following files:

Generated on Mon Jun 13 15:55:25 2011 for CAST C++ by  doxygen 1.5.8