UDP Queue - number of packets queued? #84
-
Is there any way to tell how many UDP packets are queued when the constructor is EthernetUDP udp{QNE_PKT_QUEUE_LEN} ? As well, knowing that there were dropped packets since the last udp.parsepacket() call would be nice. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
I can add those, but I need to put some thought into what I want to call the methods. |
Beta Was this translation helpful? Give feedback.
-
Shawn, My two cent's worth... Yes, it will be good to be clear whether the call relates to current (parsePacket), next (peek) or total queue. In the current doco, it takes some careful reading to understand the meaning of the various uses of 'size' In choosing terms. For instance, changing the word might help clarify if receiveQueueSize() returns the maximum, or current, length of the queue. Capacity is useful for referring to the maximum possible length, rather than the current number of queued packets. Using 'queueSize' for the current queue length could help distinguish it from the size() method of a parsed packet. |
Beta Was this translation helpful? Give feedback.
-
I changed size->capacity and the new size means "how full". I also added Note that these counts are at the layer above the driver. To access the driver-layer dropped packets, you need to use the |
Beta Was this translation helpful? Give feedback.
-
Thanks, I will try out the UDP versions and provide any insights I find. |
Beta Was this translation helpful? Give feedback.
I changed size->capacity and the new size means "how full". I also added
droppedReceiveCount()
andtotalReceiveCount()
functions to bothEthernetUDP
andEthernetFrame
. Check out the latest pushes.Note that these counts are at the layer above the driver. To access the driver-layer dropped packets, you need to use the
LINK_STATS
option.