|
Leosac
0.8.0
Open Source Access Control
|
Go to the documentation of this file.
26 #include <zmqpp/zmqpp.hpp>
45 LedBuzzerImpl(zmqpp::context &ctx,
const std::string &led_name,
46 const std::string &gpio_name,
int blink_duration,
int blink_speed);
62 std::chrono::system_clock::time_point
next_update();
int64_t default_blink_speed_
LedBuzzerSM stmachine_
Our state machine that handle blinking, blinking in pattern or doing nothing.
int64_t default_blink_duration_
Implementation class, for use by the LED module only.
std::chrono::system_clock::time_point next_update()
Time point of the next wanted update.
void update()
Update the object.
A Facade to a GPIO object.
This is the header file for a generated source file, GitSHA1.cpp.
void send_state()
Write the current state of the LED device (according to specs) to the frontend_ socket.
void handle_message()
Message received on the rep_ socket.
zmqpp::socket & frontend()
Return the frontend_ socket.
zmqpp::message send_to_backend(zmqpp::message &msg)
Send a message to the backend object (used for ON, OFF, TOGGLE).
bool start_blink(zmqpp::message *msg)
Start blinking, this stores the blink_end timepoint and send commands for blinking to happen.
zmqpp::socket frontend_
REP socket to receive LED command.
Hardware::FGPIO gpio_
Facade to the GPIO we use with this LED.
zmqpp::socket backend_
REQ socket to the backend GPIO.
LedBuzzerImpl(zmqpp::context &ctx, const std::string &led_name, const std::string &gpio_name, int blink_duration, int blink_speed)
boost::msm::back::state_machine< SM::LedBuzzerSM_ > LedBuzzerSM