Statistics
| Branch: | Revision:

urtware / doc / activitydiagrams / node / urtNodeInit.uml @ e48e1ccf

History | View | Annotate | Download (2.65 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
  May be ""NULL"" if no setup is required.
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.
44
  -- **loopcallback** : urt_nodeLoopCallback_t* --
45
  Callback function to be executed in a loop.
46
  Must not be ""NULL"".
47
  -- **loopparams** : void* --
48
  Optional parameters for the loop callback function.
49
  May be ""NULL"" if the specified callback does not expect parameters.
50
  ====
51
  -- **return** : urt_status_t --
52
  Always returns ""URT_STATUS_OK"".
53
endnote
54
55
/'### PROCEDURE ##############################################################'/
56
57
start
58
:initialize members;
59
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**)
68
  .. URT_CFG_PUBSUB_PROFILING == true || URT_CFG_RPC_PROFILING = true ..
69
  **loops** ← 0
70
endnote
71
:lock core;
72 e48e1ccf Thomas Schöpping
:prepend self to core's list of nodes;
73 ee83a495 Thomas Schöpping
note
74
  List is not ordered.
75
endnote
76
:unlock core;
77
stop
78
note
79
  Returns ""URT_STATUS_OK"".
80
endnote
81
82
/'### OUTRO ##################################################################'/
83
84
@enduml