Compare commits

...

3 Commits

Author SHA1 Message Date
290010fc8c Add writeable flag to mutable properties 2023-10-19 16:38:50 +03:00
80cc62e25b Merge remote-tracking branch 'spc/dev' into dev
# Conflicts:
#	demo/all-things/build.gradle.kts
2023-10-19 16:21:19 +03:00
aef94767c5 Fix all-things demo 2023-09-18 13:38:45 +03:00
3 changed files with 7 additions and 5 deletions

View File

@ -7,6 +7,7 @@ plugins {
}
val dataforgeVersion: String by extra("0.6.2")
val visionforgeVersion by extra("0.3.0-dev-10")
val ktorVersion: String by extra(space.kscience.gradle.KScienceVersions.ktorVersion)
val rsocketVersion by extra("0.15.4")
val xodusVersion by extra("2.0.1")

View File

@ -127,7 +127,8 @@ public abstract class DeviceSpec<D : Device> {
PropertyDelegateProvider { _: DeviceSpec<D>, property: KProperty<*> ->
val propertyName = name ?: property.name
val deviceProperty = object : WritableDevicePropertySpec<D, T> {
override val descriptor: PropertyDescriptor = PropertyDescriptor(propertyName).apply(descriptorBuilder)
override val descriptor: PropertyDescriptor = PropertyDescriptor(propertyName, writable = true)
.apply(descriptorBuilder)
override val converter: MetaConverter<T> = converter
override suspend fun read(device: D): T? = withContext(device.coroutineContext) { device.read() }