Updating control
This commit is contained in:
parent
515eb2faac
commit
94ed08f7bd
@ -16,10 +16,10 @@ dependencies {
|
|||||||
|
|
||||||
task testDevice(dependsOn: classes, type: JavaExec) {
|
task testDevice(dependsOn: classes, type: JavaExec) {
|
||||||
main mainClass
|
main mainClass
|
||||||
args = ["--config.resource=/config-test/devices.xml"]
|
args = ["--config.resource=config-debug/devices.xml"]
|
||||||
classpath = sourceSets.main.runtimeClasspath
|
classpath = sourceSets.main.runtimeClasspath
|
||||||
description "Start application in debug mode with default virtual port"
|
description = "Start application in debug mode with default virtual port"
|
||||||
group "test"
|
group = "application"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ class PKT8App : NumassControlApplication<PKT8Device>() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun getDeviceMeta(config: Meta): Meta {
|
override fun getDeviceMeta(config: Meta): Meta {
|
||||||
return MetaUtils.findNode(config,"device"){it.getString("name") == "numass.temp"}.orElseThrow{RuntimeException("Temperature measurement configuration not found")}
|
return MetaUtils.findNode(config,"device"){it.getString("type") == "PKT8"}
|
||||||
|
.orElseThrow{RuntimeException("Temperature measurement configuration not found")}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,8 @@ class PKT8Device(context: Context, meta: Meta) : PortSensor(context, meta) {
|
|||||||
* The key is the letter (a,b,c,d...) as in measurements
|
* The key is the letter (a,b,c,d...) as in measurements
|
||||||
*/
|
*/
|
||||||
val channels = LinkedHashMap<String, PKT8Channel>()
|
val channels = LinkedHashMap<String, PKT8Channel>()
|
||||||
|
|
||||||
|
val storing = valueState("storing")
|
||||||
private var storageHelper: StorageHelper? = null
|
private var storageHelper: StorageHelper? = null
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,9 +8,7 @@ import hep.dataforge.meta.Meta
|
|||||||
* Created by darksnake on 09-May-17.
|
* Created by darksnake on 09-May-17.
|
||||||
*/
|
*/
|
||||||
class PKT8DeviceFactory : DeviceFactory {
|
class PKT8DeviceFactory : DeviceFactory {
|
||||||
override fun getType(): String {
|
override val type: String = PKT8Device.PKT8_DEVICE_TYPE
|
||||||
return PKT8Device.PKT8_DEVICE_TYPE
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun build(context: Context, meta: Meta): PKT8Device {
|
override fun build(context: Context, meta: Meta): PKT8Device {
|
||||||
return PKT8Device(context, meta)
|
return PKT8Device(context, meta)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package inr.numass.control.cryotemp
|
package inr.numass.control.cryotemp
|
||||||
|
|
||||||
import hep.dataforge.control.devices.Sensor
|
|
||||||
import hep.dataforge.description.Descriptors
|
import hep.dataforge.description.Descriptors
|
||||||
|
import hep.dataforge.fx.asBooleanProperty
|
||||||
import hep.dataforge.fx.bindWindow
|
import hep.dataforge.fx.bindWindow
|
||||||
import hep.dataforge.fx.dfIconView
|
import hep.dataforge.fx.dfIconView
|
||||||
import hep.dataforge.fx.fragments.LogFragment
|
import hep.dataforge.fx.fragments.LogFragment
|
||||||
@ -82,11 +82,11 @@ class PKT8Display : DeviceDisplayFX<PKT8Device>(), PKT8ValueListener {
|
|||||||
toolbar {
|
toolbar {
|
||||||
togglebutton("Measure") {
|
togglebutton("Measure") {
|
||||||
isSelected = false
|
isSelected = false
|
||||||
bindBooleanToState(Sensor.MEASURING_STATE, selectedProperty())
|
selectedProperty().bindBidirectional(device.measuring.asBooleanProperty())
|
||||||
}
|
}
|
||||||
togglebutton("Store") {
|
togglebutton("Store") {
|
||||||
isSelected = false
|
isSelected = false
|
||||||
bindBooleanToState("storing", selectedProperty())
|
selectedProperty().bindBidirectional(device.storing.asBooleanProperty())
|
||||||
}
|
}
|
||||||
separator(Orientation.VERTICAL)
|
separator(Orientation.VERTICAL)
|
||||||
pane {
|
pane {
|
||||||
|
Loading…
Reference in New Issue
Block a user