sACN  2.0.2
Implementation of ANSI E1.31 (Streaming ACN)
View other versions:
Loading...
Searching...
No Matches
DmxMerger::Settings Struct Reference

A set of configuration settings that a merger needs to initialize. More...

#include <dmx_merger.h>

Public Member Functions

 Settings ()=default
 
 Settings (uint8_t *levels_ptr)
 Create a DmxMerger Settings instance by passing the required members explicitly.
 
bool IsValid () const
 

Data Fields

uint8_t * levels {nullptr}
 
uint8_t * per_address_priorities {nullptr}
 
bool * per_address_priorities_active {nullptr}
 
uint8_t * universe_priority {nullptr}
 
sacn_dmx_merger_source_towners {nullptr}
 
int source_count_max {SACN_RECEIVER_INFINITE_SOURCES}
 

Detailed Description

A set of configuration settings that a merger needs to initialize.

Constructor & Destructor Documentation

◆ Settings() [1/2]

Settings ( )
default

Create an empty, invalid data structure by default.

◆ Settings() [2/2]

Settings ( uint8_t * levels_ptr)
inline

Create a DmxMerger Settings instance by passing the required members explicitly.

Initializes merger settings with the levels output pointer. This constructor is not marked explicit on purpose so that a Settings instance can be implicitly constructed from a levels output pointer, if that's all the application needs.

Optional members can be modified directly in the struct.

Member Function Documentation

◆ IsValid()

bool IsValid ( ) const
inline

Determine whether a DmxMerger Settings instance contains valid data for sACN operation.

Field Documentation

◆ levels

uint8_t* levels {nullptr}

Buffer of DMX_ADDRESS_COUNT levels that this library keeps up to date as it merges. Slots that are not sourced are set to 0. Memory is owned by the application and must remain allocated until the merger is destroyed. While this merger exists, the application must not modify this buffer directly! Doing so would affect the results of the merge.

◆ owners

sacn_dmx_merger_source_t* owners {nullptr}

Buffer of DMX_ADDRESS_COUNT source IDs that indicate the current winner of the merge for that slot, or SACN_DMX_MERGER_SOURCE_INVALID to indicate that there is no winner for that slot. This is used if you need to know the source of each slot. If you only need to know whether or not a slot is sourced, set this to NULL and use per_address_priorities (which has half the memory footprint) to check if the slot has a priority of 0 (not sourced). Memory is owned by the application and must remain allocated until the merger is destroyed.

◆ per_address_priorities

uint8_t* per_address_priorities {nullptr}

Buffer of DMX_ADDRESS_COUNT per-address priorities for each winning slot. This is used if the merge results need to be sent over sACN. Otherwise this can just be set to nullptr. If a source with a universe priority of 0 wins, that priority is converted to 1. If there is no winner for a slot, then a per-address priority of 0 is used to show that there is no source for that slot. Memory is owned by the application and must remain allocated until the merger is destroyed.

◆ per_address_priorities_active

bool* per_address_priorities_active {nullptr}

If the merger output is being transmitted via sACN, this is set to true if per-address-priority packets should be transmitted. Otherwise this is set to false. This can be set to nullptr if not needed, which can save some performance.

◆ source_count_max

int source_count_max {SACN_RECEIVER_INFINITE_SOURCES}

The maximum number of sources this universe will listen to when using dynamic memory.

◆ universe_priority

uint8_t* universe_priority {nullptr}

This is set to the highest universe priority of the currently winning sources. If the merger's output is transmitted by a sACN source, this can be used for the packets' universe priority field. Otherwise this can be set to nullptr if not needed.


The documentation for this struct was generated from the following file: