Structure
TemperatureEvent.TemperatureSample
public struct TemperatureSample: Codable, Equatable
Represents a temperature value sampled within a single heartbeat.
Relationships
Member Of
TemperatureEvent
A temperature event that is sent for temperature sensors every heartbeat, and whenever the sensor is touched.
Conforms To
Codable
Equatable
Initializers
init(celsius:timestamp:)
public init(celsius: Float, timestamp: Date)
Creates a new TemperatureSample
using celsius.
init(fahrenheit:timestamp:)
public init(fahrenheit: Float, timestamp: Date)
Creates a new TemperatureSample
using fahrenheit.
init(from:)
public init(from decoder: Decoder) throws
Properties
timestamp
public let timestamp: Date
The timestamp the temperature value was sample. This timestamp is estimated by DT Cloud, and may not be as accurate as the timestamp of the event itself.
Methods
encode(to:)
public func encode(to encoder: Encoder) throws