Functions to retrieve information from a device.
Get the version number of the driver used by the device.
- Parameters
-
- Returns
- Driver version number, or zero if no version number is available.
- Status values
NOT_SUPPORTED | The indicated device does not support reading a driver version or does not require a driver. |
INVALID_HANDLE | The handle to the device is invalid. |
DEVICE_GONE | The device indicated by the device handle is no longer available. |
SUCCESS | The function executed successfully. |
- Example
printf( "DevGetDriverVersion = %u.%u.%u.%u\n" , wMajor , wMinor , wRelease , wBuild );
- Since
- 0.4.0
Get the version number of the firmware used by the device.
- Parameters
-
- Returns
- Firmware version number, or zero if no version number is available.
- Status values
NOT_SUPPORTED | The indicated device does not support reading a firmware version or does not require firmware. |
INVALID_HANDLE | The handle to the device is invalid. |
DEVICE_GONE | The device indicated by the device handle is no longer available. |
SUCCESS | The function executed successfully. |
- Example
printf( "DevGetFirmwareVersion = %u.%u.%u.%u\n" , wMajor , wMinor , wRelease , wBuild );
- Since
- 0.4.0
Get the calibration date of the device.
- Parameters
-
- Returns
- The calibration date of the device, or zero if no calibration date is available.
- Status values
NOT_SUPPORTED | The indicated device does not have a calibration date. |
INVALID_HANDLE | The handle to the device is invalid. |
DEVICE_GONE | The device indicated by the device handle is no longer available. |
SUCCESS | The function executed successfully. |
- Example
printf( "DevGetCalibrationDate = %u-%u-%u\n" , wYear , byMonth , byDay );
- Since
- 0.4.0
Get the serial number of the device.
- Parameters
-
- Returns
- The serial number of the device.
- Status values
NOT_SUPPORTED | The indicated device does not have a serial number. |
INVALID_HANDLE | The handle to the device is invalid. |
DEVICE_GONE | The device indicated by the device handle is no longer available. |
SUCCESS | The function executed successfully. |
- Since
- 0.4.0
Get the product id of the device.
- Parameters
-
- Returns
- The product id of the device.
- Status values
NOT_SUPPORTED | The indicated device does not support reading a product id. |
INVALID_HANDLE | The handle to the device is invalid. |
DEVICE_GONE | The device indicated by the device handle is no longer available. |
SUCCESS | The function executed successfully. |
- Since
- 0.4.0
Get the device type.
- Parameters
-
- Returns
- The device type.
- Status values
INVALID_HANDLE | The handle to the device is invalid. |
DEVICE_GONE | The device indicated by the device handle is no longer available. |
UNSUCCESSFUL | An error occurred during execution of the last called function. |
SUCCESS | The function executed successfully. |
- Since
- 0.4.0
uint32_t DevGetName |
( |
TpDeviceHandle_t |
hDevice, |
|
|
char * |
pBuffer, |
|
|
uint32_t |
dwBufferLength |
|
) |
| |
Get the full name of the device.
E.g. Handyscope HS5-530XMS
- Parameters
-
hDevice | A device handle identifying the device. |
pBuffer | A pointer to a buffer for the name. |
dwBufferLength | The length of the buffer, in bytes. |
- Returns
- The length of the name in bytes, excluding terminating zero.
- Status values
NOT_SUPPORTED | The indicated device does not support reading a name. |
INVALID_HANDLE | The handle to the device is invalid. |
DEVICE_GONE | The device indicated by the device handle is no longer available. |
SUCCESS | The function executed successfully. |
- See also
- DevGetNameShort
-
DevGetNameShortest
- Example
uint32_t dwLength =
DevGetName( hDevice , NULL , 0 ) + 1;
char* sName = malloc( sizeof( char ) * dwLength );
dwLength =
DevGetName( hDevice , sName , dwLength );
printf( "DevGetName = %s\n" , sName );
free( sName );
- Since
- 0.4.0
uint32_t DevGetNameShort |
( |
TpDeviceHandle_t |
hDevice, |
|
|
char * |
pBuffer, |
|
|
uint32_t |
dwBufferLength |
|
) |
| |
Get the short name of the device.
E.g. HS5-530XMS
- Parameters
-
hDevice | A device handle identifying the device. |
pBuffer | A pointer to a buffer for the name. |
dwBufferLength | The length of the buffer, in bytes. |
- Returns
- The length of the short name in bytes, excluding terminating zero.
- Status values
NOT_SUPPORTED | The indicated device does not support reading a name. |
INVALID_HANDLE | The handle to the device is invalid. |
DEVICE_GONE | The device indicated by the device handle is no longer available. |
SUCCESS | The function executed successfully. |
- See also
- DevGetName
-
DevGetNameShortest
- Example
char* sNameShort = malloc( sizeof( char ) * dwLength );
printf( "DevGetNameShort = %s\n" , sNameShort );
free( sNameShort );
- Since
- 0.4.0
uint32_t DevGetNameShortest |
( |
TpDeviceHandle_t |
hDevice, |
|
|
char * |
pBuffer, |
|
|
uint32_t |
dwBufferLength |
|
) |
| |
Get the short name of the device without model postfix.
E.g. HS5
- Parameters
-
hDevice | A device handle identifying the device. |
pBuffer | A pointer to a buffer for the name. |
dwBufferLength | The length of the buffer, in bytes. |
- Returns
- The length of the short name in bytes, excluding terminating zero.
- Status values
NOT_SUPPORTED | The indicated device does not support reading a name. |
INVALID_HANDLE | The handle to the device is invalid. |
DEVICE_GONE | The device indicated by the device handle is no longer available. |
SUCCESS | The function executed successfully. |
- See also
- DevGetName
-
DevGetNameShort
- Example
char* sNameShortest = malloc( sizeof( char ) * dwLength );
printf( "DevGetNameShortest = %s\n" , sNameShortest );
free( sNameShortest );
- Since
- 0.4.4