feat: WIP

This commit is contained in:
2025-03-04 07:26:51 -05:00
parent 9da4149391
commit 19a51598e4
8 changed files with 201 additions and 78 deletions

View File

@@ -0,0 +1,50 @@
public enum HeatingBalancePoint {
public enum Mode: String, CaseIterable, Codable, Equatable, Sendable {
case thermal
}
public enum Request: Codable, Equatable, Sendable {
case thermal(Thermal)
public struct Thermal: Codable, Equatable, Sendable {
public let systemSize: Double
public let capacityAt47: Double?
public let capacityAt17: Double?
public let heatingDesignTemperature: Double
public let buildingHeatLoss: Double
public init(
systemSize: Double,
capacityAt47: Double? = nil,
capacityAt17: Double? = nil,
heatingDesignTemperature: Double,
buildingHeatLoss: Double
) {
self.systemSize = systemSize
self.capacityAt47 = capacityAt47
self.capacityAt17 = capacityAt17
self.heatingDesignTemperature = heatingDesignTemperature
self.buildingHeatLoss = buildingHeatLoss
}
}
}
public enum Response: Codable, Equatable, Sendable {
case thermal(Thermal)
public struct Thermal: Codable, Equatable, Sendable {
public let capacityAt47: Double
public let capacityAt17: Double
public let balancePointTemperature: Double
public init(capacityAt47: Double, capacityAt17: Double, balancePointTemperature: Double) {
self.capacityAt47 = capacityAt47
self.capacityAt17 = capacityAt17
self.balancePointTemperature = balancePointTemperature
}
}
}
}

View File

@@ -4,6 +4,7 @@ import Foundation
import PsychrometricClient
@preconcurrency import URLRouting
// swiftlint:disable type_body_length
public enum SiteRoute: Equatable, Sendable {
case api(Api)
@@ -392,3 +393,5 @@ public extension SiteRoute {
}
}
}
// swiftlint:enable type_body_length