sACN
2.0.2
Implementation of ANSI E1.31 (Streaming ACN)
|
View other versions:
|
An instance of sACN Source Detector functionality. More...
#include <source_detector.h>
Data Structures | |
class | NotifyHandler |
A base class for a class that receives notification callbacks from a sACN Source Detector. More... | |
struct | Settings |
A set of configuration settings that a source detector needs to initialize. More... | |
Static Public Member Functions | |
static etcpal::Error | Startup (NotifyHandler ¬ify_handler) |
Start the sACN Source Detector with default settings. | |
static etcpal::Error | Startup (NotifyHandler ¬ify_handler, std::vector< SacnMcastInterface > &netints) |
Start the sACN Source Detector with default settings. | |
static etcpal::Error | Startup (const Settings &settings, NotifyHandler ¬ify_handler) |
Start the sACN Source Detector. | |
static etcpal::Error | Startup (const Settings &settings, NotifyHandler ¬ify_handler, std::vector< SacnMcastInterface > &netints) |
Start the sACN Source Detector. | |
static void | Shutdown () |
Destroy the sACN Source Detector. | |
static etcpal::Error | ResetNetworking () |
Resets the underlying network sockets and packet receipt state for the sACN Source Detector. | |
static etcpal::Error | ResetNetworking (std::vector< SacnMcastInterface > &netints) |
Resets the underlying network sockets and packet receipt state for the sACN Source Detector. | |
static std::vector< EtcPalMcastNetintId > | GetNetworkInterfaces () |
Obtain the source detector's network interfaces. | |
An instance of sACN Source Detector functionality.
sACN sources often periodically send Universe Discovery packets to announce what universes they are sourcing. Use this API to monitor such traffic for your own needs.
There can only ever be one instance of the source detector (thus the static interface), but that instance still needs to be created and can be destroyed.
Usage:
Callback demonstrations:
|
inlinestatic |
Obtain the source detector's network interfaces.
|
inlinestatic |
Resets the underlying network sockets and packet receipt state for the sACN Source Detector.
This is an override of ResetNetworking that uses all network interfaces.
This is typically used when the application detects that the list of networking interfaces has changed. The source detector API will no longer be limited to specific interfaces (the list passed into sacn::Init(), if any, is overridden for the source detector API, but not the other APIs). The source detector is set to all system interfaces.
After this call completes successfully, the detector will continue as if nothing had changed. New sources could be discovered, or old sources could expire. If this call fails, the caller must call Shutdown(), because the source detector may be in an invalid state.
Note that the networking reset is considered successful if it is able to successfully use any of the network interfaces. This will only return kEtcPalErrNoNetints if none of the interfaces work.
|
inlinestatic |
Resets the underlying network sockets and packet receipt state for the sACN Source Detector.
This is typically used when the application detects that the list of networking interfaces has changed. This changes the list of system interfaces the source detector API will be limited to (the list passed into sacn::Init(), if any, is overridden for the source detector API, but not the other APIs). The source detector is then set to those interfaces.
After this call completes successfully, the detector will continue as if nothing had changed. New sources could be discovered, or old sources could expire. If this call fails, the caller must call Shutdown(), because the source detector may be in an invalid state.
Note that the networking reset is considered successful if it is able to successfully use any of the network interfaces passed in. This will only return kEtcPalErrNoNetints if none of the interfaces work.
sys_netints | If !empty, this is the list of system interfaces the source detector API will be limited to, and the status codes are filled in. If empty, the source detector API is allowed to use all available system interfaces. |
|
inlinestatic |
Destroy the sACN Source Detector.
|
inlinestatic |
Start the sACN Source Detector.
This is an override of Startup that uses all network interfaces.
Note that the detector is considered as successfully created if it is able to successfully use any of the network interfaces. This will only return kEtcPalErrNoNetints if none of the interfaces work.
[in] | settings | Configuration parameters for the sACN Source Detector to be created. |
[in] | notify_handler | The callback handler for the sACN Source Detector to be created. |
|
inlinestatic |
Start the sACN Source Detector.
Note that the detector is considered as successfully created if it is able to successfully use any of the network interfaces passed in. This will only return kEtcPalErrNoNetints if none of the interfaces work.
[in] | settings | Configuration parameters for the sACN Source Detector to be created. |
[in] | notify_handler | The callback handler for the sACN Source Detector to be created. |
[in,out] | netints | Optional. If !empty, this is the list of interfaces the application wants to use, and the status codes are filled in. If empty, all available interfaces are tried and this vector isn't modified. |
|
inlinestatic |
Start the sACN Source Detector with default settings.
This is an override of Startup that has default settings for the configuration and will use all network interfaces.
Note that the detector is considered as successfully created if it is able to successfully use any of the network interfaces. This will only return kEtcPalErrNoNetints if none of the interfaces work.
[in] | notify_handler | The callback handler for the sACN Source Detector to be created. |
|
inlinestatic |
Start the sACN Source Detector with default settings.
This is an override of Startup that doesn't require a Settings parameter, since the fields in that structure are completely optional.
Note that the detector is considered as successfully created if it is able to successfully use any of the network interfaces passed in. This will only return kEtcPalErrNoNetints if none of the interfaces work.
[in] | notify_handler | The callback handler for the sACN Source Detector to be created. |
[in,out] | netints | Optional. If !empty, this is the list of interfaces the application wants to use, and the status codes are filled in. If empty, all available interfaces are tried and this vector isn't modified. |