A multifunctional and modular Firmware for Multitech's mDot based on ARM mBed provides a widerange of functionality for several Sensors such as MAX44009, BME280, MPU9250, SI1143 and uBlox. It allows you to quickly build a Sensornode that measures specific data with its sensors and sends it via LoRaWAN.

Dependencies:   mDot_LoRa_Sensornode_Flowmeter_impl mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

LoRa Class Reference

LoRa Class Reference

Represents the LoRa Module with all its functionality. More...

#include <LoRa.h>

Public Member Functions

void init (LORA_MODE desiredMode)
 Initializes and start the LoRa Module depending on the desireMode.
int32_t send (std::vector< uint8_t > &dataToSend)
 Sends data stored inside a vector via LoRa.
int32_t recv (std::vector< uint8_t > &receivedData)
 Receives data via LoRa and stores it inside a vector.
int16_t getLastRssi ()
 Gets the Rssi of the last sent Message.
int16_t getLastSnr ()
 DON'T USE IT RESULTS IN HARDFAULT! Gets the SNR of the last sent Message.
uint8_t getSpreadingFactor ()
 Gets the actual spreading Factor from 7 to 12 from the LoRa Module.
uint8_t getTxPowerdBm ()
 Gets the actual transmit Power in dBm from the LoRa Module.
void ping ()
 Sends a 0 Byte long ping message to the gateway.
uint32_t getNextTxMs ()
 Get ms until next free channel only applicable for European models, US models return 0.

Detailed Description

Represents the LoRa Module with all its functionality.

It wraps Multitech owns mDot Library functions. It's possible to wrap other functionality from other LoRa Module Manufactures for future use cases

Definition at line 20 of file LoRa.h.


Member Function Documentation

int16_t getLastRssi (  )

Gets the Rssi of the last sent Message.

It's important that at least 1 Acknowledgment Retries is set by setAckRetries()

Returns:

Definition at line 242 of file LoRa.cpp.

int16_t getLastSnr (  )

DON'T USE IT RESULTS IN HARDFAULT! Gets the SNR of the last sent Message.

Returns:

Definition at line 246 of file LoRa.cpp.

uint32_t getNextTxMs (  )

Get ms until next free channel only applicable for European models, US models return 0.

Definition at line 262 of file LoRa.cpp.

uint8_t getSpreadingFactor (  )

Gets the actual spreading Factor from 7 to 12 from the LoRa Module.

Returns:

Definition at line 250 of file LoRa.cpp.

uint8_t getTxPowerdBm (  )

Gets the actual transmit Power in dBm from the LoRa Module.

Returns:

Definition at line 254 of file LoRa.cpp.

void init ( LORA_MODE  desiredMode )

Initializes and start the LoRa Module depending on the desireMode.

Parameters:
desiredMode

Definition at line 22 of file LoRa.cpp.

void ping (  )

Sends a 0 Byte long ping message to the gateway.

Definition at line 258 of file LoRa.cpp.

int32_t recv ( std::vector< uint8_t > &  receivedData )

Receives data via LoRa and stores it inside a vector.

Parameters:
receivedDatathe vector where the received data needs to be stored
Returns:

Definition at line 234 of file LoRa.cpp.

int32_t send ( std::vector< uint8_t > &  dataToSend )

Sends data stored inside a vector via LoRa.

Parameters:
dataToSendthe vector that contains the Data that needs to be sent
Returns:

Definition at line 217 of file LoRa.cpp.