dynamicgraph::sot::Stack< TaskGeneric > Class Template Reference

#include <stack-template.h>

Collaboration diagram for dynamicgraph::sot::Stack< TaskGeneric >:
[legend]

List of all members.

Public Types

typedef std::list< const
dg::SignalBase< int > * > 
TaskDependancyList_t
typedef std::list< const
dg::SignalBase< int > * > 
TaskDependancyList_t

Public Member Functions

 Stack (void)
 ~Stack (void)
virtual TaskDependancyList_t getTaskDependancyList (const TaskGeneric &task)=0
 Return the signal to be added/removed from the dependancy list of the control signal.
virtual void addDependancy (const TaskDependancyList_t &depList)=0
virtual void removeDependancy (const TaskDependancyList_t &depList)=0
virtual void resetReady (void)=0
 Stack (void)
 ~Stack (void)
virtual TaskDependancyList_t getTaskDependancyList (const TaskGeneric &task)=0
 Return the signal to be added/removed from the dependancy list of the control signal.
virtual void addDependancy (const TaskDependancyList_t &depList)=0
virtual void removeDependancy (const TaskDependancyList_t &depList)=0
virtual void resetReady (void)=0
Methods to handle the stack.
virtual void push (TaskGeneric &task)
 Push the task in the stack. It has a lowest priority than the previous ones. If this is the first task, then it has the highest priority.
virtual TaskGeneric & pop (void)
 Pop the task from the stack. This method removes the task with the smallest priority in the task. The other are projected in the null-space of their predecessors.
void pop0 (void)
 same as pop, but no return.
virtual bool exist (const TaskGeneric &task)
 This method allows to know if a task exists or not.
virtual void remove (const TaskGeneric &task)
 Remove a task regardless to its position in the stack. It removes also the signals connected to the output signal of this stack.
virtual void up (const TaskGeneric &task)
 This method makes the task to swap with the task having the immediate superior priority.
virtual void down (const TaskGeneric &task)
 This method makes the task to swap with the task having the immediate inferior priority.
virtual void clear (void)
 Remove all the tasks from the stack.
virtual void defineNbDof (const int &nbDof)
virtual void push (TaskGeneric &task)
 Push the task in the stack. It has a lowest priority than the previous ones. If this is the first task, then it has the highest priority.
virtual TaskGeneric & pop (void)
 Pop the task from the stack. This method removes the task with the smallest priority in the task. The other are projected in the null-space of their predecessors.
void pop0 (void)
 same as pop, but no return.
virtual bool exist (const TaskGeneric &task)
 This method allows to know if a task exists or not.
virtual void remove (const TaskGeneric &task)
 Remove a task regardless to its position in the stack. It removes also the signals connected to the output signal of this stack.
virtual void up (const TaskGeneric &task)
 This method makes the task to swap with the task having the immediate superior priority.
virtual void down (const TaskGeneric &task)
 This method makes the task to swap with the task having the immediate inferior priority.
virtual void clear (void)
 Remove all the tasks from the stack.
virtual void defineNbDof (const int &nbDof)
Methods to display the stack of tasks.
virtual void display (std::ostream &os) const
virtual std::ostream & writeGraph (const std::string &name, std::ostream &os) const
 Write the priority between tasks in the outstream os.
virtual void display (std::ostream &os) const
virtual std::ostream & writeGraph (const std::string &name, std::ostream &os) const
 Write the priority between tasks in the outstream os.
void pushByTaskName (const std::string &taskName)
void removeByTaskName (const std::string &taskName)
void upByTaskName (const std::string &taskName)
void downByTaskName (const std::string &taskName)
void pushByTaskName (const std::string &taskName)
void removeByTaskName (const std::string &taskName)
void upByTaskName (const std::string &taskName)
void downByTaskName (const std::string &taskName)

Public Attributes

dg::SignalBase< int > * tatata
int titit
int totol

Static Public Attributes

static const unsigned int NB_JOINTS_DEFAULT = 46
 Number of joints by default.

Protected Types

typedef std::vector
< TaskGeneric * > 
Stack_t
typedef Stack_t::iterator StackIterator_t
typedef Stack_t::const_iterator StackConstIterator_t
typedef std::vector
< TaskGeneric * > 
Stack_t
typedef Stack_t::iterator StackIterator_t
typedef Stack_t::const_iterator StackConstIterator_t

