Skip to content
Snippets Groups Projects
Commit a3801b5b authored by Taya Snijder's avatar Taya Snijder
Browse files

Merge branch 'L2SS-1128_integration_fix' into 'main'

L2SS-1128 fixed observation device bug

Closes L2SS-1128

See merge request !28
parents d332d1f9 65822427
No related branches found
No related tags found
1 merge request!28L2SS-1128 fixed observation device bug
Pipeline #41383 failed
...@@ -105,6 +105,7 @@ tox -e debug tests.requests.test_prometheus ...@@ -105,6 +105,7 @@ tox -e debug tests.requests.test_prometheus
``` ```
## Releasenotes ## Releasenotes
- 0.11.1 - Bug fixes in observation code
- 0.11. - 0.11.
* Added `MultiStationObservation` class for a pythonic interface with observations across multiple stations. * Added `MultiStationObservation` class for a pythonic interface with observations across multiple stations.
* Added `StationObservation` class for pythonic interface with observations * Added `StationObservation` class for pythonic interface with observations
......
0.11.0 0.11.1
...@@ -33,24 +33,18 @@ class StationFutures: ...@@ -33,24 +33,18 @@ class StationFutures:
self._json_specification = dumps(specification) self._json_specification = dumps(specification)
try: try:
# connects to the tangoDb and get the proxies # connects to the tangoDb and get the proxy
self._control_proxy = DeviceProxy( self._control_proxy = DeviceProxy(
f"tango://{host}/STAT/ObservationControl/1" f"tango://{host}/STAT/ObservationControl/1"
) )
self._observation_proxy = DeviceProxy( # gives an exception when it fails to ping the proxy
f"tango://{host}/STAT/observation/{self._id}"
)
# gives an exception when it fails to ping the proxies
_ = self._control_proxy.ping() _ = self._control_proxy.ping()
_ = self._observation_proxy.ping()
# set station to green mode # set station to green mode
self._control_proxy.set_green_mode(GreenMode.Futures) self._control_proxy.set_green_mode(GreenMode.Futures)
self._observation_proxy.set_green_mode(GreenMode.Futures)
except DevFailed as e: except DevFailed as e:
self._control_proxy = None self._control_proxy = None
self._observation_proxy = None
logger.warning( logger.warning(
"Failed to connect to device on host %s: %s: %s", "Failed to connect to device on host %s: %s: %s",
...@@ -106,4 +100,4 @@ class StationFutures: ...@@ -106,4 +100,4 @@ class StationFutures:
@property @property
def observation_proxy(self) -> DeviceProxy: def observation_proxy(self) -> DeviceProxy:
"""get the observation proxy of this station""" """get the observation proxy of this station"""
return self._observation_proxy return DeviceProxy(f"tango://{self.host}/STAT/observation/{self._id}")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment