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 class
Configuration.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 SRunnable
addChangeListener(SRunnable listener)
T
configure()
T
get()
int
getChoice()
java.lang.String
getChoiceName()
java.util.List<java.lang.String>
getChoices()
Instrument
getInputInstrument()
T
getInstrument()
java.lang.String
getName()
java.util.List<Configuration.Parameter<?>>
getParameters()
java.lang.Class<T>
getTarget()
boolean
isChoice()
void
loadFromConfig(ConfigBlock block)
void
removeChangeListener(SRunnable listener)
void
selectChoice(int index)
void
setInputInstrument(Instrument instrument)
void
writeToConfig(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.IOException
DeviceException
-
getInputInstrument
public Instrument getInputInstrument()
-
setInputInstrument
public void setInputInstrument(Instrument instrument)
-
getInstrument
public T getInstrument() throws java.io.IOException, DeviceException
- Throws:
java.io.IOException
DeviceException
-
get
public T get() throws java.io.IOException, DeviceException
- Throws:
java.io.IOException
DeviceException
-
-