urtware / doc / classdiagrams / urtware.uml @ 17d978fe
History | View | Annotate | Download (5.976 KB)
1 | 4d55cea4 | 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** |
||
27 | |||
28 | dd31cb03 | Thomas Schöpping | !include ./functions.iuml |
29 | 4d55cea4 | Thomas Schöpping | |
30 | /'### ENTITIES ###############################################################'/ |
||
31 | |||
32 | !startsub ENTITIES |
||
33 | |||
34 | 46471486 | Thomas Schöpping | /' µRtWare core structure. '/ |
35 | 4d55cea4 | Thomas Schöpping | $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 | e87bd7c7 | Thomas Schöpping | 'System execution/health status. |
43 | - {field} {static} _status : urt_status_t |
||
44 | 4d55cea4 | Thomas Schöpping | .. URT_CFG_PUBSUB_ENABLED == true .. |
45 | 056e40d2 | Thomas Schöpping | 'List of topics ordered by their identifiers. |
46 | - {field} {static} _topics : urt_topic_t* |
||
47 | 4d55cea4 | Thomas Schöpping | .. URT_CFG_RPC_ENABLED == true .. |
48 | 056e40d2 | Thomas Schöpping | 'List of services ordered by their identifiers. |
49 | - {field} {static} _services : urt_service_t* |
||
50 | 4d55cea4 | Thomas Schöpping | __ |
51 | 'Initializes the urt_core_t object. |
||
52 | dd31cb03 | Thomas Schöpping | + {method} urtCoreInit (void) : void |
53 | e87bd7c7 | Thomas Schöpping | 'Retrieves the current system status. |
54 | + {method} urtCoreGetStatus (void) : urt_status_t |
||
55 | 4d55cea4 | Thomas Schöpping | 'Starts all node threads (nodes will block before the loop). |
56 | dd31cb03 | Thomas Schöpping | + {method} urtCoreStartNodes (void) : void |
57 | e87bd7c7 | Thomas Schöpping | 'Nodes can use this function to synchronize. |
58 | + {method} urtCoreSynchronize (node : urt_node_t*) : urt_status_t |
||
59 | 'Stops all nodes and propagates a specified reason. |
||
60 | + {method} urtCoreStopNodes (reason : urt_status_t) : urt_status_t |
||
61 | 056e40d2 | Thomas Schöpping | .. URT_CFG_PUBSUB_ENABLED == true .. |
62 | 'Retrieves a topic given an identifier. |
||
63 | ee83a495 | Thomas Schöpping | + {method} urtCoreGetTopic (id : urt_topicid_t) : urt_topic_t* |
64 | 056e40d2 | Thomas Schöpping | .. URT_CFG_RPC_ENABLED == true .. |
65 | 'Retrieves a service given an identifier. |
||
66 | ee83a495 | Thomas Schöpping | + {method} urtCoreGetService (id : urt_serviceid_t) : urt_service_t* |
67 | 4d55cea4 | Thomas Schöpping | } |
68 | |||
69 | $group("node") { |
||
70 | /' Function type to be called during setup phase of node threads. '/ |
||
71 | $type("urt_nodeSetupCallback_t") { |
||
72 | 'Takes the node and optional parameters as arguments and returns a event mask for the next iteration. |
||
73 | urt_nodeSetupCallback_t (node : urt_node_t*, arg : void*) : urt_osEventMask_t |
||
74 | } |
||
75 | |||
76 | /' Function type to be called during loop phase of node threads. '/ |
||
77 | $type("urt_nodeLoopCallback_t") { |
||
78 | 'Takes the node, a mask of occurred events and optional parameters as arguments and returns a event mask for the next iteration. |
||
79 | urt_nodeLoopCallback_t (node : urt_node_t*, events : urt_osEventMask_t, arg : void*) : urt_osEventMask_t |
||
80 | } |
||
81 | |||
82 | e87bd7c7 | Thomas Schöpping | /' Function type to be called during shutdown phase of node threads. '/ |
83 | $type("urt_nodeShutdownCallback_t") { |
||
84 | 'Takes the node, an error code defining the cause of the shutdown and optional parameters as argumnets. |
||
85 | urt_nodeShutdownCallback_t (node : urt_node_t*, cause : urt_status_t, arg : void*) : void |
||
86 | } |
||
87 | |||
88 | 4d55cea4 | Thomas Schöpping | /' Node structure. '/ |
89 | $structure("urt_node_t") { |
||
90 | 'Pointer to the next node in a list. |
||
91 | + {field} next : urt_node_t* |
||
92 | ee83a495 | Thomas Schöpping | 'Pointer to the node thread. |
93 | 4d55cea4 | Thomas Schöpping | + {field} thread : urt_osThread_t* |
94 | e87bd7c7 | Thomas Schöpping | 'Optional callback function to be called during the setup phase. |
95 | 4d55cea4 | Thomas Schöpping | + {field} setupcallback : urt_nodeSetupCallback_t* |
96 | 'Optional parameters for the setup callback function. |
||
97 | + {field} setupparams : void* |
||
98 | 'Callback function to be called in each loop iteration. |
||
99 | + {field} loopcallback : urt_nodeLoopCallback_t* |
||
100 | 'Optional parameters for the loop callback function. |
||
101 | + {field} loopparams : void* |
||
102 | e87bd7c7 | Thomas Schöpping | 'Optional callback function to be called during the shutdown phase. |
103 | + {field} shutdowncallback : urt_nodeShutdownCallback_t* |
||
104 | 'Optional parameters for the shutdown callback function. |
||
105 | + {field} shutdownparams : void* |
||
106 | 4d55cea4 | Thomas Schöpping | 'Execution stage of the node. |
107 | + {field} stage : urt_nodestage_t |
||
108 | 'Event listener for middleware-wide control events. |
||
109 | + {field} listener : urt_osEventListener_t |
||
110 | ee83a495 | Thomas Schöpping | .. URT_CFG_PUBSUB_PROFILING == true || URT_CFG_RPC_PROFILING = true .. |
111 | 'Counter of executed loops. |
||
112 | + {field} loops : uint64_t |
||
113 | 4d55cea4 | Thomas Schöpping | __ |
114 | 'The main() function of the node thread. |
||
115 | - {method} {static} _main : urt_osThreadFunction_t |
||
116 | 'Initializes an urt_node_t object. |
||
117 | dd31cb03 | Thomas Schöpping | + {method} urtNodeInit (node : urt_node_t*, thread : urt_osThread_t*, setupcallback : urt_nodeSetupCallback_t*, setupparams : void*, loopcallback : urt_nodeLoopCallback_t*, loopparams : void*, shutdowncallback : urt_nodeShutdownCallback_t*, shutodwnparams : void*) : void |
118 | 4d55cea4 | Thomas Schöpping | } |
119 | } /'node'/ |
||
120 | |||
121 | $module("Publish-Subscribe System") { |
||
122 | !includesub pubsub.uml!ENTITIES |
||
123 | } |
||
124 | |||
125 | $module("Remote Procedure Call System") { |
||
126 | !includesub rpc.uml!ENTITIES |
||
127 | } |
||
128 | |||
129 | !endsub |
||
130 | |||
131 | /'### DEPENDENCIES & LAYOUT ##################################################'/ |
||
132 | |||
133 | !startsub DEPENDENCIES |
||
134 | |||
135 | 2d315870 | Thomas Schöpping | urt_node_t "1" o-- "0,1" urt_node_t |
136 | urt_node_t "1" o-- "0,1" urt_nodeSetupCallback_t |
||
137 | 4d55cea4 | Thomas Schöpping | urt_node_t <.. urt_nodeSetupCallback_t |
138 | urt_node_t "1" o-- "1" urt_nodeLoopCallback_t |
||
139 | urt_node_t <.. urt_nodeLoopCallback_t |
||
140 | 2d315870 | Thomas Schöpping | urt_node_t "1" o-- "0,1" urt_nodeShutdownCallback_t |
141 | e87bd7c7 | Thomas Schöpping | urt_node_t <.. urt_nodeShutdownCallback_t |
142 | 4d55cea4 | Thomas Schöpping | |
143 | !includesub pubsub.uml!DEPENDENCIES |
||
144 | |||
145 | !includesub rpc.uml!DEPENDENCIES |
||
146 | |||
147 | 2d315870 | Thomas Schöpping | urt_core_t "1" o-- "0,1" urt_node_t |
148 | urt_core_t "1" o-- "0,1" urt_topic_t |
||
149 | urt_core_t "1" o-- "0,1" urt_service_t |
||
150 | 4d55cea4 | Thomas Schöpping | |
151 | !endsub |
||
152 | |||
153 | /'### OUTRO ##################################################################'/ |
||
154 | |||
155 | @enduml |