#include <Radio.h>
|
String | name () |
|
virtual bool | init () |
| virtual, to be overridden by each plugin More...
|
|
virtual bool | rx () |
| virtual, to be overridden by each plugin More...
|
|
virtual bool | tx () |
| virtual, to be overridden by each plugin More...
|
|
virtual bool | standby () |
| virtual, to be overridden by each plugin More...
|
|
void | radiolibInit () |
| Sets up the SPI port, inits a RadioLib Module , outputs diagnostics wrt RadioLib parameters like freq and bandwidth. More...
|
|
void | showRadiolibResult (const int result, const char *action) |
| Serial output of the command as a string and the RadioLib result value. More...
|
|
int | thresholdSetup (const int fixed, const int average, const int peak) |
| RadioLib-specific picking of one of three constants based on threshold_type setting. More...
|
|
|
static bool | add (const char *name, Radio *pointer) |
| Registers an instance of Radio, i.e. a radio plugin in the static store More...
|
|
static bool | setup () |
| Shows loaded plugins, selects the radio in setting radio and inits it. More...
|
|
static bool | select (const String &name) |
| Selects radio given a name by storing its pointer in static current More...
|
|
static String | list (String separator=", ") |
| Returns a String with alist of registered radio plugins. More...
|
|
static bool | radio_init () |
| Static, called as Radio::radio_init() , will call overridden init() in plugin. More...
|
|
static bool | radio_rx () |
| Static, called as Radio::radio_rx() , will call overridden rx() in plugin. More...
|
|
static bool | radio_tx () |
| Static, called as Radio::radio_tx() , will call overridden tx() in plugin. More...
|
|
static bool | radio_standby () |
| Static, called as Radio::radio_standby() , will call overridden standby() in plugin. More...
|
|
Definition at line 56 of file Radio.h.
◆ add()
bool Radio::add |
( |
const char * |
name, |
|
|
Radio * |
pointer |
|
) |
| |
|
static |
Registers an instance of Radio, i.e. a radio plugin in the static store
- Parameters
-
name | (char*) Name of plugin, maximum MAX_RADIO_NAME_LEN characters |
pointer | Pointer to the plugin instance |
- Returns
false
if store already holds info on MAX_RADIOS plugins
Definition at line 18 of file Radio.cpp.
◆ setup()
Shows loaded plugins, selects the radio in setting radio
and inits it.
- Returns
false
if no radio could be selected, whatever radio_init()
returned oterwise
Definition at line 33 of file Radio.cpp.
◆ select()
bool Radio::select |
( |
const String & |
name | ) |
|
|
static |
Selects radio given a name by storing its pointer in static current
- Parameters
-
name | Name of plugin t be selected |
- Returns
true
if that radio exists.
Definition at line 45 of file Radio.cpp.
◆ list()
String Radio::list |
( |
String |
separator = ", " | ) |
|
|
static |
Returns a String with alist of registered radio plugins.
- Parameters
-
separator | Between the names, e.g. ", " |
- Returns
- The list
Definition at line 60 of file Radio.cpp.
◆ radio_init()
bool Radio::radio_init |
( |
| ) |
|
|
static |
◆ radio_rx()
Static, called as Radio::radio_rx()
, will call overridden rx()
in plugin.
- Returns
- whatever plugin's
rx()
returns, or false
if no radio is selected or no pin_rx
set
Definition at line 93 of file Radio.cpp.
◆ radio_tx()
Static, called as Radio::radio_tx()
, will call overridden tx()
in plugin.
- Returns
- whatever plugin's
tx()
returns, or false
if no radio is selected or no pin_tx
set
Definition at line 106 of file Radio.cpp.
◆ radio_standby()
bool Radio::radio_standby |
( |
| ) |
|
|
static |
◆ name()
◆ init()
virtual, to be overridden by each plugin
- Returns
false
if not overridden
Definition at line 128 of file Radio.cpp.
◆ rx()
virtual, to be overridden by each plugin
- Returns
false
if not overridden
Definition at line 134 of file Radio.cpp.
◆ tx()
virtual, to be overridden by each plugin
- Returns
false
if not overridden
Definition at line 140 of file Radio.cpp.
◆ standby()
virtual, to be overridden by each plugin
- Returns
false
if not overridden
Definition at line 146 of file Radio.cpp.
◆ radiolibInit()
void Radio::radiolibInit |
( |
| ) |
|
Sets up the SPI port, inits a RadioLib Module
, outputs diagnostics wrt RadioLib parameters like freq and bandwidth.
Definition at line 153 of file Radio.cpp.
◆ showRadiolibResult()
void Radio::showRadiolibResult |
( |
const int |
result, |
|
|
const char * |
action |
|
) |
| |
Serial output of the command as a string and the RadioLib result value.
- Parameters
-
result | the numeric value from RadioLib |
action | The command that was executed as a char* |
Definition at line 193 of file Radio.cpp.
◆ thresholdSetup()
int Radio::thresholdSetup |
( |
const int |
fixed, |
|
|
const int |
average, |
|
|
const int |
peak |
|
) |
| |
RadioLib-specific picking of one of three constants based on threshold_type
setting.
- Parameters
-
fixed | constant to mean fixed threshold |
average | constant to mean average threshold |
peak | constant to mean peak threshold |
- Returns
- one of these constants, based on what's in
threshold_type
setting
Definition at line 213 of file Radio.cpp.
◆ pointer
◆ name
Returns the name of the plugin as a String.
- Returns
- Name of plugin
Definition at line 60 of file Radio.h.
◆ current
Radio * Radio::current = nullptr |
|
static |
◆ len
◆ pin_rx
◆ pin_tx
◆ radioLibModule
Module* Radio::radioLibModule |
◆ spi
◆ pin_cs
◆ frequency
◆ bandwidth
◆ bitrate
◆ threshold_type_fixed
int Radio::threshold_type_fixed |
◆ threshold_type_peak
int Radio::threshold_type_peak |
◆ threshold_type_average
int Radio::threshold_type_average |
◆ threshold_type_int
int Radio::threshold_type_int |
◆ threshold_level
int Radio::threshold_level |
The documentation for this class was generated from the following files:
- /home/runner/work/OOKwiz/OOKwiz/main/src/Radio.h
- /home/runner/work/OOKwiz/OOKwiz/main/src/Radio.cpp