1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

added new 'msgsize' option to path (not yet used)

This commit is contained in:
Steffen Vogel 2015-10-09 13:06:59 +02:00
parent d6cc209a79
commit 9b5cf26bac
3 changed files with 5 additions and 1 deletions

View file

@ -47,6 +47,8 @@ struct path
/** Send messages with a fixed rate over this path */
double rate;
/** Maximum number of values per message for this path */
int msgsize;
/** Size of the history buffer in number of messages */
int poolsize;
/** A circular buffer of past messages */

View file

@ -134,6 +134,8 @@ int config_parse_path(config_setting_t *cfg,
p->rate = 0; /* disabled */
if (!config_setting_lookup_int(cfg, "poolsize", &p->poolsize))
p->poolsize = DEFAULT_POOLSIZE;
if (!config_setting_lookup_int(cfg, "msgsize", &p->msgsize))
p->msgsize = MAX_VALUES;
p->cfg = cfg;

View file

@ -122,7 +122,7 @@ static void * path_run(void *arg)
int path_start(struct path *p)
{ INDENT
char *buf = path_print(p);
info("Starting path: %s (poolsize = %u)", buf, p->poolsize);
info("Starting path: %s (poolsize = %u, msgsize = %u, #hooks = %zu)", buf, p->poolsize, p->msgsize, list_length(&p->hooks));
free(buf);
if (path_run_hook(p, HOOK_PATH_START))