dwfpy.analog_recorder.AnalogRecorder
- class AnalogRecorder(module)[source]
Bases:
objectRecorder for Analog Input data
Methods
Checks the instrument status and processes a chunk of data if available.
Starts the recording and processes all samples until the recording is complete.
Attributes
Gets a collection of data channels.
Gets the number of corrupted samples.
Gets the number of lost samples.
Gets the number of requested samples for recording.
Gets the last acquisition status.
Gets the total number of acquired and lost samples.
- class ChannelData[source]
Bases:
objectRepresents the acquired data of a channel.
- property data_samples: tuple
Gets the acquired data samples.
- Return type
tuple
- property channels: Tuple[ChannelData, ...]
Gets a collection of data channels.
- Return type
Tuple[ChannelData,...]
- property corrupted_samples: int
Gets the number of corrupted samples.
- Return type
int
- property lost_samples: int
Gets the number of lost samples.
- Return type
int
- process()[source]
Checks the instrument status and processes a chunk of data if available.
- bool
If True, then if there is more data to process, and the function must be called again. If False, the recording is complete, and you must stop calling this function.
This function must be called repeatedly by the user to process the recording data. Failure to call this function in a timely manner will cause samples to get lost or corrupted.
- Return type
bool
- record(callback=None)[source]
Starts the recording and processes all samples until the recording is complete.
- callbackfunction
A user-defined function that is called every time a data chunk is processed. Return True to continue recording, False to abort the recording.
This function blocks until the recording is complete.
- Return type
None
- property requested_samples: int
Gets the number of requested samples for recording.
- Return type
int
- property total_samples: int
Gets the total number of acquired and lost samples.
- Return type
int