Class H5Writer#
Defined in File DataLogger.h
Inheritance Relationships#
Base Type#
public Karana::Core::Base(Class Base)
Class Documentation#
-
class H5Writer : public Karana::Core::Base#
Logs data to an HDF5 file. The data to be logged is configured via
PacketTableConfigs.Public Functions
-
H5Writer(std::string_view filename)#
Create an H5Writer class.
- Parameters:
filename – The name of the h5 file to create.
-
void createTable(const kc::ks_ptr<PacketTableConfig> &config)#
Create a packet table to log.
This creates the table and adds it to the active tables. Activate tables will have a data entry added whenever log is called. To deactivate a table use the deactivateTable method. The name of the tame will be the same as the name of the PacketTableConfig.
- Parameters:
config – The config that specifies the data of the packet table.
-
void log()#
Log data for all the active tables.
-
void logTable(const std::string &name)#
Create a log entry for just the given table.
This will log the table regardless of whether it is active or not.
- Parameters:
name – The name of the table to log.
-
void activateTable(const std::string &name)#
Activate the table with the given name.
- Parameters:
name – The name of the table to activate.
-
void deactivateTable(const std::string &name)#
Deactivate the table with the given name.
- Parameters:
name – The name of the table to deactivate.
-
std::vector<std::string> activeTableNames()#
Get a vector of the active table names.
- Returns:
A vector of the active table names.
-
std::vector<std::string> tableNames()#
Get a vector of all the table names.
- Returns:
A vector of the table names.
-
H5Writer(std::string_view filename)#