mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-03 03:09:59 +00:00
Expose front() function in MeshPacketQueue
This commit is contained in:
parent
9097475149
commit
616c7d7b0e
@ -72,6 +72,16 @@ MeshPacket *MeshPacketQueue::dequeue()
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MeshPacket *MeshPacketQueue::getFront()
|
||||||
|
{
|
||||||
|
if (empty()) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto *p = queue.front();
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
/** Attempt to find and remove a packet from this queue. Returns a pointer to the removed packet, or NULL if not found */
|
/** Attempt to find and remove a packet from this queue. Returns a pointer to the removed packet, or NULL if not found */
|
||||||
MeshPacket *MeshPacketQueue::remove(NodeNum from, PacketId id)
|
MeshPacket *MeshPacketQueue::remove(NodeNum from, PacketId id)
|
||||||
{
|
{
|
||||||
|
@ -28,6 +28,8 @@ class MeshPacketQueue
|
|||||||
|
|
||||||
MeshPacket *dequeue();
|
MeshPacket *dequeue();
|
||||||
|
|
||||||
|
MeshPacket *getFront();
|
||||||
|
|
||||||
/** Attempt to find and remove a packet from this queue. Returns the packet which was removed from the queue */
|
/** Attempt to find and remove a packet from this queue. Returns the packet which was removed from the queue */
|
||||||
MeshPacket *remove(NodeNum from, PacketId id);
|
MeshPacket *remove(NodeNum from, PacketId id);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user