mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
add device interface
Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
This commit is contained in:
parent
802f86090b
commit
babe80f53e
1 changed files with 33 additions and 0 deletions
33
common/include/villas/kernel/devices/device.hpp
Normal file
33
common/include/villas/kernel/devices/device.hpp
Normal 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
|
Loading…
Add table
Reference in a new issue