task-pd.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2010,
3  * François Bleibel,
4  * Olivier Stasse,
5  *
6  * CNRS/AIST
7  *
8  */
9 
10 #ifndef __SOT_TASK_PD_H__
11 #define __SOT_TASK_PD_H__
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* SOT */
18 #include <sot/core/task.hh>
19 
20 /* --------------------------------------------------------------------- */
21 /* --- API ------------------------------------------------------------- */
22 /* --------------------------------------------------------------------- */
23 
24 #if defined(WIN32)
25 #if defined(task_pd_EXPORTS)
26 #define SOTTASKPD_EXPORT __declspec(dllexport)
27 #else
28 #define SOTTASKPD_EXPORT __declspec(dllimport)
29 #endif
30 #else
31 #define SOTTASKPD_EXPORT
32 #endif
33 
34 /* --------------------------------------------------------------------- */
35 /* --- CLASS ----------------------------------------------------------- */
36 /* --------------------------------------------------------------------- */
37 
38 namespace dynamicgraph {
39 namespace sot {
40 namespace dg = dynamicgraph;
41 
42 class SOTTASKPD_EXPORT TaskPD : public Task {
43 public:
44  static const std::string CLASS_NAME;
45  virtual const std::string &getClassName(void) const { return CLASS_NAME; }
46 
47  dg::Vector previousError;
48  double beta;
49 
50 public:
51  TaskPD(const std::string &n);
52 
53  /* --- COMPUTATION --- */
54  dg::Vector &computeErrorDot(dg::Vector &error, int time);
55  VectorMultiBound &computeTaskModif(VectorMultiBound &error, int time);
56 
57  /* --- SIGNALS ------------------------------------------------------------ */
58 public:
59  dg::SignalTimeDependent<dg::Vector, int> errorDotSOUT;
60  dg::SignalPtr<dg::Vector, int> errorDotSIN;
61 
62  /* --- PARAMS --- */
63  void initCommand(void);
64 };
65 
66 } /* namespace sot */
67 } /* namespace dynamicgraph */
68 
69 #endif /* #ifndef __SOT_TASK_PD_H__ */
dynamicgraph::sot::TaskPD::beta
double beta
Definition: task-pd.hh:48
dynamicgraph
Definition: abstract-sot-external-interface.hh:17
dynamicgraph::sot::VectorMultiBound
std::vector< MultiBound > VectorMultiBound
Definition: multi-bound.hh:68
task.hh
dynamicgraph::sot::TaskPD::getClassName
virtual const std::string & getClassName(void) const
Definition: task-pd.hh:45
dynamicgraph::sot::TaskPD::CLASS_NAME
static const std::string CLASS_NAME
Definition: task-pd.hh:44
dynamicgraph::sot::TaskPD::errorDotSOUT
dg::SignalTimeDependent< dg::Vector, int > errorDotSOUT
Definition: task-pd.hh:59
dynamicgraph::sot::TaskPD::previousError
dg::Vector previousError
Definition: task-pd.hh:47
dynamicgraph::sot::Task
Class that defines the basic elements of a task.
Definition: task.hh:75
SOTTASKPD_EXPORT
#define SOTTASKPD_EXPORT
Definition: task-pd.hh:31
dynamicgraph::sot::TaskPD::errorDotSIN
dg::SignalPtr< dg::Vector, int > errorDotSIN
Definition: task-pd.hh:60
dynamicgraph::sot::TaskPD
Definition: task-pd.hh:42