diff --git a/dataforge-control-core/src/commonMain/kotlin/hep/dataforge/control/api/DeviceListener.kt b/dataforge-control-core/src/commonMain/kotlin/hep/dataforge/control/api/DeviceListener.kt index c5e2f06..4082483 100644 --- a/dataforge-control-core/src/commonMain/kotlin/hep/dataforge/control/api/DeviceListener.kt +++ b/dataforge-control-core/src/commonMain/kotlin/hep/dataforge/control/api/DeviceListener.kt @@ -6,7 +6,6 @@ import hep.dataforge.meta.MetaItem * PropertyChangeListener Interface * [value] is a new value that property has after a change; null is for invalid state. */ -interface PropertyChangeListener { interface DeviceListener { fun propertyChanged(propertyName: String, value: MetaItem<*>?) //TODO add general message listener method diff --git a/dataforge-control-core/src/commonMain/kotlin/hep/dataforge/control/controllers/DeviceMessage.kt b/dataforge-control-core/src/commonMain/kotlin/hep/dataforge/control/controllers/DeviceMessage.kt index 9a5aaa5..f663658 100644 --- a/dataforge-control-core/src/commonMain/kotlin/hep/dataforge/control/controllers/DeviceMessage.kt +++ b/dataforge-control-core/src/commonMain/kotlin/hep/dataforge/control/controllers/DeviceMessage.kt @@ -1,11 +1,9 @@ package hep.dataforge.control.controllers -import hep.dataforge.control.controlers.DeviceMessage.Companion.PAYLOAD_VALUE_KEY +import hep.dataforge.control.controllers.DeviceMessage.Companion.PAYLOAD_VALUE_KEY import hep.dataforge.meta.* import hep.dataforge.names.asName import hep.dataforge.names.plus -import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializable class DeviceMessage : Scheme() { var id by item() diff --git a/dataforge-control-core/src/commonMain/kotlin/hep/dataforge/control/controllers/MessageController.kt b/dataforge-control-core/src/commonMain/kotlin/hep/dataforge/control/controllers/MessageController.kt index 2c4a105..ef0eb44 100644 --- a/dataforge-control-core/src/commonMain/kotlin/hep/dataforge/control/controllers/MessageController.kt +++ b/dataforge-control-core/src/commonMain/kotlin/hep/dataforge/control/controllers/MessageController.kt @@ -2,9 +2,7 @@ package hep.dataforge.control.controllers import hep.dataforge.control.api.Device import hep.dataforge.control.api.DeviceListener -import hep.dataforge.control.controlers.DeviceMessage.Companion.PROPERTY_CHANGED_ACTION -import hep.dataforge.control.api.PropertyChangeListener -import hep.dataforge.control.controllers.DevicePropertyMessage.Companion.PROPERTY_CHANGED_ACTION +import hep.dataforge.control.controllers.DeviceMessage.Companion.PROPERTY_CHANGED_ACTION import hep.dataforge.io.Envelope import hep.dataforge.io.Responder import hep.dataforge.io.SimpleEnvelope diff --git a/dataforge-control-server/src/main/kotlin/hep/dataforge/control/server/deviceWebServer.kt b/dataforge-control-server/src/main/kotlin/hep/dataforge/control/server/deviceWebServer.kt index d04baf1..5aa58ea 100644 --- a/dataforge-control-server/src/main/kotlin/hep/dataforge/control/server/deviceWebServer.kt +++ b/dataforge-control-server/src/main/kotlin/hep/dataforge/control/server/deviceWebServer.kt @@ -3,9 +3,9 @@ package hep.dataforge.control.server import hep.dataforge.control.api.Device -import hep.dataforge.control.controlers.DeviceMessage -import hep.dataforge.control.controlers.MessageController -import hep.dataforge.control.controlers.property +import hep.dataforge.control.controllers.DeviceMessage +import hep.dataforge.control.controllers.MessageController +import hep.dataforge.control.controllers.property import hep.dataforge.meta.toJson import hep.dataforge.meta.toMeta import hep.dataforge.meta.toMetaItem diff --git a/dataforge-control-server/src/main/kotlin/hep/dataforge/control/server/envelopes.kt b/dataforge-control-server/src/main/kotlin/hep/dataforge/control/server/envelopes.kt index 60c0f1e..095100b 100644 --- a/dataforge-control-server/src/main/kotlin/hep/dataforge/control/server/envelopes.kt +++ b/dataforge-control-server/src/main/kotlin/hep/dataforge/control/server/envelopes.kt @@ -1,10 +1,9 @@ package hep.dataforge.control.server -import hep.dataforge.control.controlers.DeviceMessage +import hep.dataforge.control.controllers.DeviceMessage import hep.dataforge.io.Envelope import io.ktor.application.ApplicationCall import io.ktor.http.cio.websocket.Frame -import io.ktor.response.ApplicationResponse fun Frame.toEnvelope(): Envelope { TODO()