Revision 1f7ffcff src/urt_node.c
src/urt_node.c | ||
---|---|---|
46 | 46 |
/******************************************************************************/ |
47 | 47 |
|
48 | 48 |
/** |
49 |
* @brief Initalize the node.
|
|
49 |
* @brief Initalize the node. |
|
50 | 50 |
* |
51 | 51 |
* @param[in] node The node to initialize. Must not be NULL. |
52 | 52 |
* @param[in] thread The already initialized, exclusive thread for the node. Must not be NULL. |
53 | 53 |
* @param[in] setupcallback Callback function to be executed during setup. |
54 | 54 |
* May be NULL if no custom setup is required. |
55 | 55 |
* @param[in] setupparams Parameters for the setup callback function. |
56 |
* Must be NULLif no setup callback is specified. |
|
57 |
* May be NULLif the specified setup callback does not expect parameters. |
|
56 |
* Must be NULL if no setup callback is specified.
|
|
57 |
* May be NULL if the specified setup callback does not expect parameters.
|
|
58 | 58 |
* @param[in] loopcallback Callback function to be executed in a loop. |
59 | 59 |
* Must not be NULL. |
60 | 60 |
* @param[in] loopparams Parameters for the loop callback function. |
... | ... | |
67 | 67 |
*/ |
68 | 68 |
void urtNodeInit(urt_node_t* node, urt_osThread_t* thread, urt_nodeSetupCallback_t* setupcallback, |
69 | 69 |
void* setupparams, urt_nodeLoopCallback_t* loopcallback, void* loopparams, |
70 |
urt_nodeShutdownCallback_t* shutdowncallback, void* shutdownparams) {return;} |
|
70 |
urt_nodeShutdownCallback_t* shutdowncallback, void* shutdownparams) |
|
71 |
{ |
|
72 |
urt_node_t.next = NULL; |
|
73 |
urt_node_t.thread = thread; |
|
74 |
urt_node_t.setupcallback = setupcallback; |
|
75 |
urt_node_t.setupparams = setupparams; |
|
76 |
urt_node_t.loopparams = loopparams; |
|
77 |
urt_node_t.shutdowncallback = loopcallback; |
|
78 |
urt_node_t.shutdownparams = loopparams; |
|
79 |
urt_node_t.stage = 0; |
|
80 |
// add later: urteventlistenerinit |
|
81 |
#if (URT_CFG_PUBSUB_PROFILING || URT_CFG_RPC_PROFILING) |
|
82 |
urt_node_t.loops = 0; |
|
83 |
#endif /* URT_CFG_PUBSUB_PROFILING || URT_CFG_RPC_PROFILING */ |
|
84 |
// add later: lock core,.. |
|
85 |
return; |
|
86 |
} |
Also available in: Unified diff