Leosac  0.8.0
Open Source Access Control
Buzzer.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014-2017 Leosac
3 
4  This file is part of Leosac.
5 
6  Leosac is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Affero General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Leosac is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Affero General Public License for more details.
15 
16  You should have received a copy of the GNU Affero General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #include "hardware/Buzzer.hpp"
21 #include "hardware/GPIO.hpp"
22 
23 namespace Leosac
24 {
25 namespace Hardware
26 {
27 
30 {
31 }
32 
33 void Buzzer::validation_callback(odb::callback_event e, odb::database &db) const
34 {
36 }
37 
38 const GPIOPtr &Buzzer::gpio() const
39 {
40  return gpio_;
41 }
42 
43 void Buzzer::gpio(const GPIOPtr &gpio)
44 {
45  gpio_ = gpio;
46 }
47 
49 {
51 }
52 
53 void Buzzer::default_blink_duration(int64_t default_blink_duration)
54 {
56 }
57 
59 {
60  return default_blink_speed_;
61 }
62 
63 void Buzzer::default_blink_speed(int64_t default_blink_speed)
64 {
66 }
67 }
68 }
Leosac::Hardware::Buzzer::default_blink_speed_
int64_t default_blink_speed_
Definition: Buzzer.hpp:64
Leosac::Hardware::GPIOPtr
std::shared_ptr< GPIO > GPIOPtr
Definition: HardwareFwd.hpp:58
Leosac::Hardware::DeviceClass
DeviceClass
An enumeration describing the class of the device.
Definition: HardwareFwd.hpp:42
Leosac::Hardware::DeviceClass::BUZZER
@ BUZZER
Leosac::Hardware::Device::validation_callback
virtual void validation_callback(odb::callback_event e, odb::database &) const
Definition: Device.cpp:85
Leosac::Hardware::Buzzer::Buzzer
Buzzer()
Definition: Buzzer.cpp:28
Leosac::Hardware::Buzzer::validation_callback
void validation_callback(odb::callback_event e, odb::database &) const override
Definition: Buzzer.cpp:33
Leosac::Hardware::Device
Base class for hardware devices.
Definition: Device.hpp:44
Leosac::Hardware::Buzzer::gpio
const GPIOPtr & gpio() const
Definition: Buzzer.cpp:38
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition: APIStatusCode.hpp:22
Leosac::Hardware::Buzzer::default_blink_speed
int64_t default_blink_speed() const
Definition: Buzzer.cpp:58
Buzzer.hpp
GPIO.hpp
Leosac::Hardware::Buzzer::default_blink_duration_
int64_t default_blink_duration_
Definition: Buzzer.hpp:63
Leosac::Hardware::Buzzer::default_blink_duration
int64_t default_blink_duration() const
Definition: Buzzer.cpp:48
Leosac::Hardware::Buzzer::gpio_
GPIOPtr gpio_
The underlying GPIO.
Definition: Buzzer.hpp:69