libtiepie-hw
1.2.0
|
Functions for controlling the signal symmetry of a generator. More...
Functions | |
TIEPIE_HW_API tiepie_hw_bool | tiepie_hw_generator_has_symmetry (tiepie_hw_handle handle) |
Check whether the current signal type of a specified generator supports controlling the signal symmetry. More... | |
TIEPIE_HW_API double | tiepie_hw_generator_get_symmetry_min (tiepie_hw_handle handle) |
Get the minimum signal symmetry of a specified generator. More... | |
TIEPIE_HW_API double | tiepie_hw_generator_get_symmetry_max (tiepie_hw_handle handle) |
Get the maximum signal symmetry of a specified generator. More... | |
TIEPIE_HW_API double | tiepie_hw_generator_get_symmetry (tiepie_hw_handle handle) |
Get the current signal symmetry of a specified generator. More... | |
TIEPIE_HW_API double | tiepie_hw_generator_set_symmetry (tiepie_hw_handle handle, double value) |
Set the signal symmetry of a specified generator. More... | |
Functions for controlling the signal symmetry of a generator.
The symmetry of a signal defines the ratio between the length of positive part of a period and the length of the negative part of a period of the generated signal. The symmetry of a generator can be set between a minimum and a maximum value. Use tiepie_hw_generator_get_symmetry_min() and tiepie_hw_generator_get_symmetry_max() to get the symmetry limits.
The symmetry is defined as a number between 0
and 1
, where 0
defines a symmetry of 0% (no positive part) and 1
defines a symmetry of 100% (no negative part).
When signal type Pulse, DC, Noise or Arbitrary is active, setting symmetry is not available. Use tiepie_hw_generator_has_symmetry() to check whether symmetry is available for the currently set signal type.
By default the symmetry is set to: 0.5 (50%).
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_has_symmetry | ( | tiepie_hw_handle | handle | ) |
Check whether the current signal type of a specified generator supports controlling the signal symmetry.
[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_symmetry_min | ( | tiepie_hw_handle | handle | ) |
Get the minimum signal symmetry of a specified generator.
[in] | handle | A device handle identifying the generator. |
0
and 1
. TIEPIE_HW_STATUS_NOT_SUPPORTED | The generator does not support symmetry 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_symmetry_max | ( | tiepie_hw_handle | handle | ) |
Get the maximum signal symmetry of a specified generator.
[in] | handle | A device handle identifying the generator. |
0
and 1
. TIEPIE_HW_STATUS_NOT_SUPPORTED | The generator does not support symmetry 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_symmetry | ( | tiepie_hw_handle | handle | ) |
Get the current signal symmetry of a specified generator.
[in] | handle | A device handle identifying the generator. |
0
and 1
. TIEPIE_HW_STATUS_NOT_SUPPORTED | The generator does not support symmetry 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_symmetry | ( | tiepie_hw_handle | handle, |
double | value | ||
) |
Set the signal symmetry of a specified generator.
[in] | handle | A device handle identifying the generator. |
[in] | value | The requested signal symmetry, a number between 0 and 1 . |
TIEPIE_HW_STATUS_VALUE_CLIPPED | The requested symmetry is outside the valid range and clipped to the closest limit. |
TIEPIE_HW_STATUS_VALUE_MODIFIED | The requested symmetry is within the valid range but not available. The closest valid value is set. |
TIEPIE_HW_STATUS_NOT_SUPPORTED | The generator does not support symmetry 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 |
0
and 1
.