some replay api changes - still unsure about the design

This commit is contained in:
Florian Lüke 2024-12-23 13:00:31 +01:00
parent 46efb1cff7
commit fa897ea233

View file

@ -9,7 +9,7 @@ extern "C"
#endif
{
// descriptors - daq structure
// descriptors - daq tree structure
// daq -> events -> modules -> data_sources
// alternative concepts:
// crate -> triggers -> modules -> data_sources
@ -18,10 +18,18 @@ extern "C"
// todo: add number of valid bits in the data source
// todo: rng handling?
typedef enum
{
dt_uint32,
dt_float,
} data_type_t;
typedef struct
{
const char *name;
size_t size;
const char *array_name;
data_type_t data_type;
size_t array_size;
size_t valid_bits; // belongs into data_type_t
} array_descriptor_t;
typedef struct
@ -46,15 +54,17 @@ typedef struct
size_t event_count;
} run_descriptor_t;
typedef struct
{
const float *data;
size_t size;
} const_span_t;
// data views - daq data
typedef struct
{
const_span_t *data_arrays;
float *data;
size_t size;
} array_t;
typedef struct
{
array_t *data_arrays;
size_t data_array_count;
} module_data_t;