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
068db638
Commit
068db638
authored
Aug 03, 2023
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Read and init values from ERP5 backend.
parent
2d48c8aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
opcua-to-http-gw/opcua-to-http-gw.py
opcua-to-http-gw/opcua-to-http-gw.py
+3
-4
No files found.
opcua-to-http-gw/opcua-to-http-gw.py
View file @
068db638
...
@@ -84,9 +84,8 @@ async def main():
...
@@ -84,9 +84,8 @@ async def main():
for
k
,
v
in
erp5_json
.
items
():
for
k
,
v
in
erp5_json
.
items
():
# set
# set
node
=
server
.
get_node
(
k
)
node
=
server
.
get_node
(
k
)
_logger
.
error
(
"Set %s = %s at %s"
%
(
k
,
v
,
node
))
_logger
.
debug
(
"Init from ERP5. Set %s = %s at %s"
%
(
k
,
v
,
node
))
# XXX: this leads to a change notification which calls ERP5 and endless loop!
await
node
.
write_value
(
v
)
#await node.write_value(v)
subscription
=
await
server
.
create_subscription
(
1000
,
erp5_handler
)
subscription
=
await
server
.
create_subscription
(
1000
,
erp5_handler
)
await
subscription
.
subscribe_events
()
await
subscription
.
subscribe_events
()
...
@@ -107,7 +106,7 @@ async def main():
...
@@ -107,7 +106,7 @@ async def main():
while
True
:
while
True
:
await
asyncio
.
sleep
(
1
)
await
asyncio
.
sleep
(
1
)
logging
.
basicConfig
(
level
=
logging
.
ERROR
)
logging
.
basicConfig
(
level
=
logging
.
DEBUG
)
asyncio
.
run
(
main
(),
debug
=
True
)
asyncio
.
run
(
main
(),
debug
=
True
)
if
__name__
==
'__main__'
:
if
__name__
==
'__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