Class TriggerDecisionMaker

java.lang.Object
SoundRecorder.trigger.TriggerDecisionMaker

public class TriggerDecisionMaker extends Object
Basic recorder trigger which can be re-implemented in many guises.

Contains basic code for

a) requiring a minimum number of detections in a set time b) can limit total length of a recording c) can force a minimum gap between recordings.

Author:
Doug Gillespie
  • Constructor Details

  • Method Details

    • canRecord

      public double canRecord(RecorderTriggerData rtData, long timeNow, int nChan, float sampleRate, int nBytes)
      Work out whether or not a recording can be made. If it can, the maximum length of the recording in seconds is returned, otherwise, 0 or a negative number.
      Parameters:
      timeNow - current data time in milliseconds
      nChan - number of channels
      sampleRate - sample rate for the recording
      Returns:
      +ve number of seconds to record, or invalid input: '<'=0 for no recording.
    • setMessage

      public void setMessage(String message)
      Parameters:
      message - the message to set
    • getMessage

      public String getMessage()
      Returns:
      the message