Statistics
| Branch: | Revision:

urtware / doc / activitydiagrams / node / urtNodeInit.uml @ 17d978fe

History | View | Annotate | Download (3.178 KB)

1 ee83a495 Thomas Schöpping
/'
2
µRtWare is a lightweight publish/subscribe middleware for real-time
3
applications. It was developed as part of the software habitat for the
4
Autonomous Mini Robot [1] (AMiRo) but can be used for other purposes as well.
5
6
Copyright (C) 2018..2020  Thomas Schöpping et al.
7
8
This program is free software: you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation, either version 3 of the License, or
11
(at your option) any later version.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License for more details.
17
18
You should have received a copy of the GNU General Public License
19
along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
'/
21
22
/'### INTRO ##################################################################'/
23
24
@startuml
25
26
title **µRtWare**\nurtNodeInit()\n
27
28
/'### PARAMETERS & RETURN ####################################################'/
29
30
note
31
  -- **node** : urt_node_t* --
32
  The node to initialize.
33
  Must not be ""NULL"".
34
  -- **thread** : urt_osThread_t* --
35
  The already initialized, exclusive thread for the node.
36
  Must not be ""NULL"".
37
  -- **setupcallback** : urt_nodeSetupCallback_t* --
38
  Callback function to be executed during setup.
39 dd31cb03 Thomas Schöpping
  May be ""NULL"" if no custom setup is required.
40 ee83a495 Thomas Schöpping
  --  **setupparams** : void*--
41 dd31cb03 Thomas Schöpping
  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 ee83a495 Thomas Schöpping
  -- **loopcallback** : urt_nodeLoopCallback_t* --
45
  Callback function to be executed in a loop.
46
  Must not be ""NULL"".
47
  -- **loopparams** : void* --
48 dd31cb03 Thomas Schöpping
  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.
57 ee83a495 Thomas Schöpping
  ====
58 dd31cb03 Thomas Schöpping
  -- **return** : void --
59 ee83a495 Thomas Schöpping
endnote
60
61
/'### PROCEDURE ##############################################################'/
62
63
start
64
:initialize members;
65
note
66 dd31cb03 Thomas Schöpping
  * **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**)
76 ee83a495 Thomas Schöpping
  .. URT_CFG_PUBSUB_PROFILING == true || URT_CFG_RPC_PROFILING = true ..
77 dd31cb03 Thomas Schöpping
  * **loops** ← 0
78 ee83a495 Thomas Schöpping
endnote
79
:lock core;
80 dd31cb03 Thomas Schöpping
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
}
87 ee83a495 Thomas Schöpping
:unlock core;
88
stop
89
90
/'### OUTRO ##################################################################'/
91
92
@enduml