RUI3 (RAK Unified Interface 3) - RAK4631
LmhPackage.h
Go to the documentation of this file.
1 
21 #ifndef __LMH_PACKAGE_H__
22 #define __LMH_PACKAGE_H__
23 
24 #ifdef SUPPORT_LORA
25 
26 #include <stdint.h>
27 #include <stdbool.h>
28 #include "LmHandlerTypes.h"
29 
33 #define PKG_MAX_NUMBER 5
34 
35 typedef struct LmhPackage_s
36 {
37  uint8_t Port;
38  /*
39  *=========================================================================
40  * Below callbacks must be initialized in package variable declaration
41  *=========================================================================
42  */
43 
51  void ( *Init )( void *params, uint8_t *dataBuffer, uint8_t dataBufferMaxSize );
58  bool ( *IsInitialized )( void );
65  bool ( *IsRunning )( void );
69  void ( *Process )( void );
75  void ( *OnMcpsConfirmProcess )( McpsConfirm_t *mcpsConfirm );
81  void ( *OnMcpsIndicationProcess )( McpsIndication_t *mcpsIndication );
87  void ( *OnMlmeConfirmProcess )( MlmeConfirm_t *mlmeConfirm );
93  void ( *OnMlmeIndicationProcess )( MlmeIndication_t *mlmeIndication );
94 
95  /*
96  *=========================================================================
97  * Below callbacks must be initialized in LmHandler initialization with
98  * provideded LmHandlerSend and OnMacRequest functions
99  *=========================================================================
100  */
101 
109  void ( *OnMacMcpsRequest )( LoRaMacStatus_t status, McpsReq_t *mcpsReq, TimerTime_t nextTxDelay );
117  void ( *OnMacMlmeRequest )( LoRaMacStatus_t status, MlmeReq_t *mlmeReq, TimerTime_t nextTxDelay );
125  void ( *OnJoinRequest )( bool isOtaa );
135  LmHandlerErrorStatus_t ( *OnSendRequest )( LmHandlerAppData_t *appData, LmHandlerMsgTypes_t isTxConfirmed );
141  LmHandlerErrorStatus_t ( *OnDeviceTimeRequest )( void );
145  void ( *OnSysTimeUpdate )( void );
146 
147 }LmhPackage_t;
148 
149 #endif // end SUPPORT_LORA
150 
151 #endif // __LMH_PACKAGE_H__
uint8_t Port
Definition: LmhPackage.h:37
void(* OnMlmeIndicationProcess)(MlmeIndication_t *mlmeIndication)
Definition: LmhPackage.h:93
void(* OnMlmeConfirmProcess)(MlmeConfirm_t *mlmeConfirm)
Definition: LmhPackage.h:87
LmHandlerErrorStatus_t(* OnDeviceTimeRequest)(void)
Definition: LmhPackage.h:141
void(* Process)(void)
Definition: LmhPackage.h:69
Definition: LmhPackage.h:35
struct LmhPackage_s LmhPackage_t
void(* Init)(void *params, uint8_t *dataBuffer, uint8_t dataBufferMaxSize)
Definition: LmhPackage.h:51
LmHandlerErrorStatus_t(* OnSendRequest)(LmHandlerAppData_t *appData, LmHandlerMsgTypes_t isTxConfirmed)
Definition: LmhPackage.h:135
void(* OnMcpsConfirmProcess)(McpsConfirm_t *mcpsConfirm)
Definition: LmhPackage.h:75
void(* OnSysTimeUpdate)(void)
Definition: LmhPackage.h:145
void(* OnJoinRequest)(bool isOtaa)
Definition: LmhPackage.h:125
void(* OnMcpsIndicationProcess)(McpsIndication_t *mcpsIndication)
Definition: LmhPackage.h:81
bool(* IsRunning)(void)
Definition: LmhPackage.h:65
void(* OnMacMcpsRequest)(LoRaMacStatus_t status, McpsReq_t *mcpsReq, TimerTime_t nextTxDelay)
Definition: LmhPackage.h:109
bool(* IsInitialized)(void)
Definition: LmhPackage.h:58
void(* OnMacMlmeRequest)(LoRaMacStatus_t status, MlmeReq_t *mlmeReq, TimerTime_t nextTxDelay)
Definition: LmhPackage.h:117