Added mechanism to display help of additional (undeclared) options.

This commit is contained in:
2025-12-08 16:59:45 +01:00
parent d4af0e985e
commit 0056b0e113
8 changed files with 35 additions and 52 deletions

View File

@@ -2,7 +2,7 @@ description = 'athos-screens'
ext.mainClass = hasProperty('mainClass') ? mainClass : 'ch.psi.pshell.workbench.App'
ext.title = 'AthosScreens'
ext.desc = 'AthosScreens'
ext.ex_options = 'ch.psi.pshell.screenpanel.Options,ch.psi.athos.Options'
ext.ex_options = 'ch.psi.pshell.screenpanel.Options|ch.psi.athos.Options'
ext.deploy_type= 'jar'
dependencies {

View File

@@ -2,4 +2,4 @@ action.custom-1=rpm
action.custom-1.args=--configure-on-demand -w -x check -x test rpm
action.custom-2=publish
action.custom-2.args=--configure-on-demand -w -x check -x test publish
action.debug.args=debug --args="-b -d -l -k -g -q -statusbar -size=1000x700 -console_log=SEVERE -m ./src/main/pkg -laf=dark -pipeline_server localhost:8889 -camera_server localhost:8888 -epics_config ch.psi.jcae.ContextFactory.addressList=localhost:54321"
action.debug.args=debug --args="-b -d -l -k -g -q -statusbar -size=1000x700 -console_log=SEVERE -m ./src/main/pkg -laf=dark -pipeline_server localhost:8889 -camera_server localhost:8888 -epics_config ch.psi.jcae.ContextFactory.addressList=localhost:54321e"

View File

@@ -40,57 +40,57 @@ public class Correlation extends Panel {
public void onInitialize(int runCount) {
if (runCount==0){
super.onInitialize(runCount);
if (App.hasArgument("dx")) {
textDevX.setText(App.getArgumentValue("dx"));
if (App.hasAdditionalArgument("dx")) {
textDevX.setText(App.getAdditionalArgumentValue("dx"));
}
if (App.hasArgument("dy")) {
textDevY.setText(App.getArgumentValue("dy"));
if (App.hasAdditionalArgument("dy")) {
textDevY.setText(App.getAdditionalArgumentValue("dy"));
}
try{
if (App.hasArgument("dxtype")) {
comboTypeX.setSelectedIndex(Integer.valueOf(App.getArgumentValue("dxtype")));
if (App.hasAdditionalArgument("dxtype")) {
comboTypeX.setSelectedIndex(Integer.valueOf(App.getAdditionalArgumentValue("dxtype")));
}
} catch (Exception ex){
System.err.println(ex.getMessage());
}
try{
if (App.hasArgument("dytype")) {
comboTypeY.setSelectedIndex(Integer.valueOf(App.getArgumentValue("dytype")));
if (App.hasAdditionalArgument("dytype")) {
comboTypeY.setSelectedIndex(Integer.valueOf(App.getAdditionalArgumentValue("dytype")));
}
} catch (Exception ex){
System.err.println(ex.getMessage());
}
try{
if (App.hasArgument("interval")) {
spinnerInterval.setValue(Double.valueOf(App.getArgumentValue("interval")));
if (App.hasAdditionalArgument("interval")) {
spinnerInterval.setValue(Double.valueOf(App.getAdditionalArgumentValue("interval")));
}
} catch (Exception ex){
System.err.println(ex.getMessage());
}
try{
if (App.hasArgument("window")) {
spinnerWindow.setValue(Integer.valueOf(App.getArgumentValue("window")));
if (App.hasAdditionalArgument("window")) {
spinnerWindow.setValue(Integer.valueOf(App.getAdditionalArgumentValue("window")));
}
} catch (Exception ex){
System.err.println(ex.getMessage());
}
try{
if (App.hasArgument("align")) {
checkAlign.setSelected(App.getBoolArgumentValue("align"));
if (App.hasAdditionalArgument("align")) {
checkAlign.setSelected(App.getBoolAdditionalArgumentValue("align"));
}
} catch (Exception ex){
System.err.println(ex.getMessage());
}
try{
if (App.hasArgument("linear")) {
checkLinear.setSelected(App.getBoolArgumentValue("linear"));
if (App.hasAdditionalArgument("linear")) {
checkLinear.setSelected(App.getBoolAdditionalArgumentValue("linear"));
}
} catch (Exception ex){
System.err.println(ex.getMessage());
}
try{
if (App.hasArgument("quadratic")) {
checkQuadratic.setSelected(App.getBoolArgumentValue("quadratic"));
if (App.hasAdditionalArgument("quadratic")) {
checkQuadratic.setSelected(App.getBoolAdditionalArgumentValue("quadratic"));
}
} catch (Exception ex){
System.err.println(ex.getMessage());

View File

@@ -1 +1 @@
action.debug.args=debug --args="-b -d -l -k -n -q -console_log=SEVERE -p PersistencePlot -laf=dark -epics_config ch.psi.jcae.ContextFactory.addressList=localhost:54321"
action.debug.args=debug --args="-b -d -l -k -n -q -console_log=SEVERE -p PersistencePlot -laf=dark -epics_config ch.psi.jcae.ContextFactory.addressList=localhost:54321 -start true TESTIOC:TESTSINUS:SinCalc"

View File

@@ -41,8 +41,8 @@ public class PersistencePlot extends Panel{
@Override
public void onInitialize(int runCount) {
channelSelector.configure(ChannelSelector.Type.Epics, "http://epics-boot-info.psi.ch", "sls", 3000);
if (App.hasArgument("channel")){
channelSelector.setText(App.getArgumentValue("channel"));
if (App.hasAdditionalArgument()){
channelSelector.setText(App.getAdditionalArgument());
}
if (App.hasArgument("start")){
buttonStartActionPerformed(null);

View File

@@ -77,6 +77,7 @@ public class ScreenPanelSF extends Panel implements CamServerViewer.CamServerVie
SwingUtilities.invokeLater(()->{
try {
camServerViewer.initialize(App.getArgumentValue(Options.SP_MODE.getString(null)));
startTimer(1000);
} catch (Exception ex) {
Logger.getLogger(ScreenPanelSF.class.getName()).log(Level.SEVERE, null, ex);
}
@@ -85,11 +86,12 @@ public class ScreenPanelSF extends Panel implements CamServerViewer.CamServerVie
} catch (Exception ex) {
logger.log(Level.SEVERE, null, ex);
}
}
}
@Override
public void onStop() {
stopTimer();
super.onStop();
}
@@ -131,22 +133,13 @@ public class ScreenPanelSF extends Panel implements CamServerViewer.CamServerVie
@Override
protected void onTimer() {
for (Device dev : new Device[]{screen, filter}) {
if (dev != null) {
if ((dev != null) && (dev.getState().isNormal())) {
dev.request();
}
}
checkAppState();
if (App.hasArgument("s")) {
try {
((Source) getDevice("image")).initialize();
} catch (IOException ex) {
logger.log(Level.SEVERE, null, ex);
} catch (InterruptedException ex) {
logger.log(Level.SEVERE, null, ex);
}
}
try {
if (panelPulse.isVisible()){
CamServerViewer.Frame frame = camServerViewer.getCurrentFrame();

View File

@@ -4,7 +4,7 @@ ext.plugin = 'ScreenPanelSLS'
ext.mainClass = hasProperty('mainClass') ? mainClass : 'ch.psi.pshell.workbench.App'
ext.title = 'ScreenPanel'
ext.desc = 'ScreenPanel customization for SLS cameras'
ext.ex_options = 'ch.psi.pshell.screenpanel.Options'
ext.ex_options = 'ch.psi.pshell.screenpanel.Options|disable_detach (if true does not show debug option for pemanent pipelines)|edit_permanent (if true does not disable pemanent pipeline config options)'
ext.deploy_type= 'java'
dependencies {

View File

@@ -8,7 +8,6 @@ import ch.psi.pshell.epics.ChannelDouble;
import ch.psi.pshell.epics.Epics;
import ch.psi.pshell.imaging.Overlay;
import ch.psi.pshell.imaging.Overlays;
import ch.psi.pshell.imaging.Source;
import ch.psi.pshell.workbench.App;
import ch.psi.pshell.framework.Context;
import ch.psi.pshell.framework.Panel;
@@ -115,6 +114,7 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi
Logger.getLogger(ScreenPanelSLS.class.getName()).log(Level.SEVERE, null, ex);
}
}).start();
startTimer(2000);
} catch (Exception ex) {
Logger.getLogger(ScreenPanelSLS.class.getName()).log(Level.SEVERE, null, ex);
}
@@ -150,6 +150,7 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi
@Override
public void onStop() {
stopTimer();
super.onStop();
}
@@ -199,23 +200,12 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi
@Override
protected void onTimer() {
//for (Device dev : new Device[]{screen, exposure}) {
// if (dev != null) {
// dev.request();
// }
//}
checkAppState();
if (App.hasArgument("s")) {
try {
((Source) getDevice("image")).initialize();
} catch (IOException ex) {
logger.log(Level.SEVERE, null, ex);
} catch (InterruptedException ex) {
logger.log(Level.SEVERE, null, ex);
for (Device dev : new Device[]{screen, exposure, flStep, mirror, ledPower}) {
if ((dev != null) && (dev.getState().isNormal())) {
dev.request();
}
}
}
checkAppState();
}
@Override