libtiepie-hw  1.1.13

Functions to control the clock output type. More...

Collaboration diagram for Output:

Functions

TIEPIE_HW_API uint32_t tiepie_hw_oscilloscope_get_clock_outputs (tiepie_hw_handle handle)
 Get the supported clock outputs of the specified oscilloscope. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_oscilloscope_get_clock_output (tiepie_hw_handle handle)
 Get the currently selected clock output of the specified oscilloscope. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_oscilloscope_set_clock_output (tiepie_hw_handle handle, uint32_t value)
 Set the clock output of the specified oscilloscope. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_oscilloscope_get_clock_output_frequencies (tiepie_hw_handle handle, double *list, uint32_t length)
 Get an array with the supported clock output frequencies of the specified oscilloscope. More...
 
TIEPIE_HW_API double tiepie_hw_oscilloscope_get_clock_output_frequency (tiepie_hw_handle handle)
 Get the current clock output frequency of the specified oscilloscope. More...
 
TIEPIE_HW_API double tiepie_hw_oscilloscope_set_clock_output_frequency (tiepie_hw_handle handle, double value)
 Set the clock output frequency of the specified oscilloscope. More...
 

Detailed Description

Functions to control the clock output type.

Oscilloscopes can support supplying a clock output signal, use tiepie_hw_oscilloscope_get_clock_outputs() to determine the available clock outputs for an oscilloscope.

When an oscilloscope supports selecting a clock output signal, refer to the instrument manual for the location of the clock output and the specifications of the clock output signal.

Depending on the instrument, a clock output can support multiple output frequencies. Use tiepie_hw_oscilloscope_get_clock_source_frequencies() to determine which frequencies are supported.

By default the clock output is disabled (TIEPIE_HW_CO_DISABLED).

Function Documentation

◆ tiepie_hw_oscilloscope_get_clock_outputs()

TIEPIE_HW_API uint32_t tiepie_hw_oscilloscope_get_clock_outputs ( tiepie_hw_handle  handle)

Get the supported clock outputs of the specified oscilloscope.

Parameters
[in]handleA device handle identifying the oscilloscope.
Returns
The supported clock outputs, a set of OR-ed TIEPIE_HW_CO_* values, or 0 when unsuccessful.
Status values
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_get_clock_output
tiepie_hw_oscilloscope_set_clock_output
tiepie_hw_oscilloscope_get_clock_output_frequencies
tiepie_hw_oscilloscope_get_clock_output_frequency
tiepie_hw_oscilloscope_set_clock_output_frequency
Since
1.0

◆ tiepie_hw_oscilloscope_get_clock_output()

TIEPIE_HW_API uint32_t tiepie_hw_oscilloscope_get_clock_output ( tiepie_hw_handle  handle)

Get the currently selected clock output of the specified oscilloscope.

Parameters
[in]handleA device handle identifying the oscilloscope.
Returns
The current clock output, a TIEPIE_HW_CO_* value, or 0 when unsuccessful.
Status values
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_get_clock_outputs
tiepie_hw_oscilloscope_set_clock_output
tiepie_hw_oscilloscope_get_clock_output_frequencies
tiepie_hw_oscilloscope_get_clock_output_frequency
tiepie_hw_oscilloscope_set_clock_output_frequency
Since
1.0

◆ tiepie_hw_oscilloscope_set_clock_output()

TIEPIE_HW_API uint32_t tiepie_hw_oscilloscope_set_clock_output ( tiepie_hw_handle  handle,
uint32_t  value 
)

Set the clock output of the specified oscilloscope.

Parameters
[in]handleA device handle identifying the oscilloscope.
[in]valueThe requested clock output, a TIEPIE_HW_CO_* value.
Returns
The actually set clock output, a TIEPIE_HW_CO_* value, or 0 when unsuccessful.
Status values
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
See also
tiepie_hw_oscilloscope_get_clock_outputs
tiepie_hw_oscilloscope_get_clock_output
tiepie_hw_oscilloscope_get_clock_output_frequencies
tiepie_hw_oscilloscope_get_clock_output_frequency
tiepie_hw_oscilloscope_set_clock_output_frequency
Since
1.0

