1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-16 00:00:02 +01:00

add device interface

Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
This commit is contained in:
Pascal Bauer 2024-08-24 12:36:02 +02:00
parent 802f86090b
commit babe80f53e

View file

@ -0,0 +1,33 @@
/* Device
*
* Author: Pascal Bauer <pascal.bauer@rwth-aachen.de>
*
* SPDX-FileCopyrightText: 2023-2024 Pascal Bauer <pascal.bauer@rwth-aachen.de>
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <filesystem>
#include <optional>
#include <villas/kernel/devices/driver.hpp>
namespace villas {
namespace kernel {
namespace devices {
class Device {
public:
virtual ~Device(){};
virtual std::optional<std::unique_ptr<Driver>> driver() const = 0;
virtual std::optional<int> 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