24 #include <zmqpp/poller.hpp> 25 #include <zmqpp/socket.hpp> 86 FLED(zmqpp::context &ctx,
const std::string &led_name);
int64_t duration
Set only if st is BLINKING, it represents the total duration of blinking.
bool blink()
Make the LED blink.
This is the header file for a generated source file, GitSHA1.cpp.
enum Leosac::Hardware::FLED::State::@0 st
Internal state of the LED.
bool value
Set only if st is BLINKING : value of the LED (true if ON, false otherwise).
FLED(zmqpp::context &ctx, const std::string &led_name)
zmqpp::socket backend_
A socket to talk to the backend LED.
bool turnOff()
Turn the LED OFF by sending a message to the backend LED impl.
bool isOn()
Query the value of the GPIO and returns true if the LED is ON.
zmqpp::poller poller_
A poller to not wait for infinity in case something went wrong.
State state()
Return the state of the device.
bool toggle()
Toggle the LED value by sending a message to the backend LED impl.
bool isBlinking()
Returns true is the LED is currently blinking.
~FLED()=default
Default destructor.
int64_t speed
Set only if st is BLINKING, it represents the speed of blinking.
A Facade to a LED object.
zmqpp::socket & backend()
Access the backend socket (which is connect to the LED device) to send command directly.
bool turnOn()
Turn the LED ON by sending a message to the backend LED impl.
bool isOff()
Similar to isOn().