CCIMXDesktop
 
Loading...
Searching...
No Matches
PesudoLedController.h
1#ifndef PESUDOLEDCONTROLLER_H
2#define PESUDOLEDCONTROLLER_H
3
4#include "LEDParamsPackage.h"
5#include <string>
6
10public:
13
16
19 void redirectTo(const std::string& ledName) { (void)ledName; }
20
23 std::string ledPath() const { return led_path; }
24
27 inline void setMode(const Modes mode) { this->mode = mode; }
28
31 inline Modes getMode() const { return this->mode; }
32
36 bool processByPackage(const LEDParamsPackage* package) { return true; }
37
38private:
39 std::string led_path;
40 Modes mode { Modes::Plain };
41};
42
43#endif // PESUDOLEDCONTROLLER_H
Base class for LED parameter packages.
Definition LEDParamsPackage.h:14
Simulated LED controller used when real hardware is not available.
Definition PesudoLedController.h:9
void setMode(const Modes mode)
Sets the control mode.
Definition PesudoLedController.h:27
void redirectTo(const std::string &ledName)
Redirects to another LED (no-op in simulation).
Definition PesudoLedController.h:19
~PesudoLedController()=default
Default destructor.
std::string ledPath() const
Returns the (simulated) LED path.
Definition PesudoLedController.h:23
PesudoLedController()=default
Default constructor.
bool processByPackage(const LEDParamsPackage *package)
Processes the parameter package (always succeeds in simulation).
Definition PesudoLedController.h:36
Modes getMode() const
Gets the current control mode.
Definition PesudoLedController.h:31