Files
swift-mqtt-dewpoint/Sources/Models/Sensor.swift
2021-10-17 15:52:15 -04:00

16 lines
363 B
Swift

/// Represents a sensor that provides a reading.
public struct Sensor<Reading>: Equatable {
/// The topic to retrieve the reading from.
public var topic: String
/// Create a new sensor for the given topic.
///
/// - Parameters:
/// - topic: The topic to retrieve the readings from.
public init(topic: String) {
self.topic = topic
}
}