Protected Attributes

Stack_t stack
 List of task (controllers) managed by the stack of tasks.
int nbDofs
 Number of joints to be used to compute the control law.

template<typename TaskGeneric>
class dynamicgraph::sot::Stack< TaskGeneric >


Member Typedef Documentation

template<typename TaskGeneric>
typedef std::vector<TaskGeneric*> dynamicgraph::sot::Stack< TaskGeneric >::Stack_t [protected]
template<typename TaskGeneric>
typedef std::vector<TaskGeneric*> dynamicgraph::sot::Stack< TaskGeneric >::Stack_t [protected]
template<typename TaskGeneric>
typedef Stack_t::const_iterator dynamicgraph::sot::Stack< TaskGeneric >::StackConstIterator_t [protected]
template<typename TaskGeneric>
typedef Stack_t::const_iterator dynamicgraph::sot::Stack< TaskGeneric >::StackConstIterator_t [protected]
template<typename TaskGeneric>
typedef Stack_t::iterator dynamicgraph::sot::Stack< TaskGeneric >::StackIterator_t [protected]
template<typename TaskGeneric>
typedef Stack_t::iterator dynamicgraph::sot::Stack< TaskGeneric >::StackIterator_t [protected]
template<typename TaskGeneric>
typedef std::list< const dg::SignalBase<int>* > dynamicgraph::sot::Stack< TaskGeneric >::TaskDependancyList_t
template<typename TaskGeneric>
typedef std::list< const dg::SignalBase<int>* > dynamicgraph::sot::Stack< TaskGeneric >::TaskDependancyList_t

Constructor & Destructor Documentation

template<typename TaskGeneric >
dynamicgraph::sot::Stack< TaskGeneric >::Stack ( void  )
template<typename TaskGeneric>
dynamicgraph::sot::Stack< TaskGeneric >::~Stack ( void  ) [inline]
template<typename TaskGeneric>
dynamicgraph::sot::Stack< TaskGeneric >::Stack ( void  )
template<typename TaskGeneric>
dynamicgraph::sot::Stack< TaskGeneric >::~Stack ( void  ) [inline]

Member Function Documentation

template<typename TaskGeneric >
void dynamicgraph::sot::Stack< TaskGeneric >::clear ( void  ) [virtual]

Remove all the tasks from the stack.

template<typename TaskGeneric>
virtual void dynamicgraph::sot::Stack< TaskGeneric >::clear ( void  ) [virtual]

Remove all the tasks from the stack.

template<typename TaskGeneric >
void dynamicgraph::sot::Stack< TaskGeneric >::defineNbDof ( const int &  nbDof) [virtual]

Change the number of DOF, ie the field nbDofs.

template<typename TaskGeneric>
virtual void dynamicgraph::sot::Stack< TaskGeneric >::defineNbDof ( const int &  nbDof) [virtual]

Change the number of DOF, ie the field nbDofs.

template<typename TaskGeneric>
virtual void dynamicgraph::sot::Stack< TaskGeneric >::display ( std::ostream &  os) const [virtual]
template<typename TaskGeneric >
void dynamicgraph::sot::Stack< TaskGeneric >::display ( std::ostream &  os) const [virtual]
template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::down ( const TaskGeneric &  task) [virtual]

This method makes the task to swap with the task having the immediate inferior priority.

template<typename TaskGeneric>
virtual void dynamicgraph::sot::Stack< TaskGeneric >::down ( const TaskGeneric &  task) [virtual]

This method makes the task to swap with the task having the immediate inferior priority.

template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::downByTaskName ( const std::string &  taskName)
template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::downByTaskName ( const std::string &  taskName)
template<typename TaskGeneric>
virtual bool dynamicgraph::sot::Stack< TaskGeneric >::exist ( const TaskGeneric &  task) [virtual]

This method allows to know if a task exists or not.

template<typename TaskGeneric>
bool dynamicgraph::sot::Stack< TaskGeneric >::exist ( const TaskGeneric &  task) [virtual]

This method allows to know if a task exists or not.

template<typename TaskGeneric>
virtual TaskDependancyList_t dynamicgraph::sot::Stack< TaskGeneric >::getTaskDependancyList ( const TaskGeneric &  task) [pure virtual]

Return the signal to be added/removed from the dependancy list of the control signal.

