Tomáš Pecka | ddf04a3 | 2020-06-17 15:32:01 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2020 CESNET, https://photonics.cesnet.cz/ |
| 3 | * |
| 4 | * Written by Tomáš Pecka <tomas.pecka@fit.cvut.cz> |
| 5 | * |
| 6 | */ |
| 7 | #pragma once |
| 8 | |
| 9 | #include <memory> |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 10 | #include "health/State.h" |
Tomáš Pecka | ddf04a3 | 2020-06-17 15:32:01 +0200 | [diff] [blame] | 11 | |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 12 | namespace velia::health { |
Tomáš Pecka | ddf04a3 | 2020-06-17 15:32:01 +0200 | [diff] [blame] | 13 | |
| 14 | class LedSysfsDriver; |
| 15 | |
| 16 | class LedOutputCallback { |
| 17 | public: |
| 18 | LedOutputCallback(std::shared_ptr<LedSysfsDriver> red, std::shared_ptr<LedSysfsDriver> green, std::shared_ptr<LedSysfsDriver> blue); |
Tomáš Pecka | 7ff533b | 2020-07-17 15:01:16 +0200 | [diff] [blame] | 19 | ~LedOutputCallback(); |
| 20 | void reset(); |
Tomáš Pecka | ddf04a3 | 2020-06-17 15:32:01 +0200 | [diff] [blame] | 21 | void operator()(State state); |
| 22 | |
| 23 | private: |
| 24 | std::shared_ptr<LedSysfsDriver> m_redLed, m_greenLed, m_blueLed; |
| 25 | }; |
| 26 | |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 27 | } |