Leosac  0.8.0
Open Source Access Control
Leosac::Module::Wiegand::Strategy::CardReading Class Referenceabstract

Interface for a strategy that read a card number. More...

#include <CardReading.hpp>

+ Inheritance diagram for Leosac::Module::Wiegand::Strategy::CardReading:
+ Collaboration diagram for Leosac::Module::Wiegand::Strategy::CardReading:

Public Member Functions

 CardReading (WiegandReaderImpl *reader)
virtual const std::string & get_card_id () const =0
 Returns the card id that was read. More...
virtual int get_nb_bits () const =0
 Returns the number of bits in the card. More...
- Public Member Functions inherited from Leosac::Module::Wiegand::Strategy::WiegandStrategy
 WiegandStrategy (WiegandReaderImpl *reader)
virtual ~WiegandStrategy ()=default
virtual void timeout ()=0
 This is called when the module detect a timeout. More...
virtual bool completed () const =0
 Did the strategy gather needed data? If this function returns true, that means that the strategy implementation successfully retrieve data from wiegand bits. More...
virtual void signal (zmqpp::socket &sock)=0
 Tells the strategy implementation to send a message to the application containing the received credentials. More...
virtual void reset ()=0
 Reset the strategy, meaning that the next time timeout() is called the behavior should be the same than the first time. More...
virtual void set_reader (WiegandReaderImpl *new_ptr)
 Update the pointer that points back to the associated reader. More...

Additional Inherited Members

- Protected Attributes inherited from Leosac::Module::Wiegand::Strategy::WiegandStrategy

Detailed Description

Interface for a strategy that read a card number.

Definition at line 39 of file CardReading.hpp.

Constructor & Destructor Documentation

◆ CardReading()

Leosac::Module::Wiegand::Strategy::CardReading::CardReading ( WiegandReaderImpl reader)

Definition at line 42 of file CardReading.hpp.

Member Function Documentation

◆ get_card_id()

virtual const std::string& Leosac::Module::Wiegand::Strategy::CardReading::get_card_id ( ) const
pure virtual

Returns the card id that was read.

Implemented in Leosac::Module::Wiegand::Strategy::SimpleWiegandStrategy.

◆ get_nb_bits()

virtual int Leosac::Module::Wiegand::Strategy::CardReading::get_nb_bits ( ) const
pure virtual

Returns the number of bits in the card.

Implemented in Leosac::Module::Wiegand::Strategy::SimpleWiegandStrategy.

The documentation for this class was generated from the following file: