Menu

#215 Realtime clock used in VxWorks

1.4.0.0
closed
None
2018-11-07
2018-10-23
No

There is a problem in the TRDP timing for VxWorks. In the vos_getTime function implementation for VxWorks, "CLOCK_REALTIME" is used instead of "CLOCK_MONOTONIC". This has as consequence that the timings get all wrong when the realtime clock is synchronized through NTP or other.

For example, if the clock is advanced by 10s, the published process data will be delayed by 10s too.

A possible fix is replacing:
clock_gettime(CLOCK_REALTIME, &myTime);

by:
clock_gettime(CLOCK_MONOTONIC, &myTime);

We tested the functionality with the latter and it fixed the problem.

Discussion

  • Bernd Löhr

    Bernd Löhr - 2018-10-29
    • status: open --> accepted
    • assigned_to: Bernd Löhr
     
  • Bernd Löhr

    Bernd Löhr - 2018-10-29

    It should be checked, whether CLOCK_MONOTONIC is available. That was not the case for older vxWorks versions.

     
  • Bernd Löhr

    Bernd Löhr - 2018-10-29
    • status: accepted --> pending
     
  • Bernd Löhr

    Bernd Löhr - 2018-11-07
    • Status: pending --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB