mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
sample: added new complex data type for signal values
This commit is contained in:
parent
dfe56b89c0
commit
96bcbd400a
2 changed files with 4 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <complex.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -87,6 +88,8 @@ struct sample {
|
|||
union {
|
||||
double f; /**< Floating point values. */
|
||||
int64_t i; /**< Integer values. */
|
||||
bool b; /**< Boolean values. */
|
||||
float complex z; /**< Complex values. */
|
||||
} data[]; /**< Data is in host endianess! */
|
||||
};
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ enum signal_format {
|
|||
SIGNAL_FORMAT_FLOAT = 0,
|
||||
SIGNAL_FORMAT_INT = 1,
|
||||
SIGNAL_FORMAT_BOOL = 2,
|
||||
SIGNAL_FORMAT_COMPLEX = 3,
|
||||
SIGNAL_FORMAT_UNKNOWN = -1
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue