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