/' µ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**\nurtCoreStopNodes()\n /'### PARAMETERS & RETURN ####################################################'/ note -- **reason** : urt_status_t -- The reason why the function was called. For normal shutdown ""URT_STATUS_OK"" should be used. ==== -- **return** : urt_status_t -- Returns ""URT_STATUS_OK"" if there was no call with another reason than ""URT_STATUS_OK"" before. If the function has been called before with a different reason, that reason is returned. endnote /'### PROCEDURE ##############################################################'/ start :lock core; if (Current core ""_status"" value is ""URT_STATUS_OK""?) then (yes) if (Thread priority is lower than ""URT_THREAD_PRIO_HIGH_MAX""?) then (yes) :boost thread priority to ""URT_THREAD_PRIO_HIGH_MAX""; else (no) endif :set core's ""_status"" variable to argument; :access first node in core's list of nodes; while (Current node is not ""NULL""?) is (yes) :request node to terminate; :proceed to next node; endwhile (no) :broadcast control event (terminate); :unlock core; if (Thread boosted its priority?) then (yes) :reset thread priority; else (no) endif stop note Returns ""URT_STATUS_OK"". endnote else (no) :unlock core; stop note Returns the previously set ""_status"" value. endnote endif /'### OUTRO ##################################################################'/ @enduml