ESPixelStick Firmware
Firmware for the ESPixelStick
Loading...
Searching...
No Matches
c_OutputMgr Class Reference

#include <OutputMgr.hpp>

Collaboration diagram for c_OutputMgr:

Classes

struct  DriverInfo_t
 

Public Types

enum  e_OutputChannelIds { OutputChannelId_End , OutputChannelId_Start = 0 }
 
enum  e_OutputType { OutputType_Disabled = 0 , OutputType_End , OutputType_Start = OutputType_Disabled }
 
enum  OM_PortType_t {
  Uart = 0 , Rmt , Spi , Relay ,
  Undefined
}
 

Public Member Functions

 c_OutputMgr ()
 < Start up the driver and put it into a safe mode
 
virtual ~c_OutputMgr ()
 < deallocate any resources and put the output channels into a safe state
 
void Begin ()
 set up the operating environment based on the current config (or defaults)
 
void Poll ()
 Call from loop(), renders output data.
 
void ScheduleLoadConfig ()
 
void LoadConfig ()
 Read the current configuration data from nvram.
 
void GetConfig (byte *Response, uint32_t maxlen)
 
void GetConfig (String &Response)
 
void SetConfig (const char *NewConfig)
 Save the current configuration data to nvram.
 
void SetConfig (ArduinoJson::JsonDocument &NewConfig)
 Save the current configuration data to nvram.
 
void GetStatus (JsonObject &jsonStatus)
 
void GetPortCounts (uint16_t &PixelCount, uint16_t &SerialCount)
 
uint8_t * GetBufferAddress ()
 Get the address of the buffer into which the E1.31 handler will stuff data.
 
uint32_t GetBufferUsedSize ()
 Get the size (in intensities) of the buffer into which the E1.31 handler will stuff data.
 
uint32_t GetBufferSize ()
 Get the size (in intensities) of the buffer into which the E1.31 handler will stuff data.
 
void DeleteConfig ()
 
void PauseOutputs (bool NewState)
 
void GetDriverName (String &Name)
 
void WriteChannelData (uint32_t StartChannelId, uint32_t ChannelCount, uint8_t *pData)
 
void ReadChannelData (uint32_t StartChannelId, uint32_t ChannelCount, uint8_t *pTargetData)
 
void ClearBuffer ()
 
void TaskPoll ()
 

Private Member Functions

bool ProcessJsonConfig (JsonDocument &jsonConfig)
 
void CreateJsonConfig (JsonObject &jsonConfig)
 
void UpdateDisplayBufferReferences (void)
 
void InstantiateNewOutputChannel (DriverInfo_t &ChannelIndex, e_OutputType NewChannelType, bool StartDriver=true)
 
void CreateNewConfig ()
 
void SetSerialUart ()
 
bool FindJsonChannelConfig (JsonDocument &jsonConfig, e_OutputChannelIds ChanId, e_OutputType Type, JsonObject &ChanConfig)
 

Private Attributes

DriverInfo_t OutputChannelDrivers [OutputChannelId_End]
 
bool HasBeenInitialized = false
 
time_t ConfigLoadNeeded = NO_CONFIG_NEEDED
 
bool ConfigInProgress = false
 
bool OutputIsPaused = false
 
bool BuildingNewConfig = false
 
String ConfigFileName
 
uint8_t OutputBuffer [OM_MAX_NUM_CHANNELS]
 
uint32_t UsedBufferSize = 0
 
gpio_num_t ConsoleTxGpio = gpio_num_t::GPIO_NUM_1
 
gpio_num_t ConsoleRxGpio = gpio_num_t::GPIO_NUM_3
 

Member Enumeration Documentation

◆ e_OutputChannelIds

Enumerator
OutputChannelId_End 
OutputChannelId_Start 

◆ e_OutputType

Enumerator
OutputType_Disabled 
OutputType_End 
OutputType_Start 

◆ OM_PortType_t

Enumerator
Uart 
Rmt 
Spi 
Relay 
Undefined 

Constructor & Destructor Documentation

◆ c_OutputMgr()

c_OutputMgr::c_OutputMgr ( )

< Start up the driver and put it into a safe mode

◆ ~c_OutputMgr()

c_OutputMgr::~c_OutputMgr ( )
virtual

< deallocate any resources and put the output channels into a safe state

Member Function Documentation

◆ Begin()

void c_OutputMgr::Begin ( )

set up the operating environment based on the current config (or defaults)

< Start the module

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClearBuffer()

void c_OutputMgr::ClearBuffer ( )
Here is the caller graph for this function:

◆ CreateJsonConfig()

void c_OutputMgr::CreateJsonConfig ( JsonObject & jsonConfig)
private
Here is the caller graph for this function:

◆ CreateNewConfig()

void c_OutputMgr::CreateNewConfig ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeleteConfig()

