Cleaning up the api.

This commit is contained in:
2021-10-17 15:52:15 -04:00
parent 2ee1f0f1f4
commit 3f78a53014
15 changed files with 551 additions and 202 deletions

View File

@@ -0,0 +1,15 @@
/// 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
}
}