this is the working code for the xdot to read in serial from the pi and send it over LoRa

Committer:
Jenkins@KEILDM1.dc.multitech.prv
Date:
Thu Aug 29 08:40:49 2019 -0500
Revision:
18:d7332302f5f1
Parent:
16:4a382fe8f51b
Child:
19:aa5b1fcd05be
xdot-library revision 3.2.2-19-g285e497 and mbed-os revision mbed-os-5.13.4

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 1 /** __ ___ ____ _ ______ __ ____ __ ____
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 2 * / |/ /_ __/ / /_(_)__/_ __/__ ____/ / / __/_ _____ / /____ __ _ ___ / _/__ ____
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 3 * / /|_/ / // / / __/ /___// / / -_) __/ _ \ _\ \/ // (_-</ __/ -_) ' \(_-< _/ // _ \/ __/ __
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 4 * /_/ /_/\_,_/_/\__/_/ /_/ \__/\__/_//_/ /___/\_, /___/\__/\__/_/_/_/___/ /___/_//_/\__/ /_/
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 5 * Copyright (C) 2015 by Multi-Tech Systems /___/
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 6 *
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 7 *
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 8 * @author Jason Reiss
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 9 * @date 10-31-2015
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 10 * @brief lora::MacEvents provides an interface for events from the Mac layer
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 11 *
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 12 * @details
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 13 *
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 14 */
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 15
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 16 #ifndef __LORA_MAC_EVENTS_H__
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 17 #define __LORA_MAC_EVENTS_H__
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 18
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 19 #include "Lora.h"
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 20
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 21 namespace lora {
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 22
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 23 class MacEvents {
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 24
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 25 public:
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 26 virtual ~MacEvents() {};
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 27
Jenkins@KEILDM1.dc.multitech.prv 14:f0c24ce93427 28 virtual void TxStart(void) = 0;
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 29 virtual void TxDone(uint8_t dr) = 0;
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 30 virtual void TxTimeout(void) = 0;
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 31
Jenkins@KEILDM1.dc.multitech.prv 18:d7332302f5f1 32 virtual void JoinAccept(uint8_t *payload, uint16_t size, int16_t rssi, int16_t snr) = 0;
Jenkins@KEILDM1.dc.multitech.prv 18:d7332302f5f1 33 virtual void JoinFailed(uint8_t *payload, uint16_t size, int16_t rssi, int16_t snr) = 0;
Jenkins@KEILDM1.dc.multitech.prv 18:d7332302f5f1 34 virtual void PacketRx(uint8_t port, uint8_t *payload, uint16_t size, int16_t rssi, int16_t snr, lora::DownlinkControl ctrl, uint8_t slot, uint8_t retries=0, uint32_t address=0, bool dupRx=false) = 0;
Jenkins@KEILDM1.dc.multitech.prv 18:d7332302f5f1 35 virtual void RxDone(uint8_t *payload, uint16_t size, int16_t rssi, int16_t snr, lora::DownlinkControl ctrl, uint8_t slot) = 0;
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 36
Jenkins@KEILDM1.dc.multitech.prv 18:d7332302f5f1 37 virtual void BeaconRx(const BeaconData_t& beacon_data, int16_t rssi, int16_t snr) = 0;
Jenkins@KEILDM1.dc.multitech.prv 16:4a382fe8f51b 38 virtual void BeaconLost() = 0;
Jenkins@KEILDM1.dc.multitech.prv 16:4a382fe8f51b 39 virtual void ServerTime(uint32_t seconds, uint8_t sub_seconds) = 0;
Jenkins@KEILDM1.dc.multitech.prv 16:4a382fe8f51b 40
Jenkins@KEILDM1.dc.multitech.prv 18:d7332302f5f1 41 virtual void Pong(int16_t m_rssi, int16_t m_snr, int16_t s_rssi, int16_t s_snr) = 0;
Jenkins@KEILDM1.dc.multitech.prv 18:d7332302f5f1 42 virtual void NetworkLinkCheck(int16_t m_rssi, int16_t m_snr, int16_t s_snr, uint8_t s_gateways) = 0;
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 43
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 44 virtual void RxTimeout(uint8_t slot) = 0;
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 45 virtual void RxError(uint8_t slot) = 0;
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 46
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 47 virtual void MissedAck(uint8_t retries) = 0;
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 48
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 49 virtual uint8_t MeasureBattery() = 0;
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 50
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 51 private:
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 52
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 53
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 54 };
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 55
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 56 }
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 57
Jenkins@KEILDM1.dc.multitech.prv 2:4569491293d7 58 #endif