20#ifndef SACN_CPP_DMX_MERGER_H_
21#define SACN_CPP_DMX_MERGER_H_
168 return (levels !=
nullptr);
286 size_t new_levels_count)
373 settings.per_address_priorities,
374 settings.per_address_priorities_active,
375 settings.universe_priority,
377 settings.source_count_max
ETCPAL_CONSTEXPR_14 void Clear()
ETCPAL_CONSTEXPR_14 void SetValue(const ValueType &new_value)
constexpr ValueType value() const
An instance of sACN DMX Merger functionality; see Using the sACN DMX Merger API.
Definition dmx_merger.h:67
DmxMerger(DmxMerger &&other)=default
etcpal::Error UpdateLevels(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.h:285
const SacnDmxMergerSource * GetSourceInfo(sacn_dmx_merger_source_t source) const
Gets a read-only view of the source data.
Definition dmx_merger.h:263
etcpal::Error UpdatePap(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.h:309
constexpr Handle handle() const
Get the current handle to the underlying C DMX merger.
Definition dmx_merger.h:363
etcpal::Error RemoveSource(sacn_dmx_merger_source_t source)
Removes a source from the merger.
Definition dmx_merger.h:248
etcpal::Error Startup(const Settings &settings)
Create a new merger instance.
Definition dmx_merger.h:184
DmxMerger & operator=(DmxMerger &&other)=default
etcpal::Expected< sacn_dmx_merger_source_t > AddSource()
Adds a new source to the merger.
Definition dmx_merger.h:227
void Shutdown()
Destroy a merger instance.
Definition dmx_merger.h:206
etcpal::Error UpdateUniversePriority(sacn_dmx_merger_source_t source, uint8_t universe_priority)
Updates a source's universe priority and recalculates outputs.
Definition dmx_merger.h:335
etcpal::Error RemovePap(sacn_dmx_merger_source_t source)
Removes the per-address priority (PAP) data from the source and recalculate outputs.
Definition dmx_merger.h:353
Definition dmx_merger.h:45
C++ wrapper for the sACN init/deinit functions.
sACN DMX Merger API definitions
#define SACN_DMX_MERGER_SOURCE_INVALID
Definition dmx_merger.h:75
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
#define SACN_DMX_MERGER_INVALID
Definition dmx_merger.h:68
etcpal_error_t sacn_dmx_merger_destroy(sacn_dmx_merger_t handle)
Destroy a merger instance.
Definition dmx_merger.c:212
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
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
#define SACN_RECEIVER_INFINITE_SOURCES
Constant for "infinite" when listening or merging sACN universes.
Definition receiver.h:68
A namespace which contains all C++ language definitions in the sACN library.
Definition common.h:50
Definition dmx_merger.h:79
uint8_t * levels
Definition dmx_merger.h:86
Definition dmx_merger.h:148
A set of configuration settings that a merger needs to initialize.
Definition dmx_merger.h:77
uint8_t * levels
Definition dmx_merger.h:84
uint8_t * per_address_priorities
Definition dmx_merger.h:93
int source_count_max
Definition dmx_merger.h:113
bool * per_address_priorities_active
Definition dmx_merger.h:98
bool IsValid() const
Definition dmx_merger.h:166
uint8_t * universe_priority
Definition dmx_merger.h:103
sacn_dmx_merger_source_t * owners
Definition dmx_merger.h:111