From 9d467593de1f656670f81d0539e97027d543ac1a Mon Sep 17 00:00:00 2001
From: Douglas Gillespie <50671166+douggillespie@users.noreply.github.com>
Date: Thu, 20 Jun 2024 10:10:06 +0100
Subject: [PATCH 1/4] Big merge from doug (#139)
* binary store count
Fix issue in binary store object count
* update V10aa/other for testing
* update V10aa/other for testing
* reenable buffer dumping
* update V to 10ac for testing
* Additional diagnostics
Additional output of CPU usage for each module when stopping
* V 2.02.10ad for testing
Fixed issue of finding correct raw data block
* Tidying
Lots of GUI improvement and code tidying. Functionality to export
gzipped documents to reduce traffic.
* V 2.02.10ba for user testing
* Tidy up click selector
Improve layout and tips on dialog and improve logic for manual and
automatic event types.
* Menu tide up
* Update nilus maven for PAMGuard
* Fix reprocess choices
Make sure the choice to continue anyway is always present.
* Improve start of binary file timing
Code to better get binary files to start right on the hour when processing files offline rather than half a sec or so later.
* Fix early data discard
Fix issue in clip generator: when running very fast offline raw data being discarded before clips are generated. Changed threading model slightly and increased data keep time by 2x the thread jitter to try to avoid this.
* Update pom to JSerialCom 2.11.0
* V2.02.11e fix file start skip
Skipping start of files was causing click detector to not find clicks. Changed code so first seconds are still sent, but with data set to 0, rather than not sending data since that was causing sample counts in different bits of PAMGuard to get out of synch.
---
.classpath | 1 -
pom.xml | 4 +-
src/Acquisition/FileInputSystem.java | 7 +-
src/PamController/PamController.java | 17 ++++
src/PamController/PamguardVersionInfo.java | 4 +-
.../fileprocessing/ReprocessChoiceDialog.java | 15 ++++
.../fileprocessing/ReprocessManager.java | 4 +-
.../fileprocessing/StoreChoiceSummary.java | 3 +
src/PamUtils/PamCalendar.java | 10 ++-
src/PamguardMVC/PamRawDataBlock.java | 23 ++++--
.../RawDataUnavailableException.java | 26 ++++++-
src/PamguardMVC/ThreadedObserver.java | 2 +
src/binaryFileStorage/BinaryStore.java | 13 +++-
src/binaryFileStorage/BinaryStoreProcess.java | 77 ++++++++++++++-----
src/clickDetector/ClickDetector.java | 4 +-
src/clipgenerator/ClipProcess.java | 28 ++++++-
src/tethys/dbxml/DBXMLConnect.java | 3 +-
17 files changed, 189 insertions(+), 52 deletions(-)
diff --git a/.classpath b/.classpath
index 49faf461..053df83d 100644
--- a/.classpath
+++ b/.classpath
@@ -5,7 +5,6 @@
-
diff --git a/pom.xml b/pom.xml
index dd3572a4..d09a31fd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
org.pamguard
Pamguard
- 2.02.11d
+ 2.02.11e
Pamguard
Pamguard using Maven to control dependencies
www.pamguard.org
@@ -579,7 +579,7 @@
com.fazecast
jSerialComm
- 2.5.3
+ 2.11.0
diff --git a/src/Acquisition/FileInputSystem.java b/src/Acquisition/FileInputSystem.java
index 33779534..b4678913 100644
--- a/src/Acquisition/FileInputSystem.java
+++ b/src/Acquisition/FileInputSystem.java
@@ -15,6 +15,7 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.Serializable;
import java.text.DateFormat;
+import java.util.Arrays;
import java.util.Calendar;
import java.util.List;
@@ -1017,9 +1018,11 @@ public class FileInputSystem extends DaqSystem implements ActionListener, PamSe
newDataUnit = new RawDataUnit(ms, 1 << ichan, totalSamples, newSamples);
newDataUnit.setRawData(doubleData[ichan]);
- if (1000*(readFileSamples/sampleRate)>=fileInputParameters.skipStartFileTime) {
- newDataUnits.addNewData(newDataUnit);
+ if (1000*(readFileSamples/sampleRate) bs = findControlledUnits(BinaryStore.class);
+ for (PamControlledUnit aBS : bs) {
+ BinaryStore binStore = (BinaryStore) aBS;
+ binStore.getBinaryStoreProcess().checkFileTime(timeInMillis);
+ }
+ }
+
}
diff --git a/src/PamController/PamguardVersionInfo.java b/src/PamController/PamguardVersionInfo.java
index b40c4afa..d1cee5f8 100644
--- a/src/PamController/PamguardVersionInfo.java
+++ b/src/PamController/PamguardVersionInfo.java
@@ -31,12 +31,12 @@ public class PamguardVersionInfo {
* Version number, major version.minorversion.sub-release.
* Note: can't go higher than sub-release 'f'
*/
- static public final String version = "2.02.11d";
+ static public final String version = "2.02.11e";
/**
* Release date
*/
- static public final String date = "30 May 2024";
+ static public final String date = "19 June 2024";
// /**
// * Release type - Beta or Core
diff --git a/src/PamController/fileprocessing/ReprocessChoiceDialog.java b/src/PamController/fileprocessing/ReprocessChoiceDialog.java
index f2b9eee5..985fbb99 100644
--- a/src/PamController/fileprocessing/ReprocessChoiceDialog.java
+++ b/src/PamController/fileprocessing/ReprocessChoiceDialog.java
@@ -4,6 +4,8 @@ import java.awt.BorderLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Window;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
import java.util.List;
import javax.swing.ButtonGroup;
@@ -64,15 +66,28 @@ public class ReprocessChoiceDialog extends PamDialog {
List userChoices = choiceSummary.getChoices();
choiceButtons = new JRadioButton[userChoices.size()];
ButtonGroup bg = new ButtonGroup();
+ SelAction selAction = new SelAction();
for (int i = 0; i < userChoices.size(); i++) {
ReprocessStoreChoice aChoice = userChoices.get(i);
choiceButtons[i] = new JRadioButton(aChoice.toString());
choiceButtons[i].setToolTipText(aChoice.getToolTip());
+ bg.add(choiceButtons[i]);
+ choiceButtons[i].addActionListener(selAction);
choicePanel.add(choiceButtons[i], c);
c.gridy++;
}
setDialogComponent(mainPanel);
getCancelButton().setVisible(false);
+ getOkButton().setEnabled(false);
+ }
+
+ private class SelAction implements ActionListener {
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ getOkButton().setEnabled(true);
+ }
+
}
public static ReprocessStoreChoice showDialog(Window parentFrame, StoreChoiceSummary choices) {
diff --git a/src/PamController/fileprocessing/ReprocessManager.java b/src/PamController/fileprocessing/ReprocessManager.java
index 4f05913a..b4e8c395 100644
--- a/src/PamController/fileprocessing/ReprocessManager.java
+++ b/src/PamController/fileprocessing/ReprocessManager.java
@@ -62,7 +62,7 @@ public class ReprocessManager {
*/
boolean setupOK = setupInputStream(choiceSummary, choice);
- if (choice == ReprocessStoreChoice.DONTSSTART) {
+ if (choice == null || choice == ReprocessStoreChoice.DONTSSTART) {
return false;
}
@@ -172,6 +172,8 @@ public class ReprocessManager {
choiceSummary.addChoice(ReprocessStoreChoice.STARTNORMAL);
return choiceSummary;
}
+
+ choiceSummary.addChoice(ReprocessStoreChoice.STARTNORMAL);
ArrayList outputStores = PamController.getInstance().findControlledUnits(DataOutputStore.class, true);
boolean partStores = false;
diff --git a/src/PamController/fileprocessing/StoreChoiceSummary.java b/src/PamController/fileprocessing/StoreChoiceSummary.java
index f0f13c3a..571f7aa7 100644
--- a/src/PamController/fileprocessing/StoreChoiceSummary.java
+++ b/src/PamController/fileprocessing/StoreChoiceSummary.java
@@ -65,6 +65,9 @@ public class StoreChoiceSummary {
* @param choice
*/
public void addChoice(ReprocessStoreChoice choice) {
+ if (choices.contains(choice)) {
+ return;
+ }
choices.add(choice);
}
diff --git a/src/PamUtils/PamCalendar.java b/src/PamUtils/PamCalendar.java
index 2e1388f9..428130d0 100644
--- a/src/PamUtils/PamCalendar.java
+++ b/src/PamUtils/PamCalendar.java
@@ -25,6 +25,7 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
+import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
@@ -32,6 +33,7 @@ import java.util.TimeZone;
import PamController.PamController;
import PamUtils.time.CalendarControl;
+import binaryFileStorage.BinaryStore;
/**
@@ -85,7 +87,7 @@ public class PamCalendar {
* viewPositions which is the number of milliseconds from the sessionsStartTime.
*/
private static long viewPosition;
-
+
/**
* If files are being analysed, return the time based on the file
@@ -880,14 +882,18 @@ public class PamCalendar {
*/
public static void setSessionStartTime(long sessionStartTime) {
PamCalendar.sessionStartTime = sessionStartTime;
+ PamController.getInstance().updateMasterClock(getTimeInMillis());
}
/**
*
- * @param soundFileTimeMillis The start time of a sound file
+ * Relative time within a sound file. This is always just added to sessionStartTime
+ * to give an absolute time.
+ * @param soundFileTimeMillis The relative time of a sound file.
*/
public static void setSoundFileTimeInMillis(long soundFileTimeMillis) {
PamCalendar.soundFileTimeInMillis = soundFileTimeMillis;
+ PamController.getInstance().updateMasterClock(getTimeInMillis());
}
/**
diff --git a/src/PamguardMVC/PamRawDataBlock.java b/src/PamguardMVC/PamRawDataBlock.java
index f1246242..6b06ead5 100644
--- a/src/PamguardMVC/PamRawDataBlock.java
+++ b/src/PamguardMVC/PamRawDataBlock.java
@@ -257,12 +257,13 @@ public class PamRawDataBlock extends AcousticDataBlock {
synchronized public RawDataUnit[] getAvailableSamples(long startMillis, long durationMillis, int channelMap) throws RawDataUnavailableException {
RawDataUnit firstUnit = getFirstUnit();
if (firstUnit == null) {
- throw new RawDataUnavailableException(this, RawDataUnavailableException.DATA_NOT_ARRIVED, startMillis, (int) durationMillis);
+ throw new RawDataUnavailableException(this, RawDataUnavailableException.DATA_NOT_ARRIVED, 0,0, startMillis, (int) durationMillis);
}
long firstMillis = firstUnit.getTimeMilliseconds();
long firstSamples = firstUnit.getStartSample();
RawDataUnit lastUnit = getLastUnit();
long lastMillis = lastUnit.getEndTimeInMilliseconds();
+ long lastSample = lastUnit.getStartSample()+lastUnit.getSampleDuration();
long firstAvailableMillis = Math.max(firstMillis, startMillis);
@@ -272,7 +273,8 @@ public class PamRawDataBlock extends AcousticDataBlock {
double[][] data = getSamplesForMillis(firstAvailableMillis, lastAvailableMillis-firstAvailableMillis, channelMap);
if (data == null) {
// this shouldn't happen. If an exception wasn't thrown from getSamples... then data should no tb enull
- throw new RawDataUnavailableException(this, RawDataUnavailableException.DATA_NOT_ARRIVED, startMillis, (int) durationMillis);
+ throw new RawDataUnavailableException(this, RawDataUnavailableException.DATA_NOT_ARRIVED,
+ firstSamples, lastSample, startMillis, (int) durationMillis);
}
RawDataUnit[] dataUnits = new RawDataUnit[data.length];
for (int i = 0; i < data.length; i++) {
@@ -298,7 +300,7 @@ public class PamRawDataBlock extends AcousticDataBlock {
synchronized public double[][] getSamplesForMillis(long startMillis, long durationMillis, int channelMap) throws RawDataUnavailableException {
RawDataUnit firstUnit = getFirstUnit();
if (firstUnit == null) {
- throw new RawDataUnavailableException(this, RawDataUnavailableException.DATA_NOT_ARRIVED, startMillis, (int) durationMillis);
+ throw new RawDataUnavailableException(this, RawDataUnavailableException.DATA_NOT_ARRIVED, 0, 0, startMillis, (int) durationMillis);
}
long firstMillis = firstUnit.getTimeMilliseconds();
long firstSamples = firstUnit.getStartSample();
@@ -317,23 +319,28 @@ public class PamRawDataBlock extends AcousticDataBlock {
// run a few tests ...
int chanOverlap = channelMap & getChannelMap();
if (chanOverlap != channelMap) {
- throw new RawDataUnavailableException(this, RawDataUnavailableException.INVALID_CHANNEL_LIST, startSample, duration);
+ throw new RawDataUnavailableException(this, RawDataUnavailableException.INVALID_CHANNEL_LIST, 0,0,startSample, duration);
}
if (duration < 0) {
- throw new RawDataUnavailableException(this, RawDataUnavailableException.NEGATIVE_DURATION, startSample, duration);
+ throw new RawDataUnavailableException(this, RawDataUnavailableException.NEGATIVE_DURATION,0,0, startSample, duration);
}
RawDataUnit dataUnit = getFirstUnit();
if (dataUnit == null) {
return null;
}
- if (dataUnit.getStartSample() > startSample) {
+ RawDataUnit lastUnit = getLastUnit();
+ long firstSample = dataUnit.getStartSample();
+ long lastSample = lastUnit.getStartSample()+lastUnit.getSampleDuration();
+ if (firstSample > startSample) {
// System.out.println("Earliest start sample : " + dataUnit.getStartSample());
- throw new RawDataUnavailableException(this, RawDataUnavailableException.DATA_ALREADY_DISCARDED, startSample, duration);
+ throw new RawDataUnavailableException(this, RawDataUnavailableException.DATA_ALREADY_DISCARDED,
+ firstSample, lastSample, startSample, duration);
}
dataUnit = getLastUnit();
if (hasLastSample(dataUnit, startSample+duration, channelMap) == false) {
- throw new RawDataUnavailableException(this, RawDataUnavailableException.DATA_NOT_ARRIVED, startSample, duration);
+ throw new RawDataUnavailableException(this, RawDataUnavailableException.DATA_NOT_ARRIVED,
+ firstSample, lastSample, startSample, duration);
}
int nChan = PamUtils.getNumChannels(channelMap);
diff --git a/src/PamguardMVC/RawDataUnavailableException.java b/src/PamguardMVC/RawDataUnavailableException.java
index 37e4275a..524f8072 100644
--- a/src/PamguardMVC/RawDataUnavailableException.java
+++ b/src/PamguardMVC/RawDataUnavailableException.java
@@ -21,6 +21,10 @@ public class RawDataUnavailableException extends Exception {
private long startSample;
private int duration;
+
+ private long availableStart;
+
+ private long availableEnd;
/**
* @return the dataCause
*/
@@ -34,10 +38,12 @@ public class RawDataUnavailableException extends Exception {
* @param startSample
* @param cause
*/
- public RawDataUnavailableException(PamRawDataBlock rawDataBlock, int dataCause, long startSample, int duration) {
+ public RawDataUnavailableException(PamRawDataBlock rawDataBlock, int dataCause, long availStart, long availEnd, long startSample, int duration) {
super();
this.rawDataBlock = rawDataBlock;
this.dataCause = dataCause;
+ this.availableStart = availStart;
+ this.availableEnd = availEnd;
this.startSample = startSample;
this.duration = duration;
}
@@ -55,8 +61,8 @@ public class RawDataUnavailableException extends Exception {
public String getMessage() {
switch (dataCause) {
case DATA_ALREADY_DISCARDED:
- return String.format("Samples %d length %d requested from %s have already been discarded", startSample, duration,
- rawDataBlock.getDataName());
+ return String.format("Samples %d length %d requested from %s have already been discarded. %d to %d available", startSample, duration,
+ rawDataBlock.getDataName(), availableStart, availableEnd);
case DATA_NOT_ARRIVED:
return String.format("Samples %d length %d requested from %s have not yet arrived",
startSample, duration, rawDataBlock.getDataName());
@@ -70,6 +76,20 @@ public class RawDataUnavailableException extends Exception {
}
return super.getMessage();
}
+
+ /**
+ * @return the availableStart
+ */
+ public long getAvailableStart() {
+ return availableStart;
+ }
+
+ /**
+ * @return the availableEnd
+ */
+ public long getAvailableEnd() {
+ return availableEnd;
+ }
}
diff --git a/src/PamguardMVC/ThreadedObserver.java b/src/PamguardMVC/ThreadedObserver.java
index 83713af0..1e73c30a 100644
--- a/src/PamguardMVC/ThreadedObserver.java
+++ b/src/PamguardMVC/ThreadedObserver.java
@@ -8,6 +8,7 @@ import Acquisition.AcquisitionControl;
import Acquisition.AcquisitionProcess;
import Acquisition.DaqSystem;
import PamController.PamController;
+import PamModel.PamModel;
import PamUtils.PamCalendar;
import PamguardMVC.debug.Debug;
@@ -130,6 +131,7 @@ public class ThreadedObserver implements PamObserver {
}
}
}
+ h += PamModel.getPamModel().getPamModelSettings().getThreadingJitterMillis()*2;
return h;
}
diff --git a/src/binaryFileStorage/BinaryStore.java b/src/binaryFileStorage/BinaryStore.java
index 1785eb6f..67151c22 100644
--- a/src/binaryFileStorage/BinaryStore.java
+++ b/src/binaryFileStorage/BinaryStore.java
@@ -228,6 +228,7 @@ PamSettingsSource, DataOutputStore {
super.pamToStart();
prepareStores();
openStores();
+ binaryStoreProcess.checkFileTimer();
}
@Override
@@ -245,9 +246,9 @@ PamSettingsSource, DataOutputStore {
* Called from the process to close and reopen each datastream in
* a new file. Probably gets called about once an hour on the hour.
*/
- protected void reOpenStores(int endReason) {
+ protected synchronized void reOpenStores(int endReason, long newFileTime) {
- long dataTime = PamCalendar.getTimeInMillis();
+ long dataTime = newFileTime;//PamCalendar.getTimeInMillis();
long analTime = System.currentTimeMillis();
BinaryOutputStream dataStream;
for (int i = 0; i < storageStreams.size(); i++) {
@@ -536,7 +537,7 @@ PamSettingsSource, DataOutputStore {
*/
if (immediateChanges) {
if (storesOpen) {
- reOpenStores(BinaryFooter.END_UNKNOWN);
+ reOpenStores(BinaryFooter.END_UNKNOWN, PamCalendar.getTimeInMillis());
}
}
@@ -2601,5 +2602,11 @@ PamSettingsSource, DataOutputStore {
public DataIntegrityChecker getInegrityChecker() {
return new BinaryIntegrityChecker(this);
}
+ /**
+ * @return the binaryStoreProcess
+ */
+ public BinaryStoreProcess getBinaryStoreProcess() {
+ return binaryStoreProcess;
+ }
}
diff --git a/src/binaryFileStorage/BinaryStoreProcess.java b/src/binaryFileStorage/BinaryStoreProcess.java
index c3a728b4..d95be814 100644
--- a/src/binaryFileStorage/BinaryStoreProcess.java
+++ b/src/binaryFileStorage/BinaryStoreProcess.java
@@ -7,37 +7,43 @@ import PamUtils.PamCalendar;
import PamguardMVC.PamProcess;
public class BinaryStoreProcess extends PamProcess {
-
+
private BinaryStore binaryStore;
-
+
private long startTime;
-
+
private long nextFileTime;
-
+
private Timer timer;
+ private Object timerSynch = new Object();
+
public BinaryStoreProcess(BinaryStore binaryStore) {
super(binaryStore, null);
this.binaryStore = binaryStore;
}
-
+
@Override
public String getProcessName() {
return "Binary store file control";
}
-
- public synchronized void checkFileTime() {
+
+ public synchronized void checkFileTime(long masterClockTime) {
+ // if (binaryStore.binaryStoreSettings.autoNewFiles &&
+ // PamCalendar.getTimeInMillis() >= nextFileTime) {
+ // startNewFiles();
+ // }
if (binaryStore.binaryStoreSettings.autoNewFiles &&
- PamCalendar.getTimeInMillis() >= nextFileTime) {
- startNewFiles();
+ masterClockTime >= nextFileTime) {
+ startNewFiles(masterClockTime);
}
-
+
}
- private synchronized void startNewFiles() {
+ private synchronized void startNewFiles(long masterClockTime) {
nextFileTime += binaryStore.binaryStoreSettings.fileSeconds * 1000;
- binaryStore.reOpenStores(BinaryFooter.END_FILETOOLONG);
+ binaryStore.reOpenStores(BinaryFooter.END_FILETOOLONG, masterClockTime);
}
@@ -46,24 +52,55 @@ public class BinaryStoreProcess extends PamProcess {
startTime = PamCalendar.getTimeInMillis();
long round = binaryStore.binaryStoreSettings.fileSeconds * 1000;
nextFileTime = (startTime/round) * round + round;
-// System.out.println("Next file start at " + PamCalendar.formatDateTime(nextFileTime));
- timer = new Timer();
- timer.schedule(new FileTimerTask(), 1000, 1000);
-
+ // System.out.println("Next file start at " + PamCalendar.formatDateTime(nextFileTime));
+ }
+
+ public void checkFileTimer() {
+ boolean needTimer = PamCalendar.isSoundFile() == false;
+ if (needTimer) {
+ startTimer();
+ }
+ else {
+ stopTimer();
+ }
}
+ private void startTimer() {
+ synchronized (timerSynch) {
+ if (timer == null) {
+ timer = new Timer();
+ timer.schedule(new FileTimerTask(), 1000, 1000);
+ }
+ }
+ }
+
+ private void stopTimer() {
+ synchronized (timerSynch) {
+ if (timer != null) {
+ timer.cancel();
+ timer = null;
+ }
+ }
+ }
+
+
+
+ // @Override
+ // public void masterClockUpdate(long timeMilliseconds, long sampleNumber) {
+ // super.masterClockUpdate(timeMilliseconds, sampleNumber);
+ // checkFileTime(timeMilliseconds);
+ // }
+
class FileTimerTask extends TimerTask {
@Override
public void run() {
- checkFileTime();
+ checkFileTime(PamCalendar.getTimeInMillis());
}
}
@Override
public void pamStop() {
- if (timer != null) {
- timer.cancel();
- }
+ stopTimer();
}
}
diff --git a/src/clickDetector/ClickDetector.java b/src/clickDetector/ClickDetector.java
index 56b9481e..2ee4ece2 100644
--- a/src/clickDetector/ClickDetector.java
+++ b/src/clickDetector/ClickDetector.java
@@ -329,7 +329,7 @@ public class ClickDetector extends PamProcess {
offlineEventLogging.setSubLogging(getClickDataBlock().getOfflineClickLogging());
triggerBackgroundHandler = new TriggerBackgroundHandler(this);
-
+
clickBackgroundManager = new ClickBackgroundManager(this);
setProcessCheck(new BaseProcessCheck(this, RawDataUnit.class, 1, 0.0000001));
@@ -1378,7 +1378,7 @@ public class ClickDetector extends PamProcess {
private boolean initialiseFilters;
private long clickStartSample, clickEndSample;
-
+
private double maxSignalExcess;
private int clickTriggers;
diff --git a/src/clipgenerator/ClipProcess.java b/src/clipgenerator/ClipProcess.java
index b61c0a43..112281e3 100644
--- a/src/clipgenerator/ClipProcess.java
+++ b/src/clipgenerator/ClipProcess.java
@@ -140,10 +140,13 @@ public class ClipProcess extends SpectrogramMarkProcess {
clipErr = clipRequest.clipBlockProcess.processClipRequest(clipRequest);
switch (clipErr) {
case 0: // no error - clip should have been created.
+ li.remove();
+ break;
case RawDataUnavailableException.DATA_ALREADY_DISCARDED:
case RawDataUnavailableException.INVALID_CHANNEL_LIST:
- // System.out.println("Clip error : " + clipErr);
+// System.out.println("Clip error : " + clipErr);
li.remove();
+ break;
case RawDataUnavailableException.DATA_NOT_ARRIVED:
continue; // hopefully, will get this next time !
}
@@ -230,6 +233,17 @@ public class ClipProcess extends SpectrogramMarkProcess {
}
minH = Math.max(minH, clipBlockProcesses[i].getRequiredDataHistory(o, arg));
}
+
+ ClipRequest firstClip = null;
+ synchronized(clipRequestSynch) {
+ if (clipRequestQueue.size() > 0) {
+ firstClip = clipRequestQueue.get(0);
+ }
+ }
+ if (firstClip != null) {
+ minH += firstClip.dataUnit.getDurationInMilliseconds();
+ }
+
minH += Math.max(3000, 192000/(long)getSampleRate());
if (specMouseDown) {
minH = Math.max(minH, masterClockTime-specMouseDowntime);
@@ -453,8 +467,7 @@ public class ClipProcess extends SpectrogramMarkProcess {
this.dataBlock = dataBlock;
this.clipGenSetting = clipGenSetting;
clipBudgetMaker = new StandardClipBudgetMaker(this);
- dataBlock.addObserver(this, true);
-
+ dataBlock.addObserver(this, false);
if (rawDataBlock != null) {
int chanMap = decideChannelMap(rawDataBlock.getChannelMap());
@@ -499,6 +512,7 @@ public class ClipProcess extends SpectrogramMarkProcess {
rawData = rawDataBlock.getSamples(rawStart, (int) (rawEnd-rawStart), channelMap);
}
catch (RawDataUnavailableException e) {
+ System.out.println(e.getMessage());
return e.getDataCause();
}
if (rawData==null) {
@@ -583,9 +597,15 @@ public class ClipProcess extends SpectrogramMarkProcess {
public PamObserver getObserverObject() {
return clipProcess.getObserverObject();
}
+
@Override
public long getRequiredDataHistory(PamObservable o, Object arg) {
- return (long) ((clipGenSetting.preSeconds+clipGenSetting.postSeconds) * 1000.);
+ long h = (long) ((clipGenSetting.preSeconds+clipGenSetting.postSeconds) * 1000.);
+// if (dataBlock != null) {
+ // can't do this since dataBlock is observing this, so will wrap.
+// h += dataBlock.getRequiredHistory();
+// }
+ return h;
}
diff --git a/src/tethys/dbxml/DBXMLConnect.java b/src/tethys/dbxml/DBXMLConnect.java
index b534703b..67ae165d 100644
--- a/src/tethys/dbxml/DBXMLConnect.java
+++ b/src/tethys/dbxml/DBXMLConnect.java
@@ -150,8 +150,7 @@ public class DBXMLConnect {
*/
public boolean postAndLog(Object nilusObject, String documentName) throws TethysException
{
- boolean ok = NilusChecker.warnEmptyFields(tethysControl.getGuiFrame(), nilusObject);
-
+// boolean ok = NilusChecker.warnEmptyFields(tethysControl.getGuiFrame(), nilusObject);
TethysException e = null;
boolean success = false;
From 18cb59a209f535bb1ef420182120f3d922c59ca4 Mon Sep 17 00:00:00 2001
From: Douglas Gillespie <50671166+douggillespie@users.noreply.github.com>
Date: Mon, 24 Jun 2024 13:28:02 +0100
Subject: [PATCH 2/4] update DL help
---
.../net.sourceforge.metrics.builder.launch | 7 +
.project | 7 +-
README.html | 190 +-
dependency-reduced-pom.xml | 2 +-
pom.xml | 2 +-
src/PamController/PamController.java | 1691 +++++++++--------
src/PamController/PamguardVersionInfo.java | 4 +-
src/PamModel/PamModel.java | 2 +-
.../rawDataPlotFX/RawSoundPlotDataFX.java | 2 +-
.../images/advanced_settings_animalspot_1.png | Bin 535022 -> 168061 bytes
.../images/advanced_settings_generic_1.png | Bin 560412 -> 181733 bytes
.../images/advanced_settings_generic_2.png | Bin 405921 -> 107345 bytes
.../docs/images/deep_leanring_module_help.png | Bin 537937 -> 226112 bytes
.../images/default_settings_humpback_1.png | Bin 0 -> 83370 bytes
.../docs/rawDeepLearning_Bugs.html | 10 +-
.../docs/rawDeepLearning_CreateAndConfig.html | 89 +-
.../docs/rawDeepLearning_Results.html | 22 +-
.../docs/rawDeepLearning_Running.html | 15 +-
.../docs/rawDeepLearning_overview.html | 48 +-
src/loggerForms/controls/CounterControl.java | 39 +-
.../controlpropsets/CounterPropertySet.java | 7 +
21 files changed, 1125 insertions(+), 1012 deletions(-)
create mode 100644 .externalToolBuilders/net.sourceforge.metrics.builder.launch
create mode 100644 src/help/classifiers/rawDeepLearningHelp/docs/images/default_settings_humpback_1.png
diff --git a/.externalToolBuilders/net.sourceforge.metrics.builder.launch b/.externalToolBuilders/net.sourceforge.metrics.builder.launch
new file mode 100644
index 00000000..8e11c919
--- /dev/null
+++ b/.externalToolBuilders/net.sourceforge.metrics.builder.launch
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/.project b/.project
index c8e79578..bbeba9cb 100644
--- a/.project
+++ b/.project
@@ -11,8 +11,13 @@
- net.sourceforge.metrics.builder
+ org.eclipse.ui.externaltools.ExternalToolBuilder
+ full,incremental,
+
+ LaunchConfigHandle
+ <project>/.externalToolBuilders/net.sourceforge.metrics.builder.launch
+
diff --git a/README.html b/README.html
index 8f8d31ad..e30e19e0 100644
--- a/README.html
+++ b/README.html
@@ -388,7 +388,7 @@ PamguardBeta_ViewerMode.exe):
+Version 2.02.11 May 2024
@@ -465,7 +465,7 @@ Version 2.00.10 June 2017
name="_Latest_Version_2.02.06">Version
-2.02.11 April 2024
+2.02.11 May 2024
@@ -479,8 +479,8 @@ continually reset them.
Bug Fixes
Linking clicks to offline clicks table. We had a database
-that had become corrupted so added code to relink offline clicks to their corresponding
-clicks from binary data.
+that had become corrupted so added code to relink offline clicks to their
+corresponding clicks from binary data.
Drawing non-acoustic data: Data that were not associated
with any hydrophones, e.g. visual sightings in Logger forms were not drawing on
@@ -502,9 +502,9 @@ database.
New Features
Importing modules from other configurations: New options from file menu allowing import
-of specific modules, or module settings from other configurations. E.g. if you
-had three similar configurations and had set one of them up with a new
+lang=EN-US> from other configurations: New options from file menu allowing
+import of specific modules, or module settings from other configurations. E.g.
+if you had three similar configurations and had set one of them up with a new
detector, or got the click classifier settings set up just right in one of
those configurations, you can import the additional modules or the click
detector settings easily into the other configurations.
@@ -532,9 +532,9 @@ correctly saving updated bearings to the database. Now fixed.
ROCCA Classifier fixes
-Allow Rocca to run without classifiers: Fixed
-bug that threw an error if no classifier files were specified in Rocca
-Params dialog
+Allow Rocca to run without classifiers:
+Fixed bug that threw an error if no classifier files were specified in
+Rocca Params dialog
Fix memory issue with
RoccaContourDataBlocks not being released for garbage collection
@@ -593,8 +593,8 @@ were reading local time, even when set to use UTC.
which mostly occurred when processing large datasets of many offline files, has
been fixed.
-Data Map: “Scroll To Data” pop-up menu,
-which didn’t always scroll to the correct place, is now fixed.
+Data Map: “Scroll To Data” pop-up menu, which
+didn’t always scroll to the correct place, is now fixed.
Bearing Localiser offline: If reprocessing
bearings, the localizer was not correctly loading required raw or FFT data to
@@ -803,9 +803,8 @@ the TF FX display to crash if no data were displayed.
See major release notes for V 2.02.01
below.
-Bug 495: TD FX display throws
-NullPointerException if user has removed all data units and then moves mouse
-over display area.
+Bug 495: TD FX display throws NullPointerException
+if user has removed all data units and then moves mouse over display area.
Version 2.02.01
October 2021
@@ -993,9 +992,8 @@ help.
If you are upgrading from a PAMGuard core release
(1.15.xx), PAMGuard Version 2 contains major updates. You should read and
-understand the notes listed for Beta
-Version 2.00.10 before proceeding with installation and use of this
-version.
+understand the notes listed for Beta Version
+2.00.10 before proceeding with installation and use of this version.
This version of PAMGuard has been bundled with Java 13
(release 13.0.1). PSFX files generated in previous beta releases (2.xx.xx)
@@ -1104,11 +1102,11 @@ understand the notes listed for Beta
Version 2.00.10 before proceeding with installation and use of this
version.
-This version of PAMGuard has been bundled with Java 13
-(release 13.0.1). PSFX files generated in previous beta releases (2.xx.xx)
-should be compatible with this version, and vice-versa. PSF files generated in
-core releases (1.15.xx) can be loaded in this version, but will be converted to
-PSFX files when PAMGuard exits.
+This version of PAMGuard has been bundled with Java 13 (release
+13.0.1). PSFX files generated in previous beta releases (2.xx.xx) should be
+compatible with this version, and vice-versa. PSF files generated in core
+releases (1.15.xx) can be loaded in this version, but will be converted to PSFX
+files when PAMGuard exits.
Bug Fixes
@@ -1218,10 +1216,10 @@ lang=EN-US> Add functionality for bluetooth headsets.
2. Add user-facing option to adjust the startup delay for the time-correction
-(Global Time module). This provides a workaround to speed up analysis of
-thousands of wav files (i.e. by setting startup delay to 0 instead of default
-value of 2000 ms).
+lang=EN-US> Add user-facing option to adjust the startup delay for the
+time-correction (Global Time module). This provides a workaround to speed up
+analysis of thousands of wav files (i.e. by setting startup delay to 0 instead
+of default value of 2000 ms).
3. &nb
Add 15 minute data load option to viewer mode.
5.
-Add 3D map for target motion module.
+lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> Add 3D map for target motion module.
6.
Bug Fixes
1.
-Bug 433. Custom storage options were being lost when Pamguard restarted.
+lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> Bug 433. Custom storage options were being lost when
+Pamguard restarted.
2.
1. This version of PAMGuard has been upgraded to make it
-compatible with Java 12. psfx files generated in previous beta releases should
-be compatible with this version, and vice-versa.
+lang=EN-US> This version of PAMGuard has been upgraded to make it compatible
+with Java 12. psfx files generated in previous beta releases should be
+compatible with this version, and vice-versa.
2.
-Java 12 is better at handling Windows scaling issues on high-DPI displays. Beyond
-that, users should not notice much of a difference between this version and
-previous beta releases.
+Java 12 is better at handling Windows scaling issues on high-DPI displays.
+Beyond that, users should not notice much of a difference between this version
+and previous beta releases.
@@ -1528,9 +1527,9 @@ with installation and use of this version.
1.
-Bug 413. Binary file crashing during load, after a system failure.
-Failure could cause the file to become corrupt, which caused a crash during
-subsequent load
+Bug 413. Binary file crashing during load, after a system failure. Failure
+could cause the file to become corrupt, which caused a crash during subsequent
+load
2.
@@ -1688,8 +1687,8 @@ lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> &nb
Upgrades
1.
-Improvement to Range Rings in Map display.
+lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'> Improvement to Range Rings in Map display.
2.
@@ -1743,8 +1742,8 @@ with installation and use of this version.
1.
-Bug 338. Problem displaying coastlines and bathymetric contours around
-the dateline (+/- 180 longitude) in the map.
+Bug 338. Problem displaying coastlines and bathymetric contours around the
+dateline (+/- 180 longitude) in the map.
2.
@@ -2327,13 +2326,13 @@ lang=EN-US>
1.
Bug 317. Rocca Module Data Purging. The ROCCA
-module was not performing data purging when using classifiers developed for
-Hawaii/Temperate Pacific/North Atlantic datasets. This has been corrected.
+module was not performing data purging when using classifiers developed for Hawaii/Temperate
+Pacific/North Atlantic datasets. This has been corrected.
2.
-Bug 320. Pamguard stopped reading Click Detector Event data from
-database when target motion analysis information was encountered. Corrected.
+Bug 320. Pamguard stopped reading Click Detector Event data from database
+when target motion analysis information was encountered. Corrected.
3.
@@ -2438,9 +2437,9 @@ jar file will be required rather than a new bespoke PAMGuard installation.here. Plug-in modules can be downloaded from the
-PAMGuard website here, but developers are encouraged to host and maintain their
-own modules.
+target="_blank">here. Plug-in modules can be downloaded from the PAMGuard
+website here, but developers are encouraged to host and maintain their own
+modules.
Modules of interest to the general PAM
community will remain as part of the core PAMGuard installation. However,
@@ -2615,9 +2614,9 @@ main click detector display.
Target Motion Analysis
-A major piece of work has been undertaken to
-improve the Target Motion tracking with PAMGuard. Details are available in the
-online help. Users of the Click Detector will notice the following changes:
+A major piece of work has been undertaken
+to improve the Target Motion tracking with PAMGuard. Details are available in
+the online help. Users of the Click Detector will notice the following changes:
1.
@@ -2936,9 +2935,9 @@ See the help file for details.
lang=EN-US style='font-size:7.0pt;font-family:"Times New Roman",serif'>
Feature Request 45. Click classification settings
-export / import. Click classification settings can be exported individually to
-files and imported into other click detector configurations. See the help file
-for details.
+export / import. Click classification settings can be exported individually to files
+and imported into other click detector configurations. See the help file for
+details.
3.
@@ -3055,8 +3054,8 @@ allocation to allow more memory for the database interface. Hopefully Fixed.
9.
-Bug 239. Fixed bug in the DIFAR module that was incorrectly
-preventing cross-fixes for some calls.
+Bug 239. Fixed bug in the DIFAR module that was
+incorrectly preventing cross-fixes for some calls.
Details of these bugs can be found at https://sourceforge.net/p/pamguard/bugs
@@ -3152,9 +3151,9 @@ crash when analyzing click event containing unclassified clicks
8.
-Bug 230. Click Bearing Display. With a two hydrophone
-system, clicks calculated to have a bearing of exactly 180 degrees would be
-displayed at 0 degrees on the bearing time display.
+Bug 230. Click Bearing Display. With a two hydrophone system,
+clicks calculated to have a bearing of exactly 180 degrees would be displayed
+at 0 degrees on the bearing time display.
@@ -3206,9 +3205,8 @@ total loss of the PAMGuard configuration in viewer mode and has been rectified.
7.0pt;font-family:"Times New Roman",serif'> Bug
218. SAIL Acquisition card would hang the system. This has also been fixed.
-7. Bug
-219. Problems displaying Offline Click Events in the Viewer map have been
-fixed.
+7. Bug 219.
+Problems displaying Offline Click Events in the Viewer map have been fixed.
@@ -3515,9 +3513,9 @@ to these menus to provide additional information to users.
Radar Display
-Functionality has been added to the
-radar display so that bearings can be shown relative to either the vessel or to
-true North.
+Functionality has been added to
+the radar display so that bearings can be shown relative to either the vessel
+or to true North.
Better control of data in viewer
mode, making is easy to scroll through and view data for short time periods.
@@ -3872,11 +3870,11 @@ Symbol'>'Version 1.8.01 Beta February 2010
@@ -4302,11 +4300,11 @@ Symbol'>''
-New menu functionality by right clicking on any of the tabs of the main tab
-control will allow the user to copy the tab contents to the system clipboard
-from where it can be copied into other programs (e.g. Word, Powerpoint,
-etc.).Some modules, such as the map, have this implemented in other menus
-(right click) and also allow printing.
+New menu functionality by right clicking on any of the tabs of the main
+tab control will allow the user to copy the tab contents to the system
+clipboard from where it can be copied into other programs (e.g. Word,
+Powerpoint, etc.).Some modules, such as the map, have this implemented in other
+menus (right click) and also allow printing.
'
@@ -4374,8 +4372,8 @@ online help.
PAMGUARD Mixed Mode operation
-Analyses data from wav or AIF file and synchronises it with GPS
-data reloaded from a database so that detected sounds may be correctly
+
Analyses data from wav or AIF file and synchronises it with
+GPS data reloaded from a database so that detected sounds may be correctly
localised. Multiple display frames - enables PAMGUARD GUI to be split into
multiple display windows, displayed on multiple monitors if desired. Enables
the operator to simultaneously view the map and the click detector for example,
@@ -4411,9 +4409,9 @@ now been fixed.
Sound Recorder
-Level meters are shown for the correct channels (after
-channel numbering has been changed). Occasional crash due to synchronisation
-problems when multi-threading now fixed.
+Level meters are shown for the correct channels (after channel
+numbering has been changed). Occasional crash due to synchronisation problems
+when multi-threading now fixed.
Whistle Detector
@@ -4687,9 +4685,9 @@ Symbol'>''
-Better drawing of held spectrogram when putting mark rectangles on a
-spectrogram display. All panels are now correctly frozen. The rectangle is
-drawn in red on the marked panel and in green on other panels.
+Better drawing of held spectrogram when putting mark rectangles on a spectrogram
+display. All panels are now correctly frozen. The rectangle is drawn in red on
+the marked panel and in green on other panels.
'
@@ -4705,9 +4703,9 @@ coming in through the ASIO card and back out through its headphone socket
'
Operation will depend on the configuration of individual sound cards and
-how they are configured to mix incoming data with data from the PC. This is
-sometimes a physical switch on the card and sometimes a software configuration
-utility specific to that sound card.
+how they are configured to mix incoming data with data from the PC. This is sometimes
+a physical switch on the card and sometimes a software configuration utility
+specific to that sound card.
'
diff --git a/dependency-reduced-pom.xml b/dependency-reduced-pom.xml
index e135ce29..36fc4eea 100644
--- a/dependency-reduced-pom.xml
+++ b/dependency-reduced-pom.xml
@@ -4,7 +4,7 @@
org.pamguard
Pamguard
Pamguard
- 2.02.11d
+ 2.02.11f
Pamguard using Maven to control dependencies
www.pamguard.org
diff --git a/pom.xml b/pom.xml
index d09a31fd..2abb42ac 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
org.pamguard
Pamguard
- 2.02.11e
+ 2.02.11f
Pamguard
Pamguard using Maven to control dependencies
www.pamguard.org
diff --git a/src/PamController/PamController.java b/src/PamController/PamController.java
index a114f266..b106a575 100644
--- a/src/PamController/PamController.java
+++ b/src/PamController/PamController.java
@@ -111,8 +111,8 @@ import PamguardMVC.debug.Debug;
*
* PamController contains a list of PamControlledUnit's each of which
* has it's own process,
- simpleMapRef.gpsTextPanel.setPixelsPerMetre(getPixelsPerMetre()); input and output data and display (Tab Panel,
- * Menus, etc.)
+ * simpleMapRef.gpsTextPanel.setPixelsPerMetre(getPixelsPerMetre());
+ * input and output data and display (Tab Panel, Menus, etc.)
* @see PamController.PamControlledUnit
* @see PamView.PamTabPanel
*
@@ -129,7 +129,7 @@ public class PamController implements PamControllerInterface, PamSettings {
public static final int PAM_COMPLETE = 6;
public static final int PAM_MAPMAKING = 7;
public static final int PAM_OFFLINETASK = 8;
-
+
public static final int BUTTON_START = 1;
public static final int BUTTON_STOP = 2;
private volatile int lastStartStopButton = 0;
@@ -145,20 +145,21 @@ public class PamController implements PamControllerInterface, PamSettings {
public static final int RUN_NETWORKRECEIVER = 5;
private int runMode = RUN_NORMAL;
-
- // flag used in main() to indicate that processing should start immediately.
+
+ // flag used in main() to indicate that processing should start immediately.
public static final String AUTOSTART = "-autostart";
- // flag used in main() to indicate that pamguard should exit as soon as processing ends.
+ // flag used in main() to indicate that pamguard should exit as soon as
+ // processing ends.
public static final String AUTOEXIT = "-autoexit";
/**
- * Never changed. Needed to identify settings for list of modules in prfx files.
+ * Never changed. Needed to identify settings for list of modules in prfx files.
*/
public static final String unitName = "Pamguard Controller";
public static final String unitType = "PamController";
/**
- * The pam model.
+ * The pam model.
*/
private PamModel pamModelInterface;
@@ -169,14 +170,14 @@ public class PamController implements PamControllerInterface, PamSettings {
private volatile int pamStatus = PAM_IDLE;
/**
- * PamGuard view params.
+ * PamGuard view params.
*/
public PamViewParameters pamViewParameters = new PamViewParameters();
- // ViewerStatusBar viewerStatusBar;
+ // ViewerStatusBar viewerStatusBar;
/*
- * Swing GUI manager
+ * Swing GUI manager
*/
private PAMControllerGUI guiFrameManager;
@@ -186,18 +187,17 @@ public class PamController implements PamControllerInterface, PamSettings {
private boolean initializationComplete = false;
/**
- * The java version being run. e.g. Java 8u111 will be 8.111;
+ * The java version being run. e.g. Java 8u111 will be 8.111;
*/
- public static double JAVA_VERSION = getVersion ();
-
+ public static double JAVA_VERSION = getVersion();
// PAMGUARD CREATION IS LAUNCHED HERE !!!
- // private static PamControllerInterface anyController = new PamController();
+ // private static PamControllerInterface anyController = new PamController();
private static PamController uniqueController;
private Timer diagnosticTimer;
-
- private boolean debugDumpBufferAtRestart = true;
+
+ private boolean debugDumpBufferAtRestart = false;
private NetworkController networkController;
private int nNetPrepared;
@@ -207,67 +207,65 @@ public class PamController implements PamControllerInterface, PamSettings {
private Timer garbageTimer;
/**
- * The UID manager.
+ * The UID manager.
*/
private UIDManager uidManager;
/**
- * A global time manager to manage corrections to the PC clock
- * from various sources.
+ * A global time manager to manage corrections to the PC clock from various
+ * sources.
*/
private GlobalTimeManager globalTimeManager;
/**
- * A global medium manager which handles the type of medium sound is propogating through.
+ * A global medium manager which handles the type of medium sound is propogating
+ * through.
*/
- private GlobalMediumManager globalMediumManager;
+ private GlobalMediumManager globalMediumManager;
/**
- * A reference to the module currently being loaded. Used by the PamExceptionHandler to
- * monitor runtime errors that occur during load
+ * A reference to the module currently being loaded. Used by the
+ * PamExceptionHandler to monitor runtime errors that occur during load
*/
- private static PamControlledUnit unitBeingLoaded=null;
-
+ private static PamControlledUnit unitBeingLoaded = null;
/**
- * Folder where Pamguard is installed and running out of. This string
- * includes the file separator at the end, or is null if there was a
- * problem trying to determine the installation folder
+ * Folder where Pamguard is installed and running out of. This string includes
+ * the file separator at the end, or is null if there was a problem trying to
+ * determine the installation folder
*/
- private String installFolder=null;
+ private String installFolder = null;
private boolean haveGlobalTimeUpdate;
private WatchdogComms watchdogComms;
-
+
private PamWarning statusWarning = new PamWarning("PAMGuard control", "Status", 0);
-
- /**
+
+ /**
* A separate thread that checks all ThreadedObservers to see if they still have
* data in their buffers
*/
private Thread statusCheckThread;
private WaitDetectorThread detectorEndThread;
private boolean firstDataLoadComplete;
- // keep a track of the total number of times PAMGuard is started for debug purposes.
+ // keep a track of the total number of times PAMGuard is started for debug
+ // purposes.
private int nStarts;
private RestartRunnable restartRunnable;
-
private PamController(int runMode, Object object) {
uniqueController = this;
-
+
pamConfiguration = new PamConfiguration();
this.runMode = runMode;
if (runMode == PamController.RUN_PAMVIEW) {
uidManager = new UIDViewerManager(this);
- }
- else {
+ } else {
uidManager = new UIDOnlineManager(this);
}
-
sayMemory();
globalTimeManager = new GlobalTimeManager(this);
@@ -285,11 +283,12 @@ public class PamController implements PamControllerInterface, PamSettings {
}
guiFrameManager = PamGUIManager.createGUI(this, object);
- guiFrameManager.init(); //perform any start up processes for the GUI.
+ guiFrameManager.init(); // perform any start up processes for the GUI.
// figure out the installation folder
try {
- File theURL = new File(this.getClass().getProtectionDomain().getCodeSource().getLocation().toURI().getPath());
+ File theURL = new File(
+ this.getClass().getProtectionDomain().getCodeSource().getLocation().toURI().getPath());
installFolder = theURL.getParentFile().getPath() + File.separator;
} catch (URISyntaxException e) {
System.out.println("Error finding installation folder of jar file: " + e.getMessage());
@@ -300,13 +299,12 @@ public class PamController implements PamControllerInterface, PamSettings {
setupPamguard();
setupGarbageCollector();
-
// if (PamGUIManager.getGUIType() == PamGUIManager.NOGUI) {
// }
-
- // diagnosticTimer = new Timer(1000, new DiagnosticTimer());
- // diagnosticTimer.start();
+
+ // diagnosticTimer = new Timer(1000, new DiagnosticTimer());
+ // diagnosticTimer.start();
}
class DiagnosticTimer implements ActionListener {
@@ -318,51 +316,51 @@ public class PamController implements PamControllerInterface, PamSettings {
private void sayMemory() {
Runtime r = Runtime.getRuntime();
- System.out.println(String.format("System memory at %s Max %d, Free %d",
- PamCalendar.formatDateTime(System.currentTimeMillis()),
- r.maxMemory(), r.freeMemory()));
+ System.out.println(String.format("System memory at %s Max %d, Free %d",
+ PamCalendar.formatDateTime(System.currentTimeMillis()), r.maxMemory(), r.freeMemory()));
}
/**
- * Create an instance of the PAMController.
+ * Create an instance of the PAMController.
+ *
* @param runMode - the run mode
*/
public static void create(int runMode) {
if (uniqueController == null) {
PamController pamcontroller = new PamController(runMode, null);
/*
- * I don't see any reason not have have this running with the GUI.
- * It launches in a new thread, so it should be fine to have
- * additional commands afterwards.
+ * I don't see any reason not have have this running with the GUI. It launches
+ * in a new thread, so it should be fine to have additional commands afterwards.
*/
TerminalController tc = new TerminalController(pamcontroller);
tc.getTerminalCommands();
}
-
+
SwingUtilities.invokeLater(new Runnable() {
-
+
@Override
public void run() {
uniqueController.creationComplete();
}
});
}
-
+
/**
- * Not to sound God like, but this will be called on the AWT dispatch thread shortly
- * after all modules are created, PAMGuard should be fully setup and all modules will
- * have recieved INITIALISATION_COMPLETE and should be good to run
+ * Not to sound God like, but this will be called on the AWT dispatch thread
+ * shortly after all modules are created, PAMGuard should be fully setup and all
+ * modules will have recieved INITIALISATION_COMPLETE and should be good to run
*/
private void creationComplete() {
if (GlobalArguments.getParam(PamController.AUTOSTART) != null) {
startLater(); // may as well give AWT time to loop it's queue once more
}
}
-
+
/**
- * Create an instance of the PAMcController.
+ * Create an instance of the PAMcController.
+ *
* @param runMode - the run mode
- * @param object - extra information. Can be null.
+ * @param object - extra information. Can be null.
*/
public static void create(int runMode, Object object) {
if (uniqueController == null) {
@@ -371,21 +369,20 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * Setup the PAMController.
+ * Setup the PAMController.
*/
public void setupPamguard() {
/**
- * Set Locale to English so that formated writes to text fields
- * in dialogs use . and not , for the decimal.
+ * Set Locale to English so that formated writes to text fields in dialogs use .
+ * and not , for the decimal.
*/
Locale.setDefault(Locale.ENGLISH);
/*
- * 15/8/07 Changed creation order of model and view.
- * Need to be able to create a database pretty early on
- * (in the Model) in order to read back settings that
- * the GUI may require.
+ * 15/8/07 Changed creation order of model and view. Need to be able to create a
+ * database pretty early on (in the Model) in order to read back settings that
+ * the GUI may require.
*
*/
// create the model
@@ -393,39 +390,42 @@ public class PamController implements PamControllerInterface, PamSettings {
pamModelInterface.createPamModel();
/*
- * 9 February 2009
- * Trying to sort out settings file loading.
- * Was previously done when the first modules registered itself
- * with the settings manager. Gets very confusing. Will be much easier
- * to load up the settings first, depending on the type of module
- * and then have them ready when the modules start asking for them.
+ * 9 February 2009 Trying to sort out settings file loading. Was previously done
+ * when the first modules registered itself with the settings manager. Gets very
+ * confusing. Will be much easier to load up the settings first, depending on
+ * the type of module and then have them ready when the modules start asking for
+ * them.
*/
int loadAns = PamSettingManager.getInstance().loadPAMSettings(runMode);
-
- System.out.println("Pamcontroller: loadPAMSettings: " + loadAns);
+
+ System.out.println("Pamcontroller: loadPAMSettings: " + loadAns);
if (loadAns == PamSettingManager.LOAD_SETTINGS_NEW) {
- // if (runMode == RUN_PAMVIEW) {
- // // no model, no gui, so PAMGAURD will simply exit.
- // String str = String.format("PAMGUARD cannot run in %s mode without a valid database\nPAMGUARD will exit.",
- // getRunModeName());
- // str = "You have opened a database in viewer mode that contains no settings\n" +
- // "Either load settings from the binary store, import a psf settings file or create modules by hand.\n" +
- // "Press OK to continue or Cancel to exit the viewer";
+ // if (runMode == RUN_PAMVIEW) {
+ // // no model, no gui, so PAMGAURD will simply exit.
+ // String str = String.format("PAMGUARD cannot run in %s mode without a valid
+ // database\nPAMGUARD will exit.",
+ // getRunModeName());
+ // str = "You have opened a database in viewer mode that contains no settings\n"
+ // +
+ // "Either load settings from the binary store, import a psf settings file or
+ // create modules by hand.\n" +
+ // "Press OK to continue or Cancel to exit the viewer";
//
- // int ans = JOptionPane.showConfirmDialog(null, str, "PAMGuard viewer", JOptionPane.OK_CANCEL_OPTION);
- // if (ans == JOptionPane.CANCEL_OPTION) {
- // System.exit(0);
- // }
- // }
- // else if (loadAns == ){
- // // normal settings will probably return an error, but it's OK still !
- //// System.exit(0);
- // }
- // return;
- }
- else if (loadAns == PamSettingManager.LOAD_SETTINGS_CANCEL) {
- JOptionPane.showMessageDialog(null, "No settings loaded. PAMGuard will exit", "PAMGuard", JOptionPane.INFORMATION_MESSAGE);
+ // int ans = JOptionPane.showConfirmDialog(null, str, "PAMGuard viewer",
+ // JOptionPane.OK_CANCEL_OPTION);
+ // if (ans == JOptionPane.CANCEL_OPTION) {
+ // System.exit(0);
+ // }
+ // }
+ // else if (loadAns == ){
+ // // normal settings will probably return an error, but it's OK still !
+ //// System.exit(0);
+ // }
+ // return;
+ } else if (loadAns == PamSettingManager.LOAD_SETTINGS_CANCEL) {
+ JOptionPane.showMessageDialog(null, "No settings loaded. PAMGuard will exit", "PAMGuard",
+ JOptionPane.INFORMATION_MESSAGE);
System.exit(0);
}
@@ -434,44 +434,53 @@ public class PamController implements PamControllerInterface, PamSettings {
}
// get the general settings out of the file immediately.
- // PamSettingManager.getInstance().loadSettingsFileData();
+ // PamSettingManager.getInstance().loadSettingsFileData();
/*
- * prepare to add a database to the model.
- * this will then re-read it's settings from the
- * settings file - which we dont' want yet !!!!!
- * But now we have the database, it should be possible to
- * alter the code that reads in all settings from a selected
- * file and alter it so it gets them from the db instead.
- * Then remove this database module immediately
- * and let Pamguard create a new one based on the settings !
+ * prepare to add a database to the model. this will then re-read it's settings
+ * from the settings file - which we dont' want yet !!!!! But now we have the
+ * database, it should be possible to alter the code that reads in all settings
+ * from a selected file and alter it so it gets them from the db instead. Then
+ * remove this database module immediately and let Pamguard create a new one
+ * based on the settings !
*/
- // PamModuleInfo mi = PamModuleInfo.findModuleInfo("generalDatabase.DBControl");
- // PamControlledUnitSettings dbSettings = PamSettingManager.getInstance().findGeneralSettings(DBControl.getDbUnitType());
- // if (mi != null) {
- // addModule(mi, "Temporary Database");
- // }
+ // PamModuleInfo mi = PamModuleInfo.findModuleInfo("generalDatabase.DBControl");
+ // PamControlledUnitSettings dbSettings =
+ // PamSettingManager.getInstance().findGeneralSettings(DBControl.getDbUnitType());
+ // if (mi != null) {
+ // addModule(mi, "Temporary Database");
+ // }
- // Add a note to the output console for the user to ignore the SLF4J warning (see http://www.slf4j.org/codes.html#StaticLoggerBinder
- // for details). I spent a few hours trying to get rid of this warning, but without any luck. If you do a google search
- // there are a lot of forum suggestions on how to fix, but none seemed to work for me. Added both slf4j-nop and
- // slf4j-simple to dependency list, neither made a difference. Changed order of dependencies, ran purges and updates,
- // added slf4j-api explicitly, made sure I don't have duplicate bindings, but nothing helped.
- //
+ // Add a note to the output console for the user to ignore the SLF4J warning
+ // (see http://www.slf4j.org/codes.html#StaticLoggerBinder
+ // for details). I spent a few hours trying to get rid of this warning, but
+ // without any luck. If you do a google search
+ // there are a lot of forum suggestions on how to fix, but none seemed to work
+ // for me. Added both slf4j-nop and
+ // slf4j-simple to dependency list, neither made a difference. Changed order of
+ // dependencies, ran purges and updates,
+ // added slf4j-api explicitly, made sure I don't have duplicate bindings, but
+ // nothing helped.
+ //
// Error occurs when PamDataBlock.sortTypeInformation() calls
- // superDetectionClass = GenericTypeResolver.resolveReturnType(method, unitClass); (currently line 397). I don't want
- // to add the note there because that gets called every time a PamDataBlock is created. So I add the note here, which
+ // superDetectionClass = GenericTypeResolver.resolveReturnType(method,
+ // unitClass); (currently line 397). I don't want
+ // to add the note there because that gets called every time a PamDataBlock is
+ // created. So I add the note here, which
// is just before the error occurs
//
- // Oddly enough, this warning DOES NOT occur when running the non-Maven version (Java12 branch). The dependencies in the
- // classpath are the same as the ones here in Maven, so I don't know what to say.
+ // Oddly enough, this warning DOES NOT occur when running the non-Maven version
+ // (Java12 branch). The dependencies in the
+ // classpath are the same as the ones here in Maven, so I don't know what to
+ // say.
System.out.println("");
- System.out.println("Note - ignore the following SLF4J warn/error messages, they are not applicable to this application");
+ System.out.println(
+ "Note - ignore the following SLF4J warn/error messages, they are not applicable to this application");
ArrayManager.getArrayManager(); // create the array manager so that it get's it's settings
MetaDataContol.getMetaDataControl();
/**
- * Check for archived files and unpack automatically.
+ * Check for archived files and unpack automatically.
*/
if (runMode == RUN_PAMVIEW && SMRUEnable.isEnable()) {
ZipUnpacker zipUnpacker = new ZipUnpacker(this);
@@ -499,34 +508,34 @@ public class PamController implements PamControllerInterface, PamSettings {
// }
// }
-
/*
* We are running as a remote application, start process straight away!
*/
if (PamSettingManager.RUN_REMOTE == false) {
- addView(guiFrameManager.initPrimaryView(this, pamModelInterface));
+ addView(guiFrameManager.initPrimaryView(this, pamModelInterface));
}
/**
- * Calling this will cause a callback to this.restoreSettings which
- * includes a list of modules which will then get created, and in turn
- * load all of their own settings from the settings manager.
+ * Calling this will cause a callback to this.restoreSettings which includes a
+ * list of modules which will then get created, and in turn load all of their
+ * own settings from the settings manager.
*/
PamSettingManager.getInstance().registerSettings(this);
-
+
/**
- * For offline batch processing a few funnies happen here. We'll be open
- * in viewer mode, but it's likely a psf will have been passed as an input argument.
- * We will therefore have to extract all the modules from that psfx as well and either
- * add them as new modules, or get their settings and use those to update existing settings
- * That should probably be done here before the final calls to setup processes, etc.
+ * For offline batch processing a few funnies happen here. We'll be open in
+ * viewer mode, but it's likely a psf will have been passed as an input
+ * argument. We will therefore have to extract all the modules from that psfx as
+ * well and either add them as new modules, or get their settings and use those
+ * to update existing settings That should probably be done here before the
+ * final calls to setup processes, etc.
*/
if (getRunMode() == RUN_PAMVIEW && PamSettingManager.remote_psf != null) {
loadOtherSettings(PamSettingManager.remote_psf);
}
/*
- * Get any other required modules for this run mode.
+ * Get any other required modules for this run mode.
*/
pamModelInterface.startModel();
@@ -537,107 +546,110 @@ public class PamController implements PamControllerInterface, PamSettings {
*/
if (getRunMode() == RUN_NOTHING) {
- }else if (PamSettingManager.RUN_REMOTE == true) {
+ } else if (PamSettingManager.RUN_REMOTE == true) {
// Initialisation is complete.
initializationComplete = true;
notifyModelChanged(PamControllerInterface.INITIALIZATION_COMPLETE);
System.out.println("Starting Pamguard in REMOTE execution mode.");
pamStart();
- }else{
+ } else {
- // if (getRunMode() == RUN_PAMVIEW) {
- // createViewerStatusBar();
- // }
+ // if (getRunMode() == RUN_PAMVIEW) {
+ // createViewerStatusBar();
+ // }
- // call before initialisation complete, so that processes can re-do.
+ // call before initialisation complete, so that processes can re-do.
createAnnotations();
organiseGUIFrames();
- //sort the frame titles (Swing convenience)
- if (PamGUIManager.isSwing()) sortFrameTitles();
+ // sort the frame titles (Swing convenience)
+ if (PamGUIManager.isSwing())
+ sortFrameTitles();
initializationComplete = true;
notifyModelChanged(PamControllerInterface.INITIALIZATION_COMPLETE);
/**
- * Trigger loading of relationships between markers and mark observers.
- * No need to do anything more than call the constructor and
- * everything else will happen...
+ * Trigger loading of relationships between markers and mark observers. No need
+ * to do anything more than call the constructor and everything else will
+ * happen...
*/
- MarkRelationships.getInstance();
+ MarkRelationships.getInstance();
}
if (getRunMode() == RUN_PAMVIEW) {
/**
- * Tell any modules implementing OfflineDataSource to check
- * their maps.
+ * Tell any modules implementing OfflineDataSource to check their maps.
*/
AWTScheduler.getInstance().scheduleTask(new DataInitialised());
- // PamControlledUnit pcu;
- // OfflineDataSource offlineDataSource;
- // for (int iU = 0; iU < pamControlledUnits.size(); iU++) {
- // pcu = pamControlledUnits.get(iU);
- // if (OfflineDataSource.class.isAssignableFrom(pcu.getClass())) {
- // offlineDataSource = (OfflineDataSource) pcu;
- // offlineDataSource.createOfflineDataMap(null);
- // }
- // }
+ // PamControlledUnit pcu;
+ // OfflineDataSource offlineDataSource;
+ // for (int iU = 0; iU < pamControlledUnits.size(); iU++) {
+ // pcu = pamControlledUnits.get(iU);
+ // if (OfflineDataSource.class.isAssignableFrom(pcu.getClass())) {
+ // offlineDataSource = (OfflineDataSource) pcu;
+ // offlineDataSource.createOfflineDataMap(null);
+ // }
+ // }
- // PamSettingManager.getInstance().registerSettings(new ViewTimesSettings());
- // getNewViewTimes(null);
+ // PamSettingManager.getInstance().registerSettings(new ViewTimesSettings());
+ // getNewViewTimes(null);
}
uidManager.runStartupChecks();
-
+
clearSelectorsAndSymbols();
-
/**
- * Debug code for starting PG as soon as it's initialised.
+ * Debug code for starting PG as soon as it's initialised.
*/
- // SwingUtilities.invokeLater(new Runnable() {
- // @Override
- // public void run() {
- // pamStart();
- // }
- // });
+ // SwingUtilities.invokeLater(new Runnable() {
+ // @Override
+ // public void run() {
+ // pamStart();
+ // }
+ // });
}
-
/**
- * Clear all data selectors and symbol managers. Required since some of these will have loaded as various modules were created,
- * but may also require additional data selectors and symbol managers from super detections which were not availble.
- * Deleting the lot, will cause them to be recreated as soon as they are next needed.
- * Should probably also call these on any call to addModule as well ?
+ * Clear all data selectors and symbol managers. Required since some of these
+ * will have loaded as various modules were created, but may also require
+ * additional data selectors and symbol managers from super detections which
+ * were not availble. Deleting the lot, will cause them to be recreated as soon
+ * as they are next needed. Should probably also call these on any call to
+ * addModule as well ?
*/
- private void clearSelectorsAndSymbols() {
+ private void clearSelectorsAndSymbols() {
DataSelectorCreator.globalClear();
PamSymbolManager.globalClear();
-
+
}
/**
- * This gets called after other data initialisation tasks (such as data mapping).
+ * This gets called after other data initialisation tasks (such as data
+ * mapping).
+ *
* @author dg50
*
*/
class DataInitialised implements Runnable {
@Override
public void run() {
- notifyModelChanged(PamControllerInterface.INITIALIZE_LOADDATA);
- // tell all scrollers to reload their data.
- // loadViewerData();
+ notifyModelChanged(PamControllerInterface.INITIALIZE_LOADDATA);
+ // tell all scrollers to reload their data.
+ // loadViewerData();
}
}
-
/**
* Called when the number of Networked remote stations changes so that the
- * receiver can make a decision as to what to do in terms of
- * preparing detectors, opening files, etc.
- * @param timeMilliseconds
- * @param nPrepared number of remote stations currently prepared (called just before start)
- * @param nStarted number of remote stations currently started
- * @param nStopped number of remote stations currently stopped
+ * receiver can make a decision as to what to do in terms of preparing
+ * detectors, opening files, etc.
+ *
+ * @param timeMilliseconds
+ * @param nPrepared number of remote stations currently prepared (called
+ * just before start)
+ * @param nStarted number of remote stations currently started
+ * @param nStopped number of remote stations currently stopped
*/
public void netReceiveStatus(long timeMilliseconds, int nPrepared, int nStarted, int nStopped) {
if (this.nNetStarted == 0 && nStarted >= 1) {
@@ -653,9 +665,10 @@ public class PamController implements PamControllerInterface, PamSettings {
this.nNetStarted = nStarted;
this.nNetStopped = nStopped;
}
+
/**
- * Loop through all controllers and processes and datablocks and set up all
- * of their annotations.
+ * Loop through all controllers and processes and datablocks and set up all of
+ * their annotations.
*/
private void createAnnotations() {
PamControlledUnit pcu;
@@ -672,32 +685,31 @@ public class PamController implements PamControllerInterface, PamSettings {
if (pp.getSourceDataBlock() == null) {
pp.createAnnotations(true);
}
- // nPdb = pp.getNumOutputDataBlocks();
- // for (int iPdb = 0; iPdb < nPdb; iPdb++) {
- // pdb = pp.getOutputDataBlock(iPdb);
- // pdb.createAnnotations(pp.getSourceDataBlock(), pp);
- // }
+ // nPdb = pp.getNumOutputDataBlocks();
+ // for (int iPdb = 0; iPdb < nPdb; iPdb++) {
+ // pdb = pp.getOutputDataBlock(iPdb);
+ // pdb.createAnnotations(pp.getSourceDataBlock(), pp);
+ // }
}
}
}
/**
- * Organise the GUI frames on start up or after a module was added
- * or after the frames menus have changed.
+ * Organise the GUI frames on start up or after a module was added or after the
+ * frames menus have changed.
*/
private void organiseGUIFrames() {
}
-
- // private void createViewerStatusBar() {
- //
- // viewerStatusBar = new ViewerStatusBar(this);
- // PamStatusBar.getStatusBar().getToolBar().setLayout(new BorderLayout());
- // PamStatusBar.getStatusBar().getToolBar().add(BorderLayout.CENTER,
- // viewerStatusBar.getStatusBarComponent());
- // }
+ // private void createViewerStatusBar() {
+ //
+ // viewerStatusBar = new ViewerStatusBar(this);
+ // PamStatusBar.getStatusBar().getToolBar().setLayout(new BorderLayout());
+ // PamStatusBar.getStatusBar().getToolBar().add(BorderLayout.CENTER,
+ // viewerStatusBar.getStatusBarComponent());
+ // }
void setupProcesses() {
// for (int i = 0; i < pamControlledUnits.size(); i++) {
@@ -707,28 +719,26 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * Can PAMGUARD shut down. This question is asked in turn to
- * every module. Each module should attempt to make sure it can
- * answer true, e.g. by closing files, but if any module
- * returns false, then canClose() will return false;
- * @return whether it's possible to close PAMGUARD
- * without corrupting or losing data.
+ * Can PAMGUARD shut down. This question is asked in turn to every module. Each
+ * module should attempt to make sure it can answer true, e.g. by closing files,
+ * but if any module returns false, then canClose() will return false;
+ *
+ * @return whether it's possible to close PAMGUARD without corrupting or losing
+ * data.
*/
public boolean canClose() {
return pamConfiguration.canClose();
}
-
/**
- * Called after canClose has returned true to finally tell
- * all modules that PAMGUARD is definitely closing down.so they
- * can free any resources, etc.
+ * Called after canClose has returned true to finally tell all modules that
+ * PAMGUARD is definitely closing down.so they can free any resources, etc.
*/
@Override
public void pamClose() {
getUidManager().runShutDownOps();
-
+
pamConfiguration.pamClose();
}
@@ -736,24 +746,25 @@ public class PamController implements PamControllerInterface, PamSettings {
* Shut down Pamguard
*/
public void shutDownPamguard() {
- // force close the javaFX thread (because it won't close by itself - see Platform.setImplicitExit(false) in constructor
+ // force close the javaFX thread (because it won't close by itself - see
+ // Platform.setImplicitExit(false) in constructor
Platform.exit();
-
+
// terminate the JVM
System.exit(getPamStatus());
}
/**
- * Go through all data blocks in all modules and tell them to save.
- * This has been built into PamProcess and PamDataBlock since we want
- * it to be easy to override this for specific modules / processes / data blocks.
+ * Go through all data blocks in all modules and tell them to save. This has
+ * been built into PamProcess and PamDataBlock since we want it to be easy to
+ * override this for specific modules / processes / data blocks.
*/
public void saveViewerData() {
ArrayList pamControlledUnits = pamConfiguration.getPamControlledUnits();
for (int i = 0; i < pamControlledUnits.size(); i++) {
pamControlledUnits.get(i).saveViewerData();
}
- // Commit the database.
+ // Commit the database.
DBControlUnit dbControl = DBControlUnit.findDatabaseControl();
if (dbControl != null) {
dbControl.commitChanges();
@@ -762,7 +773,7 @@ public class PamController implements PamControllerInterface, PamSettings {
@Override
public void addControlledUnit(PamControlledUnit controlledUnit) {
-
+
pamConfiguration.addControlledUnit(controlledUnit);
guiFrameManager.addControlledUnit(controlledUnit);
@@ -773,78 +784,87 @@ public class PamController implements PamControllerInterface, PamSettings {
@Override
public PamControlledUnit addModule(Frame parentFrame, PamModuleInfo moduleInfo) {
// first of all we need to get a name for the new module
- // String question = "Enter a name for the new " + moduleInfo.getDescription();
- // String newName = JOptionPane.showInputDialog(null, question,
- // "New " + moduleInfo.getDescription(), JOptionPane.OK_CANCEL_OPTION);
- //String newName = NewModuleDialog.showDialog(parentFrame ,moduleInfo,null);
- String newName = guiFrameManager.getModuleName(parentFrame, moduleInfo);
+ // String question = "Enter a name for the new " + moduleInfo.getDescription();
+ // String newName = JOptionPane.showInputDialog(null, question,
+ // "New " + moduleInfo.getDescription(), JOptionPane.OK_CANCEL_OPTION);
+ // String newName = NewModuleDialog.showDialog(parentFrame ,moduleInfo,null);
+ String newName = guiFrameManager.getModuleName(parentFrame, moduleInfo);
- if (newName == null) return null;
+ if (newName == null)
+ return null;
return addModule(moduleInfo, newName);
}
/**
- * Add a module to the controller.
+ * Add a module to the controller.
+ *
* @param moduleInfo - the module info i.e. the type of module to add
- * @param moduleName - the module name.
+ * @param moduleName - the module name.
* @return
*/
public PamControlledUnit addModule(PamModuleInfo moduleInfo, String moduleName) {
- // Comment this section out and replace with code below, to provide custom error handling with PamExceptionHandler
- // PamControlledUnit pcu = moduleInfo.create(moduleName);
- // if (pcu == null) return null;
- // addControlledUnit(pcu);
- // if (initializationComplete) {
- // pcu.setupControlledUnit();
- // }
- // return pcu;
+ // Comment this section out and replace with code below, to provide custom error
+ // handling with PamExceptionHandler
+ // PamControlledUnit pcu = moduleInfo.create(moduleName);
+ // if (pcu == null) return null;
+ // addControlledUnit(pcu);
+ // if (initializationComplete) {
+ // pcu.setupControlledUnit();
+ // }
+ // return pcu;
- // try to load the unit. If moduleInfo.create returns null, clear the name and exit. Otherwise, save
+ // try to load the unit. If moduleInfo.create returns null, clear the name and
+ // exit. Otherwise, save
// the name of the module being loaded
unitBeingLoaded = moduleInfo.create(moduleName);
if (unitBeingLoaded == null) {
return null;
}
- // try to add the unit to the list.
+ // try to add the unit to the list.
// Put this method call in a try/catch, in case the developer hasn't coded
- // the plugin properly. We need to catch Throwable, not Exception, in order
+ // the plugin properly. We need to catch Throwable, not Exception, in order
// to catch everything (e.g. if one of the abstract methods is missing, java
- // throws AbstractMethodError. This is an error, not an exception, so if
- // we want to catch it we need to catch Throwable. Same with a ClassDefNotFoundError,
+ // throws AbstractMethodError. This is an error, not an exception, so if
+ // we want to catch it we need to catch Throwable. Same with a
+ // ClassDefNotFoundError,
// in case the plugin is looking for a class in the Pamguard core that no longer
// exists).
// Also check if unitBeingLoaded=null afterwards because this would indicate
- // that the PamExceptionHandler caught a runtime error during the class instantiation and therefore
- // removed the module to prevent further errors. This could also happen due to incompatibilities between
+ // that the PamExceptionHandler caught a runtime error during the class
+ // instantiation and therefore
+ // removed the module to prevent further errors. This could also happen due to
+ // incompatibilities between
// the current version of Pamguard and older plugin modules.
try {
addControlledUnit(unitBeingLoaded);
} catch (Throwable e) {
e.printStackTrace();
String title = "Error adding module";
- String msg = "There is an error with the module " + moduleName + "." +
- "If this is a plug-in, the error may have been caused by an incompatibility between " +
- "it and this version of PAMGuard. Please check the developer's website " +
- "for help.
" +
- "If this is a core Pamguard module, please copy the error message text and email to" +
- "support@pamguard.org.
" +
- "This module will not be loaded.";
+ String msg = "There is an error with the module " + moduleName + ".
"
+ + "If this is a plug-in, the error may have been caused by an incompatibility between "
+ + "it and this version of PAMGuard. Please check the developer's website " + "for help.
"
+ + "If this is a core Pamguard module, please copy the error message text and email to"
+ + "support@pamguard.org.
" + "This module will not be loaded.";
String help = null;
int ans = WarnOnce.showWarning(title, msg, WarnOnce.WARNING_MESSAGE, help, e);
- System.err.println("Exception while loading " + moduleName);
+ System.err.println("Exception while loading " + moduleName);
this.removeControlledUnt(unitBeingLoaded);
- this.clearLoadedUnit();;
+ this.clearLoadedUnit();
+ ;
}
if (unitBeingLoaded == null) {
return null;
}
- // run the unit's setupProcess method. Again, check if nitBeingLoaded=null afterwards because this would indicate
- // that the PamExceptionHandler caught a runtime error during the class instantiation and therefore
- // removed the module to prevent further errors. This could happen due to incompatibilities between
+ // run the unit's setupProcess method. Again, check if nitBeingLoaded=null
+ // afterwards because this would indicate
+ // that the PamExceptionHandler caught a runtime error during the class
+ // instantiation and therefore
+ // removed the module to prevent further errors. This could happen due to
+ // incompatibilities between
// the current version of Pamguard and older plugin modules.
if (initializationComplete) {
unitBeingLoaded.setupControlledUnit();
@@ -855,33 +875,38 @@ public class PamController implements PamControllerInterface, PamSettings {
// move the controlled unit reference to a temp variable, so that we can
// clear the unitBeingLoaded variable and still pass a reference to the
- // new unit back to the calling function. In this way, we can always use
+ // new unit back to the calling function. In this way, we can always use
// the unitBeingLoaded variable as a de facto flag to know whether or not
// a module is currently being loaded
PamControlledUnit unitNowLoaded = unitBeingLoaded;
clearLoadedUnit();
- // guiFrameManager.notifyModelChanged(ADD_CONTROLLEDUNIT); //this should be handled above in addControlledUnit
+ // guiFrameManager.notifyModelChanged(ADD_CONTROLLEDUNIT); //this should be
+ // handled above in addControlledUnit
return unitNowLoaded;
}
- /* (non-Javadoc)
- * @see PamguardMVC.PamControllerInterface#RemoveControlledUnt(PamguardMVC.PamControlledUnit)
+ /*
+ * (non-Javadoc)
+ *
+ * @see PamguardMVC.PamControllerInterface#RemoveControlledUnt(PamguardMVC.
+ * PamControlledUnit)
*/
@Override
public void removeControlledUnt(PamControlledUnit controlledUnit) {
// The PamExceptionHandler will call this to remove a controlled unit that fails
- // during load. Depending when it failed, it may or may not have been instantiated
- // yet. So if the controlledUnit is still null, just exit
- //
- if (controlledUnit==null) {
+ // during load. Depending when it failed, it may or may not have been
+ // instantiated
+ // yet. So if the controlledUnit is still null, just exit
+ //
+ if (controlledUnit == null) {
return;
}
/**
- * NEVER delete the array manager.
+ * NEVER delete the array manager.
*/
if (controlledUnit.getClass() == ArrayManager.class) {
return;
@@ -893,17 +918,19 @@ public class PamController implements PamControllerInterface, PamSettings {
if (removed) {
notifyModelChanged(PamControllerInterface.REMOVE_CONTROLLEDUNIT);
}
- // getMainFrame().revalidate(); //handled inside the GUIFrameManager by notify model changed. The controller should have
- //as few direct GUI calls as possible.
+ // getMainFrame().revalidate(); //handled inside the GUIFrameManager by notify
+ // model changed. The controller should have
+ // as few direct GUI calls as possible.
}
-
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see PamController.PamControllerInterface#orderModules()
*/
@Override
public boolean orderModules(Frame parentFrame) {
- int[] newOrder = ModuleOrderDialog.showDialog(this, parentFrame);
+ int[] newOrder = ModuleOrderDialog.showDialog(this, parentFrame);
if (newOrder != null) {
// re-order the modules according the new list.
pamConfiguration.reOrderModules(newOrder);
@@ -934,8 +961,9 @@ public class PamController implements PamControllerInterface, PamSettings {
// }
/**
- * Swaps the positions of two modules in the main list of modules and
- * also swaps their tabs (if they have them).
+ * Swaps the positions of two modules in the main list of modules and also swaps
+ * their tabs (if they have them).
+ *
* @param m1 First PamControlledUnit to swap
* @param m2 Second PamControlledUnit to swap.
*/
@@ -944,8 +972,9 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * Sets the position of a particular PamControlledUnit in the list.
- * Also sets the right tab position, to match that order.
+ * Sets the position of a particular PamControlledUnit in the list. Also sets
+ * the right tab position, to match that order.
+ *
* @param pcu
* @param position
* @return
@@ -967,17 +996,21 @@ public class PamController implements PamControllerInterface, PamSettings {
/**
* Get a list of PamControlledUnit units of a given type
+ *
* @param unitType Controlled unit type
- * @return list of units.
+ * @return list of units.
*/
public ArrayList findControlledUnits(String unitType) {
return pamConfiguration.findControlledUnits(unitType);
}
+
/**
- * Get a list of PamControlledUnit units of a given type and name, allowing for nulls.
+ * Get a list of PamControlledUnit units of a given type and name, allowing for
+ * nulls.
+ *
* @param unitType Controlled unit type, can be null for all units of name
* @param unitName Controlled unit name, can be null for all units of type
- * @return list of units.
+ * @return list of units.
*/
public ArrayList findControlledUnits(String unitType, String unitName) {
return pamConfiguration.findControlledUnits(unitType, unitName);
@@ -990,37 +1023,45 @@ public class PamController implements PamControllerInterface, PamSettings {
/**
* Find the first instance of a module with a given class type and name.
- * Name can be null in which case the first module with the correct class
- * will be returned
+ *
+ * Name can be null in which case the first module with the correct class will
+ * be returned
+ *
* @param unitClass Module class (sub class of PamControlledUnit)
- * @param unitName Module Name
- * @return Existing module with that class and name.
+ * @param unitName Module Name
+ * @return Existing module with that class and name.
*/
public PamControlledUnit findControlledUnit(Class unitClass, String unitName) {
return pamConfiguration.findControlledUnit(unitClass, unitName);
}
/**
- * Get an Array list of PamControlledUnits of a particular class (exact matches only).
+ * Get an Array list of PamControlledUnits of a particular class (exact matches
+ * only).
+ *
* @param unitClass PamControlledUnit class
- * @return List of current instances of this class.
+ * @return List of current instances of this class.
*/
public ArrayList findControlledUnits(Class unitClass) {
return pamConfiguration.findControlledUnits(unitClass);
}
-
+
/**
- * Get an Array list of PamControlledUnits of a particular class (exact matches only).
+ * Get an Array list of PamControlledUnits of a particular class (exact matches
+ * only).
+ *
* @param unitClass PamControlledUnit class
- * @return List of current instances of this class.
+ * @return List of current instances of this class.
*/
public ArrayList findControlledUnits(Class unitClass, boolean includeSubClasses) {
return pamConfiguration.findControlledUnits(unitClass, includeSubClasses);
}
/**
- * Check whether a controlled unit exists based on it's name.
- * @param the controlled unit name e.g. "my crazy click detector", not the default name.
+ * Check whether a controlled unit exists based on it's name.
+ *
+ * @param the controlled unit name e.g. "my crazy click detector", not the
+ * default name.
*/
public boolean isControlledUnit(String controlName) {
return pamConfiguration.isControlledUnit(controlName);
@@ -1049,17 +1090,15 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * Restart PAMguard. Can be called when something is mildly wrong
- * such as a DAQ glitch, so that acquisition is stopped and
- * restarted.
+ * Restart PAMguard. Can be called when something is mildly wrong such as a DAQ
+ * glitch, so that acquisition is stopped and restarted.
*/
public void restartPamguard() {
pamStop();
-
+
/*
- * launch a restart thread, that won't do ANYTHING until
- * PAMGuard is really idle and buffers are cleared. Can only
- * have one of these at a time !
+ * launch a restart thread, that won't do ANYTHING until PAMGuard is really idle
+ * and buffers are cleared. Can only have one of these at a time !
*/
if (restartRunnable != null) {
System.out.println("Warning !!!! PAMGuard is already trying to restart!");
@@ -1069,7 +1108,7 @@ public class PamController implements PamControllerInterface, PamSettings {
Thread restartThread = new Thread(restartRunnable, "RestartPAMGuard Thread");
restartThread.run();
}
-
+
private class RestartRunnable implements Runnable {
@Override
@@ -1084,20 +1123,16 @@ public class PamController implements PamControllerInterface, PamSettings {
}
long t2 = System.currentTimeMillis();
restartRunnable = null;
- System.out.printf("PAMGuard safe to restart after %d milliseconds\n", t2-t1);
- startLater(false);
-
+ System.out.printf("PAMGuard safe to restart after %d milliseconds\n", t2 - t1);
+ startLater(false);
+
}
-
+
}
-
-
-
-
+
/**
- * calls pamStart using the SwingUtilities
- * invokeLater command to start PAMGAURD
- * later in the AWT event queue.
+ * calls pamStart using the SwingUtilities invokeLater command to start PAMGAURD
+ * later in the AWT event queue.
*/
public void startLater() {
// SwingUtilities.invokeLater(new StartLater(true));
@@ -1107,8 +1142,10 @@ public class PamController implements PamControllerInterface, PamSettings {
public void startLater(boolean saveSettings) {
SwingUtilities.invokeLater(new StartLater(saveSettings));
}
+
/**
- * Runnable for use with startLater.
+ * Runnable for use with startLater.
+ *
* @author Doug
*
*/
@@ -1127,8 +1164,8 @@ public class PamController implements PamControllerInterface, PamSettings {
@Override
public void run() {
/*
- * do a final check that the stop button hasn't been pressed - can arrive a bit
- * late if the system was continually restarting.
+ * do a final check that the stop button hasn't been pressed - can arrive a bit
+ * late if the system was continually restarting.
*/
if (lastStartStopButton != BUTTON_STOP) {
pamStart(saveSettings);
@@ -1137,9 +1174,8 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * calls pamStop using the SwingUtilities
- * invokeLater command to stop PAMGAURD
- * later in the AWT event queue.
+ * calls pamStop using the SwingUtilities invokeLater command to stop PAMGAURD
+ * later in the AWT event queue.
*/
public void stopLater() {
SwingUtilities.invokeLater(new StopLater());
@@ -1147,6 +1183,7 @@ public class PamController implements PamControllerInterface, PamSettings {
/**
* Runnable to use with the stopLater() command
+ *
* @author Doug Gillespie
*
*/
@@ -1158,8 +1195,9 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * Called from the start button. A little book keeping
- * to distinguish this from automatic starts / restarts
+ * Called from the start button. A little book keeping to distinguish this from
+ * automatic starts / restarts
+ *
* @return true if started.
*/
@Override
@@ -1167,10 +1205,10 @@ public class PamController implements PamControllerInterface, PamSettings {
lastStartStopButton = BUTTON_START;
return pamStart();
}
-
+
/**
- * Called from the stop button. A little book keeping
- * to distinguish this from automatic starts / restarts
+ * Called from the stop button. A little book keeping to distinguish this from
+ * automatic starts / restarts
*/
@Override
public void manualStop() {
@@ -1180,45 +1218,49 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * Start PAMGUARD. This function also gets called from the
- * GUI menu start button and from the Network control system.
- * As well as actually starting PAMGUARD it will write
- * settings to the database and to the binary data store.
+ * Start PAMGUARD. This function also gets called from the GUI menu start button
+ * and from the Network control system.
+ *
+ * As well as actually starting PAMGUARD it will write settings to the database
+ * and to the binary data store.
+ *
* @return true if all modules start successfully
*/
@Override
public boolean pamStart() {
- // Debug.println("PAMController: pamStart");
+ // Debug.println("PAMController: pamStart");
setManualStop(false);
return pamStart(true);
}
/**
- * Start PAMGuard with an option on saving settings.
+ * Start PAMGuard with an option on saving settings.
+ *
* @param saveSettings flag to save settings to database and binary store
* @return true if all modules start successfully
*/
public boolean pamStart(boolean saveSettings) {
- // Debug.println("PAMController: pamStart2");
+ // Debug.println("PAMController: pamStart2");
return pamStart(saveSettings, PamCalendar.getTimeInMillis());
}
/**
- * Starts PAMGuard, but with the option to save settings (to binary and to database)
- * and also to give a specific start time for the session. When data are being received over
- * the network, this may be in the past !
- * @param saveSettings flag to say whether or not settings should be saved.
- * @param startTime start time in millis
+ * Starts PAMGuard, but with the option to save settings (to binary and to
+ * database) and also to give a specific start time for the session. When data
+ * are being received over the network, this may be in the past !
+ *
+ * @param saveSettings flag to say whether or not settings should be saved.
+ * @param startTime start time in millis
* @return true if all modules start successfully
*/
public boolean pamStart(boolean saveSettings, long startTime) {
- // Debug.println("PAMController: pamStart3");
+ // Debug.println("PAMController: pamStart3");
- globalTimeManager.waitForGlobalTime(getMainFrame(),
+ globalTimeManager.waitForGlobalTime(getMainFrame(),
globalTimeManager.getGlobalTimeParameters().getStartupDelay());
manualStop = false;
-
+
ArrayList pamControlledUnits = pamConfiguration.getPamControlledUnits();
PamCalendar.setSessionStartTime(startTime);
@@ -1232,14 +1274,16 @@ public class PamController implements PamControllerInterface, PamSettings {
}
if (pamControlledUnits.get(iU).getPamProcess(iP).prepareProcessOK() == false) {
setPamStatus(PAM_IDLE);
- System.out.println("Can't start since unable to prepare process " +
- pamControlledUnits.get(iU).getPamProcess(iP).getProcessName());
+ System.out.println("Can't start since unable to prepare process "
+ + pamControlledUnits.get(iU).getPamProcess(iP).getProcessName());
prepErrors++;
- };
+ }
+ ;
}
- // long t2 = System.currentTimeMillis();
- // System.out.printf("***********************************Time taken to prepare %s was %d millis\n", pamControlledUnits.get(iU).getUnitName(), t2-t1);
- // t1 = t2;
+ // long t2 = System.currentTimeMillis();
+ // System.out.printf("***********************************Time taken to prepare
+ // %s was %d millis\n", pamControlledUnits.get(iU).getUnitName(), t2-t1);
+ // t1 = t2;
}
boolean prepError = (runMode == PamController.RUN_NORMAL && prepErrors > 0);
if (prepError) {
@@ -1248,15 +1292,16 @@ public class PamController implements PamControllerInterface, PamSettings {
/*
*
- * This needs to be called after prepareproces.
- * Now we do some extra checks on the stores to see if we want to overwite data,
- * carry on from where we left off, etc.
+ * This needs to be called after prepareproces. Now we do some extra checks on
+ * the stores to see if we want to overwite data, carry on from where we left
+ * off, etc.
*/
- if (saveSettings && getRunMode() == RUN_NORMAL) { // only true on a button press or network start.
+ if (saveSettings && getRunMode() == RUN_NORMAL) { // only true on a button press or network start.
ReprocessManager reprocessManager = new ReprocessManager();
boolean goonthen = reprocessManager.checkOutputDataStatus();
if (goonthen == false) {
- System.out.println("Data processing will not start since you've chosen not to overwrite existing output data");
+ System.out.println(
+ "Data processing will not start since you've chosen not to overwrite existing output data");
pamStop();
setPamStatus(PAM_IDLE);
return false;
@@ -1270,7 +1315,8 @@ public class PamController implements PamControllerInterface, PamSettings {
}
if (++nStarts > 1 && debugDumpBufferAtRestart) {
- // do this here - all processses should have reset buffers to start again by now.
+ // do this here - all processses should have reset buffers to start again by
+ // now.
String msg = String.format("Starting PAMGuard go %d", nStarts);
dumpBufferStatus(msg, false);
}
@@ -1280,28 +1326,32 @@ public class PamController implements PamControllerInterface, PamSettings {
t1 = System.currentTimeMillis();
for (int iU = 0; iU < pamControlledUnits.size(); iU++) {
pamControlledUnits.get(iU).pamToStart();
- // long t2 = System.currentTimeMillis();
- // System.out.printf("+++++++++++++++++++++++++++++++++++Time taken to call pamtoStart %s was %d millis\n", pamControlledUnits.get(iU).getUnitName(), t2-t1);
- // t1 = t2;
+ // long t2 = System.currentTimeMillis();
+ // System.out.printf("+++++++++++++++++++++++++++++++++++Time taken to call
+ // pamtoStart %s was %d millis\n", pamControlledUnits.get(iU).getUnitName(),
+ // t2-t1);
+ // t1 = t2;
}
for (int iU = 0; iU < pamControlledUnits.size(); iU++) {
- for (int iP = 0; iP < pamControlledUnits.get(iU)
- .getNumPamProcesses(); iP++) {
+ for (int iP = 0; iP < pamControlledUnits.get(iU).getNumPamProcesses(); iP++) {
pamControlledUnits.get(iU).getPamProcess(iP).pamStart();
}
- // long t2 = System.currentTimeMillis();
- // System.out.printf("==================================Time taken to call pamStart %s was %d millis\n", pamControlledUnits.get(iU).getUnitName(), t2-t1);
- // t1 = t2;
+ // long t2 = System.currentTimeMillis();
+ // System.out.printf("==================================Time taken to call
+ // pamStart %s was %d millis\n", pamControlledUnits.get(iU).getUnitName(),
+ // t2-t1);
+ // t1 = t2;
}
- // starting the DAQ may take a little while, so recheck and reset the
+ // starting the DAQ may take a little while, so recheck and reset the
// start time.
long startDelay = PamCalendar.getTimeInMillis() - PamCalendar.getSessionStartTime();
if (PamCalendar.isSoundFile() == false) {
PamCalendar.setSessionStartTime(PamCalendar.getTimeInMillis());
}
if (PamCalendar.isSoundFile() == false) {
- System.out.printf("PAMGUARD Startup took %d milliseconds at time %s\n", startDelay, PamCalendar.formatDateTime(PamCalendar.getSessionStartTime()));
+ System.out.printf("PAMGUARD Startup took %d milliseconds at time %s\n", startDelay,
+ PamCalendar.formatDateTime(PamCalendar.getSessionStartTime()));
}
guiFrameManager.pamStarted();
@@ -1309,19 +1359,20 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * Stopping PAMGUARD. Harder than you might think !
- * First a pamStop() is sent to all processes, then once
- * that's done, a pamHasStopped is sent to all Controllers.
- * This is necessary when running in a multi-thread mode
- * since some processes may still be receiving data and may still
- * pass if on to other downstream processes, storage, etc.
+ * Stopping PAMGUARD. Harder than you might think ! First a pamStop() is sent to
+ * all processes, then once that's done, a pamHasStopped is sent to all
+ * Controllers.
+ *
+ * This is necessary when running in a multi-thread mode since some processes
+ * may still be receiving data and may still pass if on to other downstream
+ * processes, storage, etc.
*
*/
@Override
public void pamStop() {
setPamStatus(PAM_STOPPING);
-
+
// start the status check timer, so that we know when all the threads have
// actually stopped
// statusCheckThread = new Thread(new StatusTimer());
@@ -1330,28 +1381,28 @@ public class PamController implements PamControllerInterface, PamSettings {
// tell all controlled units to stop
for (int iU = 0; iU < pamControlledUnits.size(); iU++) {
- for (int iP = 0; iP < pamControlledUnits.get(iU)
- .getNumPamProcesses(); iP++) {
+ for (int iP = 0; iP < pamControlledUnits.get(iU).getNumPamProcesses(); iP++) {
pamControlledUnits.get(iU).getPamProcess(iP).pamStop();
}
}
-
+
dumpBufferStatus("In stopping", false);
/*
- * now launch another thread to wait for everything to have stopped, but
- * leave this function so that AWT is released and graphics can update, the
- * wait thread will make a fresh call into AWT which will continue the stopping
- * of everything.
+ * now launch another thread to wait for everything to have stopped, but leave
+ * this function so that AWT is released and graphics can update, the wait
+ * thread will make a fresh call into AWT which will continue the stopping of
+ * everything.
*/
detectorEndThread = new WaitDetectorThread();
Thread t = new Thread(detectorEndThread);
t.start();
}
-
+
/**
- * Non AWT thread that sits and waits for detectors to actually finish their
- * processing, leaving AWT unblocked. Then calls a function back into AWT to
- * finish stopping, which will do stuff like closing binary files.
+ * Non AWT thread that sits and waits for detectors to actually finish their
+ * processing, leaving AWT unblocked. Then calls a function back into AWT to
+ * finish stopping, which will do stuff like closing binary files.
+ *
* @author dg50
*
*/
@@ -1363,7 +1414,8 @@ public class PamController implements PamControllerInterface, PamSettings {
while (checkRunStatus()) {
long t2 = System.currentTimeMillis();
if (t2 - t1 > 5000) {
- System.out.printf("Stopping, but stuck in loop for CheckRunStatus for %3.1fs\n", (double) (t2-t1)/1000.);
+ System.out.printf("Stopping, but stuck in loop for CheckRunStatus for %3.1fs\n",
+ (double) (t2 - t1) / 1000.);
dumpBufferStatus("Stopping stuck in loop", false);
break; // crap out anyway.
}
@@ -1373,66 +1425,67 @@ public class PamController implements PamControllerInterface, PamSettings {
e.printStackTrace();
}
}
- // arrive here when all detectors have ended.
+ // arrive here when all detectors have ended.
finishStopping();
}
-
+
}
-
+
/**
- * Look in every data block, particularly threaded ones, and dump
- * the buffer status. This will have to go via PamProcess so that
- * additional information can be added from any processes that
- * hold additional data in other internal buffers.
- * @param message Message to print prior to dumping buffers for debug.
- * @param sayEmpties dump info even if a buffer is empty (otherwise, only ones that have stuff still)
+ * Look in every data block, particularly threaded ones, and dump the buffer
+ * status. This will have to go via PamProcess so that additional information
+ * can be added from any processes that hold additional data in other internal
+ * buffers.
+ *
+ * @param message Message to print prior to dumping buffers for debug.
+ * @param sayEmpties dump info even if a buffer is empty (otherwise, only ones
+ * that have stuff still)
*/
public void dumpBufferStatus(String message, boolean sayEmpties) {
- if (debugDumpBufferAtRestart == false) return;
-
+ if (debugDumpBufferAtRestart == false)
+ return;
+
System.out.println("**** Dumping process buffer status: " + message);
ArrayList pamControlledUnits = pamConfiguration.getPamControlledUnits();
for (PamControlledUnit aUnit : pamControlledUnits) {
int numProcesses = aUnit.getNumPamProcesses();
- for (int i=0; i pamControlledUnits = pamConfiguration.getPamControlledUnits();
-
+
if (PamModel.getPamModel().isMultiThread()) {
for (int iU = 0; iU < pamControlledUnits.size(); iU++) {
pamControlledUnits.get(iU).flushDataBlockBuffers(2000);
@@ -1451,7 +1504,7 @@ public class PamController implements PamControllerInterface, PamSettings {
// e.printStackTrace();
// }
// }
-
+
// send out the pamHasStopped message
// Debug.out.println("PamController letting everyone know PAMGuard has stopped.");
for (int iU = 0; iU < pamControlledUnits.size(); iU++) {
@@ -1461,10 +1514,10 @@ public class PamController implements PamControllerInterface, PamSettings {
saveEndSettings(stopTime);
setPamStatus(PAM_IDLE);
-
+
guiFrameManager.pamEnded();
-
- // no good having this here since it get's called at the end of every file.
+
+ // no good having this here since it get's called at the end of every file.
// if (GlobalArguments.getParam(PamController.AUTOEXIT) != null) {
//// can exit here, since we've auto started, can auto exit.
// if (canClose()) {
@@ -1473,10 +1526,10 @@ public class PamController implements PamControllerInterface, PamSettings {
// }
// }
}
-
- public void batchProcessingComplete( ) {
+
+ public void batchProcessingComplete() {
if (GlobalArguments.getParam(PamController.AUTOEXIT) != null) {
- // can exit here, since we've auto started, can auto exit.
+ // can exit here, since we've auto started, can auto exit.
if (canClose()) {
pamClose();
shutDownPamguard();
@@ -1484,12 +1537,10 @@ public class PamController implements PamControllerInterface, PamSettings {
}
}
-
/**
- * Status Timer class. Once started, will run in a thread
- * and constantly check the buffers of all ThreadedObserver
- * objects. Once all the buffers are empty, this will set
- * the pam status to PAM_IDLE and let the thread die
+ * Status Timer class. Once started, will run in a thread and constantly check
+ * the buffers of all ThreadedObserver objects. Once all the buffers are empty,
+ * this will set the pam status to PAM_IDLE and let the thread die
*
* @author mo55
*
@@ -1515,9 +1566,9 @@ public class PamController implements PamControllerInterface, PamSettings {
// }
/**
- * Check the status of every threaded observer to see if it has emptied out
- * it's buffer of events. If the buffer is empty, return true. If the thread
- * is still processing, return false
+ * Check the status of every threaded observer to see if it has emptied out it's
+ * buffer of events. If the buffer is empty, return true. If the thread is still
+ * processing, return false
*
* @return true if ANY process is still running
*/
@@ -1556,15 +1607,15 @@ public class PamController implements PamControllerInterface, PamSettings {
// Debug.out.println(" Are we finished? " + areWeFinished);
// return areWeFinished;
ArrayList pamControlledUnits = pamConfiguration.getPamControlledUnits();
-
+
boolean running = false;
for (PamControlledUnit aUnit : pamControlledUnits) {
int numProcesses = aUnit.getNumPamProcesses();
- for (int i=0; i findSettingsSources() {
@@ -1646,6 +1696,7 @@ public class PamController implements PamControllerInterface, PamSettings {
public boolean modelSettings(JFrame frame) {
return pamModelInterface.modelSettings(frame);
}
+
/*
* (non-Javadoc)
*
@@ -1662,9 +1713,8 @@ public class PamController implements PamControllerInterface, PamSettings {
/*
* (non-Javadoc)
*
- * @see PamModel.PamModelInterface#GetFFTDataBlocks() Goes through all
- * processes and makes an array list containing only data blocks of FFT
- * data
+ * @see PamModel.PamModelInterface#GetFFTDataBlocks() Goes through all processes
+ * and makes an array list containing only data blocks of FFT data
*/
@Override
public ArrayList getFFTDataBlocks() {
@@ -1713,27 +1763,27 @@ public class PamController implements PamControllerInterface, PamSettings {
@Override
public ArrayList getDetectorEventDataBlocks() {
- // return makeDataBlockList(PamguardMVC.DataType.DETEVENT);
+ // return makeDataBlockList(PamguardMVC.DataType.DETEVENT);
return null;
}
@Override
public PamDataBlock getDetectorEventDataBlock(int id) {
- // return getDataBlock(PamguardMVC.DataType.DETEVENT, id);
+ // return getDataBlock(PamguardMVC.DataType.DETEVENT, id);
return null;
}
@Override
public PamDataBlock getDetectorEventDataBlock(String name) {
- // return (PamDataBlock) getDataBlock(PamguardMVC.DataType.DETEVENT, name);
+ // return (PamDataBlock) getDataBlock(PamguardMVC.DataType.DETEVENT, name);
return null;
}
@Override
/**
- * Note that in order to return a list of PamDataBlocks that contain objects implementing
- * the AcousticDataUnit or PamDetection interfaces, the includeSubClasses boolean MUST be
- * true.
+ * Note that in order to return a list of PamDataBlocks that contain objects
+ * implementing the AcousticDataUnit or PamDetection interfaces, the
+ * includeSubClasses boolean MUST be true.
*/
public ArrayList getDataBlocks(Class blockType, boolean includeSubClasses) {
return pamConfiguration.getDataBlocks(blockType, includeSubClasses);
@@ -1749,52 +1799,53 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * Makes a list of data blocks for all processes in all controllers for a
- * given DataType or for all DataTypes
+ * Makes a list of data blocks for all processes in all controllers for a given
+ * DataType or for all DataTypes
*
* @param blockType -- PamguardMVC.DataType.FFT, .RAW, etc., or null to
- * get all extant blocks
+ * get all extant blocks
* @return An ArrayList of data blocks
*/
- // private ArrayList makeDataBlockList(Enum blockType) {
- // ArrayList blockList = new ArrayList();
- // PamProcess pP;
+ // private ArrayList makeDataBlockList(Enum blockType) {
+ // ArrayList blockList = new ArrayList();
+ // PamProcess pP;
//
- // for (int iU = 0; iU < pamControlledUnits.size(); iU++) {
- // for (int iP = 0; iP < pamControlledUnits.get(iU)
- // .getNumPamProcesses(); iP++) {
- // pP = pamControlledUnits.get(iU).getPamProcess(iP);
- // for (int j = 0; j < pP.getNumOutputDataBlocks(); j++) {
- // if (blockType == null
- // || pP.getOutputDataBlock(j).getDataType() == blockType) {
- // blockList.add(pP.getOutputDataBlock(j));
- // }
- // }
- // }
- // }
+ // for (int iU = 0; iU < pamControlledUnits.size(); iU++) {
+ // for (int iP = 0; iP < pamControlledUnits.get(iU)
+ // .getNumPamProcesses(); iP++) {
+ // pP = pamControlledUnits.get(iU).getPamProcess(iP);
+ // for (int j = 0; j < pP.getNumOutputDataBlocks(); j++) {
+ // if (blockType == null
+ // || pP.getOutputDataBlock(j).getDataType() == blockType) {
+ // blockList.add(pP.getOutputDataBlock(j));
+ // }
+ // }
+ // }
+ // }
// private ArrayList makeDataBlockList(Class classType, boolean includSubClasses) {
// return pamConfiguration.makeDataBlockList(classType, includSubClasses);
// }
- /**
- * Find a block of a given type with the id number, or null if the number
- * is out of range.
+ /**
+ * Find a block of a given type with the id number, or null if the number is out
+ * of range.
*
- * @param blockType
- * @param id -- the block id number
- * @return block, which you may want to cast to a subtype
+ * @param blockType
+ * @param id -- the block id number
+ * @return block, which you may want to cast to a subtype
*/
@Override
public PamDataBlock getDataBlock(Class blockType, int id) {
return pamConfiguration.getDataBlock(blockType, id);
}
- /**
- * Find a block of a given type with the given name, or null if it
- * doesn't exist.
- * @param blockType -- RAW, FFT, DETECTOR, null, etc.
- * @param name -- the block name
- * @return block, which you may want to cast to a subtype
+ /**
+ * Find a block of a given type with the given name, or null if it doesn't
+ * exist.
+ *
+ * @param blockType -- RAW, FFT, DETECTOR, null, etc.
+ * @param name -- the block name
+ * @return block, which you may want to cast to a subtype
*/
@Override
public PamDataBlock getDataBlock(Class blockType, String name) {
@@ -1803,6 +1854,7 @@ public class PamController implements PamControllerInterface, PamSettings {
/**
* Find a block with the given long name, or null if it doesn't exist.
+ *
* @param longName the long name of the PamDataBlock
* @return block
*/
@@ -1812,7 +1864,7 @@ public class PamController implements PamControllerInterface, PamSettings {
/**
*
- * @return a list of offline data sources.
+ * @return a list of offline data sources.
*/
public ArrayList findOfflineDataStores() {
ArrayList ods = new ArrayList();
@@ -1828,7 +1880,7 @@ public class PamController implements PamControllerInterface, PamSettings {
}
public OfflineDataStore findOfflineDataStore(Class sourceClass) {
- ArrayList odss = findOfflineDataStores();
+ ArrayList odss = findOfflineDataStores();
for (int i = 0; i < odss.size(); i++) {
if (sourceClass.isAssignableFrom(odss.get(i).getClass())) {
return odss.get(i);
@@ -1838,55 +1890,57 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * Updates the entire datamap.
+ * Updates the entire datamap.
*/
- public void updateDataMap(){
- System.out.println("updateDataMap:");
+ public void updateDataMap() {
+ System.out.println("updateDataMap:");
- if (DBControlUnit.findDatabaseControl()==null) return;
-
- System.out.println("updateDataMap: 1");
+ if (DBControlUnit.findDatabaseControl() == null)
+ return;
- ArrayList datablocks=getDataBlocks() ;
-
- System.out.println("updateDataMap: 2");
+ System.out.println("updateDataMap: 1");
+
+ ArrayList datablocks = getDataBlocks();
+
+ System.out.println("updateDataMap: 2");
DBControlUnit.findDatabaseControl().updateDataMap(datablocks);
-
- System.out.println("updateDataMap: 3");
+
+ System.out.println("updateDataMap: 3");
BinaryStore.findBinaryStoreControl().getDatagramManager().updateDatagrams();
-
- System.out.println("updateDataMap: 4");
+
+ System.out.println("updateDataMap: 4");
notifyModelChanged(PamControllerInterface.EXTERNAL_DATA_IMPORTED);
}
-
-
+
/**
- * Create the datamap from the database
+ * Create the datamap from the database
*/
- public void createDataMap(){
- if (DBControlUnit.findDatabaseControl()==null) return;
+ public void createDataMap() {
+ if (DBControlUnit.findDatabaseControl() == null)
+ return;
DBControlUnit.findDatabaseControl().createOfflineDataMap(getMainFrame());
BinaryStore.findBinaryStoreControl().createOfflineDataMap(getMainFrame());
}
-
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see PamguardMVC.PamControllerInterface#NotifyModelChanged()
*/
@Override
public void notifyModelChanged(int changeType) {
- //System.out.println("PamController: notify model changed: " +changeType );
+ // System.out.println("PamController: notify model changed: " +changeType );
if (changeType == CHANGED_MULTI_THREADING) {
changedThreading();
}
// no need for this, since array in now a controlled unit so it
- // will get this notification anyway.
- // ArrayManager.getArrayManager().notifyModelChanged(changeType);
+ // will get this notification anyway.
+ // ArrayManager.getArrayManager().notifyModelChanged(changeType);
guiFrameManager.notifyModelChanged(changeType);
@@ -1898,10 +1952,9 @@ public class PamController implements PamControllerInterface, PamSettings {
PamSettingManager.getInstance().notifyModelChanged(changeType);
-
if (getRunMode() == PamController.RUN_PAMVIEW) {
AbstractScrollManager.getScrollManager().notifyModelChanged(changeType);
- if (changeType == CHANGED_OFFLINE_DATASTORE) { // called from both database and binary data mappers.
+ if (changeType == CHANGED_OFFLINE_DATASTORE) { // called from both database and binary data mappers.
checkOfflineDataUIDs();
}
}
@@ -1915,30 +1968,31 @@ public class PamController implements PamControllerInterface, PamSettings {
StorageOptions.getInstance().setBlockOptions();
}
- // if we've just added a module, try to synchronise the UIDs with the the database and binary stores
+ // if we've just added a module, try to synchronise the UIDs with the the
+ // database and binary stores
if (changeType == INITIALIZATION_COMPLETE || (initializationComplete && changeType == ADD_CONTROLLEDUNIT)) {
uidManager.synchUIDs(true);
}
if (changeType == GLOBAL_TIME_UPDATE) {
haveGlobalTimeUpdate = true;
- }
- else {
+ } else {
globalTimeManager.notifyModelChanged(changeType);
}
-
+
if (moduleChange(changeType)) {
clearSelectorsAndSymbols();
}
-
+
if (changeType == DATA_LOAD_COMPLETE) {
firstDataLoadComplete = true;
}
}
-
+
/**
- * Has there been a module change AFTER initial module loading.
+ * Has there been a module change AFTER initial module loading.
+ *
* @param changeType
* @return true if modules added or removed after initialisation complete
*/
@@ -1956,15 +2010,15 @@ public class PamController implements PamControllerInterface, PamSettings {
}
private void checkOfflineDataUIDs() {
- ArrayList dataBlocks = getDataBlocks();
- for (PamDataBlock dataBlock:dataBlocks) {
+ ArrayList dataBlocks = getDataBlocks();
+ for (PamDataBlock dataBlock : dataBlocks) {
dataBlock.checkOfflineDataUIDs();
}
}
/**
- * loop over all units and processes, telling them to
- * re-subscribe to their principal data source
+ * loop over all units and processes, telling them to re-subscribe to their
+ * principal data source
*/
private void changedThreading() {
PamProcess pamProcess;
@@ -1985,18 +2039,17 @@ public class PamController implements PamControllerInterface, PamSettings {
if (garbageTimer != null) {
garbageTimer.stop();
}
- }
- else {
+ } else {
if (garbageTimer == null) {
- garbageTimer = new Timer(ms.gcInterval*1000, new ActionListener() {
+ garbageTimer = new Timer(ms.gcInterval * 1000, new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
- // System.out.println("Additional Garbage collection called");
+ // System.out.println("Additional Garbage collection called");
Runtime.getRuntime().gc();
}
});
}
- garbageTimer.setDelay(ms.gcInterval*1000);
+ garbageTimer.setDelay(ms.gcInterval * 1000);
garbageTimer.start();
}
}
@@ -2010,7 +2063,7 @@ public class PamController implements PamControllerInterface, PamSettings {
public long getSettingsVersion() {
return 0;
}
-
+
@Override
public String getUnitName() {
return unitName;
@@ -2032,7 +2085,8 @@ public class PamController implements PamControllerInterface, PamSettings {
for (int i = 0; i < usedModules.size(); i++) {
umi = usedModules.get(i);
mi = PamModuleInfo.findModuleInfo(umi.className);
- if (mi == null) continue;
+ if (mi == null)
+ continue;
addModule(mi, umi.unitName);
}
return true;
@@ -2043,7 +2097,8 @@ public class PamController implements PamControllerInterface, PamSettings {
guiFrameManager.destroyModel();
- // also tell all PamControlledUnits since they may want to find their data source
+ // also tell all PamControlledUnits since they may want to find their data
+ // source
// it that was created after they were - i.e. dependencies have got all muddled
pamConfiguration.destroyModel();
@@ -2056,12 +2111,14 @@ public class PamController implements PamControllerInterface, PamSettings {
destroyModel();
- setupPamguard();
+ setupPamguard();
}
+
/**
- * returns the status of Pamguard. The available status' will
- * depend on the run mode. For instance, if run mode is RUN_NORMAL
- * then status can be either PAM_IDLE or PAM_RUNNING.
+ * returns the status of Pamguard. The available status' will depend on the run
+ * mode. For instance, if run mode is RUN_NORMAL then status can be either
+ * PAM_IDLE or PAM_RUNNING.
+ *
* @return Pamguard status
*/
public int getPamStatus() {
@@ -2071,10 +2128,10 @@ public class PamController implements PamControllerInterface, PamSettings {
public void setPamStatus(int pamStatus) {
this.pamStatus = pamStatus;
/*
- * This only get's called once when set idle at viewer mode startup.
+ * This only get's called once when set idle at viewer mode startup.
*/
if (debugDumpBufferAtRestart) {
- System.out.printf("******* PamController.setPamStatus to %d, real status is %d set in thread %s\n",
+ System.out.printf("******* PamController.setPamStatus to %d, real status is %d set in thread %s\n",
pamStatus, getRealStatus(), Thread.currentThread().toString());
}
if (getRunMode() != RUN_PAMVIEW) {
@@ -2085,11 +2142,12 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * This was within the StatusCommand class, but useful to have it here since it's needed
- * in more than one place. In viewer mode at startup there are a number of things going on
- * in different threads, such as the creation of datamaps, and this can (hopefully) handle those bespoke
- * goings on.
- * @return program status for multithreaded statup tasks.
+ * This was within the StatusCommand class, but useful to have it here since
+ * it's needed in more than one place. In viewer mode at startup there are a
+ * number of things going on in different threads, such as the creation of
+ * datamaps, and this can (hopefully) handle those bespoke goings on.
+ *
+ * @return program status for multithreaded statup tasks.
*/
public int getRealStatus() {
PamController pamController = PamController.getInstance();
@@ -2103,28 +2161,29 @@ public class PamController implements PamControllerInterface, PamSettings {
int status = pamController.getPamStatus();
if (status == PamController.PAM_IDLE) {
status = PamController.PAM_IDLE;
- }
- else {
- ArrayList daqs = PamController.getInstance().findControlledUnits(AcquisitionControl.unitType);
- if (daqs != null) for (int i = 0; i < daqs.size(); i++) {
- try {
- AcquisitionControl daq = (AcquisitionControl) daqs.get(i);
- if (daq.isStalled()) {
- status = PamController.PAM_STALLED;
+ } else {
+ ArrayList daqs = PamController.getInstance()
+ .findControlledUnits(AcquisitionControl.unitType);
+ if (daqs != null)
+ for (int i = 0; i < daqs.size(); i++) {
+ try {
+ AcquisitionControl daq = (AcquisitionControl) daqs.get(i);
+ if (daq.isStalled()) {
+ status = PamController.PAM_STALLED;
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
}
}
- catch (Exception e) {
- e.printStackTrace();
- }
- }
}
WatchdogComms watchdogComms = PamController.getInstance().getWatchdogComms();
status = watchdogComms.getModifiedWatchdogState(status);
/*
- * This function is now being used in batch processing of offline data, where it may be necessary
- * to get status information from many different modules, for example when executing offline tasks
- * or just at startup while generating datamaps and datagrams.
- * So go through all modules and get the highest state of any of them.
+ * This function is now being used in batch processing of offline data, where it
+ * may be necessary to get status information from many different modules, for
+ * example when executing offline tasks or just at startup while generating
+ * datamaps and datagrams. So go through all modules and get the highest state
+ * of any of them.
*/
if (getRunMode() == RUN_PAMVIEW) {
if (firstDataLoadComplete == false) {
@@ -2134,17 +2193,17 @@ public class PamController implements PamControllerInterface, PamSettings {
for (PamControlledUnit aUnit : pamConfiguration.getPamControlledUnits()) {
status = Math.max(status, aUnit.getOfflineState());
}
- }
- catch (Exception e) {
- //just incase there is a concurrent modification at startup.
+ } catch (Exception e) {
+ // just incase there is a concurrent modification at startup.
}
}
-
+
return status;
}
-
+
/**
* show a warning when we're waiting for detectors to stop
+ *
* @param pamStatus
*/
private void showStatusWarning(int pamStatus) {
@@ -2156,17 +2215,17 @@ public class PamController implements PamControllerInterface, PamSettings {
sayStatusWarning(null);
}
}
-
+
/**
- * Show a singleton status warning message.
- * @param warningMessage Message - removes warning if set null.
+ * Show a singleton status warning message.
+ *
+ * @param warningMessage Message - removes warning if set null.
*/
private synchronized void sayStatusWarning(String warningMessage) {
WarningSystem warningSystem = WarningSystem.getWarningSystem();
if (warningMessage == null) {
warningSystem.removeWarning(statusWarning);
- }
- else {
+ } else {
statusWarning.setWarningMessage(warningMessage);
statusWarning.setWarnignLevel(1);
warningSystem.addWarning(statusWarning);
@@ -2175,12 +2234,10 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * Gets the Pamguard running mode. This is set at startup (generally
- * through slightly different versions of the main class). It will be
- * one of
- * RUN_NORMAL
- * RUN_PAMVIEW
- * RUN_MIXEDMODE
+ * Gets the Pamguard running mode. This is set at startup (generally through
+ * slightly different versions of the main class). It will be one of RUN_NORMAL
+ * RUN_PAMVIEW RUN_MIXEDMODE
+ *
* @return Pamguards run mode
*/
public int getRunMode() {
@@ -2200,17 +2257,19 @@ public class PamController implements PamControllerInterface, PamSettings {
}
}
- // public void getNewViewTimes(Frame frame) {
+ // public void getNewViewTimes(Frame frame) {
//
- // PamViewParameters newParams = ViewTimesDialog.showDialog(null, pamViewParameters);
- // if (newParams != null) {
- // pamViewParameters = newParams.clone();
- // useNewViewTimes();
- // }
- // }
+ // PamViewParameters newParams = ViewTimesDialog.showDialog(null,
+ // pamViewParameters);
+ // if (newParams != null) {
+ // pamViewParameters = newParams.clone();
+ // useNewViewTimes();
+ // }
+ // }
/**
- * Class to do some extra saving of view times.
+ * Class to do some extra saving of view times.
+ *
* @author Douglas Gillespie
*
*/
@@ -2239,141 +2298,139 @@ public class PamController implements PamControllerInterface, PamSettings {
@Override
public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings) {
pamViewParameters = ((PamViewParameters) pamControlledUnitSettings.getSettings()).clone();
- // useNewViewTimes();
+ // useNewViewTimes();
return true;
}
}
+ // private long trueStart;
+ // private long trueEnd;
+ //
+ // public void useNewViewTimes() {
+ // AWTScheduler.getInstance().scheduleTask(new LoadViewerData());
+ // }
+ // public class LoadViewerData extends SwingWorker
+ // {
+ //
+ // /* (non-Javadoc)
+ // * @see javax.swing.SwingWorker#doInBackground()
+ // */
+ // @Override
+ // protected Integer doInBackground() throws Exception {
+ // loadViewData();
+ //
+ // return null;
+ // }
+ //
+ // private void loadViewData() {
+ // setPamStatus(PAM_LOADINGDATA);
+ // PamCalendar.setViewTimes(pamViewParameters.viewStartTime,
+ // pamViewParameters.viewEndTime);
+ // // need to tell all datablocks to dump existing data and read in new.
+ // ArrayList pamDataBlocks = getDataBlocks();
+ // PamDataBlock pamDataBlock;
+ // /*
+ // * also need to get the true max and min load times of the data
+ // *
+ // */
+ // PamDataUnit pdu;
+ // trueStart = Long.MAX_VALUE;
+ // trueEnd = Long.MIN_VALUE;
+ // for (int i = 0; i < pamDataBlocks.size(); i++){
+ // pamDataBlock = pamDataBlocks.get(i);
+ // pamDataBlock.clearAll();
+ // pamDataBlock.loadViewData(this, pamViewParameters);
+ // pdu = pamDataBlock.getFirstUnit();
+ // if (pdu != null) {
+ // trueStart = Math.min(trueStart, pdu.getTimeMilliseconds());
+ // }
+ // pdu = pamDataBlock.getLastUnit();
+ // if (pdu != null) {
+ // trueEnd = Math.max(trueEnd, pdu.getTimeMilliseconds());
+ // }
+ // }
+ // }
+ //
+ // /* (non-Javadoc)
+ // * @see javax.swing.SwingWorker#done()
+ // */
+ // @Override
+ // protected void done() {
+ // if (trueStart != Long.MAX_VALUE) {
+ // pamViewParameters.viewStartTime = trueStart;
+ // pamViewParameters.viewEndTime = trueEnd;
+ // PamCalendar.setViewTimes(trueStart, trueEnd);
+ //// viewerStatusBar.newShowTimes();
+ // }
+ // newViewTime();
+ // setPamStatus(PAM_IDLE);
+ // }
+ //
+ // /* (non-Javadoc)
+ // * @see javax.swing.SwingWorker#process(java.util.List)
+ // */
+ // @Override
+ // protected void process(List vlp) {
+ // // TODO Auto-generated method stub
+ // for (int i = 0; i < vlp.size(); i++) {
+ //// displayProgress(vlp.get(i));
+ // }
+ // }
+ //
+ // /**
+ // * Callback from SQLLogging in worker thread.
+ // * @param viewerLoadProgress
+ // */
+ // public void sayProgress(ViewerLoadProgress viewerLoadProgress) {
+ // this.publish(viewerLoadProgress);
+ // }
+ //
+ // }
- // private long trueStart;
- // private long trueEnd;
+ // public void tellTrueLoadTime(long loadTime) {
+ // trueStart = Math.min(trueStart, loadTime);
+ // trueEnd = Math.max(trueEnd, loadTime);
+ // }
//
- // public void useNewViewTimes() {
- // AWTScheduler.getInstance().scheduleTask(new LoadViewerData());
- // }
+ // public void newViewTime() {
+ // // view time has changed (probably from the slider)
+ // notifyModelChanged(PamControllerInterface.NEW_VIEW_TIME);
+ // }
- // public class LoadViewerData extends SwingWorker {
+ // public void displayProgress(ViewerLoadProgress viewerLoadProgress) {
+ // if (viewerStatusBar == null) {
+ // return;
+ // }
+ //// if (viewerLoadProgress.getTableName() != null) {
+ // viewerStatusBar.setupLoadProgress(viewerLoadProgress.getTableName());
+ //// }
//
- // /* (non-Javadoc)
- // * @see javax.swing.SwingWorker#doInBackground()
- // */
- // @Override
- // protected Integer doInBackground() throws Exception {
- // loadViewData();
- //
- // return null;
- // }
- //
- // private void loadViewData() {
- // setPamStatus(PAM_LOADINGDATA);
- // PamCalendar.setViewTimes(pamViewParameters.viewStartTime, pamViewParameters.viewEndTime);
- // // need to tell all datablocks to dump existing data and read in new.
- // ArrayList pamDataBlocks = getDataBlocks();
- // PamDataBlock pamDataBlock;
- // /*
- // * also need to get the true max and min load times of the data
- // *
- // */
- // PamDataUnit pdu;
- // trueStart = Long.MAX_VALUE;
- // trueEnd = Long.MIN_VALUE;
- // for (int i = 0; i < pamDataBlocks.size(); i++){
- // pamDataBlock = pamDataBlocks.get(i);
- // pamDataBlock.clearAll();
- // pamDataBlock.loadViewData(this, pamViewParameters);
- // pdu = pamDataBlock.getFirstUnit();
- // if (pdu != null) {
- // trueStart = Math.min(trueStart, pdu.getTimeMilliseconds());
- // }
- // pdu = pamDataBlock.getLastUnit();
- // if (pdu != null) {
- // trueEnd = Math.max(trueEnd, pdu.getTimeMilliseconds());
- // }
- // }
- // }
- //
- // /* (non-Javadoc)
- // * @see javax.swing.SwingWorker#done()
- // */
- // @Override
- // protected void done() {
- // if (trueStart != Long.MAX_VALUE) {
- // pamViewParameters.viewStartTime = trueStart;
- // pamViewParameters.viewEndTime = trueEnd;
- // PamCalendar.setViewTimes(trueStart, trueEnd);
- //// viewerStatusBar.newShowTimes();
- // }
- // newViewTime();
- // setPamStatus(PAM_IDLE);
- // }
- //
- // /* (non-Javadoc)
- // * @see javax.swing.SwingWorker#process(java.util.List)
- // */
- // @Override
- // protected void process(List vlp) {
- // // TODO Auto-generated method stub
- // for (int i = 0; i < vlp.size(); i++) {
- //// displayProgress(vlp.get(i));
- // }
- // }
- //
- // /**
- // * Callback from SQLLogging in worker thread.
- // * @param viewerLoadProgress
- // */
- // public void sayProgress(ViewerLoadProgress viewerLoadProgress) {
- // this.publish(viewerLoadProgress);
- // }
- //
- // }
+ // }
- // public void tellTrueLoadTime(long loadTime) {
- // trueStart = Math.min(trueStart, loadTime);
- // trueEnd = Math.max(trueEnd, loadTime);
- // }
- //
- // public void newViewTime() {
- // // view time has changed (probably from the slider)
- // notifyModelChanged(PamControllerInterface.NEW_VIEW_TIME);
- // }
-
- //public void displayProgress(ViewerLoadProgress viewerLoadProgress) {
- // if (viewerStatusBar == null) {
- // return;
- // }
- //// if (viewerLoadProgress.getTableName() != null) {
- // viewerStatusBar.setupLoadProgress(viewerLoadProgress.getTableName());
- //// }
- //
- //}
-
- // public void setupDBLoadProgress(String name) {
+ // public void setupDBLoadProgress(String name) {
//
- // if (viewerStatusBar != null) {
- // viewerStatusBar.setupLoadProgress(name);
- // }
- // }
- // public void setDBLoadProgress(long t) {
+ // if (viewerStatusBar != null) {
+ // viewerStatusBar.setupLoadProgress(name);
+ // }
+ // }
+ // public void setDBLoadProgress(long t) {
//
- // if (viewerStatusBar != null) {
- // viewerStatusBar.setLoadProgress(t);
- // }
- // }
+ // if (viewerStatusBar != null) {
+ // viewerStatusBar.setLoadProgress(t);
+ // }
+ // }
public boolean isInitializationComplete() {
return initializationComplete;
}
-
/**
- * Called from PamDialog whenever the OK button is pressed.
- * Don't do anything immediately to give the module that opened
- * the dialog time to respond to it's closing (e.g. make the new
- * settings from the dialog it's default).
- * Use invokeLater to send out a message as soon as the awt que is clear.
+ * Called from PamDialog whenever the OK button is pressed. Don't do anything
+ * immediately to give the module that opened the dialog time to respond to it's
+ * closing (e.g. make the new settings from the dialog it's default). Use
+ * invokeLater to send out a message as soon as the awt que is clear.
*/
public void dialogOKButtonPressed() {
@@ -2382,61 +2439,66 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * Invoked later every time a dialog OK button is pressed. Sends
- * out a message to all modules to say settings have changed.
+ * Invoked later every time a dialog OK button is pressed. Sends out a message
+ * to all modules to say settings have changed.
+ *
* @author Doug
*
*/
class DialogOKButtonPressed implements Runnable {
@Override
public void run() {
- notifyModelChanged(PamControllerInterface.CHANGED_PROCESS_SETTINGS);
+ notifyModelChanged(PamControllerInterface.CHANGED_PROCESS_SETTINGS);
}
}
/**
- * Enables / Disables GUI for input. This is used when data are being loaded
- * in viewer mode to prevetn impatient users from clicking on extra things while
- * long background processes take place.
+ * Enables / Disables GUI for input. This is used when data are being loaded in
+ * viewer mode to prevetn impatient users from clicking on extra things while
+ * long background processes take place.
*
- * Many of the processes loading data are run in the background in SwingWorker threads
- * scheduled with the AWTScheduler so that they are able to update progress on teh screen
- * @param enable enable or disable the GUI.
+ * Many of the processes loading data are run in the background in SwingWorker
+ * threads scheduled with the AWTScheduler so that they are able to update
+ * progress on teh screen
+ *
+ * @param enable enable or disable the GUI.
*/
public void enableGUIControl(boolean enable) {
- // System.out.println("Enable GUI Control = " + enable);
+ // System.out.println("Enable GUI Control = " + enable);
guiFrameManager.enableGUIControl(enable);
}
- // /**
- // * Load viewer data into all the scrollers.
- // */
- // public void loadViewerData() {
- // // TODO Auto-generated method stub
- // AbstractScrollManager scrollManager = AbstractScrollManager.getScrollManager();
- // scrollManager.reLoad();
- //
- // }
+ // /**
+ // * Load viewer data into all the scrollers.
+ // */
+ // public void loadViewerData() {
+ // // TODO Auto-generated method stub
+ // AbstractScrollManager scrollManager =
+ // AbstractScrollManager.getScrollManager();
+ // scrollManager.reLoad();
+ //
+ // }
boolean loadingOldSettings = false;
/**
- * Flagged true if the manual stop button has been pressed.
- * Used to override the watchdog status.
+ * Flagged true if the manual stop button has been pressed. Used to override the
+ * watchdog status.
*/
private boolean manualStop;
-
/**
* Used when in viewer mode and planning batch processing with a modified
* configuration, i.e. the command line has been supplied a normal viewer mode
- * database and also a psfx file. The settings from the database will already have
- * been loaded, this will load any modules that weren't there and will override all the
- * settings in other modules with these ones (except some specials such as data storage locations)
- * @param psfxFile Name of additional psfx file.
+ * database and also a psfx file. The settings from the database will already
+ * have been loaded, this will load any modules that weren't there and will
+ * override all the settings in other modules with these ones (except some
+ * specials such as data storage locations)
+ *
+ * @param psfxFile Name of additional psfx file.
*/
private boolean loadOtherSettings(String psfxName) {
-
+
File psfxFile = new File(psfxName);
if (psfxFile.exists() == false) {
return false;
@@ -2446,43 +2508,43 @@ public class PamController implements PamControllerInterface, PamSettings {
if (settingsGroup == null) {
return false;
}
-
+
BatchViewSettingsImport importer = new BatchViewSettingsImport(this, settingsGroup);
importer.importSettings();
return true;
}
-
+
/**
- * Called to load a specific set of PAMGUARD settings in
- * viewer mode, which were previously loaded in from a
- * database or binary store.
+ * Called to load a specific set of PAMGUARD settings in viewer mode, which were
+ * previously loaded in from a database or binary store.
+ *
* @param settingsGroup settings information
- * @param initialiseNow Immediately data are loaded, initialise which will load data from storages.
+ * @param initialiseNow Immediately data are loaded, initialise which will load
+ * data from storages.
*/
public void loadOldSettings(PamSettingsGroup settingsGroup) {
loadOldSettings(settingsGroup, true);
}
-
+
/**
- * Called to load a specific set of PAMGUARD settings in
- * viewer mode, which were previously loaded in from a
- * database or binary store.
+ * Called to load a specific set of PAMGUARD settings in viewer mode, which were
+ * previously loaded in from a database or binary store.
+ *
* @param settingsGroup settings information
- * @param initialiseNow Immediately data are loaded, initialise which will load data from storages.
+ * @param initialiseNow Immediately data are loaded, initialise which will load
+ * data from storages.
*/
public void loadOldSettings(PamSettingsGroup settingsGroup, boolean initialiseNow) {
/**
- * Three things to do:
- * 1. consider removing modules which exist but are no longer needed
- * 2. Add modules which aren't present but are needed
- * 3. re-order modules
- * 4. Load settings into modules
- * 5. Ping round an initialisation complete message.
+ * Three things to do: 1. consider removing modules which exist but are no
+ * longer needed 2. Add modules which aren't present but are needed 3. re-order
+ * modules 4. Load settings into modules 5. Ping round an initialisation
+ * complete message.
*/
- // 1. get a list of current modules no longer needed.
+ // 1. get a list of current modules no longer needed.
PamControlledUnit pcu;
ArrayList toRemove = new ArrayList();
- for (int i = 0 ; i < getNumControlledUnits(); i++) {
+ for (int i = 0; i < getNumControlledUnits(); i++) {
pcu = getControlledUnit(i);
if (settingsGroup.findUnitSettings(pcu.getUnitType(), pcu.getUnitName()) == null) {
toRemove.add(pcu);
@@ -2501,8 +2563,7 @@ public class PamController implements PamControllerInterface, PamSettings {
try {
moduleClass = Class.forName(aModuleInfo.className);
} catch (ClassNotFoundException e) {
- System.out.println(String.format("The module with class %s is not available",
- aModuleInfo.className));
+ System.out.println(String.format("The module with class %s is not available", aModuleInfo.className));
continue;
}
if (findControlledUnit(moduleClass, aModuleInfo.unitName) == null) {
@@ -2542,11 +2603,9 @@ public class PamController implements PamControllerInterface, PamSettings {
}
}
/*
- * try to get everything in the right order
- * Needs a LUT which converts the current order
- * into the required order, i.e. the first element
- * of the LUT will be the current position of the
- * unit we want to come first.
+ * try to get everything in the right order Needs a LUT which converts the
+ * current order into the required order, i.e. the first element of the LUT will
+ * be the current position of the unit we want to come first.
*/
int[] orderLUT = new int[getNumControlledUnits()];
PamControlledUnit aUnit;
@@ -2562,8 +2621,7 @@ public class PamController implements PamControllerInterface, PamSettings {
try {
moduleClass = Class.forName(aModuleInfo.className);
} catch (ClassNotFoundException e) {
- System.out.println(String.format("The module with class %s is not available",
- aModuleInfo.className));
+ System.out.println(String.format("The module with class %s is not available", aModuleInfo.className));
continue;
}
aUnit = findControlledUnit(moduleClass, aModuleInfo.unitName);
@@ -2575,10 +2633,10 @@ public class PamController implements PamControllerInterface, PamSettings {
nFound++;
}
}
- // reOrderModules(orderLUT);
+ // reOrderModules(orderLUT);
/*
- * Now try to give each module it's settings.
+ * Now try to give each module it's settings.
*/
initializationComplete = true;
@@ -2590,38 +2648,40 @@ public class PamController implements PamControllerInterface, PamSettings {
PamSettingManager.getInstance().loadSettingsGroup(settingsGroup, true);
loadingOldSettings = false;
-
}
/**
- * Load settings for all modules in this group, then
- * export as XML.
+ * Load settings for all modules in this group, then export as XML.
+ *
* @param settingsGroup
*/
public void exportSettingsAsXML(PamSettingsGroup settingsGroup) {
loadOldSettings(settingsGroup, false);
this.exportGeneralXMLSettings((JFrame) getMainFrame(), settingsGroup.getSettingsTime());
- // exportDecimusXMLSettings(settingsGroup.getSettingsTime());
- //now do it with XML encoder to see what it's like ...
- // String fName = String.format("XMLEncoded_%s.xml", PamCalendar.formatFileDateTime(settingsGroup.getSettingsTime()));
- // File f = new File(fName);
- // XMLEncoder encoder=null;
- // try{
- // encoder=new XMLEncoder(new BufferedOutputStream(new FileOutputStream(fName)));
- // }catch(FileNotFoundException fileNotFound){
- // System.out.println("ERROR: While Creating or Opening the File dvd.xml");
- // }
- // Iterator it = settingsGroup.getUnitSettings().iterator();
- // while(it.hasNext()) {
- // PamControlledUnitSettings set = it.next();
- // encoder.writeObject(set);
- // }
- // encoder.close();
+ // exportDecimusXMLSettings(settingsGroup.getSettingsTime());
+ // now do it with XML encoder to see what it's like ...
+ // String fName = String.format("XMLEncoded_%s.xml",
+ // PamCalendar.formatFileDateTime(settingsGroup.getSettingsTime()));
+ // File f = new File(fName);
+ // XMLEncoder encoder=null;
+ // try{
+ // encoder=new XMLEncoder(new BufferedOutputStream(new
+ // FileOutputStream(fName)));
+ // }catch(FileNotFoundException fileNotFound){
+ // System.out.println("ERROR: While Creating or Opening the File dvd.xml");
+ // }
+ // Iterator it =
+ // settingsGroup.getUnitSettings().iterator();
+ // while(it.hasNext()) {
+ // PamControlledUnitSettings set = it.next();
+ // encoder.writeObject(set);
+ // }
+ // encoder.close();
}
/**
- * Get the name of the psf or database used to contain settings
- * for this run.
+ * Get the name of the psf or database used to contain settings for this run.
+ *
* @return name of psf or database
*/
public String getPSFName() {
@@ -2644,11 +2704,11 @@ public class PamController implements PamControllerInterface, PamSettings {
return dbc.getDatabaseName();
}
return null;
- }
+ }
/**
- * Get the name of the psf or database used to contain settings
- * for this run.
+ * Get the name of the psf or database used to contain settings for this run.
+ *
* @return name of psf or database
*/
public String getPSFNameWithPath() {
@@ -2675,8 +2735,7 @@ public class PamController implements PamControllerInterface, PamSettings {
public void toolBarStartButton(PamControlledUnit currentControlledUnit) {
if (getRunMode() == RUN_PAMVIEW) {
- }
- else {
+ } else {
pamStart();
}
}
@@ -2684,17 +2743,23 @@ public class PamController implements PamControllerInterface, PamSettings {
public void toolBarStopButton(PamControlledUnit currentControlledUnit) {
if (getRunMode() == RUN_PAMVIEW) {
PlaybackControl.getViewerPlayback().stopViewerPlayback();
- }
- else {
+ } else {
pamStop();
manualStop = true;
}
}
/**
+<<<<<<< Updated upstream
* Respond to storage options dialog. Selects whether data
* are stored in binary, database or both
* @param parentFrame
+=======
+ * Respond to storage options dialog. Selects whethere data are stored in
+ * binary, database or both
+ *
+ * @param parentFrame
+>>>>>>> Stashed changes
*/
public void storageOptions(JFrame parentFrame) {
StorageOptions.getInstance().showDialog(parentFrame);
@@ -2712,7 +2777,8 @@ public class PamController implements PamControllerInterface, PamSettings {
/**
* Return a verbose level for debug output
- * @return a verbose level for debug output.
+ *
+ * @return a verbose level for debug output.
*/
public int getVerboseLevel() {
return 10;
@@ -2721,7 +2787,7 @@ public class PamController implements PamControllerInterface, PamSettings {
/**
* Create a watchdog which will run independently and keep this thing going !
*/
- public void createWatchDog() {
+ public void createWatchDog() {
String runnableJar = null;
try {
runnableJar = Pamguard.class.getProtectionDomain().getCodeSource().getLocation().toString();
@@ -2739,8 +2805,8 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * Returns the module that is currently being loaded. If null, it means we aren't
- * loading anything right now
+ * Returns the module that is currently being loaded. If null, it means we
+ * aren't loading anything right now
*
* @return
*/
@@ -2752,11 +2818,12 @@ public class PamController implements PamControllerInterface, PamSettings {
* Clears the variable holding info about the unit currently being loaded
*/
public void clearLoadedUnit() {
- unitBeingLoaded=null;
+ unitBeingLoaded = null;
}
/**
- * Get the Java compliance, i.e. what Java version is running.
+ * Get the Java compliance, i.e. what Java version is running.
+ *
* @return integer value of java version e.g. Java 8 is return 1.8
*/
public double getJCompliance() {
@@ -2764,16 +2831,17 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * Get the Java version. Only show the first decimal place (e.g. 12.0, not 12.0.1). If
- * there is no decimal place (e.g. 13) then just show that.
+ * Get the Java version. Only show the first decimal place (e.g. 12.0, not
+ * 12.0.1). If there is no decimal place (e.g. 13) then just show that.
*
- * @return the Java version.
+ * @return the Java version.
*/
- static double getVersion () {
+ static double getVersion() {
String version = System.getProperty("java.version");
/*
- * strip down to the first non numeric character. and allow 0 or 1 decimal points.
- * This should pull out any valid decimal number from the front of the string.
+ * strip down to the first non numeric character. and allow 0 or 1 decimal
+ * points. This should pull out any valid decimal number from the front of the
+ * string.
*/
int iLen = 0;
int nDot = 0;
@@ -2784,12 +2852,12 @@ public class PamController implements PamControllerInterface, PamSettings {
if (ch == '.') {
nDot++;
}
- }
- else {
+ } else {
break;
- };
+ }
+ ;
}
-
+
// int pos = version.indexOf('.'); // get the index of the first decimal
// if (pos==-1) { // if there is no decimal place (e.g. Java 13) then just use the full string
// pos=version.length();
@@ -2802,21 +2870,21 @@ public class PamController implements PamControllerInterface, PamSettings {
// }
double mainVersion = 0;
try {
- mainVersion = Double.parseDouble (version.substring (0, iLen));
+ mainVersion = Double.parseDouble(version.substring(0, iLen));
+ } catch (NumberFormatException e) {
+
}
- catch (NumberFormatException e) {
-
- }
-
+
return mainVersion;
}
/**
* Notify the PamController that progress has been made in loading something.
- * @param progress - holds progress info.
+ *
+ * @param progress - holds progress info.
*/
public void notifyTaskProgress(PamTaskUpdate progress) {
- if (this.guiFrameManager!=null) {
+ if (this.guiFrameManager != null) {
this.guiFrameManager.notifyLoadProgress(progress);
}
}
@@ -2835,26 +2903,25 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * Returns the current installation folder, or null if there was a problem determining
- * the folder location. Note that the default file separator is included at the end
- * of the string.
+ * Returns the current installation folder, or null if there was a problem
+ * determining the folder location. Note that the default file separator is
+ * included at the end of the string.
+ *
* @return
*/
public String getInstallFolder() {
return installFolder;
}
+ /***** Convenience Functions *******/
- /*****Convenience Functions*******/
-
-
- /****Swing GUI*****/
+ /**** Swing GUI *****/
/**
- * Get the main frame if there is one.
- * Can be used by dialogs when no one else has
- * sorted out a frame reference to pass to them.
- * @return reference to main GUI frame.
+ * Get the main frame if there is one. Can be used by dialogs when no one else
+ * has sorted out a frame reference to pass to them.
+ *
+ * @return reference to main GUI frame.
*/
public static Frame getMainFrame() {
PamController c = getInstance();
@@ -2862,31 +2929,29 @@ public class PamController implements PamControllerInterface, PamSettings {
return null;
}
if (c.guiFrameManager instanceof GuiFrameManager) {
- GuiFrameManager guiFrameManager = (GuiFrameManager) c.guiFrameManager;
+ GuiFrameManager guiFrameManager = (GuiFrameManager) c.guiFrameManager;
if (guiFrameManager.getNumFrames() <= 0) {
return null;
}
return guiFrameManager.getFrame(0);
}
- return null;
+ return null;
}
@Override
public GuiFrameManager getGuiFrameManager() {
if (guiFrameManager instanceof GuiFrameManager) {
- return (GuiFrameManager) guiFrameManager;
- }
- else {
+ return (GuiFrameManager) guiFrameManager;
+ } else {
return null;
}
}
- public void sortFrameTitles(){
+ public void sortFrameTitles() {
getGuiFrameManager().sortFrameTitles();
}
-
- /****FX Gui*****/
+ /**** FX Gui *****/
@Deprecated
public PamGuiManagerFX getGuiManagerFX() {
return (PamGuiManagerFX) this.guiFrameManager;
@@ -2897,11 +2962,12 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * Set the install folder.
+ * Set the install folder.
+ *
* @param installFolder
*/
public void setInstallFolder(String installFolder) {
- this.installFolder=installFolder;
+ this.installFolder = installFolder;
}
@@ -2944,7 +3010,8 @@ public class PamController implements PamControllerInterface, PamSettings {
}
/**
- * Gt the main PAMGuard configuration (list of connected modules).
+ * Gt the main PAMGuard configuration (list of connected modules).
+ *
* @return the pamConfiguration
*/
public PamConfiguration getPamConfiguration() {
diff --git a/src/PamController/PamguardVersionInfo.java b/src/PamController/PamguardVersionInfo.java
index d1cee5f8..b989d008 100644
--- a/src/PamController/PamguardVersionInfo.java
+++ b/src/PamController/PamguardVersionInfo.java
@@ -31,12 +31,12 @@ public class PamguardVersionInfo {
* Version number, major version.minorversion.sub-release.
* Note: can't go higher than sub-release 'f'
*/
- static public final String version = "2.02.11e";
+ static public final String version = "2.02.11f";
/**
* Release date
*/
- static public final String date = "19 June 2024";
+ static public final String date = "24 June 2024";
// /**
// * Release type - Beta or Core
diff --git a/src/PamModel/PamModel.java b/src/PamModel/PamModel.java
index b0776c48..e97b315e 100644
--- a/src/PamModel/PamModel.java
+++ b/src/PamModel/PamModel.java
@@ -472,7 +472,7 @@ final public class PamModel implements PamSettings {
mi.setModulesMenuGroup(utilitiesGroup);
mi.setMaxNumber(1);
//mi.addGUICompatabilityFlag(PamGUIManager.FX); //has FX enabled GUI.
-// mi.setHidden(SMRUEnable.isEnable() == false);
+ mi.setHidden(SMRUEnable.isEnable() == false);
}
/*
diff --git a/src/dataPlotsFX/rawDataPlotFX/RawSoundPlotDataFX.java b/src/dataPlotsFX/rawDataPlotFX/RawSoundPlotDataFX.java
index 04260b9b..e20acecf 100644
--- a/src/dataPlotsFX/rawDataPlotFX/RawSoundPlotDataFX.java
+++ b/src/dataPlotsFX/rawDataPlotFX/RawSoundPlotDataFX.java
@@ -382,7 +382,7 @@ public class RawSoundPlotDataFX {
if (soundStore.currentRawDataMillis==0){
if (++timeErrors < 10) {
- System.err.println("RawSoundPlotData: Raw sound data has no associated millisecond time: "+ soundStore.currentRawDataMillis);
+// System.err.println("RawSoundPlotData: Raw sound data has no associated millisecond time: "+ soundStore.currentRawDataMillis);
}
return;
}
diff --git a/src/help/classifiers/rawDeepLearningHelp/docs/images/advanced_settings_animalspot_1.png b/src/help/classifiers/rawDeepLearningHelp/docs/images/advanced_settings_animalspot_1.png
index 8aa822e326dbb5627a46961f8f2e9b76445b894e..a406874cefe851213e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