Public Types | Public Member Functions | Private Attributes | List of all members
corbo::IndexedValuesSignal Class Reference

Signal containing values indexed by a single integer. More...

#include <signals.h>

Inheritance diagram for corbo::IndexedValuesSignal:
Inheritance graph
[legend]

Public Types

using ConstPtr = std::shared_ptr< const IndexedValuesSignal >
 
using Ptr = std::shared_ptr< IndexedValuesSignal >
 
- Public Types inherited from corbo::SignalInterface
using ConstPtr = std::shared_ptr< const SignalInterface >
 
using Ptr = std::shared_ptr< SignalInterface >
 

Public Member Functions

void add (double value)
 Add value. More...
 
void add (const Eigen::Ref< const Eigen::VectorXd > &values)
 Add several values. More...
 
void add (const std::vector< double > &values)
 Add several values (STL version) More...
 
void clear ()
 
int getIndex () const
 Return current index. More...
 
SignalType getType () const override
 Get the signal type according to enumeration SignalType. More...
 
int getValueDimension () const
 
const std::vector< double > & getValues () const
 Read access to the underlying values object. More...
 
std::vector< double > & getValuesRef ()
 Write access to the underlying values data (use with care) More...
 
 IndexedValuesSignal ()=default
 Default constructor. More...
 
 IndexedValuesSignal (int index)
 Construct with desired index. More...
 
 IndexedValuesSignal (int index, double value)
 Construct with desired index and single value. More...
 
 IndexedValuesSignal (int index, const std::vector< double > &values)
 Construct with desired index and value vector. More...
 
 IndexedValuesSignal (int index, const Eigen::Ref< const Eigen::VectorXd > &values)
 Construct with desired index and value vector (STL version) More...
 
bool isEmpty () const
 Check if the underlying map is empty. More...
 
void set (int index, double value)
 Set index value pair (wipes off previous values) More...
 
void set (int index, const Eigen::Ref< const Eigen::VectorXd > &values)
 Set several values to the desired index (wipes off previous values) More...
 
void set (int index, const std::vector< double > &values)
 Set several values to the desired index (STL version) (wipes off previous values) More...
 
void setIndex (int index)
 Set desired index. More...
 
- Public Member Functions inherited from corbo::SignalInterface
virtual void getValueLabels (std::vector< std::string > &sublabels) const
 Return labels for the underlying components of the signal (e.g. axes labels) More...
 
virtual ~SignalInterface ()
 Virtual destructor. More...
 

Private Attributes

int _index = 0
 
std::vector< double > _values
 

Additional Inherited Members

- Public Attributes inherited from corbo::SignalInterface
SignalHeader header
 The header of the signal. More...
 

Detailed Description

Signal containing values indexed by a single integer.

See also
IndexedValuesSetSignal SignalInterface Measurement
Author
Christoph Rösmann (chris.nosp@m.toph.nosp@m..roes.nosp@m.mann.nosp@m.@tu-d.nosp@m.ortm.nosp@m.und.d.nosp@m.e)

Definition at line 390 of file signals.h.

Member Typedef Documentation

◆ ConstPtr

Definition at line 394 of file signals.h.

◆ Ptr

Definition at line 393 of file signals.h.

Constructor & Destructor Documentation

◆ IndexedValuesSignal() [1/5]

corbo::IndexedValuesSignal::IndexedValuesSignal ( )
default

Default constructor.

◆ IndexedValuesSignal() [2/5]

corbo::IndexedValuesSignal::IndexedValuesSignal ( int  index)
inlineexplicit

Construct with desired index.

Definition at line 399 of file signals.h.

◆ IndexedValuesSignal() [3/5]

corbo::IndexedValuesSignal::IndexedValuesSignal ( int  index,
double  value 
)
inline

Construct with desired index and single value.

Definition at line 401 of file signals.h.

◆ IndexedValuesSignal() [4/5]

corbo::IndexedValuesSignal::IndexedValuesSignal ( int  index,
const std::vector< double > &  values 
)
inline

Construct with desired index and value vector.

Definition at line 403 of file signals.h.

◆ IndexedValuesSignal() [5/5]

corbo::IndexedValuesSignal::IndexedValuesSignal ( int  index,
const Eigen::Ref< const Eigen::VectorXd > &  values 
)
inline

Construct with desired index and value vector (STL version)

Definition at line 405 of file signals.h.

Member Function Documentation

◆ add() [1/3]

void corbo::IndexedValuesSignal::add ( double  value)
inline

Add value.

Definition at line 420 of file signals.h.

◆ add() [2/3]

void corbo::IndexedValuesSignal::add ( const Eigen::Ref< const Eigen::VectorXd > &  values)

Add several values.

Definition at line 134 of file signals.cpp.

◆ add() [3/3]

void corbo::IndexedValuesSignal::add ( const std::vector< double > &  values)

Add several values (STL version)

Definition at line 138 of file signals.cpp.

◆ clear()

void corbo::IndexedValuesSignal::clear ( )
inline

Definition at line 441 of file signals.h.

◆ getIndex()

int corbo::IndexedValuesSignal::getIndex ( ) const
inline

Return current index.

Definition at line 434 of file signals.h.

◆ getType()

SignalType corbo::IndexedValuesSignal::getType ( ) const
inlineoverridevirtual

Get the signal type according to enumeration SignalType.

Implements corbo::SignalInterface.

Definition at line 411 of file signals.h.

◆ getValueDimension()

int corbo::IndexedValuesSignal::getValueDimension ( ) const
inline

Definition at line 414 of file signals.h.

◆ getValues()

const std::vector<double>& corbo::IndexedValuesSignal::getValues ( ) const
inline

Read access to the underlying values object.

Definition at line 436 of file signals.h.

◆ getValuesRef()

std::vector<double>& corbo::IndexedValuesSignal::getValuesRef ( )
inline

Write access to the underlying values data (use with care)

Definition at line 438 of file signals.h.

◆ isEmpty()

bool corbo::IndexedValuesSignal::isEmpty ( ) const
inline

Check if the underlying map is empty.

Definition at line 408 of file signals.h.

◆ set() [1/3]

void corbo::IndexedValuesSignal::set ( int  index,
double  value 
)

Set index value pair (wipes off previous values)

Definition at line 140 of file signals.cpp.

◆ set() [2/3]

void corbo::IndexedValuesSignal::set ( int  index,
const Eigen::Ref< const Eigen::VectorXd > &  values 
)

Set several values to the desired index (wipes off previous values)

Definition at line 146 of file signals.cpp.

◆ set() [3/3]

void corbo::IndexedValuesSignal::set ( int  index,
const std::vector< double > &  values 
)

Set several values to the desired index (STL version) (wipes off previous values)

Definition at line 152 of file signals.cpp.

◆ setIndex()

void corbo::IndexedValuesSignal::setIndex ( int  index)
inline

Set desired index.

Definition at line 417 of file signals.h.

Member Data Documentation

◆ _index

int corbo::IndexedValuesSignal::_index = 0
private

Definition at line 461 of file signals.h.

◆ _values

std::vector<double> corbo::IndexedValuesSignal::_values
private

Definition at line 462 of file signals.h.


The documentation for this class was generated from the following files:


control_box_rst
Author(s): Christoph Rösmann
autogenerated on Mon Feb 28 2022 22:08:02