RssiHistogram

public class RssiHistogram : SensorDelegate

Accumulate histogram of all RSSI measurements to build a profile of the receiver for normalisation

  • min

    Undocumented

    Declaration

    Swift

    public let min: Int
  • max

    Undocumented

    Declaration

    Swift

    public let max: Int
  • Undocumented

    Declaration

    Swift

    public var histogram: [Int64]
  • Undocumented

    Declaration

    Swift

    public var description: String { get }
  • Accumulate histogram of RSSI for value range [min, max] and auto-write profile to storage at regular intervals

    Declaration

    Swift

    public init(min: Int, max: Int, updatePeriod: TimeInterval = TimeInterval.minute, textFile: TextFile? = nil)
  • Declaration

    Swift

    public func sensor(_ sensor: SensorType, didMeasure: Proximity, fromTarget: TargetIdentifier)
  • Add RSSI sample

    Declaration

    Swift

    public func add(_ rssi: Int)
  • Undocumented

    Declaration

    Swift

    public func add(_ rssiValue: Double)
  • Undocumented

    Declaration

    Swift

    public func clear()
  • Undocumented

    Declaration

    Swift

    public func samplePercentile(_ percentile: Double) -> Int
  • Undocumented

    Declaration

    Swift

    public func normalisedPercentile(_ percentile: Double) -> Double
  • Read profile data from storage, this replaces existing in-memory profile

    Declaration

    Swift

    public func read(_ textFile: TextFile)
  • Write profile data to storage

    Declaration

    Swift

    public func write(_ textFile: TextFile)

Histogram equalisation

  • Undocumented

    Declaration

    Swift

    public func update()

Normalisation

  • Undocumented

    Declaration

    Swift

    public func normalise(_ rssi: Int) -> Double
  • Undocumented

    Declaration

    Swift

    public func normalise(_ rssi: Double) -> Double