2024-08-24 12:36:02 +02:00
|
|
|
/* Interface for Linux/Unix devices.
|
|
|
|
*
|
|
|
|
* 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:
|
2024-11-03 10:52:12 +01:00
|
|
|
virtual ~Device() {};
|
2024-08-24 12:36:02 +02:00
|
|
|
|
|
|
|
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
|