diff --git a/numass-client/src/main/java/inr/numass/client/NumassClient.java b/numass-client/src/main/java/inr/numass/client/NumassClient.java index 7921e931..e3a0fbbf 100644 --- a/numass-client/src/main/java/inr/numass/client/NumassClient.java +++ b/numass-client/src/main/java/inr/numass/client/NumassClient.java @@ -16,7 +16,7 @@ package inr.numass.client; 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.EnvelopeBuilder; 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 { - new DefaultEnvelopeWriter().write(os, envelope); + DefaultEnvelopeType.instance.getWriter().write(os, envelope); os.flush(); } diff --git a/numass-control/cryotemp/src/main/kotlin/inr/numass/control/cryotemp/PKT8ViewConnection.kt b/numass-control/cryotemp/src/main/kotlin/inr/numass/control/cryotemp/PKT8ViewConnection.kt index dd3a3968..a9bd51d5 100644 --- a/numass-control/cryotemp/src/main/kotlin/inr/numass/control/cryotemp/PKT8ViewConnection.kt +++ b/numass-control/cryotemp/src/main/kotlin/inr/numass/control/cryotemp/PKT8ViewConnection.kt @@ -188,7 +188,7 @@ class PKT8ViewConnection : DeviceViewConnection(), MeasurementListen plotFrame.add(plottable) } if (device.meta().hasMeta("plotConfig")) { - plottables.applyConfig(device.meta().getMeta("plotConfig")) + plottables.configure(device.meta().getMeta("plotConfig")) plottables.setMaxItems(1000) plottables.setPrefItems(400) } diff --git a/numass-viewer/src/main/kotlin/inr/numass/viewer/NumassLoaderView.kt b/numass-viewer/src/main/kotlin/inr/numass/viewer/NumassLoaderView.kt index 414a3320..ba5d6bc3 100644 --- a/numass-viewer/src/main/kotlin/inr/numass/viewer/NumassLoaderView.kt +++ b/numass-viewer/src/main/kotlin/inr/numass/viewer/NumassLoaderView.kt @@ -277,7 +277,7 @@ class NumassLoaderView : View() { val count = NumassAnalyzer.countInWindow(getSpectrum(point), loChannel, upChannel); val seconds = point.length.toMillis() / 1000.0; spectrumPlot.setProgress(-1.0); - ValueMap( + ValueMap.ofMap( mapOf( XYAdapter.X_AXIS to point.voltage, XYAdapter.Y_AXIS to (count / seconds), diff --git a/numass-viewer/src/main/kotlin/inr/numass/viewer/test/JFCTest.kt b/numass-viewer/src/main/kotlin/inr/numass/viewer/test/JFCTest.kt index 880e0754..3dcaa234 100644 --- a/numass-viewer/src/main/kotlin/inr/numass/viewer/test/JFCTest.kt +++ b/numass-viewer/src/main/kotlin/inr/numass/viewer/test/JFCTest.kt @@ -22,7 +22,7 @@ class JFCTest : View("My View") { action { 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) }