|
Leosac
0.8.0
Open Source Access Control
|
Go to the documentation of this file.
24 #include <zmqpp/poller.hpp>
25 #include <zmqpp/socket.hpp>
48 FGPIO(zmqpp::context &ctx,
const std::string &gpio_name);
64 bool turnOn(std::chrono::milliseconds duration);
95 const std::string &
name()
const;
bool toggle()
Toggle the GPIO value by sending a message to the backend GPIO impl.
zmqpp::poller poller_
A poller to not wait for infinity in case something went wrong.
A Facade to a GPIO object.
const std::string & name() const
Name of the GPIO pin as defined in the configuration file.
This is the header file for a generated source file, GitSHA1.cpp.
~FGPIO()=default
Default destructor, RAII does the job.
bool isOn()
Query the value of the GPIO and returns true if the LED is ON.
bool isOff()
Similar to isOn().
FGPIO(zmqpp::context &ctx, const std::string &gpio_name)
bool turnOff()
Turn the GPIO OFF by sending a message to the backend GPIO impl.
zmqpp::socket backend_
A socket to talk to the backend GPIO.
bool turnOn()
Turn the GPIO ON by sending a message to the backend GPIO impl.