SOIL-OPC-UA
Name
OPC UA-Generation from JSON-Files
Description
This project can iterate JSON-Models generated from SOIL-Interfaces and convert them into an OPC UA Server. At the moment everything except enums can be generated. Our code generates the functions as empty bodies, but you get a descripton and a small guide on how to integrate your algorithm.
Installation
-
Clone Project in a Directory of your choice
-
Copy the jsonfile you want to generate in that folder
-
If you want to run the code manually run:
$ pip install -r requirements.txt
Usage:
Usage with Dockerfile
- Change file name of the json file in line 16 of the Dockerfile to the name of the file which you wish to generate
- run the dockerfile
Usage manually
run:
$ python newmodeljsonparse.py <name of your file>
How to modify the server
- Functions:
-
To get the value of a node use:
await node.get_value()
-
To change the value of a node use:
await node.set_value()
-
- For everything else it is the easiest to just change your Json-Model accordingly and generate a new server.
Roadmap
One could work on connecting the events and Streams to their respective objecttypes, to make it easier for the user. The dynamic streams also can't be generated at the moment. Ranges are not enforced as of now.