On Mon, Jun 20, 2022 at 12:23:02AM +0800, 这个🍊 不太冷 via Linuxptp-users wrote:
> Q1. How do I use the this configuration item “slave_event_monitor”?

>     But I can not understand how it communicate with the
> ptp4l, I do not see the code about ptp4l send message to the
> monitor. According to my previous understanding, ptp4l send
> SLAVE_RX_SYNC_TIMING_DATA and SLAVE_DELAY_TIMING_DATA_NP TLVs to the
> client bind to the  slave_event_monitor address, is it?
> Where is it's Implementation process? I just see the
> monitor_create().

See port.c  line 1298.

> Q2. Any other way to get the management information(such as master, offset, 
> delay) without using PMC?

You don't have to use the pmc program.  You can use any program that
implements the IEEE 1588 management message protocol.

> Now I can use PMC send command "GET TIME_STATUS_NP" and "GET
> PORT_DATA_SET" to ptp4l uds_address get messages. It's no problem.
> But I notice every time I need to active the call and ptp4l poll()
> every port to process message, it will cause some reply delay and I
> have to wait to get it's response.  I wonder if there is any other
> way to let ptp4l active send "TIME_STATUS_NP" "PORT_DATA_SET" tlvs
> to user program(e.x. Every time ptp4l( run as slave) complete time
> sync, send the master time, offset, delay to user, user can get it
> any time they want)? Maybe can achieved through the question 1?

You can subscribe to receive

PORT_DATA_SET
TIME_STATUS_NP

via the push method.  No need to poll by sending requests.

HTH,
Richard



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

Reply via email to