diff --git a/uavcan/time/62804.Synchronization.1.0.uavcan b/uavcan/time/62804.Synchronization.1.0.uavcan index d418801d..89c7ef6e 100644 --- a/uavcan/time/62804.Synchronization.1.0.uavcan +++ b/uavcan/time/62804.Synchronization.1.0.uavcan @@ -16,7 +16,8 @@ uint8 PUBLISHER_TIMEOUT_PERIOD_MULTIPLIER = 3 # The time when the PREVIOUS message was transmitted from the current publisher. # If this message is published for the first time, this field must be zero. -SystemTime.1 previous_transmission_timestamp +TimeReference.0.1 reference +truncated uint53 duration @assert offset % 8 == {0} @assert offset.max <= 56 # Must fit into one CAN 2.0 frame (least capable transport, smallest MTU) diff --git a/uavcan/time/Duration.1.0.uavcan b/uavcan/time/Duration.1.0.uavcan deleted file mode 100644 index 4d1f1d86..00000000 --- a/uavcan/time/Duration.1.0.uavcan +++ /dev/null @@ -1,13 +0,0 @@ -# -# Data type used for representing a duration since a contextually defomed event in time with microsecond resolution. -# This data type can both be used to build higher level abstractions such as `SystemTime` and `Instant` or be used directly. -# - -# This value is to never overflow. The value is 53-bit wide because: -# -# - 2^53 microseconds is about 285 years, which is enough. A 64-bit microsecond counter would be -# unnecessarily wide and its overflow interval of 585 thousand years induces a mild existential crisis. -# -# - CAN 2.0-based transports carry up to 7 bytes per frame. Time sync messages must use single-frame -# transfers, which means that the `SystemTime` type can't be wider than 56 bits. -truncated uint53 microseconds diff --git a/uavcan/time/SystemTime.1.0.uavcan b/uavcan/time/SystemTime.1.0.uavcan deleted file mode 100644 index 8141fe46..00000000 --- a/uavcan/time/SystemTime.1.0.uavcan +++ /dev/null @@ -1,24 +0,0 @@ -# -# The System Time defines a point in time in a concrete time reference. -# -# The moment of origin is defined per-application. Commonly chosen time bases are: -# - GPS time (other satellite positioning systems use different incompatible time bases) -# - TAI -# - In simple centralized applications: the local monotonic clock of the central controller - -# Local time since boot. A convinient fallback if no global time sync is available. -uint3 REFERENCE_BOOT = 0 -# Time defined as in Unix time since Jan 1. 1970. -uint3 REFERENCE_UNIX = 1 -# Time defined as in GPS Time since Jan 6. 1980. -uint3 REFERENCE_GPST = 2 -# Time defined as in international atomic time since Jan 1. 1977. -uint3 REFERENCE_TAI = 3 - -# 4, 5 and 6 is reserved for backward compatible future extensions. Do not use! - -uint3 REFERENCE_APPLICATION_TIME_1 = 7 # A custom (application dependent) time reference. - -uint3 reference - -Duration.1 time diff --git a/uavcan/time/TimeReference.0.1.uavcan b/uavcan/time/TimeReference.0.1.uavcan new file mode 100644 index 00000000..e69de29b