Leosac
0.8.0
Open Source Access Control
|
Abstraction of Buzzer device attributes. More...
#include <Buzzer.hpp>
Public Member Functions | |
Buzzer () | |
virtual | ~Buzzer ()=default |
void | validation_callback (odb::callback_event e, odb::database &) const override |
const GPIOPtr & | gpio () 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... | |
Abstraction of Buzzer device attributes.
Note: This code is copy pasted with the LED class. Both device share the same attribute set but are different from a semantic point of view. It might be possible to reduce code duplication by using template to share code.
Definition at line 42 of file Buzzer.hpp.
|
explicit |
Definition at line 28 of file Buzzer.cpp.
|
virtualdefault |
int64_t Leosac::Hardware::Buzzer::default_blink_duration | ( | ) | const |
Definition at line 48 of file Buzzer.cpp.
void Leosac::Hardware::Buzzer::default_blink_duration | ( | int64_t | default_blink_duration | ) |
Definition at line 53 of file Buzzer.cpp.
int64_t Leosac::Hardware::Buzzer::default_blink_speed | ( | ) | const |
Definition at line 58 of file Buzzer.cpp.
void Leosac::Hardware::Buzzer::default_blink_speed | ( | int64_t | default_blink_speed | ) |
Definition at line 63 of file Buzzer.cpp.
const GPIOPtr & Leosac::Hardware::Buzzer::gpio | ( | ) | const |
Definition at line 38 of file Buzzer.cpp.
void Leosac::Hardware::Buzzer::gpio | ( | const GPIOPtr & | gpio | ) |
Definition at line 43 of file Buzzer.cpp.
|
overridevirtual |
Reimplemented from Leosac::Hardware::Device.
Definition at line 33 of file Buzzer.cpp.
|
private |
Definition at line 63 of file Buzzer.hpp.
|
private |
Definition at line 64 of file Buzzer.hpp.
|
private |
The underlying GPIO.
Definition at line 69 of file Buzzer.hpp.