mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
add driver interface
Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
This commit is contained in:
parent
babe80f53e
commit
d312e377bb
1 changed files with 28 additions and 0 deletions
28
common/include/villas/kernel/devices/driver.hpp
Normal file
28
common/include/villas/kernel/devices/driver.hpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
/* Driver
|
||||
*
|
||||
* 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
|
||||
|
||||
namespace villas {
|
||||
namespace kernel {
|
||||
namespace devices {
|
||||
|
||||
class Device;
|
||||
|
||||
class Driver {
|
||||
public:
|
||||
virtual void attach(const Device &device) const = 0;
|
||||
virtual void bind(const Device &device) const = 0;
|
||||
virtual std::string name() const = 0;
|
||||
virtual void override(const Device &device) const = 0;
|
||||
virtual void unbind(const Device &device) const = 0;
|
||||
};
|
||||
|
||||
} // namespace devices
|
||||
} // namespace kernel
|
||||
} // namespace villas
|
Loading…
Add table
Reference in a new issue