Skip to content

Commit e3c8cae

Browse files
committed
Add command to control IntegratorAbstract
1 parent 83e04ee commit e3c8cae

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

include/sot/core/integrator-abstract.hh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include <dynamic-graph/entity.h>
3434
#include <dynamic-graph/pool.h>
3535
#include <dynamic-graph/all-signals.h>
36+
#include <dynamic-graph/command-bind.h>
3637
#include <sot/core/debug.hh>
3738

3839
/* STD */
@@ -69,6 +70,29 @@ class IntegratorAbstract
6970
"sotIntegratorAbstract("+name+")::output(vector)::sout")
7071
{
7172
signalRegistration( SIN<<SOUT );
73+
74+
using namespace dg::command;
75+
76+
const std::string typeName =
77+
Value::typeName(dg::command::ValueHelper<coefT>::TypeID);
78+
79+
addCommand ("pushNumCoef",
80+
makeCommandVoid1 (*this, &IntegratorAbstract::pushNumCoef,
81+
docCommandVoid1 ("Push a new numerator coefficient", typeName)
82+
));
83+
addCommand ("pushDenomCoef",
84+
makeCommandVoid1 (*this, &IntegratorAbstract::pushDenomCoef,
85+
docCommandVoid1 ("Push a new denomicator coefficient", typeName)
86+
));
87+
88+
addCommand ("popNumCoef",
89+
makeCommandVoid0 (*this, &IntegratorAbstract::popNumCoef,
90+
docCommandVoid0 ("Pop a new numerator coefficient")
91+
));
92+
addCommand ("popDenomCoef",
93+
makeCommandVoid0 (*this, &IntegratorAbstract::popDenomCoef,
94+
docCommandVoid0 ("Pop a new denomicator coefficient")
95+
));
7296
}
7397

7498
virtual ~IntegratorAbstract() {}

0 commit comments

Comments
 (0)