Enumeration
Event
public enum Event
The anomaly event type detected by the FlowManager while processing samples in the processSample method
Relationships
Conforms To
Codable
CustomStringConvertible
Equatable
Hashable
Enumeration Cases
missingData
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.
backToOk
case backToOk
Event fired in case of returning to normality after an Alarm event
noData
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
jsonString()
public func jsonString() -> String
Utility method to persist the event in a JSON string
loadFromJson(jsonString:)
public func loadFromJson(jsonString: String) -> Event
Utility method to load an event from a JSON string