LoRaMAC  4.4.6
Documentation of the API
LoRa MAC confirm queue implementation

This module specifies the API implementation of the LoRaMAC confirm queue. The confirm queue is implemented with as a ring buffer. The number of elements can be defined with LORA_MAC_MLME_CONFIRM_QUEUE_LEN. The current implementation does not support multiple elements of the same Mlme_t type. More...

Data Structures

struct  MlmeConfirmQueue_t
 

Macros

#define LORA_MAC_MLME_CONFIRM_QUEUE_LEN   5
 

Functions

void LoRaMacConfirmQueueInit (LoRaMacPrimitives_t *primitive)
 Initializes the confirm queue. More...
 
bool LoRaMacConfirmQueueAdd (MlmeConfirmQueue_t *mlmeConfirm)
 Adds an element to the confirm queue. More...
 
bool LoRaMacConfirmQueueRemoveLast (void)
 Removes the last element which was added into the queue. More...
 
bool LoRaMacConfirmQueueRemoveFirst (void)
 Removes the first element which was added to the confirm queue. More...
 
void LoRaMacConfirmQueueSetStatus (LoRaMacEventInfoStatus_t status, Mlme_t request)
 Sets the status of an element. More...
 
LoRaMacEventInfoStatus_t LoRaMacConfirmQueueGetStatus (Mlme_t request)
 Gets the status of an element. More...
 
void LoRaMacConfirmQueueSetStatusCmn (LoRaMacEventInfoStatus_t status)
 Sets a common status for all elements in the queue. More...
 
LoRaMacEventInfoStatus_t LoRaMacConfirmQueueGetStatusCmn (void)
 Gets the common status of all elements. More...
 
bool LoRaMacConfirmQueueIsCmdActive (Mlme_t request)
 Verifies if a request is in the queue and active. More...
 
void LoRaMacConfirmQueueHandleCb (MlmeConfirm_t *mlmeConfirm)
 Handles all callbacks of active requests. More...
 
uint8_t LoRaMacConfirmQueueGetCnt (void)
 Query number of elements in the queue. More...
 
bool LoRaMacConfirmQueueIsFull (void)
 Verify if the confirm queue is full. More...
 

Variables

Mlme_t Request
 
LoRaMacEventInfoStatus_t Status
 
bool ReadyToHandle
 
bool RestrictCommonReadyToHandle
 

Detailed Description

This module specifies the API implementation of the LoRaMAC confirm queue. The confirm queue is implemented with as a ring buffer. The number of elements can be defined with LORA_MAC_MLME_CONFIRM_QUEUE_LEN. The current implementation does not support multiple elements of the same Mlme_t type.


Data Structure Documentation

◆ MlmeConfirmQueue_t

struct MlmeConfirmQueue_t

Structure to hold multiple MLME request confirm data

Data Fields
Mlme_t Request

Holds the previously performed MLME-Request

LoRaMacEventInfoStatus_t Status

Status of the operation

bool ReadyToHandle

Set to true, if the request is ready to be handled

bool RestrictCommonReadyToHandle

Set to true, if it is not permitted to set the ReadyToHandle variable with a function call to LoRaMacConfirmQueueSetStatusCmn.

Macro Definition Documentation

◆ LORA_MAC_MLME_CONFIRM_QUEUE_LEN

#define LORA_MAC_MLME_CONFIRM_QUEUE_LEN   5

LoRaMac MLME-Confirm queue length

Function Documentation

◆ LoRaMacConfirmQueueInit()

void LoRaMacConfirmQueueInit ( LoRaMacPrimitives_t primitive)

Initializes the confirm queue.

Parameters
[IN]primitives - Pointer to the LoRaMac primitives.

◆ LoRaMacConfirmQueueAdd()

bool LoRaMacConfirmQueueAdd ( MlmeConfirmQueue_t mlmeConfirm)

Adds an element to the confirm queue.

Parameters
[IN]mlmeConfirm - Pointer to the element to add.
Return values
[true- operation was successful, false - operation failed]

◆ LoRaMacConfirmQueueRemoveLast()

bool LoRaMacConfirmQueueRemoveLast ( void  )

Removes the last element which was added into the queue.

Return values
[true- operation was successful, false - operation failed]

◆ LoRaMacConfirmQueueRemoveFirst()

bool LoRaMacConfirmQueueRemoveFirst ( void  )

Removes the first element which was added to the confirm queue.

Return values
[true- operation was successful, false - operation failed]

◆ LoRaMacConfirmQueueSetStatus()

void LoRaMacConfirmQueueSetStatus ( LoRaMacEventInfoStatus_t  status,
Mlme_t  request 
)

Sets the status of an element.

Parameters
[IN]status - The status to set.
[IN]request - The related request to set the status.

◆ LoRaMacConfirmQueueGetStatus()

LoRaMacEventInfoStatus_t LoRaMacConfirmQueueGetStatus ( Mlme_t  request)

Gets the status of an element.

Parameters
[IN]request - The request to query the status.
Return values
Thestatus of the related MlmeRequest.

◆ LoRaMacConfirmQueueSetStatusCmn()

void LoRaMacConfirmQueueSetStatusCmn ( LoRaMacEventInfoStatus_t  status)

Sets a common status for all elements in the queue.

Parameters
[IN]status - The status to set.

◆ LoRaMacConfirmQueueGetStatusCmn()

LoRaMacEventInfoStatus_t LoRaMacConfirmQueueGetStatusCmn ( void  )

Gets the common status of all elements.

Return values
Thecommon status of all elements.

◆ LoRaMacConfirmQueueIsCmdActive()

bool LoRaMacConfirmQueueIsCmdActive ( Mlme_t  request)

Verifies if a request is in the queue and active.

Parameters
[IN]request - The request to verify.
Return values
[true- element is in the queue, false - element is not in the queue].

◆ LoRaMacConfirmQueueHandleCb()

void LoRaMacConfirmQueueHandleCb ( MlmeConfirm_t mlmeConfirm)

Handles all callbacks of active requests.

Parameters
[IN]mlmeConfirm - Pointer to the generic mlmeConfirm structure.

◆ LoRaMacConfirmQueueGetCnt()

uint8_t LoRaMacConfirmQueueGetCnt ( void  )

Query number of elements in the queue.

Return values
Numberof elements.

◆ LoRaMacConfirmQueueIsFull()

bool LoRaMacConfirmQueueIsFull ( void  )

Verify if the confirm queue is full.

Return values
[true- queue is full, false - queue is not full].

Variable Documentation

◆ Request

Mlme_t Request

Holds the previously performed MLME-Request

◆ Status

Status of the operation

◆ ReadyToHandle

bool ReadyToHandle

Set to true, if the request is ready to be handled

◆ RestrictCommonReadyToHandle

bool RestrictCommonReadyToHandle

Set to true, if it is not permitted to set the ReadyToHandle variable with a function call to LoRaMacConfirmQueueSetStatusCmn.