Commit 033427b6 authored by Andreas Heine's avatar Andreas Heine Committed by oroulet

Add: missing awaits from porting to asyncio

parent c75f45d5
...@@ -113,8 +113,8 @@ async def main(): ...@@ -113,8 +113,8 @@ async def main():
print("Available loggers are: ", logging.Logger.manager.loggerDict.keys()) print("Available loggers are: ", logging.Logger.manager.loggerDict.keys())
# enable following if you want to subscribe to nodes on server side # enable following if you want to subscribe to nodes on server side
#handler = SubHandler() #handler = SubHandler()
#sub = server.create_subscription(500, handler) #sub = await server.create_subscription(500, handler)
#handle = sub.subscribe_data_change(myvar) #handle = await sub.subscribe_data_change(myvar)
# trigger event, all subscribed clients wil receive it # trigger event, all subscribed clients wil receive it
var = await myarrayvar.read_value() # return a ref to value in db server side! not a copy! var = await myarrayvar.read_value() # return a ref to value in db server side! not a copy!
var = copy.copy(var) # WARNING: we need to copy before writting again otherwise no data change event will be generated var = copy.copy(var) # WARNING: we need to copy before writting again otherwise no data change event will be generated
......
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