sACN  2.0.2
Implementation of ANSI E1.31 (Streaming ACN)
View other versions:
Loading...
Searching...
No Matches
source.h File Reference

sACN Source API definitions More...

Go to the source code of this file.

Data Structures

struct  SacnSourceConfig
 
struct  SacnSourceUniverseConfig
 
struct  SacnSourceUniverseNetintList
 

Macros

#define SACN_SOURCE_INVALID   -1
 
#define SACN_SOURCE_INFINITE_UNIVERSES   0
 Constant for "infinite" when sending sACN universes.
 
#define SACN_SOURCE_KEEP_ALIVE_INTERVAL_DEFAULT   800
 
#define SACN_SOURCE_CONFIG_DEFAULT_INIT
 
#define SACN_SOURCE_UNIVERSE_CONFIG_DEFAULT_INIT
 

Typedefs

typedef int sacn_source_t
 
typedef struct SacnSourceConfig SacnSourceConfig
 
typedef struct SacnSourceUniverseConfig SacnSourceUniverseConfig
 
typedef struct SacnSourceUniverseNetintList SacnSourceUniverseNetintList
 

Functions

void sacn_source_config_init (SacnSourceConfig *config)
 Initialize an sACN Source Config struct to default values.
 
void sacn_source_universe_config_init (SacnSourceUniverseConfig *config)
 Initialize an sACN Source Universe Config struct to default values.
 
etcpal_error_t sacn_source_create (const SacnSourceConfig *config, sacn_source_t *handle)
 Create a new sACN source to send sACN data.
 
void sacn_source_destroy (sacn_source_t handle)
 Destroy an sACN source instance.
 
etcpal_error_t sacn_source_change_name (sacn_source_t handle, const char *new_name)
 Change the name of an sACN source.
 
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.
 
void sacn_source_remove_universe (sacn_source_t handle, uint16_t universe)
 Remove a universe from a source.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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 threaded or manual update.
 
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.
 
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.
 
int sacn_source_process_manual (void)
 Trigger the transmission of sACN packets for all universes of sources that were created with manually_process_source set to true.
 
etcpal_error_t sacn_source_reset_networking (const SacnNetintConfig *sys_netint_config)
 Resets the underlying network sockets for all universes of all sources.
 
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 source.
 
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.
 

Detailed Description

sACN Source API definitions

Functions and definitions for the sACN Source API are contained in this header.