mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-25 08:32:32 +00:00
Update for batch GLF
update to allow batch processing of GLF files. Also requires latest Tritech plugin and updated batch processing module.
This commit is contained in:
parent
21b4bc130d
commit
052c167360
@ -878,6 +878,7 @@ public class AcquisitionControl extends RawInputControlledUnit implements PamSet
|
||||
public InputStoreInfo getStoreInfo(boolean detail) {
|
||||
return getDaqProcess().getStoreInfo(detail);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setAnalysisStartTime(long startTime) {
|
||||
return getDaqProcess().setAnalysisStartTime(startTime);
|
||||
|
@ -65,7 +65,7 @@ import pamScrollSystem.ViewLoadObserver;
|
||||
* @see PamguardMVC.PamDataUnit
|
||||
*
|
||||
*/
|
||||
public class AcquisitionProcess extends PamProcess implements DataInputStore {
|
||||
public class AcquisitionProcess extends PamProcess {
|
||||
|
||||
public static final int LASTDATA = 2; // don't use zero since need to see if no notification has been received.
|
||||
|
||||
@ -1235,7 +1235,6 @@ public class AcquisitionProcess extends PamProcess implements DataInputStore {
|
||||
return daqStatusDataBlock;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStoreInfo getStoreInfo(boolean detail) {
|
||||
if (runningSystem instanceof DataInputStore) {
|
||||
return ((DataInputStore) runningSystem).getStoreInfo(detail);
|
||||
@ -1245,7 +1244,6 @@ public class AcquisitionProcess extends PamProcess implements DataInputStore {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setAnalysisStartTime(long startTime) {
|
||||
if (runningSystem instanceof DataInputStore) {
|
||||
return ((DataInputStore) runningSystem).setAnalysisStartTime(startTime);
|
||||
|
@ -28,4 +28,11 @@ public interface DataInputStore {
|
||||
*/
|
||||
public boolean setAnalysisStartTime(long startTime);
|
||||
|
||||
/**
|
||||
* Very specific command handler for batch status which will only work
|
||||
* with the acquisition folderinputSystem or the tritech file processing.
|
||||
* @return
|
||||
*/
|
||||
public String getBatchStatus();
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,10 @@
|
||||
package PamController.command;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import Acquisition.AcquisitionControl;
|
||||
import PamController.DataInputStore;
|
||||
import PamController.PamControlledUnit;
|
||||
import PamController.PamController;
|
||||
import offlineProcessing.OfflineTaskManager;
|
||||
import pamViewFX.PamControlledGUIFX;
|
||||
@ -35,7 +39,16 @@ public class BatchStatusCommand extends ExtCommand {
|
||||
}
|
||||
|
||||
private String getNormalModeStatus(String command) {
|
||||
AcquisitionControl daqControl = (AcquisitionControl) PamController.getInstance().findControlledUnit(AcquisitionControl.class, null);
|
||||
/**
|
||||
* find a controlled unit thats a DataInputSource which should either be a sound daq or a Tritech daq module.
|
||||
*/
|
||||
ArrayList<PamControlledUnit> inputSources = PamController.getInstance().findControlledUnits(DataInputStore.class, true);
|
||||
if (inputSources.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
// DataInputStore daqControl = (DataInputStore) PamController.getInstance().findControlledUnit(DataInputStore.class, null);
|
||||
DataInputStore daqControl = (DataInputStore) inputSources.get(0);
|
||||
// System.out.println("Getting batch status from : " + daqControl);
|
||||
if (daqControl == null) {
|
||||
return null;
|
||||
}
|
||||
|
@ -60,17 +60,19 @@ public class FileList {
|
||||
// System.out.println("Adding files from folder " + folder.getAbsolutePath());
|
||||
// first go through all the files in this folder
|
||||
File[] newFiles = folder.listFiles(fileFilter);
|
||||
if (newFiles == null) {
|
||||
return fileList; // nothing to do here.
|
||||
}
|
||||
for (int i = 0; i < newFiles.length; i++) {
|
||||
if (!newFiles[i].isDirectory()) {
|
||||
fileList.add(newFiles[i]);
|
||||
// System.out.println(" adding file " + newFiles[i].getName());
|
||||
// System.out.println(" adding file " + newFiles[i].getName());
|
||||
}
|
||||
else if (includeSubFolders) {
|
||||
fileList = addFiles(newFiles[i], fileList, fileFilter, includeSubFolders);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return fileList;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user