Leosac  0.7.0
Leosac::Hardware Namespace Reference

Provides facade classes to hardware device implementation. More...


class  Buzzer
 Abstraction of Buzzer device attributes. More...
struct  BuzzerSerializer
class  Device
 Base class for hardware devices. More...
struct  DeviceSerializer
class  FGPIO
 A Facade to a GPIO object. More...
class  FLED
 A Facade to a LED object. More...
class  FWiegandReader
 Facade object for a Wiegand Reader device. More...
class  GPIO
 Abstraction of a GPIO device attributes. More...
struct  GPIOSerializer
class  HardwareService
 Database aware Hardware Service. More...
class  LED
 Abstraction of LED device attributes. More...
struct  LEDSerializer
 Serializer code is copy-pasted from buzzer's serializer. More...
class  RFIDReader
 Abstraction of a RFID Reader device. More...
struct  RFIDReaderSerializer


using FBuzzer = FLED
 A Facade to a Buzzer object that you can turn on or off. More...
using DeviceId = UUID
using DevicePtr = std::shared_ptr< Device >
using GPIOPtr = std::shared_ptr< GPIO >
using LEDPtr = std::shared_ptr< LED >
using BuzzerPtr = std::shared_ptr< Buzzer >


enum  DeviceClass {
  DeviceClass::UNKNOWN = 0, DeviceClass::GPIO = 1, DeviceClass::RFID_READERS = 2, DeviceClass::LED = 3,
  DeviceClass::BUZZER = 4
 An enumeration describing the class of the device. More...

Detailed Description

Provides facade classes to hardware device implementation.

Classes in this namespace are classes that hide message-passing details to their caller.

Since devices support is implemented through module, we need to send message to communicate with the device. Those classes provide a nice abstraction to do so with traditional method call instead of manually sending message.

It is recommended to use theses classes to interact with a device.

Typedef Documentation

◆ BuzzerPtr

using Leosac::Hardware::BuzzerPtr = typedef std::shared_ptr<Buzzer>

Definition at line 61 of file HardwareFwd.hpp.

◆ DeviceId

Definition at line 51 of file HardwareFwd.hpp.

◆ DevicePtr

using Leosac::Hardware::DevicePtr = typedef std::shared_ptr<Device>

Definition at line 52 of file HardwareFwd.hpp.

◆ FBuzzer

A Facade to a Buzzer object that you can turn on or off.

The interface is exactly the same as a LED, so this class is simply an alias.

See also
Leosac::Hardware::FLED for details about this object behavior.

Definition at line 34 of file FBuzzer.hpp.


using Leosac::Hardware::GPIOPtr = typedef std::shared_ptr<GPIO>

Definition at line 55 of file HardwareFwd.hpp.

◆ LEDPtr

using Leosac::Hardware::LEDPtr = typedef std::shared_ptr<LED>

Definition at line 58 of file HardwareFwd.hpp.

Enumeration Type Documentation

◆ DeviceClass

An enumeration describing the class of the device.

Devices are grouped together based on what they are.

The DeviceClass represents the type of device that leosac is aware of and can deal with. Modules provides implementation for supporting existing DeviceClass.

If new type of hardware would become supported (biometric reader), a new entry in the DeviceClass enumeration should be added before a module can provide proper support for the device.


Definition at line 41 of file HardwareFwd.hpp.