Java source code generation from OPC UA information models

Loading...
Thumbnail Image

URL

Journal Title

Journal ISSN

Volume Title

Sähkötekniikan korkeakoulu | Master's thesis

Department

Mcode

ETA3005

Language

en

Pages

57+7

Series

Abstract

OPC Unified Architecture is an industrial communication specification that introduces information modeling capabilities. These capabilities allow modeling the communicated data with an object model similar to object-oriented programming languages. However, using the information modeling capabilities is not developer-friendly in the current state of Prosys OPC UA Java SDK. In this thesis, it is identified how the usage of information models could be made easier. First, requirements for source code generation from OPC UA information models are elicited. After that, a type instantiation algorithm is designed to support the generated code. Finally, a design for the source code generation tool is constructed. Functional prototypes are constructed for both the type instantiation algorithm and the source code generation tool. The elicited requirements indicated that the type instantiation algorithm should be separated from the source code generation. The designed type instantiation algorithm creates instances of OPC UA types by reading the server address space on run-time. The designed source code generation tool generates Java classes that use the instances created by the algorithm. The results of this thesis are used in the future development of the Prosys OPC UA Java SDK. The protototypes are developed further by implementing missing requirements and the elicited requirements are used for validating the final product.

OPC Unified Architecture on teollinen tiedonsiirtomäärittely, jonka eräs ominaisuus on tiedon mallintaminen. Tämä ominaisuus mahdollistaa siirrettävän tiedon mallintamisen oliomallilla, joka on samankaltainen kuin olio-ohjelmointikielissä. Tietomallin hyödyntäminen on kuitenkin haastavaa tämänhetkisellä Prosys OPC UA Java SDK:lla. Tässä työssä tutkitaan mahdollisuuksia helpottaa tietomallien käyttöä. Ensin muodostetaan vaatimuksia lähdekoodin generoinnille OPC UA -tietomalleista. Tämän jälkeen suunnitellaan tyyppien instantiointialgoritmi tukemaan generoitavaa koodia. Lopuksi suunnitellaan lähdekoodin generointityökalu. Sekä instantiointialgoritmille että generointityökalulle tehdään toiminnalliset prototyypit. Kerättyjen vaatimusten perusteella tyyppien instantiointialgoritmin tulee olla erillään lähdekoodin generoinnista. Suunniteltu instantiointialgoritmi luo instansseja OPC UA -tyypeistä lukemalla palvelimen osoiteavaruutta ajonaikana. Suunniteltu lähdekoodin generointityökalu generoi Java-luokkia, jotka käyttävät algoritmin luomia instansseja. Työn tuloksia tullaan käyttämään Prosys OPC UA Java SDK:n jatkokehityksessä. Prototyyppejä kehitetään toteuttamalla puuttuvia vaatimuksia ja kerätyillä vaatimuksilla todennetaan lopullisen tuotteen toiminnallisuus.

Description

Supervisor

Seilonen, Ilkka

Thesis advisor

Aro, Jouni

Other note

Citation