|
Leosac
0.8.0
Open Source Access Control
|
Go to the documentation of this file.
26 #include "zmqpp/zmqpp.hpp"
54 const std::string &data_high_pin,
55 const std::string &data_low_pin,
56 const std::string &green_led_name,
57 const std::string &buzzer_name,
58 std::unique_ptr<Strategy::WiegandStrategy> strategy);
115 const unsigned char *
buffer()
const;
120 const std::string &
name()
const;
void handle_request()
Someone sent a request.
std::unique_ptr< Hardware::FBuzzer > buzzer_
Facade to the buzzer object.
int counter_
Count the number of bits received from GPIOs.
std::string topic_low_
ZMQ topic-string to interrupt on LOW gpio (low gpio's name)
An implementation class that represents a Wiegand Reader.
void handle_bus_msg()
Something happened on the bus.
void timeout()
Timeout (no more data burst to handle).
std::unique_ptr< Strategy::WiegandStrategy > strategy_
Concrete implementation of the reader mode.
This is the header file for a generated source file, GitSHA1.cpp.
zmqpp::socket sock_
REP socket to receive command on.
zmqpp::socket bus_push_
Socket to write to the message bus.
void read_reset()
Reset the "read state" of the reader, effectively cleaning the wiegand-bit-buffer and resetting the c...
int counter() const
Returns the number of bits read.
const unsigned char * buffer() const
Return a pointer to internal buffer memory.
std::string topic_high_
ZMQ topic-string for interrupt on HIGH gpio (high gpio's name)
std::array< uint8_t, 16 > buffer_
Buffer to store incoming bits from high and low gpios.
WiegandReaderImpl & operator=(const WiegandReaderImpl &)=delete
WiegandReaderImpl(zmqpp::context &ctx, const std::string &reader_name, const std::string &data_high_pin, const std::string &data_low_pin, const std::string &green_led_name, const std::string &buzzer_name, std::unique_ptr< Strategy::WiegandStrategy > strategy)
Create a new implementation of a Wiegand Reader.
zmqpp::socket bus_sub_
Socket that allows the reader to listen to the application BUS.
const std::string & name() const
Returns the name of this reader.
std::string name_
Name of the device (defined in configuration)
std::unique_ptr< Hardware::FLED > green_led_
Facade to control the reader green led.