Leosac  0.8.0
Open Source Access Control
Leosac::Module::Wiegand::WiegandReaderConfig Struct Reference

An instance of this class represents the configuration of one Wiegand reader. More...

#include <WiegandConfig.hpp>

+ Inheritance diagram for Leosac::Module::Wiegand::WiegandReaderConfig:
+ Collaboration diagram for Leosac::Module::Wiegand::WiegandReaderConfig:

Public Member Functions

 WiegandReaderConfig ()
 
 WiegandReaderConfig (const WiegandReaderConfig &)=default
 
template<typename DevicePtrT >
std::string device_name (const DevicePtrT &dev) const
 Returns the name of a device, or the empty string. More...
 
std::string gpio_high_name () const
 
std::string gpio_low_name () const
 
std::string green_led_name () const
 
std::string buzzer_name () const
 
void validation_callback (odb::callback_event, odb::database &) const
 ODB callback wrt database operation. More...
 
- Public Member Functions inherited from Leosac::Hardware::RFIDReader
 RFIDReader ()
 
- Public Member Functions inherited from Leosac::Hardware::Device
 Device ()
 
 Device (DeviceClass device_class)
 
virtual ~Device ()=default
 
UUID id () const
 
const std::string & name () const
 
void name (const std::string &name)
 
DeviceClass device_class () const
 
void device_class (DeviceClass d)
 
bool enabled () const
 
void enabled (bool e)
 
uint64_t odb_version () const
 

Public Attributes

Hardware::GPIOPtr gpio_high_
 
Hardware::GPIOPtr gpio_low_
 
Hardware::LEDPtr green_led_
 
Hardware::BuzzerPtr buzzer_
 
std::string mode
 
std::chrono::milliseconds pin_timeout
 
char pin_key_end
 
bool nowait
 

Static Public Attributes

constexpr static std::array< const char *const, 8 > valid_operation_modes
 List of valid operation mode for a reader. More...
 

Detailed Description

An instance of this class represents the configuration of one Wiegand reader.

Definition at line 46 of file WiegandConfig.hpp.

Constructor & Destructor Documentation

◆ WiegandReaderConfig() [1/2]

Leosac::Module::Wiegand::WiegandReaderConfig::WiegandReaderConfig ( )
inline

Definition at line 48 of file WiegandConfig.hpp.

◆ WiegandReaderConfig() [2/2]

Leosac::Module::Wiegand::WiegandReaderConfig::WiegandReaderConfig ( const WiegandReaderConfig )
default

Member Function Documentation

◆ buzzer_name()

std::string Leosac::Module::Wiegand::WiegandReaderConfig::buzzer_name ( ) const
inline

Definition at line 82 of file WiegandConfig.hpp.

◆ device_name()

template<typename DevicePtrT >
std::string Leosac::Module::Wiegand::WiegandReaderConfig::device_name ( const DevicePtrT &  dev) const
inline

Returns the name of a device, or the empty string.

Definition at line 60 of file WiegandConfig.hpp.

◆ gpio_high_name()

std::string Leosac::Module::Wiegand::WiegandReaderConfig::gpio_high_name ( ) const
inline

Definition at line 67 of file WiegandConfig.hpp.

◆ gpio_low_name()

std::string Leosac::Module::Wiegand::WiegandReaderConfig::gpio_low_name ( ) const
inline

Definition at line 72 of file WiegandConfig.hpp.

◆ green_led_name()

std::string Leosac::Module::Wiegand::WiegandReaderConfig::green_led_name ( ) const
inline

Definition at line 77 of file WiegandConfig.hpp.

◆ validation_callback()

void Leosac::Module::Wiegand::WiegandReaderConfig::validation_callback ( odb::callback_event  e,
odb::database &  db 
) const
virtual

ODB callback wrt database operation.

Reimplemented from Leosac::Hardware::RFIDReader.

Definition at line 43 of file WiegandConfig.cpp.

Member Data Documentation

◆ buzzer_

Hardware::BuzzerPtr Leosac::Module::Wiegand::WiegandReaderConfig::buzzer_

Definition at line 95 of file WiegandConfig.hpp.

◆ gpio_high_

Hardware::GPIOPtr Leosac::Module::Wiegand::WiegandReaderConfig::gpio_high_

Definition at line 92 of file WiegandConfig.hpp.

◆ gpio_low_

Hardware::GPIOPtr Leosac::Module::Wiegand::WiegandReaderConfig::gpio_low_

Definition at line 93 of file WiegandConfig.hpp.

◆ green_led_

Hardware::LEDPtr Leosac::Module::Wiegand::WiegandReaderConfig::green_led_

Definition at line 94 of file WiegandConfig.hpp.

◆ mode

std::string Leosac::Module::Wiegand::WiegandReaderConfig::mode

Definition at line 96 of file WiegandConfig.hpp.

◆ nowait

bool Leosac::Module::Wiegand::WiegandReaderConfig::nowait

Definition at line 100 of file WiegandConfig.hpp.

◆ pin_key_end

char Leosac::Module::Wiegand::WiegandReaderConfig::pin_key_end

Definition at line 99 of file WiegandConfig.hpp.

◆ pin_timeout

std::chrono::milliseconds Leosac::Module::Wiegand::WiegandReaderConfig::pin_timeout

Definition at line 98 of file WiegandConfig.hpp.

◆ valid_operation_modes

constexpr std::array< const char *const, 8 > Leosac::Module::Wiegand::WiegandReaderConfig::valid_operation_modes
staticconstexpr
Initial value:
{
"SIMPLE_WIEGAND",
"WIEGAND_PIN_4BITS",
"WIEGAND_PIN_8BITS",
"WIEGAND_PIN_BUFFERED",
"WIEGAND_CARD_PIN_4BITS",
"WIEGAND_CARD_PIN_8BITS",
"WIEGAND_CARD_PIN_BUFFERED",
"AUTODETECT"}

List of valid operation mode for a reader.

Definition at line 105 of file WiegandConfig.hpp.


The documentation for this struct was generated from the following files: