libtiepie-hw  1.1.6
SureConnect connection test

Functions to perform a SureConnect connection test. More...

Collaboration diagram for SureConnect connection test:

Functions

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_oscilloscope_has_sureconnect (tiepie_hw_handle handle)
 Check whether the specified oscilloscope supports SureConnect connection testing. More...
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_oscilloscope_channel_has_sureconnect (tiepie_hw_handle handle, uint16_t ch)
 Check whether a specified channel of a specified oscilloscope supports SureConnect connection testing. More...
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_oscilloscope_start_sureconnect (tiepie_hw_handle handle)
 Perform a SureConnect connection test on all enabled channels of a specified oscilloscope. More...
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_oscilloscope_is_sureconnect_completed (tiepie_hw_handle handle)
 Check whether the SureConnect connection test on a specified oscilloscope is completed. More...
 
TIEPIE_HW_API uint16_t tiepie_hw_oscilloscope_get_sureconnect_data (tiepie_hw_handle handle, tiepie_hw_tristate *buffer, uint16_t channel_count)
 Get the SureConnect connection test result data for a specified oscilloscope. More...
 

Detailed Description

Functions to perform a SureConnect connection test.

To check whether the measurement probe on a channel is electrically connected to the device under test, a connection test can be performed on instruments with SureConnect. To find out whether the connection test is ready, tiepie_hw_oscilloscope_is_sureconnect_completed() can be polled, or a notification can be used. When the connection test is ready, connection test data indicating the connection status of the input(s) can be collected using tiepie_hw_oscilloscope_get_sureconnect_data().

SureConnect connection test is not available for all instruments. Use tiepie_hw_oscilloscope_has_sureconnect() to check whether connection test is available for your instrument.

Function Documentation

◆ tiepie_hw_oscilloscope_has_sureconnect()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_oscilloscope_has_sureconnect ( tiepie_hw_handle  handle)

Check whether the specified oscilloscope supports SureConnect connection testing.

Parameters
[in]handleA device handle identifying the oscilloscope.
Returns
TIEPIE_HW_BOOL_TRUE when at least one channel supports connection testing, TIEPIE_HW_BOOL_FALSE otherwise.
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_channel_has_sureconnect
Since
1.0

◆ tiepie_hw_oscilloscope_channel_has_sureconnect()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_oscilloscope_channel_has_sureconnect ( tiepie_hw_handle  handle,
uint16_t  ch 
)

Check whether a specified channel of a specified oscilloscope supports SureConnect connection testing.

Parameters
[in]handleA device handle identifying the oscilloscope.
[in]chA channel number identifying the channel, 0 to tiepie_hw_oscilloscope_get_channel_count() - 1.
Returns
TIEPIE_HW_BOOL_TRUE if the channel supports connection test, TIEPIE_HW_BOOL_FALSE otherwise.
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_has_sureconnect
Since
1.0

◆ tiepie_hw_oscilloscope_start_sureconnect()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_oscilloscope_start_sureconnect ( tiepie_hw_handle  handle)

Perform a SureConnect connection test on all enabled channels of a specified oscilloscope.

Parameters
[in]handleA device handle identifying the oscilloscope.
Returns
TIEPIE_HW_BOOL_TRUE if started successfully, TIEPIE_HW_BOOL_FALSE otherwise.
Status values
TIEPIE_HW_STATUS_UNSUCCESSFUL No channels are enabled or a measurement is busy.
TIEPIE_HW_STATUS_NOT_SUPPORTED The oscilloscope does not support SureConnect connection test.
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_has_sureconnect
tiepie_hw_oscilloscope_channel_has_sureconnect
tiepie_hw_oscilloscope_is_sureconnect_completed
tiepie_hw_oscilloscope_get_sureconnect_data
Since
1.0

◆ tiepie_hw_oscilloscope_is_sureconnect_completed()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_oscilloscope_is_sureconnect_completed ( tiepie_hw_handle  handle)

Check whether the SureConnect connection test on a specified oscilloscope is completed.

Parameters
[in]handleA device handle identifying the oscilloscope.
Returns
TIEPIE_HW_BOOL_TRUE if completed, TIEPIE_HW_BOOL_FALSE otherwise.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The oscilloscope does not support SureConnect connection test.
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_has_sureconnect
tiepie_hw_oscilloscope_channel_has_sureconnect
tiepie_hw_oscilloscope_start_sureconnect
notification scp_callbacks_sureconnect_completed
tiepie_hw_oscilloscope_get_sureconnect_data
Since
1.0

◆ tiepie_hw_oscilloscope_get_sureconnect_data()

TIEPIE_HW_API uint16_t tiepie_hw_oscilloscope_get_sureconnect_data ( tiepie_hw_handle  handle,
tiepie_hw_tristate buffer,
uint16_t  channel_count 
)

Get the SureConnect connection test result data for a specified oscilloscope.

The test result data is presented in an array Buffer with an element for each channel. Each element contains the connection test status for a channel:

Parameters
[in]handleA device handle identifying the oscilloscope.
[out]bufferA pointer to a tiepie_hw_tristate array.
[in]channel_countThe length of the tiepie_hw_tristate array.
Returns
The number of elements written in the tiepie_hw_tristate array.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The oscilloscope does not support SureConnect connection test.
TIEPIE_HW_STATUS_INVALID_VALUE The pointer Buffer was NULL or Channel_count was 0.
TIEPIE_HW_STATUS_UNSUCCESSFUL No connection test result data available.
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
uint16_t channel_count = tiepie_hw_oscilloscope_get_channel_count(h_device);
tiepie_hw_tristate* Connections = malloc(sizeof(tiepie_hw_tristate) * Channel_count);
tiepie_hw_oscilloscope_get_sureconnect_data(h_device, Connections, Channel_count);
printf("scp_get_sureconnect_data ():\n");
for(uint16_t i = 0 ; i < Channel_count ; i++)
switch(p_connections)
{
printf("- Ch%u Undefined\n", i + 1);
break;
printf("- Ch%u Not connected\n", i + 1);
break;
printf("- Ch%u Connected\n", i + 1);
break;
default:
printf("- Ch%u Invalid value\n", i + 1);
break;
}
free(p_connections);
#define TIEPIE_HW_TRISTATE_FALSE
False.
Definition: libtiepie-hw.h:847
#define TIEPIE_HW_TRISTATE_UNDEFINED
Undefined.
Definition: libtiepie-hw.h:846
#define TIEPIE_HW_TRISTATE_TRUE
True.
Definition: libtiepie-hw.h:848
TIEPIE_HW_API uint16_t tiepie_hw_oscilloscope_get_channel_count(tiepie_hw_handle handle)
Get the number of channels.
TIEPIE_HW_API uint16_t tiepie_hw_oscilloscope_get_sureconnect_data(tiepie_hw_handle handle, tiepie_hw_tristate *buffer, uint16_t channel_count)
Get the SureConnect connection test result data for a specified oscilloscope.
uint8_t tiepie_hw_tristate
TriState value one byte wide.
Definition: libtiepie-hw.h:1834
See also
tiepie_hw_oscilloscope_has_sureconnect
tiepie_hw_oscilloscope_channel_has_sureconnect
tiepie_hw_oscilloscope_start_sureconnect
tiepie_hw_oscilloscope_is_sureconnect_completed
Since
1.0