diff --git a/include/villas/node_type.h b/include/villas/node_type.h index 94d23072b..692222a53 100644 --- a/include/villas/node_type.h +++ b/include/villas/node_type.h @@ -79,21 +79,21 @@ struct node_type { */ char * (*print)(struct node *n); - /** Opens the connection to this node. + /** Start this node. * * @param n A pointer to the node object. * @retval 0 Success. Everything went well. * @retval <0 Error. Something went wrong. */ - int (*open) (struct node *n); + int (*start) (struct node *n); - /** Close the connection to this node. + /** Stop this node. * * @param n A pointer to the node object. * @retval 0 Success. Everything went well. * @retval <0 Error. Something went wrong. */ - int (*close)(struct node *n); + int (*stop)(struct node *n); /** Receive multiple messages at once. * diff --git a/include/villas/nodes/file.h b/include/villas/nodes/file.h index aaa53a884..d8355421b 100644 --- a/include/villas/nodes/file.h +++ b/include/villas/nodes/file.h @@ -60,10 +60,10 @@ char * file_print(struct node *n); int file_parse(struct node *n, config_setting_t *cfg); /** @see node_vtable::open */ -int file_open(struct node *n); +int file_start(struct node *n); /** @see node_vtable::close */ -int file_close(struct node *n); +int file_stop(struct node *n); /** @see node_vtable::read */ int file_read(struct node *n, struct sample *smps[], unsigned cnt); diff --git a/include/villas/nodes/fpga.h b/include/villas/nodes/fpga.h index 89d5c0ed5..c8846ed57 100644 --- a/include/villas/nodes/fpga.h +++ b/include/villas/nodes/fpga.h @@ -58,10 +58,10 @@ struct fpga_card * fpga_lookup_card(const char *name); char * fpga_print(struct node *n); /** @see node_vtable::open */ -int fpga_open(struct node *n); +int fpga_start(struct node *n); /** @see node_vtable::close */ -int fpga_close(struct node *n); +int fpga_stop(struct node *n); /** @see node_vtable::read */ int fpga_read(struct node *n, struct sample *smps[], unsigned cnt); diff --git a/include/villas/nodes/ngsi.h b/include/villas/nodes/ngsi.h index ad1ddd489..d518e0025 100644 --- a/include/villas/nodes/ngsi.h +++ b/include/villas/nodes/ngsi.h @@ -68,10 +68,10 @@ int ngsi_parse(struct node *n, config_setting_t *cfg); char * ngsi_print(struct node *n); /** @see node_vtable::open */ -int ngsi_open(struct node *n); +int ngsi_start(struct node *n); /** @see node_vtable::close */ -int ngsi_close(struct node *n); +int ngsi_stop(struct node *n); /** @see node_vtable::read */ int ngsi_read(struct node *n, struct sample *smps[], unsigned cnt); diff --git a/include/villas/nodes/opal.h b/include/villas/nodes/opal.h index 21a8afa92..4b07fb0d1 100644 --- a/include/villas/nodes/opal.h +++ b/include/villas/nodes/opal.h @@ -60,10 +60,10 @@ char * opal_print(struct node *n); int opal_print_global(); /** @see node_vtable::open */ -int opal_open(struct node *n); +int opal_start(struct node *n); /** @see node_vtable::close */ -int opal_close(struct node *n); +int opal_stop(struct node *n); /** @see node_vtable::read */ int opal_read(struct node *n, struct sample *smps[], unsigned cnt); diff --git a/include/villas/nodes/socket.h b/include/villas/nodes/socket.h index 9a8f228b4..cc1db7628 100644 --- a/include/villas/nodes/socket.h +++ b/include/villas/nodes/socket.h @@ -64,10 +64,10 @@ int socket_init(int argc, char *argv[], config_setting_t *cfg); int socket_deinit(); /** @see node_vtable::open */ -int socket_open(struct node *n); +int socket_start(struct node *n); /** @see node_vtable::close */ -int socket_close(struct node *n); +int socket_stop(struct node *n); /** @see node_vtable::write */ int socket_write(struct node *n, struct sample *smps[], unsigned cnt); diff --git a/include/villas/nodes/websocket.h b/include/villas/nodes/websocket.h index 8415ec47d..93ddce3c2 100644 --- a/include/villas/nodes/websocket.h +++ b/include/villas/nodes/websocket.h @@ -68,10 +68,10 @@ int websocket_init(int argc, char * argv[], config_setting_t *cfg); int websocket_deinit(); /** @see node_vtable::open */ -int websocket_open(struct node *n); +int websocket_start(struct node *n); /** @see node_vtable::close */ -int websocket_close(struct node *n); +int websocket_stop(struct node *n); /** @see node_vtable::close */ int websocket_destroy(struct node *n); diff --git a/lib/nodes/cbuilder.c b/lib/nodes/cbuilder.c index 98d70ec5c..3447c6211 100644 --- a/lib/nodes/cbuilder.c +++ b/lib/nodes/cbuilder.c @@ -42,7 +42,7 @@ int cbuilder_parse(struct node *n, config_setting_t *cfg) return 0; } -int cbuilder_open(struct node *n) +int cbuilder_start(struct node *n) { int ret; struct cbuilder *cb = n->_vd; @@ -64,7 +64,7 @@ int cbuilder_open(struct node *n) return 0; } -int cbuilder_close(struct node *n) +int cbuilder_stop(struct node *n) { struct cbuilder *cb = n->_vd; @@ -120,8 +120,8 @@ static struct plugin p = { .vectorize = 1, .size = sizeof(struct cbuilder), .parse = cbuilder_parse, - .open = cbuilder_open, - .close = cbuilder_close, + .start = cbuilder_start, + .stop = cbuilder_stop, .read = cbuilder_read, .write = cbuilder_write } diff --git a/lib/nodes/file.c b/lib/nodes/file.c index b8ea1262b..ad5a4f000 100644 --- a/lib/nodes/file.c +++ b/lib/nodes/file.c @@ -178,7 +178,7 @@ char * file_print(struct node *n) return buf; } -int file_open(struct node *n) +int file_start(struct node *n) { struct file *f = n->_vd; @@ -248,7 +248,7 @@ int file_open(struct node *n) return 0; } -int file_close(struct node *n) +int file_stop(struct node *n) { struct file *f = n->_vd; @@ -345,8 +345,8 @@ static struct plugin p = { .reverse = file_reverse, .parse = file_parse, .print = file_print, - .open = file_open, - .close = file_close, + .start = file_start, + .stop = file_stop, .read = file_read, .write = file_write, } diff --git a/lib/nodes/fpga.c b/lib/nodes/fpga.c index 7928e99c8..6d931b36f 100644 --- a/lib/nodes/fpga.c +++ b/lib/nodes/fpga.c @@ -158,7 +158,7 @@ int fpga_get_type(struct fpga_ip *c) return -1; } -int fpga_open(struct node *n) +int fpga_start(struct node *n) { int ret; @@ -191,7 +191,7 @@ int fpga_open(struct node *n) return 0; } -int fpga_close(struct node *n) +int fpga_stop(struct node *n) { int ret; @@ -303,8 +303,8 @@ static struct plugin p = { .vectorize = 1, .parse = fpga_parse, .print = fpga_print, - .open = fpga_open, - .close = fpga_close, + .start = fpga_start, + .stop = fpga_stop, .read = fpga_read, .write = fpga_write, .init = fpga_init, diff --git a/lib/nodes/ngsi.c b/lib/nodes/ngsi.c index e411d6736..a994a21d2 100644 --- a/lib/nodes/ngsi.c +++ b/lib/nodes/ngsi.c @@ -455,7 +455,7 @@ int ngsi_destroy(struct node *n) return 0; } -int ngsi_open(struct node *n) +int ngsi_start(struct node *n) { struct ngsi *i = n->_vd; int ret; @@ -497,7 +497,7 @@ int ngsi_open(struct node *n) return ret; } -int ngsi_close(struct node *n) +int ngsi_stop(struct node *n) { struct ngsi *i = n->_vd; int ret; @@ -563,8 +563,8 @@ static struct plugin p = { .size = sizeof(struct ngsi), .parse = ngsi_parse, .print = ngsi_print, - .open = ngsi_open, - .close = ngsi_close, + .start = ngsi_start, + .stop = ngsi_stop, .read = ngsi_read, .write = ngsi_write, .init = ngsi_init, diff --git a/lib/nodes/opal.c b/lib/nodes/opal.c index 3d39b29e6..a99c9c555 100644 --- a/lib/nodes/opal.c +++ b/lib/nodes/opal.c @@ -149,7 +149,7 @@ char * opal_print(struct node *n) o->send_id, o->recv_id, o->reply); } -int opal_open(struct node *n) +int opal_start(struct node *n) { struct opal *o = n->_vd; @@ -173,7 +173,7 @@ int opal_open(struct node *n) return 0; } -int opal_close(struct node *n) +int opal_stop(struct node *n) { return 0; } @@ -285,8 +285,8 @@ static struct plugin p = { .size = sizeof(struct opal), .parse = opal_parse, .print = opal_print, - .open = opal_open, - .close = opal_close, + .start = opal_start, + .stop = opal_stop, .read = opal_read, .write = opal_write, .init = opal_init, diff --git a/lib/nodes/socket.c b/lib/nodes/socket.c index baf688970..57bbcb219 100644 --- a/lib/nodes/socket.c +++ b/lib/nodes/socket.c @@ -127,7 +127,7 @@ char * socket_print(struct node *n) return buf; } -int socket_open(struct node *n) +int socket_start(struct node *n) { struct socket *s = n->_vd; struct sockaddr_in *sin = (struct sockaddr_in *) &s->local; @@ -196,7 +196,7 @@ int socket_reverse(struct node *n) return 0; } -int socket_close(struct node *n) +int socket_stop(struct node *n) { struct socket *s = n->_vd; @@ -680,8 +680,8 @@ static struct plugin p = { .reverse = socket_reverse, .parse = socket_parse, .print = socket_print, - .open = socket_open, - .close = socket_close, + .start = socket_start, + .stop = socket_stop, .read = socket_read, .write = socket_write, .init = socket_init, diff --git a/lib/nodes/websocket.c b/lib/nodes/websocket.c index 8fededa50..cabe6eb61 100644 --- a/lib/nodes/websocket.c +++ b/lib/nodes/websocket.c @@ -261,7 +261,7 @@ int websocket_protocol_cb(struct lws *wsi, enum lws_callback_reasons reason, voi } } -int websocket_open(struct node *n) +int websocket_start(struct node *n) { int ret; struct websocket *w = n->_vd; @@ -284,7 +284,7 @@ int websocket_open(struct node *n) return 0; } -int websocket_close(struct node *n) +int websocket_stop(struct node *n) { struct websocket *w = n->_vd; @@ -415,8 +415,8 @@ static struct plugin p = { .node = { .vectorize = 0, /* unlimited */ .size = sizeof(struct websocket), - .open = websocket_open, - .close = websocket_close, + .start = websocket_start, + .stop = websocket_stop, .destroy = websocket_destroy, .read = websocket_read, .write = websocket_write,