sforkowany z mirror/meshtastic-firmware
Expose front() function in MeshPacketQueue
rodzic
9097475149
commit
616c7d7b0e
|
@ -72,6 +72,16 @@ MeshPacket *MeshPacketQueue::dequeue()
|
|||
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 */
|
||||
MeshPacket *MeshPacketQueue::remove(NodeNum from, PacketId id)
|
||||
{
|
||||
|
|
|
@ -28,6 +28,8 @@ class MeshPacketQueue
|
|||
|
||||
MeshPacket *dequeue();
|
||||
|
||||
MeshPacket *getFront();
|
||||
|
||||
/** 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);
|
||||
};
|
||||
|
|
Ładowanie…
Reference in New Issue