Programmer's Guide

RaDeKL Radar API Programmer’s Guide 13
© Multispectral Solutions, Inc. 2006
RaDeKL_GetDeviceInfo
Get the device-specific information of a RaDeKL Radar associated with the handle.
Format:
ULONG RaDeKL_GetDeviceInfo (RaDeKL_HANDLE handle, RaDeKL_DEVICEINFO *info);
Parameters:
handle RaDeKL_HANDLE as returned by a call to RaDeKL_OpenRadar.
info Pointer to a RaDeKL_DEVICEINFO structure. See the appendix for field definitions
of this structure.
Return Value:
RADEKL_OK (0) if successful, a non-zero status otherwise. See RaDeKL_GetStatusText for codes.
Remarks:
RaDeKL_GetDeviceInfo should be called after RaDeKL_OpenRadar to obtain device-version-
specific information. The currently available RaDeKL units all have a resolution of 1 foot (= 2), 256
range bins (with a data range of 0 to 32), 32 DAC threshold registers (with a data range of 20 to
227). This may change in future units and the info returned by RaDeKL_GetDeviceInfo should be
used in your application instead of hard-coding these values.
Example:
List device-specific information.
ULONG status;
RaDeKL_HANDLE handle;
RaDeKL_DEVICEINFO info;
// Assume we have an open radar with a valid handle
status = RaDeKL_GetDeviceInfo (handle, &info);
// Check status . . .
// Print information
printf (“Serial number: %s\n”, info.ft_serial_number);// String
printf (“Description: %s\n”, info.ft_description); // String
printf (“Vendor ID: %4X\n”, info.ft_vendor_id); // 16-bit hex
printf (“Product ID: %4X\n”, info.ft_product_id); // 16-but hex
printf (“Resolution: %d\n”, info.resolution); // 1 = 6-inch, 2 = 1-foot
printf (“Range bins: %d\n”, info.range_bins); // Currently 256
printf (“Range bin max: %d\n”, info.range_bin_max); // Currently 32
printf (“Thresholds: %d\n”, info.thresholds); // Currently 32
printf (“Threshold min: %d\n”, info.threshold_min); // Currently 20
printf (“Threshold max: %d\n”, info.threshold_max); // Currently 227
printf (“Version: v%d.%d\n”, info.version_id_major, info.version_id_minor);