Programmer's Guide

RaDeKL Radar API Programmer’s Guide 18
© Multispectral Solutions, Inc. 2006
RaDeKL_SetTransmitAttenuation
Set the TRANSMIT POWER ATTENUATION register in 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_SetTransmitAttenuation (RaDeKL_HANDLE handle, BYTE attenuation);
Parameters:
handle RaDeKL_HANDLE as returned by a call to RaDeKL_OpenRadar.
attenuation A BYTE indicating the attenuation to be set. Permissible 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:
Set the TRANSMIT ATTENUATION register to a value of 33 (-10 dB).
ULONG status;
RaDeKL_HANDLE handle;
// Assume we have an open radar with a valid handle
status = RaDeKL_SetTransmitAttenuation (handle, 33);
// Check status . . .