1// SPDX-License-Identifier: GPL-3.0-or-later
2#pragma once
3
4#include "units/unit.hpp"
5
6struct Device : public Unit
7{
8 explicit Device(const std::string &id, toml::table &table, std::shared_ptr<const Template> template_ = nullptr, const ArgumentMap &args = {});
9
10 const std::string driver_exec;
11 const std::vector<std::string> driver_args;
12
13 private:
14 UnitType GetType() const override
15 {
16 return UnitType::Device;
17 }
18 bool Start() override;
19 bool Stop() override;
20 void onPrint(std::ostream &os) const override;
21
22 private:
23 std::shared_ptr<IUnit> driver = nullptr;
24};
25