Loom 4 v4.5
Arduino library for Internet of Things Rapid Prototyping in environmental sensing
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
Loom_LoRa Class Reference

#include <Loom_LoRa.h>

Inheritance diagram for Loom_LoRa:
Inheritance graph
[legend]
Collaboration diagram for Loom_LoRa:
Collaboration graph
[legend]

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
 

Detailed Description

Used to communicate with LoRa type radios

Author
Will Richards

Constructor & Destructor Documentation

◆ Loom_LoRa()

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

Parameters
manReference to the manager
addressThis device's LoRa address
powerLevelTransmission power level, low to high
retryCountNumber of attempts to make before failing
retryTimeoutLength of time between retransmissions (ms)
max_message_lenThe maximum possible message length we can transmit

Member Function Documentation

◆ initialize()

void Loom_LoRa::initialize ( )
overridevirtual

Initialize the module

Implements Module.

◆ measure()

void Loom_LoRa::measure ( )
inlineoverrideprotectedvirtual

Implements Module.

◆ package()

void Loom_LoRa::package ( )
overridevirtual

Package basic data about the device

Implements Module.

◆ power_down()

void Loom_LoRa::power_down ( )
overridevirtual

Power down the module

Implements Module.

◆ power_up()

void Loom_LoRa::power_up ( )
overridevirtual

Power up the module

Implements Module.

◆ receive()

bool Loom_LoRa::receive ( uint  maxWaitTime)
overridevirtual

Receive a JSON packet from another radio, blocking until the wait time expires or a packet is received

Parameters
maxWaitTimeThe maximum time to wait before continuing execution (Set to 0 for non-blocking)

Implements Radio.

◆ send()

bool Loom_LoRa::send ( const uint8_t  destinationAddress)
overridevirtual

Send the current JSON data to the specified address

Parameters
destinationAddressThe address we want to send the data to

Implements Radio.

◆ setAddress()

void Loom_LoRa::setAddress ( const uint8_t  addr)

Set the address of the device


The documentation for this class was generated from the following files: