sACN  HEAD (unstable)
Implementation of ANSI E1.31 (Streaming ACN)
View other versions:
Loading...
Searching...
No Matches
Common Definitions

Definitions shared by other APIs in this module. More...

Classes

class  sacn::NotifyHandler
 A base class for a class that receives common notification callbacks from sACN. More...
 
struct  sacn::LibrarySettings
 Settings for the sACN library beyond the sacn::Init overrides. More...
 

Functions

etcpal::Error sacn::Init (sacn_features_t features=SACN_FEATURES_ALL, const LibrarySettings &settings={})
 Initialize the sACN library.
 
etcpal::Error sacn::Init (const EtcPalLogParams *log_params, sacn_features_t features=SACN_FEATURES_ALL, const LibrarySettings &settings={})
 Initialize the sACN library.
 
etcpal::Error sacn::Init (const EtcPalLogParams *log_params, McastMode mcast_mode, sacn_features_t features=SACN_FEATURES_ALL, const LibrarySettings &settings={})
 Initialize the sACN library.
 
etcpal::Error sacn::Init (const EtcPalLogParams *log_params, std::vector< SacnMcastInterface > &sys_netints, sacn_features_t features=SACN_FEATURES_ALL, const LibrarySettings &settings={})
 Initialize the sACN library.
 
etcpal::Error sacn::Init (std::vector< SacnMcastInterface > &sys_netints, sacn_features_t features=SACN_FEATURES_ALL, const LibrarySettings &settings={})
 Initialize the sACN library.
 
etcpal::Error sacn::Init (const etcpal::Logger &logger, McastMode mcast_mode=McastMode::kEnabledOnAllInterfaces, sacn_features_t features=SACN_FEATURES_ALL, const LibrarySettings &settings={})
 Initialize the sACN library.
 
etcpal::Error sacn::Init (const etcpal::Logger &logger, sacn_features_t features, const LibrarySettings &settings={})
 Initialize the sACN library.
 
etcpal::Error sacn::Init (const etcpal::Logger &logger, std::vector< SacnMcastInterface > &sys_netints, sacn_features_t features=SACN_FEATURES_ALL, const LibrarySettings &settings={})
 Initialize the sACN library.
 
RemoteSourceHandle sacn::GetRemoteSourceHandle (const etcpal::Uuid &source_cid)
 Converts a remote source CID to the corresponding handle, or kSacnRemoteSourceInvalid if not found.
 
etcpal::Expected< etcpal::Uuid > sacn::GetRemoteSourceCid (RemoteSourceHandle source_handle)
 Converts a remote source handle to the corresponding source CID.
 

Detailed Description

Definitions shared by other APIs in this module.

Function Documentation

◆ GetRemoteSourceCid()

etcpal::Expected< etcpal::Uuid > sacn::GetRemoteSourceCid ( RemoteSourceHandle source_handle)
inline

Converts a remote source handle to the corresponding source CID.

Parameters
[in]source_handleThe handle of the remote source.
Returns
The UUID of the source CID if there was no error.
kEtcPalErrInvalid: Invalid parameter provided.
kEtcPalErrNotFound: The source handle does not match a source that was found by a receiver, merge receiver, or source detector.
kEtcPalErrSys: An internal library or system call error occurred.

◆ GetRemoteSourceHandle()

RemoteSourceHandle sacn::GetRemoteSourceHandle ( const etcpal::Uuid & source_cid)
inline

Converts a remote source CID to the corresponding handle, or kSacnRemoteSourceInvalid if not found.

This is a simple conversion from a remote source CID to it's corresponding remote source handle. A handle will be returned only if it is a source that has been discovered by a receiver, merge receiver, or source detector.

Parameters
[in]source_cidThe UUID of the remote source CID.
Returns
The remote source handle, or kSacnRemoteSourceInvalid if not found.

◆ Init() [1/8]

etcpal::Error sacn::Init ( const etcpal::Logger & logger,
McastMode mcast_mode = McastMode::kEnabledOnAllInterfaces,
sacn_features_t features = SACN_FEATURES_ALL,
const LibrarySettings & settings = {} )
inline

Initialize the sACN library.

Wraps sacn_init_features(). Does all initialization required before the sACN API modules can be used.

This is an overload of Init that defaults to using all system interfaces for multicast traffic, but can also be used to disable multicast traffic on all interfaces.

Redundant initialization of features is permitted - the library tracks counters for each feature and expects deinit to be called the same number of times as init for each feature.

Parameters
loggerLogger instance for the sACN library to use to log messages.
mcast_modeThis controls whether or not multicast traffic is allowed on the system's network interfaces.
featuresMask of sACN features to initialize (defaults to all features).
settingsOptional library settings.
Returns
etcpal::Error::Ok(): Initialization successful.
Errors from sacn_init_features().

◆ Init() [2/8]

etcpal::Error sacn::Init ( const etcpal::Logger & logger,
sacn_features_t features,
const LibrarySettings & settings = {} )
inline

Initialize the sACN library.

Wraps sacn_init_features(). Does all initialization required before the sACN API modules can be used.

This is an overload of Init that only takes a logger & features (which default to all features). It assumes all network interfaces should be used - this is useful for initializing a feature for which the network is irrelevant (e.g. SACN_FEATURE_DMX_MERGER), since the rest can be initialized later when calling Init again for all features.

Redundant initialization of features is permitted - the library tracks counters for each feature and expects deinit to be called the same number of times as init for each feature.

Parameters
loggerLogger instance for the sACN library to use to log messages.
featuresMask of sACN features to initialize (defaults to all features).
settingsOptional library settings.
Returns
etcpal::Error::Ok(): Initialization successful.
Errors from sacn_init_features().

