urtware / doc / classdiagrams / rpc.uml @ 4d55cea4
History | View | Annotate | Download (3.37 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**\nRemote Procedure Call System |
||
27 | |||
28 | !include ../functions.iuml |
||
29 | |||
30 | /'### ENTITIES ###############################################################'/ |
||
31 | |||
32 | !startsub ENTITIES |
||
33 | |||
34 | $group("service") { |
||
35 | /' Function type to be called when executing an RPC. '/ |
||
36 | $function("urt_servicefunc_t") { |
||
37 | urt_servicefunc_t (arg : void*, ret : void*, timeout : urt_delay_t) : urt_status_t |
||
38 | } |
||
39 | |||
40 | /' Service structure type. '/ |
||
41 | $structure("urt_service_t") { |
||
42 | 'Pointer to the next service in a list. |
||
43 | + {field} next : urt_service_t* |
||
44 | 'Identifier of the service. |
||
45 | + {field} id : urt_serviceid_t |
||
46 | 'Mutex lock for exclusive access.' |
||
47 | + {field} lock : urt_osMutex_t |
||
48 | 'Callback function to be executed by the service. |
||
49 | + {field} callback : urt_servicefunc_t* |
||
50 | .. URT_CFG_RPC_PROFLING == true .. |
||
51 | 'Sum of all durations. |
||
52 | + {field} sumDurations : uint64_t |
||
53 | 'Number of executed calls. |
||
54 | + {field} numCalls : uint64_t |
||
55 | 'Number of failed calls due to timeout. |
||
56 | + {field} numTimeouts : uint64_t |
||
57 | .. URT_CFG_RPC_PROFILING == true && URT_CFG_RPC_QOS_JITTERCHECKS == true .. |
||
58 | 'Minimum duration ever detected (to calculate jitter). |
||
59 | + {field} minDuration : urt_delay_t |
||
60 | 'Maximum duration ever detected (to calculate jitter). |
||
61 | + {field} maxDuration : urt_delay_t |
||
62 | __ |
||
63 | 'Initializes a urt_service_t object. |
||
64 | + {method} urtServiceInit(service : urt_service_t*, id : urt_serviceid_t, callback : urt_servicefunc_t*) : urt_status_t |
||
65 | 'Executes an RPC with given arguments and return parameters as well as a timout, in case the RPC may delay execution significantly. |
||
66 | + {method} urtServiceCall(service : urt_service_t*, arg : void*, ret : void*, timeout : urt_delay_t) : urt_status_t |
||
67 | } |
||
68 | } |
||
69 | |||
70 | /' RPC core type. '/ |
||
71 | $structure("urt_rpc_t") { |
||
72 | 'List of services ordered by their (initial) priority. |
||
73 | - {field} {static} _services : urt_service_t* |
||
74 | __ |
||
75 | 'Initializes the urt_core_t object. |
||
76 | + {method} urtRpcInit (void) : urt_status_t |
||
77 | 'Retrieves a topic given an identifier. |
||
78 | + {method} urtRpcRetrieveService (id : urt_serviceid_t) : urt_service_t* |
||
79 | } |
||
80 | |||
81 | !endsub |
||
82 | |||
83 | /'### DEPENDENCIES & LAYOUT ##################################################'/ |
||
84 | |||
85 | !startsub DEPENDENCIES |
||
86 | |||
87 | urt_service_t "1" o-- "0..1" urt_service_t |
||
88 | urt_service_t "1" o-- "0..1" urt_servicefunc_t |
||
89 | |||
90 | urt_rpc_t "1" o-- "0..1" urt_service_t |
||
91 | |||
92 | !endsub |
||
93 | |||
94 | /'### OUTRO ##################################################################'/ |
||
95 | |||
96 | @enduml |