 |
Firmware for an ad-hoc mesh network of Internet-of-Things devices based on LoRa (Long Range radio) that can be deployed quickly and cheaply.
|
Go to the documentation of this file.
17 #include "../DuckError.h"
103 String senderId =
"", String messageId =
"",
130 void couple(
byte byteCode, String outgoing);
219 int _packetIndex = 0;
221 String _deviceId =
"";
222 int _availableBytes = 0;
224 void resetLastPacket();
const byte topic_B
Definition: DuckLora.h:24
int getRSSI()
Get the current RSSI value.
String getPacketData(int pSize)
Get the last received LoRa packet.
Internal LoRa chip abstraction.
Definition: DuckLora.h:58
int handlePacket()
Handle a Duck LoRa packet.
byte * getTransmissionBuffer()
Get the transmission buffer.
Definition: DuckLora.h:186
int sendPayloadStandard(String msg="", String topic="", String senderId="", String messageId="", String path="")
Send a message out into the LoRa mesh network.
int rst
chip reset pin
Definition: DuckLora.h:40
const byte payload_B
Definition: DuckLora.h:26
const byte path_B
Definition: DuckLora.h:28
Packet getLastPacket()
Get the last received LoRa packet.
int startReceive()
Set the Duck to be ready to recieve LoRa packets.
int ss
slave select pin
Definition: DuckLora.h:38
const byte iamhere_B
Definition: DuckLora.h:27
static DuckLora * getInstance()
Get a singletom instance of the DuckLora class,.
byte getTransmitedByte(int index)
Get the transmited byte at the given index in the transmission buffer.
Definition: DuckLora.h:194
int getPacketIndex()
Get the current packet buffer index.
Definition: DuckLora.h:179
const byte senderId_B
Definition: DuckLora.h:23
void resetPacketIndex()
Reset the index of the received Packet buffer.
Definition: DuckLora.h:172
const byte ping_B
Definition: DuckLora.h:22
Internal cluster duck LoRa message structure.
Definition: LoraPacket.h:11
int di0
dio0 interrupt pin
Definition: DuckLora.h:42
float band
radio frequency (i.e US915Mhz)
Definition: DuckLora.h:36
void resetTransmissionBuffer()
Clear and Reset the transmission buffer.
#define CDPCFG_CDP_BUFSIZE
CDP message buffer max length.
Definition: cdpcfg.h:335
bool loraPacketReceived()
Check if a received packet is available for processing.
bool idInPath(String path)
Determine if a Duck device_id is present in the path.
Internal structure to hold the LoRa module configuration.
Definition: DuckLora.h:34
int setupLoRa(LoraConfigParams config, String deviceId)
Initialize the LoRa chip.
int transmitData()
Set the Duck to be ready to transmit LoRa packets.
const byte messageId_B
Definition: DuckLora.h:25
int txPower
transmit power
Definition: DuckLora.h:46
int standBy()
Set the LoRa chip in standby mode.
void couple(byte byteCode, String outgoing)
Append a chunk to the packet.
int di1
dio1 interrupt pin
Definition: DuckLora.h:44
int ping()
Transmit a ping message.
CDP central compile-time configuration file.