Xbee Arduino
Arduino Driver for Xbee
Loading...
Searching...
No Matches
xbee_lr.h
Go to the documentation of this file.
1
37#ifndef XBEELR_H
38#define XBEELR_H
39
40#if defined(__cplusplus)
41extern "C"
42{
43#endif
44
45#include "xbee.h"
46
47#define CONNECTION_TIMEOUT_MS 6000
48#define SEND_DATA_TIMEOUT_MS 10000
49
50// Structure for XBee LR LoRaWAN packet
51typedef struct XBeeLRPacket_s{
52 uint8_t port;
53 uint8_t payloadSize;
54 uint8_t *payload;
55 uint8_t ack;
56 uint8_t status;
57 uint8_t frameId;
58 //For RX only
59 int8_t rssi;
60 int8_t snr;
61 uint8_t dr;
62 uint32_t counter;
64
65// Subclass for XBeeLR
66typedef struct {
67 XBee base; // Inherit from XBee
68 // Add XBeeLR specific attributes here like methods specific to an XBee type
69} XBeeLR;
70
71
72XBeeLR* XBeeLRCreate(const XBeeCTable* cTable, const XBeeHTable* hTable);
73bool XBeeLRGetDevEUI(XBee* self, uint8_t* responseBuffer, uint8_t buffer_size);
74bool XBeeLRSetAppEUI(XBee* self, const char* value);
75bool XBeeLRSetAppKey(XBee* self, const char* value);
76bool XBeeLRSetNwkKey(XBee* self, const char* value);
77bool XBeeLRSetClass(XBee* self, const char value);
78bool XBeeLRSetActivationMode(XBee* self, const uint8_t value);
79bool XBeeLRSetADR(XBee* self, const uint8_t value);
80bool XBeeLRSetDataRate(XBee* self, const uint8_t value);
81bool XBeeLRSetRegion(XBee* self, const uint8_t value);
82bool XBeeLRSetDutyCycle(XBee* self, const uint8_t value);
83bool XBeeLRGetSpecVersion(XBee* self, char* responseBuffer, uint8_t buffer_size);
84bool XBeeLRSetJoinRX1Delay(XBee* self, const uint32_t value);
85bool XBeeLRSetJoinRX2Delay(XBee* self, const uint32_t value);
86bool XBeeLRSetRX1Delay(XBee* self, const uint32_t value);
87bool XBeeLRSetRX2Delay(XBee* self, const uint32_t value);
88bool XBeeLRSetRX2DataRate(XBee* self, const uint8_t value);
89bool XBeeLRSetRX2Frequency(XBee* self, const uint32_t value);
90bool XBeeLRSetTransmitPower(XBee* self, const uint8_t value);
91bool XBeeLRSetChannelsMask(XBee* self, const char* value);
92
93#if defined(__cplusplus)
94}
95#endif
96
97#endif // XBEELR_H
Definition: xbee.h:106
Definition: xbee.h:87
Definition: xbee.h:121
Definition: xbee_lr.h:66
XBee base
Definition: xbee_lr.h:67
Definition: xbee_lr.h:51
uint32_t counter
Definition: xbee_lr.h:62
uint8_t dr
Definition: xbee_lr.h:61
int8_t snr
Definition: xbee_lr.h:60
uint8_t frameId
Definition: xbee_lr.h:57
uint8_t ack
Definition: xbee_lr.h:55
uint8_t port
Definition: xbee_lr.h:52
uint8_t status
Definition: xbee_lr.h:56
uint8_t * payload
Definition: xbee_lr.h:54
uint8_t payloadSize
Definition: xbee_lr.h:53
int8_t rssi
Definition: xbee_lr.h:59
Header file for the XBee class.
bool XBeeLRSetRegion(XBee *self, const uint8_t value)
Sends the AT_LR command to set the LoRaWAN Region on the XBee LR module.
Definition: xbee_lr.c:408
bool XBeeLRSetNwkKey(XBee *self, const char *value)
Sends the AT_NK command to set the LoRaWAN NwkKey on the XBee LR module.
Definition: xbee_lr.c:299
bool XBeeLRSetADR(XBee *self, const uint8_t value)
Sends the AT_AD command to set the LoRaWAN ADR on the XBee LR module.
Definition: xbee_lr.c:364
bool XBeeLRSetDutyCycle(XBee *self, const uint8_t value)
Sends the AT_DC command to set the LoRaWAN Duty Cycle on the XBee LR module.
Definition: xbee_lr.c:430
bool XBeeLRGetDevEUI(XBee *self, uint8_t *responseBuffer, uint8_t buffer_size)
Sends the AT_DE command to read the LoRaWAN DevEUI from the XBee LR module.
Definition: xbee_lr.c:642
bool XBeeLRSetJoinRX2Delay(XBee *self, const uint32_t value)
Sends the AT_J2 command to set the LoRaWAN Join RX2 Delay on the XBee LR module.
Definition: xbee_lr.c:498
XBeeLR * XBeeLRCreate(const XBeeCTable *cTable, const XBeeHTable *hTable)
Constructor for creating an XBeeLR instance.
Definition: xbee_lr.c:825
bool XBeeLRSetChannelsMask(XBee *self, const char *value)
Sends the AT_CM command to set the LoRaWAN Channels Mask on the XBee LR module.
Definition: xbee_lr.c:673
bool XBeeLRSetAppKey(XBee *self, const char *value)
Sends the AT_AK command to set the LoRaWAN AppKey on the XBee LR module.
Definition: xbee_lr.c:274
bool XBeeLRSetRX1Delay(XBee *self, const uint32_t value)
Sends the AT_D1 command to set the LoRaWAN RX1 Delay on the XBee LR module.
Definition: xbee_lr.c:521
bool XBeeLRSetAppEUI(XBee *self, const char *value)
Sends the AT_AE command to set the LoRaWAN AppEUI on the XBee LR module.
Definition: xbee_lr.c:250
bool XBeeLRGetSpecVersion(XBee *self, char *responseBuffer, uint8_t buffer_size)
bool XBeeLRSetRX2DataRate(XBee *self, const uint8_t value)
Sends the AT_XD command to set the LoRaWAN RX2 Data Rate on the XBee LR module.
Definition: xbee_lr.c:567
bool XBeeLRSetActivationMode(XBee *self, const uint8_t value)
Sends the AT_AM command to set the LoRaWAN Activation Mode on the XBee LR module.
Definition: xbee_lr.c:342
struct XBeeLRPacket_s XBeeLRPacket_t
bool XBeeLRSetClass(XBee *self, const char value)
Sends the AT_LC command to set the LoRaWAN Class on the XBee LR module.
Definition: xbee_lr.c:324
bool XBeeLRSetJoinRX1Delay(XBee *self, const uint32_t value)
Sends the AT_J1 command to set the LoRaWAN Join RX1 Delay on the XBee LR module.
Definition: xbee_lr.c:475
bool XBeeLRSetRX2Frequency(XBee *self, const uint32_t value)
Sends the AT_XF command to set the LoRaWAN RX2 Frequency on the XBee LR module.
Definition: xbee_lr.c:590
bool XBeeLRSetRX2Delay(XBee *self, const uint32_t value)
Sends the AT_D2 command to set the LoRaWAN RX2 Delay on the XBee LR module.
Definition: xbee_lr.c:544
bool XBeeLRSetDataRate(XBee *self, const uint8_t value)
Sends the AT_DR command to set the LoRaWAN DataRate on the XBee LR module.
Definition: xbee_lr.c:386
bool XBeeLRSetTransmitPower(XBee *self, const uint8_t value)
Sends the AT_PO command to set the LoRaWAN Transmit Power on the XBee LR module.
Definition: xbee_lr.c:613