drake  1.0.0
include/drake/node.h File Reference
#include <stddef.h>
#include <pelib/template.h>
#include <drake/task.h>
Include dependency graph for node.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define drake_init(name, id)   PELIB_CONCAT_3(name,_init_,id)
#define drake_start(name, id)   PELIB_CONCAT_3(name,_start_,id)
#define drake_run(name, id)   PELIB_CONCAT_3(name,_run_,id)
#define drake_kill(name, id)   PELIB_CONCAT_3(name,_kill_,id)
#define drake_destroy(name, id)   PELIB_CONCAT_3(name,_destroy_,id)

Functions

int drake_init (TASK_MODULE, TASK_NAME)(task_t *
int drake_start (TASK_MODULE, TASK_NAME)(task_t *)
int drake_run (TASK_MODULE, TASK_NAME)(task_t *)
int drake_kill (TASK_MODULE, TASK_NAME)(task_t *)
int drake_destroy (TASK_MODULE, TASK_NAME)(task_t *)

Variables

int void * aux

Define Documentation

#define drake_destroy (   name,
  id 
)    PELIB_CONCAT_3(name,_destroy_,id)

Definition at line 71 of file node.h.

#define drake_init (   name,
  id 
)    PELIB_CONCAT_3(name,_init_,id)

Definition at line 67 of file node.h.

#define drake_kill (   name,
  id 
)    PELIB_CONCAT_3(name,_kill_,id)

Definition at line 70 of file node.h.

#define drake_run (   name,
  id 
)    PELIB_CONCAT_3(name,_run_,id)

Definition at line 69 of file node.h.

#define drake_start (   name,
  id 
)    PELIB_CONCAT_3(name,_start_,id)

Definition at line 68 of file node.h.


Function Documentation

int drake_destroy ( TASK_MODULE  ,
TASK_NAME   
)

Finalize the work of a task, deallocate optional memory allocated at initialization. Function prototype as viewed from the module compiler

Parameters:
taskTask being destroyed
Returns:
0 if the function encountered an error
int drake_init ( TASK_MODULE  ,
TASK_NAME   
)

Task initialization function (as viewed from the module compiler), suitable for optional memory allocation or other slow, but unique operations. Runs before the corresponding stream begins to run

Parameters:
taskTask being initialized @ return 0 if there was an error in initialization
int drake_kill ( TASK_MODULE  ,
TASK_NAME   
)

Runs after a task stops working, before the corresponding stream stops. Function prototype as viewed from the module compiler

Parameters:
taskTask being killed
Returns:
0 if the function encountered an error
int drake_run ( TASK_MODULE  ,
TASK_NAME   
)

Main work function of a task (as viewed from the module compiler)

Parameters:
taskTask at work
Returns:
0 if the task must perform more work
int drake_start ( TASK_MODULE  ,
TASK_NAME   
)

Task first work function (as viewed from the module compiler). Runs after the corresponding stream started to run

Parameters:
taskTask that begins to work @ return 0 if start function must run again before running the main work function

Variable Documentation

int void* aux

Definition at line 77 of file node.h.