On Mon, Jan 18, 2021 at 07:01:22PM +0100, Juergen Werner wrote: > This approach sounds reasonable. Do I need to reimplement the 'GET > TIME_STATUS_NP' query or is there a library I could use from my C code? > Using pmc and parsing the output seems like a lot of overhead, which > could distort the measurement again.
I think your best bet is to implement it directly in C. If your sync rate is really high, then you should want to implement the "push" notification from ptp4l for TIME_STATUS_NP. This would happen on every Sync message. That would save you periodic queries from your application. Right now the only push notification is for PORT_DATA_SET, but I would like to have TIME_STATUS_NP as well. I am in the middle of re-factoring the PMC code into a pmc_agent module, but it isn't quite usable yet, and there is no support for TIME_STATUS_NP either. Thanks, Richard _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users