mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
rename setting 'no_builtin' to 'builtin' to avoid double negation
This commit is contained in:
parent
085ded810a
commit
4f1aab1da8
5 changed files with 14 additions and 7 deletions
|
@ -40,6 +40,9 @@ nodes = {
|
|||
type = "socket", # For a list of available node-types run: 'villas-node -h'
|
||||
vectorize = 30, # Receive and sent 30 samples per message (combining).
|
||||
samplelen = 10 # The maximum number of samples this node can receive
|
||||
|
||||
builtin = false, # By default, all nodes will have a few builtin hooks attached to them.
|
||||
# When collecting statistics or measurements these are undesired.
|
||||
|
||||
hooks = (
|
||||
{
|
||||
|
@ -369,6 +372,9 @@ paths = (
|
|||
in = "socket_node",
|
||||
out = "file_node", # This path includes all available example hooks.
|
||||
|
||||
builtin = false, # By default, all paths will have a few builtin hooks attached to them.
|
||||
# When collecting statistics or measurements these are undesired.
|
||||
|
||||
# A complete list of supported hooks
|
||||
|
||||
hooks = (
|
||||
|
|
|
@ -49,7 +49,7 @@ struct node
|
|||
char *_name; /**< Singleton: A string used to print to screen. */
|
||||
char *_name_long; /**< Singleton: A string used to print to screen. */
|
||||
|
||||
int no_builtin;
|
||||
int builtin; /**< This node should use built-in hooks by default. */
|
||||
int vectorize; /**< Number of messages to send / recv at once (scatter / gather) */
|
||||
int affinity; /**< CPU Affinity of this node */
|
||||
int samplelen; /**< The maximum number of values this node can receive. */
|
||||
|
|
|
@ -91,7 +91,7 @@ struct path {
|
|||
double rate; /**< A timeout for */
|
||||
int enabled; /**< Is this path enabled. */
|
||||
int reverse; /**< This path as a matching reverse path. */
|
||||
int no_builtin; /**< This path should not use built-in hooks by default. */
|
||||
int builtin; /**< This path should use built-in hooks by default. */
|
||||
int queuelen; /**< The queue length for each path_destination::queue */
|
||||
int samplelen; /**< Will be calculated based on path::sources.mappings */
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ int node_init(struct node *n, struct node_type *vt)
|
|||
|
||||
/* Default values */
|
||||
n->vectorize = 1;
|
||||
n->no_builtin = 0;
|
||||
n->builtin = 1;
|
||||
n->samplelen = DEFAULT_SAMPLELEN;
|
||||
|
||||
list_push(&vt->instances, n);
|
||||
|
@ -60,7 +60,7 @@ int node_init(struct node *n, struct node_type *vt)
|
|||
#ifdef WITH_HOOKS
|
||||
/* Add internal hooks if they are not already in the list */
|
||||
list_init(&n->hooks);
|
||||
if (!n->no_builtin) {
|
||||
if (n->builtin) {
|
||||
int ret;
|
||||
for (size_t i = 0; i < list_length(&plugins); i++) {
|
||||
struct plugin *q = (struct plugin *) list_at(&plugins, i);
|
||||
|
@ -117,7 +117,7 @@ int node_parse(struct node *n, json_t *cfg, const char *name)
|
|||
"vectorize", &n->vectorize,
|
||||
"samplelen", &n->samplelen,
|
||||
"hooks", &json_hooks,
|
||||
"no_builtin", &n->no_builtin,
|
||||
"builtin", &n->builtin,
|
||||
"signals", &json_signals
|
||||
);
|
||||
if (ret)
|
||||
|
|
|
@ -250,6 +250,7 @@ int path_init(struct path *p)
|
|||
p->mode = PATH_MODE_ANY;
|
||||
p->rate = 0; /* Disabled */
|
||||
|
||||
p->builtin = 1;
|
||||
p->reverse = 0;
|
||||
p->enabled = 1;
|
||||
p->queuelen = DEFAULT_QUEUELEN;
|
||||
|
@ -257,7 +258,7 @@ int path_init(struct path *p)
|
|||
#ifdef WITH_HOOKS
|
||||
/* Add internal hooks if they are not already in the list */
|
||||
list_init(&p->hooks);
|
||||
if (!p->no_builtin) {
|
||||
if (p->builtin) {
|
||||
int ret;
|
||||
|
||||
for (size_t i = 0; i < list_length(&plugins); i++) {
|
||||
|
@ -403,7 +404,7 @@ int path_parse(struct path *p, json_t *cfg, struct list *nodes)
|
|||
"hooks", &json_hooks,
|
||||
"reverse", &p->reverse,
|
||||
"enabled", &p->enabled,
|
||||
"no_builtin", &p->no_builtin,
|
||||
"builtin", &p->builtin,
|
||||
"queuelen", &p->queuelen,
|
||||
"mode", &mode,
|
||||
"rate", &p->rate,
|
||||
|
|
Loading…
Add table
Reference in a new issue