downloadMeasurements

abstract suspend fun downloadMeasurements(startDate: Long? = null, endDate: Long? = null, updateProgress: suspend (progress: Progress) -> Unit): Map<Channel, List<MeasurementsPacket>>

Start operation which will transfer measurements from a given time range defined by optional startDate and endDate timestamp constraints. Time range limitation using timestamps is supported by sensors 6.0 and newer. For older sensor all measurements will be transferred. If this command is run on older sensors then all measurements will be returned regardless if startDate or endDate were provided or not.

Return

map of measurement packets for each channel

Parameters

startDate

timestamp in epoch seconds of first measurements to be downloaded or null if time range should not be limited from the start

endDate

timestamp in epoch seconds of last measurements to be downloaded or null if time range should not be limited form the end