Esempio n. 1
0
 def connect_monitored_channel(self, suffix):
     ret = create_pv(self.camera_config.get_source() + suffix,
                     auto_monitor=True)
     ret.wait_for_connection(config.EPICS_TIMEOUT)
     if not ret.connected:
         raise RuntimeError("Could not connect to: {}".format(ret.pvname))
     return ret
Esempio n. 2
0
 def caget(self,
           channel_name,
           timeout=config.EPICS_TIMEOUT,
           as_string=True):
     channel = create_pv(channel_name)
     try:
         ret = channel.get(timeout=timeout, as_string=as_string)
         if ret is None:
             raise Exception(
                 "Error getting channel %s for camera %s" %
                 (channel_name, self.camera_config.get_source()))
         return ret
     finally:
         channel.disconnect()
 def connect_monitored_channel(self, name):
     ret = create_pv(name, auto_monitor=True)
     ret.wait_for_connection(config.EPICS_TIMEOUT)
     if not ret.connected:
         raise RuntimeError("Could not connect to: {}".format(ret.pvname))
     return ret