[PHY] Added virtual channel scan method
This commit is contained in:
parent
68c5edd7c2
commit
532caaa089
2 changed files with 12 additions and 0 deletions
|
@ -289,6 +289,10 @@ float PhysicalLayer::getSNR() {
|
|||
return(RADIOLIB_ERR_UNSUPPORTED);
|
||||
}
|
||||
|
||||
int16_t PhysicalLayer::scanChannel() {
|
||||
return(RADIOLIB_ERR_UNSUPPORTED);
|
||||
}
|
||||
|
||||
int32_t PhysicalLayer::random(int32_t max) {
|
||||
if(max == 0) {
|
||||
return(0);
|
||||
|
|
|
@ -302,6 +302,14 @@ class PhysicalLayer {
|
|||
*/
|
||||
virtual float getSNR();
|
||||
|
||||
/*!
|
||||
\brief Check whether the current communication channel is free or occupied. Performs CAD for LoRa modules,
|
||||
or RSSI measurement for FSK modules.
|
||||
\returns RADIOLIB_CHANNEL_FREE when channel is free,
|
||||
RADIOLIB_PREAMBLE_DETECTEDwhen occupied or other \ref status_codes.
|
||||
*/
|
||||
virtual int16_t scanChannel();
|
||||
|
||||
/*!
|
||||
\brief Get truly random number in range 0 - max.
|
||||
\param max The maximum value of the random number (non-inclusive).
|
||||
|
|
Loading…
Add table
Reference in a new issue