Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
2022efac
Commit
2022efac
authored
3 years ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-392
: Support calling OPC-UA methods.
parent
2ce38476
No related branches found
No related tags found
1 merge request
!170
L2SS-392: Support calling OPC-UA methods.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tangostationcontrol/tangostationcontrol/clients/opcua_client.py
+9
-6
9 additions, 6 deletions
...tationcontrol/tangostationcontrol/clients/opcua_client.py
with
9 additions
and
6 deletions
tangostationcontrol/tangostationcontrol/clients/opcua_client.py
+
9
−
6
View file @
2022efac
...
...
@@ -153,15 +153,18 @@ class OPCUAConnection(AsyncCommClient):
return
read_function
,
write_function
async
def
call_method
(
self
,
method_path
,
*
args
):
node
=
await
self
.
obj
.
get_child
(
method_path
[:
-
1
])
return
await
node
.
call_method
(
method_path
[
-
1
],
*
args
)
async
def
_call_method
(
self
,
method_path
,
*
args
):
method_path
=
self
.
get_node_path
(
method_path
)
try
:
node
=
await
self
.
obj
.
get_child
(
method_path
[:
-
1
])
result
=
await
node
.
call_method
(
method_path
[
-
1
],
*
args
)
except
Exception
as
e
:
raise
Exception
(
f
"
Calling method
{
method_path
}
failed
"
)
from
e
def
call_method
(
self
,
method_path
,
*
args
):
method_path
=
self
.
get_node_path
(
method_path
)
raise
NotImplementedError
return
asyncio
.
run_coroutine_threadsafe
(
self
.
_call_method
(
method_path
,
*
args
),
self
.
event_loop
).
result
()
class
ProtocolAttribute
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment