diff --git a/include/villas/signal.h b/include/villas/signal.h index 09487bda7..590f5932a 100644 --- a/include/villas/signal.h +++ b/include/villas/signal.h @@ -33,16 +33,22 @@ extern "C" { struct list; struct node; +enum signal_format { + SIGNAL_FORMAT_FLOAT = 0, + SIGNAL_FORMAT_INT = 1, + SIGNAL_FORMAT_BOOL = 2, + SIGNAL_FORMAT_UNKNOWN = -1 +}; + struct signal { char *name; /**< The name of the signal. */ char *unit; int enabled; - enum { - SIGNAL_FORMAT_INTEGER, - SIGNAL_FORMAT_REAL - } format; + enum signal_format format; }; +int signal_init(struct signal *s); + int signal_destroy(struct signal *s); int signal_parse(struct signal *s, json_t *cfg); diff --git a/lib/signal.c b/lib/signal.c index cf3dbcf1e..52829be11 100644 --- a/lib/signal.c +++ b/lib/signal.c @@ -27,6 +27,13 @@ #include "villas/utils.h" #include "villas/node.h" +int signal_init(struct signal *s) +{ + s->format = SIGNAL_FORMAT_UNKNOWN; + + return 0; +} + int signal_destroy(struct signal *s) { if (s->name)