34#include "etcpal/error.h"
35#include "etcpal/inet.h"
36#include "etcpal/uuid.h"
58#define SACN_SOURCE_INVALID -1
66#define SACN_SOURCE_INFINITE_UNIVERSES 0
69#define SACN_SOURCE_KEEP_ALIVE_INTERVAL_DEFAULT 800
102#define SACN_SOURCE_CONFIG_DEFAULT_INIT \
104 kEtcPalNullUuid, NULL, SACN_SOURCE_INFINITE_UNIVERSES, false, kSacnIpV4AndIpV6, \
105 SACN_SOURCE_KEEP_ALIVE_INTERVAL_DEFAULT \
144#define SACN_SOURCE_UNIVERSE_CONFIG_DEFAULT_INIT \
146 0, 100, false, false, NULL, 0, 0 \
179 size_t destinations_size);
184 uint16_t new_sync_universe);
191 size_t new_levels_size);
193 size_t new_levels_size,
const uint8_t* new_priorities,
194 size_t new_priorities_size);
196 size_t new_levels_size);
198 const uint8_t* new_levels,
size_t new_levels_size,
199 const uint8_t* new_priorities,
size_t new_priorities_size);
206 size_t num_per_universe_netint_lists);
209 size_t netints_size);
Common definitions for sACN.
sacn_ip_support_t
Definition common.h:71
int sacn_source_process_manual(void)
Trigger the transmission of sACN packets for all universes of sources that were created with manually...
Definition source.c:990
etcpal_error_t sacn_source_change_name(sacn_source_t handle, const char *new_name)
Change the name of an sACN source.
Definition source.c:168
etcpal_error_t sacn_source_send_synchronization(sacn_source_t handle, uint16_t universe)
Indicate that a new synchronization packet should be sent on the given synchronization universe.
Definition source.c:780
etcpal_error_t sacn_source_change_priority(sacn_source_t handle, uint16_t universe, uint8_t new_priority)
Change the priority of a universe on a sACN source.
Definition source.c:554
struct SacnSourceUniverseNetintList SacnSourceUniverseNetintList
size_t sacn_source_get_unicast_destinations(sacn_source_t handle, uint16_t universe, EtcPalIpAddr *destinations, size_t destinations_size)
Obtain a list of a universe's unicast destinations.
Definition source.c:516
etcpal_error_t sacn_source_add_universe(sacn_source_t handle, const SacnSourceUniverseConfig *config, const SacnNetintConfig *netint_config)
Add a universe to an sACN source.
Definition source.c:261
void sacn_source_update_levels(sacn_source_t handle, uint16_t universe, const uint8_t *new_levels, size_t new_levels_size)
Copies the universe's DMX levels into the packet to be sent on the next threaded or manual update.
Definition source.c:804
etcpal_error_t sacn_source_add_unicast_destination(sacn_source_t handle, uint16_t universe, const EtcPalIpAddr *dest)
Add a unicast destination for a source's universe.
Definition source.c:406
etcpal_error_t sacn_source_reset_networking(const SacnNetintConfig *sys_netint_config)
Resets the underlying network sockets for all universes of all sources.
Definition source.c:1020
etcpal_error_t sacn_source_create(const SacnSourceConfig *config, sacn_source_t *handle)
Create a new sACN source to send sACN data.
Definition source.c:103
struct SacnSourceUniverseConfig SacnSourceUniverseConfig
void sacn_source_config_init(SacnSourceConfig *config)
Initialize an sACN Source Config struct to default values.
Definition source.c:53
void sacn_source_remove_unicast_destination(sacn_source_t handle, uint16_t universe, const EtcPalIpAddr *dest)
Remove a unicast destination on a source's universe.
Definition source.c:481
void sacn_source_update_levels_and_force_sync(sacn_source_t handle, uint16_t universe, const uint8_t *new_levels, size_t new_levels_size)
Like sacn_source_update_levels(), but also sets the force_sync flag on the packet.
Definition source.c:895
void sacn_source_update_levels_and_pap(sacn_source_t handle, uint16_t universe, const uint8_t *new_levels, size_t new_levels_size, const uint8_t *new_priorities, size_t new_priorities_size)
Copies the universe's DMX levels and per-address priorities into packets that are sent on the next th...
Definition source.c:852
etcpal_error_t sacn_source_send_now(sacn_source_t handle, uint16_t universe, uint8_t start_code, const uint8_t *buffer, size_t buflen)
Immediately sends the provided sACN start code & data.
Definition source.c:707
void sacn_source_universe_config_init(SacnSourceUniverseConfig *config)
Initialize an sACN Source Universe Config struct to default values.
Definition source.c:71
void sacn_source_remove_universe(sacn_source_t handle, uint16_t universe)
Remove a universe from a source.
Definition source.c:349
size_t sacn_source_get_universes(sacn_source_t handle, uint16_t *universes, size_t universes_size)
Obtain a list of a source's universes.
Definition source.c:373
etcpal_error_t sacn_source_change_preview_flag(sacn_source_t handle, uint16_t universe, bool new_preview_flag)
Change the send_preview option on a universe of a sACN source.
Definition source.c:615
void sacn_source_update_levels_and_pap_and_force_sync(sacn_source_t handle, uint16_t universe, const uint8_t *new_levels, size_t new_levels_size, const uint8_t *new_priorities, size_t new_priorities_size)
Like sacn_source_update_levels_and_pap(), but also sets the force_sync flag on the packet.
Definition source.c:948
etcpal_error_t sacn_source_change_synchronization_universe(sacn_source_t handle, uint16_t universe, uint16_t new_sync_universe)
Changes the synchronization universe for a universe of a sACN source.
Definition source.c:677
etcpal_error_t sacn_source_reset_networking_per_universe(const SacnNetintConfig *sys_netint_config, const SacnSourceUniverseNetintList *per_universe_netint_lists, size_t num_per_universe_netint_lists)
Resets the underlying network sockets and determines network interfaces for each universe of each sou...
Definition source.c:1084
int sacn_source_t
Definition source.h:56
size_t sacn_source_get_network_interfaces(sacn_source_t handle, uint16_t universe, EtcPalMcastNetintId *netints, size_t netints_size)
Obtain a list of a universe's network interfaces.
Definition source.c:1176
void sacn_source_destroy(sacn_source_t handle)
Destroy an sACN source instance.
Definition source.c:218
struct SacnSourceConfig SacnSourceConfig
bool manually_process_source
Definition source.h:91
EtcPalUuid cid
Definition source.h:77
const char * name
Definition source.h:79
int keep_alive_interval
Definition source.h:98
sacn_ip_support_t ip_supported
Definition source.h:94
size_t universe_count_max
Definition source.h:86
uint8_t priority
Definition source.h:123
uint16_t universe
Definition source.h:117
const EtcPalIpAddr * unicast_destinations
Definition source.h:133
bool send_preview
Definition source.h:126
uint16_t sync_universe
Definition source.h:139
size_t num_unicast_destinations
Definition source.h:135
bool send_unicast_only
Definition source.h:129
uint16_t universe
Definition source.h:157
size_t num_netints
Definition source.h:163
SacnMcastInterface * netints
Definition source.h:161
sacn_source_t handle
Definition source.h:155