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.TableFormatBuilder;
|
||||
import hep.dataforge.utils.DateTimeUtils;
|
||||
import hep.dataforge.values.Value;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.*;
|
||||
@ -123,17 +122,17 @@ public class MspDevice extends SingleMeasurementDevice implements PortHandler.Po
|
||||
return "MKS E-Vision";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void command(String commandName, Value argument) throws ControlException {
|
||||
switch (commandName) {
|
||||
case "connect":
|
||||
setConnected(argument.booleanValue());
|
||||
case "setFilamentOn":
|
||||
setFileamentOn(argument.booleanValue());
|
||||
default:
|
||||
super.command(commandName, argument);
|
||||
}
|
||||
}
|
||||
// @Override
|
||||
// public void command(String commandName, Value argument) throws ControlException {
|
||||
// switch (commandName) {
|
||||
// case "connect":
|
||||
// setConnected(argument.booleanValue());
|
||||
// case "setFilamentOn":
|
||||
// setFileamentOn(argument.booleanValue());
|
||||
// default:
|
||||
// super.command(commandName, argument);
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* Startup MSP: get available sensors, select sensor and control.
|
||||
|
@ -194,12 +194,11 @@ public class MspViewController implements Initializable, MspListener {
|
||||
this.device = new MspDevice();
|
||||
device.setName(mspName);
|
||||
device.setContext(context);
|
||||
device.setMeta(mspConfig);
|
||||
device.configure(mspConfig);
|
||||
|
||||
try {
|
||||
getDevice().setListener(this);
|
||||
getDevice().init();
|
||||
// getDevice().startMeasurement("peakJump");
|
||||
} catch (ControlException ex) {
|
||||
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"),
|
||||
|
@ -11,7 +11,6 @@ import hep.dataforge.control.measurements.SimpleMeasurement;
|
||||
import hep.dataforge.control.ports.PortHandler;
|
||||
import hep.dataforge.description.ValueDef;
|
||||
import hep.dataforge.exceptions.ControlException;
|
||||
import hep.dataforge.values.Value;
|
||||
import javafx.beans.property.BooleanProperty;
|
||||
import javafx.beans.property.adapter.JavaBeanBooleanPropertyBuilder;
|
||||
|
||||
@ -77,15 +76,15 @@ public class MKSVacDevice extends PortSensor<Double> {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void command(String commandName, Value argument) throws ControlException {
|
||||
if (commandName.equals("setPower")) {
|
||||
boolean powerOn = argument.booleanValue();
|
||||
setPowerOn(powerOn);
|
||||
} else {
|
||||
super.command(commandName, argument);
|
||||
}
|
||||
}
|
||||
// @Override
|
||||
// public void command(String commandName, Value argument) throws ControlException {
|
||||
// if (commandName.equals("setPower")) {
|
||||
// boolean powerOn = argument.booleanValue();
|
||||
// setPowerOn(powerOn);
|
||||
// } else {
|
||||
// super.command(commandName, argument);
|
||||
// }
|
||||
// }
|
||||
|
||||
@Override
|
||||
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.measurements.Measurement;
|
||||
import hep.dataforge.control.measurements.MeasurementListener;
|
||||
import hep.dataforge.meta.Annotated;
|
||||
import hep.dataforge.meta.Meta;
|
||||
import hep.dataforge.meta.Metoid;
|
||||
import hep.dataforge.names.Named;
|
||||
import hep.dataforge.values.Value;
|
||||
import javafx.application.Platform;
|
||||
@ -35,7 +35,7 @@ import java.util.ResourceBundle;
|
||||
/**
|
||||
* @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 DateTimeFormatter TIME_FORMAT = DateTimeFormatter.ISO_LOCAL_TIME;
|
||||
|
@ -31,8 +31,7 @@ import hep.dataforge.meta.Meta;
|
||||
public class Numass {
|
||||
|
||||
public static Context buildContext(Context parent, Meta meta) {
|
||||
return Context.builder("NUMASS")
|
||||
.parent(parent)
|
||||
return Context.builder("NUMASS", parent)
|
||||
.properties(meta)
|
||||
.plugin(NumassPlugin.class)
|
||||
.build();
|
||||
|
@ -4,6 +4,7 @@ include ":numass-control"
|
||||
include ":numass-control:cryotemp"
|
||||
include ":numass-control:magnet"
|
||||
include ":numass-control:msp"
|
||||
include ":numass-control:vac"
|
||||
//
|
||||
include ":numass-main"
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user