23#ifndef ZWAVE_TX_INCOMING_FRAMES_HPP
24#define ZWAVE_TX_INCOMING_FRAMES_HPP
54 return lhs.node_id > rhs.node_id;
134 if (it->incoming_frames <= 1) {
138 it->incoming_frames -= 1;
156 return it->incoming_frames;
Priority Queue.
Definition: priority_queue.hpp:56
constexpr iterator begin() noexcept
if queue != empty() it returns a pointer to the beginning of the queue. The item with the highest pri...
Definition: priority_queue.hpp:207
constexpr iterator end() noexcept
iterator that points past the last element in the queue.
Definition: priority_queue.hpp:217
constexpr void clear() noexcept
remove all items from the queue.
Definition: priority_queue.hpp:255
constexpr bool empty() const noexcept
returns if the queue is empty. in this case both begin() and end() point to nullptr
Definition: priority_queue.hpp:196
iterator erase(const_iterator iterator)
removes an item from the queue by iterator. Performance: O(log n)
Definition: priority_queue.hpp:147
bool insert(value_type &&item) noexcept
inserts a value into the queue. inserts are ordered by their priority. this function takes O(log n) t...
Definition: priority_queue.hpp:75
Definition: zwave_tx_incoming_frames.hpp:60
bool empty() const
Checks if we have any expected frame at all.
Definition: zwave_tx_incoming_frames.hpp:176
sl_status_t decrement_frames(zwave_node_id_t node_id)
Decrements the number of expected frames from a NodeID.
Definition: zwave_tx_incoming_frames.hpp:129
sl_status_t insert(zwave_node_id_t node_id, number_of_frames_t incoming_frames)
Helper function that inserts a NodeID / Frame pair in the frame list.
Definition: zwave_tx_incoming_frames.hpp:79
void clear()
Clears the entire list of expected frames.
Definition: zwave_tx_incoming_frames.hpp:167
sl_status_t set_frames(zwave_node_id_t node_id, number_of_frames_t incoming_frames)
Sets the number of expected frames from a NodeID.
Definition: zwave_tx_incoming_frames.hpp:98
number_of_frames_t get_frames(zwave_node_id_t node_id)
Gets the number of expected frames from a NodeID.
Definition: zwave_tx_incoming_frames.hpp:152
priority_queue< zwave_tx_incoming_frame_item_t, ZWAVE_TX_INCOMING_FRAMES_BUFFER_SIZE, incoming_frame_item_compare > frame_list
Definition: zwave_tx_incoming_frames.hpp:66
#define SL_STATUS_OK
No error.
Definition: sl_status.h:49
uint32_t sl_status_t
Definition: sl_status.h:139
#define SL_STATUS_FAIL
Generic error.
Definition: sl_status.h:50
#define SL_STATUS_NOT_FOUND
Item could not be found.
Definition: sl_status.h:100
uint16_t zwave_node_id_t
Z-Wave NodeID type.
Definition: zwave_node_id_definitions.h:84
uint8_t number_of_frames_t
Definition: zwave_tx_incoming_frames.hpp:34
number_of_frames_t incoming_frames
Definition: zwave_tx_incoming_frames.hpp:44
zwave_tx_incoming_frame_item { zwave_node_id_t node_id zwave_tx_incoming_frame_item_t
Keeps track of NodeIDs and their expected spontaneous frames.
Definition: zwave_tx_incoming_frames.hpp:42
Comparion function for zwave_tx_incoming_frame_item_t objects.
Definition: zwave_tx_incoming_frames.hpp:50
bool operator()(const zwave_tx_incoming_frame_item_t &lhs, const zwave_tx_incoming_frame_item_t &rhs) const
Definition: zwave_tx_incoming_frames.hpp:51
const zwave_node_id_t node_id
#define ZWAVE_TX_INCOMING_FRAMES_BUFFER_SIZE
Definition: zwave_tx.h:31