## 6 Conclusions  
This article presents a methodology for designing RTIoT systems that includes the following elements:  
* Four-layer generic RTIoT system architecture model.
* Functional specification method in the form of a set of task graphs with assignment of tasks to IoT architecture layers.
* A method for mapping functional specifications into an RTIoT system architecture.
* Requirements for communication protocols and routing methods used in RTIoT systems.  
For the proposed RTIoT architecture model, a method is presented to ensure that the functional specification is mapped into an optimized IoT architecture. The starting point is the specification of the functions of a given system in the form of task graphs. For each task, their assignment to the different layers of the IoT architecture and time constraints are specified. The specification is then mapped into the target architecture by globally prioritizing tasks and transmissions. The scheduling method optimizes the schedule to achieve the highest possible QoS. The presented methodology is based on analogous methodologies used in the synthesis of embedded systems. However, due to the nature of the IoT architecture, it was necessary to consider specific features of the IoT architecture such as the lack of the centralized control of all elements of the system, the sharing of communication and computing infrastructure with other systems, and the dynamic number of tasks in the system. This paper also provides an overview of existing methods and technologies relevant to RTIoT systems. The purpose of this review was to present current solutions that can be applied to RTIoT systems, as well as to indicate the missing elements that require development in order to create a complete design environment for RTIoT systems. In this way, this paper can also be a valuable resource for designers and others interested in RTIoT.  
The proposed methodology was illustrated with an example of designing a practical RTIoT system that performs the functions of a smart system for handling a city's parking lots. The example demonstrated the practical usefulness of the proposed methodology in the design and optimization of RTIoT systems. To the best of our knowledge, this is the first paper to present a complete methodology for the design of a broad class of RTIoT systems while considering the QoS optimization of such systems.  
Further work will involve the development of routing methods and communication protocols to enable the implementation of systems designed according to the methodology presented in this work. The result will be a complete RTIoT system design and implementation environment that ensures the creation of systems with a high level of QoS.  
S.D.: conceptualization, methodology, investigation, formal analysis, validation, visualization, writing--original draft, writing--review and editing, supervision, and funding acquisition; M.P.: conceptualization, methodology, investigation, formal analysis, validation, visualization, writing--original draft, writing--review and editing, and supervision; L.A.: conceptualization, methodology, investigation, formal analysis, validation, writing--original draft, and writing--review and editing. All authors have read and agreed to the published version of the manuscript. This research received no external funding.  
Not applicable.  
The authors declare no conflict of interest.