immutable laminate

This commit is contained in:
Alexander Nozik 2017-07-31 20:19:55 +03:00
parent 7ae632ed69
commit a3120d72e7
4 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@
package inr.numass.client; package inr.numass.client;
import hep.dataforge.io.envelopes.DefaultEnvelopeReader; import hep.dataforge.io.envelopes.DefaultEnvelopeReader;
import hep.dataforge.io.envelopes.DefaultEnvelopeWriter; import hep.dataforge.io.envelopes.DefaultEnvelopeType;
import hep.dataforge.io.envelopes.Envelope; import hep.dataforge.io.envelopes.Envelope;
import hep.dataforge.io.envelopes.EnvelopeBuilder; import hep.dataforge.io.envelopes.EnvelopeBuilder;
import hep.dataforge.io.messages.Responder; import hep.dataforge.io.messages.Responder;
@ -83,7 +83,7 @@ public class NumassClient implements AutoCloseable, Responder {
} }
private void write(Envelope envelope, OutputStream os) throws IOException { private void write(Envelope envelope, OutputStream os) throws IOException {
new DefaultEnvelopeWriter().write(os, envelope); DefaultEnvelopeType.instance.getWriter().write(os, envelope);
os.flush(); os.flush();
} }

View File

@ -188,7 +188,7 @@ class PKT8ViewConnection : DeviceViewConnection<PKT8Device>(), MeasurementListen
plotFrame.add(plottable) plotFrame.add(plottable)
} }
if (device.meta().hasMeta("plotConfig")) { if (device.meta().hasMeta("plotConfig")) {
plottables.applyConfig(device.meta().getMeta("plotConfig")) plottables.configure(device.meta().getMeta("plotConfig"))
plottables.setMaxItems(1000) plottables.setMaxItems(1000)
plottables.setPrefItems(400) plottables.setPrefItems(400)
} }

View File

@ -277,7 +277,7 @@ class NumassLoaderView : View() {
val count = NumassAnalyzer.countInWindow(getSpectrum(point), loChannel, upChannel); val count = NumassAnalyzer.countInWindow(getSpectrum(point), loChannel, upChannel);
val seconds = point.length.toMillis() / 1000.0; val seconds = point.length.toMillis() / 1000.0;
spectrumPlot.setProgress(-1.0); spectrumPlot.setProgress(-1.0);
ValueMap( ValueMap.ofMap(
mapOf( mapOf(
XYAdapter.X_AXIS to point.voltage, XYAdapter.X_AXIS to point.voltage,
XYAdapter.Y_AXIS to (count / seconds), XYAdapter.Y_AXIS to (count / seconds),

View File

@ -22,7 +22,7 @@ class JFCTest : View("My View") {
action { action {
data.fillData( data.fillData(
(1..1000).map { ValueMap(arrayOf(XYAdapter.X_VALUE_KEY, XYAdapter.Y_VALUE_KEY), it, rnd.nextDouble()) } (1..1000).map { ValueMap.of(arrayOf(XYAdapter.X_VALUE_KEY, XYAdapter.Y_VALUE_KEY), it, rnd.nextDouble()) }
) )
plot.add(data) plot.add(data)
} }