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

#include <stack-template.h>

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

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. More...
 
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. More...
 
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. More...
 
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. More...
 
void pop0 (void)
 same as pop, but no return. More...
 
virtual bool exist (const TaskGeneric &task)
 This method allows to know if a task exists or not. More...
 
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. More...
 
virtual void up (const TaskGeneric &task)
 This method makes the task to swap with the task having the immediate superior priority. More...
 
virtual void down (const TaskGeneric &task)
 This method makes the task to swap with the task having the immediate inferior priority. More...
 
virtual void clear (void)
 Remove all the tasks from the stack. More...
 
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. More...
 
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. More...
 
void pop0 (void)
 same as pop, but no return. More...
 
virtual bool exist (const TaskGeneric &task)
 This method allows to know if a task exists or not. More...
 
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. More...
 
virtual void up (const TaskGeneric &task)
 This method makes the task to swap with the task having the immediate superior priority. More...
 
virtual void down (const TaskGeneric &task)
 This method makes the task to swap with the task having the immediate inferior priority. More...
 
virtual void clear (void)
 Remove all the tasks from the stack. More...
 
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. More...
 
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. More...
 
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. More...
 

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. More...
 
int nbDofs
 Number of joints to be used to compute the control law. More...
 

Member Typedef Documentation

◆ Stack_t [1/2]

template<typename TaskGeneric>
typedef std::vector<TaskGeneric*> dynamicgraph::sot::Stack< TaskGeneric >::Stack_t
protected

◆ Stack_t [2/2]

template<typename TaskGeneric>
typedef std::vector<TaskGeneric*> dynamicgraph::sot::Stack< TaskGeneric >::Stack_t
protected

◆ StackConstIterator_t [1/2]

template<typename TaskGeneric>
typedef Stack_t::const_iterator dynamicgraph::sot::Stack< TaskGeneric >::StackConstIterator_t
protected

◆ StackConstIterator_t [2/2]

template<typename TaskGeneric>
typedef Stack_t::const_iterator dynamicgraph::sot::Stack< TaskGeneric >::StackConstIterator_t
protected

◆ StackIterator_t [1/2]

template<typename TaskGeneric>
typedef Stack_t::iterator dynamicgraph::sot::Stack< TaskGeneric >::StackIterator_t
protected

◆ StackIterator_t [2/2]

template<typename TaskGeneric>
typedef Stack_t::iterator dynamicgraph::sot::Stack< TaskGeneric >::StackIterator_t
protected

◆ TaskDependancyList_t [1/2]

template<typename TaskGeneric>
typedef std::list< const dg::SignalBase<int>* > dynamicgraph::sot::Stack< TaskGeneric >::TaskDependancyList_t

◆ TaskDependancyList_t [2/2]

template<typename TaskGeneric>
typedef std::list< const dg::SignalBase<int>* > dynamicgraph::sot::Stack< TaskGeneric >::TaskDependancyList_t

Constructor & Destructor Documentation

◆ Stack() [1/2]

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

◆ ~Stack() [1/2]

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

◆ Stack() [2/2]

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

◆ ~Stack() [2/2]

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

Member Function Documentation

◆ addDependancy() [1/2]

◆ addDependancy() [2/2]

◆ clear() [1/2]

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

Remove all the tasks from the stack.

Referenced by dynamicgraph::sot::Stack< TaskAbstract >::~Stack().

◆ clear() [2/2]

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

Remove all the tasks from the stack.

◆ defineNbDof() [1/2]

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

Change the number of DOF, ie the field nbDofs.

Referenced by dynamicgraph::sot::Stack< TaskAbstract >::~Stack().

◆ defineNbDof() [2/2]

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

Change the number of DOF, ie the field nbDofs.

◆ display() [1/2]

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

◆ display() [2/2]

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

◆ down() [1/2]

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.

Referenced by dynamicgraph::sot::Stack< TaskAbstract >::~Stack().

◆ down() [2/2]

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.

◆ downByTaskName() [1/2]

template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::downByTaskName ( const std::string &  taskName)

◆ downByTaskName() [2/2]

template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::downByTaskName ( const std::string &  taskName)

◆ exist() [1/2]

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.

◆ exist() [2/2]

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

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

Referenced by dynamicgraph::sot::Stack< TaskAbstract >::~Stack().

◆ getTaskDependancyList() [1/2]

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.

◆ getTaskDependancyList() [2/2]

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.

◆ pop() [1/2]

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.

◆ pop() [2/2]

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.

Referenced by dynamicgraph::sot::Stack< TaskAbstract >::~Stack().

◆ pop0() [1/2]

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

same as pop, but no return.

◆ pop0() [2/2]

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

same as pop, but no return.

Referenced by dynamicgraph::sot::Stack< TaskAbstract >::~Stack().

◆ push() [1/2]

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.

Referenced by dynamicgraph::sot::dyninv::SolverKine::push(), and dynamicgraph::sot::Stack< TaskAbstract >::~Stack().

◆ push() [2/2]

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.

◆ pushByTaskName() [1/2]

template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::pushByTaskName ( const std::string &  taskName)

◆ pushByTaskName() [2/2]

template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::pushByTaskName ( const std::string &  taskName)

◆ remove() [1/2]

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.

◆ remove() [2/2]

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.

◆ removeByTaskName() [1/2]

template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::removeByTaskName ( const std::string &  taskName)

◆ removeByTaskName() [2/2]

template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::removeByTaskName ( const std::string &  taskName)

◆ removeDependancy() [1/2]

◆ removeDependancy() [2/2]

◆ resetReady() [1/2]

◆ resetReady() [2/2]

◆ up() [1/2]

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.

◆ up() [2/2]

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.

Referenced by dynamicgraph::sot::Stack< TaskAbstract >::~Stack().

◆ upByTaskName() [1/2]

template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::upByTaskName ( const std::string &  taskName)

◆ upByTaskName() [2/2]

template<typename TaskGeneric>
void dynamicgraph::sot::Stack< TaskGeneric >::upByTaskName ( const std::string &  taskName)

◆ writeGraph() [1/2]

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.

◆ writeGraph() [2/2]

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

◆ NB_JOINTS_DEFAULT

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

Number of joints by default.

◆ nbDofs

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

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

◆ stack

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

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

◆ tatata

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

◆ titit

template<typename TaskGeneric>
int dynamicgraph::sot::Stack< TaskGeneric >::titit

◆ totol

template<typename TaskGeneric>
int dynamicgraph::sot::Stack< TaskGeneric >::totol