sACN  2.0.2
Implementation of ANSI E1.31 (Streaming ACN)
View other versions:
Loading...
Searching...
No Matches
merge_receiver.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright 2022 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
27#ifndef SACN_MERGE_RECEIVER_H_
28#define SACN_MERGE_RECEIVER_H_
29
30#include <stdbool.h>
31#include <stdint.h>
32#include "sacn/receiver.h"
33#include "sacn/dmx_merger.h"
34
48#ifdef __cplusplus
49extern "C" {
50#endif
51
55#define SACN_MERGE_RECEIVER_INVALID SACN_RECEIVER_INVALID
56
85
107 void* context);
108
131 const EtcPalSockAddr* source_addr, const SacnRemoteSource* source_info,
132 const SacnRecvUniverseData* universe_data, void* context);
133
145 void* context);
146
155
158{
159 /********* Required values **********/
160
162 uint16_t universe_id;
165
166 /********* Optional values **********/
167
170
175
180
184
186#define SACN_MERGE_RECEIVER_CONFIG_DEFAULT_INIT \
187 { \
188 0, {NULL, NULL, NULL, NULL}, {1, DMX_ADDRESS_COUNT}, SACN_RECEIVER_INFINITE_SOURCES, true, kSacnIpV4AndIpV6 \
189 }
190
203
216
218
220 const SacnNetintConfig* netint_config);
226 const SacnRecvUniverseSubrange* new_footprint);
228 const SacnRecvUniverseSubrange* new_footprint);
231 const SacnNetintConfig* sys_netint_config, const SacnMergeReceiverNetintList* per_receiver_netint_lists,
232 size_t num_per_receiver_netint_lists);
234 size_t netints_size);
236 sacn_remote_source_t source_handle, SacnMergeReceiverSource* source_info);
237
238#ifdef __cplusplus
239}
240#endif
241
246#endif /* SACN_MERGE_RECEIVER_H_ */
sACN DMX Merger API definitions
etcpal_error_t
sacn_ip_support_t
Definition common.h:71
#define SACN_SOURCE_NAME_MAX_LEN
The maximum length of an sACN source name, including the null-terminator.
Definition common.h:50
uint16_t sacn_remote_source_t
Definition common.h:58
etcpal_error_t sacn_merge_receiver_reset_networking(const SacnNetintConfig *sys_netint_config)
Resets underlying network sockets and packet receipt state, determines network interfaces for all mer...
Definition merge_receiver.c:376
size_t sacn_merge_receiver_get_network_interfaces(sacn_merge_receiver_t handle, EtcPalMcastNetintId *netints, size_t netints_size)
Obtain a list of a merge receiver's network interfaces.
Definition merge_receiver.c:472
etcpal_error_t sacn_merge_receiver_destroy(sacn_merge_receiver_t handle)
Destroy a sACN Merge Receiver instance.
Definition merge_receiver.c:182
etcpal_error_t sacn_merge_receiver_change_footprint(sacn_merge_receiver_t handle, const SacnRecvUniverseSubrange *new_footprint)
Change the footprint within the universe on which an sACN receiver is listening. TODO: Not yet implem...
Definition merge_receiver.c:322
struct SacnMergeReceiverConfig SacnMergeReceiverConfig
etcpal_error_t sacn_merge_receiver_reset_networking_per_receiver(const SacnNetintConfig *sys_netint_config, const SacnMergeReceiverNetintList *per_receiver_netint_lists, size_t num_per_receiver_netint_lists)
Resets underlying network sockets and packet receipt state, determines network interfaces for each me...
Definition merge_receiver.c:413
struct SacnMergeReceiverNetintList SacnMergeReceiverNetintList
void(* SacnMergeReceiverNonDmxCallback)(sacn_merge_receiver_t receiver_handle, const EtcPalSockAddr *source_addr, const SacnRemoteSource *source_info, const SacnRecvUniverseData *universe_data, void *context)
Notify that a non-data packet has been received.
Definition merge_receiver.h:130
etcpal_error_t sacn_merge_receiver_get_footprint(sacn_merge_receiver_t handle, SacnRecvUniverseSubrange *footprint)
Get the footprint within the universe on which a sACN Merge Receiver is currently listening.
Definition merge_receiver.c:245
void(* SacnMergeReceiverMergedDataCallback)(sacn_merge_receiver_t handle, const SacnRecvMergedData *merged_data, void *context)
Notify that a new data packet has been received and merged.
Definition merge_receiver.h:106
void(* SacnMergeReceiverSourceLimitExceededCallback)(sacn_merge_receiver_t handle, uint16_t universe, void *context)
Notify that more than the configured maximum number of sources are currently sending on the universe ...
Definition merge_receiver.h:144
etcpal_error_t sacn_merge_receiver_get_universe(sacn_merge_receiver_t handle, uint16_t *universe_id)
Get the universe on which a sACN Merge Receiver is currently listening.
Definition merge_receiver.c:226
etcpal_error_t sacn_merge_receiver_get_source(sacn_merge_receiver_t merge_receiver_handle, sacn_remote_source_t source_handle, SacnMergeReceiverSource *source_info)
Gets a copy of the information for the specified merge receiver source.
Definition merge_receiver.c:491
etcpal_error_t sacn_merge_receiver_change_universe(sacn_merge_receiver_t handle, uint16_t new_universe_id)
Change the universe on which a sACN Merge Receiver is listening.
Definition merge_receiver.c:268
etcpal_error_t sacn_merge_receiver_create(const SacnMergeReceiverConfig *config, sacn_merge_receiver_t *handle, const SacnNetintConfig *netint_config)
Create a new sACN Merge Receiver to listen and merge sACN data on a universe.
Definition merge_receiver.c:88
struct SacnMergeReceiverCallbacks SacnMergeReceiverCallbacks
etcpal_error_t sacn_merge_receiver_change_universe_and_footprint(sacn_merge_receiver_t handle, uint16_t new_universe_id, const SacnRecvUniverseSubrange *new_footprint)
Change the universe and footprint on which an sACN merge receiver is listening. TODO: Not yet impleme...
Definition merge_receiver.c:342
void sacn_merge_receiver_config_init(SacnMergeReceiverConfig *config)
Initialize an sACN Merge Receiver Config struct to default values.
Definition merge_receiver.c:55
int sacn_merge_receiver_t
Definition merge_receiver.h:53
struct SacnMergeReceiverSource SacnMergeReceiverSource
struct SacnRecvMergedData SacnRecvMergedData
sACN Receiver API definitions
Definition common.h:85
Definition merge_receiver.h:149
SacnMergeReceiverMergedDataCallback universe_data
Definition merge_receiver.h:150
SacnMergeReceiverSourceLimitExceededCallback source_limit_exceeded
Definition merge_receiver.h:152
void * callback_context
Definition merge_receiver.h:153
SacnMergeReceiverNonDmxCallback universe_non_dmx
Definition merge_receiver.h:151
Definition merge_receiver.h:158
SacnRecvUniverseSubrange footprint
Definition merge_receiver.h:169
uint16_t universe_id
Definition merge_receiver.h:162
int source_count_max
Definition merge_receiver.h:174
sacn_ip_support_t ip_supported
Definition merge_receiver.h:182
SacnMergeReceiverCallbacks callbacks
Definition merge_receiver.h:164
bool use_pap
Definition merge_receiver.h:179
Definition merge_receiver.h:193
size_t num_netints
Definition merge_receiver.h:201
sacn_merge_receiver_t handle
Definition merge_receiver.h:195
SacnMcastInterface * netints
Definition merge_receiver.h:199
Definition merge_receiver.h:206
EtcPalUuid cid
Definition merge_receiver.h:210
EtcPalSockAddr addr
Definition merge_receiver.h:214
char name[SACN_SOURCE_NAME_MAX_LEN]
Definition merge_receiver.h:212
sacn_remote_source_t handle
Definition merge_receiver.h:208
Definition common.h:102
Definition merge_receiver.h:61
const uint8_t * levels
Definition merge_receiver.h:73
size_t num_active_sources
Definition merge_receiver.h:83
uint16_t universe_id
Definition merge_receiver.h:65
SacnRecvUniverseSubrange slot_range
Definition merge_receiver.h:69
const sacn_remote_source_t * owners
Definition merge_receiver.h:79
Definition receiver.h:89
Definition receiver.h:80
Definition receiver.h:124