From 96bcbd400a802879f83fd4c164dfd32fbad7bad4 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 1 Aug 2018 17:04:30 +0200 Subject: [PATCH] sample: added new complex data type for signal values --- include/villas/sample.h | 3 +++ include/villas/signal.h | 1 + 2 files changed, 4 insertions(+) diff --git a/include/villas/sample.h b/include/villas/sample.h index b6684bdbc..25660aace 100644 --- a/include/villas/sample.h +++ b/include/villas/sample.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #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! */ }; diff --git a/include/villas/signal.h b/include/villas/signal.h index 590f5932a..e75cefff5 100644 --- a/include/villas/signal.h +++ b/include/villas/signal.h @@ -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 };