File non_rt_data_collector.hpp

Collecting data in a non real-time inside a specific library and dump it in the SL format.

License:

BSD 3-clause

Copyright

Copyright (c) 2020, New York University and Max Planck Gesellschaft

namespace mim_estimation
namespace io_tools
class NonRtDataCollector : public mim_estimation::io_tools::DataCollector

Public Functions

inline NonRtDataCollector()
inline virtual ~NonRtDataCollector()
virtual void addVariable(const double *data, const std::string &name, const std::string &units)

virtual functions to add variables to data collection for different types

virtual void addVariable(const float *data, const std::string &name, const std::string &units)
virtual void addVariable(const int *data, const std::string &name, const std::string &units)
virtual void addVariable(const bool *data, const std::string &name, const std::string &units)
virtual void updateDataCollection()

virtual function to update the collection with the recently added variables

virtual void stopDataCollection()
virtual void startDataCollection()
virtual bool isDataCollectionDone()

virtual function to check whether data collection has completed:

float reverseFloat(const float inFloat)

convertion big endian and little endian

void dump(std::string path)

dump the data in SL format the

Private Members

std::deque<std::deque<double>> double_data_
std::deque<std::string> double_names_
std::deque<std::string> double_units_
std::deque<const double*> double_ptr_
std::deque<std::deque<float>> float_data_
std::deque<std::string> float_names_
std::deque<std::string> float_units_
std::deque<const float*> float_ptr_
std::deque<std::deque<int>> int_data_
std::deque<std::string> int_names_
std::deque<std::string> int_units_
std::deque<const int*> int_ptr_
std::deque<std::deque<bool>> bool_data_
std::deque<std::string> bool_names_
std::deque<std::string> bool_units_
std::deque<const bool*> bool_ptr_
bool running_