44 std::stringstream card_hex;
46 for (std::size_t i = 0; i < size; ++i)
48 card_hex << std::hex << std::setfill(
'0') << std::setw(2)
virtual void signal(zmqpp::socket &sock) override
Tells the strategy implementation to send a message to the application containing the received creden...
virtual void reset() override
Reset the strategy, meaning that the next time timeout() is called the behavior should be the same th...
An implementation class that represents a Wiegand Reader.
This define message formatting for data source SIMPLE_WIEGAND.
virtual int get_nb_bits() const override
Returns the number of bits in the card.
WiegandReaderImpl * reader_
int counter() const
Returns the number of bits read.
virtual const std::string & get_card_id() const override
Returns the card id that was read.
Interface for a strategy that read a card number.
SimpleWiegandStrategy(WiegandReaderImpl *reader)
void read_reset()
Reset the "read state" of the reader, effectively cleaning the wiegand-bit-buffer and resetting the c...
virtual bool completed() const override
Did the strategy gather needed data? If this function returns true, that means that the strategy impl...
Provide support for Wiegand devices.
const unsigned char * buffer() const
Return a pointer to internal buffer memory.
virtual void timeout() override
This is called when the module detect a timeout.
const std::string & name() const
Returns the name of this reader.