double-constant.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2019,
3  * Joseph Mirabel
4  *
5  * LAAS-CNRS
6  *
7  */
8 
10 
12 #include <sot/core/factory.hh>
13 
14 namespace dynamicgraph {
15 namespace sot {
16 
17 DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(DoubleConstant, "DoubleConstant");
18 
20  : Entity(name), SOUT("DoubleConstant(" + name + ")::output(double)::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
SignalTimeDependent< double, int > SOUT
void signalRegistration(const SignalArray< int > &signals)
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(FeaturePosture, "FeaturePosture")
virtual void setConstant(const T &t)
void setDependencyType(DependencyType dep)
DoubleConstant(const std::string &name)
void addCommand(const std::string &name, command::Command *command)
void setValue(const double &inValue)
Set value of vector (and therefore of output signal)


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Wed Jun 21 2023 02:51:26