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()
command error_t getSnr()
command uint16_t readSnr()
command void setGradient(int16_t grad)
Events
event void getSnrDone(int16_t snr)
Commands - Details
getGradient
command int16_t getGradient()
- Returns:
-
The currently used gradient.
getNoiseFloor
command uint16_t getNoiseFloor()
- Returns:
-
The noisefloor in mV.
getSnr
command error_t getSnr()
- Returns:
-
SUCCESS on success
FAIL otherwise.
readSnr
command uint16_t readSnr()
setGradient
command void setGradient(int16_t grad)
- Parameters:
-
grad - This is calculated as grad = mV/dB
Events - Details
getSnrDone
event void getSnrDone(int16_t snr)
- Parameters:
-
snr - The SNR value in dB.