Multicast : Pb receiving two messages within 10ms

Discussion to talk about software related topics only.
Post Reply
ghislaine
Posts: 5
Joined: Thu May 15, 2008 5:09 am

Multicast : Pb receiving two messages within 10ms

Post 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
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: Multicast : Pb receiving two messages within 10ms

Post 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
ghislaine
Posts: 5
Joined: Thu May 15, 2008 5:09 am

Re: Multicast : Pb receiving two messages within 10ms

Post 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
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: Multicast : Pb receiving two messages within 10ms

Post 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
Post Reply