1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-23 00:00:01 +01:00
VILLASnode/common/include/villas/kernel/devices/ip_device.hpp
Steffen Vogel e5ab276566 fix: Formatting
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2024-11-04 10:30:14 +01:00

36 lines
879 B
C++

/* Linux/Unix device which represents an IP component of a FPGA.
*
* 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 <villas/kernel/devices/platform_device.hpp>
namespace villas {
namespace kernel {
namespace devices {
class IpDevice : public PlatformDevice {
public:
static IpDevice from(const std::filesystem::path unsafe_path);
static bool is_path_valid(const std::filesystem::path unsafe_path);
private:
IpDevice() = delete;
IpDevice(
const std::filesystem::path valid_path) //! Dont allow unvalidated paths
: PlatformDevice(valid_path) {};
public:
size_t addr() const;
std::string ip_name() const;
};
} // namespace devices
} // namespace kernel
} // namespace villas