ED247 Library  VA2.3.0
Implementation of ED247-A standard
ed247.h
1 /* -*- mode: c; c-basic-offset: 4 -*- */
2 /******************************************************************************
3  *
4  * The MIT Licence
5  *
6  * Copyright (c) 2021 Airbus Operations S.A.S
7  *
8  * Permission is hereby granted, free of charge, to any person obtaining a
9  * copy of this software and associated documentation files (the "Software"),
10  * to deal in the Software without restriction, including without limitation
11  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12  * and/or sell copies of the Software, and to permit persons to whom the
13  * Software is furnished to do so, subject to the following conditions:
14  *
15  * The above copyright notice and this permission notice shall be included
16  * in all copies or substantial portions of the Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
22  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
23  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24  * OTHER DEALINGS IN THE SOFTWARE.
25  *****************************************************************************/
26 #ifndef _LIBED247_H_
27 #define _LIBED247_H_
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #include <stdint.h>
34 #include <stdbool.h>
35 
36 #ifdef __unix__
37 # define LIBED247_EXPORT __attribute__ ((visibility ("default")))
38 #elif _WIN32
39 # ifdef LIBED247_EXPORTS
40  // We are building the DLL
41 # define LIBED247_EXPORT __declspec(dllexport)
42 # else
43 # ifdef LIBED247_STATIC
44  // We use a static version of the library
45 # define LIBED247_EXPORT
46 # else
47  // Default: we are importing DLL symbols
48 # define LIBED247_EXPORT __declspec(dllimport)
49 # endif
50 # endif
51 #endif
52 
53 /* =========================================================================
54  * Global
55  * ========================================================================= */
60 /* =========================================================================
61  * Global constants
62  * ========================================================================= */
67 typedef enum {
68  ED247_STATUS_SUCCESS = 0,
69  ED247_STATUS_FAILURE,
70  ED247_STATUS_TIMEOUT,
71  ED247_STATUS_NODATA
73 
78 typedef enum {
79  ED247_LOG_LEVEL_MIN = 0,
80  ED247_LOG_LEVEL_ERROR = ED247_LOG_LEVEL_MIN,
81  ED247_LOG_LEVEL_WARNING = 1,
82  ED247_LOG_LEVEL_DEFAULT = ED247_LOG_LEVEL_WARNING,
83  ED247_LOG_LEVEL_INFO = 2,
84  ED247_LOG_LEVEL_DEBUG = 3,
85  ED247_LOG_LEVEL_CRAZY = 99, // Will log each payload
86  ED247_LOG_LEVEL_MAX = ED247_LOG_LEVEL_CRAZY,
87  ED247_LOG_LEVEL_UNSET = 100
89 
94 typedef enum {
95  ED247_YESNO_NO = 0,
96  ED247_YESNO_YES,
97  ED247_YESNO__INVALID
99 
104 typedef enum {
105  ED247_STANDARD__INVALID,
106  ED247_STANDARD_ED247,
107  ED247_STANDARD_ED247A,
108  ED247_STANDARD__COUNT
110 
115 typedef uint16_t ed247_uid_t;
116 
121 typedef enum {
122  ED247_COMPONENT_TYPE__INVALID,
123  ED247_COMPONENT_TYPE_VIRTUAL,
124  ED247_COMPONENT_TYPE_BRIDGE,
125  ED247_COMPONENT_TYPE__COUNT
127 
132 typedef enum {
133  ED247_STREAM_TYPE__INVALID,
134  ED247_STREAM_TYPE_A664,
135  ED247_STREAM_TYPE_A429,
136  ED247_STREAM_TYPE_A825,
137  ED247_STREAM_TYPE_M1553,
138  ED247_STREAM_TYPE_SERIAL,
139  ED247_STREAM_TYPE_AUDIO,
140  ED247_STREAM_TYPE_VIDEO,
141  ED247_STREAM_TYPE_ETHERNET,
142  ED247_STREAM_TYPE_ANALOG,
143  ED247_STREAM_TYPE_DISCRETE,
144  ED247_STREAM_TYPE_NAD,
145  ED247_STREAM_TYPE_VNAD,
146  ED247_STREAM_TYPE__COUNT
148 
153 typedef enum {
154  ED247_DIRECTION__INVALID = 0,
155  ED247_DIRECTION_IN = 0b01,
156  ED247_DIRECTION_OUT = 0b10,
157  ED247_DIRECTION_INOUT = ED247_DIRECTION_IN | ED247_DIRECTION_OUT
159 
164 typedef enum {
165  ED247_SIGNAL_TYPE__INVALID,
166  ED247_SIGNAL_TYPE_ANALOG = ED247_STREAM_TYPE_ANALOG,
167  ED247_SIGNAL_TYPE_DISCRETE = ED247_STREAM_TYPE_DISCRETE,
168  ED247_SIGNAL_TYPE_NAD = ED247_STREAM_TYPE_NAD,
169  ED247_SIGNAL_TYPE_VNAD = ED247_STREAM_TYPE_VNAD
171 
176 typedef enum {
177  ED247_NAD_TYPE__INVALID,
178  ED247_NAD_TYPE_INT8,
179  ED247_NAD_TYPE_INT16,
180  ED247_NAD_TYPE_INT32,
181  ED247_NAD_TYPE_INT64,
182  ED247_NAD_TYPE_UINT8,
183  ED247_NAD_TYPE_UINT16,
184  ED247_NAD_TYPE_UINT32,
185  ED247_NAD_TYPE_UINT64,
186  ED247_NAD_TYPE_FLOAT32,
187  ED247_NAD_TYPE_FLOAT64,
188  ED247_NAD_TYPE__COUNT
190 
195 typedef enum {
196  ED247_DISCRETE_FALSE = 0x00,
197  ED247_DISCRETE_TRUE = 0xFF
199 
200 
201 
202 /* =========================================================================
203  * Global Types
204  * ========================================================================= */
209 typedef struct {
210  uint32_t epoch_s;
211  uint32_t offset_ns;
213 #define LIBED247_TIMESTAMP_DEFAULT ed247_timestamp_t{0, 0}
214 
220 
226 
232 
238 
244 
250 
256 
262 
263 
264 /* =========================================================================
265  * Global Methods
266  * ========================================================================= */
272 extern LIBED247_EXPORT const char * ed247_get_implementation_name();
273 
279 extern LIBED247_EXPORT const char * ed247_get_implementation_version();
280 
289 extern LIBED247_EXPORT ed247_status_t ed247_set_log(
290  ed247_log_level_t log_level,
291  const char * log_filepath);
292 
300 extern LIBED247_EXPORT ed247_status_t ed247_set_log_level(
301  ed247_log_level_t log_level);
302 
309 extern LIBED247_EXPORT ed247_status_t ed247_get_log_level(
310  ed247_log_level_t * log_level);
311 
312 
313 /* =========================================================================
314  * ED247 Context
315  * ========================================================================= */
321 /* =========================================================================
322  * ED247 Context - Init
323  * ========================================================================= */
337 extern LIBED247_EXPORT ed247_status_t ed247_load_file(
338  const char * ecic_file_path,
339  ed247_context_t * context);
340 
349 extern LIBED247_EXPORT ed247_status_t ed247_load_content(
350  const char * ecic_file_content,
351  ed247_context_t * context);
352 
360 extern LIBED247_EXPORT ed247_status_t ed247_unload(
361  ed247_context_t context);
362 
372 extern LIBED247_EXPORT ed247_status_t ed247_component_set_user_data(
373  ed247_context_t context,
374  void *user_data);
375 
384 extern LIBED247_EXPORT ed247_status_t ed247_component_get_user_data(
385  ed247_context_t context,
386  void **user_data);
387 
388 /* =========================================================================
389  * ED247 Context - Global information
390  * ========================================================================= */
396 extern LIBED247_EXPORT const char* ed247_component_get_version(ed247_context_t context);
397 extern LIBED247_EXPORT ed247_component_type_t ed247_component_get_type(ed247_context_t context);
398 extern LIBED247_EXPORT const char* ed247_component_get_name(ed247_context_t context);
399 extern LIBED247_EXPORT const char* ed247_component_get_comment(ed247_context_t context);
400 extern LIBED247_EXPORT ed247_uid_t ed247_component_get_identifier(ed247_context_t context);
401 extern LIBED247_EXPORT ed247_standard_t ed247_component_get_standard_revision(ed247_context_t context);
402 
403 extern LIBED247_EXPORT const char* ed247_file_producer_get_identifier(ed247_context_t context);
404 extern LIBED247_EXPORT const char* ed247_file_producer_get_comment(ed247_context_t context);
407 /* =========================================================================
408  * ED247 Context - Get Configuration
409  * ========================================================================= */
424 extern LIBED247_EXPORT ed247_status_t ed247_get_channel_list(
425  ed247_context_t context,
426  ed247_channel_list_t * channels);
427 
442 extern LIBED247_EXPORT ed247_status_t ed247_find_channels(
443  ed247_context_t context,
444  const char * regex_name,
445  ed247_channel_list_t * channels);
446 
456 extern LIBED247_EXPORT ed247_status_t ed247_get_channel(
457  ed247_context_t context,
458  const char * name,
459  ed247_channel_t * channel);
460 
470 extern LIBED247_EXPORT ed247_status_t ed247_get_stream_list(
471  ed247_context_t context,
472  ed247_stream_list_t * streams);
473 
488 extern LIBED247_EXPORT ed247_status_t ed247_find_streams(
489  ed247_context_t context,
490  const char * regex_name,
491  ed247_stream_list_t * streams);
492 
493 
503 extern LIBED247_EXPORT ed247_status_t ed247_get_stream(
504  ed247_context_t context,
505  const char * name,
506  ed247_stream_t * stream);
507 
521 extern LIBED247_EXPORT ed247_status_t ed247_find_signals(
522  ed247_context_t context,
523  const char * regex_name,
524  ed247_signal_list_t * signals);
525 
535 extern LIBED247_EXPORT ed247_status_t ed247_get_signal(
536  ed247_context_t context,
537  const char * name,
538  ed247_signal_t * signal);
539 
540 
541 /* =========================================================================
542  * ED247 Context - Receive and send
543  * ========================================================================= */
563 extern LIBED247_EXPORT ed247_status_t ed247_wait_frame(
564  ed247_context_t context,
565  ed247_stream_list_t * streams,
566  int32_t timeout_us);
567 
579 extern LIBED247_EXPORT ed247_status_t ed247_wait_during(
580  ed247_context_t context,
581  ed247_stream_list_t * streams,
582  int32_t duration_us);
583 
597 extern LIBED247_EXPORT ed247_status_t ed247_send_pushed_samples(
598  ed247_context_t context);
599 
600 
601 /* =========================================================================
602  * ED247 Context - Callbacks
603  * Using this API is not recomended and might be removed in future version
604  * ========================================================================= */
615 typedef ed247_status_t (*ed247_stream_recv_callback_t)(ed247_context_t context, ed247_stream_t stream);
616 
626 extern LIBED247_EXPORT ed247_status_t ed247_stream_register_recv_callback(
627  ed247_context_t context,
628  ed247_stream_t stream,
630 
640 extern LIBED247_EXPORT ed247_status_t ed247_stream_unregister_recv_callback(
641  ed247_context_t context,
642  ed247_stream_t stream,
644 
654 extern LIBED247_EXPORT ed247_status_t ed247_streams_register_recv_callback(
655  ed247_context_t context,
656  ed247_stream_list_t streams,
658 
668 extern LIBED247_EXPORT ed247_status_t ed247_streams_unregister_recv_callback(
669  ed247_context_t context,
670  ed247_stream_list_t streams,
672 
681 extern LIBED247_EXPORT ed247_status_t ed247_register_recv_callback(
682  ed247_context_t context,
684 
693 extern LIBED247_EXPORT ed247_status_t ed247_unregister_recv_callback(
694  ed247_context_t context,
696 
697 
698 /* =========================================================================
699  * Time handing
700  * ========================================================================= */
710 typedef void (*ed247_get_time_t)(ed247_timestamp_t* timestamp);
711 
723 extern LIBED247_EXPORT void ed247_get_time(ed247_timestamp_t* timestamp);
724 
734 extern LIBED247_EXPORT void ed247_set_transport_timestamp_callback(ed247_get_time_t callback);
735 
744 extern LIBED247_EXPORT void ed247_set_receive_timestamp_callback(ed247_get_time_t callback);
745 
752 extern LIBED247_EXPORT void ed247_get_transport_timestamp(ed247_timestamp_t* timestamp);
753 
760 extern LIBED247_EXPORT void ed247_get_receive_timestamp(ed247_timestamp_t* timestamp);
761 
762 
763 /* =========================================================================
764  * Channel
765  * ========================================================================= */
774 extern LIBED247_EXPORT const char* ed247_channel_get_name(ed247_channel_t channel);
775 extern LIBED247_EXPORT const char* ed247_channel_get_comment(ed247_channel_t channel);
776 extern LIBED247_EXPORT ed247_standard_t ed247_channel_get_frame_standard_revision(ed247_channel_t channel);
789 extern LIBED247_EXPORT ed247_status_t ed247_channel_get_stream_list(
790  ed247_channel_t channel,
791  ed247_stream_list_t * streams);
792 
807 extern LIBED247_EXPORT ed247_status_t ed247_channel_find_streams(
808  ed247_channel_t channel,
809  const char * regex_name,
810  ed247_stream_list_t * streams);
811 
821 extern LIBED247_EXPORT ed247_status_t ed247_channel_get_stream(
822  ed247_channel_t channel,
823  const char * name,
824  ed247_stream_t * stream);
825 
835 extern LIBED247_EXPORT ed247_status_t ed247_channel_set_user_data(
836  ed247_channel_t channel,
837  void * user_data);
838 
847 extern LIBED247_EXPORT ed247_status_t ed247_channel_get_user_data(
848  ed247_channel_t channel,
849  void ** user_data);
850 
851 
852 /* =========================================================================
853  * Channel - List
854  * ========================================================================= */
868 extern LIBED247_EXPORT ed247_status_t ed247_channel_list_size(
869  ed247_channel_list_t channels,
870  uint32_t * size);
871 
882 extern LIBED247_EXPORT ed247_status_t ed247_channel_list_next(
883  ed247_channel_list_t channels,
884  ed247_channel_t * channel);
885 
893 extern LIBED247_EXPORT ed247_status_t ed247_channel_list_free(
894  ed247_channel_list_t channels);
895 
896 
897 
898 /* =========================================================================
899  * Stream
900  * ========================================================================= */
909 typedef struct ed247_sample_details_s {
910  ed247_uid_t component_identifier;
911  uint16_t sequence_number;
912  ed247_timestamp_t transport_timestamp;
914 #define LIBED247_SAMPLE_DETAILS_DEFAULT ed247_sample_details_t{0, 0, LIBED247_TIMESTAMP_DEFAULT}
915 
920 extern LIBED247_EXPORT const char* ed247_stream_get_name(ed247_stream_t stream);
921 extern LIBED247_EXPORT ed247_direction_t ed247_stream_get_direction(ed247_stream_t stream);
922 extern LIBED247_EXPORT ed247_stream_type_t ed247_stream_get_type(ed247_stream_t stream);
923 extern LIBED247_EXPORT const char* ed247_stream_get_comment(ed247_stream_t stream);
924 extern LIBED247_EXPORT const char* ed247_stream_get_icd(ed247_stream_t stream);
925 extern LIBED247_EXPORT ed247_uid_t ed247_stream_get_uid(ed247_stream_t stream);
926 extern LIBED247_EXPORT uint32_t ed247_stream_get_sample_max_number(ed247_stream_t stream);
927 extern LIBED247_EXPORT uint32_t ed247_stream_get_sample_max_size_bytes(ed247_stream_t stream);
928 extern LIBED247_EXPORT uint32_t ed247_stream_get_sampling_period_us(ed247_stream_t stream);
940 extern LIBED247_EXPORT ed247_status_t ed247_stream_has_signals(
941  ed247_stream_t stream,
942  uint8_t * yesno);
943 
953 extern LIBED247_EXPORT ed247_status_t ed247_stream_get_signal_list(
954  ed247_stream_t stream,
955  ed247_signal_list_t * signals);
956 
971 extern LIBED247_EXPORT ed247_status_t ed247_stream_find_signals(
972  ed247_stream_t stream,
973  const char * regex_name,
974  ed247_signal_list_t * signals);
975 
985 extern LIBED247_EXPORT ed247_status_t ed247_stream_get_signal(
986  ed247_stream_t stream,
987  const char * name,
988  ed247_signal_t * signal);
989 
998 extern LIBED247_EXPORT ed247_status_t ed247_stream_get_channel(
999  ed247_stream_t stream,
1000  ed247_channel_t * channel);
1001 
1011 extern LIBED247_EXPORT ed247_status_t ed247_stream_set_user_data(
1012  ed247_stream_t stream,
1013  void * user_data);
1014 
1023 extern LIBED247_EXPORT ed247_status_t ed247_stream_get_user_data(
1024  ed247_stream_t stream,
1025  void ** user_data);
1026 
1027 
1028 /* =========================================================================
1029  * Stream - Read & Write
1030  * ========================================================================= */
1045 extern LIBED247_EXPORT ed247_status_t ed247_stream_get_assistant(
1046  ed247_stream_t stream,
1047  ed247_stream_assistant_t * assistant);
1048 
1060 extern LIBED247_EXPORT ed247_status_t ed247_stream_allocate_sample(
1061  ed247_stream_t stream,
1062  void ** sample_data,
1063  uint32_t * sample_size);
1064 
1071 extern LIBED247_EXPORT ed247_status_t ed247_stream_free_sample(
1072  void* sample_data);
1073 
1074 
1083 extern LIBED247_EXPORT ed247_status_t ed247_stream_samples_number(
1084  ed247_stream_t stream,
1085  ed247_direction_t direction,
1086  uint32_t * size);
1087 
1101 extern LIBED247_EXPORT ed247_status_t ed247_stream_push_sample(
1102  ed247_stream_t stream,
1103  const void * sample_data,
1104  uint32_t sample_data_size,
1105  const ed247_timestamp_t * data_timestamp,
1106  bool * full);
1107 
1122 extern LIBED247_EXPORT ed247_status_t ed247_stream_push_samples(
1123  ed247_stream_t stream,
1124  const void * samples_data,
1125  const uint32_t * samples_size,
1126  uint32_t samples_number,
1127  const ed247_timestamp_t * data_timestamp,
1128  bool * full);
1129 
1146 extern LIBED247_EXPORT ed247_status_t ed247_stream_pop_sample(
1147  ed247_stream_t stream,
1148  const void ** sample_data,
1149  uint32_t * sample_size,
1150  const ed247_timestamp_t ** data_timestamp,
1151  const ed247_timestamp_t ** recv_timestamp,
1152  const ed247_sample_details_t ** sample_details,
1153  bool * empty);
1154 
1155 
1156 /* =========================================================================
1157  * Stream - List
1158  * ========================================================================= */
1172 extern LIBED247_EXPORT ed247_status_t ed247_stream_list_size(
1173  ed247_stream_list_t streams,
1174  uint32_t * size);
1175 
1186 extern LIBED247_EXPORT ed247_status_t ed247_stream_list_next(
1187  ed247_stream_list_t streams,
1188  ed247_stream_t * stream);
1189 
1197 extern LIBED247_EXPORT ed247_status_t ed247_stream_list_free(
1198  ed247_stream_list_t streams);
1199 
1200 
1201 
1202 /* =========================================================================
1203  * Signal
1204  * ========================================================================= */
1216 extern LIBED247_EXPORT uint32_t ed247_nad_type_size(ed247_nad_type_t nad_type);
1217 
1222 extern LIBED247_EXPORT const char* ed247_signal_get_name(ed247_signal_t signal);
1223 extern LIBED247_EXPORT const char* ed247_signal_get_comment(ed247_signal_t signal);
1224 extern LIBED247_EXPORT const char* ed247_signal_get_icd(ed247_signal_t signal);
1225 extern LIBED247_EXPORT ed247_signal_type_t ed247_signal_get_type(ed247_signal_t signal);
1227 extern LIBED247_EXPORT uint32_t ed247_signal_get_byte_offset(ed247_signal_t signal);
1228 extern LIBED247_EXPORT const char* ed247_signal_analogue_get_electrical_unit(ed247_signal_t analogue_signal);
1230 extern LIBED247_EXPORT ed247_nad_type_t ed247_signal_nad_get_type(ed247_signal_t nad_signal);
1232 extern LIBED247_EXPORT const char* ed247_signal_nad_get_unit(ed247_signal_t nad_signal);
1233 extern LIBED247_EXPORT uint32_t ed247_signal_nad_get_dimensions_count(ed247_signal_t nad_signal);
1234 extern LIBED247_EXPORT uint32_t ed247_signal_nad_get_dimension(ed247_signal_t nad_signal, uint32_t dimention_id);
1235 extern LIBED247_EXPORT uint32_t ed247_signal_vnad_get_position(ed247_signal_t vnad_signal);
1236 extern LIBED247_EXPORT uint32_t ed247_signal_vnad_get_max_number(ed247_signal_t vnad_signal);
1248 extern LIBED247_EXPORT ed247_status_t ed247_signal_set_user_data(
1249  ed247_signal_t signal,
1250  void * user_data);
1251 
1260 extern LIBED247_EXPORT ed247_status_t ed247_signal_get_user_data(
1261  ed247_signal_t signal,
1262  void ** user_data);
1263 
1272 extern LIBED247_EXPORT ed247_status_t ed247_signal_get_stream(
1273  ed247_signal_t signal,
1274  ed247_stream_t * stream);
1275 
1286 extern LIBED247_EXPORT ed247_status_t ed247_signal_get_assistant(
1287  ed247_signal_t signal,
1288  ed247_stream_assistant_t * assistant);
1289 
1290 
1302 extern LIBED247_EXPORT ed247_status_t ed247_signal_allocate_sample(
1303  ed247_signal_t signal,
1304  void ** sample_data,
1305  uint32_t * sample_size);
1306 
1313 extern LIBED247_EXPORT ed247_status_t ed247_signal_free_sample(
1314  void * sample_data);
1315 
1316 
1317 /* =========================================================================
1318  * Signal - List
1319  * ========================================================================= */
1333 extern LIBED247_EXPORT ed247_status_t ed247_signal_list_size(
1334  ed247_signal_list_t signals,
1335  uint32_t * size);
1336 
1347 extern LIBED247_EXPORT ed247_status_t ed247_signal_list_next(
1348  ed247_signal_list_t signals,
1349  ed247_signal_t * signal);
1350 
1358 extern LIBED247_EXPORT ed247_status_t ed247_signal_list_free(
1359  ed247_signal_list_t signals);
1360 
1361 
1362 
1363 
1364 /* =========================================================================
1365  * Stream assistant
1366  * ========================================================================= */
1380 extern LIBED247_EXPORT ed247_status_t ed247_stream_assistant_get_stream(
1381  ed247_stream_assistant_t assistant,
1382  ed247_stream_t * stream);
1383 
1408 extern LIBED247_EXPORT ed247_status_t ed247_stream_assistant_write_signal(
1409  ed247_stream_assistant_t assistant,
1410  ed247_signal_t signal,
1411  const void * signal_sample_data,
1412  uint32_t signal_sample_size);
1413 
1418 extern LIBED247_EXPORT bool ed247_stream_assistant_was_written(ed247_stream_assistant_t assistant);
1419 
1441 extern LIBED247_EXPORT ed247_status_t ed247_stream_assistant_read_signal(
1442  ed247_stream_assistant_t assistant,
1443  ed247_signal_t signal,
1444  const void ** signal_sample_data,
1445  uint32_t * signal_sample_size);
1446 
1447 
1466 extern LIBED247_EXPORT ed247_status_t ed247_stream_assistant_push_sample(
1467  ed247_stream_assistant_t assistant,
1468  const ed247_timestamp_t * data_timestamp,
1469  bool * full);
1470 
1483 extern LIBED247_EXPORT ed247_status_t ed247_stream_assistants_written_push_samples(
1484  ed247_context_t context,
1485  const ed247_timestamp_t* data_timestamp);
1486 
1505 extern LIBED247_EXPORT ed247_status_t ed247_stream_assistant_pop_sample(
1506  ed247_stream_assistant_t assistant,
1507  const ed247_timestamp_t ** data_timestamp,
1508  const ed247_timestamp_t ** recv_timestamp,
1509  const ed247_sample_details_t ** sample_details,
1510  bool * empty);
1511 
1522 extern LIBED247_EXPORT ed247_status_t stream_assistants_pop_samples(ed247_context_t context);
1523 
1524 /* =========================================================================
1525  * Strings conversion
1526  * ========================================================================= */
1538 extern LIBED247_EXPORT const char * ed247_status_string(
1539  ed247_status_t status);
1540 
1547 extern LIBED247_EXPORT const char * ed247_standard_string(
1548  ed247_standard_t standard);
1549 
1556 extern LIBED247_EXPORT ed247_standard_t ed247_standard_from_string(
1557  const char *standard);
1558 
1565 extern LIBED247_EXPORT const char * ed247_direction_string(
1566  ed247_direction_t direction);
1567 
1574 extern LIBED247_EXPORT ed247_direction_t ed247_direction_from_string(
1575  const char *direction);
1576 
1583 extern LIBED247_EXPORT const char * ed247_yesno_string(
1584  ed247_yesno_t yesno);
1585 
1592 extern LIBED247_EXPORT ed247_yesno_t ed247_yesno_from_string(
1593  const char *yesno);
1594 
1601 extern LIBED247_EXPORT const char * ed247_component_type_string(
1602  ed247_component_type_t component_type);
1603 
1610 extern LIBED247_EXPORT ed247_component_type_t ed247_component_type_from_string(
1611  const char *component_type);
1612 
1619 extern LIBED247_EXPORT const char * ed247_stream_type_string(
1620  ed247_stream_type_t stream_type);
1621 
1628 extern LIBED247_EXPORT ed247_stream_type_t ed247_stream_type_from_string(
1629  const char *stream_type);
1630 
1637 extern LIBED247_EXPORT const char * ed247_signal_type_string(
1638  ed247_signal_type_t signal_type);
1639 
1646 extern LIBED247_EXPORT ed247_signal_type_t ed247_signal_type_from_string(
1647  const char *signal_type);
1648 
1655 extern LIBED247_EXPORT const char * ed247_nad_type_string(
1656  ed247_nad_type_t nad_type);
1657 
1664 extern LIBED247_EXPORT ed247_nad_type_t ed247_nad_type_from_string(
1665  const char *nad_type);
1666 
1667 
1668 /* =========================================================================
1669  * Deprecated stuff
1670  * ========================================================================= */
1676 #if defined(__GNUC__) || defined(__clang__)
1677 # define DEPRECATED __attribute__((deprecated))
1678 #elif defined(_MSC_VER)
1679 # define DEPRECATED __declspec(deprecated)
1680 #endif
1681 
1686 extern DEPRECATED LIBED247_EXPORT const char * libed247_errors();
1687 
1692 extern DEPRECATED LIBED247_EXPORT ed247_status_t ed247_load(const char *ecic_file_path,void* unused,ed247_context_t *context);
1693 
1698 extern DEPRECATED LIBED247_EXPORT ed247_status_t ed247_component_get_channels(ed247_context_t context, ed247_channel_list_t * channels);
1699 
1704 extern DEPRECATED LIBED247_EXPORT ed247_status_t ed247_component_get_streams(ed247_context_t context, ed247_stream_list_t * streams);
1705 
1710 extern DEPRECATED LIBED247_EXPORT ed247_status_t ed247_channel_get_streams(ed247_channel_t channel, ed247_stream_list_t *streams);
1711 
1716 extern DEPRECATED LIBED247_EXPORT ed247_status_t ed247_find_channel_streams(ed247_channel_t channel, const char * regex_name, ed247_stream_list_t * streams);
1717 
1722 extern DEPRECATED LIBED247_EXPORT ed247_status_t ed247_get_channel_stream(ed247_channel_t channel, const char * name, ed247_stream_t * stream);
1723 
1728 extern DEPRECATED LIBED247_EXPORT ed247_status_t ed247_stream_contains_signals(ed247_stream_t stream, uint8_t * yesno);
1729 
1734 extern DEPRECATED LIBED247_EXPORT ed247_status_t ed247_stream_get_signals(ed247_stream_t stream, ed247_signal_list_t *signals);
1735 
1740 extern DEPRECATED LIBED247_EXPORT ed247_status_t ed247_find_stream_signals(ed247_stream_t stream, const char * regex_name, ed247_signal_list_t * signals);
1741 
1746 extern DEPRECATED LIBED247_EXPORT ed247_status_t ed247_get_stream_signal(ed247_stream_t stream, const char * name, ed247_signal_t * signal);
1747 
1752 extern DEPRECATED LIBED247_EXPORT ed247_status_t ed247_free(void *data);
1753 
1754 
1755 typedef struct { uint32_t a; uint32_t b; } libed247_runtime_metrics_t;
1760 extern DEPRECATED LIBED247_EXPORT ed247_status_t ed247_get_runtime_metrics(ed247_context_t context, const libed247_runtime_metrics_t ** metrics);
1761 
1762 
1763 
1764 #ifdef __cplusplus
1765 };
1766 #endif
1767 
1768 #endif
LIBED247_EXPORT ed247_status_t ed247_stream_push_sample(ed247_stream_t stream, const void *sample_data, uint32_t sample_data_size, const ed247_timestamp_t *data_timestamp, bool *full)
Write and push a single sample in the samples stack of the stream.
Definition: ed247.cpp:1412
LIBED247_EXPORT ed247_status_t ed247_signal_get_stream(ed247_signal_t signal, ed247_stream_t *stream)
Get the stream that contain this signal.
Definition: ed247.cpp:1707
struct ed247_internal_signal_list_t * ed247_signal_list_t
Signal list identifier.
Definition: ed247.h:255
LIBED247_EXPORT void ed247_get_transport_timestamp(ed247_timestamp_t *timestamp)
Return the time to timestamp the transport.
Definition: ed247_time.cpp:102
LIBED247_EXPORT ed247_status_t ed247_stream_get_channel(ed247_stream_t stream, ed247_channel_t *channel)
Get the channel that contain this stream.
Definition: ed247.cpp:1219
LIBED247_EXPORT ed247_component_type_t ed247_component_type_from_string(const char *component_type)
ed247_component_type_t from string conversion
Definition: ed247_conversion.cpp:175
LIBED247_EXPORT ed247_status_t ed247_find_streams(ed247_context_t context, const char *regex_name, ed247_stream_list_t *streams)
Find all streams of the component whose names match regex_name.
Definition: ed247.cpp:415
DEPRECATED LIBED247_EXPORT ed247_status_t ed247_get_runtime_metrics(ed247_context_t context, const libed247_runtime_metrics_t **metrics)
Deprecated: Not working.
Definition: ed247.cpp:235
LIBED247_EXPORT ed247_status_t ed247_stream_assistant_write_signal(ed247_stream_assistant_t assistant, ed247_signal_t signal, const void *signal_sample_data, uint32_t signal_sample_size)
Write a signal into the assistant sample buffer.
Definition: ed247.cpp:1882
LIBED247_EXPORT ed247_status_t ed247_stream_assistant_push_sample(ed247_stream_assistant_t assistant, const ed247_timestamp_t *data_timestamp, bool *full)
Push the assistant sample buffer on the stream stack.
Definition: ed247.cpp:1960
DEPRECATED LIBED247_EXPORT ed247_status_t ed247_component_get_streams(ed247_context_t context, ed247_stream_list_t *streams)
Deprecated: use ed247_get_stream_list.
Definition: ed247.cpp:545
LIBED247_EXPORT const char * ed247_standard_string(ed247_standard_t standard)
ed247_standard_t to string conversion
Definition: ed247_conversion.cpp:92
LIBED247_EXPORT void ed247_set_transport_timestamp_callback(ed247_get_time_t callback)
Set the function to use to timestamp the transport (aka emit date)
Definition: ed247_time.cpp:92
LIBED247_EXPORT const char * ed247_stream_type_string(ed247_stream_type_t stream_type)
ed247_stream_type_t to string conversion
Definition: ed247_conversion.cpp:188
LIBED247_EXPORT ed247_status_t ed247_signal_set_user_data(ed247_signal_t signal, void *user_data)
Assign user data to the signal.
Definition: ed247.cpp:1667
DEPRECATED LIBED247_EXPORT const char * libed247_errors()
Deprecated. Return NULL.
Definition: ed247.cpp:100
struct ed247_internal_channel_t * ed247_channel_t
Channel identifier.
Definition: ed247.h:225
LIBED247_EXPORT ed247_status_t ed247_stream_samples_number(ed247_stream_t stream, ed247_direction_t direction, uint32_t *size)
Number of samples in the stream stack.
Definition: ed247.cpp:1384
struct ed247_internal_channel_list_t * ed247_channel_list_t
Channel list identifier.
Definition: ed247.h:231
DEPRECATED LIBED247_EXPORT ed247_status_t ed247_get_channel_stream(ed247_channel_t channel, const char *name, ed247_stream_t *stream)
Deprecated: use ed247_channel_get_stream.
Definition: ed247.cpp:976
LIBED247_EXPORT ed247_status_t ed247_get_signal(ed247_context_t context, const char *name, ed247_signal_t *signal)
Get a signal of the component.
Definition: ed247.cpp:507
LIBED247_EXPORT ed247_status_t ed247_stream_assistant_pop_sample(ed247_stream_assistant_t assistant, const ed247_timestamp_t **data_timestamp, const ed247_timestamp_t **recv_timestamp, const ed247_sample_details_t **sample_details, bool *empty)
Pop a sample from stream samples stack.
Definition: ed247.cpp:2002
LIBED247_EXPORT ed247_status_t ed247_stream_assistant_read_signal(ed247_stream_assistant_t assistant, ed247_signal_t signal, const void **signal_sample_data, uint32_t *signal_sample_size)
Read a signal sample from the assistant sample buffer.
Definition: ed247.cpp:1924
LIBED247_EXPORT ed247_status_t ed247_load_content(const char *ecic_file_content, ed247_context_t *context)
Loading function: the entry point of the library.
Definition: ed247.cpp:146
LIBED247_EXPORT ed247_status_t ed247_stream_pop_sample(ed247_stream_t stream, const void **sample_data, uint32_t *sample_size, const ed247_timestamp_t **data_timestamp, const ed247_timestamp_t **recv_timestamp, const ed247_sample_details_t **sample_details, bool *empty)
Pop a sample from stream samples stack.
Definition: ed247.cpp:1472
LIBED247_EXPORT const char * ed247_status_string(ed247_status_t status)
ed247_status_t to string conversion
Definition: ed247_conversion.cpp:80
LIBED247_EXPORT ed247_status_t ed247_unregister_recv_callback(ed247_context_t context, ed247_stream_recv_callback_t callback)
Unegister a callback (in all streams) which is called once a frame is received and decoded...
Definition: ed247.cpp:786
LIBED247_EXPORT ed247_status_t ed247_get_channel(ed247_context_t context, const char *name, ed247_channel_t *channel)
Get a channel of the component.
Definition: ed247.cpp:356
LIBED247_EXPORT ed247_status_t ed247_signal_get_assistant(ed247_signal_t signal, ed247_stream_assistant_t *assistant)
Get the stream assistant associated with this signal.
Definition: ed247.cpp:1730
LIBED247_EXPORT ed247_status_t ed247_load_file(const char *ecic_file_path, ed247_context_t *context)
Loading function: the entry point of the library.
Definition: ed247.cpp:124
LIBED247_EXPORT ed247_status_t ed247_wait_frame(ed247_context_t context, ed247_stream_list_t *streams, int32_t timeout_us)
Blocks until a frame is received and processed, and at least a stream has available data...
Definition: ed247.cpp:555
DEPRECATED LIBED247_EXPORT ed247_status_t ed247_find_channel_streams(ed247_channel_t channel, const char *regex_name, ed247_stream_list_t *streams)
Deprecated: use ed247_channel_find_streams.
Definition: ed247.cpp:969
LIBED247_EXPORT ed247_status_t ed247_stream_free_sample(void *sample_data)
Free memory allocated by ed247_stream_allocate_sample().
Definition: ed247.cpp:1368
LIBED247_EXPORT const char * ed247_signal_type_string(ed247_signal_type_t signal_type)
ed247_signal_type_t to string conversion
Definition: ed247_conversion.cpp:241
DEPRECATED LIBED247_EXPORT ed247_status_t ed247_free(void *data)
Deprecated: use ed247_signal_free_sample or ed247_stream_free_sample.
Definition: ed247.cpp:105
LIBED247_EXPORT const char * ed247_yesno_string(ed247_yesno_t yesno)
ed247_yesno_t to string conversion
Definition: ed247_conversion.cpp:141
ed247_standard_t
ED247 Standard revisions.
Definition: ed247.h:104
ed247_direction_t
Stream direction.
Definition: ed247.h:153
ed247_component_type_t
Component types.
Definition: ed247.h:121
LIBED247_EXPORT ed247_status_t ed247_unload(ed247_context_t context)
Unload resources linked to the given context.
Definition: ed247.cpp:168
LIBED247_EXPORT ed247_status_t ed247_stream_get_signal(ed247_stream_t stream, const char *name, ed247_signal_t *signal)
Get a signal of the stream.
Definition: ed247.cpp:1187
ed247_discrete_t
Discrete values to be used.
Definition: ed247.h:195
LIBED247_EXPORT const char * ed247_get_implementation_name()
The name of the current implementation.
Definition: ed247.cpp:67
LIBED247_EXPORT ed247_status_t ed247_stream_get_assistant(ed247_stream_t stream, ed247_stream_assistant_t *assistant)
Get an assistant to build stream samples based on signals.
Definition: ed247.cpp:1313
LIBED247_EXPORT ed247_status_t ed247_signal_allocate_sample(ed247_signal_t signal, void **sample_data, uint32_t *sample_size)
Allocate a sample to store one signal.
Definition: ed247.cpp:1744
LIBED247_EXPORT ed247_status_t ed247_signal_list_next(ed247_signal_list_t signals, ed247_signal_t *signal)
Iterate over a signal identifier list.
Definition: ed247.cpp:1813
LIBED247_EXPORT ed247_status_t ed247_signal_list_free(ed247_signal_list_t signals)
Free signal list.
Definition: ed247.cpp:1835
LIBED247_EXPORT ed247_status_t ed247_channel_find_streams(ed247_channel_t channel, const char *regex_name, ed247_stream_list_t *streams)
Find all streams of the channel whose names match regex_name.
Definition: ed247.cpp:861
LIBED247_EXPORT ed247_status_t ed247_stream_allocate_sample(ed247_stream_t stream, void **sample_data, uint32_t *sample_size)
Allocate a sample to store one stream.
Definition: ed247.cpp:1339
Definition: ed247_channel.h:34
LIBED247_EXPORT ed247_status_t ed247_stream_list_size(ed247_stream_list_t streams, uint32_t *size)
Get the size of the list.
Definition: ed247.cpp:1520
LIBED247_EXPORT ed247_status_t ed247_stream_has_signals(ed247_stream_t stream, uint8_t *yesno)
Check if the stream is a signal based one (DISCRETE, ANALOG, NAD or VNAD)
Definition: ed247.cpp:1109
ed247_signal_type_t
Signal types.
Definition: ed247.h:164
Timestamp structure, seconds from EPOCH (January 1st 1970) and nanoseconds offset with reference to p...
Definition: ed247.h:209
uint16_t ed247_uid_t
Unique identifier type.
Definition: ed247.h:115
void(* ed247_get_time_t)(ed247_timestamp_t *timestamp)
Prototype of a function to get time.
Definition: ed247.h:710
LIBED247_EXPORT ed247_status_t ed247_channel_get_user_data(ed247_channel_t channel, void **user_data)
Retrieve user data assigned to the channel.
Definition: ed247.cpp:940
DEPRECATED LIBED247_EXPORT ed247_status_t ed247_component_get_channels(ed247_context_t context, ed247_channel_list_t *channels)
Deprecated: use ed247_get_channel_list.
Definition: ed247.cpp:539
LIBED247_EXPORT ed247_status_t ed247_set_log(ed247_log_level_t log_level, const char *log_filepath)
Setup the logging parameters.
Definition: ed247.cpp:77
Definition: ed247.h:1755
LIBED247_EXPORT ed247_stream_type_t ed247_stream_type_from_string(const char *stream_type)
ed247_stream_type_t from string conversion
Definition: ed247_conversion.cpp:208
LIBED247_EXPORT ed247_status_t ed247_stream_list_next(ed247_stream_list_t streams, ed247_stream_t *stream)
Iterate over a stream identifier list.
Definition: ed247.cpp:1541
LIBED247_EXPORT const char * ed247_nad_type_string(ed247_nad_type_t nad_type)
ed247_nad_type_t to string conversion
Definition: ed247_conversion.cpp:270
LIBED247_EXPORT ed247_status_t ed247_find_channels(ed247_context_t context, const char *regex_name, ed247_channel_list_t *channels)
Find all channels of the component whose names match regex_name.
Definition: ed247.cpp:325
LIBED247_EXPORT ed247_status_t ed247_get_channel_list(ed247_context_t context, ed247_channel_list_t *channels)
Retrieve all the channels of the component.
Definition: ed247.cpp:298
LIBED247_EXPORT ed247_status_t ed247_register_recv_callback(ed247_context_t context, ed247_stream_recv_callback_t callback)
Register a callback (in all streams) which is called once a frame is received and decoded...
Definition: ed247.cpp:759
LIBED247_EXPORT ed247_nad_type_t ed247_signal_nad_get_type(ed247_signal_t nad_signal)
For NAD and VNAD.
Definition: ed247.cpp:1630
DEPRECATED LIBED247_EXPORT ed247_status_t ed247_get_stream_signal(ed247_stream_t stream, const char *name, ed247_signal_t *signal)
Deprecated: use ed247_stream_get_signal.
Definition: ed247.cpp:1302
LIBED247_EXPORT void ed247_get_time(ed247_timestamp_t *timestamp)
Return the current time.
Definition: ed247_time.cpp:84
LIBED247_EXPORT const char * ed247_signal_nad_get_unit(ed247_signal_t nad_signal)
For NAD and VNAD.
Definition: ed247.cpp:1636
LIBED247_EXPORT ed247_status_t ed247_channel_list_next(ed247_channel_list_t channels, ed247_channel_t *channel)
Iterate over a channel identifier list.
Definition: ed247.cpp:1008
LIBED247_EXPORT ed247_status_t ed247_set_log_level(ed247_log_level_t log_level)
Setup the logging level (see ed247_log_level_t)
Definition: ed247.cpp:85
LIBED247_EXPORT void ed247_get_receive_timestamp(ed247_timestamp_t *timestamp)
Return the time to timestamp the incoming streams.
Definition: ed247_time.cpp:107
Definition: ed247_stream.h:34
LIBED247_EXPORT const char * ed247_get_implementation_version()
The version of the current implementation.
Definition: ed247.cpp:72
LIBED247_EXPORT ed247_status_t ed247_send_pushed_samples(ed247_context_t context)
Send the samples that were written and pushed.
Definition: ed247.cpp:613
LIBED247_EXPORT void ed247_set_receive_timestamp_callback(ed247_get_time_t callback)
Set the function to use to timestamp the incoming streams (aka receive date)
Definition: ed247_time.cpp:97
LIBED247_EXPORT const char * ed247_component_type_string(ed247_component_type_t component_type)
ed247_component_type_t to string conversion
Definition: ed247_conversion.cpp:165
LIBED247_EXPORT uint32_t ed247_nad_type_size(ed247_nad_type_t nad_type)
Size of a single element of ed247_nad_type_t.
Definition: ed247.cpp:1588
LIBED247_EXPORT ed247_status_t ed247_stream_assistants_written_push_samples(ed247_context_t context, const ed247_timestamp_t *data_timestamp)
Push all stream assistants whose signals have been written since last push_sample() ...
Definition: ed247.cpp:1980
LIBED247_EXPORT ed247_status_t ed247_channel_list_free(ed247_channel_list_t channels)
Free channel list.
Definition: ed247.cpp:1030
LIBED247_EXPORT ed247_status_t ed247_channel_get_stream_list(ed247_channel_t channel, ed247_stream_list_t *streams)
Retrieve all the streams of the channel.
Definition: ed247.cpp:834
DEPRECATED LIBED247_EXPORT ed247_status_t ed247_channel_get_streams(ed247_channel_t channel, ed247_stream_list_t *streams)
Deprecated: use ed247_channel_get_stream_list.
Definition: ed247.cpp:963
LIBED247_EXPORT ed247_status_t ed247_signal_get_user_data(ed247_signal_t signal, void **user_data)
Retrieve user data assigned to the signal.
Definition: ed247.cpp:1685
DEPRECATED LIBED247_EXPORT ed247_status_t ed247_load(const char *ecic_file_path, void *unused, ed247_context_t *context)
Deprecated: use ed247_load_file.
Definition: ed247.cpp:227
LIBED247_EXPORT ed247_status_t ed247_stream_assistant_get_stream(ed247_stream_assistant_t assistant, ed247_stream_t *stream)
Get the stream associated to the assistant.
Definition: ed247.cpp:1860
LIBED247_EXPORT ed247_standard_t ed247_standard_from_string(const char *standard)
ed247_standard_t from string conversion
Definition: ed247_conversion.cpp:113
struct ed247_sample_details_s ed247_sample_details_t
Sample Details.
DEPRECATED LIBED247_EXPORT ed247_status_t ed247_stream_get_signals(ed247_stream_t stream, ed247_signal_list_t *signals)
Deprecated: use ed247_stream_get_signal_list.
Definition: ed247.cpp:1289
Definition: ed247_stream.h:33
LIBED247_EXPORT ed247_signal_type_t ed247_signal_type_from_string(const char *signal_type)
ed247_signal_type_t from string conversion
Definition: ed247_conversion.cpp:253
struct ed247_internal_stream_t * ed247_stream_t
Stream identifier.
Definition: ed247.h:237
LIBED247_EXPORT ed247_status_t ed247_component_get_user_data(ed247_context_t context, void **user_data)
Retrieve user data pointer form the context.
Definition: ed247.cpp:205
LIBED247_EXPORT ed247_direction_t ed247_direction_from_string(const char *direction)
ed247_direction_t from string conversion
Definition: ed247_conversion.cpp:126
struct ed247_internal_signal_t * ed247_signal_t
Signal identifier.
Definition: ed247.h:249
LIBED247_EXPORT uint32_t ed247_signal_get_byte_offset(ed247_signal_t signal)
Meaningless for VNAD.
Definition: ed247.cpp:1618
LIBED247_EXPORT ed247_status_t ed247_stream_push_samples(ed247_stream_t stream, const void *samples_data, const uint32_t *samples_size, uint32_t samples_number, const ed247_timestamp_t *data_timestamp, bool *full)
Write and push several samples in the samples stack of the stream.
Definition: ed247.cpp:1437
LIBED247_EXPORT ed247_status_t ed247_get_stream_list(ed247_context_t context, ed247_stream_list_t *streams)
Retrieve all the streams of the component.
Definition: ed247.cpp:387
LIBED247_EXPORT const char * ed247_direction_string(ed247_direction_t direction)
ed247_direction_t to string conversion
Definition: ed247_conversion.cpp:102
Definition: ed247_signal.h:37
LIBED247_EXPORT ed247_status_t ed247_channel_set_user_data(ed247_channel_t channel, void *user_data)
Assign user data to the channel.
Definition: ed247.cpp:922
struct ed247_internal_stream_assistant_t * ed247_stream_assistant_t
An assistant to help building stream samples.
Definition: ed247.h:261
DEPRECATED LIBED247_EXPORT ed247_status_t ed247_find_stream_signals(ed247_stream_t stream, const char *regex_name, ed247_signal_list_t *signals)
Deprecated: use ed247_stream_find_signals.
Definition: ed247.cpp:1295
LIBED247_EXPORT ed247_status_t ed247_channel_get_stream(ed247_channel_t channel, const char *name, ed247_stream_t *stream)
get a channel stream.
Definition: ed247.cpp:890
LIBED247_EXPORT ed247_status_t ed247_find_signals(ed247_context_t context, const char *regex_name, ed247_signal_list_t *signals)
Find all signals of the component whose names match regex_name.
Definition: ed247.cpp:477
ed247_nad_type_t
NAD type.
Definition: ed247.h:176
LIBED247_EXPORT ed247_status_t ed247_stream_unregister_recv_callback(ed247_context_t context, ed247_stream_t stream, ed247_stream_recv_callback_t callback)
Unregister a callback (from a stream) which is called once a frame is received and decoded...
Definition: ed247.cpp:663
LIBED247_EXPORT ed247_status_t ed247_streams_unregister_recv_callback(ed247_context_t context, ed247_stream_list_t streams, ed247_stream_recv_callback_t callback)
Unregister a callback (from several streams as once) which is called once a frame is received and dec...
Definition: ed247.cpp:726
Definition: ed247_signal.h:36
LIBED247_EXPORT ed247_nad_type_t ed247_nad_type_from_string(const char *nad_type)
ed247_nad_type_t from string conversion
Definition: ed247_conversion.cpp:288
ed247_log_level_t
Logging level.
Definition: ed247.h:78
ed247_status_t
Status codes.
Definition: ed247.h:67
Definition: ed247_channel.h:35
LIBED247_EXPORT ed247_status_t ed247_stream_get_signal_list(ed247_stream_t stream, ed247_signal_list_t *signals)
Return all signals of a stream.
Definition: ed247.cpp:1131
struct ed247_internal_context_t * ed247_context_t
Context identifier.
Definition: ed247.h:219
ed247_stream_type_t
Stream types.
Definition: ed247.h:132
LIBED247_EXPORT ed247_yesno_t ed247_yesno_from_string(const char *yesno)
ed247_yesno_t from string conversion
Definition: ed247_conversion.cpp:152
LIBED247_EXPORT ed247_status_t ed247_stream_get_user_data(ed247_stream_t stream, void **user_data)
Retrieve user data assigned to the stream.
Definition: ed247.cpp:1260
LIBED247_EXPORT ed247_status_t stream_assistants_pop_samples(ed247_context_t context)
Pop all samples of all input stream assistants. aka &#39;update all signals&#39;.
Definition: ed247.cpp:2024
LIBED247_EXPORT ed247_status_t ed247_get_log_level(ed247_log_level_t *log_level)
Get the logging level (see ed247_log_level_t)
Definition: ed247.cpp:92
LIBED247_EXPORT ed247_status_t ed247_stream_register_recv_callback(ed247_context_t context, ed247_stream_t stream, ed247_stream_recv_callback_t callback)
Register a callback (in a stream) which is called once a frame is received and decoded.
Definition: ed247.cpp:633
struct ed247_internal_stream_list_t * ed247_stream_list_t
Stream list identifier.
Definition: ed247.h:243
LIBED247_EXPORT ed247_status_t ed247_stream_find_signals(ed247_stream_t stream, const char *regex_name, ed247_signal_list_t *signals)
Find all signals of the channel whose names match regex_name.
Definition: ed247.cpp:1157
ed247_status_t(* ed247_stream_recv_callback_t)(ed247_context_t context, ed247_stream_t stream)
Stream receive callback function pointer.
Definition: ed247.h:615
LIBED247_EXPORT ed247_status_t ed247_get_stream(ed247_context_t context, const char *name, ed247_stream_t *stream)
Get a stream of the component.
Definition: ed247.cpp:444
ed247_yesno_t
Yes / No.
Definition: ed247.h:94
LIBED247_EXPORT bool ed247_stream_assistant_was_written(ed247_stream_assistant_t assistant)
Return true if a signal has been written since last ed247_stream_assistant_push_sample().
Definition: ed247.cpp:1912
LIBED247_EXPORT ed247_status_t ed247_stream_list_free(ed247_stream_list_t streams)
Free stream list.
Definition: ed247.cpp:1563
LIBED247_EXPORT ed247_status_t ed247_streams_register_recv_callback(ed247_context_t context, ed247_stream_list_t streams, ed247_stream_recv_callback_t callback)
Register a callback (in several streams as once) which is called once a frame is received and decoded...
Definition: ed247.cpp:693
Definition: ed247_stream_assistant.h:11
LIBED247_EXPORT ed247_status_t ed247_component_set_user_data(ed247_context_t context, void *user_data)
Assign user data to the context.
Definition: ed247.cpp:187
LIBED247_EXPORT ed247_status_t ed247_stream_set_user_data(ed247_stream_t stream, void *user_data)
Assign user data to the stream.
Definition: ed247.cpp:1242
Sample Details.
Definition: ed247.h:909
LIBED247_EXPORT ed247_status_t ed247_channel_list_size(ed247_channel_list_t channels, uint32_t *size)
Get the size of the list.
Definition: ed247.cpp:987
Definition: ed247_context.h:31
LIBED247_EXPORT ed247_status_t ed247_wait_during(ed247_context_t context, ed247_stream_list_t *streams, int32_t duration_us)
Blocks until duration is elapsed. Processing all received frames.
Definition: ed247.cpp:584
DEPRECATED LIBED247_EXPORT ed247_status_t ed247_stream_contains_signals(ed247_stream_t stream, uint8_t *yesno)
Deprecated: use ed247_stream_has_signals.
Definition: ed247.cpp:1283
LIBED247_EXPORT ed247_status_t ed247_signal_list_size(ed247_signal_list_t signals, uint32_t *size)
Get the size of the list.
Definition: ed247.cpp:1792