OPC-UA Lua Scripting
Examples
These are a number of examples to help you get started with the simulator and creating your own Lua scripts.
API
Functions
Objects
Nodes
Enums
Using your own script
To run the docker container with your own script you will need to mount a volume containing the script to the container. Using the --lua-script
option, you should then pass the path to the mounted Lua script. For example:
docker run --rm --name opc-ua-sim -p 49947:49947 -v {path-to-scripts}:{mounted-path-to-lua-scipts} iotechsys/opc-ua-sim:1.2 --lua-script {mounted-path-to-lua-scripts}/custom-script.lua
A more concrete example
docker run --rm --name opc-ua-sim -p 49947:49947 -v $(pwd)/lua-scripts/:/docker-lua-scripts/ iotechsys/opc-ua-sim:1.2 --lua-script /docker-lua-scripts/custom-script.lua