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 SxRadioEvents.h Source File

SxRadioEvents.h

00001 /*
00002  / _____)             _              | |
00003 ( (____  _____ ____ _| |_ _____  ____| |__
00004  \____ \| ___ |    (_   _) ___ |/ ___)  _ \
00005  _____) ) ____| | | || |_| ____( (___| | | |
00006 (______/|_____)_|_|_| \__)_____)\____)_| |_|
00007     (C)2013 Semtech
00008 
00009 Description: Generic radio driver definition
00010 
00011 License: Revised BSD License, see LICENSE.TXT file include in the project
00012 
00013 Maintainer: Miguel Luis and Gregory Cristian
00014 */
00015 #ifndef __SXRADIOEVENTS_H__
00016 #define __SXRADIOEVENTS_H__
00017 
00018 /*!
00019  * \brief Radio driver callback functions
00020  */
00021 class SxRadioEvents
00022 {
00023 public:
00024     /*!
00025      * \brief  Tx Start callback prototype.
00026      */
00027     virtual void TxStart( void ) {}
00028     /*!
00029      * \brief  Tx Done callback prototype.
00030      */
00031     virtual void TxDone( void ) {}
00032     /*!
00033      * \brief  Tx Timeout callback prototype.
00034      */
00035     virtual void TxTimeout( void ) {}
00036 
00037     /*!
00038      * \brief Rx Done callback prototype.
00039      *
00040      * \param [IN] payload Received buffer pointer
00041      * \param [IN] size    Received buffer size
00042      * \param [IN] rssi    RSSI value computed while receiving the frame [dBm]
00043      * \param [IN] snr     Raw SNR value given by the radio hardware
00044      *                     FSK : N/A ( set to 0 )
00045      *                     LoRa: SNR value is two's complement in 1/4 dB
00046      */
00047     virtual void RxDone( uint8_t *payload, uint16_t size, int16_t rssi, int16_t snr ) {}
00048 
00049     /*!
00050      * \brief Called if Beacon Window cannot be opened or is missed
00051      *
00052      * \param [IN] beaconTime  Updated time of beacon for the period
00053      * \param [IN] no_rx       True if called from rx done
00054      */
00055     virtual void OnBeaconless( uint32_t beaconTime, bool no_rx = false ) {}
00056 
00057 
00058 
00059     /*!
00060      * \brief  Rx Timeout callback prototype.
00061      */
00062     virtual void RxTimeout( void ) {}
00063     /*!
00064      * \brief Rx Error callback prototype.
00065      */
00066     virtual void RxError( void ) {}
00067     /*!
00068      * \brief  FHSS Change Channel callback prototype.
00069      *
00070      * \param [IN] currentChannel   Index number of the current channel
00071      */
00072     virtual void FhssChangeChannel( uint8_t currentChannel ) {}
00073     /*!
00074      * \brief CAD Done callback prototype.
00075      *
00076      * \param [IN] channelActivityDetected  Channel Activity detected during the CAD
00077      */
00078     virtual void CadDone( bool channelActivityDetected ) {}
00079     /*!
00080      * \brief Mac Event callback prototype.
00081      */
00082     virtual void MacEvent( void ) {}
00083 
00084     virtual void LinkIdle(void) {}
00085 };
00086 
00087 #endif // __SXRADIOEVENTS_H__
00088