Class FilteredDetectionWriter
java.lang.Object
likelihoodDetectionModule.thresholdDetector.FilteredDetectionWriter
- All Implemented Interfaces:
FilteredConsumer
This class tracks detections (after the DetectionFilter has done its business) when they are active, collecting statistics such as
startTime, duration, and the peak time/energy values. When a detection has finished, we output a ThresholdDetectorDataUnit.
- Author:
- Dave Flogeras
-
Constructor Summary
ConstructorDescriptionFilteredDetectionWriter
(PamDataBlock<ThresholdDetectorDataUnit> outputBlock, ArrayList<SignalBand> signalBands, String targetIdentifier, double estimatedPeakTimeAccuracy) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
endDetection
(DetectionKey key) This method is called to end an existing detection pre-condition: startDetection has been previously called with the same channelMask/band.void
This method is called when a new detection starts on the given channel and bandboolean
updateDetection
(DetectionKey key, NormalizedDataUnit ndu) This method is called to append a DetectionEvent to a running detection pre-condition: startDetection has been called for the given key (channelMask and band) At least one update will be given per detection.
-
Constructor Details
-
FilteredDetectionWriter
public FilteredDetectionWriter(PamDataBlock<ThresholdDetectorDataUnit> outputBlock, ArrayList<SignalBand> signalBands, String targetIdentifier, double estimatedPeakTimeAccuracy) Constructor- Parameters:
outputBlock
- The output block we will put our ThresholdDetectionDataUnits intosignalBands
- A list of SignalBands. Their order is the same order that the data[] field in the NormalizedDataUnit.targetIdentifier
- The identifier for this target. This is concatenated with the band identifier to create a detection type.estimatedPeakTimeAccuracy
-
-
-
Method Details
-
startDetection
Description copied from interface:FilteredConsumer
This method is called when a new detection starts on the given channel and band- Specified by:
startDetection
in interfaceFilteredConsumer
- Parameters:
key
- The key associated with the starting detection
-
updateDetection
Description copied from interface:FilteredConsumer
This method is called to append a DetectionEvent to a running detection pre-condition: startDetection has been called for the given key (channelMask and band) At least one update will be given per detection.- Specified by:
updateDetection
in interfaceFilteredConsumer
- Parameters:
key
- The key of the detectionndu
- The data for the update.- Returns:
- true if successfully updates, false otherwise (ie. an event arrived for a channelMask/band that wasn't previously started
-
endDetection
Description copied from interface:FilteredConsumer
This method is called to end an existing detection pre-condition: startDetection has been previously called with the same channelMask/band. Ignores the request if the key had not been started.- Specified by:
endDetection
in interfaceFilteredConsumer
- Parameters:
key
- The key associated with the ending detection.
-