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...
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.
◆ 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.
|
◆ LORA_MAC_MLME_CONFIRM_QUEUE_LEN
#define LORA_MAC_MLME_CONFIRM_QUEUE_LEN 5 |
LoRaMac MLME-Confirm queue length
◆ LoRaMacConfirmQueueInit()
Initializes the confirm queue.
- Parameters
-
[IN] | primitives - Pointer to the LoRaMac primitives. |
◆ LoRaMacConfirmQueueAdd()
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()
Sets the status of an element.
- Parameters
-
[IN] | status - The status to set. |
[IN] | request - The related request to set the status. |
◆ LoRaMacConfirmQueueGetStatus()
Gets the status of an element.
- Parameters
-
[IN] | request - The request to query the status. |
- Return values
-
The | status of the related MlmeRequest. |
◆ LoRaMacConfirmQueueSetStatusCmn()
Sets a common status for all elements in the queue.
- Parameters
-
[IN] | status - The status to set. |
◆ LoRaMacConfirmQueueGetStatusCmn()
Gets the common status of all elements.
- Return values
-
The | common 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()
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
-
◆ LoRaMacConfirmQueueIsFull()
bool LoRaMacConfirmQueueIsFull |
( |
void |
| ) |
|
Verify if the confirm queue is full.
- Return values
-
[true | - queue is full, false - queue is not full]. |
◆ Request
Holds the previously performed MLME-Request
◆ Status
◆ 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.