ForecastStruct

struct ForecastStruct

Indicates a list of slots to describe the overall timing of the ESA’s planned energy and power usage, with different power and energy demands for each slot. For example, slots might be used to describe the distinct stages of a washing machine cycle.

  • Indicates which element of the Slots list is currently active in the forecast sequence. A null value indicates that the sequence has not yet started.

    Declaration

    Swift

    let activeSlotNumber: UInt16?
  • The planned start time, in UTC, for the entire forecast.

    Declaration

    Swift

    let startTime: UInt32
  • The planned end time, in UTC, for the entire forecast.

    Declaration

    Swift

    let endTime: UInt32
  • The earliest time, in UTC, that the ESA can start the forecast sequence.

    Declaration

    Swift

    let earliestStartTime: UInt32?
  • The latest end time, in UTC, for the entire forecast.

    Declaration

    Swift

    let latestEndTime: UInt32?
  • A list of SlotStructs where the list must contain at least one entry but no more than 10.

    Declaration

  • The reason for updating the forecast.

    Declaration

  • Creates a new Struct instance using data read from the given TraitDecoder.

    Throws

    HomeError.parseError when parsing fails.

    Declaration

    Swift

    init(decoder: TraitDecoder) throws

    Parameters

    decoder

    The raw data representing this Struct.

  • Writes this Struct to the given TraitEncoder. Throws HomeError.parseError if the data could not be encoded.

    Declaration

    Swift

    func encode(with encoder: TraitEncoder) throws
  • Returns the field corresponding to the given field ID.

    Declaration

    Swift

    static func structField(id: UInt32) -> (any Field)?