Programmer's Guide

RaDeKL Radar API Programmer’s Guide 19
© Multispectral Solutions, Inc. 2006
RaDeKL_GetTransmitAttenuation
Get the TRANSMIT POWER ATTENUATION register value from the radar device.
NOTE: Transmit attenuation settings can currently be in the range from 0 to 63, but the actual
range of permissible settings should be obtained by calling RaDeKL_GetDeviceInfo and using
tx_atten_min and tx_atten_max, as these might change with future versions of the radar unit.
Format:
ULONG RaDeKL_GetTransmitAttenuation (RaDeKL_HANDLE handle, BYTE *attenuation);
Parameters:
handle RaDeKL_HANDLE as returned by a call to RaDeKL_OpenRadar.
attenuation Pointer to a BYTE to receive the attenuation value. Possible attenuation values are
in the range from 0 to 63. Reference values are:
Value Attenuation
63 0 dB (default)
57 -3 dB
51 -6 dB
43 -10 dB
The attenuation (in dB) or the register value are calculated as:
attenuation_dB = (register_value – 63) / 2
and
register_value = (2 * attenuation_dB) + 63
Note: attenuations are usually negative values! Attenuation_dB in the above
calculations must therefore be a negative number.
Return Value:
RADEKL_OK (0) if successful, a non-zero status otherwise. See RaDeKL_GetStatusText for codes.
Example:
Read the TRANSMIT ATTENUATION register and display its value.
ULONG status;
RaDeKL_HANDLE handle;
BYTE attenuation;
// Assume we have an open radar with a valid handle
status = RaDeKL_GetTransmitAttenuation (handle, &attenuation);
// Check status . . .
printf (“The TRANSMIT ATTENUATION is currently set to %d\n”, attenuation);