From 159d55c2a2691f454106bb734a4585fe675fcb72 Mon Sep 17 00:00:00 2001 From: unai_71 Date: Tue, 10 Mar 2026 17:02:34 +0100 Subject: [PATCH] feat: declared skeleton of sysfsRead.hpp --- include/SysfsRead.hpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/SysfsRead.hpp b/include/SysfsRead.hpp index 9dde087..bf910f3 100644 --- a/include/SysfsRead.hpp +++ b/include/SysfsRead.hpp @@ -5,6 +5,8 @@ #pragma once +#include + enum class SysfsStatus { /// @brief File cannot be opened or does not exist. @@ -18,3 +20,21 @@ enum class SysfsStatus /// @brief File contains an UnexpectedValue; producer must not send. UnexpectedValue }; + +class SysfsReader +{ + public: + /// @brief Construct a SysfsReader bound to a specific input file path. + /// @param input_path Path to the sysfs-like input file. + explicit SysfsReader(const std::filesystem::path& input_path); + + /// @brief Read and interpret the current status of the input file. + /// + /// This function never throws on common I/O errors; instead it reports them + /// via the SysfsStatus enum. + /// @return Interpreted status of the input file + SysfsStatus read_status() const; + + private: + std::filesystem::path m_path; // Path to the input file. +};