urtware / doc / classdiagrams / urtware.uml @ 4d55cea4
History | View | Annotate | Download (4.55 KB)
1 |
/' |
---|---|
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** |
27 |
|
28 |
!include ../functions.iuml |
29 |
|
30 |
/'### ENTITIES ###############################################################'/ |
31 |
|
32 |
!startsub ENTITIES |
33 |
|
34 |
/' uRtWare core structure. '/ |
35 |
$structure("urt_core_t") { |
36 |
'List of nodes ordered by their (initial) priority. |
37 |
- {field} {static} _nodes : urt_node_t* |
38 |
'Event source for control events. |
39 |
- {field} {static} _evtSource : urt_osEventSource_t |
40 |
'Mutex used for synchronization. |
41 |
- {field} {static} _lock : urt_osMutex_t |
42 |
.. URT_CFG_PUBSUB_ENABLED == true .. |
43 |
- {field} {static} _pubsub : urt_pubsub_t |
44 |
.. URT_CFG_RPC_ENABLED == true .. |
45 |
- {field} {static} _rpc : urt_rpc_t |
46 |
__ |
47 |
'Initializes the urt_core_t object. |
48 |
+ {method} urtCoreInit (void) : urt_status_t |
49 |
'Starts all node threads (nodes will block before the loop). |
50 |
+ {method} urtCoreStartNodes (void) : urt_status_t |
51 |
'Nodes can use this function to synchronize globally. |
52 |
+ {method} urtCoreSynchronizeNodes (node : urt_node_t*, stage : urt_nodestage_t) : urt_status_t |
53 |
'Stops all nodes. |
54 |
+ {method} urtCoreStopNodes (void) : urt_status_t |
55 |
} |
56 |
|
57 |
$group("node") { |
58 |
/' Function type to be called during setup phase of node threads. '/ |
59 |
$type("urt_nodeSetupCallback_t") { |
60 |
'Takes the node and optional parameters as arguments and returns a event mask for the next iteration. |
61 |
urt_nodeSetupCallback_t (node : urt_node_t*, arg : void*) : urt_osEventMask_t |
62 |
} |
63 |
|
64 |
/' Function type to be called during loop phase of node threads. '/ |
65 |
$type("urt_nodeLoopCallback_t") { |
66 |
'Takes the node, a mask of occurred events and optional parameters as arguments and returns a event mask for the next iteration. |
67 |
urt_nodeLoopCallback_t (node : urt_node_t*, events : urt_osEventMask_t, arg : void*) : urt_osEventMask_t |
68 |
} |
69 |
|
70 |
/' Node structure. '/ |
71 |
$structure("urt_node_t") { |
72 |
'Pointer to the next node in a list. |
73 |
+ {field} next : urt_node_t* |
74 |
'Pointer to the nore thread. |
75 |
+ {field} thread : urt_osThread_t* |
76 |
'Callback function to be called during the setup phase. |
77 |
+ {field} setupcallback : urt_nodeSetupCallback_t* |
78 |
'Optional parameters for the setup callback function. |
79 |
+ {field} setupparams : void* |
80 |
'Callback function to be called in each loop iteration. |
81 |
+ {field} loopcallback : urt_nodeLoopCallback_t* |
82 |
'Optional parameters for the loop callback function. |
83 |
+ {field} loopparams : void* |
84 |
'Execution stage of the node. |
85 |
+ {field} stage : urt_nodestage_t |
86 |
'Event listener for middleware-wide control events. |
87 |
+ {field} listener : urt_osEventListener_t |
88 |
__ |
89 |
'The main() function of the node thread. |
90 |
- {method} {static} _main : urt_osThreadFunction_t |
91 |
'Initializes an urt_node_t object. |
92 |
+ {method} urtNodeInit (node : urt_node_t*, stacksize : size_t, setupcallback : urt_nodeSetupCallback_t*, setupparams : void*, loopcallback : urt_nodeLoopCallback_t*, loopparams : void*) : urt_status_t |
93 |
} |
94 |
} /'node'/ |
95 |
|
96 |
$module("Publish-Subscribe System") { |
97 |
!includesub pubsub.uml!ENTITIES |
98 |
} |
99 |
|
100 |
$module("Remote Procedure Call System") { |
101 |
!includesub rpc.uml!ENTITIES |
102 |
} |
103 |
|
104 |
!endsub |
105 |
|
106 |
/'### DEPENDENCIES & LAYOUT ##################################################'/ |
107 |
|
108 |
!startsub DEPENDENCIES |
109 |
|
110 |
urt_node_t "1" o-- "0..1" urt_node_t |
111 |
urt_node_t "1" o-- "1" urt_nodeSetupCallback_t |
112 |
urt_node_t <.. urt_nodeSetupCallback_t |
113 |
urt_node_t "1" o-- "1" urt_nodeLoopCallback_t |
114 |
urt_node_t <.. urt_nodeLoopCallback_t |
115 |
|
116 |
!includesub pubsub.uml!DEPENDENCIES |
117 |
|
118 |
!includesub rpc.uml!DEPENDENCIES |
119 |
|
120 |
urt_core_t "1" o-- "0..1" urt_node_t |
121 |
urt_core_t "1" *-- "0..1" urt_pubsub_t |
122 |
urt_core_t "1" *-- "0..1" urt_rpc_t |
123 |
|
124 |
!endsub |
125 |
|
126 |
/'### OUTRO ##################################################################'/ |
127 |
|
128 |
@enduml |
129 |
|