void c_OutputMgr::DeleteConfig ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindJsonChannelConfig()

bool c_OutputMgr::FindJsonChannelConfig ( JsonDocument & jsonConfig,
e_OutputChannelIds ChanId,
e_OutputType Type,
JsonObject & ChanConfig )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetBufferAddress()

uint8_t * c_OutputMgr::GetBufferAddress ( )
inline

Get the address of the buffer into which the E1.31 handler will stuff data.

Here is the caller graph for this function:

◆ GetBufferSize()

uint32_t c_OutputMgr::GetBufferSize ( )
inline

Get the size (in intensities) of the buffer into which the E1.31 handler will stuff data.

Here is the caller graph for this function:

◆ GetBufferUsedSize()

uint32_t c_OutputMgr::GetBufferUsedSize ( )
inline

Get the size (in intensities) of the buffer into which the E1.31 handler will stuff data.

Here is the caller graph for this function:

◆ GetConfig() [1/2]

void c_OutputMgr::GetConfig ( byte * Response,
uint32_t maxlen )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetConfig() [2/2]

void c_OutputMgr::GetConfig ( String & Response)
Here is the call graph for this function:

◆ GetDriverName()

void c_OutputMgr::GetDriverName ( String & Name)
inline

◆ GetPortCounts()

void c_OutputMgr::GetPortCounts ( uint16_t & PixelCount,
uint16_t & SerialCount )
inline
Here is the caller graph for this function:

◆ GetStatus()

void c_OutputMgr::GetStatus ( JsonObject & jsonStatus)
Here is the caller graph for this function:

◆ InstantiateNewOutputChannel()

void c_OutputMgr::InstantiateNewOutputChannel ( DriverInfo_t & ChannelIndex,
e_OutputType NewChannelType,
bool StartDriver = true )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadConfig()

void c_OutputMgr::LoadConfig ( )

Read the current configuration data from nvram.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PauseOutputs()

void c_OutputMgr::PauseOutputs ( bool NewState)
Here is the caller graph for this function:

◆ Poll()

void c_OutputMgr::Poll ( )

Call from loop(), renders output data.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessJsonConfig()

bool c_OutputMgr::ProcessJsonConfig ( JsonDocument & jsonConfig)
private
Here is the call graph for this function:

◆ ReadChannelData()

void c_OutputMgr::ReadChannelData ( uint32_t StartChannelId,
uint32_t ChannelCount,
uint8_t * pTargetData )
Here is the caller graph for this function:

◆ ScheduleLoadConfig()

void c_OutputMgr::ScheduleLoadConfig ( )
inline
Here is the caller graph for this function:

◆ SetConfig() [1/2]

void c_OutputMgr::SetConfig ( ArduinoJson::JsonDocument & NewConfig)

Save the current configuration data to nvram.

Here is the call graph for this function:

◆ SetConfig() [2/2]

void c_OutputMgr::SetConfig ( const char * NewConfig)

Save the current configuration data to nvram.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetSerialUart()

void c_OutputMgr::SetSerialUart ( )
private
Here is the caller graph for this function:

◆ TaskPoll()

void c_OutputMgr::TaskPoll ( )

◆ UpdateDisplayBufferReferences()

void c_OutputMgr::UpdateDisplayBufferReferences ( void )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteChannelData()

void c_OutputMgr::WriteChannelData ( uint32_t StartChannelId,
uint32_t ChannelCount,
uint8_t * pData )
Here is the caller graph for this function:

Member Data Documentation

◆ BuildingNewConfig

bool c_OutputMgr::BuildingNewConfig = false
private

◆ ConfigFileName

String c_OutputMgr::ConfigFileName
private

◆ ConfigInProgress

bool c_OutputMgr::ConfigInProgress = false
private

◆ ConfigLoadNeeded

time_t c_OutputMgr::ConfigLoadNeeded = NO_CONFIG_NEEDED
private

◆ ConsoleRxGpio

gpio_num_t c_OutputMgr::ConsoleRxGpio = gpio_num_t::GPIO_NUM_3
private

◆ ConsoleTxGpio

gpio_num_t c_OutputMgr::ConsoleTxGpio = gpio_num_t::GPIO_NUM_1
private

◆ HasBeenInitialized

bool c_OutputMgr::HasBeenInitialized = false
private

◆ OutputBuffer

uint8_t c_OutputMgr::OutputBuffer[OM_MAX_NUM_CHANNELS]
private

◆ OutputChannelDrivers

DriverInfo_t c_OutputMgr::OutputChannelDrivers[OutputChannelId_End]
private

◆ OutputIsPaused

bool c_OutputMgr::OutputIsPaused = false
private

◆ UsedBufferSize

uint32_t c_OutputMgr::UsedBufferSize = 0
private

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