libtiepie-hw  1.1.13
Listed devices

Functions to retrieve information from the listed devices. More...

Collaboration diagram for Listed devices:

Modules

 Combined devices
 Functions to retrieve information from the individual devices in combined devices.
 

Functions

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_devicelistitem_is_demo (tiepie_hw_handle handle)
 Check whether the listed device is a demo device. More...
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_devicelistitem_can_open (tiepie_hw_handle handle, uint32_t device_type)
 Check whether the listed device can be opened. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_opened_by (tiepie_hw_handle handle, uint32_t device_type, char *buffer, uint32_t length)
 See who is using the device. More...
 
TIEPIE_HW_API tiepie_hw_productid tiepie_hw_devicelistitem_get_product_id (tiepie_hw_handle handle)
 Get the product id of the listed device. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_get_name (tiepie_hw_handle handle, char *buffer, uint32_t length)
 Get the full name of the listed device. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_get_name_short (tiepie_hw_handle handle, char *buffer, uint32_t length)
 Get the short name of the listed device. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_get_name_shortest (tiepie_hw_handle handle, char *buffer, uint32_t length)
 Get the short name of the listed device wihout model postfix. More...
 
TIEPIE_HW_API tiepie_hw_date tiepie_hw_devicelistitem_get_calibration_date (tiepie_hw_handle handle)
 Get the calibration date of the listed device. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_get_serial_number (tiepie_hw_handle handle)
 Get the serial number of the listed device. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_get_ip_address (tiepie_hw_handle handle, char *buffer, uint32_t length)
 Get the IP address of the listed device. More...
 
TIEPIE_HW_API uint16_t tiepie_hw_devicelistitem_get_ip_port (tiepie_hw_handle handle)
 Get the IP port number of the listed device. More...
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_devicelistitem_has_server (tiepie_hw_handle handle)
 Check whether the listed device is connected to a server. More...
 
TIEPIE_HW_API tiepie_hw_handle tiepie_hw_devicelistitem_get_server (tiepie_hw_handle handle)
 Get the server handle of the server the listed device is connected to. More...
 
TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_get_types (tiepie_hw_handle handle)
 Get the device types of the listed device. More...
 

Detailed Description

Functions to retrieve information from the listed devices.

Before opening a device, device specific information can be retrieved. This information can help opening the required device, when multiple devices are available in the list.

Function Documentation

◆ tiepie_hw_devicelistitem_is_demo()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_devicelistitem_is_demo ( tiepie_hw_handle  handle)

Check whether the listed device is a demo device.

Parameters
[in]handleA handle identifying the object.
Returns
TIEPIE_HW_BOOL_TRUE if the device is a demo device or TIEPIE_HW_BOOL_FALSE if not.
Status values
TIEPIE_HW_STATUS_INVALID_VALUE The value of id_kind is invalid.
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
Since
1.0

◆ tiepie_hw_devicelistitem_can_open()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_devicelistitem_can_open ( tiepie_hw_handle  handle,
uint32_t  device_type 
)

Check whether the listed device can be opened.

Parameters
[in]handleA handle identifying the object.
[in]device_typeA device type.
Returns
TIEPIE_HW_BOOL_TRUE if the device can be opened or TIEPIE_HW_BOOL_FALSE if not.
Status values
TIEPIE_HW_STATUS_INITIALIZATION_FAILED
TIEPIE_HW_STATUS_INVALID_EEPROM
TIEPIE_HW_STATUS_INVALID_FIRMWARE
TIEPIE_HW_STATUS_INVALID_DEVICE_TYPE
TIEPIE_HW_STATUS_INVALID_VALUE The value of Id_kind is invalid.
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
Since
1.0

◆ tiepie_hw_devicelistitem_opened_by()

TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_opened_by ( tiepie_hw_handle  handle,
uint32_t  device_type,
char *  buffer,
uint32_t  length 
)

See who is using the device.

Parameters
[in]handleA handle identifying the object.
[in]device_typeA device type.
[out]bufferA pointer to a buffer for the status.
[in]lengthThe length of the buffer, in bytes.
Returns
The length of the string in bytes, excluding terminating zero.
Status values
TIEPIE_HW_STATUS_INVALID_DEVICE_TYPE
TIEPIE_HW_STATUS_INVALID_VALUE The value of Id_kind is invalid.
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_INVALID_HANDLE
TIEPIE_HW_STATUS_SUCCESS
Since
1.0

◆ tiepie_hw_devicelistitem_get_product_id()

