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>
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 int& i0, const int& length) {
47  range_ = std::make_pair(i0, length);
48  }
49 
50  Segment(const std::string& name);
51 
52  private:
53  Vector& compute(Vector& output, int time);
56  // Range of the input vector that is provided as output
57  std::pair<int, int> range_;
58 }; // class Segment
59 } // namespace sot
60 } // namespace dynamicgraph
61 #endif // SOT_CORE_SEGMENT_HH
void setRange(const int &i0, const int &length)
Definition: segment.hh:46
virtual const std::string & getClassName() const
Definition: segment.hh:44
Eigen::VectorXd Vector
SignalPtr< Vector, int > inputSIN_
Definition: segment.hh:54
SignalTimeDependent< Vector, int > outputSOUT_
Definition: segment.hh:55
FCL_REAL length[2]
std::pair< int, int > range_
Definition: segment.hh:57
static const std::string CLASS_NAME
Definition: segment.hh:43


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Wed Jun 21 2023 02:51:26