# Development of a Virtual Reality-Based Environment for Telerehabilitation
## 2 Materials and Methods
### The Main User Console
#### 2.2.2 Software Application Development  
The Unified Modeling Language (UML) development diagram provides a clear visualization of how physical software modules are mapped to hardware resources. This diagram, represented in Figure 4, consists of 3 nodes connected through the TCP/IP protocol. It shows that the application implemented in C#, the VR application, and the robotic structure control application all run on the Windows operating system. The artifact enabling the execution of the C# application is the executable file UI_LegUp.exe, which uses exercise data from the Exercices.csv file and interacts with components specific to the 6 implemented classes. As for the VR application, the executable file VR_LegUP.exe is the artifact that allows it to run, interacting with 2 components. Software Analysis  
In order to graphically visualize all the functionalities offered by the software application developed using the C# 12 programming language [32] and the Unity 2022.3 VR program [33], the UML use case diagram [34; 35; 36; 37] shown in Figure 5 was created. This chart includes the following:  
* Eighteen use cases detailing the functionalities of the software application: twelve associated with the application implemented in the C# programming language and six related to the VR application;
* Three actors: the human user (physical therapist), the controllers, and the control software of the robotic rehabilitation structure;
* Eleven association relationships between actors and use cases;
* Three dependency relationships between use cases. Figure 4: UML deployment diagram. A detailed description of all processes and algorithms [38; 39; 40] used to achieve the goal outlined by each use case is provided through activity diagrams. Figure 6 presents the UML activity diagram corresponding to the \"Monitoring (graphical and tabular) of patient progress\" use case, which includes 8 activities required to accomplish the goal associated with this case. Considering the 12 C# application-specific functionalities outlined in the use case diagram, 4 classes were designed and implemented to meet the proposed specifications. The class diagram in Figure 7 illustrates the 6 classes together with the relationships between them but also the predefined packages used from the.Net Framework [41]. The purpose of the 4 classes is as follows:  
* The **ExercisesGUI** class allows the therapist to interact with the application's GUI and is derived from the Form class in the System.Windows.Forms package;
* The **HistoryGUI** class enables the therapist to monitor the patient's progress and is also derived from the Form class in the System.Windows.Forms package;
* The RobotGUI class facilitates interaction with the robotic structure control software and is derived from the Form class in the System.Windows.Forms package;
* The RobotConn class establishes connections between the C# application and the robotic structure control software;
* The **UnityConn** class manages connections between the C# graphical interface and the VR component implemented in Unity;  
Figure 5: UML use case diagram. * The **C#MainFile** class represents the core class of the C# application, consisting of objects from the **ExercisesGUI, HistoryGUI, RobotGUI, RobotConn**, and **UnityConn** classes, according to the composition relationships in the diagram. User Interface  
The parallel robotic rehabilitation system is controlled through a user interface, which consists of two menus, namely:  
**Exercises** menu (Figure 8), which enables the therapist to customize the types of exercises according to the patient's needs in the lower limb rehabilitation process. Once the exercises are configured, they are sent to the real robotic system for execution. This menu includes the following commands:  
* To initiate the connection between the user interface and the VR application using the TCP/IP protocol, the therapist must press the \"Connect\" button, which has a blue background.