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);
70 #ifdef DEFAULT_UART_0_GPIO
71 OutputChannelId_UART_0,
74 #ifdef DEFAULT_UART_1_GPIO
75 OutputChannelId_UART_1,
78 #ifdef DEFAULT_UART_2_GPIO
79 OutputChannelId_UART_2,
82 #ifdef DEFAULT_RMT_0_GPIO
83 OutputChannelId_RMT_0,
86 #ifdef DEFAULT_RMT_1_GPIO
87 OutputChannelId_RMT_1,
90 #ifdef DEFAULT_RMT_2_GPIO
91 OutputChannelId_RMT_2,
94 #ifdef DEFAULT_RMT_3_GPIO
95 OutputChannelId_RMT_3,
98 #ifdef DEFAULT_RMT_4_GPIO
99 OutputChannelId_RMT_4,
102 #ifdef DEFAULT_RMT_5_GPIO
103 OutputChannelId_RMT_5,
106 #ifdef DEFAULT_RMT_6_GPIO
107 OutputChannelId_RMT_6,
110 #ifdef DEFAULT_RMT_7_GPIO
111 OutputChannelId_RMT_7,
114 #ifdef SUPPORT_SPI_OUTPUT
115 OutputChannelId_SPI_1,
118 #if defined(SUPPORT_OutputType_Relay) || defined(SUPPORT_OutputType_Servo_PCA9685)
119 OutputChannelId_Relay,
131 #ifdef SUPPORT_OutputType_WS2811
132 OutputType_WS2811 = 1,
135 #ifdef SUPPORT_OutputType_GECE
139 #ifdef SUPPORT_OutputType_DMX
143 #ifdef SUPPORT_OutputType_Renard
144 OutputType_Renard = 4,
147 #ifdef SUPPORT_OutputType_Serial
148 OutputType_Serial = 5,
151 #ifdef SUPPORT_OutputType_Relay
152 OutputType_Relay = 6,
155 #ifdef SUPPORT_OutputType_Servo_PCA9685
156 OutputType_Servo_PCA9685 = 7,
159 #ifdef SUPPORT_OutputType_UCS1903
160 OutputType_UCS1903 = 8,
163 #ifdef SUPPORT_OutputType_TM1814
164 OutputType_TM1814 = 9,
167 #ifdef SUPPORT_OutputType_WS2801
168 OutputType_WS2801 = 10,
171 #ifdef SUPPORT_OutputType_APA102
172 OutputType_APA102 = 11,
175 #ifdef SUPPORT_OutputType_GS8208
176 OutputType_GS8208 = 12,
179 #ifdef SUPPORT_OutputType_UCS8903
180 OutputType_UCS8903 = 13,
183 #ifdef SUPPORT_OutputType_TLS3001
184 OutputType_TLS3001 = 14,
187 #ifdef SUPPORT_OutputType_GRINCH
188 OutputType_GRINCH = 15,
196#ifdef ARDUINO_ARCH_ESP8266
197# define OM_MAX_NUM_CHANNELS (1200 * 3)
199# define OM_MAX_NUM_CHANNELS (3000 * 3)
212 #define OutputDriverMemorySize 1200
237 #define NO_CONFIG_NEEDED time_t(-1)
259#if defined(ARDUINO_ARCH_ESP32)
260 TaskHandle_t myTaskHandle = NULL;
264#define OM_IS_UART (CurrentOutput.PortType == OM_PortType_t::Uart)
265#define OM_IS_RMT (CurrentOutput.PortType == OM_PortType_t::Rmt)
c_FileMgr FileMgr
Definition FileMgr.cpp:2241
#define OM_MAX_NUM_CHANNELS
Definition OutputMgr.hpp:199
#define NO_CONFIG_NEEDED
Definition OutputMgr.hpp:237
#define NUM_UARTS
forward declaration to the pure virtual output class that will be defined later.
Definition OutputMgr.hpp:35
#define OutputDriverMemorySize
Definition OutputMgr.hpp:212
c_OutputMgr OutputMgr
Definition OutputMgr.cpp:1633
void DeleteFlashFile(String FileName)
Definition FileMgr.cpp:587
Definition OutputCommon.hpp:31
Definition OutputMgr.hpp:39
e_OutputChannelIds
Definition OutputMgr.hpp:69
@ OutputChannelId_End
Definition OutputMgr.hpp:122
@ OutputChannelId_Start
Definition OutputMgr.hpp:123
e_OutputType
Definition OutputMgr.hpp:128
@ OutputType_Disabled
Definition OutputMgr.hpp:129
@ OutputType_Start
Definition OutputMgr.hpp:193
@ OutputType_End
Definition OutputMgr.hpp:192
void GetDriverName(String &Name)
Definition OutputMgr.hpp:59
void LoadConfig()
Read the current configuration data from nvram.
Definition OutputMgr.cpp:1027
void CreateJsonConfig(JsonObject &jsonConfig)
Definition OutputMgr.cpp:292
gpio_num_t ConsoleRxGpio
Definition OutputMgr.hpp:257
void UpdateDisplayBufferReferences(void)
Definition OutputMgr.cpp:1384
bool ProcessJsonConfig(JsonDocument &jsonConfig)
Definition OutputMgr.cpp:1158
c_OutputMgr()
< Start up the driver and put it into a safe mode
Definition OutputMgr.cpp:205
void GetPortCounts(uint16_t &PixelCount, uint16_t &SerialCount)
Definition OutputMgr.hpp:53
void ClearStatistics(void)
Definition OutputMgr.cpp:496
void GetConfig(byte *Response, uint32_t maxlen)
Definition OutputMgr.cpp:464
virtual ~c_OutputMgr()
< deallocate any resources and put the output channels into a safe state
Definition OutputMgr.cpp:220
uint32_t UsedBufferSize
Definition OutputMgr.hpp:255
void GetStatus(JsonObject &jsonStatus)
Definition OutputMgr.cpp:475
uint8_t OutputBuffer[OM_MAX_NUM_CHANNELS]
Definition OutputMgr.hpp:254
void SetConfig(const char *NewConfig)
Save the current configuration data to nvram.
Definition OutputMgr.cpp:1257
void DeleteConfig()
Definition OutputMgr.hpp:57
void ClearBuffer()
Definition OutputMgr.cpp:1622
void InstantiateNewOutputChannel(DriverInfo_t &ChannelIndex, e_OutputType NewChannelType, bool StartDriver=true)
Definition OutputMgr.cpp:527
bool BuildingNewConfig
Definition OutputMgr.hpp:242
time_t ConfigLoadNeeded
Definition OutputMgr.hpp:239
bool ConfigInProgress
Definition OutputMgr.hpp:240
bool FindJsonChannelConfig(JsonDocument &jsonConfig, e_OutputChannelIds ChanId, e_OutputType Type, JsonObject &ChanConfig)
Definition OutputMgr.cpp:1066
void Begin()
set up the operating environment based on the current config (or defaults)
Definition OutputMgr.cpp:236
void SetSerialUart()
Definition OutputMgr.cpp:1306
OM_PortType_t
Definition OutputMgr.hpp:203
@ Uart
Definition OutputMgr.hpp:204
@ Undefined
Definition OutputMgr.hpp:208
@ Spi
Definition OutputMgr.hpp:206
@ Relay
Definition OutputMgr.hpp:207
@ Rmt
Definition OutputMgr.hpp:205
uint32_t GetBufferUsedSize()
Get the size (in intensities) of the buffer into which the E1.31 handler will stuff data.
Definition OutputMgr.hpp:55
uint32_t GetDriverSize()
Definition OutputMgr.hpp:213
void PauseOutputs(bool NewState)
Definition OutputMgr.cpp:1482
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:1498
gpio_num_t ConsoleTxGpio
Definition OutputMgr.hpp:256
void ScheduleLoadConfig()
Definition OutputMgr.hpp:46
void CreateNewConfig()
Definition OutputMgr.cpp:372
void ReadChannelData(uint32_t StartChannelId, uint32_t ChannelCount, uint8_t *pTargetData)
Definition OutputMgr.cpp:1562
String ConfigFileName
Definition OutputMgr.hpp:252
DriverInfo_t OutputChannelDrivers[OutputChannelId_End]
Definition OutputMgr.hpp:234
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:1455
void Poll()
Call from loop(), renders output data.
Definition OutputMgr.cpp:1351
bool HasBeenInitialized
Definition OutputMgr.hpp:238
bool OutputIsPaused
Definition OutputMgr.hpp:241
Definition OutputMgr.hpp:216
gpio_num_t GpioPin
Definition OutputMgr.hpp:226
bool OutputDriverInUse
Definition OutputMgr.hpp:230
OM_PortType_t PortType
Definition OutputMgr.hpp:227
uint32_t OutputChannelSize
Definition OutputMgr.hpp:223
byte OutputDriver[OutputDriverMemorySize]
Definition OutputMgr.hpp:217
uint32_t OutputChannelEndOffset
Definition OutputMgr.hpp:224
uint32_t OutputBufferStartingOffset
Definition OutputMgr.hpp:218
uint32_t OutputBufferDataSize
Definition OutputMgr.hpp:219
uint32_t OutputBufferEndOffset
Definition OutputMgr.hpp:220
uart_port_t PortId
Definition OutputMgr.hpp:228
e_OutputChannelIds DriverId
Definition OutputMgr.hpp:229
uint32_t OutputChannelStartingOffset
Definition OutputMgr.hpp:222