1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-30 00:00:11 +01:00
VILLASnode/common/include/villas/kernel/devices/platform_driver.hpp
Pascal Bauer 0a353a0660 remove unused code
Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
2024-11-15 10:36:35 +00:00

52 lines
No EOL
1.4 KiB
C++

/* PlatformDriver
*
* 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 <fstream>
#include <filesystem>
#include <iostream>
#include <villas/kernel/devices/driver.hpp>
namespace villas {
namespace kernel {
namespace devices {
class PlatformDriver : public Driver {
private:
static constexpr char BIND_DEFAULT[] = "bind";
static constexpr char UNBIND_DEFAULT[] = "unbind";
public:
const std::filesystem::path path;
private:
const std::filesystem::path bind_path;
const std::filesystem::path unbind_path;
public:
PlatformDriver(const std::filesystem::path path)
: PlatformDriver(path, path / std::filesystem::path(BIND_DEFAULT),
path / std::filesystem::path(UNBIND_DEFAULT)){};
PlatformDriver(const std::filesystem::path path,
const std::filesystem::path bind_path,
const std::filesystem::path unbind_path)
: path(path), bind_path(bind_path), unbind_path(unbind_path){};
public:
std::string name() const override;
void attach(const Device &device) const override;
void bind(const Device &device) const override;
void unbind(const Device &device) const override;
void override(const Device &device) const override;
};
} // namespace devices
} // namespace kernel
} // namespace villas