Commit 14afa67e authored by Philipp's avatar Philipp

Update minimal-server.py

parent ba69c99d
#!//usr/bin/python
"""
Basic server with minimal data
"""
# from https://opcua-asyncio.readthedocs.io/en/latest/usage/get-started/minimal-client.html
import asyncio
import logging
from asyncua import Server, ua
from asyncua.common.methods import uamethod
import argparse
# command line handling
parser = argparse.ArgumentParser(description='Run OPCUA Server.')
a = parser.add_argument
a('--ipv6', help='The IPv6 address on which the OPCUA Server runs', default="::")
a('--ipv6-enabled', help='The IPv6 address check whether it is enabled or disabled', default="1")
a('--port', help='The port on which the OPCUA Server runs', default="4840")
args = parser.parse_args()
# ipv4 = args.ipv4
ipv6 = args.ipv6
ipv6_enabled = args.ipv6_enabled
port = args.port
@uamethod
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment