libtiepie-hw  1.1.13

Functions to control the symmetry of a demo signal. More...

Collaboration diagram for Symmetry:

Functions

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_oscilloscope_channel_demo_has_symmetry (tiepie_hw_handle handle, uint16_t ch)
 Check whether the currently selected demo signal type supports setting the symmetry. More...
 
TIEPIE_HW_API double tiepie_hw_oscilloscope_channel_demo_get_symmetry (tiepie_hw_handle handle, uint16_t ch)
 Get the currently selected demo signal symmetry of a specified demo oscilloscope channel. More...
 
TIEPIE_HW_API double tiepie_hw_oscilloscope_channel_demo_set_symmetry (tiepie_hw_handle handle, uint16_t ch, double value)
 Set the demo signal symmetry of a specified demo oscilloscope channel. More...
 

Detailed Description

Functions to control the symmetry of a demo signal.

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 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).

Several of the demo signal types support setting the signal symmetry, but others don't. Use tiepie_hw_oscilloscope_channel_demo_has_symmetry() to find out whether the selected demo signal type supports setting the symmetry.

By default the symmetry is set to: 0.5 (50%).

Function Documentation

◆ tiepie_hw_oscilloscope_channel_demo_has_symmetry()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_oscilloscope_channel_demo_has_symmetry ( tiepie_hw_handle  handle,
uint16_t  ch 
)

Check whether the currently selected demo signal type supports setting the symmetry.

Parameters
[in]handleA device handle identifying the oscilloscope.
[in]chThe channel number identifying the channel, 0 to tiepie_hw_oscilloscope_get_channel_count() - 1.
Returns
TIEPIE_HW_BOOL_TRUE if setting the symmetry is supported, TIEPIE_HW_BOOL_FALSE if not.
Status values
TIEPIE_HW_STATUS_INVALID_CHANNEL
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
See also
tiepie_hw_oscilloscope_channel_demo_get_symmetry
tiepie_hw_oscilloscope_channel_demo_set_symmetry
Since
1.0

◆ tiepie_hw_oscilloscope_channel_demo_get_symmetry()

TIEPIE_HW_API double tiepie_hw_oscilloscope_channel_demo_get_symmetry ( tiepie_hw_handle  handle,
uint16_t  ch 
)

Get the currently selected demo signal symmetry of a specified demo oscilloscope channel.

Parameters
[in]handleA device handle identifying the oscilloscope.
[in]chThe channel number identifying the channel, 0 to tiepie_hw_oscilloscope_get_channel_count() - 1.
Returns
The currently set demo signal symmetry, a number between 0 and 1.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The currently selected demo signal type does not support getting the demo signal symmetry.
TIEPIE_HW_STATUS_INVALID_CHANNEL
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
See also
tiepie_hw_oscilloscope_channel_demo_has_symmetry
tiepie_hw_oscilloscope_channel_demo_set_symmetry
Since
1.0

◆ tiepie_hw_oscilloscope_channel_demo_set_symmetry()

TIEPIE_HW_API double tiepie_hw_oscilloscope_channel_demo_set_symmetry ( tiepie_hw_handle  handle,
uint16_t  ch,
double  value 
)

Set the demo signal symmetry of a specified demo oscilloscope channel.

Parameters
[in]handleA device handle identifying the oscilloscope.
[in]chThe channel number identifying the channel, 0 to tiepie_hw_oscilloscope_get_channel_count() - 1.
[in]valueThe requested demo signal symmetry, a number between 0 and 1.
Returns
The actually set symmetry.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The currently selected demo signal type does not support setting the demo signal symmetry.
TIEPIE_HW_STATUS_INVALID_VALUE The requested signal symmetry is not valid.
TIEPIE_HW_STATUS_INVALID_CHANNEL
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
See also
tiepie_hw_oscilloscope_channel_demo_has_symmetry
tiepie_hw_oscilloscope_channel_demo_get_symmetry
Since
1.0