On Mon, Jun 20, 2022 at 11:59:02AM +0800, 这个🍊 不太冷 wrote:
> Thanks for your quick reply.
> Q1.I have known the monitor socket should be created by the mointor, like PMC.
> 
> 
>     ptp4l --slave_event_monitor=/tmp/foo
>     pmc -u -i /tmp/foo

When I run those ^^^ commands, I see:

        0019b8.fffe.09896d-0 seq 129 SIGNALING SLAVE_RX_SYNC_TIMING_DATA N 1 
                sourcePortIdentity         a0369f.fffe.10cfaf-1
                sequenceId                 44565
                syncOriginTimestamp        1655732998.612437157
                totalCorrectionField       0
                scaledCumulativeRateOffset 0
                syncEventIngressTimestamp  1655732998.612437752
        0019b8.fffe.09896d-0 seq 138 SIGNALING SLAVE_DELAY_TIMING_DATA_NP N 1 
                sourcePortIdentity         a0369f.fffe.10cfaf-1
                sequenceId                 138
                delayOriginTimestamp       1655732998.628124923
                totalCorrectionField       0
                delayResponseTimestamp     1655732998.628125507
        0019b8.fffe.09896d-0 seq 130 SIGNALING SLAVE_RX_SYNC_TIMING_DATA N 1 
                sourcePortIdentity         a0369f.fffe.10cfaf-1
                sequenceId                 44566
                syncOriginTimestamp        1655732999.612473029
                totalCorrectionField       0
                scaledCumulativeRateOffset 0
                syncEventIngressTimestamp  1655732999.612473630

So it works!
Don't you see it working?

> The ptp4l don't need to create a socket fd bind the
> slave_event_monitor address, so how it send message to the local
> address? It use the API raw_send() to achieve send the message to
> the fd to PMC client? Socket  created only in  PMC, is it?

Read the code to find out how it works.

> I'm now using v3.1, port.c line 1298 is not the implementation
> code. Which version should I see.

Version v3.1
~~~~~~~~~~~~

   1176         switch (p->state) {
   1177         case PS_UNCALIBRATED:
   1178         case PS_SLAVE:
   1179                 monitor_sync(p->slave_event_monitor,
   1180                              clock_parent_identity(p->clock), seqid,
   1181                              t1, tmv_add(c1, c2), t2);
   1182                 break;
   1183         default:
   1184                 break;
   1185         }

HTH,
Richard



_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to