33# define NUM_UARTS UART_LAST
48 void GetConfig (
byte * Response, uint32_t maxlen);
51 void SetConfig (ArduinoJson::JsonDocument & NewConfig);
60 void WriteChannelData (uint32_t StartChannelId, uint32_t ChannelCount, uint8_t * pData);
61 void ReadChannelData (uint32_t StartChannelId, uint32_t ChannelCount, uint8_t *pTargetData);
64 void RelayUpdate (uint8_t RelayId, String & NewValue, String & Response);
69 #ifdef DEFAULT_UART_0_GPIO
70 OutputChannelId_UART_0,
73 #ifdef DEFAULT_UART_1_GPIO
74 OutputChannelId_UART_1,
77 #ifdef DEFAULT_UART_2_GPIO
78 OutputChannelId_UART_2,
81 #ifdef DEFAULT_RMT_0_GPIO
82 OutputChannelId_RMT_0,
85 #ifdef DEFAULT_RMT_1_GPIO
86 OutputChannelId_RMT_1,
89 #ifdef DEFAULT_RMT_2_GPIO
90 OutputChannelId_RMT_2,
93 #ifdef DEFAULT_RMT_3_GPIO
94 OutputChannelId_RMT_3,
97 #ifdef DEFAULT_RMT_4_GPIO
98 OutputChannelId_RMT_4,
101 #ifdef DEFAULT_RMT_5_GPIO
102 OutputChannelId_RMT_5,
105 #ifdef DEFAULT_RMT_6_GPIO
106 OutputChannelId_RMT_6,
109 #ifdef DEFAULT_RMT_7_GPIO
110 OutputChannelId_RMT_7,
113 #ifdef SUPPORT_SPI_OUTPUT
114 OutputChannelId_SPI_1,
117 #if defined(SUPPORT_OutputType_Relay) || defined(SUPPORT_OutputType_Servo_PCA9685)
118 OutputChannelId_Relay,
130 #ifdef SUPPORT_OutputType_WS2811
131 OutputType_WS2811 = 1,
134 #ifdef SUPPORT_OutputType_GECE
138 #ifdef SUPPORT_OutputType_DMX
142 #ifdef SUPPORT_OutputType_Renard
143 OutputType_Renard = 4,
146 #ifdef SUPPORT_OutputType_Serial
147 OutputType_Serial = 5,
150 #ifdef SUPPORT_OutputType_Relay
151 OutputType_Relay = 6,
154 #ifdef SUPPORT_OutputType_Servo_PCA9685
155 OutputType_Servo_PCA9685 = 7,
158 #ifdef SUPPORT_OutputType_UCS1903
159 OutputType_UCS1903 = 8,
162 #ifdef SUPPORT_OutputType_TM1814
163 OutputType_TM1814 = 9,
166 #ifdef SUPPORT_OutputType_WS2801
167 OutputType_WS2801 = 10,
170 #ifdef SUPPORT_OutputType_APA102
171 OutputType_APA102 = 11,
174 #ifdef SUPPORT_OutputType_GS8208
175 OutputType_GS8208 = 12,
178 #ifdef SUPPORT_OutputType_UCS8903
179 OutputType_UCS8903 = 13,
182 #ifdef SUPPORT_OutputType_TLS3001
183 OutputType_TLS3001 = 14,
186 #ifdef SUPPORT_OutputType_GRINCH
187 OutputType_GRINCH = 15,
195#ifdef ARDUINO_ARCH_ESP8266
196# define OM_MAX_NUM_CHANNELS (1200 * 3)
198# define OM_MAX_NUM_CHANNELS (3000 * 3)
232 #define NO_CONFIG_NEEDED time_t(-1)
253#if defined(ARDUINO_ARCH_ESP32)
254 TaskHandle_t myTaskHandle = NULL;
258#define OM_IS_UART (CurrentOutput.PortType == OM_PortType_t::Uart)
259#define OM_IS_RMT (CurrentOutput.PortType == OM_PortType_t::Rmt)
c_FileMgr FileMgr
Definition FileMgr.cpp:2180
#define OM_MAX_NUM_CHANNELS
Definition OutputMgr.hpp:198
#define NO_CONFIG_NEEDED
Definition OutputMgr.hpp:232
#define NUM_UARTS
forward declaration to the pure virtual output class that will be defined later.
Definition OutputMgr.hpp:35
c_OutputMgr OutputMgr
Definition OutputMgr.cpp:1601
void DeleteFlashFile(const String &FileName)
Definition FileMgr.cpp:563
Definition OutputCommon.hpp:31
Definition OutputMgr.hpp:39
e_OutputChannelIds
Definition OutputMgr.hpp:68
@ OutputChannelId_End
Definition OutputMgr.hpp:121
@ OutputChannelId_Start
Definition OutputMgr.hpp:122
e_OutputType
Definition OutputMgr.hpp:127
@ OutputType_Disabled
Definition OutputMgr.hpp:128
@ OutputType_Start
Definition OutputMgr.hpp:192
@ OutputType_End
Definition OutputMgr.hpp:191
void GetDriverName(String &Name)
Definition OutputMgr.hpp:59
void LoadConfig()
Read the current configuration data from nvram.
Definition OutputMgr.cpp:995
void CreateJsonConfig(JsonObject &jsonConfig)
Definition OutputMgr.cpp:281
gpio_num_t ConsoleRxGpio
Definition OutputMgr.hpp:252
void UpdateDisplayBufferReferences(void)
Definition OutputMgr.cpp:1352
bool ProcessJsonConfig(JsonDocument &jsonConfig)
Definition OutputMgr.cpp:1126
c_OutputMgr()
< Start up the driver and put it into a safe mode
Definition OutputMgr.cpp:198
void GetPortCounts(uint16_t &PixelCount, uint16_t &SerialCount)
Definition OutputMgr.hpp:53
void GetConfig(byte *Response, uint32_t maxlen)
Definition OutputMgr.cpp:452
virtual ~c_OutputMgr()
< deallocate any resources and put the output channels into a safe state
Definition OutputMgr.cpp:209
uint32_t UsedBufferSize
Definition OutputMgr.hpp:250
void GetStatus(JsonObject &jsonStatus)
Definition OutputMgr.cpp:463
uint8_t OutputBuffer[OM_MAX_NUM_CHANNELS]
Definition OutputMgr.hpp:249
void SetConfig(const char *NewConfig)
Save the current configuration data to nvram.
Definition OutputMgr.cpp:1225
void DeleteConfig()
Definition OutputMgr.hpp:57
void ClearBuffer()
Definition OutputMgr.cpp:1590
void InstantiateNewOutputChannel(DriverInfo_t &ChannelIndex, e_OutputType NewChannelType, bool StartDriver=true)
Definition OutputMgr.cpp:496
bool BuildingNewConfig
Definition OutputMgr.hpp:237
time_t ConfigLoadNeeded
Definition OutputMgr.hpp:234
bool ConfigInProgress
Definition OutputMgr.hpp:235
bool FindJsonChannelConfig(JsonDocument &jsonConfig, e_OutputChannelIds ChanId, e_OutputType Type, JsonObject &ChanConfig)
Definition OutputMgr.cpp:1034
void Begin()
set up the operating environment based on the current config (or defaults)
Definition OutputMgr.cpp:225
void SetSerialUart()
Definition OutputMgr.cpp:1274
OM_PortType_t
Definition OutputMgr.hpp:202
@ Uart
Definition OutputMgr.hpp:203
@ Undefined
Definition OutputMgr.hpp:207
@ Spi
Definition OutputMgr.hpp:205
@ Relay
Definition OutputMgr.hpp:206
@ Rmt
Definition OutputMgr.hpp:204
uint32_t GetBufferUsedSize()
Get the size (in intensities) of the buffer into which the E1.31 handler will stuff data.
Definition OutputMgr.hpp:55
void PauseOutputs(bool NewState)
Definition OutputMgr.cpp:1450
uint32_t GetBufferSize()
Get the size (in intensities) of the buffer into which the E1.31 handler will stuff data.
Definition OutputMgr.hpp:56
void WriteChannelData(uint32_t StartChannelId, uint32_t ChannelCount, uint8_t *pData)
Definition OutputMgr.cpp:1466
gpio_num_t ConsoleTxGpio
Definition OutputMgr.hpp:251
void ScheduleLoadConfig()
Definition OutputMgr.hpp:46
void CreateNewConfig()
Definition OutputMgr.cpp:361
void ReadChannelData(uint32_t StartChannelId, uint32_t ChannelCount, uint8_t *pTargetData)
Definition OutputMgr.cpp:1530
String ConfigFileName
Definition OutputMgr.hpp:247
DriverInfo_t OutputChannelDrivers[OutputChannelId_End]
Definition OutputMgr.hpp:229
uint8_t * GetBufferAddress()
Get the address of the buffer into which the E1.31 handler will stuff data.
Definition OutputMgr.hpp:54
void RelayUpdate(uint8_t RelayId, String &NewValue, String &Response)
Definition OutputMgr.cpp:1423
void Poll()
Call from loop(), renders output data.
Definition OutputMgr.cpp:1319
bool HasBeenInitialized
Definition OutputMgr.hpp:233
bool OutputIsPaused
Definition OutputMgr.hpp:236
Definition OutputMgr.hpp:212
gpio_num_t GpioPin
Definition OutputMgr.hpp:221
c_OutputCommon * pOutputChannelDriver
Definition OutputMgr.hpp:225
OM_PortType_t PortType
Definition OutputMgr.hpp:222
uint32_t OutputChannelSize
Definition OutputMgr.hpp:218
uint32_t OutputChannelEndOffset
Definition OutputMgr.hpp:219
uint32_t OutputBufferStartingOffset
Definition OutputMgr.hpp:213
uint32_t OutputBufferDataSize
Definition OutputMgr.hpp:214
uint32_t OutputBufferEndOffset
Definition OutputMgr.hpp:215
uart_port_t PortId
Definition OutputMgr.hpp:223
e_OutputChannelIds DriverId
Definition OutputMgr.hpp:224
uint32_t OutputChannelStartingOffset
Definition OutputMgr.hpp:217