StoredInsulinModel.swift 721 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // StoredInsulinModel.swift
  3. // LoopKit
  4. //
  5. // Created by Darin Krauss on 7/23/20.
  6. // Copyright © 2020 LoopKit Authors. All rights reserved.
  7. //
  8. import Foundation
  9. public struct StoredInsulinModel: Codable, Equatable {
  10. public enum ModelType: String, Codable {
  11. case fiasp
  12. case rapidAdult
  13. case rapidChild
  14. case walsh
  15. }
  16. public let modelType: ModelType
  17. public let actionDuration: TimeInterval
  18. public let peakActivity: TimeInterval?
  19. public init(modelType: ModelType, actionDuration: TimeInterval, peakActivity: TimeInterval? = nil) {
  20. self.modelType = modelType
  21. self.actionDuration = actionDuration
  22. self.peakActivity = peakActivity
  23. }
  24. }