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

Measurement signal (value vector recorded at a specific time) More...

#include <signals.h>

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

Public Types

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

Public Member Functions

double getTime () const
 Retrieve recorded time of the measurement. More...
 
SignalType getType () const override
 Get the signal type according to enumeration SignalType. More...
 
const std::vector< std::string > & getValueLabels () const
 Access labels of signal components (might be empty if not provided) [read-only]. More...
 
void getValueLabels (std::vector< std::string > &sublabels) const override
 Return labels for the underlying components of the signal (e.g. axes labels) More...
 
std::vector< std::string > & getValueLabelsRef ()
 Access labels of signal components (might be empty if not provided, allowed to modify directly) More...
 
const std::vector< double > & getValues () const
 Access value vector (read-only) More...
 
std::vector< double > & getValuesRef ()
 Access value vector. More...
 
 Measurement ()
 Default constructor. More...
 
 Measurement (double time, const std::vector< double > &values)
 Construct measurement with a given time and value vector (Std version) More...
 
 Measurement (double time, const Eigen::Ref< const Eigen::VectorXd > &values)
 Construct measurement with a given time and value vector (Eigen version) More...
 
void set (double time, const std::vector< double > &values)
 Set a time and value vector of arbitrary dimension (overrides any existing values) More...
 
void set (double time, const Eigen::Ref< const Eigen::VectorXd > &values)
 Set a time and value vector of arbitrary dimension (overrides any existing values) More...
 
- Public Member Functions inherited from corbo::SignalInterface
virtual ~SignalInterface ()
 Virtual destructor. More...
 

Private Attributes

double _time
 measurement time More...
 
std::vector< std::string > _value_labels
 labels for value vector components (optional) More...
 
std::vector< double > _values
 corresponding value vector More...
 

Additional Inherited Members

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

Detailed Description

Measurement signal (value vector recorded at a specific time)

A measurement is meant to represent a vector of floating point numbers at a specified point in time.

See also
SignalInterface TimeSeriesSignal
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 171 of file signals.h.

Member Typedef Documentation

◆ ConstPtr

using corbo::Measurement::ConstPtr = std::shared_ptr<const Measurement>

Definition at line 175 of file signals.h.

◆ Ptr

using corbo::Measurement::Ptr = std::shared_ptr<Measurement>

Definition at line 174 of file signals.h.

Constructor & Destructor Documentation

◆ Measurement() [1/3]

corbo::Measurement::Measurement ( )
inline

Default constructor.

Definition at line 178 of file signals.h.

◆ Measurement() [2/3]

corbo::Measurement::Measurement ( double  time,
const std::vector< double > &  values 
)
inline

Construct measurement with a given time and value vector (Std version)

Definition at line 180 of file signals.h.

◆ Measurement() [3/3]

corbo::Measurement::Measurement ( double  time,
const Eigen::Ref< const Eigen::VectorXd > &  values 
)
inline

Construct measurement with a given time and value vector (Eigen version)

Definition at line 182 of file signals.h.

Member Function Documentation

◆ getTime()

double corbo::Measurement::getTime ( ) const
inline

Retrieve recorded time of the measurement.

Definition at line 207 of file signals.h.

◆ getType()

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

Get the signal type according to enumeration SignalType.

Implements corbo::SignalInterface.

Definition at line 185 of file signals.h.

◆ getValueLabels() [1/2]

const std::vector<std::string>& corbo::Measurement::getValueLabels ( ) const
inline

Access labels of signal components (might be empty if not provided) [read-only].

Definition at line 210 of file signals.h.

◆ getValueLabels() [2/2]

void corbo::Measurement::getValueLabels ( std::vector< std::string > &  sublabels) const
inlineoverridevirtual

Return labels for the underlying components of the signal (e.g. axes labels)

Reimplemented from corbo::SignalInterface.

Definition at line 215 of file signals.h.

◆ getValueLabelsRef()

std::vector<std::string>& corbo::Measurement::getValueLabelsRef ( )
inline

Access labels of signal components (might be empty if not provided, allowed to modify directly)

Definition at line 212 of file signals.h.

◆ getValues()

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

Access value vector (read-only)

Definition at line 202 of file signals.h.

◆ getValuesRef()

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

Access value vector.

Definition at line 204 of file signals.h.

◆ set() [1/2]

void corbo::Measurement::set ( double  time,
const std::vector< double > &  values 
)
inline

Set a time and value vector of arbitrary dimension (overrides any existing values)

Definition at line 188 of file signals.h.

◆ set() [2/2]

void corbo::Measurement::set ( double  time,
const Eigen::Ref< const Eigen::VectorXd > &  values 
)
inline

Set a time and value vector of arbitrary dimension (overrides any existing values)

Definition at line 195 of file signals.h.

Member Data Documentation

◆ _time

double corbo::Measurement::_time
private

measurement time

Definition at line 225 of file signals.h.

◆ _value_labels

std::vector<std::string> corbo::Measurement::_value_labels
private

labels for value vector components (optional)

Definition at line 227 of file signals.h.

◆ _values

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

corresponding value vector

Definition at line 226 of file signals.h.


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


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