mars_lib  0.1.0.3dc76ee85e09
Modular and Robust Sensor-Fusion
Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | Friends | List of all members
mars::BufferEntryType Class Reference

#include </home/runner/work/mars_lib/mars_lib/source/mars/include/mars/type_definitions/buffer_entry_type.h>

+ Collaboration diagram for mars::BufferEntryType:

Public Member Functions

 BufferEntryType ()=default
 
 BufferEntryType (const Time &timestamp, BufferDataType data, std::shared_ptr< SensorAbsClass > sensor, const int &metadata=BufferMetadataType::none)
 
bool operator< (const BufferEntryType &rhs) const
 
bool operator<= (const BufferEntryType &rhs) const
 
bool operator> (const BufferEntryType &rhs) const
 
bool operator>= (const BufferEntryType &rhs) const
 
bool IsMeasurement () const
 IsMeasurement. More...
 
bool IsValid () const
 IsValid Check if the entry is valid for usage. More...
 
bool IsAutoGenerated () const
 IsAutoGenerated. More...
 
bool HasStates () const
 HasState checks if the BufferDataType has a (core) state. More...
 
void ClearStates ()
 ClearStates resets states of the buffer entry. More...
 

Static Public Member Functions

static std::string get_metadata_label (int label)
 get_metadata_label decodes the 'BufferMetadataType' enum to strings More...
 

Public Attributes

Time timestamp_ { 0.0 }
 
BufferDataType data_ {}
 
std::shared_ptr< SensorAbsClasssensor_handle_ { nullptr }
 
int metadata_ { BufferMetadataType::invalid }
 

Private Attributes

std::set< int > metadata_valid_filter_
 
std::set< int > metadata_auto_filter_
 

Friends

std::ostream & operator<< (std::ostream &out, const BufferEntryType &entry)
 

Constructor & Destructor Documentation

◆ BufferEntryType() [1/2]

mars::BufferEntryType::BufferEntryType ( )
default

◆ BufferEntryType() [2/2]

mars::BufferEntryType::BufferEntryType ( const Time timestamp,
BufferDataType  data,
std::shared_ptr< SensorAbsClass sensor,
const int &  metadata = BufferMetadataType::none 
)

Member Function Documentation

◆ operator<()

bool mars::BufferEntryType::operator< ( const BufferEntryType rhs) const

◆ operator<=()

bool mars::BufferEntryType::operator<= ( const BufferEntryType rhs) const

◆ operator>()

bool mars::BufferEntryType::operator> ( const BufferEntryType rhs) const

◆ operator>=()

bool mars::BufferEntryType::operator>= ( const BufferEntryType rhs) const

◆ get_metadata_label()

static std::string mars::BufferEntryType::get_metadata_label ( int  label)
static

get_metadata_label decodes the 'BufferMetadataType' enum to strings

Parameters
labelenum integer of 'BufferMetadataType'
Returns
String description

◆ IsMeasurement()

bool mars::BufferEntryType::IsMeasurement ( ) const

IsMeasurement.

Returns
True if the metadata can be found in the metadata_measurement_filter_. False otherwise.

◆ IsValid()

bool mars::BufferEntryType::IsValid ( ) const

IsValid Check if the entry is valid for usage.

Returns
true valid entry
false invalid e.g. a measurement that was an outlier and no state was calculated

◆ IsAutoGenerated()

bool mars::BufferEntryType::IsAutoGenerated ( ) const

IsAutoGenerated.

Returns
True if the entry is an auto generated entry

◆ HasStates()

bool mars::BufferEntryType::HasStates ( ) const

HasState checks if the BufferDataType has a (core) state.

Returns
true if the BufferDataType contains a core state
false otherwise

◆ ClearStates()

void mars::BufferEntryType::ClearStates ( )

ClearStates resets states of the buffer entry.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const BufferEntryType entry 
)
friend

Member Data Documentation

◆ timestamp_

Time mars::BufferEntryType::timestamp_ { 0.0 }

◆ data_

BufferDataType mars::BufferEntryType::data_ {}

◆ sensor_handle_

std::shared_ptr<SensorAbsClass> mars::BufferEntryType::sensor_handle_ { nullptr }

◆ metadata_

int mars::BufferEntryType::metadata_ { BufferMetadataType::invalid }

◆ metadata_valid_filter_

std::set<int> mars::BufferEntryType::metadata_valid_filter_
private

◆ metadata_auto_filter_

std::set<int> mars::BufferEntryType::metadata_auto_filter_
private

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