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
16a0b10b
Commit
16a0b10b
authored
Apr 30, 2019
by
Christian Bergmiller
Committed by
oroulet
May 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs
parent
1d81f15b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
asyncua/client/client.py
asyncua/client/client.py
+7
-12
No files found.
asyncua/client/client.py
View file @
16a0b10b
...
...
@@ -470,24 +470,19 @@ class Client:
def
get_node
(
self
,
nodeid
:
Union
[
ua
.
NodeId
,
str
])
->
Node
:
"""
Get node using NodeId object or a string representing a NodeId
Get node using NodeId object or a string representing a NodeId
.
"""
return
Node
(
self
.
uaclient
,
nodeid
)
async
def
create_subscription
(
self
,
period
,
handler
):
"""
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.
period argument is either a publishing interval in milliseconds or a
CreateSubscriptionParameters instance. The second option should be used,
if the asyncua-server has problems with the default options.
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.
Returns a Subscription object which allows to subscribe to events or data changes on server.
:param period: Either a publishing interval in milliseconds or a `CreateSubscriptionParameters` instance.
The second option should be used, if the asyncua-server has problems with the default options.
:param handler: Class instance with data_change and/or event methods (see `SubHandler`
base class for details). Remember not to block the main event loop inside the handler methods.
"""
if
isinstance
(
period
,
ua
.
CreateSubscriptionParameters
):
...
...
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