tendril.testing.instrumentbase module¶
This file is part of tendril See the COPYING, README, and INSTALL files for more information
-
class
tendril.testing.instrumentbase.
InstrumentChannelBase
(parent)[source]¶ Bases:
object
-
is_enabled
¶
-
-
class
tendril.testing.instrumentbase.
SignalWaveInputChannel
(parent, interface, chidx)[source]¶ Bases:
tendril.testing.instrumentbase.InstrumentInputChannelBase
This class provides the bulk of the accessors to the instrument channels providing vanilla SignalWave types. More complex implementations should provide their own channel classes.
Parameters: - parent – The instrument of which this channel is a part of.
- interface – The interface to the instrument.
- chidx – The channel index.
-
get
(unitclass=None, flush=True)[source]¶ Gets the latest data point in the channel’s point buffer. By default, it also flushes any older points from the buffer. This behavior can be suppressed by passing flush=False.
Parameters: - unitclass – Unit class of which the data point is expected, or None if you don’t care.
- flush – Whether or not older points should be flushed. Default True.
Returns: Latest datapoint.
Return type:
-
get_next_chunk
(unitclass=None, maxlen=None)[source]¶ Gets the next chunk of data from the instrument channel. Note that the chunk returned has already been removed from the channel’s point buffer.
Parameters: unitclass – Unit class of which the data point is expected, or None if you don’t care. Returns: Wave containing all but the latest data point in the channel’s point buffer. Return type: tendril.utils.types.signalbase.SignalWave
-
data_available
¶