Package effort

Class EffortProvider

java.lang.Object
effort.EffortProvider
Direct Known Subclasses:
DataMapEffortProvider, GpsEffortProvider, LoggerEffortProvider

public abstract class EffortProvider extends Object
Set of functions that can be returned from any datablock which can give information about effort. For detectors with binary storage, they will return a standard binary store effort provider. Others, e.g. logger forms, acquisition, etc. can so something much more bespoke.

For real time, will need quite different behaviour to offline. Datablocks with a effortProvider are going to notify this and a local list will be kept of starts and ends for the entire operation period. This will be overridden for differeing offline scenarios and bespoke cases such as logger forms (so need to get a notification in here for every data unit too !)

Author:
dg50
  • Constructor Details

    • EffortProvider

      public EffortProvider(PamDataBlock parentDataBlock)
  • Method Details

    • realTimeStart

      public abstract void realTimeStart(long timeMilliseconds)
      Notified at real time start.
      Parameters:
      timeMilliseconds -
    • realTimeStop

      public abstract void realTimeStop(long timeMilliseconds)
      notified at real time end
      Parameters:
      timeMilliseconds -
    • newData

      public abstract void newData(PamDataUnit pamDataUnit)
      Notified for real time data.
      Parameters:
      pamDataUnit -
    • getEffort

      public EffortDataUnit getEffort(long timeMilliseconds)
      Get the effort for a specific time.
      Parameters:
      timeMilliseconds -
      Returns:
      Effort thing. Can be null if off effort.
    • viewerLoadData

      public abstract void viewerLoadData()
      Called when viewer data have been loaded for the parent datablock.
    • getAllEffortThings

      public abstract List<EffortDataUnit> getAllEffortThings()
      Get all effort things. e.g. for binary data this is more or less a copy of the datamap (perhaps new units without the gaps).
      Returns:
    • getParentDataBlock

      public PamDataBlock getParentDataBlock()
      Returns:
      the parentDataBlock
    • getDataSelector

      public abstract DataSelector getDataSelector(String selectorName)
      Get a data selector. For specialist effort modules, this will probably call through to the datablocks data selection system. Others, such as binaryEffortProvider can return null since they are either on or off.
      Parameters:
      selectorName -
      Returns:
    • getName

      public abstract String getName()
      Get the name of this effort provider.
    • getSymbolManager

      public abstract PamSymbolManager getSymbolManager()
      Get a symbol manager. For specialist effort modules, this will probably call through to the datablocks existing symbol management system. Others, such as binaryEffortProvider will need a chooser for the simple on/off data types. .
      Returns:
    • getSymbolChooser

      public PamSymbolChooser getSymbolChooser(String chooserName, GeneralProjector projector)
    • getPamSymbol

      public PamSymbol getPamSymbol(String symbolChooserName, PamDataUnit dataUnit, GeneralProjector projector)
    • getPamSymbol

      public PamSymbol getPamSymbol(PamSymbolChooser chooser, PamDataUnit dataUnit)
      Need to use this to get symbols for effort instead of direct calls into the symbol chooser, since the symbol chooser will almost definitely want it's own type of data unit, NOT the EffortDataUnit which will probably crash due to a cast exception.
      Parameters:
      chooser -
      dataUnit -
      Returns:
    • showOptionsDialog

      public boolean showOptionsDialog(Window parent, String observerName)
    • isViewer

      public boolean isViewer()
      Returns:
      the isViewer
    • getLastEffort

      public EffortDataUnit getLastEffort()