Implemented in dynamicgraph::sot::dyninv::SolverKine, and dynamicgraph::sot::dyninv::SolverKine.

template<typename TaskGeneric>
virtual TaskDependancyList_t dynamicgraph::sot::Stack< TaskGeneric >::getTaskDependancyList ( const TaskGeneric &  task) [pure virtual]

Return the signal to be added/removed from the dependancy list of the control signal.

Implemented in dynamicgraph::sot::dyninv::SolverKine, and dynamicgraph::sot::dyninv::SolverKine.

template<typename TaskGeneric>
virtual TaskGeneric& dynamicgraph::sot::Stack< TaskGeneric >::pop ( void  ) [virtual]

Pop the task from the stack. This method removes the task with the smallest priority in the task. The other are projected in the null-space of their predecessors.

template<typename TaskGeneric >
TaskGeneric & dynamicgraph::sot::Stack< TaskGeneric >::pop ( void  ) [virtual]

Pop the task from the stack. This method removes the task with the smallest priority in the task. The other are projected in the null-space of their predecessors.

template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::pop0 ( void  )

same as pop, but no return.

template<typename TaskGeneric >
void dynamicgraph::sot::Stack< TaskGeneric >::pop0 ( void  )

same as pop, but no return.

template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::push ( TaskGeneric &  task) [virtual]

Push the task in the stack. It has a lowest priority than the previous ones. If this is the first task, then it has the highest priority.

Reimplemented in dynamicgraph::sot::dyninv::SolverKine, and dynamicgraph::sot::dyninv::SolverKine.

template<typename TaskGeneric>
virtual void dynamicgraph::sot::Stack< TaskGeneric >::push ( TaskGeneric &  task) [virtual]

Push the task in the stack. It has a lowest priority than the previous ones. If this is the first task, then it has the highest priority.

Reimplemented in dynamicgraph::sot::dyninv::SolverKine, and dynamicgraph::sot::dyninv::SolverKine.

template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::pushByTaskName ( const std::string &  taskName)
template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::pushByTaskName ( const std::string &  taskName)
template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::remove ( const TaskGeneric &  task) [virtual]

Remove a task regardless to its position in the stack. It removes also the signals connected to the output signal of this stack.

template<typename TaskGeneric>
virtual void dynamicgraph::sot::Stack< TaskGeneric >::remove ( const TaskGeneric &  task) [virtual]

Remove a task regardless to its position in the stack. It removes also the signals connected to the output signal of this stack.

template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::removeByTaskName ( const std::string &  taskName)
template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::removeByTaskName ( const std::string &  taskName)
template<typename TaskGeneric>
virtual void dynamicgraph::sot::Stack< TaskGeneric >::up ( const TaskGeneric &  task) [virtual]

This method makes the task to swap with the task having the immediate superior priority.

template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::up ( const TaskGeneric &  task) [virtual]

This method makes the task to swap with the task having the immediate superior priority.

template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::upByTaskName ( const std::string &  taskName)
template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::upByTaskName ( const std::string &  taskName)
template<typename TaskGeneric >
std::ostream & dynamicgraph::sot::Stack< TaskGeneric >::writeGraph ( const std::string &  name,
std::ostream &  os 
) const [virtual]

Write the priority between tasks in the outstream os.

template<typename TaskGeneric>
virtual std::ostream& dynamicgraph::sot::Stack< TaskGeneric >::writeGraph ( const std::string &  name,
std::ostream &  os 
) const [virtual]

Write the priority between tasks in the outstream os.


Member Data Documentation

template<typename TaskGeneric>
const unsigned int dynamicgraph::sot::Stack< TaskGeneric >::NB_JOINTS_DEFAULT = 46 [static]

Number of joints by default.

template<typename TaskGeneric>
int dynamicgraph::sot::Stack< TaskGeneric >::nbDofs [protected]

Number of joints to be used to compute the control law.

template<typename TaskGeneric>
Stack_t dynamicgraph::sot::Stack< TaskGeneric >::stack [protected]

List of task (controllers) managed by the stack of tasks.

template<typename TaskGeneric>
dg::SignalBase< int > * dynamicgraph::sot::Stack< TaskGeneric >::tatata
template<typename TaskGeneric>
int dynamicgraph::sot::Stack< TaskGeneric >::titit
template<typename TaskGeneric>
int dynamicgraph::sot::Stack< TaskGeneric >::totol