Leosac  0.8.0
Open Source Access Control
Leosac::Hardware::LED Class Reference

Abstraction of LED device attributes. More...

#include <LED.hpp>

+ Inheritance diagram for Leosac::Hardware::LED:
+ Collaboration diagram for Leosac::Hardware::LED:

Public Member Functions

 LED ()
 
virtual ~LED ()=default
 
void validation_callback (odb::callback_event e, odb::database &) const override
 
const GPIOPtrgpio () const
 
void gpio (const GPIOPtr &gpio)
 
int64_t default_blink_duration () const
 
void default_blink_duration (int64_t default_blink_duration)
 
int64_t default_blink_speed () const
 
void default_blink_speed (int64_t default_blink_speed)
 
- 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
 

Private Attributes

int64_t default_blink_duration_
 
int64_t default_blink_speed_
 
GPIOPtr gpio_
 The underlying GPIO. More...
 

Detailed Description

Abstraction of LED device attributes.

Definition at line 36 of file LED.hpp.

Constructor & Destructor Documentation

◆ LED()

Leosac::Hardware::LED::LED ( )
explicit

Definition at line 28 of file LED.cpp.

◆ ~LED()

virtual Leosac::Hardware::LED::~LED ( )
virtualdefault

Member Function Documentation

◆ default_blink_duration() [1/2]

int64_t Leosac::Hardware::LED::default_blink_duration ( ) const

Definition at line 48 of file LED.cpp.

◆ default_blink_duration() [2/2]

void Leosac::Hardware::LED::default_blink_duration ( int64_t  default_blink_duration)

Definition at line 53 of file LED.cpp.

◆ default_blink_speed() [1/2]

int64_t Leosac::Hardware::LED::default_blink_speed ( ) const

Definition at line 58 of file LED.cpp.

◆ default_blink_speed() [2/2]

void Leosac::Hardware::LED::default_blink_speed ( int64_t  default_blink_speed)

Definition at line 63 of file LED.cpp.

◆ gpio() [1/2]

const GPIOPtr & Leosac::Hardware::LED::gpio ( ) const

Definition at line 38 of file LED.cpp.

◆ gpio() [2/2]

void Leosac::Hardware::LED::gpio ( const GPIOPtr gpio)

Definition at line 43 of file LED.cpp.

◆ validation_callback()

void Leosac::Hardware::LED::validation_callback ( odb::callback_event  e,
odb::database &  db 
) const
overridevirtual

Reimplemented from Leosac::Hardware::Device.

Definition at line 33 of file LED.cpp.

Member Data Documentation

◆ default_blink_duration_

int64_t Leosac::Hardware::LED::default_blink_duration_
private

Definition at line 57 of file LED.hpp.

◆ default_blink_speed_

int64_t Leosac::Hardware::LED::default_blink_speed_
private

Definition at line 58 of file LED.hpp.

◆ gpio_

GPIOPtr Leosac::Hardware::LED::gpio_
private

The underlying GPIO.

Definition at line 63 of file LED.hpp.


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