Common methods
- class IteratorBase
-
void clear()
Discards accumulated measurement data, initializes the data buffer with zero values, and resets the state to the initial state.
-
void start()
Starts or continues data acquisition. This method is implicitly called when a measurement object is created.
-
void startFor(timestamp_t capture_duration, bool clear = true)
Starts or continues the data acquisition for the given duration (in ps). After the duration time, the method
stop()is called andisRunning()will return False. Whether the accumulated data is cleared at the beginning ofstartFor()is controlled with the second parameter clear, which is True by default.- Parameters:
capture_duration – Acquisition duration in picoseconds.
clear – Resets the accumulated data at the beginning (default: True).
-
void stop()
After calling this method, the measurement will stop processing incoming tags. Use
start()orstartFor()to continue or restart the measurement.
-
void abort()
Immediately aborts the measurement, discarding accumulated measurement data, and resets the state to the initial state.
-
bool isRunning()
Returns True if the measurement is collecting the data. This method will return False if the measurement was stopped manually by calling
stop()or automatically after callingstartFor()and the duration has passed.Note
All measurements start accumulating data immediately after their creation.
- Returns:
True if the measurement is still running.
-
bool waitUntilFinished(int timeout = -1)
Blocks the execution until the measurement has finished. Can be used with
startFor(). This is roughly equivalent to a polling loop with sleep().measurement.waitUntilFinished(timeout=-1) # is roughly equivalent to while measurement.isRunning(): sleep(0.01)
- Parameters:
timeout – Timeout in milliseconds. Negative value means no timeout, zero returns immediately.
- Returns:
True if the measurement has finished, False on timeout.
-
timestamp_t getCaptureDuration()
Total capture duration since the measurement creation or last call to
clear().- Returns:
Capture duration in ps.
-
str getConfiguration()
Returns configuration data of the measurement object. The configuration includes the measurement name, and the values of the current parameters. Information returned by this method is also provided with
TimeTaggerBase::getConfiguration().- Returns:
Configuration data of the measurement object.
-
void clear()