#include <zephyr/kernel.h>
#include <stdbool.h>
#include <stdio.h>
Go to the source code of this file.
|
int | qos_init (qos_evt_handler_t evt_handler) |
| Function that initializes the QoS library.
|
|
int | qos_message_add (struct qos_data *message) |
| Add a message to the library. If the message fails to be added to the internal list because the list is full, the message will be notified with the QOS_EVT_MESSAGE_REMOVED_FROM_LIST event, so that it can be freed if heap allocated. When this API is called, the event QOS_EVT_MESSAGE_NEW is always notified with the corresponding message.
|
|
int | qos_message_remove (uint32_t id) |
| Remove message from internal list. An event QOS_EVT_MESSAGE_REMOVED_FROM_LIST will be notified in the library callback.
|
|
bool | qos_message_has_flag (const struct qos_data *message, uint32_t flag) |
| Function that checks if a flag is part of the bitmask associated with a message.
|
|
void | qos_message_print (const struct qos_data *message) |
| Function that prints the contents of a qos message structure. This requires that the library log level is set to debug level. CONFIG_QOS_LOG_LEVEL_DBG=y.
|
|
uint16_t | qos_message_id_get_next (void) |
| Generate message ID that counts from QOS_MESSAGE_ID_BASE message ID base. Count is reset if UINT16_MAX is reached.
|
|
void | qos_message_notify_all (void) |
| Notify all pending messages. All messages that are currently stored in the internal list will be notified via the QOS_EVT_MESSAGE_TIMER_EXPIRED event. This API does not clear the internal pending list.
|
|
void | qos_message_remove_all (void) |
| Remove all pending messages. All messages that are currently stored in the internal list will be removed. Each message will be notified in the QOS_EVT_MESSAGE_REMOVED_FROM_LIST callback event. This API clears the internal pending list.
|
|
void | qos_timer_reset (void) |
| Reset and stop an ongoing timer backoff.
|
|