sACN  2.0.2
Implementation of ANSI E1.31 (Streaming ACN)
View other versions:
Loading...
Searching...
No Matches
common.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
25#ifndef SACN_COMMON_H_
26#define SACN_COMMON_H_
27
28#include <stdbool.h>
29#include <stdint.h>
30#include "etcpal/error.h"
31#include "etcpal/inet.h"
32#include "etcpal/log.h"
33#include "etcpal/uuid.h"
34
41#ifdef __cplusplus
42extern "C" {
43#endif
44
50#define SACN_SOURCE_NAME_MAX_LEN 64
51
55#define DMX_ADDRESS_COUNT 512
56
58typedef uint16_t sacn_remote_source_t;
60#define SACN_REMOTE_SOURCE_INVALID ((sacn_remote_source_t)-1)
61
63#define SACN_STARTCODE_DMX 0x00u
65#define SACN_STARTCODE_PRIORITY 0xddu
66
79
96
109
110etcpal_error_t sacn_init(const EtcPalLogParams* log_params, const SacnNetintConfig* sys_netint_config);
111void sacn_deinit(void);
112
115
116#ifdef __cplusplus
117}
118#endif
119
124#endif /* SACN_COMMON_H_ */
etcpal_error_t
sacn_ip_support_t
Definition common.h:71
uint16_t sacn_remote_source_t
Definition common.h:58
struct SacnNetintConfig SacnNetintConfig
etcpal_error_t sacn_init(const EtcPalLogParams *log_params, const SacnNetintConfig *sys_netint_config)
Initialize the sACN library.
Definition common.c:68
sacn_remote_source_t sacn_get_remote_source_handle(const EtcPalUuid *source_cid)
Converts a remote source CID to the corresponding handle, or SACN_REMOTE_SOURCE_INVALID if not found.
Definition common.c:289
void sacn_deinit(void)
Deinitialize the sACN library.
Definition common.c:234
etcpal_error_t sacn_get_remote_source_cid(sacn_remote_source_t source_handle, EtcPalUuid *source_cid)
Converts a remote source handle to the corresponding source CID.
Definition common.c:314
struct SacnMcastInterface SacnMcastInterface
@ kSacnIpV4Only
Definition common.h:73
@ kSacnIpV4AndIpV6
Definition common.h:77
@ kSacnIpV6Only
Definition common.h:75
Definition common.h:85
etcpal_error_t status
Definition common.h:94
EtcPalMcastNetintId iface
Definition common.h:89
Definition common.h:102
size_t num_netints
Definition common.h:107
SacnMcastInterface * netints
Definition common.h:105