sACN  2.0.2
Implementation of ANSI E1.31 (Streaming ACN)
View other versions:
Common Definitions

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

Functions

etcpal::Error Init (const EtcPalLogParams *log_params=nullptr)
 Initialize the sACN library. More...
 
etcpal::Error Init (const EtcPalLogParams *log_params, std::vector< SacnMcastInterface > &sys_netints)
 Initialize the sACN library. More...
 
etcpal::Error Init (std::vector< SacnMcastInterface > &sys_netints)
 Initialize the sACN library. More...
 
etcpal::Error Init (const etcpal::Logger &logger)
 Initialize the sACN library. More...
 
etcpal::Error Init (const etcpal::Logger &logger, std::vector< SacnMcastInterface > &sys_netints)
 Initialize the sACN library. More...
 
void Deinit ()
 Deinitialize the sACN library. More...
 
RemoteSourceHandle GetRemoteSourceHandle (const etcpal::Uuid &source_cid)
 Converts a remote source CID to the corresponding handle, or SACN_REMOTE_SOURCE_INVALID if not found. More...
 
etcpal::Expected< etcpal::UuidGetRemoteSourceCid (RemoteSourceHandle source_handle)
 Converts a remote source handle to the corresponding source CID. More...
 

Detailed Description

Definitions shared by other APIs in this module.

Function Documentation

◆ Deinit()

void sacn::Deinit ( )
inline

Deinitialize the sACN library.

Closes all connections, deallocates all resources and joins the background thread. No sACN API functions are usable after this function is called.

This function is not thread safe with respect to other sACN API functions. Make sure to join your threads that use the APIs before calling this.

◆ 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 SACN_REMOTE_SOURCE_INVALID 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 SACN_REMOTE_SOURCE_INVALID if not found.

◆ Init() [1/5]

etcpal::Error sacn::Init ( const etcpal::Logger logger)
inline

Initialize the sACN library.

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

This is an overload of Init that allows all system network interfaces to be used by the library.

Parameters
loggerLogger instance for the sACN library to use to log messages.
Returns
etcpal::Error::Ok(): Initialization successful.
Errors from sacn_init().

◆ Init() [2/5]

etcpal::Error sacn::Init ( const etcpal::Logger logger,
std::vector< SacnMcastInterface > &  sys_netints 
)
inline

Initialize the sACN library.

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

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.
Returns
etcpal::Error::Ok(): Initialization successful.
Errors from sacn_init().

◆ Init() [3/5]

etcpal::Error sacn::Init ( const EtcPalLogParams log_params,
std::vector< SacnMcastInterface > &  sys_netints 
)
inline

Initialize the sACN library.

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

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.
Returns
etcpal::Error::Ok(): Initialization successful.
Errors from sacn_init().

◆ Init() [4/5]

etcpal::Error sacn::Init ( const EtcPalLogParams log_params = nullptr)
inline

Initialize the sACN library.

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

This is an overload of Init that allows all system network interfaces to be used by the library.

Parameters
log_params(optional) Log parameters for the sACN library to use to log messages. If not provided, no logging will be performed.
Returns
etcpal::Error::Ok(): Initialization successful.
Errors from sacn_init().

◆ Init() [5/5]

etcpal::Error sacn::Init ( std::vector< SacnMcastInterface > &  sys_netints)
inline

Initialize the sACN library.

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

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

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.
Returns
etcpal::Error::Ok(): Initialization successful.
Errors from sacn_init().