65 explicit SensorData(
const std::string& file_name);
68 explicit SensorData(std::vector<std::size_t> time_steps);
75 void addTimeSeries(
const std::string &data_name, std::vector<float> *data,
const std::string &data_unit_string =
"" );
A container for sensor data at an observation site. The class stores a number of time series and has ...
const std::vector< SensorDataType > & getTimeSeriesNames() const
Returns all time series names contained in this container.
std::size_t getEndTime() const
Returns the last time step.
const std::vector< float > * getTimeSeries(SensorDataType time_series_name) const
Returns the time series with the given name.
std::size_t getStartTime() const
Returns the first time step.
std::vector< SensorDataType > _vec_names
std::vector< std::vector< float > * > _data_vecs
SensorData(const std::string &file_name)
Constructor using file name (automatically reads the file and fills all data structures)
std::size_t getStepSize() const
Returns the interval between time steps (Returns "0" if a vector is given!)
std::vector< std::string > _data_unit_string
std::vector< std::size_t > _time_steps
void addTimeSeries(const std::string &data_name, std::vector< float > *data, const std::string &data_unit_string="")
int readDataFromFile(const std::string &file_name)
Reads a CSV-file with time series data and fills the container.
TimeStepType getTimeUnit() const
Returns the unit the time steps.
const std::vector< std::size_t > & getTimeSteps() const
Returns the time step vector (if it exists)
static SensorDataType convertString2SensorDataType(const std::string &s)
Converts Strings to Sensor Data Types.
static std::string convertSensorDataType2String(SensorDataType t)
Converts Sensor Data Types to Strings.
void setTimeUnit(TimeStepType t)
Allows to set a unit for the time steps.