/* Linux/Unix device which represents an IP component of a FPGA. * * Author: Pascal Bauer * * SPDX-FileCopyrightText: 2023-2024 Pascal Bauer * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include #include 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; static std::vector from_directory(std::filesystem::path devices_directory); }; } // namespace devices } // namespace kernel } // namespace villas