Package effort
Class EffortProvider
java.lang.Object
effort.EffortProvider
- Direct Known Subclasses:
DataMapEffortProvider
,GpsEffortProvider
,LoggerEffortProvider
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract List<EffortDataUnit>
Get all effort things.abstract DataSelector
getDataSelector
(String selectorName) Get a data selector.getEffort
(long timeMilliseconds) Get the effort for a specific time.abstract String
getName()
Get the name of this effort provider.getPamSymbol
(String symbolChooserName, PamDataUnit dataUnit, GeneralProjector projector) 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.getSymbolChooser
(String chooserName, GeneralProjector projector) abstract PamSymbolManager
Get a symbol manager.boolean
isViewer()
abstract void
newData
(PamDataUnit pamDataUnit) Notified for real time data.abstract void
realTimeStart
(long timeMilliseconds) Notified at real time start.abstract void
realTimeStop
(long timeMilliseconds) notified at real time endboolean
showOptionsDialog
(Window parent, String observerName) abstract void
Called when viewer data have been loaded for the parent datablock.
-
Constructor Details
-
EffortProvider
-
-
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
Notified for real time data.- Parameters:
pamDataUnit
-
-
getEffort
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
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
- Returns:
- the parentDataBlock
-
getDataSelector
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
Get the name of this effort provider. -
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
-
getPamSymbol
public PamSymbol getPamSymbol(String symbolChooserName, PamDataUnit dataUnit, GeneralProjector projector) -
getPamSymbol
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
-
isViewer
public boolean isViewer()- Returns:
- the isViewer
-
getLastEffort
-