Avnu / OpenAvnu

OpenAvnu - an Avnu sponsored repository for Time Sensitive Network (TSN and AVB) technology
464 stars 289 forks source link

gptp: Add monotonic raw clock option #795

Closed christopher-s-hall closed 6 years ago

christopher-s-hall commented 6 years ago

Timestamp clocks that implement the PTP_SYS_OFFSET_PRECISE ioctl return cross-timestamps with respect to monotonic raw and realtime Add configuration file option allowing clock selection for system/local clock relation

The default clock type is Realtime which is equivalent to the CLOCK_REALTIME option to clock_gettime Optionally, MonotonicRaw (equivalent to CLOCK_MONOTONIC_RAW) can be specified in the gPTP daemon configuration file:

[clock]

SystemClock = MonotonicRaw

Fixed Makefile issue where some shell configurations use built-in 'echo' and others don't Forces all to use /bin/echo

andrew-elder commented 6 years ago

Looks good to me. One small comment update requested. Can anyone else review this?

christopher-s-hall commented 6 years ago

I added more comments to the config file and I added a second commit to fix the mixed whitespace in gptp_cfg.hpp at least for that struct. My spacing was/is correct (tabs only). What was there wasn't.

andrew-elder commented 6 years ago

@pinealservo - looks good to me. If you agree, please go ahead and merge. Thanks for the updates @christopher-s-hall