Stable version of the xDot library for mbed 5. This version of the library is suitable for deployment scenarios.

Dependents:   Dot-Examples XDOT-Devicewise Dot-Examples-delujoc Dot-Examples_receive ... more

Fork of libxDot-dev-mbed5-deprecated by MultiTech

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MacEvents.h Source File

MacEvents.h

00001 /**   __  ___     ____  _    ______        __     ____         __                  ____
00002  *   /  |/  /_ __/ / /_(_)__/_  __/__ ____/ /    / __/_ _____ / /____ __ _  ___   /  _/__  ____
00003  *  / /|_/ / // / / __/ /___// / / -_) __/ _ \  _\ \/ // (_-</ __/ -_)  ' \(_-<  _/ // _ \/ __/ __
00004  * /_/  /_/\_,_/_/\__/_/    /_/  \__/\__/_//_/ /___/\_, /___/\__/\__/_/_/_/___/ /___/_//_/\__/ /_/
00005  * Copyright (C) 2015 by Multi-Tech Systems        /___/
00006  *
00007  *
00008  * @author Jason Reiss
00009  * @date   10-31-2015
00010  * @brief  lora::MacEvents provides an interface for events from the Mac layer
00011  *
00012  * @details
00013  *
00014  */
00015 
00016 #ifndef __LORA_MAC_EVENTS_H__
00017 #define __LORA_MAC_EVENTS_H__
00018 
00019 #include "Lora.h"
00020 
00021 namespace lora {
00022 
00023     class MacEvents {
00024 
00025         public:
00026             virtual ~MacEvents() {};
00027 
00028             virtual void TxStart(void) = 0;
00029             virtual void TxDone(uint8_t dr) = 0;
00030             virtual void TxTimeout(void) = 0;
00031 
00032             virtual void JoinAccept(uint8_t *payload, uint16_t size, int16_t rssi, int16_t snr) = 0;
00033             virtual void JoinFailed(uint8_t *payload, uint16_t size, int16_t rssi, int16_t snr) = 0;
00034             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;
00035             virtual void RxDone(uint8_t *payload, uint16_t size, int16_t rssi, int16_t snr, lora::DownlinkControl ctrl, uint8_t slot) = 0;
00036 
00037             virtual void BeaconRx(const BeaconData_t& beacon_data, int16_t rssi, int16_t snr) = 0;
00038             virtual void BeaconLost() = 0;
00039             virtual void ServerTime(uint32_t seconds, uint8_t sub_seconds) = 0;
00040 
00041             virtual void Pong(int16_t m_rssi, int16_t m_snr, int16_t s_rssi, int16_t s_snr) = 0;
00042             virtual void NetworkLinkCheck(int16_t m_rssi, int16_t m_snr, int16_t s_snr, uint8_t s_gateways) = 0;
00043 
00044             virtual void RxTimeout(uint8_t slot) = 0;
00045             virtual void RxError(uint8_t slot) = 0;
00046 
00047             virtual void MissedAck(uint8_t retries) = 0;
00048 
00049             virtual uint8_t MeasureBattery() = 0;
00050 
00051         private:
00052 
00053 
00054     };
00055 
00056 }
00057 
00058 #endif