Loom 4 v4.5
Arduino library for Internet of Things Rapid Prototyping in environmental sensing
|
#include <Loom_LoRa.h>
Public Member Functions | |
Loom_LoRa (Manager &man, const int address=-1, const uint8_t powerLevel=23, const uint8_t retryCount=3, const uint16_t retryTimeout=200) | |
bool | receive (uint maxWaitTime) override |
bool | send (const uint8_t destinationAddress) override |
void | initialize () override |
void | power_up () override |
void | power_down () override |
void | package () override |
void | setAddress (const uint8_t addr) |
Public Member Functions inherited from Radio | |
Radio (const char *moduleName) | |
Public Member Functions inherited from Module | |
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 () |
Protected Member Functions | |
void | measure () override |
Protected Member Functions inherited from Radio | |
uint8_t | getAddress () const |
int16_t | getSignalStrength () |
virtual bool | receive (uint maxWaitTime)=0 |
virtual bool | send (const uint8_t destinationAddress)=0 |
bool | bufferToJson (uint8_t *buffer) |
bool | jsonToBuffer (uint8_t *buffer, JsonObjectConst json) |
Additional Inherited Members | |
Public Attributes inherited from Module | |
bool | moduleInitialized = true |
int | module_address = -1 |
Protected Attributes inherited from Radio | |
uint8_t | deviceAddress |
uint16_t | maxMessageLength |
int16_t | signalStrength |
uint8_t | powerLevel |
uint8_t | retryCount |
uint16_t | retryTimeout |
StaticJsonDocument< 300 > | recvDoc |
StaticJsonDocument< 300 > | sendDoc |
Used to communicate with LoRa type radios
Loom_LoRa::Loom_LoRa | ( | Manager & | man, |
const int | address = -1 , |
||
const uint8_t | powerLevel = 23 , |
||
const uint8_t | retryCount = 3 , |
||
const uint16_t | retryTimeout = 200 |
||
) |
Construct a new LoRa driver
man | Reference to the manager |
address | This device's LoRa address |
powerLevel | Transmission power level, low to high |
retryCount | Number of attempts to make before failing |
retryTimeout | Length of time between retransmissions (ms) |
max_message_len | The maximum possible message length we can transmit |
|
overridevirtual |
Initialize the module
Implements Module.
|
inlineoverrideprotectedvirtual |
Implements Module.
|
overridevirtual |
Package basic data about the device
Implements Module.
|
overridevirtual |
Power down the module
Implements Module.
|
overridevirtual |
Power up the module
Implements Module.
|
overridevirtual |
Receive a JSON packet from another radio, blocking until the wait time expires or a packet is received
maxWaitTime | The maximum time to wait before continuing execution (Set to 0 for non-blocking) |
Implements Radio.
|
overridevirtual |
Send the current JSON data to the specified address
destinationAddress | The address we want to send the data to |
Implements Radio.
void Loom_LoRa::setAddress | ( | const uint8_t | addr | ) |
Set the address of the device