LoRaMAC  4.4.5
Documentation of the API
LoRaMacConfirmQueue.h
Go to the documentation of this file.
1 
39 #ifndef __LORAMAC_CONFIRMQUEUE_H__
40 #define __LORAMAC_CONFIRMQUEUE_H__
41 
42 #ifdef __cplusplus
43 extern "C"
44 {
45 #endif
46 
47 #include <stdbool.h>
48 #include <stdint.h>
49 
50 #include "LoRaMac.h"
51 
55 #define LORA_MAC_MLME_CONFIRM_QUEUE_LEN 5
56 
60 typedef struct sMlmeConfirmQueue
61 {
80 
85 typedef void ( *LoRaMacConfirmQueueNvmEvent )( void );
86 
95 void LoRaMacConfirmQueueInit( LoRaMacPrimitives_t* primitives, LoRaMacConfirmQueueNvmEvent confirmQueueNvmCtxChanged );
96 
104 bool LoRaMacConfirmQueueRestoreNvmCtx( void* confirmQueueNvmCtx );
105 
113 void* LoRaMacConfirmQueueGetNvmCtx( size_t* confirmQueueNvmCtxSize );
114 
122 bool LoRaMacConfirmQueueAdd( MlmeConfirmQueue_t* mlmeConfirm );
123 
129 bool LoRaMacConfirmQueueRemoveLast( void );
130 
136 bool LoRaMacConfirmQueueRemoveFirst( void );
137 
146 
155 
162 
169 
177 bool LoRaMacConfirmQueueIsCmdActive( Mlme_t request );
178 
184 void LoRaMacConfirmQueueHandleCb( MlmeConfirm_t* mlmeConfirm );
185 
191 uint8_t LoRaMacConfirmQueueGetCnt( void );
192 
198 bool LoRaMacConfirmQueueIsFull( void );
199 
200 #ifdef __cplusplus
201 }
202 #endif
203 
204 #endif // __LORAMAC_CONFIRMQUEUE_H__
LoRaMacConfirmQueueRemoveFirst
bool LoRaMacConfirmQueueRemoveFirst(void)
Removes the first element which was added to the confirm queue.
LoRaMacPrimitives_t
Definition: LoRaMac.h:2352
LoRaMacConfirmQueueIsCmdActive
bool LoRaMacConfirmQueueIsCmdActive(Mlme_t request)
Verifies if a request is in the queue and active.
LoRaMacConfirmQueueGetStatus
LoRaMacEventInfoStatus_t LoRaMacConfirmQueueGetStatus(Mlme_t request)
Gets the status of an element.
MlmeConfirmQueue_t
Definition: LoRaMacConfirmQueue.h:60
LoRaMacConfirmQueueGetStatusCmn
LoRaMacEventInfoStatus_t LoRaMacConfirmQueueGetStatusCmn(void)
Gets the common status of all elements.
LoRaMacConfirmQueueSetStatus
void LoRaMacConfirmQueueSetStatus(LoRaMacEventInfoStatus_t status, Mlme_t request)
Sets the status of an element.
LoRaMacConfirmQueueHandleCb
void LoRaMacConfirmQueueHandleCb(MlmeConfirm_t *mlmeConfirm)
Handles all callbacks of active requests.
MlmeConfirmQueue_t::Status
LoRaMacEventInfoStatus_t Status
Definition: LoRaMacConfirmQueue.h:69
LoRaMacConfirmQueueAdd
bool LoRaMacConfirmQueueAdd(MlmeConfirmQueue_t *mlmeConfirm)
Adds an element to the confirm queue.
LoRaMacConfirmQueueSetStatusCmn
void LoRaMacConfirmQueueSetStatusCmn(LoRaMacEventInfoStatus_t status)
Sets a common status for all elements in the queue.
MlmeConfirm_t
Definition: LoRaMac.h:1156
LoRaMacConfirmQueueRestoreNvmCtx
bool LoRaMacConfirmQueueRestoreNvmCtx(void *confirmQueueNvmCtx)
LoRaMacConfirmQueueInit
void LoRaMacConfirmQueueInit(LoRaMacPrimitives_t *primitives, LoRaMacConfirmQueueNvmEvent confirmQueueNvmCtxChanged)
Initializes the confirm queue.
LoRaMacConfirmQueueRemoveLast
bool LoRaMacConfirmQueueRemoveLast(void)
Removes the last element which was added into the queue.
LoRaMacConfirmQueueGetNvmCtx
void * LoRaMacConfirmQueueGetNvmCtx(size_t *confirmQueueNvmCtxSize)
LoRaMac.h
LoRa MAC layer implementation.
Mlme_t
Mlme_t
LoRaMAC management services.
Definition: LoRaMac.h:945
MlmeConfirmQueue_t::Request
Mlme_t Request
Definition: LoRaMacConfirmQueue.h:65
MlmeConfirmQueue_t::ReadyToHandle
bool ReadyToHandle
Definition: LoRaMacConfirmQueue.h:73
LoRaMacConfirmQueueIsFull
bool LoRaMacConfirmQueueIsFull(void)
Verify if the confirm queue is full.
MlmeConfirmQueue_t::RestrictCommonReadyToHandle
bool RestrictCommonReadyToHandle
Definition: LoRaMacConfirmQueue.h:78
LoRaMacConfirmQueueNvmEvent
void(* LoRaMacConfirmQueueNvmEvent)(void)
Definition: LoRaMacConfirmQueue.h:85
LoRaMacConfirmQueueGetCnt
uint8_t LoRaMacConfirmQueueGetCnt(void)
Query number of elements in the queue.
LoRaMacEventInfoStatus_t
LoRaMacEventInfoStatus_t
Definition: LoRaMac.h:508