Multiple fixes in control
This commit is contained in:
parent
5a0f9b2150
commit
598c3f0a75
@ -36,7 +36,6 @@ import hep.dataforge.tables.MapPoint;
|
|||||||
import hep.dataforge.tables.TableFormat;
|
import hep.dataforge.tables.TableFormat;
|
||||||
import hep.dataforge.tables.TableFormatBuilder;
|
import hep.dataforge.tables.TableFormatBuilder;
|
||||||
import hep.dataforge.utils.DateTimeUtils;
|
import hep.dataforge.utils.DateTimeUtils;
|
||||||
import hep.dataforge.values.Value;
|
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -123,17 +122,17 @@ public class MspDevice extends SingleMeasurementDevice implements PortHandler.Po
|
|||||||
return "MKS E-Vision";
|
return "MKS E-Vision";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
// @Override
|
||||||
public void command(String commandName, Value argument) throws ControlException {
|
// public void command(String commandName, Value argument) throws ControlException {
|
||||||
switch (commandName) {
|
// switch (commandName) {
|
||||||
case "connect":
|
// case "connect":
|
||||||
setConnected(argument.booleanValue());
|
// setConnected(argument.booleanValue());
|
||||||
case "setFilamentOn":
|
// case "setFilamentOn":
|
||||||
setFileamentOn(argument.booleanValue());
|
// setFileamentOn(argument.booleanValue());
|
||||||
default:
|
// default:
|
||||||
super.command(commandName, argument);
|
// super.command(commandName, argument);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Startup MSP: get available sensors, select sensor and control.
|
* Startup MSP: get available sensors, select sensor and control.
|
||||||
|
@ -194,12 +194,11 @@ public class MspViewController implements Initializable, MspListener {
|
|||||||
this.device = new MspDevice();
|
this.device = new MspDevice();
|
||||||
device.setName(mspName);
|
device.setName(mspName);
|
||||||
device.setContext(context);
|
device.setContext(context);
|
||||||
device.setMeta(mspConfig);
|
device.configure(mspConfig);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
getDevice().setListener(this);
|
getDevice().setListener(this);
|
||||||
getDevice().init();
|
getDevice().init();
|
||||||
// getDevice().startMeasurement("peakJump");
|
|
||||||
} catch (ControlException ex) {
|
} catch (ControlException ex) {
|
||||||
showError(String.format("Can't connect to %s:%d. The port is either busy or not the MKS mass-spectrometer port",
|
showError(String.format("Can't connect to %s:%d. The port is either busy or not the MKS mass-spectrometer port",
|
||||||
device.meta().getString("connection.ip", "127.0.0.1"),
|
device.meta().getString("connection.ip", "127.0.0.1"),
|
||||||
|
@ -11,7 +11,6 @@ import hep.dataforge.control.measurements.SimpleMeasurement;
|
|||||||
import hep.dataforge.control.ports.PortHandler;
|
import hep.dataforge.control.ports.PortHandler;
|
||||||
import hep.dataforge.description.ValueDef;
|
import hep.dataforge.description.ValueDef;
|
||||||
import hep.dataforge.exceptions.ControlException;
|
import hep.dataforge.exceptions.ControlException;
|
||||||
import hep.dataforge.values.Value;
|
|
||||||
import javafx.beans.property.BooleanProperty;
|
import javafx.beans.property.BooleanProperty;
|
||||||
import javafx.beans.property.adapter.JavaBeanBooleanPropertyBuilder;
|
import javafx.beans.property.adapter.JavaBeanBooleanPropertyBuilder;
|
||||||
|
|
||||||
@ -77,15 +76,15 @@ public class MKSVacDevice extends PortSensor<Double> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
// @Override
|
||||||
public void command(String commandName, Value argument) throws ControlException {
|
// public void command(String commandName, Value argument) throws ControlException {
|
||||||
if (commandName.equals("setPower")) {
|
// if (commandName.equals("setPower")) {
|
||||||
boolean powerOn = argument.booleanValue();
|
// boolean powerOn = argument.booleanValue();
|
||||||
setPowerOn(powerOn);
|
// setPowerOn(powerOn);
|
||||||
} else {
|
// } else {
|
||||||
super.command(commandName, argument);
|
// super.command(commandName, argument);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void shutdown() throws ControlException {
|
public void shutdown() throws ControlException {
|
||||||
|
@ -9,8 +9,8 @@ import hep.dataforge.control.connections.DeviceViewController;
|
|||||||
import hep.dataforge.control.devices.Device;
|
import hep.dataforge.control.devices.Device;
|
||||||
import hep.dataforge.control.measurements.Measurement;
|
import hep.dataforge.control.measurements.Measurement;
|
||||||
import hep.dataforge.control.measurements.MeasurementListener;
|
import hep.dataforge.control.measurements.MeasurementListener;
|
||||||
import hep.dataforge.meta.Annotated;
|
|
||||||
import hep.dataforge.meta.Meta;
|
import hep.dataforge.meta.Meta;
|
||||||
|
import hep.dataforge.meta.Metoid;
|
||||||
import hep.dataforge.names.Named;
|
import hep.dataforge.names.Named;
|
||||||
import hep.dataforge.values.Value;
|
import hep.dataforge.values.Value;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
@ -35,7 +35,7 @@ import java.util.ResourceBundle;
|
|||||||
/**
|
/**
|
||||||
* @author <a href="mailto:altavir@gmail.com">Alexander Nozik</a>
|
* @author <a href="mailto:altavir@gmail.com">Alexander Nozik</a>
|
||||||
*/
|
*/
|
||||||
public class VacuumeterView extends DeviceViewController implements MeasurementListener<Double>, Initializable, Named, Annotated {
|
public class VacuumeterView extends DeviceViewController implements MeasurementListener<Double>, Initializable, Named, Metoid {
|
||||||
|
|
||||||
private static final DecimalFormat FORMAT = new DecimalFormat("0.###E0");
|
private static final DecimalFormat FORMAT = new DecimalFormat("0.###E0");
|
||||||
private static final DateTimeFormatter TIME_FORMAT = DateTimeFormatter.ISO_LOCAL_TIME;
|
private static final DateTimeFormatter TIME_FORMAT = DateTimeFormatter.ISO_LOCAL_TIME;
|
||||||
|
@ -31,8 +31,7 @@ import hep.dataforge.meta.Meta;
|
|||||||
public class Numass {
|
public class Numass {
|
||||||
|
|
||||||
public static Context buildContext(Context parent, Meta meta) {
|
public static Context buildContext(Context parent, Meta meta) {
|
||||||
return Context.builder("NUMASS")
|
return Context.builder("NUMASS", parent)
|
||||||
.parent(parent)
|
|
||||||
.properties(meta)
|
.properties(meta)
|
||||||
.plugin(NumassPlugin.class)
|
.plugin(NumassPlugin.class)
|
||||||
.build();
|
.build();
|
||||||
|
@ -4,6 +4,7 @@ include ":numass-control"
|
|||||||
include ":numass-control:cryotemp"
|
include ":numass-control:cryotemp"
|
||||||
include ":numass-control:magnet"
|
include ":numass-control:magnet"
|
||||||
include ":numass-control:msp"
|
include ":numass-control:msp"
|
||||||
|
include ":numass-control:vac"
|
||||||
//
|
//
|
||||||
include ":numass-main"
|
include ":numass-main"
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user