MessageStruct

struct MessageStruct

Information about a single message.

  • A globally unique ID for this message.

    Declaration

    Swift

    let messageID: Data
  • The priority level for this message.

    Declaration

  • Control information related to the message.

    Declaration

    Swift

    let messageControl: Matter.MessagesTrait.MessageControlBitmap
  • The time, in UTC, at which the message becomes available to be presented. A null value indicates that the message is available immediately.

    Declaration

    Swift

    let startTime: UInt32?
  • The amount of time, in milliseconds, after the startTime during which the message is available to be presented. A null value means that the duration time remains the same until it’s actively changed.

    Declaration

    Swift

    let duration: UInt64?
  • A string that contains the message to be presented.

    Declaration

    Swift

    let messageText: String
  • A list of responses that the user can select to dismiss the message.

    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)?