22
ADC-20/ADC-24 User's Guide
5.4.8
HRDLGetUnitInfo
int16_t HRDLGetUnitInfo
(
int16_t handle,
int8_t * string,
int16_t stringLength,
int16_t info
)
This function writes information about the
to a character string. If the
logger fails to open, only
info = HRDL_ERROR (7)
is available to explain why the
last open unit call failed. When retrieving the
version, the handle value is
ignored.
Arguments
handle
Handle to the device from which information is required. If an invalid
handle is passed, the error code from the last unit that failed to open
is returned (as if
info = HRDL_ERROR
), unless
info =
HRDL_DRIVER_VERSION
and then the driver version is returned.
string
Pointer to the
int8_t
string buffer in the calling function where the
unit information string (selected with
info
) will be stored. If a null
pointer is passed, no information will be written.
stringLength
Length of the
int8_t
string buffer. If the string is not long enough
to accept all of the information, only the first
stringLength
characters are returned.
info
Enumerated type (listed below) specifying what information is
required from the driver.
Returns
The length of the string written to the
int8_t
string buffer,
string,
by the function.
If one of the parameters is out of range, or a null pointer is passed for
string,
the
function will return zero.
Values of
info
Value of
info
HRDL_DRIVER_VERSION (0)
Description
The version of
picohrdl.dll
,
libpicohrdl.dylib
or
libpicohrdl.so
Example
1.0.0.1
HRDL_USB_VERSION (1)
The type of USB to which the unit is
connected
1.1
HRDL_HARDWARE_VERSION (2)
The hardware version of the HRDL
attached
1
HRDL_VARIANT_INFO (3)
HRDL BATCH AND SERIAL (4)
HRDL CAL DATE (5)
Information about the type of HRDL
attached
Batch and serial numbers of the unit
Calibration date of the unit
24
CMY02/116
09Sep05
HRDL_KERNEL_DRIVER_VERSION
(6)
Kernel driver version
Copyright © 2005–2016 Pico Technology Ltd. All rights reserved.
adc20.en r6