diff --git a/dataforge-device-core/src/commonMain/kotlin/hep/dataforge/control/controllers/DeviceController.kt b/dataforge-device-core/src/commonMain/kotlin/hep/dataforge/control/controllers/DeviceController.kt index 881a24a..ed4dfcb 100644 --- a/dataforge-device-core/src/commonMain/kotlin/hep/dataforge/control/controllers/DeviceController.kt +++ b/dataforge-device-core/src/commonMain/kotlin/hep/dataforge/control/controllers/DeviceController.kt @@ -75,6 +75,7 @@ public class DeviceController( targetDevice = request.sourceDevice ) } + is PropertySetMessage -> { if (request.value == null) { device.invalidateProperty(request.property) @@ -88,6 +89,7 @@ public class DeviceController( targetDevice = request.sourceDevice ) } + is ActionExecuteMessage -> { ActionResultMessage( action = request.action, @@ -96,6 +98,7 @@ public class DeviceController( targetDevice = request.sourceDevice ) } + is GetDescriptionMessage -> { val descriptionMeta = Meta { "properties" put { @@ -117,7 +120,14 @@ public class DeviceController( ) } - is DescriptionMessage, is PropertyChangedMessage, is ActionResultMessage, is BinaryNotificationMessage, is DeviceErrorMessage, is EmptyDeviceMessage -> { + is DescriptionMessage, + is PropertyChangedMessage, + is ActionResultMessage, + is BinaryNotificationMessage, + is DeviceErrorMessage, + is EmptyDeviceMessage, + is DeviceLogMessage, + -> { //Those messages are ignored EmptyDeviceMessage( sourceDevice = deviceTarget, diff --git a/dataforge-device-core/src/commonMain/kotlin/hep/dataforge/control/messages/DeviceMessage.kt b/dataforge-device-core/src/commonMain/kotlin/hep/dataforge/control/messages/DeviceMessage.kt index d1edaa4..4f683bf 100644 --- a/dataforge-device-core/src/commonMain/kotlin/hep/dataforge/control/messages/DeviceMessage.kt +++ b/dataforge-device-core/src/commonMain/kotlin/hep/dataforge/control/messages/DeviceMessage.kt @@ -9,7 +9,7 @@ import kotlinx.serialization.json.decodeFromJsonElement import kotlinx.serialization.json.encodeToJsonElement @Serializable -public sealed class DeviceMessage{ +public sealed class DeviceMessage { public abstract val sourceDevice: String? public abstract val targetDevice: String? public abstract val comment: String? @@ -133,6 +133,7 @@ public data class EmptyDeviceMessage( @SerialName("log") public data class DeviceLogMessage( val message: String, + val data: MetaItem<*>? = null, override val sourceDevice: String? = null, override val targetDevice: String? = null, override val comment: String? = null,