mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-22 07:02:29 +00:00
Merge branch 'main' of https://github.com/PAMGuard/PAMGuard.git into main
This commit is contained in:
commit
44c04f67c7
@ -878,6 +878,7 @@ public class AcquisitionControl extends RawInputControlledUnit implements PamSet
|
|||||||
public InputStoreInfo getStoreInfo(boolean detail) {
|
public InputStoreInfo getStoreInfo(boolean detail) {
|
||||||
return getDaqProcess().getStoreInfo(detail);
|
return getDaqProcess().getStoreInfo(detail);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean setAnalysisStartTime(long startTime) {
|
public boolean setAnalysisStartTime(long startTime) {
|
||||||
return getDaqProcess().setAnalysisStartTime(startTime);
|
return getDaqProcess().setAnalysisStartTime(startTime);
|
||||||
|
@ -65,7 +65,7 @@ import pamScrollSystem.ViewLoadObserver;
|
|||||||
* @see PamguardMVC.PamDataUnit
|
* @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.
|
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;
|
return daqStatusDataBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public InputStoreInfo getStoreInfo(boolean detail) {
|
public InputStoreInfo getStoreInfo(boolean detail) {
|
||||||
if (runningSystem instanceof DataInputStore) {
|
if (runningSystem instanceof DataInputStore) {
|
||||||
return ((DataInputStore) runningSystem).getStoreInfo(detail);
|
return ((DataInputStore) runningSystem).getStoreInfo(detail);
|
||||||
@ -1250,7 +1249,6 @@ public class AcquisitionProcess extends PamProcess implements DataInputStore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean setAnalysisStartTime(long startTime) {
|
public boolean setAnalysisStartTime(long startTime) {
|
||||||
if (runningSystem instanceof DataInputStore) {
|
if (runningSystem instanceof DataInputStore) {
|
||||||
return ((DataInputStore) runningSystem).setAnalysisStartTime(startTime);
|
return ((DataInputStore) runningSystem).setAnalysisStartTime(startTime);
|
||||||
|
@ -28,4 +28,11 @@ public interface DataInputStore {
|
|||||||
*/
|
*/
|
||||||
public boolean setAnalysisStartTime(long startTime);
|
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;
|
package PamController.command;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import Acquisition.AcquisitionControl;
|
import Acquisition.AcquisitionControl;
|
||||||
|
import PamController.DataInputStore;
|
||||||
|
import PamController.PamControlledUnit;
|
||||||
import PamController.PamController;
|
import PamController.PamController;
|
||||||
import offlineProcessing.OfflineTaskManager;
|
import offlineProcessing.OfflineTaskManager;
|
||||||
import pamViewFX.PamControlledGUIFX;
|
import pamViewFX.PamControlledGUIFX;
|
||||||
@ -35,7 +39,16 @@ public class BatchStatusCommand extends ExtCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getNormalModeStatus(String command) {
|
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) {
|
if (daqControl == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,9 @@ public class FileList {
|
|||||||
// System.out.println("Adding files from folder " + folder.getAbsolutePath());
|
// System.out.println("Adding files from folder " + folder.getAbsolutePath());
|
||||||
// first go through all the files in this folder
|
// first go through all the files in this folder
|
||||||
File[] newFiles = folder.listFiles(fileFilter);
|
File[] newFiles = folder.listFiles(fileFilter);
|
||||||
|
if (newFiles == null) {
|
||||||
|
return fileList; // nothing to do here.
|
||||||
|
}
|
||||||
for (int i = 0; i < newFiles.length; i++) {
|
for (int i = 0; i < newFiles.length; i++) {
|
||||||
if (!newFiles[i].isDirectory()) {
|
if (!newFiles[i].isDirectory()) {
|
||||||
fileList.add(newFiles[i]);
|
fileList.add(newFiles[i]);
|
||||||
@ -70,7 +73,6 @@ public class FileList {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return fileList;
|
return fileList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user