sot-core  4.11.2
Hierarchical task solver plug-in for dynamic-graph.
periodic-call-entity.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_ENTITY_HH__
11 #define __SOT_PERIODICCALL_ENTITY_HH__
12 
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16 
17 /* SOT */
18 #include <dynamic-graph/all-signals.h>
19 #include <dynamic-graph/entity.h>
22 /* STD */
23 #include <list>
24 #include <map>
25 #include <string>
26 
27 /* --------------------------------------------------------------------- */
28 /* --- API ------------------------------------------------------------- */
29 /* --------------------------------------------------------------------- */
30 
31 #if defined(WIN32)
32 #if defined(periodic_call_entity_EXPORTS)
33 #define PeriodicCallEntity_EXPORT __declspec(dllexport)
34 #else
35 #define PeriodicCallEntity_EXPORT __declspec(dllimport)
36 #endif
37 #else
38 #define PeriodicCallEntity_EXPORT
39 #endif
40 
41 /* --------------------------------------------------------------------- */
42 /* --- CLASS ----------------------------------------------------------- */
43 /* --------------------------------------------------------------------- */
44 
45 namespace dynamicgraph {
46 namespace sot {
47 
56  : public Entity,
57  protected sot::PeriodicCall {
58 
59 public:
60  static const std::string CLASS_NAME;
61  virtual const std::string &getClassName(void) const { return CLASS_NAME; }
62 
63  Signal<int, int> triger;
64  Signal<int, int> trigerOnce;
65 
66  int &trigerCall(int &dummy, const int &time);
67  int &trigerOnceCall(int &dummy, const int &time);
68 
69  /* --- FUNCTIONS ------------------------------------------------------------
70  */
71 public:
72  PeriodicCallEntity(const std::string &name);
73  virtual ~PeriodicCallEntity(void) {}
74 
75  virtual void display(std::ostream &os) const;
76 };
77 
78 } // namespace sot
79 } // namespace dynamicgraph
80 
81 #endif // #ifndef __SOT_PERIODICCALL_ENTITY_HH__
82 
83 /*
84  * Local variables:
85  * c-basic-offset: 2
86  * End:
87  */
Definition: periodic-call.hh:36
static const std::string CLASS_NAME
Definition: periodic-call-entity.hh:60
Signal< int, int > trigerOnce
Definition: periodic-call-entity.hh:64
virtual ~PeriodicCallEntity(void)
Definition: periodic-call-entity.hh:73
Signal< int, int > triger
Definition: periodic-call-entity.hh:63
Definition: periodic-call-entity.hh:55
virtual const std::string & getClassName(void) const
Definition: periodic-call-entity.hh:61
Definition: abstract-sot-external-interface.hh:17
#define PeriodicCallEntity_EXPORT
Definition: periodic-call-entity.hh:38