Interface: tos.lib.byte_radio.ChannelMonitorData

interface ChannelMonitorData

This interface is used by byte radio CCA components based on RSSI valid detection with a floating threshold. It provides commands and events to read the Signal to Noise Ratio (SNR) and noisefloor of the radio channel.

See:
ChannelMonitor
ChannelMonitorControl
Author:
Kevin Klues (klues@tkn.tu-berlin.de)
Andreas Koepke (koepke@tkn.tu-berlin.de)

Commands
command int16_t getGradient() Returns the currently used gradient to convert between dB and mV.
command uint16_t getNoiseFloor() Get the noisefloor in mV.
command error_t getSnr() Starts the SNR measurement
command uint16_t readSnr() try to be lucky: read anything stored as the rssi and make a crude and fast conversion to an snr value
command void setGradient(int16_t grad) Sets the gradient for the conversion of mV and dB.

Events
event void getSnrDone(int16_t snr) Returns the SNR value in dB.

Commands - Details

getGradient

command int16_t getGradient()

Returns the currently used gradient to convert between dB and mV.

Returns:
The currently used gradient.

getNoiseFloor

command uint16_t getNoiseFloor()

Get the noisefloor in mV.

Returns:
The noisefloor in mV.

getSnr

command error_t getSnr()

Starts the SNR measurement

Returns:
SUCCESS on success FAIL otherwise.

readSnr

command uint16_t readSnr()

try to be lucky: read anything stored as the rssi and make a crude and fast conversion to an snr value

setGradient

command void setGradient(int16_t grad)

Sets the gradient for the conversion of mV and dB.

Parameters:
grad - This is calculated as grad = mV/dB

Events - Details

getSnrDone

event void getSnrDone(int16_t snr)

Returns the SNR value in dB.

Parameters:
snr - The SNR value in dB.