DeviceStatusHighlight.swift 720 B

12345678910111213141516171819202122232425262728
  1. //
  2. // DeviceStatusHighlight.swift
  3. // LoopKit
  4. //
  5. // Created by Nathaniel Hamming on 2020-06-23.
  6. // Copyright © 2020 LoopKit Authors. All rights reserved.
  7. //
  8. public protocol DeviceStatusHighlight: Codable {
  9. /// a localized message from the device
  10. var localizedMessage: String { get }
  11. /// the system name of the icon related to the message
  12. var imageName: String { get }
  13. /// the state of the status highlight (guides presentation)
  14. var state: DeviceStatusHighlightState { get }
  15. }
  16. public typealias DeviceStatusHighlightState = DeviceStatusElementState
  17. public enum DeviceStatusElementState: String, Codable {
  18. case critical
  19. case normalCGM
  20. case normalPump
  21. case warning
  22. }