include
sot
core
segment.hh
Go to the documentation of this file.
1
// BSD 2-Clause License
2
3
// Copyright (c) 2023, CNRS
4
// Author: Florent Lamiraux
5
6
// Redistribution and use in source and binary forms, with or without
7
// modification, are permitted provided that the following conditions
8
// are met:
9
10
// * Redistributions of source code must retain the above copyright
11
// notice, this list of conditions and the following disclaimer.
12
13
// * Redistributions in binary form must reproduce the above copyright
14
// notice, this list of conditions and the following disclaimer in
15
// the documentation and/or other materials provided with the
16
// distribution.
17
18
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22
// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23
// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29
// OF THE POSSIBILITY OF SUCH DAMAGE.
30
31
#ifndef SOT_CORE_SEGMENT_HH
32
#define SOT_CORE_SEGMENT_HH
33
34
#include <sot/core/config.hh>
35
#include <dynamic-graph/entity.h>
36
#include <
dynamic-graph/signal-ptr.t.cpp
>
37
#include <
dynamic-graph/signal-time-dependent.h
>
38
39
namespace
dynamicgraph
{
40
namespace
sot {
41
class
SOT_CORE_DLLAPI
Segment
:
public
Entity
{
42
public
:
43
static
const
std::string
CLASS_NAME
;
44
virtual
const
std::string&
getClassName
()
const
{
return
CLASS_NAME; }
45
// Set the range of input vector that is provided as output.
46
void
setRange
(
const
size_type
& i0,
const
size_type
&
length
) {
47
range_ = std::make_pair(i0,
length
);
48
}
49
50
Segment
(
const
std::string&
name
);
51
52
private
:
53
Vector
& compute(
Vector
& output,
sigtime_t
time);
54
SignalPtr<Vector, sigtime_t>
inputSIN_
;
55
SignalTimeDependent<Vector, sigtime_t>
outputSOUT_
;
56
// Range of the input vector that is provided as output
57
std::pair<size_type, size_type>
range_
;
58
};
// class Segment
59
}
// namespace sot
60
}
// namespace dynamicgraph
61
#endif // SOT_CORE_SEGMENT_HH
signal-time-dependent.h
dynamicgraph::SignalPtr< Vector, sigtime_t >
dynamicgraph
dynamicgraph::sot::Segment::outputSOUT_
SignalTimeDependent< Vector, sigtime_t > outputSOUT_
Definition:
segment.hh:55
signal-ptr.t.cpp
dynamicgraph::Entity
dynamicgraph::sot::Segment::setRange
void setRange(const size_type &i0, const size_type &length)
Definition:
segment.hh:46
dynamicgraph::sot::Segment::CLASS_NAME
static const std::string CLASS_NAME
Definition:
segment.hh:43
dynamicgraph::sot::Segment::getClassName
virtual const std::string & getClassName() const
Definition:
segment.hh:44
dynamicgraph::sigtime_t
int64_t sigtime_t
dynamicgraph::size_type
Matrix::Index size_type
dynamicgraph::Vector
Eigen::VectorXd Vector
dynamicgraph::sot::Segment::inputSIN_
SignalPtr< Vector, sigtime_t > inputSIN_
Definition:
segment.hh:54
dynamicgraph::sot::Segment
Definition:
segment.hh:41
dynamicgraph::SignalTimeDependent< Vector, sigtime_t >
dynamicgraph::sot::Segment::range_
std::pair< size_type, size_type > range_
Definition:
segment.hh:57
length
FCL_REAL length[2]
compile.name
name
Definition:
compile.py:23
sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:31