EventTrack

struct EventTrack

A track of detected events within a camera session, with details about what was detected.

  • The ID of the track.

    Declaration

    Swift

    let trackId: String
  • The timestamp in milliseconds since the Unix epoch of the start of the track.

    Declaration

    Swift

    let startTimestampMillis: UInt64
  • The timestamp in milliseconds since the Unix epoch of the end of the track.

    Declaration

    Swift

    let endTimestampMillis: UInt64
  • The types of events that were detected in this track, whose values come from EventType.

    Declaration

    Swift

    let eventTypes: [Google.CameraHistoryTrait.EventType]
  • Zones in this track where an event was detected. The zone values come from Zone.

    Declaration

    Swift

    let zones: [Google.CameraHistoryTrait.Zone]
  • The face that was detected in this track. The face values come from Face.

    Declaration

    Swift

    let face: Google.CameraHistoryTrait.Face
  • 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)?