17#include <zephyr/kernel.h>
26#define QOS_MESSAGE_ID_BASE 15000
39#define QOS_FLAG_RELIABILITY_ACK_DISABLED 0x01
48#define QOS_FLAG_RELIABILITY_ACK_REQUIRED 0x02
qos_evt_type
Events notified by the library's callback handler.
Definition qos.h:53
@ QOS_EVT_MESSAGE_NEW
Definition qos.h:58
@ QOS_EVT_MESSAGE_TIMER_EXPIRED
Definition qos.h:66
@ QOS_EVT_MESSAGE_REMOVED_FROM_LIST
Definition qos.h:75
void qos_message_notify_all(void)
Notify all pending messages. All messages that are currently stored in the internal list will be noti...
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_MA...
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 ...
int qos_init(qos_evt_handler_t evt_handler)
Function that initializes the QoS library.
void qos_message_remove_all(void)
Remove all pending messages. All messages that are currently stored in the internal list will be remo...
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.
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...
void(* qos_evt_handler_t)(const struct qos_evt *evt)
QoS library event handler.
Definition qos.h:130
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 leve...
void qos_timer_reset(void)
Reset and stop an ongoing timer backoff.
uint16_t notified_count
Definition qos.h:99
bool heap_allocated
Definition qos.h:115
uint16_t id
Definition qos.h:94
struct qos_payload data
Definition qos.h:109
uint8_t type
Definition qos.h:106
uint32_t flags
Definition qos.h:91
Structure that contains the message payload and corresponding metadata.
Definition qos.h:87
enum qos_evt_type type
Definition qos.h:121
struct qos_data message
Definition qos.h:123
Library callback event structure.
Definition qos.h:119
size_t len
Definition qos.h:83
uint8_t * buf
Definition qos.h:81
Structure used to keep track of unACKed messages.
Definition qos.h:79