TimeSyncReply

data class TimeSyncReply(val flags: Int, val streamGen: Int, val seq: Int, val sampleNumber: Long, val sampleAgeUs: Long, val tNowUs: Long, val connInterval: Int)

One decoded reply of GattUuids.TIME_SYNC_CHARACTERISTIC (wire protocol v1, firmware 3.8.0+). See TimeSyncBlock for the byte layout. Unsigned wire fields are widened so every value is non-negative: 8- and 16-bit fields are Int, 32-bit fields are Long.

Constructors

Link copied to clipboard
constructor(flags: Int, streamGen: Int, seq: Int, sampleNumber: Long, sampleAgeUs: Long, tNowUs: Long, connInterval: Int)

Properties

Link copied to clipboard

the link's connection interval, in 1.25 ms units.

Link copied to clipboard

device time since that sample's DRDY, in microseconds; TimeSyncBlock.SAMPLE_AGE_INVALID without TimeSyncBlock.FLAG_SAMPLE_VALID and TimeSyncBlock.SAMPLE_AGE_MAX at the most it can say.

Link copied to clipboard

the sample the device numbered last, as the packet footers count them; 0 without TimeSyncBlock.FLAG_SAMPLE_VALID.

Link copied to clipboard
val seq: Int

incremented by the device on every read it answers.

Link copied to clipboard

low 8 bits of the device's stream generation of the anchored sample.

Link copied to clipboard

low 32 bits of the device's microsecond clock (esp_timer), read first in the read handler.