This commit is contained in:
Douglas Gillespie 2024-03-12 13:45:10 +00:00
commit 44c04f67c7
5 changed files with 28 additions and 7 deletions

View File

@ -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);

View File

@ -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.
@ -1240,7 +1240,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);
@ -1250,7 +1249,6 @@ public class AcquisitionProcess extends PamProcess implements DataInputStore {
}
}
@Override
public boolean setAnalysisStartTime(long startTime) {
if (runningSystem instanceof DataInputStore) {
return ((DataInputStore) runningSystem).setAnalysisStartTime(startTime);

View File

@ -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();
}

View File

@ -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;
}

View File

@ -60,6 +60,9 @@ 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]);
@ -70,7 +73,6 @@ public class FileList {
}
}
return fileList;
}
}