|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectAcquisition.DaqSystem
Acquisition.FileInputSystem
Acquisition.FolderInputSystem
public class FolderInputSystem
Read multiple files in sequence. Options exist to either pause and restart analysis after each file, or to merge files into one long continuous sound stream.
| Nested Class Summary | |
|---|---|
(package private) class |
FolderInputSystem.CheckFiles
|
(package private) class |
FolderInputSystem.FindAudioFolder
|
(package private) class |
FolderInputSystem.RestartTimer
|
| Nested classes/interfaces inherited from class Acquisition.FileInputSystem |
|---|
FileInputSystem.CollectorThread |
| Field Summary | |
|---|---|
private java.util.ArrayList<java.io.File> |
allFiles
|
private PamFileFilter |
audioFileFilter
|
(package private) javax.swing.JPanel |
barBit
|
private javax.swing.JButton |
checkFiles
|
private int |
currentFile
|
(package private) long |
currentFileStart
|
private long |
eta
|
private FolderInputParameters |
folderInputParameters
|
(package private) javax.swing.JProgressBar |
folderProgress
|
private javax.swing.JCheckBox |
mergeFiles
|
private javax.swing.Timer |
newFileTimer
|
private boolean |
running
|
private javax.swing.JCheckBox |
subFolders
|
| Fields inherited from class Acquisition.FileInputSystem |
|---|
acquisitionControl, acquisitionDialog, audioFormat, audioStream, collectorThread, fileDate, fileDateMillis, fileDateText, fileInputParameters, fileLength, fileName, fileSamples, fileSelect, fileStartTime, nChannels, newDataUnits, readFileSamples, repeat, sampleRate, startTimeMS, statusPanel, theThread |
| Fields inherited from class Acquisition.DaqSystem |
|---|
PARAMETER_FIXED, PARAMETER_UNKNOWN, STREAM_CLOSED, STREAM_ENDED, STREAM_OPEN, STREAM_PAUSED, STREAM_RUNNING |
| Constructor Summary | |
|---|---|
FolderInputSystem()
|
|
| Method Summary | |
|---|---|
(package private) void |
addFolderFiles(java.io.File folder)
|
private void |
checkFileHeaders()
Checks file length matched actual file data length and repairs if necessary. |
protected javax.swing.JPanel |
createDaqDialogPanel()
|
void |
daqHasEnded()
Called after DAQ has stopped - for whatever reason. |
boolean |
dialogGetParams()
Called by AcquisitionDialog.GetParams so that parameters can be extracted from the dialog component. |
void |
dialogSetParams()
Called by AcquisitionDialog.SetParams so that the dialog componenet can update it's fields |
PamFileFilter |
getAudioFileFilter()
|
java.io.File |
getCurrentFile()
|
protected java.lang.String |
getCurrentFolder()
|
java.lang.String |
getDeviceName()
Gets a name for the acquisition device (may just be a number but need to generalise). |
long |
getEta()
|
FolderInputParameters |
getFolderInputParameters()
|
java.io.Serializable |
getSettingsReference()
|
long |
getSettingsVersion()
|
java.awt.Component |
getStatusBarComponent()
|
java.lang.String |
getSystemType()
|
java.lang.String |
getUnitName()
|
java.lang.String |
getUnitType()
|
void |
interpretNewFile(java.lang.String newFile)
|
(package private) int |
makeSelFileList()
|
(package private) int |
makeSelFileList(java.io.File[] fileList)
|
(package private) int |
makeSelFileList(java.lang.String fileOrFolder)
|
protected boolean |
openNextFile()
|
boolean |
restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
|
boolean |
runFileAnalysis()
|
protected void |
selectFolder()
|
void |
setAudioFileFilter(PamFileFilter audioFileFilter)
|
void |
setFileDateText()
|
void |
setFolderInputParameters(FolderInputParameters folderInputParameters)
|
private void |
setFolderProgress()
|
boolean |
startSystem(AcquisitionControl daqControl)
Start the DaqSystem. |
| Methods inherited from class Acquisition.FileInputSystem |
|---|
actionPerformed, addComponent, bytesToSamples, canPlayBack, getChannels, getDaqSpecificDialogComponent, getDataUnitSamples, getMaxChannels, getMaxSampleRate, getPeak2PeakVoltage, getSample, getSampleRate, getSystemName, isRealTime, prepareInputFile, prepareSystem, sayEta, sayEta, selectFile, setNewFile, setStreamStatus, stopSystem, systemHasStopped |
| Methods inherited from class Acquisition.DaqSystem |
|---|
areSampleSettingsOk, getDaqSpecificChannelListPanel, getInputChannelMap, getPlaybackSystem, getStreamStatus, setSelected, showSampleSettingsDialog, supportsChannelLists |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private boolean running
private java.util.ArrayList<java.io.File> allFiles
private int currentFile
private PamFileFilter audioFileFilter
private javax.swing.Timer newFileTimer
private javax.swing.JCheckBox subFolders
private javax.swing.JCheckBox mergeFiles
private javax.swing.JButton checkFiles
private long eta
private FolderInputParameters folderInputParameters
long currentFileStart
javax.swing.JPanel barBit
javax.swing.JProgressBar folderProgress
| Constructor Detail |
|---|
public FolderInputSystem()
| Method Detail |
|---|
public boolean runFileAnalysis()
runFileAnalysis in class FileInputSystemprotected javax.swing.JPanel createDaqDialogPanel()
createDaqDialogPanel in class FileInputSystemprivate void checkFileHeaders()
int makeSelFileList()
int makeSelFileList(java.lang.String fileOrFolder)
int makeSelFileList(java.io.File[] fileList)
void addFolderFiles(java.io.File folder)
protected void selectFolder()
protected java.lang.String getCurrentFolder()
public void interpretNewFile(java.lang.String newFile)
interpretNewFile in class FileInputSystempublic void setFileDateText()
public java.lang.String getSystemType()
getSystemType in class FileInputSystemCalling functions should be able to handle 'null'
public java.lang.String getUnitName()
getUnitName in interface PamSettingsgetUnitName in class FileInputSystempublic java.lang.String getUnitType()
getUnitType in interface PamSettingsgetUnitType in class FileInputSystempublic java.io.File getCurrentFile()
getCurrentFile in class FileInputSystemprotected boolean openNextFile()
openNextFile in class FileInputSystempublic void daqHasEnded()
DaqSystem
daqHasEnded in class FileInputSystemprivate void setFolderProgress()
public java.awt.Component getStatusBarComponent()
getStatusBarComponent in class FileInputSystempublic long getEta()
getEta in class FileInputSystempublic java.io.Serializable getSettingsReference()
getSettingsReference in interface PamSettingsgetSettingsReference in class FileInputSystempublic long getSettingsVersion()
getSettingsVersion in interface PamSettingsgetSettingsVersion in class FileInputSystempublic boolean dialogGetParams()
DaqSystem
dialogGetParams in class FileInputSystempublic void dialogSetParams()
DaqSystem
dialogSetParams in class FileInputSystempublic boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
restoreSettings in interface PamSettingsrestoreSettings in class FileInputSystempublic FolderInputParameters getFolderInputParameters()
public void setFolderInputParameters(FolderInputParameters folderInputParameters)
public boolean startSystem(AcquisitionControl daqControl)
DaqSystemMost things should be ready from the call to PrepareSystem. In StartSystem you will generally need to start a thread which will read in the data and place PamDataUnits in a buffer from where they are read by the main thred and passed on to other Pam modules for processing (see SoundCardSystem for an example)
startSystem in class FileInputSystemdaqControl - AcquisitionControl unit.
public void setAudioFileFilter(PamFileFilter audioFileFilter)
audioFileFilter - the audioFileFilter to setpublic PamFileFilter getAudioFileFilter()
public java.lang.String getDeviceName()
DaqSystem
getDeviceName in class FileInputSystem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||