◆ tiepie_hw_oscilloscope_get_clock_output_frequencies()

TIEPIE_HW_API uint32_t tiepie_hw_oscilloscope_get_clock_output_frequencies ( tiepie_hw_handle  handle,
double *  list,
uint32_t  length 
)

Get an array with the supported clock output frequencies of the specified oscilloscope.

The caller must assure that enough memory is allocated. This function is only available when the clock output is set to TIEPIE_HW_CO_FIXED.

Parameters
[in]handleA device handle identifying the oscilloscope.
[out]listA pointer to an array for the clock output frequencies, or NULL.
[in]lengthThe number of elements in the array.
Returns
Total number of supported clock output frequencies, or 0 when unsuccessful.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The oscilloscope does not support clock output or the clock output is not set to TIEPIE_HW_CO_FIXED.
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
Example
uint32_t length = tiepie_hw_oscilloscope_get_clock_output_frequencies(h_device, NULL, 0);
double* Frequencies = malloc(sizeof(double) * Length);
Length = tiepie_hw_oscilloscope_get_clock_output_frequencies(h_device, Frequencies, Length);
for(i = 0 ; i < Length ; i++)
{
printf("%f\n", Frequencies[ i ]);
}
free(p_frequencies);
TIEPIE_HW_API uint32_t tiepie_hw_oscilloscope_get_clock_output_frequencies(tiepie_hw_handle handle, double *list, uint32_t length)
Get an array with the supported clock output frequencies of the specified oscilloscope.
See also
tiepie_hw_oscilloscope_get_clock_outputs
tiepie_hw_oscilloscope_get_clock_output
tiepie_hw_oscilloscope_set_clock_output
tiepie_hw_oscilloscope_get_clock_output_frequency
tiepie_hw_oscilloscope_set_clock_output_frequency
Since
1.0

◆ tiepie_hw_oscilloscope_get_clock_output_frequency()

TIEPIE_HW_API double tiepie_hw_oscilloscope_get_clock_output_frequency ( tiepie_hw_handle  handle)

Get the current clock output frequency of the specified oscilloscope.

This function is only available when the clock output is set to TIEPIE_HW_CO_FIXED.

Parameters
[in]handleA device handle identifying the oscilloscope.
Returns
The current clock output frequency in Hz, or 0 when unsuccessful.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The oscilloscope does not support clock output or the clock output is not set to TIEPIE_HW_CO_FIXED.
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_get_clock_outputs
tiepie_hw_oscilloscope_get_clock_output
tiepie_hw_oscilloscope_set_clock_output
tiepie_hw_oscilloscope_get_clock_output_frequencies
tiepie_hw_oscilloscope_set_clock_output_frequency
Since
1.0

◆ tiepie_hw_oscilloscope_set_clock_output_frequency()

TIEPIE_HW_API double tiepie_hw_oscilloscope_set_clock_output_frequency ( tiepie_hw_handle  handle,
double  value 
)

Set the clock output frequency of the specified oscilloscope.

This function is only available when the clock output is set to TIEPIE_HW_CO_FIXED.

Parameters
[in]handleA device handle identifying the oscilloscope.
[in]valueThe required clock output frequency in Hz.
Returns
The actually set clock output frequency in Hz, or 0 when unsuccessful.
Status values
TIEPIE_HW_STATUS_VALUE_CLIPPED The requested clock output frequency is outside the valid range and clipped to the closest limit.
TIEPIE_HW_STATUS_VALUE_MODIFIED The requested clock output frequency is within the valid range but not available. The closest valid value is set.
TIEPIE_HW_STATUS_INVALID_VALUE
TIEPIE_HW_STATUS_NOT_SUPPORTED The oscilloscope does not support clock output or the clock output is not set to TIEPIE_HW_CO_FIXED.
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_get_clock_outputs
tiepie_hw_oscilloscope_get_clock_output
tiepie_hw_oscilloscope_set_clock_output
tiepie_hw_oscilloscope_get_clock_output_frequencies
tiepie_hw_oscilloscope_get_clock_output_frequency
Since
1.0