## 5 Implementation and Validation
### Validation of Generated Model Design File  
To demonstrate interoperability, several YANG files related to 5G RU, CU, DU, and 5 GC were considered [37]. The generated OPC UA model design files were validated to ensure the mappings proposed cover different positive and negative scenarios. Table 5 summarizes the performance of the OPC UA plugin with respect to different categories of YANG files used during the generation of the OPC UA model file. The plugin and the generated files are validated for correctness, interoperability, efficiency in terms of generation time, handling large data models, supporting multiple files at the same time, adaptability to new standards, error reporting, and resilience. * Correctness of the model mapping: the generated files are analyzed semantically to ensure that the YANG data models are accurately mapped to corresponding OPC UA information models without semantic loss. Structural integrity is validated to ensure that the hierarchy and relationships in YANG models (like containers, lists, and leafs) are preserved accurately in the OPC UA structure (like objects, variables, and methods). * An interoperability test is conducted to test if the generated OPC UA models can be seamlessly loaded into OPC UA server instances and if models can be accessed either using OPC UA client or OPC UA GUI instances. * Generation time: measures how efficiently the plugin processes YANG models and generates the corresponding OPC UA models. * Handling large data models: tests the plugin's ability to manage increasingly large or complex YANG data models. Verifies that the plugin performs well with deep and broad data hierarchies and numerous variables or configurations. * Support for multiple YANG modules: validates whether the plugin can handle multiple YANG modules and revisions while maintaining flexibility to incorporate various configurations or extensions. Figure 8: Generated simple example of an address space model loaded in the OPC UA server. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & & & & & & & \\ \hline Switch YANG & Yes & Yes & 5 10 s & Yes & Partial & Yes & Yes & Yes \\ CU-CP & Yes & Yes & 10–25 s & Yes & Partial & Requires code change & Yes & Yes \\ CU-CU & Yes & Yes & 10–15 s & Yes & Partial & Requires code change & Yes & Yes \\ DU & Yes & Yes & 10–20 s & Partial & Partial & Requires code change & Yes & Yes \\
5G Core & Yes & Yes & 20–50 s & Partial & Partial & Requires code change & Partial & Partial \\ RU & Yes & Yes & 10–20 s & Yes & Partial & Requires code change & Yes & Yes \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Validation results of opc-ua plugin against different categories of YANG files. * Adaptability to new standards: checks whether the plugin can adapt to new or updated versions of YANG and OPC UA standards as they evolve. * Error reporting: ensures that the plugin provides clear and detailed error messages when issues arise during the model generation process, such as invalid YANG models or unsupported features. * Resilience: tests the plugin's robustness against incomplete or erroneous input data. It should either gracefully handle errors or provide meaningful feedback for corrections. The generation time is predominately taken for parsing the YANG file and generating the OPC UA model design XML files, as these involve disk IO operations. The actual mapping logic in the plugin takes on an average of around 30% of the total time. Also, the variability in time across different models is primarily driven by the number of statements. During testing, it was observed that if the YANG model contains import or includes statements referencing other YANG models, which is the case for the majority of 5G YANG models, the parent YANG models must first be converted into OPC UA model design XML files using the OPC UA plugin. Then, all of the generated OPC UA model design XML files must be passed as input files to the UA model compiler so that the compiler can generate a single NodeSet2 XML file linking all of the files.