Cleaning up the api.
This commit is contained in:
15
Sources/Models/Sensor.swift
Normal file
15
Sources/Models/Sensor.swift
Normal 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user