◆ Init() [3/8]

etcpal::Error sacn::Init ( const etcpal::Logger & logger,
std::vector< SacnMcastInterface > & sys_netints,
sacn_features_t features = SACN_FEATURES_ALL,
const LibrarySettings & settings = {} )
inline

Initialize the sACN library.

Wraps sacn_init_features(). Does all initialization required before the sACN API modules can be used.

Redundant initialization of features is permitted - the library tracks counters for each feature and expects deinit to be called the same number of times as init for each feature.

Parameters
loggerLogger instance for the sACN library to use to log messages.
sys_netintsIf !empty, this is the list of system interfaces the library will be limited to, and the status codes are filled in. If empty, the library is allowed to use all available system interfaces.
featuresMask of sACN features to initialize (defaults to all features).
settingsOptional library settings.
Returns
etcpal::Error::Ok(): Initialization successful.
Errors from sacn_init_features().

◆ Init() [4/8]

etcpal::Error sacn::Init ( const EtcPalLogParams * log_params,
McastMode mcast_mode,
sacn_features_t features = SACN_FEATURES_ALL,
const LibrarySettings & settings = {} )
inline

Initialize the sACN library.

Wraps sacn_init_features(). Does all initialization required before the sACN API modules can be used.

This is an overload of Init that defaults to using all system interfaces for multicast traffic, but can also be used to disable multicast traffic on all interfaces.

Redundant initialization of features is permitted - the library tracks counters for each feature and expects deinit to be called the same number of times as init for each feature.

Parameters
log_params(optional) Log parameters for the sACN library to use to log messages. If not provided, no logging will be performed.
mcast_modeThis controls whether or not multicast traffic is allowed on the system's network interfaces.
featuresMask of sACN features to initialize (defaults to all features).
settingsOptional library settings.
Returns
etcpal::Error::Ok(): Initialization successful.
Errors from sacn_init_features().

◆ Init() [5/8]

etcpal::Error sacn::Init ( const EtcPalLogParams * log_params,
sacn_features_t features = SACN_FEATURES_ALL,
const LibrarySettings & settings = {} )
inline

Initialize the sACN library.

Wraps sacn_init_features(). Does all initialization required before the sACN API modules can be used.

This is an overload of Init that only takes a logger & features (which default to all features). It assumes all network interfaces should be used - this is useful for initializing a feature for which the network is irrelevant (e.g. SACN_FEATURE_DMX_MERGER), since the rest can be initialized later when calling Init again for all features.

Redundant initialization of features is permitted - the library tracks counters for each feature and expects deinit to be called the same number of times as init for each feature.

Parameters
log_params(optional) Log parameters for the sACN library to use to log messages. If not provided, no logging will be performed.
featuresMask of sACN features to initialize (defaults to all features).
settingsOptional library settings.
Returns
etcpal::Error::Ok(): Initialization successful.
Errors from sacn_init_features().

◆ Init() [6/8]

etcpal::Error sacn::Init ( const EtcPalLogParams * log_params,
std::vector< SacnMcastInterface > & sys_netints,
sacn_features_t features = SACN_FEATURES_ALL,
const LibrarySettings & settings = {} )
inline

Initialize the sACN library.

Wraps sacn_init_features(). Does all initialization required before the sACN API modules can be used.

Redundant initialization of features is permitted - the library tracks counters for each feature and expects deinit to be called the same number of times as init for each feature.

Parameters
log_paramsLog parameters for the sACN library to use to log messages. If not provided, no logging will be performed.
sys_netintsIf !empty, this is the list of system interfaces the library will be limited to, and the status codes are filled in. If empty, the library is allowed to use all available system interfaces.
featuresMask of sACN features to initialize (defaults to all features).
settingsOptional library settings.
Returns
etcpal::Error::Ok(): Initialization successful.
Errors from sacn_init_features().

◆ Init() [7/8]

etcpal::Error sacn::Init ( sacn_features_t features = SACN_FEATURES_ALL,
const LibrarySettings & settings = {} )
inline

Initialize the sACN library.

Wraps sacn_init_features(). Does all initialization required before the sACN API modules can be used.

This is an overload of Init that only takes features (which default to all features). It doesn't specify a logger and assumes all network interfaces should be used - this is useful for initializing a feature for which neither of these are relevant (e.g. SACN_FEATURE_DMX_MERGER), since Init can be called again for the rest of the features later.

Redundant initialization of features is permitted - the library tracks counters for each feature and expects deinit to be called the same number of times as init for each feature.

Parameters
featuresMask of sACN features to initialize (defaults to all features).
settingsOptional library settings.
Returns
etcpal::Error::Ok(): Initialization successful.
Errors from sacn_init_features().

◆ Init() [8/8]

etcpal::Error sacn::Init ( std::vector< SacnMcastInterface > & sys_netints,
sacn_features_t features = SACN_FEATURES_ALL,
const LibrarySettings & settings = {} )
inline

Initialize the sACN library.

Wraps sacn_init_features(). Does all initialization required before the sACN API modules can be used.

This is an overload of Init that does not enable logging.

Redundant initialization of features is permitted - the library tracks counters for each feature and expects deinit to be called the same number of times as init for each feature.

Parameters
sys_netintsIf !empty, this is the list of system interfaces the library will be limited to, and the status codes are filled in. If empty, the library is allowed to use all available system interfaces.
featuresMask of sACN features to initialize (defaults to all features).
settingsOptional library settings.
Returns
etcpal::Error::Ok(): Initialization successful.
Errors from sacn_init_features().