Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
osie
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nikola Balog
osie
Commits
118bc990
Commit
118bc990
authored
May 06, 2024
by
Philipp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update opcua-to-http-gw.py - remove conflict of ipv4 and ipv6 by removing ipv4.
parent
bf92d8ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
opcua-to-http-gw/opcua-to-http-gw.py
opcua-to-http-gw/opcua-to-http-gw.py
+4
-4
No files found.
opcua-to-http-gw/opcua-to-http-gw.py
View file @
118bc990
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment