New ScreenPanel
This commit is contained in:
20
script/dev.groovy
Executable file
20
script/dev.groovy
Executable file
@@ -0,0 +1,20 @@
|
||||
import ch.psi.pshell.device.RegisterBase as RegisterBase
|
||||
|
||||
//@groovy.transform.InheritConstructors
|
||||
class AnalogOutput extends RegisterBase<Number> {
|
||||
Number val = 0.0
|
||||
AnalogOutput(String name) {
|
||||
super(name)
|
||||
}
|
||||
def Number doRead(){
|
||||
return val
|
||||
}
|
||||
def void doWrite(Number val){
|
||||
this.val = val
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ao1 = new AnalogOutput("ao1")
|
||||
|
||||
add_device(ao1, true)
|
||||
Reference in New Issue
Block a user