Programmer's Guide

RaDeKL Radar API Programmer’s Guide 22
© Multispectral Solutions, Inc. 2006
RaDeKL_SetRangeDelay
Set the RANGE and DELAY registers in the radar device. These two registers shift the return data by a
certain number of range bins. To simplify implementations, this function accepts a RangeDelay in feet and
converts it to the required register values. The default value is 0 feet.
Format:
ULONG RaDeKL_SetRangeDelay (RaDeKL_HANDLE handle,
DWORD delay_feet, DWORD *actual_delay_feet);
Parameters:
handle RaDeKL_HANDLE as returned by a call to RaDeKL_OpenRadar.
delay_feet A DWORD indicating the requested delay value in feet. Do not use a value
larger than the maximum range of the radar device.
actual_delay_feet Pointer to a DWORD to receive the actual delay set. This may be NULL, in
which case no actual delay is returned. The actual delay may differ from the
requested one, since the hardware allows delays only in certain increments (8
feet in the current model). If necessary, the requested value is rounded down
to the nearest increment.
Return Value:
RADEKL_OK (0) if successful, a non-zero status otherwise. See RaDeKL_GetStatusText for codes.
Example:
Set the RangeDelay to 32 feet.
ULONG status;
RaDeKL_HANDLE handle;
DWORD actual;
// Assume we have an open radar with a valid handle
status = RaDeKL_SetRangeDelay (handle, 32, &actual);
// Check status . . .
printf (“Range Delay set to %d feet\n”, actual);