|
| FLED (zmqpp::context &ctx, const std::string &led_name) |
|
| FLED (const FLED &)=delete |
| Disabled copy-constructor. More...
|
|
| ~FLED ()=default |
| Default destructor. More...
|
|
bool | turnOn (int duration) |
| Turn the LED ON and turn it OFF duration milliseconds later. More...
|
|
bool | turnOn (std::chrono::milliseconds duration) |
| Turn the LED ON and turn it OFF duration milliseconds later. More...
|
|
bool | turnOn () |
| Turn the LED ON by sending a message to the backend LED impl. More...
|
|
bool | turnOff () |
| Turn the LED OFF by sending a message to the backend LED impl. More...
|
|
bool | toggle () |
| Toggle the LED value by sending a message to the backend LED impl. More...
|
|
bool | blink () |
| Make the LED blink. More...
|
|
bool | blink (std::chrono::milliseconds duration, std::chrono::milliseconds speed) |
| Blink with a duration and a speed. More...
|
|
bool | blink (int duration, int speed) |
|
bool | isOn () |
| Query the value of the GPIO and returns true if the LED is ON. More...
|
|
bool | isOff () |
| Similar to isOn() . More...
|
|
bool | isBlinking () |
| Returns true is the LED is currently blinking. More...
|
|
State | state () |
| Return the state of the device. More...
|
|
zmqpp::socket & | backend () |
| Access the backend socket (which is connect to the LED device) to send command directly. More...
|
|
A Facade to a LED object.
This object require a valid GPIO object to work. It abstract a LED, and add a simple command on top of GPIO. It requires a module that implements the behavior to work properly. However, unlike GPIO modules, we are unlikely to have multiple implementation of a LED module.
- Note
- This class implements the client code to [theses specifications](Specification for LEDs modules).
Definition at line 44 of file FLED.hpp.