Programmer's Guide
RaDeKL Radar API Programmer’s Guide 36
© Multispectral Solutions, Inc. 2006
RaDeKL_ReceiveResponse
Note: This is a low-level function and should only be used if you are familiar with the RaDeKL
Radar I/O features. Normal operation of the RaDeKL Radar should require only the use of the high-
level functions described above.
Receive a response from the radar by reading a specified number of bytes. There are two types of
responses, returned register values and a set of range bins resulting from a detection request. They are in
the form:
Returned register values (<number of registers requested> + 3 bytes):
<addr-hi><addr-lo><data-1>...<data-n><0xFF>
Range bins from detection (<number of range bins> + 4 bytes [currently 260 bytes]):
<0xEA><0xEA><0xEA><bin-1>…<bin-256><0xFF>
Where: <addr-hi> is the high byte of the 16-bit register address.
<addr-lo> is the low byte of the 16-bit register address.
(See the appendix for register definitions)
<data-n> is a series of 8-bit register values (returned register values only).
<bin-n> is an 8-bit value from the [n]th range bin (detection only).
RaDeKL_ReceiveResponse returns the entire response, including the possible prefix (0xEA) and the
terminator (0xFF).
Format:
ULONG RaDeKL_ReceiveResponse (RaDeKL_HANDLE handle, BYTE *response,
DWORD bytes_requested, DWORD *bytes_received);
Parameters:
handle RaDeKL_HANDLE as returned by a call to RaDeKL_OpenRadar.
response Pointer to a BYTE array to receive the data returned.
bytes_requested DWORD containing the number of bytes to read.
bytes_received Pointer to a DWORD to receive the number of bytes read.
Return Value:
RADEKL_OK (0) if successful, a non-zero status otherwise. See RaDeKL_GetStatusText for codes.