sACN  3.0.0
Implementation of ANSI E1.31 (Streaming ACN)
View other versions:
Loading...
Searching...
No Matches
source.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright 2024 ETC Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 ******************************************************************************
16 * This file is a part of sACN. For more information, go to:
17 * https://github.com/ETCLabs/sACN
18 *****************************************************************************/
19
20#ifndef SACN_CPP_SOURCE_H_
21#define SACN_CPP_SOURCE_H_
22
28#include "sacn/cpp/common.h"
29
30#include <cstring>
31#include "sacn/source.h"
32#include "etcpal/cpp/uuid.h"
33#include "etcpal/cpp/inet.h"
35
42namespace sacn
43{
44
45namespace detail
46{
48{
49};
50}; // namespace detail
51
60class Source
61{
62public:
65
76
81 struct Settings
82 {
83 /********* Required values **********/
84
89
90 /********* Optional values **********/
91
94
99
102
106
110
112 Settings() = default;
113 Settings(const etcpal::Uuid& new_cid, const std::string& new_name);
114
115 bool IsValid() const;
116 };
117
123 {
124 /********* Required values **********/
125
128 uint16_t universe{0};
129
130 /********* Optional values **********/
131
134 uint8_t priority{100};
135
137 bool send_preview{false};
138
140 bool send_unicast_only{false};
141
145
148 uint16_t sync_universe{0};
149
151 UniverseSettings() = default;
152 UniverseSettings(uint16_t universe_id);
153
154 bool IsValid() const;
155 };
156
162 {
166 uint16_t universe{0};
167
171
173 bool no_netints{false};
174
177 UniverseNetintList(sacn_source_t source_handle, uint16_t universe_id, McastMode mcast_mode);
178 UniverseNetintList(sacn_source_t source_handle, uint16_t universe_id,
179 const std::vector<SacnMcastInterface>& network_interfaces);
180 };
181
182 Source() = default;
183 Source(const Source& other) = delete;
184 Source& operator=(const Source& other) = delete;
185 Source(Source&& other) = default;
186 Source& operator=(Source&& other) = default;
188 etcpal::Error Startup(const Settings& settings);
189 void Shutdown();
190
191 etcpal::Error ChangeName(const std::string& new_name);
192
193 etcpal::Error AddUniverse(const UniverseSettings& settings, McastMode mcast_mode);
195 void RemoveUniverse(uint16_t universe);
197
198 etcpal::Error AddUnicastDestination(uint16_t universe, const etcpal::IpAddr& dest);
199 void RemoveUnicastDestination(uint16_t universe, const etcpal::IpAddr& dest);
201
202 etcpal::Error ChangePriority(uint16_t universe, uint8_t new_priority);
203 etcpal::Error ChangePreviewFlag(uint16_t universe, bool new_preview_flag);
204 etcpal::Error ChangeSynchronizationUniverse(uint16_t universe, uint16_t new_sync_universe);
205
206 etcpal::Error SendNow(uint16_t universe, uint8_t start_code, const uint8_t* buffer, size_t buflen);
207 etcpal::Error SendSynchronization(uint16_t universe);
208
209 void UpdateLevels(uint16_t universe, const uint8_t* new_levels, size_t new_levels_size);
210 void UpdateLevelsAndPap(uint16_t universe, const uint8_t* new_levels, size_t new_levels_size,
211 const uint8_t* new_priorities, size_t new_priorities_size);
212 void UpdateLevelsAndForceSync(uint16_t universe, const uint8_t* new_levels, size_t new_levels_size);
213 void UpdateLevelsAndPapAndForceSync(uint16_t universe, const uint8_t* new_levels, size_t new_levels_size,
214 const uint8_t* new_priorities, size_t new_priorities_size);
215
217
218 constexpr Handle handle() const;
219
220 static int ProcessManual(TickMode tick_mode);
221
222 static etcpal::Error ResetNetworking(McastMode mcast_mode);
225 std::vector<UniverseNetintList>& netint_lists);
226
227private:
228 class TranslatedUniverseConfig
229 {
230 public:
231 explicit TranslatedUniverseConfig(const UniverseSettings& settings);
232 const SacnSourceUniverseConfig& get() noexcept;
233
234 private:
235 std::vector<EtcPalIpAddr> unicast_destinations_;
237 };
238
239 SacnSourceConfig TranslateConfig(const Settings& settings);
240
241 Handle handle_;
242};
243
249inline Source::Settings::Settings(const etcpal::Uuid& new_cid, const std::string& new_name)
250 : cid(new_cid), name(new_name)
251{
252}
253
257inline bool Source::Settings::IsValid() const
258{
259 return !cid.IsNull();
260}
261
267inline Source::UniverseSettings::UniverseSettings(uint16_t universe_id) : universe(universe_id)
268{
269}
270
275{
276 return ((universe != 0) && (universe < 64000));
277}
278
284inline Source::UniverseNetintList::UniverseNetintList(sacn_source_t source_handle, uint16_t universe_id,
285 McastMode mcast_mode = McastMode::kEnabledOnAllInterfaces)
286 : handle(source_handle), universe(universe_id), no_netints(mcast_mode == McastMode::kDisabledOnAllInterfaces)
287{
288}
289
296inline Source::UniverseNetintList::UniverseNetintList(sacn_source_t source_handle, uint16_t universe_id,
297 const std::vector<SacnMcastInterface>& network_interfaces)
298 : handle(source_handle), universe(universe_id), netints(network_interfaces)
299{
300}
301
319{
320 SacnSourceConfig config = TranslateConfig(settings);
322 etcpal::Error result = sacn_source_create(&config, &c_handle);
323 handle_.SetValue(c_handle);
324 return result;
325}
326
334inline void Source::Shutdown()
335{
336 sacn_source_destroy(handle_.value());
337 handle_.Clear();
338}
339
359{
360 return sacn_source_change_name(handle_.value(), new_name.c_str());
361}
362
389 McastMode mcast_mode = McastMode::kEnabledOnAllInterfaces)
390{
391 TranslatedUniverseConfig config(settings);
392
393 SacnNetintConfig netint_config = SACN_NETINT_CONFIG_DEFAULT_INIT;
394 if (mcast_mode == McastMode::kDisabledOnAllInterfaces)
395 netint_config.no_netints = true;
396
397 return sacn_source_add_universe(handle_.value(), &config.get(), &netint_config);
398}
399
426{
427 TranslatedUniverseConfig config(settings);
428
429 if (netints.empty())
430 return sacn_source_add_universe(handle_.value(), &config.get(), nullptr);
431
432 SacnNetintConfig netint_config = SACN_NETINT_CONFIG_DEFAULT_INIT;
433 netint_config.netints = netints.data();
434 netint_config.num_netints = netints.size();
435
436 return sacn_source_add_universe(handle_.value(), &config.get(), &netint_config);
437}
438
450inline void Source::RemoveUniverse(uint16_t universe)
451{
452 sacn_source_remove_universe(handle_.value(), universe);
453}
454
461{
462 // This uses a guessing algorithm with a while loop to avoid race conditions.
463 std::vector<uint16_t> universes;
464 size_t size_guess = 4u;
465 size_t num_universes = 0u;
466
467 do
468 {
469 universes.resize(size_guess);
470 num_universes = sacn_source_get_universes(handle_.value(), universes.data(), universes.size());
471 size_guess = num_universes + 4u;
472 } while (num_universes > universes.size());
473
474 universes.resize(num_universes);
475 return universes;
476}
477
493inline etcpal::Error Source::AddUnicastDestination(uint16_t universe, const etcpal::IpAddr& dest)
494{
495 return sacn_source_add_unicast_destination(handle_.value(), universe, &dest.get());
496}
497
507inline void Source::RemoveUnicastDestination(uint16_t universe, const etcpal::IpAddr& dest)
508{
509 sacn_source_remove_unicast_destination(handle_.value(), universe, &dest.get());
510}
511
519{
520 // This uses a guessing algorithm with a while loop to avoid race conditions.
521 std::vector<EtcPalIpAddr> destinations;
522 size_t size_guess = 4u;
523 size_t num_destinations = 0u;
524
525 do
526 {
527 destinations.resize(size_guess);
528 num_destinations =
529 sacn_source_get_unicast_destinations(handle_.value(), universe, destinations.data(), destinations.size());
530 size_guess = num_destinations + 4u;
531 } while (num_destinations > destinations.size());
532
533 destinations.resize(num_destinations);
534
535 // Convert vector<EtcPalIpAddr> to vector<etcpal::IpAddr>.
537 if (!destinations.empty())
538 {
539 result.reserve(destinations.size());
540 std::transform(destinations.begin(), destinations.end(), std::back_inserter(result),
541 [](const EtcPalIpAddr& dest) { return etcpal::IpAddr(dest); });
542 }
543
544 return result;
545}
546
562inline etcpal::Error Source::ChangePriority(uint16_t universe, uint8_t new_priority)
563{
564 return sacn_source_change_priority(handle_.value(), universe, new_priority);
565}
566
585inline etcpal::Error Source::ChangePreviewFlag(uint16_t universe, bool new_preview_flag)
586{
587 return sacn_source_change_preview_flag(handle_.value(), universe, new_preview_flag);
588}
589
609inline etcpal::Error Source::ChangeSynchronizationUniverse(uint16_t universe, uint16_t new_sync_universe)
610{
611 return sacn_source_change_synchronization_universe(handle_.value(), universe, new_sync_universe);
612}
613
633inline etcpal::Error Source::SendNow(uint16_t universe, uint8_t start_code, const uint8_t* buffer, size_t buflen)
634{
635 return sacn_source_send_now(handle_.value(), universe, start_code, buffer, buflen);
636}
637
653inline etcpal::Error Source::SendSynchronization(uint16_t sync_universe)
654{
655 return sacn_source_send_synchronization(handle_.value(), sync_universe);
656}
657
671inline void Source::UpdateLevels(uint16_t universe, const uint8_t* new_levels, size_t new_levels_size)
672{
673 sacn_source_update_levels(handle_.value(), universe, new_levels, new_levels_size);
674}
675
698inline void Source::UpdateLevelsAndPap(uint16_t universe, const uint8_t* new_levels, size_t new_levels_size,
699 const uint8_t* new_priorities, size_t new_priorities_size)
700{
701 sacn_source_update_levels_and_pap(handle_.value(), universe, new_levels, new_levels_size, new_priorities,
702 new_priorities_size);
703}
704
721inline void Source::UpdateLevelsAndForceSync(uint16_t universe, const uint8_t* new_levels, size_t new_levels_size)
722{
723 sacn_source_update_levels_and_force_sync(handle_.value(), universe, new_levels, new_levels_size);
724}
725
752inline void Source::UpdateLevelsAndPapAndForceSync(uint16_t universe, const uint8_t* new_levels, size_t new_levels_size,
753 const uint8_t* new_priorities, size_t new_priorities_size)
754{
755 sacn_source_update_levels_and_pap_and_force_sync(handle_.value(), universe, new_levels, new_levels_size,
756 new_priorities, new_priorities_size);
757}
758
777{
778 return sacn_source_process_manual(static_cast<sacn_source_tick_mode_t>(tick_mode));
779}
780
806inline etcpal::Error Source::ResetNetworking(McastMode mcast_mode = McastMode::kEnabledOnAllInterfaces)
807{
808 SacnNetintConfig netint_config = SACN_NETINT_CONFIG_DEFAULT_INIT;
809 if (mcast_mode == McastMode::kDisabledOnAllInterfaces)
810 netint_config.no_netints = true;
811
812 return sacn_source_reset_networking(&netint_config);
813}
814
840{
841 if (sys_netints.empty())
842 return sacn_source_reset_networking(nullptr);
843
844 SacnNetintConfig netint_config = SACN_NETINT_CONFIG_DEFAULT_INIT;
845 netint_config.netints = sys_netints.data();
846 netint_config.num_netints = sys_netints.size();
847
848 return sacn_source_reset_networking(&netint_config);
849}
850
881 std::vector<UniverseNetintList>& per_universe_netint_lists)
882{
884 netint_lists_c.reserve(per_universe_netint_lists.size());
885 std::transform(per_universe_netint_lists.begin(), per_universe_netint_lists.end(), std::back_inserter(netint_lists_c),
886 [](UniverseNetintList& list) {
887 // clang-format off
888 SacnSourceUniverseNetintList c_list = {
889 list.handle,
890 list.universe,
891 list.netints.data(),
892 list.netints.size(),
893 list.no_netints
894 };
895 // clang-format on
896
897 return c_list;
898 });
899
900 SacnNetintConfig sys_netint_config = SACN_NETINT_CONFIG_DEFAULT_INIT;
901 sys_netint_config.netints = sys_netints.data();
902 sys_netint_config.num_netints = sys_netints.size();
903
904 return sacn_source_reset_networking_per_universe(&sys_netint_config, netint_lists_c.data(), netint_lists_c.size());
905}
906
914{
915 // This uses a guessing algorithm with a while loop to avoid race conditions.
917 size_t size_guess = 4u;
918 size_t num_netints = 0u;
919
920 do
921 {
922 netints.resize(size_guess);
923 num_netints = sacn_source_get_network_interfaces(handle_.value(), universe, netints.data(), netints.size());
924 size_guess = num_netints + 4u;
925 } while (num_netints > netints.size());
926
927 netints.resize(num_netints);
928 return netints;
929}
930
936inline constexpr Source::Handle Source::handle() const
937{
938 return handle_;
939}
940
941inline SacnSourceConfig Source::TranslateConfig(const Settings& settings)
942{
943 // clang-format off
944 SacnSourceConfig config = {
945 settings.cid.get(),
946 settings.name.c_str(),
947 settings.universe_count_max,
948 settings.manually_process_source,
949 settings.ip_supported,
950 settings.keep_alive_interval,
951 settings.pap_keep_alive_interval
952 };
953 // clang-format on
954
955 return config;
956}
957
958inline const SacnSourceUniverseConfig& Source::TranslatedUniverseConfig::get() noexcept
959{
960 if (!unicast_destinations_.empty())
961 {
962 config_.unicast_destinations = unicast_destinations_.data();
963 config_.num_unicast_destinations = unicast_destinations_.size();
964 }
965
966 return config_;
967}
968
969// clang-format off
970inline Source::TranslatedUniverseConfig::TranslatedUniverseConfig(const UniverseSettings& settings)
971 : config_{
972 settings.universe,
973 settings.priority,
974 settings.send_preview,
975 settings.send_unicast_only,
976 nullptr,
977 0,
978 settings.sync_universe
979 }
980{
981 // clang-format on
982
983 if (!settings.unicast_destinations.empty())
984 {
985 unicast_destinations_.reserve(settings.unicast_destinations.size());
986 std::transform(settings.unicast_destinations.begin(), settings.unicast_destinations.end(),
987 std::back_inserter(unicast_destinations_), [](const etcpal::IpAddr& dest) { return dest.get(); });
988 }
989}
990
991}; // namespace sacn
992
993#endif // SACN_CPP_SOURCE_H_
T back_inserter(T... args)
T begin(T... args)
T c_str(T... args)
constexpr const EtcPalIpAddr & get() const noexcept
ETCPAL_CONSTEXPR_14 void Clear()
ETCPAL_CONSTEXPR_14 void SetValue(const ValueType &new_value)
constexpr ValueType value() const
An instance of sACN Source functionality; see Using the sACN Source API.
Definition source.h:61
Source & operator=(Source &&other)=default
void RemoveUnicastDestination(uint16_t universe, const etcpal::IpAddr &dest)
Remove a unicast destination on a universe.
Definition source.h:507
etcpal::Error SendNow(uint16_t universe, uint8_t start_code, const uint8_t *buffer, size_t buflen)
Immediately sends the provided sACN start code & data.
Definition source.h:633
etcpal::Error ChangePriority(uint16_t universe, uint8_t new_priority)
Change the priority of a universe.
Definition source.h:562
void UpdateLevelsAndPap(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 th...
Definition source.h:698
etcpal::Error ChangePreviewFlag(uint16_t universe, bool new_preview_flag)
Change the send_preview option on a universe.
Definition source.h:585
constexpr Handle handle() const
Get the current handle to the underlying C source.
Definition source.h:936
etcpal::Error AddUnicastDestination(uint16_t universe, const etcpal::IpAddr &dest)
Add a unicast destination for a universe.
Definition source.h:493
etcpal::Error AddUniverse(const UniverseSettings &settings, McastMode mcast_mode)
Add a universe to an sACN source.
Definition source.h:388
etcpal::Error ChangeSynchronizationUniverse(uint16_t universe, uint16_t new_sync_universe)
Changes the synchronization universe for a universe.
Definition source.h:609
std::vector< etcpal::IpAddr > GetUnicastDestinations(uint16_t universe)
Obtain a vector of a universe's unicast destinations.
Definition source.h:518
static int ProcessManual(TickMode tick_mode)
Trigger the transmission of sACN packets for all universes of sources that were created with manually...
Definition source.h:776
void RemoveUniverse(uint16_t universe)
Remove a universe from a source.
Definition source.h:450
etcpal::Error ChangeName(const std::string &new_name)
Change the name of an sACN source.
Definition source.h:358
static etcpal::Error ResetNetworking(McastMode mcast_mode)
Resets the underlying network sockets for all universes of all sources.
Definition source.h:806
etcpal::Error Startup(const Settings &settings)
Create a new sACN source to send sACN data.
Definition source.h:318
Source(Source &&other)=default
void UpdateLevelsAndForceSync(uint16_t universe, const uint8_t *new_levels, size_t new_levels_size)
Like UpdateLevels(), but also sets the force_sync flag on the packet.
Definition source.h:721
std::vector< EtcPalMcastNetintId > GetNetworkInterfaces(uint16_t universe)
Obtain a vector of a universe's network interfaces.
Definition source.h:913
void Shutdown()
Destroy an sACN source instance.
Definition source.h:334
void UpdateLevels(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.
Definition source.h:671
std::vector< uint16_t > GetUniverses()
Obtain a vector of this source's universes (sorted lowest to highest).
Definition source.h:460
void UpdateLevelsAndPapAndForceSync(uint16_t universe, const uint8_t *new_levels, size_t new_levels_size, const uint8_t *new_priorities, size_t new_priorities_size)
Like UpdateLevelsAndPap(), but also sets the force_sync flag on the packet.
Definition source.h:752
etcpal::Error SendSynchronization(uint16_t universe)
Indicate that a new synchronization packet should be sent on the given synchronization universe.
Definition source.h:653
TickMode
Definition source.h:68
Definition source.h:48
C++ wrapper for the sACN init/deinit functions.
T data(T... args)
T empty(T... args)
T end(T... args)
sacn_ip_support_t
Definition common.h:71
@ kSacnIpV4AndIpV6
Definition common.h:77
etcpal_error_t sacn_source_change_name(sacn_source_t handle, const char *new_name)
Change the name of an sACN source.
Definition source.c:170
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.
Definition source.c:788
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.
Definition source.c:556
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.
Definition source.c:518
#define SACN_SOURCE_INFINITE_UNIVERSES
Constant for "infinite" when sending sACN universes.
Definition source.h:66
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.
Definition source.c:263
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.
Definition source.c:812
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.
Definition source.c:408
etcpal_error_t sacn_source_reset_networking(const SacnNetintConfig *sys_netint_config)
Resets the underlying network sockets for all universes of all sources.
Definition source.c:1029
etcpal_error_t sacn_source_create(const SacnSourceConfig *config, sacn_source_t *handle)
Create a new sACN source to send sACN data.
Definition source.c:104
#define SACN_SOURCE_INVALID
Definition source.h:58
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.
Definition source.c:483
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.
Definition source.c:903
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 th...
Definition source.c:860
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.
Definition source.c:710
void sacn_source_remove_universe(sacn_source_t handle, uint16_t universe)
Remove a universe from a source.
Definition source.c:351
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 (sorted lowest to highest).
Definition source.c:375
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.
Definition source.c:617
int sacn_source_process_manual(sacn_source_tick_mode_t tick_mode)
Trigger the transmission of sACN packets for all universes of sources that were created with manually...
Definition source.c:999
sacn_source_tick_mode_t
Definition source.h:76
#define SACN_SOURCE_KEEP_ALIVE_INTERVAL_DEFAULT
Definition source.h:69
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.
Definition source.c:956
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.
Definition source.c:679
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 sou...
Definition source.c:1100
int sacn_source_t
Definition source.h:56
#define SACN_SOURCE_PAP_KEEP_ALIVE_INTERVAL_DEFAULT
Definition source.h:72
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.
Definition source.c:1208
void sacn_source_destroy(sacn_source_t handle)
Destroy an sACN source instance.
Definition source.c:220
@ kSacnSourceTickModeProcessLevelsAndPap
Definition source.h:82
@ kSacnSourceTickModeProcessPapOnly
Definition source.h:80
@ kSacnSourceTickModeProcessLevelsOnly
Definition source.h:78
A namespace which contains all C++ language definitions in the sACN library.
Definition common.h:50
McastMode
Definition common.h:53
T reserve(T... args)
T resize(T... args)
T size(T... args)
sACN Source API definitions
Definition common.h:102
bool no_netints
Definition common.h:110
size_t num_netints
Definition common.h:107
SacnMcastInterface * netints
Definition common.h:105
Definition source.h:87
EtcPalUuid cid
Definition source.h:91
Definition source.h:131
const EtcPalIpAddr * unicast_destinations
Definition source.h:152
size_t num_unicast_destinations
Definition source.h:154
A set of configuration settings that a source needs to initialize.
Definition source.h:82
bool manually_process_source
Definition source.h:98
int keep_alive_interval
Definition source.h:105
std::string name
Definition source.h:88
int pap_keep_alive_interval
Definition source.h:109
sacn_ip_support_t ip_supported
Definition source.h:101
etcpal::Uuid cid
Definition source.h:86
bool IsValid() const
Definition source.h:257
size_t universe_count_max
Definition source.h:93
A set of network interfaces for a particular universe.
Definition source.h:162
uint16_t universe
Definition source.h:166
std::vector< SacnMcastInterface > netints
Definition source.h:170
bool no_netints
Definition source.h:173
sacn_source_t handle
Definition source.h:164
A set of configuration settings for a new universe on a source.
Definition source.h:123
uint8_t priority
Definition source.h:134
uint16_t universe
Definition source.h:128
bool send_preview
Definition source.h:137
std::vector< etcpal::IpAddr > unicast_destinations
Definition source.h:144
uint16_t sync_universe
Definition source.h:148
bool IsValid() const
Definition source.h:274
bool send_unicast_only
Definition source.h:140
T transform(T... args)