public class RecorderTriggerData
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
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.
RecorderTrigger
,
RecorderControl
,
Serialized FormModifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
Constructor and Description |
---|
RecorderTriggerData(java.lang.String triggerName,
double secondsBeforeTrigger,
double secondsAfterTrigger) |
Modifier and Type | Method and Description |
---|---|
RecorderTriggerData |
clone() |
boolean |
fillXMLParameters(org.w3c.dom.Document doc,
org.w3c.dom.Element paramsEl)
Fill XML parameters.
|
int |
getCountSeconds() |
int |
getDayBudgetMB() |
TriggerDecisionMaker |
getDecisionMaker() |
int |
getMaxTotalTriggerLength() |
int |
getMinDetectionCount() |
int |
getMinGapBetweenTriggers() |
double |
getSecondsAfterTrigger() |
double |
getSecondsBeforeTrigger() |
java.lang.String |
getSummaryString() |
java.lang.String |
getTriggerName() |
boolean |
isEnabled() |
void |
setCountSeconds(int countSeconds) |
void |
setDayBudgetMB(int dayBudgetMB) |
void |
setEnabled(boolean enabled) |
void |
setMaxTotalTriggerLength(int maxTotalTriggerLength) |
void |
setMinDetectionCount(int minDetectionCount) |
void |
setMinGapBetweenTriggers(int minGapBetweenTriggers) |
void |
setSecondsAfterTrigger(double secondsAfterTrigger) |
void |
setSecondsBeforeTrigger(double secondsBeforeTrigger) |
public static final long serialVersionUID
public RecorderTriggerData(java.lang.String triggerName, double secondsBeforeTrigger, double secondsAfterTrigger)
public TriggerDecisionMaker getDecisionMaker()
public RecorderTriggerData clone()
clone
in class java.lang.Object
public double getSecondsBeforeTrigger()
public void setSecondsBeforeTrigger(double secondsBeforeTrigger)
secondsBeforeTrigger
- the secondsBeforeTrigger to setpublic double getSecondsAfterTrigger()
public void setSecondsAfterTrigger(double secondsAfterTrigger)
secondsAfterTrigger
- the secondsAfterTrigger to setpublic int getMinDetectionCount()
public void setMinDetectionCount(int minDetectionCount)
minDetectionCount
- the minDetectionCount to setpublic int getCountSeconds()
public void setCountSeconds(int countSeconds)
countSeconds
- the countSeconds to setpublic int getMinGapBetweenTriggers()
public void setMinGapBetweenTriggers(int minGapBetweenTriggers)
minGapBetweenTriggers
- the minGapBetweenTriggers to setpublic int getMaxTotalTriggerLength()
public void setMaxTotalTriggerLength(int maxTotalTriggerLength)
maxTotalTriggerLength
- the maxTotalTriggerLength to setpublic java.lang.String getTriggerName()
public void setEnabled(boolean enabled)
enabled
- the enabled to setpublic boolean isEnabled()
public void setDayBudgetMB(int dayBudgetMB)
dayBudgetMB
- the dayBudgetMB to setpublic int getDayBudgetMB()
public java.lang.String getSummaryString()
public boolean fillXMLParameters(org.w3c.dom.Document doc, org.w3c.dom.Element paramsEl)
doc
- paramsEl
-