12#ifndef RTCTK_COMPONENTFRAMEWORK_DATARECORDER_HPP
13#define RTCTK_COMPONENTFRAMEWORK_DATARECORDER_HPP
77 virtual void Write(
const std::tuple<T...>& data) = 0;
83 virtual void Write(
const gsl::span<
const std::tuple<T...>> data) {
84 for (
const auto&
element : data) {
93 virtual void Open(
const std::filesystem::path&
file) = 0;
This is an abstract class that can be used to implement an OutputStage for a Recording Unit.
Definition dataRecorder.hpp:29
virtual void Close()=0
Close the currently open file.
DisabledFields m_disabled_fields
Array of fields that should not be recorded.
Definition dataRecorder.hpp:109
const ColumnDescription m_column_description
Definition dataRecorder.hpp:110
virtual std::string DefaultFileExtension()=0
Default filename extension for the recorder.
std::tuple< T... > TupleType
Type of the tuple returned by user-defined method AsTuple.
Definition dataRecorder.hpp:43
const std::array< ColumnMetaData, sizeof...(T)> ColumnDescription
Definition dataRecorder.hpp:49
std::array< bool, sizeof...(T)> DisabledFields
Type for disabled fields, an array of bools with length equal to size of the data tuple.
Definition dataRecorder.hpp:48
virtual ~DataRecorder()=default
virtual void Write(const gsl::span< const std::tuple< T... > > data)
Write multiple rows of data.
Definition dataRecorder.hpp:83
virtual void Write(const std::tuple< T... > &data)=0
Write a single row of data.
void SetDisabledFields(const DisabledFields &disable)
Disable certain fields so that they are not recorded.
Definition dataRecorder.hpp:69
virtual void Open(const std::filesystem::path &file)=0
Open a file.
DataRecorder(const ColumnDescription &columns, const DisabledFields &disable={})
Create a new recorder.
Definition dataRecorder.hpp:57
Definition commandReplier.cpp:22
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23