From 3bab0c9c063fb933e212d8a46954473949c2448e Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 8 Mar 2019 15:21:01 +0100 Subject: [PATCH] node, path: add getters for signals --- include/villas/node.h | 1 + include/villas/path.h | 2 ++ lib/node.c | 5 +++++ lib/path.c | 5 +++++ 4 files changed, 13 insertions(+) diff --git a/include/villas/node.h b/include/villas/node.h index 2b2f7fb08..0275343d5 100644 --- a/include/villas/node.h +++ b/include/villas/node.h @@ -202,6 +202,7 @@ bool node_is_valid_name(const char *name); bool node_is_enabled(const struct node *n); +struct vlist * node_get_signals(struct node *n, enum node_dir dir); #ifdef __cplusplus } diff --git a/include/villas/path.h b/include/villas/path.h index 0eaaf4b99..e899fe036 100644 --- a/include/villas/path.h +++ b/include/villas/path.h @@ -163,6 +163,8 @@ bool path_is_enabled(const struct path *p); bool path_is_reversed(const struct path *p); +struct vlist * path_get_signals(struct path *p); + /** @} */ #ifdef __cplusplus diff --git a/lib/node.c b/lib/node.c index a2248a843..8a38ff267 100644 --- a/lib/node.c +++ b/lib/node.c @@ -613,4 +613,9 @@ bool node_is_enabled(const struct node *n) return n->enabled; } +struct vlist * node_get_signals(struct node *n, enum node_dir dir) +{ + struct node_direction *nd = dir == NODE_DIR_IN ? &n->in : &n->out; + + return node_direction_get_signals(nd); } diff --git a/lib/path.c b/lib/path.c index 22b12f4c5..177573529 100644 --- a/lib/path.c +++ b/lib/path.c @@ -754,3 +754,8 @@ bool path_is_reversed(const struct path *p) { return p->reverse; } + +struct vlist * path_get_signals(struct path *p) +{ + return &p->signals; +}