GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: include/sot/core/periodic-call-entity.hh Lines: 0 2 0.0 %
Date: 2023-03-13 12:09:37 Branches: 0 0 - %

Line Branch Exec Source
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>
20
21
#include <sot/core/periodic-call-entity.hh>
22
#include <sot/core/periodic-call.hh>
23
/* STD */
24
#include <list>
25
#include <map>
26
#include <string>
27
28
/* --------------------------------------------------------------------- */
29
/* --- API ------------------------------------------------------------- */
30
/* --------------------------------------------------------------------- */
31
32
#if defined(WIN32)
33
#if defined(periodic_call_entity_EXPORTS)
34
#define PeriodicCallEntity_EXPORT __declspec(dllexport)
35
#else
36
#define PeriodicCallEntity_EXPORT __declspec(dllimport)
37
#endif
38
#else
39
#define PeriodicCallEntity_EXPORT
40
#endif
41
42
/* --------------------------------------------------------------------- */
43
/* --- CLASS ----------------------------------------------------------- */
44
/* --------------------------------------------------------------------- */
45
46
namespace dynamicgraph {
47
namespace sot {
48
49
/*!
50
  \class PeriodicCallEntity
51
52
  The entity remembers a stack of signal and command to be executed or
53
  refreshed at each iteration. The update is trigered by the triger signal.
54
  If the trigerOnce is called, the stacks are flushed after the execution.
55
*/
56
class PeriodicCallEntity_EXPORT PeriodicCallEntity
57
    : public Entity,
58
      protected sot::PeriodicCall {
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
 */