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;
23 
25 
26 /* --------------------------------------------------------------------- */
27 /* --- CLASS ----------------------------------------------------------- */
28 /* --------------------------------------------------------------------- */
29 
30 PeriodicCallEntity::PeriodicCallEntity(const string &fName)
31  : Entity(fName),
32  PeriodicCall(),
33  triger("Tracer(" + fName + ")::triger"),
34  trigerOnce("Tracer(" + fName + ")::trigerOnce") {
36 
38  boost::bind(&PeriodicCallEntity::trigerCall, this, _1, _2));
40  boost::bind(&PeriodicCallEntity::trigerOnceCall, this, _1, _2));
41 }
42 
43 int &PeriodicCallEntity::trigerCall(int &dummy, const int &time) {
44  run(time);
45  return dummy;
46 }
47 int &PeriodicCallEntity::trigerOnceCall(int &dummy, const int &time) {
48  run(time);
49  clear();
50  return dummy;
51 }
52 
53 /* --------------------------------------------------------------------- */
54 /* --------------------------------------------------------------------- */
55 /* --------------------------------------------------------------------- */
56 
57 void PeriodicCallEntity::display(std::ostream &os) const {
58  os << "PeriodicCallEntity <" << name << "> ";
60 }
virtual void display(std::ostream &os) const
void signalRegistration(const SignalArray< int > &signals)
int & trigerCall(int &dummy, const int &time)
void display(std::ostream &os) const
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(PeriodicCallEntity, "PeriodicCallEntity")
DummyClass dummy
Definition: test_signal.cpp:31
int & trigerOnceCall(int &dummy, const int &time)
virtual void setFunction(boost::function2< T &, T &, Time > t, Mutex *mutexref=NULL)


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