mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
node: indicate which callback are optional
This commit is contained in:
parent
6a2fa4e590
commit
d3949d62ce
1 changed files with 21 additions and 2 deletions
|
@ -61,6 +61,7 @@ struct node_type {
|
|||
/** Global initialization per node type.
|
||||
*
|
||||
* This callback is invoked once per node-type.
|
||||
* This callback is optional.
|
||||
*
|
||||
* @retval 0 Success. Everything went well.
|
||||
* @retval <0 Error. Something went wrong.
|
||||
|
@ -70,6 +71,7 @@ struct node_type {
|
|||
/** Global de-initialization per node type.
|
||||
*
|
||||
* This callback is invoked once per node-type.
|
||||
* This callback is optional.
|
||||
*
|
||||
* @retval 0 Success. Everything went well.
|
||||
* @retval <0 Error. Something went wrong.
|
||||
|
@ -106,6 +108,8 @@ struct node_type {
|
|||
int (*parse)(struct node *n, json_t *cfg);
|
||||
|
||||
/** Check the current node configuration for plausability and errors.
|
||||
*
|
||||
* This callback is optional.
|
||||
*
|
||||
* @param n A pointer to the node object.
|
||||
* @retval 0 Success. Node configuration is good.
|
||||
|
@ -129,6 +133,8 @@ struct node_type {
|
|||
int (*start)(struct node *n);
|
||||
|
||||
/** Restart this node.
|
||||
*
|
||||
* This callback is optional.
|
||||
*
|
||||
* @param n A pointer to the node object.
|
||||
* @retval 0 Success. Everything went well.
|
||||
|
@ -145,6 +151,8 @@ struct node_type {
|
|||
int (*stop)(struct node *n);
|
||||
|
||||
/** Pause this node.
|
||||
*
|
||||
* This callback is optional.
|
||||
*
|
||||
* @param n A pointer to the node object.
|
||||
* @retval 0 Success. Everything went well.
|
||||
|
@ -153,6 +161,8 @@ struct node_type {
|
|||
int (*pause)(struct node *n);
|
||||
|
||||
/** Resume this node.
|
||||
*
|
||||
* This callback is optional.
|
||||
*
|
||||
* @param n A pointer to the node object.
|
||||
* @retval 0 Success. Everything went well.
|
||||
|
@ -161,6 +171,8 @@ struct node_type {
|
|||
int (*resume)(struct node *n);
|
||||
|
||||
/** Receive multiple messages at once.
|
||||
*
|
||||
* This callback is optional.
|
||||
*
|
||||
* Messages are received with a single recvmsg() syscall by
|
||||
* using gathering techniques (struct iovec).
|
||||
|
@ -177,6 +189,8 @@ struct node_type {
|
|||
int (*read)(struct node *n, struct sample *smps[], unsigned cnt, unsigned *release);
|
||||
|
||||
/** Send multiple messages in a single datagram / packet.
|
||||
*
|
||||
* This callback is optional.
|
||||
*
|
||||
* Messages are sent with a single sendmsg() syscall by
|
||||
* using gathering techniques (struct iovec).
|
||||
|
@ -193,13 +207,18 @@ struct node_type {
|
|||
|
||||
/** Reverse source and destination of a node.
|
||||
*
|
||||
* This is not supported by all node-types!
|
||||
* This callback is optional.
|
||||
*
|
||||
* @param n A pointer to the node object.
|
||||
*/
|
||||
int (*reverse)(struct node *n);
|
||||
|
||||
/** Return a file descriptor which can be used by poll / select to detect the availability of new data. */
|
||||
/** Return a file descriptor which can be used by poll / select to detect the availability of new data.
|
||||
*
|
||||
* This callback is optional.
|
||||
*
|
||||
* @return This file descriptor.
|
||||
*/
|
||||
int (*fd)(struct node *n);
|
||||
|
||||
/** Return a memory allocator which should be used for sample pools passed to this node. */
|
||||
|
|
Loading…
Add table
Reference in a new issue