|
Leosac
0.8.0
Open Source Access Control
|
Go to the documentation of this file.
55 char pin_key_end,
bool nowait);
57 virtual void timeout()
override;
61 virtual void signal(zmqpp::socket &sock)
override;
71 void reset()
override;
94 using TimePoint = std::chrono::system_clock::time_point;
std::chrono::system_clock::time_point TimePoint
std::unique_ptr< CardReading > CardReadingUPtr
An implementation class that represents a Wiegand Reader.
Autodetect(WiegandReaderImpl *reader, std::chrono::milliseconds delay, char pin_key_end, bool nowait)
Create a strategy that read whatever it can and tries its best to determine what is was that it read.
Variable strategy that tries to autodetect what it reads.
virtual void signal(zmqpp::socket &sock) override
Tells the strategy implementation to send a message to the application containing the received creden...
TimePoint time_card_read_
This is the header file for a generated source file, GitSHA1.cpp.
virtual void set_reader(WiegandReaderImpl *new_ptr) override
Update the pointer that points back to the associated reader.
PinReadingUPtr read_pin_strategy_
std::chrono::milliseconds delay_
PinReadingUPtr build_strategy(int bits)
Dynamically instanciate a new strategy based on the number of bits available.
The multiple modes available to wiegand reader are implemented through the strategy pattern.
virtual void timeout() override
This is called when the module detect a timeout.
std::unique_ptr< PinReading > PinReadingUPtr
virtual bool completed() const override
Did the strategy gather needed data? If this function returns true, that means that the strategy impl...
CardReadingUPtr read_card_strategy_
void reset() override
Reset self.
void check_timeout()
Called when timeout() was called but nothing was read.