#include <Radio.h>
|
| Radio (const char *moduleName) |
|
| Module (const char *modName) |
|
void | setModuleName (const char *modName) |
|
virtual const char * | getModuleName () |
|
virtual void | printModuleName (const char *message) |
|
virtual void | initialize ()=0 |
|
virtual void | measure ()=0 |
|
virtual void | package ()=0 |
|
virtual void | power_up ()=0 |
|
virtual void | power_down ()=0 |
|
virtual void | display_data () |
|
|
uint8_t | deviceAddress |
|
uint16_t | maxMessageLength |
|
int16_t | signalStrength |
|
uint8_t | powerLevel |
|
uint8_t | retryCount |
|
uint16_t | retryTimeout |
|
StaticJsonDocument< 300 > | recvDoc |
|
StaticJsonDocument< 300 > | sendDoc |
|
|
bool | moduleInitialized = true |
|
int | module_address = -1 |
|
Slightly abstracted Radio class to allow for all radio modules to inherit from one spot
- Author
- Will Richards
◆ Radio()
Radio::Radio |
( |
const char * |
moduleName | ) |
|
|
inline |
Construct a new Radio module
- Parameters
-
moduleName | Name of the module |
maxLength | The maximum length a packet can be |
◆ bufferToJson()
bool Radio::bufferToJson |
( |
uint8_t * |
buffer | ) |
|
|
inlineprotected |
Convert the message pack to json
◆ getAddress()
uint8_t Radio::getAddress |
( |
| ) |
const |
|
inlineprotected |
Get this device's address
◆ getSignalStrength()
int16_t Radio::getSignalStrength |
( |
| ) |
|
|
inlineprotected |
Get the current signal strength of the radio
◆ jsonToBuffer()
bool Radio::jsonToBuffer |
( |
uint8_t * |
buffer, |
|
|
JsonObjectConst |
json |
|
) |
| |
|
inlineprotected |
Convert the json to a message pack
◆ receive()
virtual bool Radio::receive |
( |
uint |
maxWaitTime | ) |
|
|
protectedpure virtual |
Receive a JSON packet from another radio, blocking until the wait time expires or a packet is received
- Parameters
-
maxWaitTime | The maximum time to wait before continuing execution (Set to 0 for non-blocking) |
Implemented in Loom_Freewave, and Loom_LoRa.
◆ send()
virtual bool Radio::send |
( |
const uint8_t |
destinationAddress | ) |
|
|
protectedpure virtual |
Send the current JSON data to the specified address
- Parameters
-
destinationAddress | The address we want to send the data to |
Implemented in Loom_Freewave, and Loom_LoRa.
The documentation for this class was generated from the following file:
- C:/Users/jwilt/AppData/Local/Arduino15/packages/loom4/hardware/samd/4.5/libraries/Loom/src/Radio/Radio.h