this is the working code for the xdot to read in serial from the pi and send it over LoRa
mDot.h@10:1e831990a669, 2017-07-27 (annotated)
- Committer:
- Jenkins@KEILDM1.dc.multitech.prv
- Date:
- Thu Jul 27 10:31:05 2017 -0500
- Revision:
- 10:1e831990a669
- Parent:
- 2:4569491293d7
- Child:
- 14:f0c24ce93427
mdot-library revision 3.0.0 and mbed-os revision mbed-os-5.4.7
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1 | // TODO: add license header |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 2 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 3 | #ifndef MDOT_H |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 4 | #define MDOT_H |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 5 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 6 | #include "mbed.h" |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 7 | #include "rtos.h" |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 8 | #include "Mote.h" |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 9 | #include <vector> |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 10 | #include <map> |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 11 | #include <string> |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 12 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 13 | class mDotEvent; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 14 | class LoRaConfig; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 15 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 16 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 17 | class mDot { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 18 | friend class mDotEvent; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 19 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 20 | private: |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 21 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 22 | mDot(lora::ChannelPlan* plan); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 23 | ~mDot(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 24 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 25 | void initLora(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 26 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 27 | void setLastError(const std::string& str); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 28 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 29 | static bool validateBaudRate(const uint32_t& baud); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 30 | static bool validateFrequencySubBand(const uint8_t& band); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 31 | bool validateDataRate(const uint8_t& dr); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 32 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 33 | int32_t joinBase(const uint32_t& retries); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 34 | int32_t sendBase(const std::vector<uint8_t>& data, const bool& confirmed = false, const bool& blocking = true, const bool& highBw = false); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 35 | void waitForPacket(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 36 | void waitForLinkCheck(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 37 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 38 | void setActivityLedState(const uint8_t& state); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 39 | uint8_t getActivityLedState(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 40 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 41 | void blinkActivityLed(void) { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 42 | if (_activity_led) { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 43 | int val = _activity_led->read(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 44 | _activity_led->write(!val); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 45 | } |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 46 | } |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 47 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 48 | mDot(const mDot&); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 49 | mDot& operator=(const mDot&); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 50 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 51 | uint32_t RTC_ReadBackupRegister(uint32_t RTC_BKP_DR); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 52 | void RTC_WriteBackupRegister(uint32_t RTC_BKP_DR, uint32_t Data); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 53 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 54 | void wakeup(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 55 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 56 | void enterStopMode(const uint32_t& interval, const uint8_t& wakeup_mode = RTC_ALARM); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 57 | void enterStandbyMode(const uint32_t& interval, const uint8_t& wakeup_mode = RTC_ALARM); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 58 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 59 | static mDot* _instance; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 60 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 61 | lora::Mote* _mote; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 62 | LoRaConfig* _config; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 63 | lora::Settings _settings; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 64 | mDotEvent* _events; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 65 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 66 | std::string _last_error; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 67 | static const uint32_t _baud_rates[]; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 68 | uint8_t _activity_led_state; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 69 | Ticker _tick; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 70 | DigitalOut* _activity_led; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 71 | bool _activity_led_enable; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 72 | PinName _activity_led_pin; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 73 | bool _activity_led_external; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 74 | uint8_t _linkFailCount; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 75 | uint8_t _class; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 76 | InterruptIn* _wakeup; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 77 | PinName _wakeup_pin; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 78 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 79 | typedef enum { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 80 | OFF, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 81 | ON, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 82 | BLINK, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 83 | } state; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 84 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 85 | public: |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 86 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 87 | #if defined(TARGET_MTS_MDOT_F411RE) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 88 | typedef enum { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 89 | FM_APPEND = (1 << 0), |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 90 | FM_TRUNC = (1 << 1), |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 91 | FM_CREAT = (1 << 2), |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 92 | FM_RDONLY = (1 << 3), |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 93 | FM_WRONLY = (1 << 4), |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 94 | FM_RDWR = (FM_RDONLY | FM_WRONLY), |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 95 | FM_DIRECT = (1 << 5) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 96 | } FileMode; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 97 | #endif /* TARGET_MTS_MDOT_F411RE */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 98 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 99 | typedef enum { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 100 | MDOT_OK = 0, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 101 | MDOT_INVALID_PARAM = -1, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 102 | MDOT_TX_ERROR = -2, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 103 | MDOT_RX_ERROR = -3, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 104 | MDOT_JOIN_ERROR = -4, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 105 | MDOT_TIMEOUT = -5, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 106 | MDOT_NOT_JOINED = -6, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 107 | MDOT_ENCRYPTION_DISABLED = -7, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 108 | MDOT_NO_FREE_CHAN = -8, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 109 | MDOT_TEST_MODE = -9, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 110 | MDOT_NO_ENABLED_CHAN = -10, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 111 | MDOT_AGGREGATED_DUTY_CYCLE = -11, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 112 | MDOT_MAX_PAYLOAD_EXCEEDED = -12, |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 113 | MDOT_LBT_CHANNEL_BUSY = -13, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 114 | MDOT_ERROR = -1024, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 115 | } mdot_ret_code; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 116 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 117 | enum JoinMode { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 118 | MANUAL = 0, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 119 | OTA, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 120 | AUTO_OTA, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 121 | PEER_TO_PEER |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 122 | }; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 123 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 124 | enum Mode { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 125 | COMMAND_MODE, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 126 | SERIAL_MODE |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 127 | }; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 128 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 129 | enum RX_Output { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 130 | HEXADECIMAL, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 131 | BINARY |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 132 | }; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 133 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 134 | enum DataRates { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 135 | DR0, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 136 | DR1, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 137 | DR2, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 138 | DR3, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 139 | DR4, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 140 | DR5, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 141 | DR6, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 142 | DR7, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 143 | DR8, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 144 | DR9, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 145 | DR10, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 146 | DR11, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 147 | DR12, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 148 | DR13, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 149 | DR14, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 150 | DR15, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 151 | SF_12 = 16, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 152 | SF_11, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 153 | SF_10, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 154 | SF_9, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 155 | SF_8, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 156 | SF_7, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 157 | SF_7H, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 158 | SF_FSK |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 159 | }; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 160 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 161 | enum FrequencySubBands { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 162 | FSB_ALL, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 163 | FSB_1, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 164 | FSB_2, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 165 | FSB_3, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 166 | FSB_4, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 167 | FSB_5, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 168 | FSB_6, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 169 | FSB_7, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 170 | FSB_8 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 171 | }; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 172 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 173 | enum JoinByteOrder { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 174 | LSB, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 175 | MSB |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 176 | }; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 177 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 178 | enum wakeup_mode { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 179 | RTC_ALARM, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 180 | INTERRUPT, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 181 | RTC_ALARM_OR_INTERRUPT |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 182 | }; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 183 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 184 | enum UserBackupRegs { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 185 | UBR0, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 186 | UBR1, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 187 | UBR2, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 188 | UBR3, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 189 | UBR4, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 190 | UBR5, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 191 | UBR6, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 192 | UBR7, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 193 | UBR8, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 194 | UBR9 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 195 | #if defined (TARGET_XDOT_L151CC) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 196 | ,UBR10, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 197 | UBR11, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 198 | UBR12, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 199 | UBR13, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 200 | UBR14, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 201 | UBR15, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 202 | UBR16, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 203 | UBR17, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 204 | UBR18, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 205 | UBR19, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 206 | UBR20, |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 207 | UBR21 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 208 | #endif /* TARGET_XDOT_L151CC */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 209 | }; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 210 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 211 | #if defined(TARGET_MTS_MDOT_F411RE) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 212 | typedef struct { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 213 | int16_t fd; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 214 | char name[33]; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 215 | uint32_t size; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 216 | } mdot_file; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 217 | #endif /* TARGET_MTS_MDOT_F411RE */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 218 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 219 | typedef struct { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 220 | uint32_t Up; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 221 | uint32_t Down; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 222 | uint32_t Joins; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 223 | uint32_t JoinFails; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 224 | uint32_t MissedAcks; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 225 | uint32_t CRCErrors; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 226 | } mdot_stats; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 227 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 228 | typedef struct { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 229 | int16_t last; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 230 | int16_t min; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 231 | int16_t max; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 232 | int16_t avg; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 233 | } rssi_stats; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 234 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 235 | typedef struct { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 236 | int16_t last; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 237 | int16_t min; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 238 | int16_t max; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 239 | int16_t avg; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 240 | } snr_stats; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 241 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 242 | typedef struct { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 243 | bool status; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 244 | int32_t dBm; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 245 | uint32_t gateways; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 246 | std::vector<uint8_t> payload; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 247 | } link_check; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 248 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 249 | typedef struct { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 250 | int32_t status; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 251 | int16_t rssi; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 252 | int16_t snr; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 253 | } ping_response; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 254 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 255 | static const uint8_t MaxLengths_915[]; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 256 | static const uint8_t MaxLengths_868[]; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 257 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 258 | static std::string JoinModeStr(uint8_t mode); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 259 | static std::string ModeStr(uint8_t mode); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 260 | static std::string RxOutputStr(uint8_t format); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 261 | static std::string DataRateStr(uint8_t rate); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 262 | static std::string FrequencyBandStr(uint8_t band); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 263 | static std::string FrequencySubBandStr(uint8_t band); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 264 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 265 | #if defined(TARGET_MTS_MDOT_F411RE) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 266 | uint32_t UserRegisters[10]; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 267 | #else |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 268 | uint32_t UserRegisters[22]; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 269 | #endif /* TARGET_MTS_MDOT_F411RE */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 270 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 271 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 272 | * Get a handle to the singleton object |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 273 | * @param plan the channel plan to use |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 274 | * @returns pointer to mDot object |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 275 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 276 | static mDot* getInstance(lora::ChannelPlan* plan); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 277 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 278 | void setEvents(mDotEvent* events); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 279 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 280 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 281 | * |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 282 | * Get library version information |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 283 | * @returns string containing library version information |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 284 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 285 | std::string getId(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 286 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 287 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 288 | * Get MTS LoRa version information |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 289 | * @returns string containing MTS LoRa version information |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 290 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 291 | std::string getMtsLoraId(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 292 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 293 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 294 | * Perform a soft reset of the system |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 295 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 296 | void resetCpu(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 297 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 298 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 299 | * Reset config to factory default |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 300 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 301 | void resetConfig(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 302 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 303 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 304 | * Save config data to non volatile memory |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 305 | * @returns true if success, false if failure |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 306 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 307 | bool saveConfig(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 308 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 309 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 310 | * Set the log level for the library |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 311 | * options are: |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 312 | * NONE_LEVEL - logging is off at this level |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 313 | * FATAL_LEVEL - only critical errors will be reported |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 314 | * ERROR_LEVEL |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 315 | * WARNING_LEVEL |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 316 | * INFO_LEVEL |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 317 | * DEBUG_LEVEL |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 318 | * TRACE_LEVEL - every detail will be reported |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 319 | * @param level the level to log at |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 320 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 321 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 322 | int32_t setLogLevel(const uint8_t& level); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 323 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 324 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 325 | * Get the current log level for the library |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 326 | * @returns current log level |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 327 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 328 | uint8_t getLogLevel(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 329 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 330 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 331 | * Seed pseudo RNG in LoRaMac layer, uses random value from radio RSSI reading by default |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 332 | * @param seed for RNG |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 333 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 334 | void seedRandom(uint32_t seed); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 335 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 336 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 337 | uint8_t setChannelPlan(lora::ChannelPlan* plan); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 338 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 339 | lora::Settings* getSettings(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 340 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 341 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 342 | * Enable or disable the activity LED. |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 343 | * @param enable true to enable the LED, false to disable |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 344 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 345 | void setActivityLedEnable(const bool& enable); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 346 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 347 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 348 | * Find out if the activity LED is enabled |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 349 | * @returns true if activity LED is enabled, false if disabled |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 350 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 351 | bool getActivityLedEnable(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 352 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 353 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 354 | * Use a different pin for the activity LED. |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 355 | * The default is XBEE_RSSI. |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 356 | * @param pin the new pin to use |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 357 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 358 | void setActivityLedPin(const PinName& pin); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 359 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 360 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 361 | * Use an external DigitalOut object for the activity LED. |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 362 | * The pointer must stay valid! |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 363 | * @param pin the DigitalOut object to use |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 364 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 365 | void setActivityLedPin(DigitalOut* pin); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 366 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 367 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 368 | * Find out what pin the activity LED is on |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 369 | * @returns the pin the activity LED is using |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 370 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 371 | PinName getActivityLedPin(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 372 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 373 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 374 | * Returns boolean indicative of start-up from standby mode |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 375 | * @returns true if dot woke from standby |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 376 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 377 | bool getStandbyFlag(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 378 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 379 | std::vector<uint16_t> getChannelMask(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 380 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 381 | int32_t setChannelMask(uint8_t offset, uint16_t mask); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 382 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 383 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 384 | * Add a channel |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 385 | * @returns MDOT_OK |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 386 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 387 | int32_t addChannel(uint8_t index, uint32_t frequency, uint8_t datarateRange); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 388 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 389 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 390 | * Add a downlink channel |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 391 | * @returns MDOT_OK |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 392 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 393 | int32_t addDownlinkChannel(uint8_t index, uint32_t frequency); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 394 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 395 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 396 | * Get list of channel frequencies currently in use |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 397 | * @returns vector of channels currently in use |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 398 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 399 | std::vector<uint32_t> getChannels(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 400 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 401 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 402 | * Get list of downlink channel frequencies currently in use |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 403 | * @returns vector of channels currently in use |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 404 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 405 | std::vector<uint32_t> getDownlinkChannels(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 406 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 407 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 408 | * Get list of channel datarate ranges currently in use |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 409 | * @returns vector of datarate ranges currently in use |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 410 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 411 | std::vector<uint8_t> getChannelRanges(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 412 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 413 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 414 | * Get list of channel frequencies in config file to be used as session defaults |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 415 | * @returns vector of channels in config file |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 416 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 417 | std::vector<uint32_t> getConfigChannels(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 418 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 419 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 420 | * Get list of channel datarate ranges in config file to be used as session defaults |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 421 | * @returns vector of datarate ranges in config file |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 422 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 423 | std::vector<uint8_t> getConfigChannelRanges(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 424 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 425 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 426 | * Get default frequency band |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 427 | * @returns frequency band the device was manufactured for |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 428 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 429 | uint8_t getDefaultFrequencyBand(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 430 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 431 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 432 | * Set frequency sub band |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 433 | * only applicable if frequency band is set for United States (FB_915) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 434 | * sub band 0 will allow the radio to use all 64 channels |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 435 | * sub band 1 - 8 will allow the radio to use the 8 channels in that sub band |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 436 | * for use with Conduit gateway and MTAC_LORA, use sub bands 1 - 8, not sub band 0 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 437 | * @param band the sub band to use (0 - 8) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 438 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 439 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 440 | int32_t setFrequencySubBand(const uint8_t& band); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 441 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 442 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 443 | * Get frequency sub band |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 444 | * @returns frequency sub band currently in use |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 445 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 446 | uint8_t getFrequencySubBand(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 447 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 448 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 449 | * Get frequency band |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 450 | * @returns frequency band (channel plan) currently in use |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 451 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 452 | uint8_t getFrequencyBand(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 453 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 454 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 455 | * Get channel plan name |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 456 | * @returns name of channel plan currently in use |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 457 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 458 | std::string getChannelPlanName(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 459 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 460 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 461 | * Get the datarate currently in use within the MAC layer |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 462 | * returns 0-15 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 463 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 464 | uint8_t getSessionDataRate(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 465 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 466 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 467 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 468 | * Get the current max EIRP used in the channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 469 | * May be changed by the network server |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 470 | * returns 0-36 |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 471 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 472 | uint8_t getSessionMaxEIRP(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 473 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 474 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 475 | * Set the current max EIRP used in the channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 476 | * May be changed by the network server |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 477 | * accepts 0-36 |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 478 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 479 | void setSessionMaxEIRP(uint8_t max); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 480 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 481 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 482 | * Get the current downlink dwell time used in the channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 483 | * May be changed by the network server |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 484 | * returns 0-1 |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 485 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 486 | uint8_t getSessionDownlinkDwelltime(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 487 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 488 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 489 | * Set the current downlink dwell time used in the channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 490 | * May be changed by the network server |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 491 | * accepts 0-1 |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 492 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 493 | void setSessionDownlinkDwelltime(uint8_t dwell); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 494 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 495 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 496 | * Get the current uplink dwell time used in the channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 497 | * May be changed by the network server |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 498 | * returns 0-1 |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 499 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 500 | uint8_t getSessionUplinkDwelltime(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 501 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 502 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 503 | * Set the current uplink dwell time used in the channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 504 | * May be changed by the network server |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 505 | * accepts 0-1 |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 506 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 507 | void setSessionUplinkDwelltime(uint8_t dwell); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 508 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 509 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 510 | * Set the current downlink dwell time used in the channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 511 | * May be changed by the network server |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 512 | * accepts 0-1 |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 513 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 514 | uint32_t getListenBeforeTalkTime(uint8_t ms); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 515 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 516 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 517 | * Set the current downlink dwell time used in the channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 518 | * May be changed by the network server |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 519 | * accepts 0-1 |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 520 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 521 | void setListenBeforeTalkTime(uint32_t ms); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 522 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 523 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 524 | * Enable/disable public network mode |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 525 | * JoinDelay will be set to (public: 5s, private: 1s) and |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 526 | * RxDelay will be set to 1s both can be adjusted afterwards |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 527 | * @param on should be true to enable public network mode |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 528 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 529 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 530 | int32_t setPublicNetwork(const bool& on); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 531 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 532 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 533 | * Get public network mode |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 534 | * @returns true if public network mode is enabled |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 535 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 536 | bool getPublicNetwork(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 537 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 538 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 539 | * Get the device ID |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 540 | * @returns vector containing the device ID (size 8) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 541 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 542 | std::vector<uint8_t> getDeviceId(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 543 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 544 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 545 | * Get the device port to be used for lora application data (1-223) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 546 | * @returns port |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 547 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 548 | uint8_t getAppPort(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 549 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 550 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 551 | * Set the device port to be used for lora application data (1-223) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 552 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 553 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 554 | int32_t setAppPort(uint8_t port); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 555 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 556 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 557 | * Set the device class A, B or C |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 558 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 559 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 560 | int32_t setClass(std::string newClass); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 561 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 562 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 563 | * Get the device class A, B or C |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 564 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 565 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 566 | std::string getClass(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 567 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 568 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 569 | * Get the max packet length with current settings |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 570 | * @returns max packet length |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 571 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 572 | uint8_t getMaxPacketLength(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 573 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 574 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 575 | * Set network address |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 576 | * for use with MANUAL network join mode, will be assigned in OTA & AUTO_OTA modes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 577 | * @param addr a vector of 4 bytes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 578 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 579 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 580 | int32_t setNetworkAddress(const std::vector<uint8_t>& addr); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 581 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 582 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 583 | * Get network address |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 584 | * @returns vector containing network address (size 4) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 585 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 586 | std::vector<uint8_t> getNetworkAddress(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 587 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 588 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 589 | * Set network session key |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 590 | * for use with MANUAL network join mode, will be assigned in OTA & AUTO_OTA modes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 591 | * @param key a vector of 16 bytes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 592 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 593 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 594 | int32_t setNetworkSessionKey(const std::vector<uint8_t>& key); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 595 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 596 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 597 | * Get network session key |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 598 | * @returns vector containing network session key (size 16) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 599 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 600 | std::vector<uint8_t> getNetworkSessionKey(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 601 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 602 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 603 | * Set data session key |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 604 | * for use with MANUAL network join mode, will be assigned in OTA & AUTO_OTA modes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 605 | * @param key a vector of 16 bytes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 606 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 607 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 608 | int32_t setDataSessionKey(const std::vector<uint8_t>& key); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 609 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 610 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 611 | * Get data session key |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 612 | * @returns vector containing data session key (size 16) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 613 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 614 | std::vector<uint8_t> getDataSessionKey(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 615 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 616 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 617 | * Set network name |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 618 | * for use with OTA & AUTO_OTA network join modes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 619 | * generates network ID (crc64 of name) automatically |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 620 | * @param name a string of of at least 8 bytes and no more than 128 bytes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 621 | * @return MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 622 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 623 | int32_t setNetworkName(const std::string& name); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 624 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 625 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 626 | * Get network name |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 627 | * @return string containing network name (size 8 to 128) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 628 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 629 | std::string getNetworkName(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 630 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 631 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 632 | * Set network ID |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 633 | * for use with OTA & AUTO_OTA network join modes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 634 | * setting network ID via this function sets network name to empty |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 635 | * @param id a vector of 8 bytes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 636 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 637 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 638 | int32_t setNetworkId(const std::vector<uint8_t>& id); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 639 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 640 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 641 | * Get network ID |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 642 | * @returns vector containing network ID (size 8) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 643 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 644 | std::vector<uint8_t> getNetworkId(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 645 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 646 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 647 | * Set network passphrase |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 648 | * for use with OTA & AUTO_OTA network join modes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 649 | * generates network key (cmac of passphrase) automatically |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 650 | * @param name a string of of at least 8 bytes and no more than 128 bytes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 651 | * @return MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 652 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 653 | int32_t setNetworkPassphrase(const std::string& passphrase); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 654 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 655 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 656 | * Get network passphrase |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 657 | * @return string containing network passphrase (size 8 to 128) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 658 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 659 | std::string getNetworkPassphrase(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 660 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 661 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 662 | * Set network key |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 663 | * for use with OTA & AUTO_OTA network join modes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 664 | * setting network key via this function sets network passphrase to empty |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 665 | * @param id a vector of 16 bytes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 666 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 667 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 668 | int32_t setNetworkKey(const std::vector<uint8_t>& id); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 669 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 670 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 671 | * Get network key |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 672 | * @returns a vector containing network key (size 16) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 673 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 674 | std::vector<uint8_t> getNetworkKey(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 675 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 676 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 677 | * Set lorawan application EUI |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 678 | * equivalent to setNetworkId |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 679 | * @param eui application EUI (size 8) |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 680 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 681 | int32_t setAppEUI(const uint8_t* eui); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 682 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 683 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 684 | * Get lorawan application EUI |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 685 | * equivalent to getNetworkId |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 686 | * @returns vector containing application EUI (size 8) |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 687 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 688 | const uint8_t* getAppEUI(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 689 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 690 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 691 | * Set lorawan application key |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 692 | * equivalent to setNetworkKey |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 693 | * @param eui application key (size 16) |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 694 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 695 | int32_t setAppKey(const uint8_t* key); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 696 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 697 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 698 | * Set lorawan application key |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 699 | * equivalent to getNetworkKey |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 700 | * @returns eui application key (size 16) |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 701 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 702 | const uint8_t* getAppKey(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 703 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 704 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 705 | * Set join byte order |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 706 | * @param order 0:LSB 1:MSB |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 707 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 708 | uint32_t setJoinByteOrder(uint8_t order); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 709 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 710 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 711 | * Get join byte order |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 712 | * @returns byte order to use in joins 0:LSB 1:MSB |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 713 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 714 | uint8_t getJoinByteOrder(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 715 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 716 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 717 | * Attempt to join network |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 718 | * each attempt will be made with a random datarate up to the configured datarate |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 719 | * JoinRequest backoff between tries is enforced to 1% for 1st hour, 0.1% for 1-10 hours and 0.01% after 10 hours |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 720 | * Check getNextTxMs() for time until next join attempt can be made |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 721 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 722 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 723 | int32_t joinNetwork(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 724 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 725 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 726 | * Attempts to join network once |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 727 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 728 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 729 | int32_t joinNetworkOnce(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 730 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 731 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 732 | * Resets current network session, essentially disconnecting from the network |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 733 | * has no effect for MANUAL network join mode |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 734 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 735 | void resetNetworkSession(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 736 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 737 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 738 | * Restore saved network session from flash |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 739 | * has no effect for MANUAL network join mode |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 740 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 741 | void restoreNetworkSession(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 742 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 743 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 744 | * Save current network session to flash |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 745 | * has no effect for MANUAL network join mode |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 746 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 747 | void saveNetworkSession(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 748 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 749 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 750 | * Set number of times joining will retry each sub-band before changing |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 751 | * to the next subband in US915 and AU915 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 752 | * @param retries must be between 0 - 255 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 753 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 754 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 755 | int32_t setJoinRetries(const uint8_t& retries); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 756 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 757 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 758 | * Get number of times joining will retry each sub-band |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 759 | * @returns join retries (0 - 255) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 760 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 761 | uint8_t getJoinRetries(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 762 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 763 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 764 | * Set network join mode |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 765 | * MANUAL: set network address and session keys manually |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 766 | * OTA: User sets network name and passphrase, then attempts to join |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 767 | * AUTO_OTA: same as OTA, but network sessions can be saved and restored |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 768 | * @param mode MANUAL, OTA, or AUTO_OTA |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 769 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 770 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 771 | int32_t setJoinMode(const uint8_t& mode); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 772 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 773 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 774 | * Get network join mode |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 775 | * @returns MANUAL, OTA, or AUTO_OTA |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 776 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 777 | uint8_t getJoinMode(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 778 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 779 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 780 | * Get network join status |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 781 | * @returns true if currently joined to network |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 782 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 783 | bool getNetworkJoinStatus(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 784 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 785 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 786 | * Do a network link check |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 787 | * application data may be returned in response to a network link check command |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 788 | * @returns link_check structure containing success, dBm above noise floor, gateways in range, and packet payload |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 789 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 790 | link_check networkLinkCheck(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 791 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 792 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 793 | * Set network link check count to perform automatic link checks every count packets |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 794 | * only applicable if ACKs are disabled |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 795 | * @param count must be between 0 - 255 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 796 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 797 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 798 | int32_t setLinkCheckCount(const uint8_t& count); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 799 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 800 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 801 | * Get network link check count |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 802 | * @returns count (0 - 255) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 803 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 804 | uint8_t getLinkCheckCount(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 805 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 806 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 807 | * Set network link check threshold, number of link check failures or missed acks to tolerate |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 808 | * before considering network connection lost |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 809 | * @pararm count must be between 0 - 255 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 810 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 811 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 812 | int32_t setLinkCheckThreshold(const uint8_t& count); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 813 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 814 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 815 | * Get network link check threshold |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 816 | * @returns threshold (0 - 255) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 817 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 818 | uint8_t getLinkCheckThreshold(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 819 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 820 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 821 | * Get/set number of failed link checks in the current session |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 822 | * @returns count (0 - 255) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 823 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 824 | uint8_t getLinkFailCount(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 825 | int32_t setLinkFailCount(uint8_t count); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 826 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 827 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 828 | * Set UpLinkCounter number of packets sent to the gateway during this network session (sequence number) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 829 | * @returns MDOT_OK |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 830 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 831 | int32_t setUpLinkCounter(uint32_t count); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 832 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 833 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 834 | * Get UpLinkCounter |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 835 | * @returns number of packets sent to the gateway during this network session (sequence number) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 836 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 837 | uint32_t getUpLinkCounter(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 838 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 839 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 840 | * Set UpLinkCounter number of packets sent by the gateway during this network session (sequence number) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 841 | * @returns MDOT_OK |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 842 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 843 | int32_t setDownLinkCounter(uint32_t count); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 844 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 845 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 846 | * Get DownLinkCounter |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 847 | * @returns number of packets sent by the gateway during this network session (sequence number) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 848 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 849 | uint32_t getDownLinkCounter(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 850 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 851 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 852 | * Enable/disable AES encryption |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 853 | * AES encryption must be enabled for use with Conduit gateway and MTAC_LORA card |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 854 | * @param on true for AES encryption to be enabled |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 855 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 856 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 857 | int32_t setAesEncryption(const bool& on); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 858 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 859 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 860 | * Get AES encryption |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 861 | * @returns true if AES encryption is enabled |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 862 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 863 | bool getAesEncryption(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 864 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 865 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 866 | * Get RSSI stats |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 867 | * @returns rssi_stats struct containing last, min, max, and avg RSSI in dB |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 868 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 869 | rssi_stats getRssiStats(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 870 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 871 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 872 | * Get SNR stats |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 873 | * @returns snr_stats struct containing last, min, max, and avg SNR in cB |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 874 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 875 | snr_stats getSnrStats(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 876 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 877 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 878 | * Get ms until next free channel |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 879 | * only applicable for European models, US models return 0 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 880 | * @returns time (ms) until a channel is free to use for transmitting |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 881 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 882 | uint32_t getNextTxMs(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 883 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 884 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 885 | * Get join delay in seconds |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 886 | * Public network defaults to 5 seconds |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 887 | * Private network defaults to 1 second |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 888 | * @returns number of seconds before join accept message is expected |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 889 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 890 | uint8_t getJoinDelay(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 891 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 892 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 893 | * Set join delay in seconds |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 894 | * Public network defaults to 5 seconds |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 895 | * Private network defaults to 1 second |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 896 | * @param delay number of seconds before join accept message is expected |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 897 | * @return MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 898 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 899 | uint32_t setJoinDelay(uint8_t delay); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 900 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 901 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 902 | * Get join Rx1 datarate offset |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 903 | * defaults to 0 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 904 | * @returns offset |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 905 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 906 | uint8_t getJoinRx1DataRateOffset(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 907 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 908 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 909 | * Set join Rx1 datarate offset |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 910 | * @param offset for datarate |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 911 | * @return MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 912 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 913 | uint32_t setJoinRx1DataRateOffset(uint8_t offset); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 914 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 915 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 916 | * Get join Rx2 datarate |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 917 | * defaults to US:DR8, AU:DR8, EU:DR0 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 918 | * @returns datarate |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 919 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 920 | uint8_t getJoinRx2DataRate(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 921 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 922 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 923 | * Set join Rx2 datarate |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 924 | * @param datarate |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 925 | * @return MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 926 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 927 | uint32_t setJoinRx2DataRate(uint8_t datarate); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 928 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 929 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 930 | * Get join Rx2 frequency |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 931 | * defaults US:923.3, AU:923.3, EU:869.525 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 932 | * @returns frequency |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 933 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 934 | uint32_t getJoinRx2Frequency(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 935 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 936 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 937 | * Set join Rx2 frequency |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 938 | * @param frequency |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 939 | * @return MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 940 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 941 | uint32_t setJoinRx2Frequency(uint32_t frequency); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 942 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 943 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 944 | * Get rx delay in seconds |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 945 | * Defaults to 1 second |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 946 | * @returns number of seconds before response message is expected |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 947 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 948 | uint8_t getRxDelay(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 949 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 950 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 951 | * Set rx delay in seconds |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 952 | * Defaults to 1 second |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 953 | * @param delay number of seconds before response message is expected |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 954 | * @return MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 955 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 956 | uint32_t setRxDelay(uint8_t delay); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 957 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 958 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 959 | * Get preserve session to save network session info through reset or power down in AUTO_OTA mode |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 960 | * Defaults to off |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 961 | * @returns true if enabled |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 962 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 963 | bool getPreserveSession(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 964 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 965 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 966 | * Set preserve session to save network session info through reset or power down in AUTO_OTA mode |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 967 | * Defaults to off |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 968 | * @param enable |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 969 | * @return MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 970 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 971 | uint32_t setPreserveSession(bool enable); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 972 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 973 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 974 | * Get data pending |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 975 | * only valid after sending data to the gateway |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 976 | * @returns true if server has available packet(s) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 977 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 978 | bool getDataPending(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 979 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 980 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 981 | * Get ack requested |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 982 | * only valid after sending data to the gateway |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 983 | * @returns true if server has requested ack |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 984 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 985 | bool getAckRequested(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 986 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 987 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 988 | * Get is transmitting indicator |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 989 | * @returns true if currently transmitting |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 990 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 991 | bool getIsTransmitting(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 992 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 993 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 994 | * Get is idle indicator |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 995 | * @returns true if not currently transmitting, waiting or receiving |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 996 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 997 | bool getIsIdle(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 998 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 999 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1000 | * Set TX data rate |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1001 | * data rates affect maximum payload size |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1002 | * @param dr SF_7 - SF_12|DR0-DR7 for Europe, SF_7 - SF_10 | DR0-DR4 for United States |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1003 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1004 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1005 | int32_t setTxDataRate(const uint8_t& dr); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1006 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1007 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1008 | * Get TX data rate |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1009 | * @returns current TX data rate (DR0-DR15) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1010 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1011 | uint8_t getTxDataRate(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1012 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1013 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1014 | * Get a random value from the radio based on RSSI |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1015 | * @returns randome value |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1016 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1017 | uint32_t getRadioRandom(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1018 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1019 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1020 | * Get data rate spreading factor and bandwidth |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1021 | * EU868 Datarates |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1022 | * --------------- |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1023 | * DR0 - SF12BW125 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1024 | * DR1 - SF11BW125 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1025 | * DR2 - SF10BW125 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1026 | * DR3 - SF9BW125 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1027 | * DR4 - SF8BW125 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1028 | * DR5 - SF7BW125 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1029 | * DR6 - SF7BW250 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1030 | * DR7 - FSK |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1031 | * |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1032 | * US915 Datarates |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1033 | * --------------- |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1034 | * DR0 - SF10BW125 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1035 | * DR1 - SF9BW125 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1036 | * DR2 - SF8BW125 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1037 | * DR3 - SF7BW125 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1038 | * DR4 - SF8BW500 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1039 | * |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1040 | * AU915 Datarates |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1041 | * --------------- |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1042 | * DR0 - SF10BW125 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1043 | * DR1 - SF9BW125 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1044 | * DR2 - SF8BW125 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1045 | * DR3 - SF7BW125 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1046 | * DR4 - SF8BW500 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1047 | * |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1048 | * @returns spreading factor and bandwidth |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1049 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1050 | std::string getDataRateDetails(uint8_t rate); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1051 | std::string getDateRateDetails(uint8_t rate); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1052 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1053 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1054 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1055 | * Set TX power output of radio before antenna gain, default: 14 dBm |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1056 | * actual output power may be limited by local regulations for the chosen frequency |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1057 | * power affects maximum range |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1058 | * @param power 2 dBm - 20 dBm |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1059 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1060 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1061 | int32_t setTxPower(const uint32_t& power); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1062 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1063 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1064 | * Get TX power |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1065 | * @returns TX power (2 dBm - 20 dBm) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1066 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1067 | uint32_t getTxPower(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1068 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1069 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1070 | * Get configured gain of installed antenna, default: +3 dBi |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1071 | * @returns gain of antenna in dBi |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1072 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1073 | int8_t getAntennaGain(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1074 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1075 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1076 | * Set configured gain of installed antenna, default: +3 dBi |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1077 | * @param gain -127 dBi - 128 dBi |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1078 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1079 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1080 | int32_t setAntennaGain(int8_t gain); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1081 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1082 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1083 | * Enable/disable TX waiting for rx windows |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1084 | * when enabled, send calls will block until a packet is received or RX timeout |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1085 | * @param enable set to true if expecting responses to transmitted packets |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1086 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1087 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1088 | int32_t setTxWait(const bool& enable); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1089 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1090 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1091 | * Get TX wait |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1092 | * @returns true if TX wait is enabled |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1093 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1094 | bool getTxWait(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1095 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1096 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1097 | * Cancel pending rx windows |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1098 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1099 | void cancelRxWindow(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1100 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1101 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1102 | * Get time on air |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1103 | * @returns the amount of time (in ms) it would take to send bytes bytes based on current configuration |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1104 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1105 | uint32_t getTimeOnAir(uint8_t bytes); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1106 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1107 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1108 | * Get min frequency |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1109 | * @returns minimum frequency based on current channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1110 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1111 | uint32_t getMinFrequency(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1112 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1113 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1114 | * Get max frequency |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1115 | * @returns maximum frequency based on current channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1116 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1117 | uint32_t getMaxFrequency(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1118 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1119 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1120 | * Get min datarate |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1121 | * @returns minimum datarate based on current channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1122 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1123 | uint8_t getMinDatarate(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1124 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1125 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1126 | * Get max datarate |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1127 | * @returns maximum datarate based on current channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1128 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1129 | uint8_t getMaxDatarate(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1130 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1131 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1132 | * Get min datarate offset |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1133 | * @returns minimum datarate offset based on current channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1134 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1135 | uint8_t getMinDatarateOffset(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1136 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1137 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1138 | * Get max datarate offset |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1139 | * @returns maximum datarate based on current channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1140 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1141 | uint8_t getMaxDatarateOffset(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1142 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1143 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1144 | * Get min datarate |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1145 | * @returns minimum datarate based on current channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1146 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1147 | uint8_t getMinRx2Datarate(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1148 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1149 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1150 | * Get max rx2 datarate |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1151 | * @returns maximum rx2 datarate based on current channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1152 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1153 | uint8_t getMaxRx2Datarate(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1154 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1155 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1156 | * Get max tx power |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1157 | * @returns maximum tx power based on current channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1158 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1159 | uint8_t getMaxTxPower(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1160 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1161 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1162 | * Get min tx power |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1163 | * @returns minimum tx power based on current channel plan |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1164 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1165 | uint8_t getMinTxPower(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1166 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1167 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1168 | * |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1169 | * get/set adaptive data rate |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1170 | * configure data rates and power levels based on signal to noise of packets received at gateway |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1171 | * true == adaptive data rate is on |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1172 | * set function returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1173 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1174 | int32_t setAdr(const bool& on); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1175 | bool getAdr(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1176 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1177 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1178 | * Set forward error correction bytes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1179 | * @param bytes 1 - 4 bytes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1180 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1181 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1182 | int32_t setFec(const uint8_t& bytes); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1183 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1184 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1185 | * Get forward error correction bytes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1186 | * @returns bytes (1 - 4) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1187 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1188 | uint8_t getFec(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1189 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1190 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1191 | * Enable/disable CRC checking of packets |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1192 | * CRC checking must be enabled for use with Conduit gateway and MTAC_LORA card |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1193 | * @param on set to true to enable CRC checking |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1194 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1195 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1196 | int32_t setCrc(const bool& on); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1197 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1198 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1199 | * Get CRC checking |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1200 | * @returns true if CRC checking is enabled |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1201 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1202 | bool getCrc(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1203 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1204 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1205 | * Set ack |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1206 | * @param retries 0 to disable acks, otherwise 1 - 8 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1207 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1208 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1209 | int32_t setAck(const uint8_t& retries); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1210 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1211 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1212 | * Get ack |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1213 | * @returns 0 if acks are disabled, otherwise retries (1 - 8) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1214 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1215 | uint8_t getAck(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1216 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1217 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1218 | * Set number of packet repeats for unconfirmed frames |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1219 | * @param repeat 0 or 1 for no repeats, otherwise 2-15 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1220 | * @returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1221 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1222 | int32_t setRepeat(const uint8_t& repeat); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1223 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1224 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1225 | * Get number of packet repeats for unconfirmed frames |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1226 | * @returns 0 or 1 if no repeats, otherwise 2-15 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1227 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1228 | uint8_t getRepeat(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1229 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1230 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1231 | * Send data to the gateway |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1232 | * validates data size (based on spreading factor) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1233 | * @param data a vector of up to 242 bytes (may be less based on spreading factor) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1234 | * @returns MDOT_OK if packet was sent successfully (ACKs disabled), or if an ACK was received (ACKs enabled) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1235 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1236 | int32_t send(const std::vector<uint8_t>& data, const bool& blocking = true, const bool& highBw = false); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1237 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1238 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1239 | * Inject mac command |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1240 | * @param data a vector containing mac commands |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1241 | * @returns MDOT_OK |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1242 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1243 | int32_t injectMacCommand(const std::vector<uint8_t>& data); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1244 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1245 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1246 | * Clear MAC command buffer to be sent in next uplink |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1247 | * @returns MDOT_OK |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1248 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1249 | int32_t clearMacCommands(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1250 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1251 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1252 | * Get MAC command buffer to be sent in next uplink |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1253 | * @returns command bytes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1254 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1255 | std::vector<uint8_t> getMacCommands(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1256 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1257 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1258 | * Fetch data received from the gateway |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1259 | * this function only checks to see if a packet has been received - it does not open a receive window |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1260 | * send() must be called before recv() |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1261 | * @param data a vector to put the received data into |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1262 | * @returns MDOT_OK if packet was successfully received |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1263 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1264 | int32_t recv(std::vector<uint8_t>& data); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1265 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1266 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1267 | * Ping |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1268 | * status will be MDOT_OK if ping succeeded |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1269 | * @returns ping_response struct containing status, RSSI, and SNR |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1270 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1271 | ping_response ping(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1272 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1273 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1274 | * Get return code string |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1275 | * @returns string containing a description of the given error code |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1276 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1277 | static std::string getReturnCodeString(const int32_t& code); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1278 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1279 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1280 | * Get last error |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1281 | * @returns string explaining the last error that occured |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1282 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1283 | std::string getLastError(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1284 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1285 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1286 | * Go to sleep |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1287 | * @param interval the number of seconds to sleep before waking up if wakeup_mode == RTC_ALARM or RTC_ALARM_OR_INTERRUPT, else ignored |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1288 | * @param wakeup_mode RTC_ALARM, INTERRUPT, RTC_ALARM_OR_INTERRUPT |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1289 | * if RTC_ALARM the real time clock is configured to wake the device up after the specified interval |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1290 | * if INTERRUPT the device will wake up on the rising edge of the interrupt pin |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1291 | * if RTC_ALARM_OR_INTERRUPT the device will wake on the first event to occur |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1292 | * @param deepsleep if true go into deep sleep mode (lowest power, all memory and registers are lost, peripherals turned off) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1293 | * else go into sleep mode (low power, memory and registers are maintained, peripherals stay on) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1294 | * |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1295 | * For the MDOT |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1296 | * in sleep mode, the device can be woken up on an XBEE_DI (2-8) pin or by the RTC alarm |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1297 | * in deepsleep mode, the device can only be woken up using the WKUP pin (PA0, XBEE_DIO7) or by the RTC alarm |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1298 | * For the XDOT |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1299 | * in sleep mode, the device can be woken up on GPIO (0-3), UART1_RX, WAKE or by the RTC alarm |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1300 | * in deepsleep mode, the device can only be woken up using the WKUP pin (PA0, WAKE) or by the RTC alarm |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1301 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1302 | void sleep(const uint32_t& interval, const uint8_t& wakeup_mode = RTC_ALARM, const bool& deepsleep = true); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1303 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1304 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1305 | * Set wake pin |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1306 | * @param pin the pin to use to wake the device from sleep mode |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1307 | * For MDOT, XBEE_DI (2-8) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1308 | * For XDOT, GPIO (0-3), UART1_RX, or WAKE |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1309 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1310 | void setWakePin(const PinName& pin); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1311 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1312 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1313 | * Get wake pin |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1314 | * @returns the pin to use to wake the device from sleep mode |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1315 | * For MDOT, XBEE_DI (2-8) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1316 | * For XDOT, GPIO (0-3), UART1_RX, or WAKE |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1317 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1318 | PinName getWakePin(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1319 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1320 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1321 | * Write data in a user backup register |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1322 | * @param register one of UBR0 through UBR9 for MDOT, one of UBR0 through UBR21 for XDOT |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1323 | * @param data user data to back up |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1324 | * @returns true if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1325 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1326 | bool writeUserBackupRegister(uint32_t reg, uint32_t data); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1327 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1328 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1329 | * Read data in a user backup register |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1330 | * @param register one of UBR0 through UBR9 for MDOT, one of UBR0 through UBR21 for XDOT |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1331 | * @param data gets set to content of register |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1332 | * @returns true if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1333 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1334 | bool readUserBackupRegister(uint32_t reg, uint32_t& data); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1335 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1336 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1337 | * Set LBT time in us |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1338 | * @param ms time in us |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1339 | * @returns true if success |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1340 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1341 | bool setLbtTimeUs(uint16_t us); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1342 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1343 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1344 | * Get LBT time in us |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1345 | * @returns LBT time in us |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1346 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1347 | uint16_t getLbtTimeUs(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1348 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1349 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1350 | * Set LBT threshold in dBm |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1351 | * @param rssi threshold in dBm |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1352 | * @returns true if success |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1353 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1354 | bool setLbtThreshold(int8_t rssi); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1355 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1356 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1357 | * Get LBT threshold in dBm |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1358 | * @returns LBT threshold in dBm |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1359 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1360 | int8_t getLbtThreshold(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1361 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1362 | #if defined(TARGET_MTS_MDOT_F411RE) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1363 | /////////////////////////////////////////////////////////////////// |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1364 | // Filesystem (Non Volatile Memory) Operation Functions for mDot // |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1365 | /////////////////////////////////////////////////////////////////// |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1366 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1367 | // Save user file data to flash |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1368 | // file - name of file max 30 chars |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1369 | // data - data of file |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1370 | // size - size of file |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1371 | // returns true if successful |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1372 | bool saveUserFile(const char* file, void* data, uint32_t size); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1373 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1374 | // Append user file data to flash |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1375 | // file - name of file max 30 chars |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1376 | // data - data of file |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1377 | // size - size of file |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1378 | // returns true if successful |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1379 | bool appendUserFile(const char* file, void* data, uint32_t size); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1380 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1381 | // Read user file data from flash |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1382 | // file - name of file max 30 chars |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1383 | // data - data of file |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1384 | // size - size of file |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1385 | // returns true if successful |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1386 | bool readUserFile(const char* file, void* data, uint32_t size); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1387 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1388 | // Move a user file in flash |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1389 | // file - name of file |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1390 | // new_name - new name of file |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1391 | // returns true if successful |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1392 | bool moveUserFile(const char* file, const char* new_name); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1393 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1394 | // Delete user file data from flash |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1395 | // file - name of file max 30 chars |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1396 | // returns true if successful |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1397 | bool deleteUserFile(const char* file); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1398 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1399 | // Open user file in flash, max of 4 files open concurrently |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1400 | // file - name of file max 30 chars |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1401 | // mode - combination of FM_APPEND | FM_TRUNC | FM_CREAT | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1402 | // FM_RDONLY | FM_WRONLY | FM_RDWR | FM_DIRECT |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1403 | // returns - mdot_file struct, fd field will be a negative value if file could not be opened |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1404 | mDot::mdot_file openUserFile(const char* file, int mode); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1405 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1406 | // Seek an open file |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1407 | // file - mdot file struct |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1408 | // offset - offset in bytes |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1409 | // whence - where offset is based SEEK_SET, SEEK_CUR, SEEK_END |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1410 | // returns true if successful |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1411 | bool seekUserFile(mDot::mdot_file& file, size_t offset, int whence); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1412 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1413 | // Read bytes from open file |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1414 | // file - mdot file struct |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1415 | // data - mem location to store data |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1416 | // length - number of bytes to read |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1417 | // returns - number of bytes read, negative if error |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1418 | int readUserFile(mDot::mdot_file& file, void* data, size_t length); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1419 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1420 | // Write bytes to open file |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1421 | // file - mdot file struct |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1422 | // data - data to write |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1423 | // length - number of bytes to write |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1424 | // returns - number of bytes written, negative if error |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1425 | int writeUserFile(mDot::mdot_file& file, void* data, size_t length); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1426 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1427 | // Close open file |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1428 | // file - mdot file struct |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1429 | // returns true if successful |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1430 | bool closeUserFile(mDot::mdot_file& file); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1431 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1432 | // List user files stored in flash |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1433 | std::vector<mDot::mdot_file> listUserFiles(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1434 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1435 | // Move file into the firmware upgrade path to be flashed on next boot |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1436 | // file - name of file |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1437 | // returns true if successful |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1438 | bool moveUserFileToFirmwareUpgrade(const char* file); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1439 | #else |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1440 | /////////////////////////////////////////////////////////////// |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1441 | // EEPROM (Non Volatile Memory) Operation Functions for xDot // |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1442 | /////////////////////////////////////////////////////////////// |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1443 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1444 | // Write to EEPROM |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1445 | // addr - address to write to (0 - 0x17FF) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1446 | // data - data to write |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1447 | // size - size of data |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1448 | // returns true if successful |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1449 | bool nvmWrite(uint16_t addr, void* data, uint16_t size); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1450 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1451 | // Read from EEPROM |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1452 | // addr - address to read from (0 - 0x17FF) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1453 | // data - buffer for data |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1454 | // size - size of buffer |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1455 | // returns true if successful |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1456 | bool nvmRead(uint16_t addr, void* data, uint16_t size); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1457 | #endif /* TARGET_MTS_MDOT_F411RE */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1458 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1459 | // get current statistics |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1460 | // Join Attempts, Join Fails, Up Packets, Down Packets, Missed Acks |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1461 | mdot_stats getStats(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1462 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1463 | // reset statistics |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1464 | // Join Attempts, Join Fails, Up Packets, Down Packets, Missed Acks |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1465 | void resetStats(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1466 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1467 | // Convert pin number 2-8 to pin name DIO2-DI8 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1468 | static PinName pinNum2Name(uint8_t num); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1469 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1470 | // Convert pin name DIO2-DI8 to pin number 2-8 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1471 | static uint8_t pinName2Num(PinName name); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1472 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1473 | // Convert pin name DIO2-DI8 to string |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1474 | static std::string pinName2Str(PinName name); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1475 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1476 | uint64_t crc64(uint64_t crc, const unsigned char *s, uint64_t l); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1477 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1478 | /************************************************************************* |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1479 | * The following functions are only used by the AT command application and |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1480 | * should not be used by standard applications consuming the mDot library |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1481 | ************************************************************************/ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1482 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1483 | // set/get configured baud rate for command port |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1484 | // only for use in conjunction with AT interface |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1485 | // set function returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1486 | int32_t setBaud(const uint32_t& baud); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1487 | uint32_t getBaud(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1488 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1489 | // set/get baud rate for debug port |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1490 | // set function returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1491 | int32_t setDebugBaud(const uint32_t& baud); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1492 | uint32_t getDebugBaud(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1493 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1494 | // set/get command terminal echo |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1495 | // set function returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1496 | int32_t setEcho(const bool& on); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1497 | bool getEcho(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1498 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1499 | // set/get command terminal verbose mode |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1500 | // set function returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1501 | int32_t setVerbose(const bool& on); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1502 | bool getVerbose(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1503 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1504 | // set/get startup mode |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1505 | // COMMAND_MODE (default), starts up ready to accept AT commands |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1506 | // SERIAL_MODE, read serial data and send it as LoRa packets |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1507 | // set function returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1508 | int32_t setStartUpMode(const uint8_t& mode); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1509 | uint8_t getStartUpMode(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1510 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1511 | int32_t setRxDataRate(const uint8_t& dr); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1512 | uint8_t getRxDataRate(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1513 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1514 | // get/set TX/RX frequency |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1515 | // if frequency band == FB_868 (Europe), must be between 863000000 - 870000000 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1516 | // if frequency band == FB_915 (United States), must be between 902000000-928000000 |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1517 | // if set to 0, device will hop frequencies |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1518 | // set function returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1519 | int32_t setTxFrequency(const uint32_t& freq); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1520 | uint32_t getTxFrequency(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1521 | int32_t setRxFrequency(const uint32_t& freq); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1522 | uint32_t getRxFrequency(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1523 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1524 | // get/set TX/RX inverted |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1525 | // true == signal is inverted |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1526 | // set function returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1527 | int32_t setTxInverted(const bool& on); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1528 | bool getTxInverted(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1529 | int32_t setRxInverted(const bool& on); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1530 | bool getRxInverted(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1531 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1532 | // get/set RX output mode |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1533 | // valid options are HEXADECIMAL and BINARY |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1534 | // set function returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1535 | int32_t setRxOutput(const uint8_t& mode); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1536 | uint8_t getRxOutput(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1537 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1538 | // get/set serial wake interval |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1539 | // valid values are 2 s - INT_MAX (2147483647) s |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1540 | // set function returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1541 | int32_t setWakeInterval(const uint32_t& interval); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1542 | uint32_t getWakeInterval(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1543 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1544 | // get/set serial wake delay |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1545 | // valid values are 2 ms - INT_MAX (2147483647) ms |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1546 | // set function returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1547 | int32_t setWakeDelay(const uint32_t& delay); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1548 | uint32_t getWakeDelay(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1549 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1550 | // get/set serial receive timeout |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1551 | // valid values are 0 ms - 65000 ms |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1552 | // set function returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1553 | int32_t setWakeTimeout(const uint16_t& timeout); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1554 | uint16_t getWakeTimeout(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1555 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1556 | // get/set serial wake mode |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1557 | // valid values are INTERRUPT or RTC_ALARM |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1558 | // set function returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1559 | int32_t setWakeMode(const uint8_t& delay); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1560 | uint8_t getWakeMode(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1561 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1562 | // get/set serial flow control enabled |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1563 | // set function returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1564 | int32_t setFlowControl(const bool& on); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1565 | bool getFlowControl(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1566 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1567 | // get/set serial clear on error |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1568 | // if enabled the data read from the serial port will be discarded if it cannot be sent or if the send fails |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1569 | // set function returns MDOT_OK if success |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1570 | int32_t setSerialClearOnError(const bool& on); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1571 | bool getSerialClearOnError(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1572 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1573 | // MTS_RADIO_DEBUG_COMMANDS |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1574 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1575 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1576 | * Disable Duty cycle |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1577 | * enables or disables the duty cycle limitations |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1578 | * **** ONLY TO BE USED FOR TESTINGS PURPOSES **** |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1579 | * **** ALL DEPLOYABLE CODE MUST ADHERE TO LOCAL REGULATIONS **** |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1580 | * **** THIS SETTING WILL NOT BE SAVED TO CONFIGURATION ***** |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1581 | * @param val true to disable duty-cycle (default:false) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1582 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1583 | int32_t setDisableDutyCycle(bool val); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1584 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1585 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1586 | * Disable Duty cycle |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1587 | * **** ONLY TO BE USED FOR TESTINGS PURPOSES **** |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1588 | * **** ALL DEPLOYABLE CODE MUST ADHERE TO LOCAL REGULATIONS **** |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1589 | * **** THIS SETTING WILL NOT BE SAVED TO CONFIGURATION ***** |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1590 | * @return true if duty-cycle is disabled (default:false) |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1591 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1592 | uint8_t getDisableDutyCycle(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1593 | |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1594 | /** |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1595 | * LBT RSSI |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1596 | * @return the current RSSI on the configured frequency (SetTxFrequency) using configured LBT Time |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1597 | */ |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1598 | int16_t lbtRssi(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1599 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1600 | void openRxWindow(uint32_t timeout, uint8_t bandwidth = 0); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1601 | void closeRxWindow(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1602 | void sendContinuous(bool enable=true); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1603 | int32_t setDeviceId(const std::vector<uint8_t>& id); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1604 | int32_t setDefaultFrequencyBand(const uint8_t& band); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1605 | bool saveProtectedConfig(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1606 | void resetRadio(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1607 | int32_t setRadioMode(const uint8_t& mode); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1608 | std::map<uint8_t, uint8_t> dumpRegisters(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1609 | void eraseFlash(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1610 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1611 | // deprecated - use setWakeInterval |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1612 | int32_t setSerialWakeInterval(const uint32_t& interval); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1613 | // deprecated - use getWakeInterval |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1614 | uint32_t getSerialWakeInterval(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1615 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1616 | // deprecated - use setWakeDelay |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1617 | int32_t setSerialWakeDelay(const uint32_t& delay); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1618 | // deprecated - use setWakeDelay |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1619 | uint32_t getSerialWakeDelay(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1620 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1621 | // deprecated - use setWakeTimeout |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1622 | int32_t setSerialReceiveTimeout(const uint16_t& timeout); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1623 | // deprecated - use getWakeTimeout |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1624 | uint16_t getSerialReceiveTimeout(); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1625 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1626 | void setWakeupCallback(void (*function)(void)); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1627 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1628 | template<typename T> |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1629 | void setWakeupCallback(T *object, void (T::*member)(void)) { |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1630 | _wakeup_callback.attach(object, member); |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1631 | } |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1632 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1633 | private: |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1634 | mdot_stats _stats; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1635 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1636 | FunctionPointer _wakeup_callback; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1637 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1638 | bool _standbyFlag; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1639 | bool _testMode; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1640 | uint8_t _savedPort; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1641 | void handleTestModePacket(); |
Jenkins@KEILDM1.dc.multitech.prv | 10:1e831990a669 | 1642 | lora::ChannelPlan* _plan; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1643 | }; |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1644 | |
Jenkins@KEILDM1.dc.multitech.prv | 2:4569491293d7 | 1645 | #endif |