Page 1 of 1

Multicast : Pb receiving two messages within 10ms

Posted: Mon Jul 05, 2010 7:04 am
by ghislaine
hello,

I have to listen to a PTP server on MOD5234. My problem is that the PTP server sends two messages seperated only by a few ms.
I read a message from Stephan posted on april 16th,2010 and I tried to use 2 file descriptors on the same port (multicast.cpp modified and system files rebuilt).
The 2 file descriptors works well, but the second message is always losed.
Has anybody met the same problem?
Is there any known solution?

thanks,

Ghislaine

Re: Multicast : Pb receiving two messages within 10ms

Posted: Tue Jul 06, 2010 8:00 am
by pbreed
Just use the single receiving port, if two packets are sent, two packets will be received.
Read one then read the next. with default settings the system can read close to 240+ packets onto the
same receiving FIFO before you run out of storage space. When you read, you will get one packet at a time.

Paul

Re: Multicast : Pb receiving two messages within 10ms

Posted: Wed Jul 07, 2010 2:25 am
by ghislaine
thanks Paul,

I made a great mistake! I was very surprise because I have already received multicast packets.
But here, the first message was on the PTP event port(319), and the second was on the PTP general port(320). And I was just listening to event port.
So I have to use 2 fifos and it works well.

regards,

Ghislaine

Re: Multicast : Pb receiving two messages within 10ms

Posted: Wed Jul 07, 2010 11:14 am
by pbreed
You can use the SAME fifo and register it multiple times.
That way you can receive multiple different ports on the same fifo and can use the
udp class access functions to see what port the message came in on.

Paul