25 const std::string& what =
"file",
26 std::ios::openmode mode = std::ios::in) {
27 std::ifstream file(path, mode);
29 throw IoError(
"Could not open " + what +
": " + path);
48std::vector<std::string>
loadSensorIds(
const std::string& sensors_path);
A file could not be opened, read, or written.
Definition errors.hpp:55
Unified exception hierarchy for AstraLog-HPC.
std::ifstream openInputFile(const std::string &path, const std::string &what="file", std::ios::openmode mode=std::ios::in)
Opens an input file stream or throws on failure.
Definition io.hpp:24
std::vector< std::string > loadSensorIds(const std::string &sensors_path)
Reads the sensor IDs listed in a sensors.yaml configuration file.
Definition io.cpp:22
size_t countSensors(const std::string &sensors_path)
Counts the sensors declared in a sensors.yaml configuration file.
Definition io.cpp:7