Disruptive Documentation

Structure Network​Status​Event

public struct NetworkStatusEvent: Codable, Equatable  

A network status event describes which Cloud Connectors a sensor is connected to, and how strong that connection is. A network status event is sent on every heartbeat, as well as when a sensor is touched.

See the Developer Website for more details.

%199 NetworkStatusEvent NetworkStatusEvent Codable Codable NetworkStatusEvent->Codable PublishableEvent PublishableEvent NetworkStatusEvent->PublishableEvent Equatable Equatable NetworkStatusEvent->Equatable

Nested Types

NetworkStatusEvent.CloudConnector

A Cloud Connector that picked a network status event for a sensor.

NetworkStatusEvent.TransmissionMode

The transmission mode the sensor is currently in. The sensor will automatically switch transmission modes when the sensor has low connectivity to a Cloud Connector. See the Help Center for more details.

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(signal​Strength:​rssi:​timestamp:​cloud​Connectors:​transmission​Mode:​)

public init(
        signalStrength   : Int,
        rssi             : Int,
        timestamp        : Date,
        cloudConnectors  : [CloudConnector],
        transmissionMode : TransmissionMode) 

Creates a new NetworkStatusEvent.

init(from:​)

public init(from decoder: Decoder) throws  

Properties

signal​Strength

public let signalStrength: Int

The signal strength of the sensor as a percentage. This is a convenience value that is determined directly from the rssi. This will be the strongest signal strength received by all the Cloud Connector(s) in the cloudConnectors array.

rssi

public let rssi: Int

The raw signal strength of the sensor. This will be the strongest RSSI received by all the Cloud Connector(s) in the cloudConnectors array. See Wikipedia for more details.

timestamp

public let timestamp: Date

The timestamp of when the network status event was received by a Cloud Connector.

cloud​Connectors

public let cloudConnectors: [CloudConnector] 

The Cloud Connector(s) that picked up this event.

NOTE: When this event is received through a DeviceEventStream, the historical events, or a Data Connector, this event will only contain one Cloud Connector even if multiple Cloud Connectors were in range. You should expect to see one of these events per Cloud Connector in range. However, when looking in the reportedEvents field for a device, the last known network status events will be grouped together, meaning this cloudConnectors array will list all the Cloud Connectors that were in range.

transmission​Mode

public let transmissionMode: TransmissionMode

Which transmission mode the sensor was in when sending this network status event.

event​Type

public var eventType: EventType  

Methods

encode(to:​)

public func encode(to encoder: Encoder) throws