GCC Code Coverage Report


Directory: ./
File: include/sot/core/com-freezer.hh
Date: 2024-08-13 12:13:25
Exec Total Coverage
Lines: 0 1 0.0%
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_SOTCOMFREEZER_H_H
11 #define __SOT_SOTCOMFREEZER_H_H
12
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16
17 /* Matrix */
18 #include <dynamic-graph/linear-algebra.h>
19
20 /* SOT */
21 #include <dynamic-graph/all-signals.h>
22 #include <dynamic-graph/entity.h>
23
24 /* --------------------------------------------------------------------- */
25 /* --- API ------------------------------------------------------------- */
26 /* --------------------------------------------------------------------- */
27
28 #if defined(WIN32)
29 #if defined(com_freezer_EXPORTS)
30 #define SOTCOMFREEZER_EXPORT __declspec(dllexport)
31 #else
32 #define SOTCOMFREEZER_EXPORT __declspec(dllimport)
33 #endif
34 #else
35 #define SOTCOMFREEZER_EXPORT
36 #endif
37
38 namespace dynamicgraph {
39 namespace sot {
40
41 /* --------------------------------------------------------------------- */
42 /* --- CLASS ----------------------------------------------------------- */
43 /* --------------------------------------------------------------------- */
44
45 class SOTCOMFREEZER_EXPORT CoMFreezer : public dynamicgraph::Entity {
46 public:
47 static const std::string CLASS_NAME;
48 virtual const std::string &getClassName() const { return CLASS_NAME; }
49
50 private:
51 dynamicgraph::Vector m_lastCoM;
52 bool m_previousPGInProcess;
53 int m_lastStopTime;
54
55 public: /* --- CONSTRUCTION --- */
56 CoMFreezer(const std::string &name);
57 virtual ~CoMFreezer(void);
58
59 public: /* --- SIGNAL --- */
60 dynamicgraph::SignalPtr<dynamicgraph::Vector, int> CoMRefSIN;
61 dynamicgraph::SignalPtr<unsigned, int> PGInProcessSIN;
62 dynamicgraph::SignalTimeDependent<dynamicgraph::Vector, int> freezedCoMSOUT;
63
64 public: /* --- FUNCTION --- */
65 dynamicgraph::Vector &computeFreezedCoM(dynamicgraph::Vector &freezedCoM,
66 const int &time);
67
68 public: /* --- PARAMS --- */
69 virtual void display(std::ostream &os) const;
70 };
71
72 } /* namespace sot */
73 } /* namespace dynamicgraph */
74
75 #endif /* #ifndef __SOT_SOTCOMFREEZER_H_H */
76