TIEPIE_HW_API tiepie_hw_productid tiepie_hw_devicelistitem_get_product_id ( tiepie_hw_handle  handle)

Get the product id of the listed device.

Parameters
[in]handleA handle identifying the object.
Returns
The tiepie_hw_productid "product id" of the listed device.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The indicated device does not support reading a product id.
TIEPIE_HW_STATUS_INVALID_VALUE The value of Id_kind is invalid.
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
Since
1.0

◆ tiepie_hw_devicelistitem_get_name()

TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_get_name ( tiepie_hw_handle  handle,
char *  buffer,
uint32_t  length 
)

Get the full name of the listed device.

E.g. Handyscope HS5-530XMS

Parameters
[in]handleA handle identifying the object.
[out]bufferA pointer to a buffer for the name.
[in]lengthThe length of the buffer, in bytes.
Returns
The length of the name in bytes, excluding terminating zero.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The indicated device does not support reading a name.
TIEPIE_HW_STATUS_INVALID_VALUE The value of Id_kind is invalid.
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
See also
tiepie_hw_devicelistitem_get_name_short
tiepie_hw_devicelistitem_get_name_shortest
Example
uint32_t length = tiepie_hw_devicelistitem_get_name(handle, NULL, 0) + 1; // Add one for the terminating zero
char* s_name = malloc(sizeof(char) * length);
length = tiepie_hw_devicelistitem_get_name(handle, s_name, length);
printf("tiepie_hw_devicelistitem_get_name = %s\n", s_name);
free(s_name);
TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_get_name(tiepie_hw_handle handle, char *buffer, uint32_t length)
Get the full name of the listed device.
Since
1.0

◆ tiepie_hw_devicelistitem_get_name_short()

TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_get_name_short ( tiepie_hw_handle  handle,
char *  buffer,
uint32_t  length 
)

Get the short name of the listed device.

E.g. HS5-530XMS

Parameters
[in]handleA handle identifying the object.
[out]bufferA pointer to a buffer for the name.
[in]lengthThe length of the buffer, in bytes.
Returns
The length of the name in bytes, excluding terminating zero.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The indicated device does not support reading a name.
TIEPIE_HW_STATUS_INVALID_VALUE The value of Id_kind is invalid.
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
See also
tiepie_hw_devicelistitem_get_name
tiepie_hw_devicelistitem_get_name_shortest
Example
uint32_t length = tiepie_hw_devicelistitem_get_name_short(handle, NULL, 0) + 1; // Add one for the terminating zero
char* s_name_short = malloc(sizeof(char) * Length);
Length = tiepie_hw_devicelistitem_get_name_short(handle, s_name_short, Length);
printf("Lst_devget_name_short = %s\n", s_name_short);
free(s_name_short);
TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_get_name_short(tiepie_hw_handle handle, char *buffer, uint32_t length)
Get the short name of the listed device.
Since
1.0

◆ tiepie_hw_devicelistitem_get_name_shortest()

TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_get_name_shortest ( tiepie_hw_handle  handle,
char *  buffer,
uint32_t  length 
)

Get the short name of the listed device wihout model postfix.

E.g. HS5

Parameters
[in]handleA handle identifying the object.
[out]bufferA pointer to a buffer for the name.
[in]lengthThe length of the buffer, in bytes.
Returns
The length of the name in bytes, excluding terminating zero.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The indicated device does not support reading a name.
TIEPIE_HW_STATUS_INVALID_VALUE The value of Id_kind is invalid.
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
See also
tiepie_hw_devicelistitem_get_name
tiepie_hw_devicelistitem_get_name_short
Example
uint32_t length = tiepie_hw_devicelistitem_get_name_shortest(handle, NULL, 0) + 1; // Add one for the terminating zero
char* s_name_shortest = malloc(sizeof(char) * Length);
Length = tiepie_hw_devicelistitem_get_name_shortest(handle, s_name_shortest, Length);
printf("Lst_devget_name_shortest = %s\n", s_name_shortest);
free(s_name_shortest);
TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_get_name_shortest(tiepie_hw_handle handle, char *buffer, uint32_t length)
Get the short name of the listed device wihout model postfix.
Since
1.0

◆ tiepie_hw_devicelistitem_get_calibration_date()

TIEPIE_HW_API tiepie_hw_date tiepie_hw_devicelistitem_get_calibration_date ( tiepie_hw_handle  handle)

Get the calibration date of the listed device.

