FlowManager Documentation Beta

Enumeration Event

public enum Event

The anomaly event type detected by the FlowManager while processing samples in the processSample method

%3 Event Event Equatable Equatable Event->Equatable Hashable Hashable Event->Hashable Codable Codable Event->Codable CustomStringConvertible CustomStringConvertible Event->CustomStringConvertible

Conforms To

Codable
CustomStringConvertible
Equatable
Hashable

Enumeration Cases

missing​Data

case missingData(timeInterval: TimeInterval, expectedSampleMissing: Int)

Event fired if processSample is receiving a new sample with a timestamp difference from previous sample greater then a configurable threshold

alarm

case alarm(type: AlarmType)

Anomaly event for a seizure detection. It is fired in case BPM value, or BPM speed compared with previous values, is greater or lower then the configurable parameters for immediate alarm. It could be fired also if the flow of sample data continue to have BPM values greater or lower then the configurable parameters for immediate alarm for a certain configurable time.

warning

case warning(type: AlarmType)

Anomaly event for a warning situation. It is fired in case BPM value is greater or lower then the configurable parameters for normal range.

back​ToOk

case backToOk

Event fired in case of returning to normality after an Alarm event

no​Data

case noData

Event fired is the receive sample data has no BPM value

Initializers

init(from:​)

public init(from decoder: Decoder) throws

Initialiaze the event using the Codable protocol

Properties

description

var description: String

A string description of the Event. Useful for logging messages.

Methods

encode(to:​)

public func encode(to encoder: Encoder) throws

Persist the event using the Codable protocol

json​String()

public func jsonString() -> String

Utility method to persist the event in a JSON string

load​From​Json(json​String:​)

public func loadFromJson(jsonString: String) -> Event

Utility method to load an event from a JSON string