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
67bd88fd
Commit
67bd88fd
authored
Jul 26, 2019
by
Christian Bergmiller
Committed by
oroulet
Aug 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make add_method_callback sync
parent
ddfff427
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
asyncua/common/manage_nodes.py
asyncua/common/manage_nodes.py
+1
-1
asyncua/server/internal_session.py
asyncua/server/internal_session.py
+1
-1
asyncua/server/server.py
asyncua/server/server.py
+2
-2
No files found.
asyncua/common/manage_nodes.py
View file @
67bd88fd
...
...
@@ -371,7 +371,7 @@ async def _create_method(parent, nodeid, qname, callback, inputs, outputs):
datatype
=
ua
.
ObjectIds
.
Argument
)
if
hasattr
(
parent
.
server
,
"add_method_callback"
):
await
parent
.
server
.
add_method_callback
(
method
.
nodeid
,
callback
)
parent
.
server
.
add_method_callback
(
method
.
nodeid
,
callback
)
return
results
[
0
].
AddedNodeId
...
...
asyncua/server/internal_session.py
View file @
67bd88fd
...
...
@@ -111,7 +111,7 @@ class InternalSession:
async
def
delete_references
(
self
,
params
):
return
self
.
iserver
.
node_mgt_service
.
delete_references
(
params
,
self
.
user
)
async
def
add_method_callback
(
self
,
methodid
,
callback
):
def
add_method_callback
(
self
,
methodid
,
callback
):
return
self
.
aspace
.
add_method_callback
(
methodid
,
callback
)
def
call
(
self
,
params
):
...
...
asyncua/server/server.py
View file @
67bd88fd
...
...
@@ -555,14 +555,14 @@ class Server:
def
unsubscribe_server_callback
(
self
,
event
,
handle
):
self
.
iserver
.
unsubscribe_server_callback
(
event
,
handle
)
async
def
link_method
(
self
,
node
,
callback
):
def
link_method
(
self
,
node
,
callback
):
"""
Link a python function to a UA method in the address space; required when a UA method has been imported
to the address space via XML; the python executable must be linked manually
:param node: UA method node
:param callback: python function that the UA method will call
"""
await
self
.
iserver
.
isession
.
add_method_callback
(
node
.
nodeid
,
callback
)
self
.
iserver
.
isession
.
add_method_callback
(
node
.
nodeid
,
callback
)
def
load_type_definitions
(
self
,
nodes
=
None
)
->
Coroutine
:
"""
...
...
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