Package jisa.devices
Class Configuration<T extends Instrument>
- java.lang.Object
-
- jisa.devices.Configuration<T>
-
public class Configuration<T extends Instrument> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConfiguration.Parameter<S>
-
Constructor Summary
Constructors Constructor Description Configuration(java.lang.String name, java.lang.Class<T> target)Configuration(java.lang.String name, kotlin.reflect.KClass<T> target)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SRunnableaddChangeListener(SRunnable listener)Tconfigure()Tget()intgetChoice()java.lang.StringgetChoiceName()java.util.List<java.lang.String>getChoices()InstrumentgetInputInstrument()TgetInstrument()java.lang.StringgetName()java.util.List<Configuration.Parameter<?>>getParameters()java.lang.Class<T>getTarget()booleanisChoice()voidloadFromConfig(ConfigBlock block)voidremoveChangeListener(SRunnable listener)voidselectChoice(int index)voidsetInputInstrument(Instrument instrument)voidwriteToConfig(ConfigBlock block)
-
-
-
Method Detail
-
getName
public java.lang.String getName()
-
loadFromConfig
public void loadFromConfig(ConfigBlock block)
-
removeChangeListener
public void removeChangeListener(SRunnable listener)
-
writeToConfig
public void writeToConfig(ConfigBlock block)
-
getTarget
public java.lang.Class<T> getTarget()
-
selectChoice
public void selectChoice(int index)
-
isChoice
public boolean isChoice()
-
getChoiceName
public java.lang.String getChoiceName()
-
getChoices
public java.util.List<java.lang.String> getChoices()
-
getChoice
public int getChoice()
-
getParameters
public java.util.List<Configuration.Parameter<?>> getParameters()
-
configure
public T configure() throws java.io.IOException, DeviceException
- Throws:
java.io.IOExceptionDeviceException
-
getInputInstrument
public Instrument getInputInstrument()
-
setInputInstrument
public void setInputInstrument(Instrument instrument)
-
getInstrument
public T getInstrument() throws java.io.IOException, DeviceException
- Throws:
java.io.IOExceptionDeviceException
-
get
public T get() throws java.io.IOException, DeviceException
- Throws:
java.io.IOExceptionDeviceException
-
-