Commit Graph

3 Commits (51b540875fab720ec8349582cb9f78fab624122a)

Author SHA1 Message Date
Richard Cochran a1c5e3f2ed transport: Fix callers to pass a proper enumeration value.
The majority of the callers of transport_send() use hard coded magic
numbers.  This patch fixes them to use the corresponding enumerated
values instead.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-04-13 22:29:05 -07:00
Michael Brown 29a99ad513 msg: Represent hw_timestamp "ts" field as tmv_t
Convert a hardware timestamp to the internal tmv_t representation at
the earliest possible opportunity.  This allows us to:

- eliminate multiple redundant calls to timespec_to_tmv()

- use tmv_add() instead of open-coded manipulation of a struct
  timespec in ts_add()

- use tmv_to_Timestamp() instead of open-coded manipulation of a
  struct timespec and struct Timestamp in ts_to_Timestamp()

- use tmv_is_zero() instead of open-coded manipulation of a struct
  timespec in msg_sots_valid()

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
2018-03-17 19:04:28 -07:00
Richard Cochran ab8dc20cf7 nsm: Implement the NetSync Monitor query.
This patch adds a new "NSM" program.  The new code handles only one
outstanding NSM command at a time.  If and when all four event time
stamps have arrived, the code prints the instantaneous estimated
offset without any averaging or smoothing.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-03-08 07:20:42 -08:00