diff --git a/include/villas/nodes/example.hpp b/include/villas/nodes/example.hpp index c192aa766..658ff2016 100644 --- a/include/villas/nodes/example.hpp +++ b/include/villas/nodes/example.hpp @@ -75,6 +75,12 @@ int example_start(struct node *n); /** @see node_type::close */ int example_stop(struct node *n); +/** @see node_type::pause */ +int example_pause(struct node *n); + +/** @see node_type::resume */ +int example_resume(struct node *n); + /** @see node_type::write */ int example_write(struct node *n, struct sample *smps[], unsigned cnt, unsigned *release); diff --git a/lib/nodes/example.cpp b/lib/nodes/example.cpp index b03193669..51fc21a29 100644 --- a/lib/nodes/example.cpp +++ b/lib/nodes/example.cpp @@ -89,7 +89,6 @@ int example_parse(struct node *n, json_t *cfg) return 0; } -/** This output will be used by VILLASnode to show debug information during the initialization. */ char * example_print(struct node *n) { struct example *s = (struct example *) n->_vd; @@ -148,6 +147,24 @@ int example_stop(struct node *n) return 0; } +int example_pause(struct node *n) +{ + //struct example *s = (struct example *) n->_vd; + + /* TODO: Add implementation here. */ + + return 0; +} + +int example_resume(struct node *n) +{ + //struct example *s = (struct example *) n->_vd; + + /* TODO: Add implementation here. */ + + return 0; +} + int example_read(struct node *n, struct sample *smps[], unsigned cnt, unsigned *release) { int read; @@ -227,6 +244,8 @@ static void register_plugin() { p.node.check = example_check; p.node.start = example_start; p.node.stop = example_stop; + p.node.pause = example_pause; + p.node.resume = example_resume; p.node.read = example_read; p.node.write = example_write; p.node.reverse = example_reverse;