## 3 The Concept of Building the EviNS Software Framework  
As mentioned earlier, the EviNS software framework is distributed under an open-source license, such as GPL/MIT. In this form, the EviNS software framework can be used in educational processes or in initial research in the development of the Internet of Things in the maritime domain. However, the software framework may also include numerous user libraries with closed-source code, thereby prohibiting the free distribution of a user's (specialized) version of the software framework. This type of usage of EviNS is intended for developers of commercial software products, particularly in the creation of industrial products for the Internet of Things in the maritime domain. (According to the terms of the license, in this case, the developer of the commercial software product is obliged to pay a licensing fee to the developer of the open-source software framework.) As depicted in Figure 1, the EviNS software framework is based on the utilization of the Erlang virtual machine and comprises a set of independently operating agents. Furthermore, the implementation of the EviNS software framework adheres to the design principles of Erlang/OTP concerning the structure of code written in the Erlang language, as well as its processes, modules, and directories. Figure 2 presents the fundamental concept of the EviNS software framework--a model of process structuring based on the interaction of work environments and supervisors URL: [[https://github.com/Evologics/evins/wiki/arch](https://github.com/Evologics/evins/wiki/arch)]([https://github.com/Evologics/evins/wiki/arch](https://github.com/Evologics/evins/wiki/arch)) (accessed on 5 October 2022). Work environments encompass working processes that perform useful computations, which may include agents, interface handlers, and configurators. Supervisors are processes responsible for monitoring the functioning of the work environment or the operation of other supervisors. A supervisor can restart processes within the work environment upon detecting faults in them. As illustrated in Figure 2, the finite state machine (FSM)--the top-level supervisor (abbreviated as FSM-TLS)--monitors the operation of the configuration FSM (FSM-SFC) and the agent supervisor FSM (FSM-AS) in the EviNS software framework. In the event of a failure in the FSM-SFC or one of the FSM-ASs, the top-level supervisor FSM-TLS restarts the corresponding process without affecting other running processes. Each FSM-AS is configured and launched by the FSM-SFC configurator. According to its configuration, each FSM-AS starts and oversees specific modules assigned to it, implementing the functionalities of the work environment FSM (FSM-WES), the roles of the work environment (RWE), and other FSMs, including those that are part of Erlang/OTP. The general approach in implementing the EviNS software framework involves dividing the process code into a common part (functional modules) and a special part (callback modules). The functionalities of the RWE ensure communication through interfaces supported by the software framework. The previously mentioned interface handlers are implementations of work environment roles. To implement new functionalities of work environment roles, assigning callbacks responsible for parsing raw data into user-defined data structures (tuples) and for reconstructing raw data from user tuples, initializing the callback, managing the callback configuator, and stopping the callback when the process is completed is necessary. The FSM-SFC can control multiple interface handlers according to the agents' configurations. Good examples of interface handlers are roles that perform functions of command syntax parsers for interfaces of modems from various companies (or command interface converters), or roles acting as syntax analyzers for the widely used NMEA interface. The functionalities of the work environment FSM (WE-FSM) support agent initialization and the interaction of agents with interface handlers.