hyperion.ng
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Static Protected Attributes | List of all members
LedDeviceWrapper Class Reference

Creates and destroys LedDevice instances with LedDeviceFactory and moves the device to a thread. More...

#include <LedDeviceWrapper.h>

Inheritance diagram for LedDeviceWrapper:

Public Slots

void handleComponentState (const hyperion::Components component, const bool state)
 Handle new component state request component The comp from enum. More...
 

Signals

int write (const std::vector< ColorRgb > &ledValues)
 PIPER signal for Hyperion -> LedDevice. More...
 

Public Member Functions

 LedDeviceWrapper (Hyperion *hyperion)
 
void createLedDevice (const QJsonObject &config)
 Contructs a new LedDevice, moves to thread and starts. More...
 
int getLatchTime ()
 Get the current latchtime of the ledDevice @ return latchtime in ms.
 
const QString & getActiveDevice ()
 Get the current active ledDevice.
 
const bool & enabled ()
 Return the last enable state.
 
const QString & getColorOrder ()
 Get the current colorOrder from device.
 

Static Public Member Functions

static const QJsonObject getLedDeviceSchemas ()
 Get all available device schemas. More...
 
static int addToDeviceMap (QString name, LedDeviceCreateFuncType funcPtr)
 add all device constrcutors to the map
 
static const LedDeviceRegistry & getDeviceMap ()
 Return all available device contructors. More...
 

Static Protected Attributes

static LedDeviceRegistry _ledDeviceMap = LedDeviceRegistry()
 contains all available led device constrcutors
 

Detailed Description

Creates and destroys LedDevice instances with LedDeviceFactory and moves the device to a thread.

Pipes all signal/slots and methods to LedDevice instance

Member Function Documentation

§ createLedDevice()

void LedDeviceWrapper::createLedDevice ( const QJsonObject &  config)

Contructs a new LedDevice, moves to thread and starts.

Parameters
configWith the given config

§ getDeviceMap()

const LedDeviceRegistry & LedDeviceWrapper::getDeviceMap ( )
static

Return all available device contructors.

Returns
device constrcutors

§ getLedDeviceSchemas()

const QJsonObject LedDeviceWrapper::getLedDeviceSchemas ( )
static

Get all available device schemas.

Returns
device schemas

§ handleComponentState

void LedDeviceWrapper::handleComponentState ( const hyperion::Components  component,
const bool  state 
)
slot

Handle new component state request component The comp from enum.

Parameters
stateThe new state

§ write

int LedDeviceWrapper::write ( const std::vector< ColorRgb > &  ledValues)
signal

PIPER signal for Hyperion -> LedDevice.

Parameters
[in]ledValuesThe RGB-color per led
Returns
Zero on success else negative

The documentation for this class was generated from the following files: