ESPixelStick Firmware
Firmware for the ESPixelStick
Loading...
Searching...
No Matches
InputAlexa.h
Go to the documentation of this file.
1
#pragma once
2
/*
3
* InputAlexa.h
4
*
5
* Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver
6
* Copyright (c) 2021, 2025 Shelby Merrick
7
* http://www.forkineye.com
8
*
9
* This program is provided free for you to use in any way that you wish,
10
* subject to the laws and regulations where you are using it. Due diligence
11
* is strongly suggested before using this code. Please give credit where due.
12
*
13
* The Author makes no warranty of any kind, express or implied, with regard
14
* to this program or the documentation contained in this document. The
15
* Author shall not be liable in any event for incidental or consequential
16
* damages in connection with, or arising out of, the furnishing, performance
17
* or use of these programs.
18
*
19
*/
20
21
#include "
InputCommon.hpp
"
22
#include "
WebMgr.hpp
"
23
24
class
c_InputAlexa
:
public
c_InputCommon
25
{
26
public
:
27
28
c_InputAlexa
(
29
c_InputMgr::e_InputChannelIds
NewInputChannelId,
30
c_InputMgr::e_InputType
NewChannelType,
31
uint32_t BufferSize);
32
33
virtual
~c_InputAlexa
();
34
35
// functions to be provided by the derived class
36
void
Begin
();
37
bool
SetConfig
(JsonObject& jsonConfig);
38
void
GetConfig
(JsonObject& jsonConfig);
39
void
GetStatus
(JsonObject& jsonStatus);
40
void
Process
();
41
void
GetDriverName
(String& sDriverName) { sDriverName =
"Alexa"
; }
42
void
SetBufferInfo
(uint32_t BufferSize);
43
44
private
:
45
46
Ticker
mqttTicker
;
// Ticker to handle MQTT
47
c_InputCommon
*
pEffectsEngine
=
nullptr
;
48
49
void
validateConfiguration
();
50
void
onMessage
(EspalexaDevice* pDevice);
51
52
void
load
();
53
void
save
();
54
55
const
char
*
ON
=
"ON"
;
56
const
char
*
OFF
=
"OFF"
;
57
58
bool
stateOn
=
false
;
59
60
};
InputCommon.hpp
WebMgr.hpp
c_InputAlexa
Definition
InputAlexa.h:25
c_InputAlexa::save
void save()
Save configuration to File System.
c_InputAlexa::mqttTicker
Ticker mqttTicker
Definition
InputAlexa.h:46
c_InputAlexa::load
void load()
Load configuration from File System.
c_InputAlexa::Process
void Process()
Call from loop(), renders Input data.
Definition
InputAlexa.cpp:103
c_InputAlexa::SetBufferInfo
void SetBufferInfo(uint32_t BufferSize)
Definition
InputAlexa.cpp:116
c_InputAlexa::SetConfig
bool SetConfig(JsonObject &jsonConfig)
Set a new config in the driver.
Definition
InputAlexa.cpp:131
c_InputAlexa::ON
const char * ON
Definition
InputAlexa.h:55
c_InputAlexa::GetConfig
void GetConfig(JsonObject &jsonConfig)
Get the current config used by the driver.
Definition
InputAlexa.cpp:85
c_InputAlexa::pEffectsEngine
c_InputCommon * pEffectsEngine
Definition
InputAlexa.h:47
c_InputAlexa::c_InputAlexa
c_InputAlexa(c_InputMgr::e_InputChannelIds NewInputChannelId, c_InputMgr::e_InputType NewChannelType, uint32_t BufferSize)
Definition
InputAlexa.cpp:31
c_InputAlexa::Begin
void Begin()
set up the operating environment based on the current config (or defaults)
Definition
InputAlexa.cpp:62
c_InputAlexa::OFF
const char * OFF
Definition
InputAlexa.h:56
c_InputAlexa::GetStatus
void GetStatus(JsonObject &jsonStatus)
Definition
InputAlexa.cpp:95
c_InputAlexa::~c_InputAlexa
virtual ~c_InputAlexa()
Definition
InputAlexa.cpp:44
c_InputAlexa::onMessage
void onMessage(EspalexaDevice *pDevice)
Definition
InputAlexa.cpp:155
c_InputAlexa::GetDriverName
void GetDriverName(String &sDriverName)
get the name for the instantiated driver
Definition
InputAlexa.h:41
c_InputAlexa::validateConfiguration
void validateConfiguration()
Definition
InputAlexa.cpp:141
c_InputAlexa::stateOn
bool stateOn
Definition
InputAlexa.h:58
c_InputCommon
Definition
InputCommon.hpp:27
c_InputMgr::e_InputType
e_InputType
Definition
InputMgr.hpp:71
c_InputMgr::e_InputChannelIds
e_InputChannelIds
Definition
InputMgr.hpp:40
include
input
InputAlexa.h
Generated by
1.12.0