Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
opcua-asyncio
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
1
Merge Requests
1
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
opcua-asyncio
Commits
bc7fa41d
Commit
bc7fa41d
authored
Oct 30, 2015
by
olivier R-D
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
document that network operations should not be done in handler
parent
da3166e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
examples/example-client.py
examples/example-client.py
+3
-0
opcua/client.py
opcua/client.py
+6
-0
No files found.
examples/example-client.py
View file @
bc7fa41d
...
...
@@ -23,6 +23,9 @@ class SubHandler(object):
"""
Subscription Handler. To receive events from server for a subscription
data_change and event methods are called directly from receiving thread.
Do not do expensive, slow or network operation there. Create another
thread if you need to do such a thing
"""
def
data_change
(
self
,
handle
,
node
,
val
,
attr
):
...
...
opcua/client.py
View file @
bc7fa41d
...
...
@@ -269,6 +269,12 @@ class Client(object):
Create a subscription.
returns a Subscription object which allow
to subscribe to events or data on server
handler argument is a class with data_change and/or event methods.
These methods will be called when notfication from server are received.
See example-client.py.
Do not do expensive/slow or network operation from these methods
since they are called directly from receiving thread. This is a design choice,
start another thread if you need to do such a thing.
"""
params
=
ua
.
CreateSubscriptionParameters
()
params
.
RequestedPublishingInterval
=
period
...
...
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