Disruptive Documentation

Structure Object​Present​Count​Event

public struct ObjectPresentCountEvent: Codable, Equatable  

An event that includes the accumulated count of proximity state changes for a Counting Proximity sensor. These events are sent every heartbeat, and not when the sensor is touched or when the state is switched (to save battery life).

See the Developer Website for more details.

%39 ObjectPresentCountEvent ObjectPresentCountEvent Equatable Equatable ObjectPresentCountEvent->Equatable Codable Codable ObjectPresentCountEvent->Codable PublishableEvent PublishableEvent ObjectPresentCountEvent->PublishableEvent

Conforms To

PublishableEvent

Used by event types (such as TouchEvent) to indicate that they can be published to the device emulator.

Codable
Equatable

Initializers

init(total:​timestamp:​)

public init(total: Int, timestamp: Date)  

Creates a new ObjectPresentCountEvent.

init(from:​)

public init(from decoder: Decoder) throws  

Properties

total

public let total: Int

The total accumulated state switches for this sensor.

timestamp

public let timestamp: Date

The timestamp of when the object present count event was received by a Cloud Connector.

event​Type

public var eventType: EventType  

Methods

encode(to:​)

public func encode(to encoder: Encoder) throws