From babe80f53ec489a607fa8df1b652bac6fe4574fe Mon Sep 17 00:00:00 2001 From: Pascal Bauer Date: Sat, 24 Aug 2024 12:36:02 +0200 Subject: [PATCH] add device interface Signed-off-by: Pascal Bauer --- .../include/villas/kernel/devices/device.hpp | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 common/include/villas/kernel/devices/device.hpp diff --git a/common/include/villas/kernel/devices/device.hpp b/common/include/villas/kernel/devices/device.hpp new file mode 100644 index 000000000..1486638e1 --- /dev/null +++ b/common/include/villas/kernel/devices/device.hpp @@ -0,0 +1,33 @@ +/* Device + * + * Author: Pascal Bauer + * + * SPDX-FileCopyrightText: 2023-2024 Pascal Bauer + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include +#include +#include + +namespace villas { +namespace kernel { +namespace devices { + +class Device { +public: + virtual ~Device(){}; + + virtual std::optional> driver() const = 0; + virtual std::optional iommu_group() const = 0; + virtual std::string name() const = 0; + virtual std::filesystem::path override_path() const = 0; + virtual std::filesystem::path path() const = 0; + virtual void probe() const = 0; +}; + +} // namespace devices +} // namespace kernel +} // namespace villas