libtiepie-hw  1.1.13

Functions for starting and stopping the generator and checking its status. More...

Collaboration diagram for Control:

Functions

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_is_controllable (tiepie_hw_handle handle)
 Check whether a specified generator can be controlled. More...
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_is_running (tiepie_hw_handle handle)
 Check whether the generator is running. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_generator_get_status (tiepie_hw_handle handle)
 Get the current signal generation status of a specified generator. More...
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_get_output_enable (tiepie_hw_handle handle)
 Check whether a specified generator is enabled. More...
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_set_output_enable (tiepie_hw_handle handle, tiepie_hw_bool value)
 Enable or disable the hardware of a specified generator. More...
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_has_output_invert (tiepie_hw_handle handle)
 Check whether the output of a specified generator can be inverted. More...
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_get_output_invert (tiepie_hw_handle handle)
 Check whether the output of a specified generator is inverted. More...
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_set_output_invert (tiepie_hw_handle handle, tiepie_hw_bool value)
 Enable or disable the output invert of a specified generator. More...
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_start (tiepie_hw_handle handle)
 Start the signal generation of a specified generator. More...
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_stop (tiepie_hw_handle handle)
 Stop the signal generation of a specified generator. More...
 

Detailed Description

Functions for starting and stopping the generator and checking its status.

In certain conditions, like when performing a streaming measurement with the oscilloscope, the generator cannot be controlled. Use tiepie_hw_generator_is_controllable() to poll if the generator can be controlled or use a notification.

Use tiepie_hw_generator_get_status() to check the signal generation status.

Before a generator can be used, the hardware must be switched on (enabled) using tiepie_hw_generator_set_output_enable(). When enabled, the generator signal properties can be set. When the generator hardware is enabled, but the generator is not started, the output will be at the currently set Offset. When the generator hardware is disabled, the hardware is switched off, resulting in the instrument using less power.

Output invert is not available for all instruments. Use tiepie_hw_generator_has_output_invert() to check whether output invert is available for your instrument.

Function Documentation

◆ tiepie_hw_generator_is_controllable()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_is_controllable ( tiepie_hw_handle  handle)

Check whether a specified generator can be controlled.

In certain conditions like when performing a streaming measurement with the oscilloscope, the generator cannot be controlled.

Parameters
[in]handleA device handle identifying the generator.
Returns
TIEPIE_HW_BOOL_TRUE if the generator is controllable, TIEPIE_HW_BOOL_FALSE otherwise.
Status values
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
See also
Notification gen_callbacks_controllable_changed.
Measure mode.
Since
1.0

◆ tiepie_hw_generator_is_running()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_is_running ( tiepie_hw_handle  handle)

Check whether the generator is running.

Parameters
[in]handleA device handle identifying the generator.
Returns
TIEPIE_HW_BOOL_TRUE if running, TIEPIE_HW_BOOL_FALSE otherwise.
Since
1.0

◆ tiepie_hw_generator_get_status()

TIEPIE_HW_API uint32_t tiepie_hw_generator_get_status ( tiepie_hw_handle  handle)

Get the current signal generation status of a specified generator.

Parameters
[in]handleA device handle identifying the generator.
Returns
The current signal generation status, a TIEPIE_HW_GS_* value or TIEPIE_HW_GSM_NONE when unsuccessful.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The generator does not support getting the status.
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
Since
1.0

◆ tiepie_hw_generator_get_output_enable()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_get_output_enable ( tiepie_hw_handle  handle)

Check whether a specified generator is enabled.

Parameters
[in]handleA device handle identifying the generator.
Returns
TIEPIE_HW_BOOL_TRUE if the generator hardware is currently enabled, TIEPIE_HW_BOOL_FALSE if the generator hardware is disabled.
Status values
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
See also
tiepie_hw_generator_set_output_enable
Since
1.0

◆ tiepie_hw_generator_set_output_enable()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_set_output_enable ( tiepie_hw_handle  handle,
tiepie_hw_bool  value 
)

Enable or disable the hardware of a specified generator.

Parameters
[in]handleA device handle identifying the generator.
[in]valueThe requested hardware state, TIEPIE_HW_BOOL_TRUE to enable the hardware, TIEPIE_HW_BOOL_FALSE to disable the hardware.
Returns
The actually set hardware state, TIEPIE_HW_BOOL_TRUE if the hardware is enabled, TIEPIE_HW_BOOL_FALSE if the hardware is disabled.
Status values
TIEPIE_HW_STATUS_NOT_CONTROLLABLE
TIEPIE_HW_STATUS_UNSUCCESSFUL
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
See also
tiepie_hw_generator_get_output_enable
Since
1.0

◆ tiepie_hw_generator_has_output_invert()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_has_output_invert ( tiepie_hw_handle  handle)

Check whether the output of a specified generator can be inverted.

Parameters
[in]handleA device handle identifying the generator.
Returns
TIEPIE_HW_BOOL_TRUE if the output can be inverted, TIEPIE_HW_BOOL_FALSE if not.
Status values
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
See also
tiepie_hw_generator_get_output_invert
tiepie_hw_generator_set_output_invert
Since
1.0

◆ tiepie_hw_generator_get_output_invert()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_get_output_invert ( tiepie_hw_handle  handle)

Check whether the output of a specified generator is inverted.

Parameters
[in]handleA device handle identifying the generator.
Returns
TIEPIE_HW_BOOL_TRUE if the output is currently inverted, TIEPIE_HW_BOOL_FALSE if the output is normal.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED
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
See also
tiepie_hw_generator_has_output_invert
tiepie_hw_generator_set_output_invert
Since
1.0

◆ tiepie_hw_generator_set_output_invert()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_set_output_invert ( tiepie_hw_handle  handle,
tiepie_hw_bool  value 
)

Enable or disable the output invert of a specified generator.

Parameters
[in]handleA device handle identifying the generator.
[in]valueThe requested output state, TIEPIE_HW_BOOL_TRUE to invert the output, TIEPIE_HW_BOOL_FALSE to disable the output invert.
Returns
The actually set output state, TIEPIE_HW_BOOL_TRUE if the output is inverted, TIEPIE_HW_BOOL_FALSE if the output is normal.
Status values
TIEPIE_HW_STATUS_NOT_CONTROLLABLE
TIEPIE_HW_STATUS_UNSUCCESSFUL
TIEPIE_HW_STATUS_NOT_SUPPORTED
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
See also
tiepie_hw_generator_has_output_invert
tiepie_hw_generator_get_output_invert
Since
1.0

◆ tiepie_hw_generator_start()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_start ( tiepie_hw_handle  handle)

Start the signal generation of a specified generator.

Parameters
[in]handleA device handle identifying the generator.
Returns
TIEPIE_HW_BOOL_TRUE if succesful, TIEPIE_HW_BOOL_FALSE if failed.
Status values
TIEPIE_HW_STATUS_NO_TRIGGER_ENABLED
TIEPIE_HW_STATUS_NOT_CONTROLLABLE
TIEPIE_HW_STATUS_UNSUCCESSFUL
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
See also
tiepie_hw_generator_stop
Since
1.0

◆ tiepie_hw_generator_stop()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_generator_stop ( tiepie_hw_handle  handle)

Stop the signal generation of a specified generator.

Parameters
[in]handleA device handle identifying the generator.
Returns
TIEPIE_HW_BOOL_TRUE if succesful, TIEPIE_HW_BOOL_FALSE if failed.
Status values
TIEPIE_HW_STATUS_NOT_CONTROLLABLE
TIEPIE_HW_STATUS_UNSUCCESSFUL
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
See also
tiepie_hw_generator_start
Since
1.0