1 /*!
2  * \file      LmhpCompliance.h
3  *
4  * \brief     Implements the LoRa-Alliance certification protocol handling
5  *
6  * \copyright Revised BSD License, see section \ref LICENSE.
7  *
8  * \code
9  *                ______                              _
10  *               / _____)             _              | |
11  *              ( (____  _____ ____ _| |_ _____  ____| |__
12  *               \____ \| ___ |    (_   _) ___ |/ ___)  _ \
13  *               _____) ) ____| | | || |_| ____( (___| | | |
14  *              (______/|_____)_|_|_| \__)_____)\____)_| |_|
15  *              (C)2013-2018 Semtech
16  *
17  * \endcode
18  *
19  * \author    Miguel Luis ( Semtech )
20  */
21 #ifndef __LMHP_COMPLIANCE__
22 #define __LMHP_COMPLIANCE__
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 #include "LoRaMac.h"
29 #include "LmHandlerTypes.h"
30 #include "LmhPackage.h"
31 
32 /*!
33  * Compliance package identifier.
34  *
35  * \remark This value must be unique amongst the packages
36  */
37 #define PACKAGE_ID_COMPLIANCE                       0
38 
39 /*!
40  * Compliance test protocol handler parameters
41  */
42 typedef struct LmhpComplianceParams_s
43 {
44     /*!
45      * Current firmware version
46      */
47     Version_t FwVersion;
48     /*!
49      *
50      */
51     void ( *OnTxPeriodicityChanged )( uint32_t periodicity );
52     /*!
53      *
54      */
55     void ( *OnTxFrameCtrlChanged )( LmHandlerMsgTypes_t isTxConfirmed );
56     /*!
57      *
58      */
59     void ( *OnPingSlotPeriodicityChanged )( uint8_t pingSlotPeriodicity );
60 }LmhpComplianceParams_t;
61 
62 LmhPackage_t *LmphCompliancePackageFactory( void );
63 
64 #ifdef __cplusplus
65 }
66 #endif
67 
68 #endif // __LMHP_COMPLIANCE__
69