mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
refactoring: node_type_{init, deinit}() => node_type_{start, stop}()
This commit is contained in:
parent
f00d332bf2
commit
c84bfbcc7c
4 changed files with 8 additions and 8 deletions
|
@ -137,12 +137,12 @@ struct node_type {
|
|||
*
|
||||
* @see node_type::init
|
||||
*/
|
||||
int node_type_init(struct node_type *vt, int argc, char *argv[], config_setting_t *cfg);
|
||||
int node_type_start(struct node_type *vt, int argc, char *argv[], config_setting_t *cfg);
|
||||
|
||||
/** De-initialize node type subsystems.
|
||||
*
|
||||
* @see node_type::deinit
|
||||
*/
|
||||
int node_type_deinit(struct node_type *vt);
|
||||
int node_type_stop(struct node_type *vt);
|
||||
|
||||
/** @} */
|
|
@ -14,7 +14,7 @@
|
|||
#include "config.h"
|
||||
#include "plugin.h"
|
||||
|
||||
int node_type_init(struct node_type *vt, int argc, char *argv[], config_setting_t *cfg)
|
||||
int node_type_start(struct node_type *vt, int argc, char *argv[], config_setting_t *cfg)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -32,7 +32,7 @@ int node_type_init(struct node_type *vt, int argc, char *argv[], config_setting_
|
|||
return ret;
|
||||
}
|
||||
|
||||
int node_type_deinit(struct node_type *vt)
|
||||
int node_type_stop(struct node_type *vt)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ static void quit(int signal, siginfo_t *sinfo, void *ctx)
|
|||
}
|
||||
|
||||
node_stop(node);
|
||||
node_type_deinit(node->_vt);
|
||||
node_type_stop(node->_vt);
|
||||
|
||||
cfg_destroy(&cfg);
|
||||
|
||||
|
@ -215,7 +215,7 @@ int main(int argc, char *argv[])
|
|||
if (reverse)
|
||||
node_reverse(node);
|
||||
|
||||
ret = node_type_init(node->_vt, argc-optind, argv+optind, config_root_setting(&cfg.cfg));
|
||||
ret = node_type_start(node->_vt, argc-optind, argv+optind, config_root_setting(&cfg.cfg));
|
||||
if (ret)
|
||||
error("Failed to intialize node type: %s", node_name(node));
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ int main(int argc, char *argv[])
|
|||
if (!node)
|
||||
error("There's no node with the name '%s'", argv[3]);
|
||||
|
||||
node_type_init(node->_vt, argc-3, argv+3, config_root_setting(&cfg.cfg));
|
||||
node_type_start(node->_vt, argc-3, argv+3, config_root_setting(&cfg.cfg));
|
||||
node_start(node);
|
||||
|
||||
/* Parse Arguments */
|
||||
|
@ -117,7 +117,7 @@ check: if (optarg == endptr)
|
|||
error("Unknown test: '%s'", argv[2]);
|
||||
|
||||
node_stop(node);
|
||||
node_type_deinit(node->_vt);
|
||||
node_type_stop(node->_vt);
|
||||
|
||||
cfg_destroy(&cfg);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue