Leosac  0.8.0
Open Source Access Control
HardwareFwd.hpp
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 #pragma once
21 
22 #include "tools/Uuid.hpp"
23 #include <memory>
24 
25 namespace Leosac
26 {
27 namespace Hardware
28 {
42 enum class DeviceClass
43 {
44  UNKNOWN = 0,
45  GPIO = 1,
46  RFID_READER = 2,
47  LED = 3,
48  BUZZER = 4,
49  EXTERNAL_MESSAGE = 5,
50  EXTERNAL_SERVER = 6
51 };
52 
53 class Device;
54 using DeviceId = UUID;
55 using DevicePtr = std::shared_ptr<Device>;
56 
57 class GPIO;
58 using GPIOPtr = std::shared_ptr<GPIO>;
59 
60 class LED;
61 using LEDPtr = std::shared_ptr<LED>;
62 
63 class Buzzer;
64 using BuzzerPtr = std::shared_ptr<Buzzer>;
65 
66 class ExternalMessage;
67 using ExternalMessagePtr = std::shared_ptr<ExternalMessage>;
68 
69 class ExternalServer;
70 using ExternalServerPtr = std::shared_ptr<ExternalServer>;
71 }
72 }
Uuid.hpp
Leosac::Hardware::DeviceClass::RFID_READER
@ RFID_READER
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::LEDPtr
std::shared_ptr< LED > LEDPtr
Definition: HardwareFwd.hpp:61
Leosac::Hardware::DeviceClass::BUZZER
@ BUZZER
Leosac::Hardware::DeviceClass::EXTERNAL_MESSAGE
@ EXTERNAL_MESSAGE
Leosac::Hardware::DeviceClass::UNKNOWN
@ UNKNOWN
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition: APIStatusCode.hpp:22
Leosac::Hardware::ExternalMessagePtr
std::shared_ptr< ExternalMessage > ExternalMessagePtr
Definition: HardwareFwd.hpp:67
Leosac::Hardware::ExternalServerPtr
std::shared_ptr< ExternalServer > ExternalServerPtr
Definition: HardwareFwd.hpp:70
Leosac::Hardware::DeviceClass::EXTERNAL_SERVER
@ EXTERNAL_SERVER
Leosac::Hardware::DevicePtr
std::shared_ptr< Device > DevicePtr
Definition: HardwareFwd.hpp:55
Leosac::Hardware::ExternalMessage
Abstraction of an External Messaging device.
Definition: ExternalMessage.hpp:41
Leosac::Hardware::LED
Abstraction of LED device attributes.
Definition: LED.hpp:36
Leosac::Hardware::ExternalServer
Abstraction of an External Server device.
Definition: ExternalServer.hpp:38
Leosac::Hardware::Buzzer
Abstraction of Buzzer device attributes.
Definition: Buzzer.hpp:42
Leosac::Hardware::BuzzerPtr
std::shared_ptr< Buzzer > BuzzerPtr
Definition: HardwareFwd.hpp:64
Leosac::Hardware::GPIO
Abstraction of a GPIO device attributes.
Definition: GPIO.hpp:41
Leosac::UUID
Thin wrapper around boost::uuids::uuid.
Definition: Uuid.hpp:35