dwfpy.digital_recorder.DigitalRecorder
- class DigitalRecorder(module)[source]
Bases:
objectRecorder for Digital 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.
Starts the streaming.
Attributes
Gets the number of corrupted samples.
Gets the acquired data samples.
Gets the number of lost samples.
Gets the acquired noise samples.
Gets the number of requested samples for recording.
Gets the last acquisition status.
Gets the total number of acquired and lost samples.
- property corrupted_samples: int
Gets the number of corrupted samples.
- Return type
int
- property data_samples: tuple
Gets the acquired data samples.
- Return type
tuple
- property lost_samples: int
Gets the number of lost samples.
- Return type
int
- property noise_samples: tuple
Gets the acquired noise samples.
- Return type
tuple
- 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
- stream(callback)[source]
Starts the streaming.
- callbackfunction
A user-defined function that is called every time a data chunk is processed. Return True to continue streaming, False to stop the streaming.
- Return type
None
- property total_samples: int
Gets the total number of acquired and lost samples.
- Return type
int