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
95ae2e1b
Commit
95ae2e1b
authored
Jul 28, 2023
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP
parent
89886652
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
opcua-to-http-gw/opcua-to-http-gw.py
opcua-to-http-gw/opcua-to-http-gw.py
+5
-4
No files found.
opcua-to-http-gw/opcua-to-http-gw.py
View file @
95ae2e1b
...
...
@@ -12,10 +12,11 @@ import requests
import
urllib
import
argparse
import
logging
import
__main__
# #################################
# Configure
# XXX: addn erp5_username and erp5_password!
parser
=
argparse
.
ArgumentParser
(
description
=
'Run OPCUA Server.'
)
a
=
parser
.
add_argument
a
(
'--ip'
,
help
=
'The IP address on which the OPCUA Server runs'
,
default
=
"127.0.0.1"
)
...
...
@@ -64,6 +65,7 @@ if erp5_ip is not None and erp5_port is not None:
# Start OPCUA Server
async
def
main
():
_logger
=
logging
.
getLogger
(
__name__
)
# setup our server
server
=
asyncua
.
Server
()
await
server
.
init
()
...
...
@@ -87,14 +89,13 @@ async def main():
server
.
iserver
.
create_session
=
create_session
_logger
.
info
(
"Added subscription for erp5 handler."
)
_logger
.
info
(
"Starting server!"
)
async
with
server
:
while
True
:
await
asyncio
.
sleep
(
1
)
logging
.
basicConfig
(
level
=
logging
.
DEBUG
)
logging
.
basicConfig
(
level
=
logging
.
INFO
)
asyncio
.
run
(
main
(),
debug
=
True
)
import
__main__
if
__name__
==
'__main__'
:
sys
.
exit
(
__main__
.
main
())
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