periodic-call-entity.cpp
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 /* --------------------------------------------------------------------- */
11 /* --- INCLUDE --------------------------------------------------------- */
12 /* --------------------------------------------------------------------- */
13 
14 /* --- SOT --- */
15 #include <dynamic-graph/pool.h>
16 
17 #include <sot/core/debug.hh>
18 #include <sot/core/factory.hh>
20 
21 using namespace std;
22 using namespace dynamicgraph::sot;
24 
26 
27 /* --------------------------------------------------------------------- */
28 /* --- CLASS ----------------------------------------------------------- */
29 /* --------------------------------------------------------------------- */
30 
31 PeriodicCallEntity::PeriodicCallEntity(const string &fName)
32  : Entity(fName),
33  PeriodicCall(),
34  triger("Tracer(" + fName + ")::triger"),
35  trigerOnce("Tracer(" + fName + ")::trigerOnce") {
37 
39  boost::bind(&PeriodicCallEntity::trigerCall, this, _1, _2));
41  boost::bind(&PeriodicCallEntity::trigerOnceCall, this, _1, _2));
42 }
43 
45  const sigtime_t &time) {
46  run(time);
47  return dummy;
48 }
50  const sigtime_t &time) {
51  run(time);
52  clear();
53  return dummy;
54 }
55 
56 /* --------------------------------------------------------------------- */
57 /* --------------------------------------------------------------------- */
58 /* --------------------------------------------------------------------- */
59 
60 void PeriodicCallEntity::display(std::ostream &os) const {
61  os << "PeriodicCallEntity <" << name << "> ";
63 }
dynamicgraph::sot::PeriodicCallEntity::trigerOnceCall
size_type & trigerOnceCall(size_type &dummy, const sigtime_t &time)
Definition: periodic-call-entity.cpp:49
dynamicgraph::sot::PeriodicCallEntity::display
virtual void display(std::ostream &os) const
Definition: periodic-call-entity.cpp:60
dynamicgraph::sot::PeriodicCallEntity::trigerCall
size_type & trigerCall(size_type &dummy, const sigtime_t &time)
Definition: periodic-call-entity.cpp:44
factory.hh
periodic-call-entity.hh
dynamicgraph::Entity
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(PeriodicCallEntity, "PeriodicCallEntity")
dynamicgraph::Entity::name
std::string name
dynamicgraph::Signal::setFunction
virtual void setFunction(boost::function2< T &, T &, Time > t, Mutex *mutexref=NULL)
dynamicgraph::sot::PeriodicCall::run
void run(const sigtime_t &t)
Definition: periodic-call.cpp:84
debug.hh
dynamicgraph::sigtime_t
int64_t sigtime_t
dummy
DummyClass dummy
Definition: test_signal.cpp:31
size_type
dynamicgraph::size_type size_type
Definition: periodic-call-entity.cpp:23
dynamicgraph::sot::PeriodicCall::display
void display(std::ostream &os) const
Definition: periodic-call.cpp:93
dynamicgraph::sot::PeriodicCall::clear
void clear(void)
Definition: periodic-call.hh:79
dynamicgraph::size_type
Matrix::Index size_type
dynamicgraph::sot::PeriodicCallEntity
Definition: periodic-call-entity.hh:56
dynamicgraph::sot
dynamicgraph::sot::PeriodicCall
Definition: periodic-call.hh:37
dynamicgraph::sot::PeriodicCallEntity::triger
Signal< size_type, sigtime_t > triger
Definition: periodic-call-entity.hh:63
dynamicgraph::Entity::signalRegistration
void signalRegistration(const SignalArray< sigtime_t > &signals)
dynamicgraph::sot::PeriodicCallEntity::trigerOnce
Signal< size_type, sigtime_t > trigerOnce
Definition: periodic-call-entity.hh:64


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:31