Interface IDeviceWatchdog<T extends IDeviceWatchdogModel>

All Superinterfaces:
IModelProvider<T>, INameable
All Known Implementing Classes:
AbstractWatchdog, ExpressionWatchdog, TopupWatchdog

public interface IDeviceWatchdog<T extends IDeviceWatchdogModel> extends IModelProvider<T>, INameable
A watchdog may be started to run with a scan. It will attempt to pause a scan when topup is about to happen and restart it after topup has finished. Once made a watch dog is active if the activate method is called. The deactivate method may be called to stop a given watchdog watching scans. https://en.wikipedia.org/wiki/Watchdog_timer NOTE: IDeviceWatchdog concrete class MUST have a no-argument constructor.
PV's often used by watchdogs to monitor the scan.
SR-CS-FILL-01:STACOUNTDN:
this is an integer counter that runs to zero at the start of TopUp fill
and is reset immediately to the time to next TopUp fill, fillPeriod,

SR-CS-FILL-01:COUNTDOWN: this is a float-valued counter that runs to zero
at the start of TopUp and remains there until the fill is complete when
it resets to time before next TopUp fill,

SR-CS-FILL-01:ENDCOUNTDN: this is an integer counter that runs to zero
at the end of TopUp fill and resets immediately to an estimate of the
time before the end of the next TopUp fill.
Example XML configuration
        <!--  Watchdog Example -->
        <bean id="topupModel" class="org.eclipse.scanning.api.device.models.TopupWatchdogModel">
        	<property name="countdownName"          value="topup"/>
        	<property name="cooloff"                value="4000"/>
        	<property name="warmup"                 value="5000"/>
        </bean>
        <bean id="topupWatchdog" class="org.eclipse.scanning.sequencer.watchdog.TopupWatchdog" init-method="activate">
        	<property name="model"             ref="topupModel"/>
        </bean>
        
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Make this device active, it will then be used in any scans run IMPORTANT: Call this method when the object is created in spring to register with the service.
    void
    Make this device inactive, removes the watchdog from the service.
    Watchdog id
    boolean
     
    boolean
    A disabled watch dog does not participate in a scan, but is not removed from the service.
    boolean
    Returns whether the watchdog is currently active in a scan and pausing that scan.
    void
    Called by the framework when a device is created to run with a specific scan.
    void
    setEnabled(boolean enabled)
    A disabled watch dog does not participate in a scan, but is not removed from the service.

    Methods inherited from interface org.eclipse.scanning.api.IModelProvider

    getModel, setModel, updateModel

    Methods inherited from interface org.eclipse.scanning.api.INameable

    getName, setName
  • Method Details

    • activate

      void activate()
      Make this device active, it will then be used in any scans run IMPORTANT: Call this method when the object is created in spring to register with the service.
    • deactivate

      void deactivate()
      Make this device inactive, removes the watchdog from the service.
    • isActive

      boolean isActive()
      Returns:
      true if the watchdog is active in a scan and checking things.
    • setEnabled

      void setEnabled(boolean enabled)
      A disabled watch dog does not participate in a scan, but is not removed from the service.
      Parameters:
      enabled -
    • isEnabled

      boolean isEnabled()
      A disabled watch dog does not participate in a scan, but is not removed from the service. *
    • setController

      void setController(IDeviceController controller)
      Called by the framework when a device is created to run with a specific scan.
      Parameters:
      device -
    • isPausing

      boolean isPausing()
      Returns whether the watchdog is currently active in a scan and pausing that scan.
    • getId

      String getId()
      Watchdog id
      Returns:
      id