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

sACN Receiver API definitions More...

#include <stdbool.h>
#include <stdint.h>
#include "etcpal/error.h"
#include "etcpal/inet.h"
#include "etcpal/log.h"
#include "etcpal/netint.h"
#include "etcpal/uuid.h"
#include "sacn/common.h"

Go to the source code of this file.

Classes

struct  SacnRecvUniverseSubrange
 Defines a range of addresses within a sACN universe. More...
 
struct  SacnRecvUniverseData
 A complete description of newly received universe data within the configured footprint. More...
 
struct  SacnRemoteSource
 Information about a remote sACN source being tracked by a receiver. More...
 
struct  SacnLostSource
 Information about a sACN source that was lost. More...
 
struct  SacnReceiverCallbacks
 A set of callback functions that the library uses to notify the application about sACN events. More...
 
struct  SacnReceiverConfig
 A set of configuration information for an sACN receiver. More...
 
struct  SacnReceiverNetintList
 A set of network interfaces for a particular receiver. More...
 

Macros

#define SACN_RECEIVER_CONFIG_DEFAULT_INIT
 A default-value initializer for an SacnReceiverConfig struct.
 

Typedefs

typedef int sacn_receiver_t
 A handle to an sACN receiver.
 
typedef struct SacnRecvUniverseSubrange SacnRecvUniverseSubrange
 Defines a range of addresses within a sACN universe.
 
typedef struct SacnRecvUniverseData SacnRecvUniverseData
 A complete description of newly received universe data within the configured footprint.
 
typedef struct SacnRemoteSource SacnRemoteSource
 Information about a remote sACN source being tracked by a receiver.
 
typedef struct SacnLostSource SacnLostSource
 Information about a sACN source that was lost.
 
typedef void(* SacnUniverseDataCallback) (sacn_receiver_t receiver_handle, const EtcPalSockAddr *source_addr, const SacnRemoteSource *source_info, const SacnRecvUniverseData *universe_data, void *context)
 Notify that new universe data within the configured footprint has been received.
 
typedef void(* SacnSourcesLostCallback) (sacn_receiver_t handle, uint16_t universe, const SacnLostSource *lost_sources, size_t num_lost_sources, void *context)
 Notify that one or more sources have entered a source loss state.
 
typedef void(* SacnSamplingPeriodStartedCallback) (sacn_receiver_t handle, uint16_t universe, void *context)
 Notify that a receiver's sampling period has begun.
 
typedef void(* SacnSamplingPeriodEndedCallback) (sacn_receiver_t handle, uint16_t universe, void *context)
 Notify that a receiver's sampling period has ended.
 
typedef void(* SacnSourcePapLostCallback) (sacn_receiver_t handle, uint16_t universe, const SacnRemoteSource *source, void *context)
 Notify that a source has stopped transmission of per-address priority packets.
 
typedef void(* SacnSourceLimitExceededCallback) (sacn_receiver_t handle, uint16_t universe, void *context)
 Notify that more than the configured maximum number of sources are currently sending on the universe being listened to.
 
typedef struct SacnReceiverCallbacks SacnReceiverCallbacks
 A set of callback functions that the library uses to notify the application about sACN events.
 
typedef struct SacnReceiverConfig SacnReceiverConfig
 A set of configuration information for an sACN receiver.
 
typedef struct SacnReceiverNetintList SacnReceiverNetintList
 A set of network interfaces for a particular receiver.
 

Enumerations

enum  {
  kSacnReceiverInfiniteSources = 0 ,
  kSacnDefaultExpiredWaitMs = 1000u
}
 
sACN receiver flags

Valid values for the flags member in the SacnReceiverConfig struct.

enum  { kSacnReceiverOptsFilterPreviewData = 0x1 }
 

Functions

void sacn_receiver_config_init (SacnReceiverConfig *config)
 Initialize an sACN Receiver Config struct to default values.
 
etcpal_error_t sacn_receiver_create (const SacnReceiverConfig *config, sacn_receiver_t *handle, const SacnNetintConfig *netint_config)
 Create a new sACN receiver to listen for sACN data on a universe.
 
etcpal_error_t sacn_receiver_destroy (sacn_receiver_t handle)
 Destroy a sACN receiver instance.
 
etcpal_error_t sacn_receiver_get_universe (sacn_receiver_t handle, uint16_t *universe_id)
 Get the universe on which a sACN receiver is currently listening.
 
etcpal_error_t sacn_receiver_get_footprint (sacn_receiver_t handle, SacnRecvUniverseSubrange *footprint)
 Get the footprint within the universe on which a sACN receiver is currently listening.
 
etcpal_error_t sacn_receiver_change_universe (sacn_receiver_t handle, uint16_t new_universe_id)
 Change the universe on which an sACN receiver is listening.
 
etcpal_error_t sacn_receiver_change_footprint (sacn_receiver_t handle, const SacnRecvUniverseSubrange *new_footprint)
 Change the footprint within the universe on which an sACN receiver is listening.
 
etcpal_error_t sacn_receiver_change_universe_and_footprint (sacn_receiver_t handle, uint16_t new_universe_id, const SacnRecvUniverseSubrange *new_footprint)
 Change the universe and footprint on which an sACN receiver is listening.
 
etcpal_error_t sacn_receiver_reset_networking (const SacnNetintConfig *sys_netint_config)
 Resets underlying network sockets and packet receipt state, determines network interfaces for all receivers.
 
etcpal_error_t sacn_receiver_reset_networking_per_receiver (const SacnNetintConfig *sys_netint_config, const SacnReceiverNetintList *per_receiver_netint_lists, size_t num_per_receiver_netint_lists)
 Resets underlying network sockets and packet receipt state, determines network interfaces for each receiver.
 
size_t sacn_receiver_get_network_interfaces (sacn_receiver_t handle, EtcPalMcastNetintId *netints, size_t netints_size)
 Obtain a list of a receiver's network interfaces.
 
void sacn_receiver_set_expired_wait (uint32_t wait_ms)
 Set the expired notification wait time.
 
uint32_t sacn_receiver_get_expired_wait ()
 Get the current value of the expired notification wait time.
 

Variables

static const sacn_receiver_t kSacnReceiverInvalid = -1
 An invalid sACN receiver handle value.
 

Detailed Description

sACN Receiver API definitions

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