Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review 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
RadioObservatory
LOFAR
Commits
5198cc30
Commit
5198cc30
authored
5 years ago
by
Auke Klazema
Browse files
Options
Downloads
Patches
Plain Diff
SW-705
: Fix mising function
parent
d50a48da
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MAC/Services/src/observation_control_rpc.py
+9
-1
9 additions, 1 deletion
MAC/Services/src/observation_control_rpc.py
with
9 additions
and
1 deletion
MAC/Services/src/observation_control_rpc.py
+
9
−
1
View file @
5198cc30
...
@@ -20,7 +20,8 @@
...
@@ -20,7 +20,8 @@
import
logging
import
logging
from
lofar.messaging.rpc
import
RPCClient
,
RPCClientContextManagerMixin
from
lofar.messaging
import
RPCClient
,
RPCClientContextManagerMixin
,
DEFAULT_BUSNAME
,
\
DEFAULT_BROKER
,
DEFAULT_RPC_TIMEOUT
from
lofar.mac.config
import
DEFAULT_OBSERVATION_CONTROL_SERVICE_NAME
from
lofar.mac.config
import
DEFAULT_OBSERVATION_CONTROL_SERVICE_NAME
'''
Simple RPC client for Service ObservationControl2
'''
Simple RPC client for Service ObservationControl2
...
@@ -34,5 +35,12 @@ class ObservationControlRPCClient(RPCClientContextManagerMixin):
...
@@ -34,5 +35,12 @@ class ObservationControlRPCClient(RPCClientContextManagerMixin):
super
().
__init__
()
super
().
__init__
()
self
.
_rpc_client
=
rpc_client
self
.
_rpc_client
=
rpc_client
@staticmethod
def
create
(
exchange
=
DEFAULT_BUSNAME
,
broker
=
DEFAULT_BROKER
,
timeout
=
DEFAULT_RPC_TIMEOUT
):
"""
Create a OTDBRPC connecting to the given exchange/broker on the default DEFAULT_OTDB_SERVICENAME service
"""
return
ObservationControlRPCClient
(
RPCClient
(
service_name
=
DEFAULT_OBSERVATION_CONTROL_SERVICE_NAME
,
exchange
=
exchange
,
broker
=
broker
,
timeout
=
timeout
))
def
abort_observation
(
self
,
sas_id
):
def
abort_observation
(
self
,
sas_id
):
return
self
.
_rpc_client
.
execute
(
'
AbortObservation
'
,
sas_id
=
sas_id
)
return
self
.
_rpc_client
.
execute
(
'
AbortObservation
'
,
sas_id
=
sas_id
)
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