Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@raise_if_disconnected
def setpoint_alarm_status(self):
"""Setpoint PV status"""
with self._lock:
status = self._write_pv.status
if status is None:
return None
return AlarmStatus(status)
@raise_if_disconnected
def limits(self):
'''The read PV limits'''
# This overrides the base limits
with self._lock:
pv = self._read_pv
pv.get_ctrlvars()
return (pv.lower_ctrl_limit, pv.upper_ctrl_limit)
@raise_if_disconnected
def setpoint_alarm_status(self):
"""Setpoint PV status"""
with self._lock:
status = self._write_pv.status
if status is None:
return None
return AlarmStatus(status)
@raise_if_disconnected
def alarm_status(self):
"""PV status"""
with self._lock:
status = self._read_pv.status
if status is None:
return None
return AlarmStatus(status)
@raise_if_disconnected
def timestamp(self):
'''Timestamp of readback PV, according to EPICS'''
with self._lock:
if not self._read_pv.auto_monitor:
# force updating the timestamp when not using auto monitoring
self._read_pv.get_timevars()
return self._read_pv.timestamp
@raise_if_disconnected
def read(self):
"""Read the signal and format for data collection
Returns
-------
dict
Dictionary of value timestamp pairs
"""
return {self.name: {'value': self.value,
'timestamp': self.timestamp}}
@raise_if_disconnected
def alarm_severity(self):
"""PV alarm severity"""
with self._lock:
severity = self._read_pv.severity
if severity is None:
return None
return AlarmSeverity(severity)
@raise_if_disconnected
def setpoint_ts(self):
'''Timestamp of setpoint PV, according to EPICS'''
with self._lock:
if not self._write_pv.auto_monitor:
# force updating the timestamp when not using auto monitoring
self._write_pv.get_timevars()
return self._write_pv.timestamp
@raise_if_disconnected
def alarm_severity(self):
"""PV alarm severity"""
with self._lock:
severity = self._read_pv.severity
if severity is None:
return None
return AlarmSeverity(severity)
@raise_if_disconnected
def timestamp(self):
'''Timestamp of readback PV, according to EPICS'''
with self._lock:
if not self._read_pv.auto_monitor:
# force updating the timestamp when not using auto monitoring
self._read_pv.get_timevars()
return self._read_pv.timestamp