Package jisa.devices.interfaces
Interface MSwitch
-
- All Superinterfaces:
Instrument
,MultiInstrument
,Switch
- All Known Implementing Classes:
ADRelay
public interface MSwitch extends Switch, MultiInstrument
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jisa.devices.interfaces.Instrument
Instrument.AutoQuantity<S>, Instrument.OptionalQuantity<S>, Instrument.Parameter<S>, Instrument.Setter<S>, Instrument.TableQuantity
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
checkChannel(int channel)
default <I extends Instrument>
java.util.List<I>get(java.lang.Class<I> type)
Returns a list of all sub-instruments this instrument contains that can be considered to be of the given instrument type.default Switch
getChannel(int channel)
default java.util.List<Switch>
getChannels()
static java.lang.String
getDescription()
java.lang.String
getName(int channel)
int
getNumChannels()
default java.util.List<java.lang.Class<? extends Instrument>>
getSubInstrumentTypes()
Returns a list of all the different classes of sub-instruments that this instrument contains.default boolean
isOn()
boolean
isOn(int channel)
default void
setOn(int channel, boolean on)
default void
turnOff()
void
turnOff(int channel)
default void
turnOn()
void
turnOn(int channel)
-
Methods inherited from interface jisa.devices.interfaces.Instrument
close, getAddress, getConfigurationParameters, getConfigurationParameters, getIDN, getLockObject, getName, setTimeout
-
Methods inherited from interface jisa.devices.interfaces.MultiInstrument
contains, contains, get, getSubInstrument, getSubInstruments, getSubInstruments
-
-
-
-
Method Detail
-
getDescription
static java.lang.String getDescription()
-
getName
java.lang.String getName(int channel)
-
getSubInstrumentTypes
default java.util.List<java.lang.Class<? extends Instrument>> getSubInstrumentTypes()
Description copied from interface:MultiInstrument
Returns a list of all the different classes of sub-instruments that this instrument contains.- Specified by:
getSubInstrumentTypes
in interfaceMultiInstrument
- Returns:
- List of sub-instrument classes
-
get
default <I extends Instrument> java.util.List<I> get(java.lang.Class<I> type)
Description copied from interface:MultiInstrument
Returns a list of all sub-instruments this instrument contains that can be considered to be of the given instrument type.- Specified by:
get
in interfaceMultiInstrument
- Type Parameters:
I
- Instrument class- Parameters:
type
- The class object of sub-instrument to return- Returns:
- List of sub-instruments matching the given class
-
turnOn
void turnOn(int channel) throws java.io.IOException, DeviceException
- Throws:
java.io.IOException
DeviceException
-
turnOn
default void turnOn() throws java.io.IOException, DeviceException
- Specified by:
turnOn
in interfaceSwitch
- Throws:
java.io.IOException
DeviceException
-
turnOff
void turnOff(int channel) throws java.io.IOException, DeviceException
- Throws:
java.io.IOException
DeviceException
-
turnOff
default void turnOff() throws java.io.IOException, DeviceException
- Specified by:
turnOff
in interfaceSwitch
- Throws:
java.io.IOException
DeviceException
-
setOn
default void setOn(int channel, boolean on) throws java.io.IOException, DeviceException
- Throws:
java.io.IOException
DeviceException
-
isOn
boolean isOn(int channel) throws java.io.IOException, DeviceException
- Throws:
java.io.IOException
DeviceException
-
isOn
default boolean isOn() throws java.io.IOException, DeviceException
- Specified by:
isOn
in interfaceSwitch
- Throws:
java.io.IOException
DeviceException
-
getNumChannels
int getNumChannels()
-
checkChannel
default void checkChannel(int channel) throws DeviceException
- Throws:
DeviceException
-
getChannels
default java.util.List<Switch> getChannels()
-
getChannel
default Switch getChannel(int channel)
-
-