src
matrix
double-constant.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2019,
3
* Joseph Mirabel
4
*
5
* LAAS-CNRS
6
*
7
*/
8
9
#include <
dynamic-graph/command-setter.h
>
10
11
#include <
sot/core/double-constant.hh
>
12
#include <
sot/core/factory.hh
>
13
14
namespace
dynamicgraph
{
15
namespace
sot {
16
17
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN
(DoubleConstant,
"DoubleConstant"
);
18
19
DoubleConstant::DoubleConstant
(
const
std::string &
name
)
20
:
Entity
(
name
), SOUT(
"DoubleConstant("
+
name
+
")::output(double)::sout"
) {
21
SOUT
.setDependencyType(
TimeDependency<sigtime_t>::BOOL_DEPENDENT
);
22
signalRegistration
(
SOUT
);
23
//
24
// Commands
25
26
// set
27
std::string docstring =
28
" \n"
29
" Set value of output signal\n"
30
" \n"
31
" input:\n"
32
" - a double\n"
33
" \n"
;
34
addCommand
(
"set"
, new ::dynamicgraph::command::Setter<DoubleConstant, double>(
35
*
this
, &
DoubleConstant::setValue
, docstring));
36
}
37
38
void
DoubleConstant::setValue
(
const
double
&inValue) {
39
SOUT
.setConstant(inValue);
40
}
41
42
}
// namespace sot
43
}
// namespace dynamicgraph
dynamicgraph::TimeDependency
dynamicgraph::sot::DoubleConstant::DoubleConstant
DoubleConstant(const std::string &name)
Definition:
double-constant.cpp:19
factory.hh
dynamicgraph::sot::DoubleConstant::setValue
void setValue(const double &inValue)
Set value of vector (and therefore of output signal)
Definition:
double-constant.cpp:38
dynamicgraph
dynamicgraph::Entity
dynamicgraph::sot::DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(FeaturePosture, "FeaturePosture")
command-setter.h
double-constant.hh
dynamicgraph::Entity::addCommand
void addCommand(const std::string &name, command::Command *command)
dynamicgraph::sot::DoubleConstant::SOUT
SignalTimeDependent< double, sigtime_t > SOUT
Definition:
double-constant.hh:27
dynamicgraph::Entity::signalRegistration
void signalRegistration(const SignalArray< sigtime_t > &signals)
compile.name
name
Definition:
compile.py:23
sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:31