mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
whitespace and documentation fixes
This commit is contained in:
parent
9836bc0296
commit
af99a50786
3 changed files with 7 additions and 6 deletions
|
@ -70,9 +70,11 @@ int hook_parse(struct hook *h, json_t *cfg);
|
|||
int hook_destroy(struct hook *h);
|
||||
|
||||
int hook_start(struct hook *h);
|
||||
|
||||
int hook_stop(struct hook *h);
|
||||
|
||||
int hook_periodic(struct hook *h);
|
||||
|
||||
int hook_restart(struct hook *h);
|
||||
|
||||
int hook_process(struct hook *h, struct sample *smps[], unsigned *cnt);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** Hook funktions
|
||||
*
|
||||
* Every path can register a hook function which is called for every received
|
||||
* Every path or node can register a hook function which is called for every received
|
||||
* message. This can be used to debug the data flow, get statistics
|
||||
* or alter the message.
|
||||
*
|
||||
|
@ -62,11 +62,11 @@ struct hook_type {
|
|||
|
||||
int (*parse)(struct hook *h, json_t *cfg);
|
||||
|
||||
int (*init)(struct hook *h); /**< Called before path is started to parsed. */
|
||||
int (*init)(struct hook *h); /**< Called before hook is started to parsed. */
|
||||
int (*destroy)(struct hook *h); /**< Called after path has been stopped to release memory allocated by HOOK_INIT */
|
||||
|
||||
int (*start)(struct hook *h); /**< Called whenever a path is started; before threads are created. */
|
||||
int (*stop)(struct hook *h); /**< Called whenever a path is stopped; after threads are destoyed. */
|
||||
int (*start)(struct hook *h); /**< Called whenever a hook is started; before threads are created. */
|
||||
int (*stop)(struct hook *h); /**< Called whenever a hook is stopped; after threads are destoyed. */
|
||||
|
||||
int (*periodic)(struct hook *h);/**< Called periodically. Period is set by global 'stats' option in the configuration file. */
|
||||
int (*restart)(struct hook *h); /**< Called whenever a new simulation case is started. This is detected by a sequence no equal to zero. */
|
||||
|
|
|
@ -331,9 +331,8 @@ int node_restart(struct node *n)
|
|||
|
||||
info("Restarting node %s", node_name(n));
|
||||
|
||||
if (node_type(n)->restart) {
|
||||
if (node_type(n)->restart)
|
||||
ret = node_type(n)->restart(n);
|
||||
}
|
||||
else {
|
||||
ret = node_type(n)->stop ? node_type(n)->stop(n) : 0;
|
||||
if (ret)
|
||||
|
|
Loading…
Add table
Reference in a new issue