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_Freewave Class Reference

#include <Loom_Freewave.h>

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

Public Member Functions

 Loom_Freewave (Manager &man, const uint8_t address=-1, const uint16_t max_message_len=RH_SERIAL_MAX_MESSAGE_LEN, 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 package () override
 
void power_up () override
 
void power_down () 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_Freewave()

Loom_Freewave::Loom_Freewave ( Manager man,
const uint8_t  address = -1,
const uint16_t  max_message_len = RH_SERIAL_MAX_MESSAGE_LEN,
const uint8_t  retryCount = 3,
const uint16_t  retryTimeout = 200 
)

Construct a new LoRa driver

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

Member Function Documentation

◆ initialize()

void Loom_Freewave::initialize ( )
overridevirtual

Initialize the module

Implements Module.

◆ measure()

void Loom_Freewave::measure ( )
inlineoverrideprotectedvirtual

Implements Module.

◆ package()

void Loom_Freewave::package ( )
overridevirtual

Package basic data about the device

Implements Module.

◆ power_down()

void Loom_Freewave::power_down ( )
overridevirtual

Power down the module

Implements Module.

◆ power_up()

void Loom_Freewave::power_up ( )
overridevirtual

Power up the module

Implements Module.

◆ receive()

bool Loom_Freewave::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_Freewave::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_Freewave::setAddress ( const uint8_t  addr)

Set the address of the device


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