Parameters
[in]handleA handle identifying the object.
Returns
The calibration date of the listed device, or zero if no calibration date is available.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The indicated device does not have a calibration date.
TIEPIE_HW_STATUS_INVALID_VALUE The value of Id_kind is invalid.
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
Example
printf("tiepie_hw_devicelistitem_get_calibration_date = %u-%u-%u\n", date.year, date.month, date.day);
TIEPIE_HW_API tiepie_hw_date tiepie_hw_devicelistitem_get_calibration_date(tiepie_hw_handle handle)
Get the calibration date of the listed device.
Definition: libtiepie-hw.h:1848
uint8_t day
Definition: libtiepie-hw.h:1851
uint16_t year
Definition: libtiepie-hw.h:1849
uint8_t month
Definition: libtiepie-hw.h:1850
Since
1.0

◆ tiepie_hw_devicelistitem_get_serial_number()

TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_get_serial_number ( tiepie_hw_handle  handle)

Get the serial number of the listed device.

Parameters
[in]handleA handle identifying the object.
Returns
The serial number of the listed device.
Status values
TIEPIE_HW_STATUS_INITIALIZATION_FAILED
TIEPIE_HW_STATUS_INVALID_EEPROM
TIEPIE_HW_STATUS_INVALID_FIRMWARE
TIEPIE_HW_STATUS_NOT_SUPPORTED The indicated device does not support reading a serial number.
TIEPIE_HW_STATUS_INVALID_VALUE The value of Id_kind is invalid.
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
Since
1.0

◆ tiepie_hw_devicelistitem_get_ip_address()

TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_get_ip_address ( tiepie_hw_handle  handle,
char *  buffer,
uint32_t  length 
)

Get the IP address of the listed device.

Parameters
[in]handleA handle identifying the object.
[out]bufferA pointer to a buffer for the IP address.
[in]lengthThe length of the buffer, in bytes.
Returns
The length of the IP address in bytes, excluding terminating zero.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The indicated device is not a network device.
TIEPIE_HW_STATUS_INVALID_VALUE The value of Id_kind is invalid.
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
Since
1.0

◆ tiepie_hw_devicelistitem_get_ip_port()

TIEPIE_HW_API uint16_t tiepie_hw_devicelistitem_get_ip_port ( tiepie_hw_handle  handle)

Get the IP port number of the listed device.

Parameters
[in]handleA handle identifying the object.
Returns
The IP port number of the listed device.
Status values
TIEPIE_HW_STATUS_NOT_SUPPORTED The indicated device is not a network device.
TIEPIE_HW_STATUS_INVALID_VALUE The value of Id_kind is invalid.
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
Since
1.0

◆ tiepie_hw_devicelistitem_has_server()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_devicelistitem_has_server ( tiepie_hw_handle  handle)

Check whether the listed device is connected to a server.

Parameters
[in]handleA handle identifying the object.
Returns
TIEPIE_HW_BOOL_TRUE if the device isconnected to a server, TIEPIE_HW_BOOL_FALSE otherwise.
Since
1.0

◆ tiepie_hw_devicelistitem_get_server()

TIEPIE_HW_API tiepie_hw_handle tiepie_hw_devicelistitem_get_server ( tiepie_hw_handle  handle)

Get the server handle of the server the listed device is connected to.

Parameters
[in]handleA handle identifying the object.
Returns
A server handle, or TIEPIE_HW_STATUS_INVALID_HANDLE on error.
Since
1.0

◆ tiepie_hw_devicelistitem_get_types()

TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_get_types ( tiepie_hw_handle  handle)

Get the device types of the listed device.

Parameters
[in]handleA handle identifying the object.
Returns
OR-ed mask of device types.
Status values
TIEPIE_HW_STATUS_INITIALIZATION_FAILED
TIEPIE_HW_STATUS_INVALID_EEPROM
TIEPIE_HW_STATUS_INVALID_FIRMWARE
TIEPIE_HW_STATUS_INVALID_VALUE The value of Id_kind is invalid.
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED
TIEPIE_HW_STATUS_SUCCESS
Example
uint32_t device_types = tiepie_hw_devicelistitem_get_types(handle);
// Test all device types:
printf("DEVICETYPE_OSCILLOSCOPE\n");
printf("DEVICETYPE_GENERATOR\n");
#define TIEPIE_HW_DEVICETYPE_GENERATOR
Generator.
Definition: libtiepie-hw.h:790
#define TIEPIE_HW_DEVICETYPE_OSCILLOSCOPE
Oscilloscope.
Definition: libtiepie-hw.h:789
TIEPIE_HW_API uint32_t tiepie_hw_devicelistitem_get_types(tiepie_hw_handle handle)
Get the device types of the listed device.
Since
1.0