Programmer's Guide

RaDeKL Radar API Programmer’s Guide 34
© Multispectral Solutions, Inc. 2006
RaDeKL_ReadRegister
Note: This is a low-level function and should only be used if you are familiar with the RaDeKL
Radar registers and their layouts. Normal operation of the RaDeKL Radar should require only the
use of the high-level functions described above.
Read a sequence of one or more RaDeKL Radar registers.
Format:
ULONG RaDeKL_ReadRegister (RaDeKL_HANDLE handle, WORD addr,
BYTE count, BYTE *values);
Parameters:
handle RaDeKL_HANDLE as returned by a call to RaDeKL_OpenRadar.
addr 16-bit address of the register to modify. See the appendix for register definitions.
count 8-bit count of successive registers to read.
values Pointer to an BYTE-array to receive the values of the requested register(s).
Return Value:
RADEKL_OK (0) if successful, a non-zero status otherwise. See RaDeKL_GetStatusText for codes.
Example:
Read and print the value stored in register REGISTER_ID_VERS (0)
ULONG status;
RaDeKL_HANDLE handle;
BYTE version;
// Assume we have an open radar with a valid handle
status = RaDeKL_ReadRegister (handle, REGISTER_ID_VERS, 1, &version);
// Check status . . .
printf (“The version register contains %02X (major = %d, minor = %d)\n”,
version, version >> 4, version & 0xF);