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