From 9116fda00b57f4fd19cf7a1d90b5353938b08ad9 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 16 Jul 2018 08:29:10 +0200 Subject: [PATCH] add node_type() function to get pointer to node_type of a node instance --- include/villas/node.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/villas/node.h b/include/villas/node.h index 6f5503c92..2c65558d9 100644 --- a/include/villas/node.h +++ b/include/villas/node.h @@ -160,6 +160,13 @@ int node_write(struct node *n, struct sample *smps[], unsigned cnt, unsigned *re int node_fd(struct node *n); +struct node_type * node_type(struct node *n); +{ + assert(n->type == STATE_INITIALIZED); + + return n->_vt; +} + struct memory_type * node_memory_type(struct node *n, struct memory_type *parent); #ifdef __cplusplus