Commit 118bc990 authored by Philipp's avatar Philipp

Update opcua-to-http-gw.py - remove conflict of ipv4 and ipv6 by removing ipv4.

parent bf92d8ad
......@@ -17,7 +17,7 @@ import __main__
# command line handling
parser = argparse.ArgumentParser(description='Run OPCUA Server.')
a = parser.add_argument
a('--ipv4', help='The IPv4 address on which the OPCUA Server runs', default="0.0.0.0")
# a('--ipv4', help='The IPv4 address on which the OPCUA Server runs', default="0.0.0.0")
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")
......@@ -26,7 +26,7 @@ a('--erp5-url', help='URL of ERP5 instance to which data shall be send.', defaul
a('--erp5-username', help='Username of ERP5 instance to which data shall be send.', default=None)
a('--erp5-password', help='Password of ERP5 instance to which data shall be send.', default=None)
args = parser.parse_args()
ipv4 = args.ipv4
# ipv4 = args.ipv4
ipv6 = args.ipv6
ipv6_enabled = args.ipv6_enabled
port = args.port
......@@ -90,8 +90,8 @@ async def main():
if bool(int(ipv6_enabled)):
server.set_endpoint(f"opc.tcp://[{ipv6}]:{port}/freeopcua/server/")
else:
server.set_endpoint(f"opc.tcp://{ipv4}:{port}/freeopcua/server/")
#else:
# server.set_endpoint(f"opc.tcp://{ipv4}:{port}/freeopcua/server/")
if xml is not None:
await server.import_xml(xml)
......
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