get Instrument
abstract fun <I : Instrument?> getInstrument(@NonNull instrumentClass: Class<I>): I
Content copied to clipboard
Gets an instrument.
Return
requested instrument, or null
if it's not present
Parameters
instrument Class
class of the instrument
<I>
type of the instrument class
abstract fun <I : Instrument?> getInstrument(@NonNull instrumentClass: Class<I>, @NonNull observer: Ref.Observer<I>): Ref<I>
Content copied to clipboard
Gets an instrument and registers an observer notified each time it changes.
Return
reference to the requested instrument
Parameters
instrument Class
class of the instrument
observer
observer to notify when the peripheral changes
<I>
type of the instrument class