include
sot
core
time-stamp.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_TIME_STAMP__HH
11
#define __SOT_TIME_STAMP__HH
12
13
/* --------------------------------------------------------------------- */
14
/* --- INCLUDE --------------------------------------------------------- */
15
/* --------------------------------------------------------------------- */
16
17
/* Matrix */
18
#include <
dynamic-graph/linear-algebra.h
>
19
20
/* Classes standards. */
21
#ifndef WIN32
22
#include <sys/time.h>
23
#else
/*WIN32*/
24
#include <
sot/core/utils-windows.hh
>
25
#endif
/*WIN32*/
26
27
/* SOT */
28
#include <
dynamic-graph/all-signals.h
>
29
#include <dynamic-graph/entity.h>
30
31
#include <
sot/core/debug.hh
>
32
33
/* --------------------------------------------------------------------- */
34
/* --- API ------------------------------------------------------------- */
35
/* --------------------------------------------------------------------- */
36
37
#if defined(WIN32)
38
#if defined(time_stamp_EXPORTS)
39
#define TimeStamp_EXPORT __declspec(dllexport)
40
#else
41
#define TimeStamp_EXPORT __declspec(dllimport)
42
#endif
43
#else
44
#define TimeStamp_EXPORT
45
#endif
46
47
/* --------------------------------------------------------------------- */
48
/* --- CLASS ----------------------------------------------------------- */
49
/* --------------------------------------------------------------------- */
50
51
namespace
dynamicgraph
{
52
namespace
sot {
53
54
class
TimeStamp_EXPORT
TimeStamp
:
public
dynamicgraph::Entity
{
55
public
:
56
static
const
std::string
CLASS_NAME
;
57
virtual
const
std::string &
getClassName
(
void
)
const
{
return
CLASS_NAME; }
58
59
protected
:
60
struct
timeval val;
61
std::size_t
offsetValue
;
62
bool
offsetSet
;
63
64
public
:
65
/* --- CONSTRUCTION --- */
66
TimeStamp
(
const
std::string &
name
);
67
68
public
:
/* --- DISPLAY --- */
69
virtual
void
display
(std::ostream &os)
const
;
70
71
public
:
/* --- SIGNALS --- */
72
/* These signals can be called several time per period, given
73
* each time a different results. Useful for chronos. */
74
dynamicgraph::Signal<dynamicgraph::Vector, sigtime_t>
timeSOUT
;
75
dynamicgraph::Signal<double, sigtime_t>
timeDoubleSOUT
;
76
77
/* These signals can be called several time per period, but give
78
* always the same results different results. Useful for synchro. */
79
dynamicgraph::SignalTimeDependent<dynamicgraph::Vector, sigtime_t>
80
timeOnceSOUT
;
81
dynamicgraph::SignalTimeDependent<double, sigtime_t>
timeOnceDoubleSOUT
;
82
83
protected
:
/* --- SIGNAL FUNCTIONS --- */
84
dynamicgraph::Vector
&getTimeStamp(
dynamicgraph::Vector
&res,
85
const
sigtime_t
&time);
86
double
&getTimeStampDouble(
const
dynamicgraph::Vector
&vect,
double
&res);
87
};
88
89
}
/* namespace sot */
90
}
/* namespace dynamicgraph */
91
92
#endif
/* #ifndef __SOT_SOT_HH */
utils-windows.hh
dynamicgraph::Signal< dynamicgraph::Vector, sigtime_t >
TimeStamp_EXPORT
#define TimeStamp_EXPORT
Definition:
time-stamp.hh:44
dynamicgraph::sot::TimeStamp::offsetSet
bool offsetSet
Definition:
time-stamp.hh:62
dynamicgraph
dynamicgraph::Entity
dynamicgraph::sot::TimeStamp::timeOnceDoubleSOUT
dynamicgraph::SignalTimeDependent< double, sigtime_t > timeOnceDoubleSOUT
Definition:
time-stamp.hh:81
debug.hh
dynamicgraph::sigtime_t
int64_t sigtime_t
dynamicgraph::sot::TimeStamp::timeDoubleSOUT
dynamicgraph::Signal< double, sigtime_t > timeDoubleSOUT
Definition:
time-stamp.hh:75
all-signals.h
display
dynamicgraph::Vector
Eigen::VectorXd Vector
linear-algebra.h
dynamicgraph::sot::TimeStamp
Definition:
time-stamp.hh:54
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, sigtime_t >
dynamicgraph::sot::TimeStamp::CLASS_NAME
static const std::string CLASS_NAME
Definition:
time-stamp.hh:56
dynamicgraph::sot::TimeStamp::timeOnceSOUT
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, sigtime_t > timeOnceSOUT
Definition:
time-stamp.hh:80
dynamicgraph::sot::TimeStamp::timeSOUT
dynamicgraph::Signal< dynamicgraph::Vector, sigtime_t > timeSOUT
Definition:
time-stamp.hh:74
dynamicgraph::sot::TimeStamp::getClassName
virtual const std::string & getClassName(void) const
Definition:
time-stamp.hh:57
dynamicgraph::sot::TimeStamp::offsetValue
std::size_t offsetValue
Definition:
time-stamp.hh:61
compile.name
name
Definition:
compile.py:23
sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:32