libtiepie-hw
1.1.4
|
Functions to control pre samples. More...
Functions | |
TIEPIE_HW_API double | tiepie_hw_oscilloscope_get_pre_sample_ratio (tiepie_hw_handle handle) |
Get the current pre sample ratio of a specified oscilloscope. More... | |
TIEPIE_HW_API double | tiepie_hw_oscilloscope_set_pre_sample_ratio (tiepie_hw_handle handle, double value) |
Set the pre sample ratio of a specified oscilloscope. More... | |
Functions to control pre samples.
When pre samples are selected (pre sample ratio > 0), the trigger point is located at position (pre sample ratio * record length), dividing the record in pre samples and post samples. This way it is possible to "look back in time" since the pre samples were captured before the trigger moment.
Pre sample ratio is set as a number between 0 and 1, representing the percentage of the total record length:
By default the pre sample ratio is: 0 (no pre samples).
The pre sample buffer is not completely filled by default. When a trigger occurs before the pre sample buffer is filled, part of the pre samples will be invalid. Use tiepie_hw_oscilloscope_get_valid_pre_sample_count() before collecting the data to determine the amount of valid pre samples. To ensure the pre samples buffer will be completely filled, set Presamples valid to true.
TIEPIE_HW_API double tiepie_hw_oscilloscope_get_pre_sample_ratio | ( | tiepie_hw_handle | handle | ) |
Get the current pre sample ratio of a specified oscilloscope.
[in] | handle | A device handle identifying the oscilloscope. |
0
and 1
. TIEPIE_HW_STATUS_NOT_SUPPORTED | The indicated oscilloscope does not support pre samples with the current settings. |
TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid oscilloscope handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API double tiepie_hw_oscilloscope_set_pre_sample_ratio | ( | tiepie_hw_handle | handle, |
double | value | ||
) |
Set the pre sample ratio of a specified oscilloscope.
[in] | handle | A device handle identifying the oscilloscope. |
[in] | value | The required pre sample ratio, a number between 0 and 1 . |
0
and 1
. TIEPIE_HW_STATUS_NOT_SUPPORTED | The indicated oscilloscope does not support pre samples with the current settings. |
TIEPIE_HW_STATUS_INVALID_VALUE | |
TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid oscilloscope handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |