urtware / doc / activitydiagrams / request / hrtrequest / urtHrtRequestRetrieve.uml @ 2c811df1
History | View | Annotate | Download (2.646 KB)
| 1 | 2d315870 | 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**\nurtHrtRequestRetrieve()\n |
||
| 27 | |||
| 28 | /'### PARAMETERS & RETURN ####################################################'/ |
||
| 29 | |||
| 30 | note |
||
| 31 | -- **request** : urt_hrtrequest_t* -- |
||
| 32 | The request to retrieve. |
||
| 33 | Must not be ""NULL"". |
||
| 34 | ==== |
||
| 35 | -- **return** : urt_status_t -- |
||
| 36 | Typcially returns ""URT_STATUS_OK"". |
||
| 37 | Returns ""URT_STATUS_REQUEST_BADOWNER"" if the request had to be removed from a service. |
||
| 38 | endnote |
||
| 39 | |||
| 40 | /'### PROCEDURE ##############################################################'/ |
||
| 41 | |||
| 42 | start |
||
| 43 | :lock request; |
||
| 44 | :reset QoS timer; |
||
| 45 | if (Latency is lower than allowed by jitter setting?) then (yes) |
||
| 46 | stop |
||
| 47 | note |
||
| 48 | Execute system panic. |
||
| 49 | endnote |
||
| 50 | else (no) |
||
| 51 | endif |
||
| 52 | if (Request is owned by a service?) then (yes) |
||
| 53 | fork |
||
| 54 | partition "unqueue request" {
|
||
| 55 | :lock service; |
||
| 56 | fork |
||
| 57 | if (This was the first request in the queue?) then (yes) |
||
| 58 | :set ""requestQueue_front"" to ""next""; |
||
| 59 | else (no) |
||
| 60 | :set ""prev"" of preceeding request to ""prev"" of this reuqest; |
||
| 61 | endif |
||
| 62 | fork again |
||
| 63 | if (This was the final request in the queue?) then (yes) |
||
| 64 | :set ""requestQueue_back"" to ""prev""; |
||
| 65 | else (no) |
||
| 66 | :set ""next"" of preceeding request to ""next"" of this reuqest; |
||
| 67 | endif |
||
| 68 | fork again |
||
| 69 | if (This was the final HRT request?) then (yes) |
||
| 70 | :set ""requestQueue_hrtBack"" to ""prev""; |
||
| 71 | else (no) |
||
| 72 | endif |
||
| 73 | endfork |
||
| 74 | :unlock service; |
||
| 75 | } |
||
| 76 | fork again |
||
| 77 | :set ""owner"" to ""NULL""; |
||
| 78 | endfork |
||
| 79 | stop |
||
| 80 | note |
||
| 81 | Returns ""URT_STATUS_REQUEST_BADOWNER"". |
||
| 82 | endnote |
||
| 83 | else (no) |
||
| 84 | stop |
||
| 85 | note |
||
| 86 | Returns ""URT_STATUS_OK"". |
||
| 87 | endnote |
||
| 88 | endif |
||
| 89 | |||
| 90 | /'### OUTRO ##################################################################'/ |
||
| 91 | |||
| 92 | @enduml |