Class RecorderTriggerData

java.lang.Object
SoundRecorder.trigger.RecorderTriggerData
All Implemented Interfaces:
Serializable, Cloneable, ManagedParameters
Direct Known Subclasses:
ClickRecorderTriggerData, WMRecorderTriggerData

public class RecorderTriggerData extends Object implements Serializable, Cloneable, ManagedParameters
Information for triggered recordings to tell each recorder how long a recording it should make.

If a recording is already running when a RecorderTrigger is sent, then the recording will continue, ending at the later of the existing stop time (if recoring on a timer or on a different trigger) or the time indicated in RecorderTriggerData. If a continuous recording is being made, then that recording will simply continue.

If no recording is being made, then the recorder will take data from the buffer for secondsBeforeTrigger seconds to add to the start of the recording. Note that recordings NEVER overlap, so if secondsBeforeTrigger were set to say, 30s, and the previous recoridng had only ended 10 seconds earlier, then only 10s of data will be taken from the buffer.

Each recorder will ensure that adequate raw audio data is stored in the source data block to satisfy secondsBeforeTrigger in every trigger. Therefore, if secondsBeforeTrigger is set to a large value, excessive amounts of memory may be required to store the data, particularly at high frequencies.

Information from RecorderTriggerData is read when the recording is made, so it is possible to update the fields secondsBeforeTrigger and secondsAfterTrigger after the RecorderTrigger has been registered with the recorders, although time may be required for the buffer to fill if secondsBeforeTrigger is increased.

Author:
Doug Gillespie
See Also:
  • Field Details Link icon

  • Constructor Details Link icon

    • RecorderTriggerData Link icon

      public RecorderTriggerData(String triggerName, double secondsBeforeTrigger, double secondsAfterTrigger)
  • Method Details Link icon

    • getDecisionMaker Link icon

      public TriggerDecisionMaker getDecisionMaker()
    • clone Link icon

      public RecorderTriggerData clone()
    • getSecondsBeforeTrigger Link icon

      public double getSecondsBeforeTrigger()
      Returns:
      the secondsBeforeTrigger
    • setSecondsBeforeTrigger Link icon

      public void setSecondsBeforeTrigger(double secondsBeforeTrigger)
      Parameters:
      secondsBeforeTrigger - the secondsBeforeTrigger to set
    • getSecondsAfterTrigger Link icon

      public double getSecondsAfterTrigger()
      Returns:
      the secondsAfterTrigger
    • setSecondsAfterTrigger Link icon

      public void setSecondsAfterTrigger(double secondsAfterTrigger)
      Parameters:
      secondsAfterTrigger - the secondsAfterTrigger to set
    • getMinDetectionCount Link icon

      public int getMinDetectionCount()
      Returns:
      the minDetectionCount
    • setMinDetectionCount Link icon

      public void setMinDetectionCount(int minDetectionCount)
      Parameters:
      minDetectionCount - the minDetectionCount to set
    • getCountSeconds Link icon

      public int getCountSeconds()
      Returns:
      the countSeconds
    • setCountSeconds Link icon

      public void setCountSeconds(int countSeconds)
      Parameters:
      countSeconds - the countSeconds to set
    • getMinGapBetweenTriggers Link icon

      public int getMinGapBetweenTriggers()
      Returns:
      the minGapBetweenTriggers
    • setMinGapBetweenTriggers Link icon

      public void setMinGapBetweenTriggers(int minGapBetweenTriggers)
      Parameters:
      minGapBetweenTriggers - the minGapBetweenTriggers to set
    • getMaxTotalTriggerLength Link icon

      public int getMaxTotalTriggerLength()
      Returns:
      the maxTotalTriggerLength
    • setMaxTotalTriggerLength Link icon

      public void setMaxTotalTriggerLength(int maxTotalTriggerLength)
      Parameters:
      maxTotalTriggerLength - the maxTotalTriggerLength to set
    • getTriggerName Link icon

      public String getTriggerName()
      Returns:
      the triggerName
    • setEnabled Link icon

      public void setEnabled(boolean enabled)
      Parameters:
      enabled - the enabled to set
    • isEnabled Link icon

      public boolean isEnabled()
      Returns:
      the enabled
    • setDayBudgetMB Link icon

      public void setDayBudgetMB(int dayBudgetMB)
      Parameters:
      dayBudgetMB - the dayBudgetMB to set
    • getDayBudgetMB Link icon

      public int getDayBudgetMB()
      Returns:
      the dayBudgetMB
    • getSummaryString Link icon

      public String getSummaryString()
    • getParameterSet Link icon

      public PamParameterSet getParameterSet()
      Get the auto-generated parameter set, and then add in the fields that are not included because they are not public and do not have getters. Note: for each field, we search the current class and (if that fails) the superclass. It's done this way because RecorderTriggerData might be used directly (and thus the field would be found in the class) and it also might be used as a superclass to something else (e.g. WMRecorderTriggerData) in which case the field would only be found in the superclass.
      Specified by:
      getParameterSet in interface ManagedParameters
      Returns:
      description of the parameters in a class.