periodic-call.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_PERIODICCALL_HH__
11 #define __SOT_PERIODICCALL_HH__
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* SOT */
18 #include <dynamic-graph/entity.h>
20 
21 #include <sot/core/api.hh>
22 /* STD */
23 #include <list>
24 #include <map>
25 #include <string>
26 
27 /* --------------------------------------------------------------------- */
28 /* --- CLASS ----------------------------------------------------------- */
29 /* --------------------------------------------------------------------- */
30 
31 namespace dynamicgraph {
32 namespace sot {
33 
38  protected:
39  struct SignalToCall {
41  std::size_t downsamplingFactor;
42 
44  signal = NULL;
45  downsamplingFactor = 1;
46  }
47 
49  signal = s;
50  downsamplingFactor = df;
51  }
52  };
53 
54  typedef std::map<std::string, SignalToCall> SignalMapType;
56 
58 
59  /* --- FUNCTIONS ------------------------------------------------------------
60  */
61  public:
62  PeriodicCall(void);
63  virtual ~PeriodicCall(void) {}
64 
65  void addDownsampledSignal(const std::string &name,
67  const std::size_t &downsamplingFactor);
68  void addDownsampledSignal(const std::string &sigpath,
69  const std::size_t &downsamplingFactor);
70 
71  void addSignal(const std::string &name,
73  void addSignal(const std::string &args);
74  void rmSignal(const std::string &name);
75 
76  void runSignals(const sigtime_t &t);
77  void run(const sigtime_t &t);
78 
79  void clear(void) { signalMap.clear(); }
80 
81  void display(std::ostream &os) const;
82 };
83 
84 } // namespace sot
85 } // namespace dynamicgraph
86 
87 #endif // #ifndef __SOT_PERIODICCALL_HH__
88 
89 /*
90  * Local variables:
91  * c-basic-offset: 2
92  * End:
93  */
dynamicgraph::sot::PeriodicCall::~PeriodicCall
virtual ~PeriodicCall(void)
Definition: periodic-call.hh:63
SOT_CORE_EXPORT
#define SOT_CORE_EXPORT
Definition: api.hh:20
signal-base.h
dynamicgraph
dynamicgraph::sot::PeriodicCall::SignalMapType
std::map< std::string, SignalToCall > SignalMapType
Definition: periodic-call.hh:54
dynamicgraph::sot::PeriodicCall::SignalToCall::SignalToCall
SignalToCall()
Definition: periodic-call.hh:43
dynamicgraph::sot::PeriodicCall::SignalToCall
Definition: periodic-call.hh:39
dynamicgraph::sot::PeriodicCall::innerTime
sigtime_t innerTime
Definition: periodic-call.hh:57
dynamicgraph::sot::PeriodicCall::SignalToCall::SignalToCall
SignalToCall(dynamicgraph::SignalBase< sigtime_t > *s, std::size_t df=1)
Definition: periodic-call.hh:48
s
s
dynamicgraph::sigtime_t
int64_t sigtime_t
api.hh
omniidl_be_python_with_docstring.run
def run(tree, args)
Definition: omniidl_be_python_with_docstring.py:140
dynamicgraph::sot::PeriodicCall::clear
void clear(void)
Definition: periodic-call.hh:79
display
dynamicgraph::sot::PeriodicCall::SignalToCall::downsamplingFactor
std::size_t downsamplingFactor
Definition: periodic-call.hh:41
dynamicgraph::sot::PeriodicCall::signalMap
SignalMapType signalMap
Definition: periodic-call.hh:55
dynamicgraph::sot::PeriodicCall
Definition: periodic-call.hh:37
dynamicgraph::sot::PeriodicCall::SignalToCall::signal
dynamicgraph::SignalBase< sigtime_t > * signal
Definition: periodic-call.hh:40
t
Transform3f t
sig
Signal< dynamicgraph::Matrix, sigtime_t > sig("matrix")
dynamicgraph::SignalBase< sigtime_t >
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