Revision dd31cb03 doc/activitydiagrams/node/urtNodeInit.uml
doc/activitydiagrams/node/urtNodeInit.uml | ||
---|---|---|
36 | 36 |
Must not be ""NULL"". |
37 | 37 |
-- **setupcallback** : urt_nodeSetupCallback_t* -- |
38 | 38 |
Callback function to be executed during setup. |
39 |
May be ""NULL"" if no setup is required. |
|
39 |
May be ""NULL"" if no custom setup is required.
|
|
40 | 40 |
-- **setupparams** : void*-- |
41 |
Optional parameters for the setup callback function.
|
|
42 |
Must be ""NULL"" if no callback is specified. |
|
43 |
May be ""NULL"" if the specified callback does not expect parameters. |
|
41 |
Parameters for the setup callback function.
|
|
42 |
Must be ""NULL"" if no setup callback is specified.
|
|
43 |
May be ""NULL"" if the specified setup callback does not expect parameters.
|
|
44 | 44 |
-- **loopcallback** : urt_nodeLoopCallback_t* -- |
45 | 45 |
Callback function to be executed in a loop. |
46 | 46 |
Must not be ""NULL"". |
47 | 47 |
-- **loopparams** : void* -- |
48 |
Optional parameters for the loop callback function. |
|
49 |
May be ""NULL"" if the specified callback does not expect parameters. |
|
48 |
Parameters for the loop callback function. |
|
49 |
May be ""NULL"" if the specified loop callback does not expect parameters. |
|
50 |
-- **shutdowncallback** : urt_nodeShutdownCallback_t* -- |
|
51 |
Callback function to be executed during shutdown. |
|
52 |
May be ""NULL"" if no custom shutdown is required. |
|
53 |
-- **shutdownparams** : void* -- |
|
54 |
Parameters for the loop callback function. |
|
55 |
Must be ""NULL"" if no shutdown callback is specified. |
|
56 |
May be ""NULL"" if the specified shutdown callback does not expect parameters. |
|
50 | 57 |
==== |
51 |
-- **return** : urt_status_t -- |
|
52 |
Always returns ""URT_STATUS_OK"". |
|
58 |
-- **return** : void -- |
|
53 | 59 |
endnote |
54 | 60 |
|
55 | 61 |
/'### PROCEDURE ##############################################################'/ |
... | ... | |
57 | 63 |
start |
58 | 64 |
:initialize members; |
59 | 65 |
note |
60 |
**next** ← ""NULL"" |
|
61 |
**thread** ← thread |
|
62 |
**setupcallback** ← setupcallback |
|
63 |
**setupparams** ← setupparams |
|
64 |
**loopcallback** ← loopcallback |
|
65 |
**loopparams** ← loopparams |
|
66 |
**stage** ← 0 |
|
67 |
urtEventListenerInit(**listener**) |
|
66 |
* **next** ← ""NULL"" |
|
67 |
* **thread** ← thread |
|
68 |
* **setupcallback** ← setupcallback |
|
69 |
* **setupparams** ← setupparams |
|
70 |
* **loopcallback** ← loopcallback |
|
71 |
* **loopparams** ← loopparams |
|
72 |
* **shutdowncallback** ← loopcallback |
|
73 |
* **shutdownparams** ← loopparams |
|
74 |
* **stage** ← 0 |
|
75 |
* urtEventListenerInit(**listener**) |
|
68 | 76 |
.. URT_CFG_PUBSUB_PROFILING == true || URT_CFG_RPC_PROFILING = true .. |
69 |
**loops** ← 0 |
|
77 |
* **loops** ← 0
|
|
70 | 78 |
endnote |
71 | 79 |
:lock core; |
72 |
:prepend self to core's list of nodes; |
|
73 |
note |
|
74 |
List is not ordered. |
|
75 |
endnote |
|
80 |
partition "prepend self to core's list of nodes" { |
|
81 |
fork |
|
82 |
:set this node's ""next"" pointer to the first node in the core's list of nodes; |
|
83 |
fork again |
|
84 |
:set core's node pointer to this node; |
|
85 |
endfork |
|
86 |
} |
|
76 | 87 |
:unlock core; |
77 | 88 |
stop |
78 |
note |
|
79 |
Returns ""URT_STATUS_OK"". |
|
80 |
endnote |
|
81 | 89 |
|
82 | 90 |
/'### OUTRO ##################################################################'/ |
83 | 91 |
|
Also available in: Unified diff