/' µRtWare is a lightweight publish/subscribe middleware for real-time applications. It was developed as part of the software habitat for the Autonomous Mini Robot [1] (AMiRo) but can be used for other purposes as well. Copyright (C) 2018..2020 Thomas Schöpping et al. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . '/ /'### INTRO ##################################################################'/ @startuml title **µRtWare**\nurtFrtRequestSubmit()\n /'### PARAMETERS & RETURN ####################################################'/ note -- **request** : urt_frtrequest_t* -- The request to be used for this call. Must not be ""NULL"". Must have been acquired before. -- **service** : urt_service_t* -- The service to be called. Must not be ""NULL"". -- **deadline** : urt_delay_t -- Deadline offset until when this request is valid. ==== -- **return** : urt_status_t -- Always returns ""URT_STATUS_OK"". endnote /'### PROCEDURE ##############################################################'/ start :set ""deadlineOffset"" to argument; :lock service; fork partition "enqueue request" { fork if (Service already holds requests?) then (yes) if (Service already holds FRT or SRT requests?) then (yes) partition "append to FRT/SRT requests" { :access last queued FRT/SRT request; fork :set ""next"" pointer of this request to ""next"" of queued request; fork again :set ""prev"" pointer of this request to of queued request; fork again :set ""next"" pointer of queued request to this request; fork again :set ""prev"" pointer of next request to this request; endfork } elseif (Service already holds HRT requests?) then (yes) partition "enqueue after last HRT request" { :access last queued HRT request; fork :set ""next"" pointer of this request to ""next"" of queued request; fork again :set ""prev"" pointer of this request to of queued request; fork again :set ""next"" pointer of queued request to this request; fork again :set ""prev"" pointer of next request to this request; endfork } else (no) partition "enqueue in fron of NRT requests" { :access first queued request; fork :set ""next"" pointer of this request to queued request; fork again :set ""prev"" pointer of queued request to this request; fork again :set the ""requestQueue_front"" pointer to this request; endfork } endif else (no) fork :set the ""requestQueue_front"" pointer to this request; fork again :set the ""requestQueue_back"" pointer to this request; endfork endif fork again :set the ""requestQueue_fsrtBack"" pointer to this request; endfork } fork again :set the service as request owner; endfork :unlock request; :fire event (@service); :unlock service; stop note Returns ""URT_STATUS_OK"". endnote /'### OUTRO ##################################################################'/ @enduml