UDP Datagram format? header? crc?

Hi,
I’m getting datagrams sent in raw mode from an external c++ remote program.

For the last couple of months I’ve been using Panda mostly in c++ and getting the datagrams through direct use of winsock.

Today I decided to use Panda’s own UDP in Python mode, what I’m getting is

:net(error): Ignoring invalid UDP datagram.

This looks like Panda is expecting its datagrams with an header and maybe a CRC.

Is this true, and how to strap this if I want to get minimal raw data?

I do it in c++, but I’d like to use Python for prototyping from time to time…

Use ConnectionReader.setRawMode(True) to tell Panda not to expect its usual headers. :slight_smile:

David

done! thank you.

I have an additional question: assuming the sender keeps sending UDP packets at a rate that is far above the sampling capability of the receiver (here the ConnectionReader):

is there a automated way to drop in a FIFO way the ‘old’ packets and keep alive only say the more recent N_Packets in the receive queue?
would the ‘backlog’ parameter play this role?

No, you’ll have to implement that yourself somehow. For instance, pull them off the ConnectionReader and just stuff them immediately into a queue with minimal processing, and then process only the last N items in the queue.

David