28#ifndef SACN_DMX_MERGER_H_
29#define SACN_DMX_MERGER_H_
33#include "etcpal/error.h"
68#define SACN_DMX_MERGER_INVALID -1
75#define SACN_DMX_MERGER_SOURCE_INVALID ((sacn_dmx_merger_source_t)-1)
132#define SACN_DMX_MERGER_CONFIG_INIT \
134 NULL, NULL, NULL, NULL, NULL, SACN_RECEIVER_INFINITE_SOURCES \
143#define SACN_DMX_MERGER_SOURCE_IS_VALID(owners_array, slot_index) \
144 (owners_array[slot_index] != SACN_DMX_MERGER_SOURCE_INVALID)
180 const uint8_t* new_levels,
size_t new_levels_count);
184 uint8_t universe_priority);
Common definitions for sACN.
#define DMX_ADDRESS_COUNT
Definition common.h:55
const SacnDmxMergerSource * sacn_dmx_merger_get_source(sacn_dmx_merger_t merger, sacn_dmx_merger_source_t source)
Gets a read-only view of the source data.
Definition dmx_merger.c:344
etcpal_error_t sacn_dmx_merger_destroy(sacn_dmx_merger_t handle)
Destroy a merger instance.
Definition dmx_merger.c:212
struct SacnDmxMergerSource SacnDmxMergerSource
uint16_t sacn_dmx_merger_source_t
Definition dmx_merger.h:72
etcpal_error_t sacn_dmx_merger_update_levels(sacn_dmx_merger_t merger, sacn_dmx_merger_source_t source, const uint8_t *new_levels, size_t new_levels_count)
Updates a source's levels and recalculates outputs.
Definition dmx_merger.c:385
etcpal_error_t sacn_dmx_merger_create(const SacnDmxMergerConfig *config, sacn_dmx_merger_t *handle)
Create a new merger instance.
Definition dmx_merger.c:170
struct SacnDmxMergerConfig SacnDmxMergerConfig
etcpal_error_t sacn_dmx_merger_update_universe_priority(sacn_dmx_merger_t merger, sacn_dmx_merger_source_t source, uint8_t universe_priority)
Updates a source's universe priority and recalculates outputs.
Definition dmx_merger.c:500
int sacn_dmx_merger_t
Definition dmx_merger.h:65
etcpal_error_t sacn_dmx_merger_update_pap(sacn_dmx_merger_t merger, sacn_dmx_merger_source_t source, const uint8_t *pap, size_t pap_count)
Updates a source's per-address priorities (PAP) and recalculates outputs.
Definition dmx_merger.c:441
etcpal_error_t sacn_dmx_merger_remove_source(sacn_dmx_merger_t merger, sacn_dmx_merger_source_t source)
Removes a source from the merger.
Definition dmx_merger.c:302
etcpal_error_t sacn_dmx_merger_remove_pap(sacn_dmx_merger_t merger, sacn_dmx_merger_source_t source)
Removes the per-address priority (PAP) data from the source and recalculate outputs.
Definition dmx_merger.c:544
etcpal_error_t sacn_dmx_merger_add_source(sacn_dmx_merger_t merger, sacn_dmx_merger_source_t *source_id)
Adds a new source to the merger.
Definition dmx_merger.c:260
sACN Receiver API definitions
Definition dmx_merger.h:79
uint8_t * levels
Definition dmx_merger.h:86
uint8_t * per_address_priorities
Definition dmx_merger.h:95
int source_count_max
Definition dmx_merger.h:117
bool * per_address_priorities_active
Definition dmx_merger.h:100
uint8_t * universe_priority
Definition dmx_merger.h:104
sacn_dmx_merger_source_t * owners
Definition dmx_merger.h:112
Definition dmx_merger.h:148
size_t valid_level_count
Definition dmx_merger.h:156
sacn_dmx_merger_source_t id
Definition dmx_merger.h:150
bool using_universe_priority
Definition dmx_merger.h:168
uint8_t levels[DMX_ADDRESS_COUNT]
Definition dmx_merger.h:153
uint8_t address_priority[DMX_ADDRESS_COUNT]
Definition dmx_merger.h:165
uint8_t universe_priority
Definition dmx_merger.h:159