IOBEntry.swift 746 B

123456789101112131415161718192021222324252627282930313233
  1. import Foundation
  2. struct IOBEntry: JSON {
  3. let iob: Decimal
  4. let activity: Decimal
  5. let basaliob: Decimal
  6. let bolusiob: Decimal
  7. let netbasalinsulin: Decimal
  8. let bolusinulin: Decimal
  9. let iobWithZeroTemp: WithZeroTemp
  10. let lastBolusTime: UInt64
  11. let lastTemp: LastTemp
  12. var timestamp: Date?
  13. struct WithZeroTemp: JSON {
  14. let iob: Decimal
  15. let activity: Decimal
  16. let basaliob: Decimal
  17. let bolusiob: Decimal
  18. let netbasalinsulin: Decimal
  19. let bolusinulin: Decimal
  20. let time: Date
  21. }
  22. struct LastTemp: JSON {
  23. let rate: Decimal
  24. let timestamp: Date
  25. let started_at: Date
  26. let date: UInt64
  27. let duration: Decimal
  28. }
  29. }