Leosac  0.8.0
Open Source Access Control
LED.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/LED.hpp"
21 #include "hardware/GPIO.hpp"
22 
23 namespace Leosac
24 {
25 namespace Hardware
26 {
27 
30 {
31 }
32 
33 void LED::validation_callback(odb::callback_event e, odb::database &db) const
34 {
36 }
37 
38 const GPIOPtr &LED::gpio() const
39 {
40  return gpio_;
41 }
42 
43 void LED::gpio(const GPIOPtr &gpio)
44 {
45  gpio_ = gpio;
46 }
47 
49 {
51 }
52 
53 void LED::default_blink_duration(int64_t default_blink_duration)
54 {
56 }
57 
58 int64_t LED::default_blink_speed() const
59 {
60  return default_blink_speed_;
61 }
62 
63 void LED::default_blink_speed(int64_t default_blink_speed)
64 {
66 }
67 }
68 }
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::LED::gpio
const GPIOPtr & gpio() const
Definition: LED.cpp:38
Leosac::Hardware::Device::validation_callback
virtual void validation_callback(odb::callback_event e, odb::database &) const
Definition: Device.cpp:85
Leosac::Hardware::LED::default_blink_speed
int64_t default_blink_speed() const
Definition: LED.cpp:58
Leosac::Hardware::LED::validation_callback
void validation_callback(odb::callback_event e, odb::database &) const override
Definition: LED.cpp:33
Leosac::Hardware::Device
Base class for hardware devices.
Definition: Device.hpp:44
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition: APIStatusCode.hpp:22
Leosac::Hardware::LED::default_blink_duration_
int64_t default_blink_duration_
Definition: LED.hpp:57
Leosac::Hardware::LED::gpio_
GPIOPtr gpio_
The underlying GPIO.
Definition: LED.hpp:63
Leosac::Hardware::LED::default_blink_duration
int64_t default_blink_duration() const
Definition: LED.cpp:48
GPIO.hpp
Leosac::Hardware::LED::default_blink_speed_
int64_t default_blink_speed_
Definition: LED.hpp:58
Leosac::Hardware::LED
Abstraction of LED device attributes.
Definition: LED.hpp:36
LED.hpp
Leosac::Hardware::LED::LED
LED()
Definition: LED.cpp:28