|
Leosac
0.8.0
Open Source Access Control
|
Go to the documentation of this file.
25 : backend_(ctx,
zmqpp::socket_type::req)
28 backend_.connect(
"inproc://" + reader_name);
53 <<
"BLINK" << duration << speed;
64 assert(rep ==
"OK" || rep ==
"KO");
73 msg <<
"BEEP" << duration;
zmqpp::socket backend_
A socket to talk to the backend wiegand reader.
const std::string & name() const
Returns the device's name.
bool send_to_backend(zmqpp::message &m)
Send a message to the backend_ wiegand reader and wait for a response.
bool beep(int64_t duration=1000)
Beep for a given duration.
bool buzzerOn()
Turn the buzzer on.
bool buzzerOff()
Turn the buzzer off.
bool greenLedOff()
Turn the reader's green led off.
FWiegandReader(zmqpp::context &ctx, const std::string &reader_name)
Construct a facade to a wiegand reader; this facade will connect to the reader.
bool greenLedOn()
Turn the reader's green led on.
bool greenLedBlink(int64_t duration=1000, int64_t speed=300)
Make the reader's green led blink.
Provides facade classes to hardware device implementation.