libtiepie-hw
1.1.13
|
Functions for controlling signal frequency, sample rate and frequency mode of a generator. More...
Modules | |
Frequency mode | |
Functions to control the generator frequency mode. | |
Functions | |
TIEPIE_HW_API tiepie_hw_bool | tiepie_hw_generator_has_frequency (tiepie_hw_handle handle) |
Check whether the current signal type and frequency mode of a specified generator support controlling the signal/sample frequency. More... | |
TIEPIE_HW_API double | tiepie_hw_generator_get_frequency_min (tiepie_hw_handle handle) |
Get the minimum signal/sample frequency with the current frequency mode, of a specified generator. More... | |
TIEPIE_HW_API double | tiepie_hw_generator_get_frequency_max (tiepie_hw_handle handle) |
Get the maximum signal/sample frequency with the current frequency mode and signal type, of a specified generator. More... | |
TIEPIE_HW_API double | tiepie_hw_generator_get_frequency (tiepie_hw_handle handle) |
Get the current signal/sample frequency, of a specified generator. More... | |
TIEPIE_HW_API double | tiepie_hw_generator_set_frequency (tiepie_hw_handle handle, double value) |
Set signal/sample frequency, of a specified generator. More... | |
Functions for controlling signal frequency, sample rate and frequency mode of a generator.
The frequency of a generator can be set between a minimum and a maximum value. Use tiepie_hw_generator_get_frequency_min() and tiepie_hw_generator_get_frequency_max() to get the frequency limits.
The frequency setting can either set the signal frequency or the sample rate of the generator, depending on the selected Frequency mode.
When signal type DC is active, frequency is not available. Use tiepie_hw_generator_has_frequency() to check whether frequency is available for the currently set signal type.
By default the frequency mode is set to signal frequency (TIEPIE_HW_FM_SIGNALFREQUENCY) and the frequency is set to 1 k_hz.
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_has_frequency | ( | tiepie_hw_handle | handle | ) |
Check whether the current signal type and frequency mode of a specified generator support controlling the signal/sample frequency.
[in] | handle | A device handle identifying the generator. |
TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid generator handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API double tiepie_hw_generator_get_frequency_min | ( | tiepie_hw_handle | handle | ) |
Get the minimum signal/sample frequency with the current frequency mode, of a specified generator.
[in] | handle | A device handle identifying the generator. |
TIEPIE_HW_STATUS_NOT_SUPPORTED | The generator does not support frequency for the current signal type. |
TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid generator handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API double tiepie_hw_generator_get_frequency_max | ( | tiepie_hw_handle | handle | ) |
Get the maximum signal/sample frequency with the current frequency mode and signal type, of a specified generator.
[in] | handle | A device handle identifying the generator. |
TIEPIE_HW_STATUS_NOT_SUPPORTED | The generator does not support frequency for the current signal type. |
TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid generator handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API double tiepie_hw_generator_get_frequency | ( | tiepie_hw_handle | handle | ) |
Get the current signal/sample frequency, of a specified generator.
[in] | handle | A device handle identifying the generator. |
TIEPIE_HW_STATUS_NOT_SUPPORTED | The generator does not support frequency for the current signal type. |
TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid generator handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API double tiepie_hw_generator_set_frequency | ( | tiepie_hw_handle | handle, |
double | value | ||
) |
Set signal/sample frequency, of a specified generator.
[in] | handle | A device handle identifying the generator. |
[in] | value | The requested signal/sample frequency, in Hz. |
TIEPIE_HW_STATUS_VALUE_CLIPPED | The requested frequency is outside the valid range and clipped to the closest limit. |
TIEPIE_HW_STATUS_VALUE_MODIFIED | The requested frequency is within the valid range but not available. The closest valid value is set. |
TIEPIE_HW_STATUS_NOT_SUPPORTED | The generator does not support frequency for the current signal type. |
TIEPIE_HW_STATUS_NOT_CONTROLLABLE | |
TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid generator handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |