207 lines
6.0 KiB
Swift
Generated
207 lines
6.0 KiB
Swift
Generated
///
|
|
/// NativePRVMetrics.swift
|
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
/// https://github.com/mrousavy/nitro
|
|
/// Copyright © Marc Rousavy @ Margelo
|
|
///
|
|
|
|
import NitroModules
|
|
|
|
/**
|
|
* Represents an instance of `NativePRVMetrics`, backed by a C++ struct.
|
|
*/
|
|
public typealias NativePRVMetrics = margelo.nitro.haptika.ppg.NativePRVMetrics
|
|
|
|
public extension NativePRVMetrics {
|
|
private typealias bridge = margelo.nitro.haptika.ppg.bridge.swift
|
|
|
|
/**
|
|
* Create a new instance of `NativePRVMetrics`.
|
|
*/
|
|
init(estimatedRmssdMs: Double?, estimatedSdnnMs: Double?, meanIpiMs: Double?, medianIpiMs: Double?, pnn50Percent: Double?, rangeIpiMs: Double?, modeIpiMs: Double?, amo50Percent: Double?, coefficientOfVariation: Double?, validIntervalCount: Double, rejectedIntervalCount: Double, rejectedIntervalRatio: Double, reliable: Bool) {
|
|
self.init({ () -> bridge.std__optional_double_ in
|
|
if let __unwrappedValue = estimatedRmssdMs {
|
|
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
} else {
|
|
return .init()
|
|
}
|
|
}(), { () -> bridge.std__optional_double_ in
|
|
if let __unwrappedValue = estimatedSdnnMs {
|
|
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
} else {
|
|
return .init()
|
|
}
|
|
}(), { () -> bridge.std__optional_double_ in
|
|
if let __unwrappedValue = meanIpiMs {
|
|
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
} else {
|
|
return .init()
|
|
}
|
|
}(), { () -> bridge.std__optional_double_ in
|
|
if let __unwrappedValue = medianIpiMs {
|
|
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
} else {
|
|
return .init()
|
|
}
|
|
}(), { () -> bridge.std__optional_double_ in
|
|
if let __unwrappedValue = pnn50Percent {
|
|
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
} else {
|
|
return .init()
|
|
}
|
|
}(), { () -> bridge.std__optional_double_ in
|
|
if let __unwrappedValue = rangeIpiMs {
|
|
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
} else {
|
|
return .init()
|
|
}
|
|
}(), { () -> bridge.std__optional_double_ in
|
|
if let __unwrappedValue = modeIpiMs {
|
|
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
} else {
|
|
return .init()
|
|
}
|
|
}(), { () -> bridge.std__optional_double_ in
|
|
if let __unwrappedValue = amo50Percent {
|
|
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
} else {
|
|
return .init()
|
|
}
|
|
}(), { () -> bridge.std__optional_double_ in
|
|
if let __unwrappedValue = coefficientOfVariation {
|
|
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
} else {
|
|
return .init()
|
|
}
|
|
}(), validIntervalCount, rejectedIntervalCount, rejectedIntervalRatio, reliable)
|
|
}
|
|
|
|
@inline(__always)
|
|
var estimatedRmssdMs: Double? {
|
|
return { () -> Double? in
|
|
if bridge.has_value_std__optional_double_(self.__estimatedRmssdMs) {
|
|
let __unwrapped = bridge.get_std__optional_double_(self.__estimatedRmssdMs)
|
|
return __unwrapped
|
|
} else {
|
|
return nil
|
|
}
|
|
}()
|
|
}
|
|
|
|
@inline(__always)
|
|
var estimatedSdnnMs: Double? {
|
|
return { () -> Double? in
|
|
if bridge.has_value_std__optional_double_(self.__estimatedSdnnMs) {
|
|
let __unwrapped = bridge.get_std__optional_double_(self.__estimatedSdnnMs)
|
|
return __unwrapped
|
|
} else {
|
|
return nil
|
|
}
|
|
}()
|
|
}
|
|
|
|
@inline(__always)
|
|
var meanIpiMs: Double? {
|
|
return { () -> Double? in
|
|
if bridge.has_value_std__optional_double_(self.__meanIpiMs) {
|
|
let __unwrapped = bridge.get_std__optional_double_(self.__meanIpiMs)
|
|
return __unwrapped
|
|
} else {
|
|
return nil
|
|
}
|
|
}()
|
|
}
|
|
|
|
@inline(__always)
|
|
var medianIpiMs: Double? {
|
|
return { () -> Double? in
|
|
if bridge.has_value_std__optional_double_(self.__medianIpiMs) {
|
|
let __unwrapped = bridge.get_std__optional_double_(self.__medianIpiMs)
|
|
return __unwrapped
|
|
} else {
|
|
return nil
|
|
}
|
|
}()
|
|
}
|
|
|
|
@inline(__always)
|
|
var pnn50Percent: Double? {
|
|
return { () -> Double? in
|
|
if bridge.has_value_std__optional_double_(self.__pnn50Percent) {
|
|
let __unwrapped = bridge.get_std__optional_double_(self.__pnn50Percent)
|
|
return __unwrapped
|
|
} else {
|
|
return nil
|
|
}
|
|
}()
|
|
}
|
|
|
|
@inline(__always)
|
|
var rangeIpiMs: Double? {
|
|
return { () -> Double? in
|
|
if bridge.has_value_std__optional_double_(self.__rangeIpiMs) {
|
|
let __unwrapped = bridge.get_std__optional_double_(self.__rangeIpiMs)
|
|
return __unwrapped
|
|
} else {
|
|
return nil
|
|
}
|
|
}()
|
|
}
|
|
|
|
@inline(__always)
|
|
var modeIpiMs: Double? {
|
|
return { () -> Double? in
|
|
if bridge.has_value_std__optional_double_(self.__modeIpiMs) {
|
|
let __unwrapped = bridge.get_std__optional_double_(self.__modeIpiMs)
|
|
return __unwrapped
|
|
} else {
|
|
return nil
|
|
}
|
|
}()
|
|
}
|
|
|
|
@inline(__always)
|
|
var amo50Percent: Double? {
|
|
return { () -> Double? in
|
|
if bridge.has_value_std__optional_double_(self.__amo50Percent) {
|
|
let __unwrapped = bridge.get_std__optional_double_(self.__amo50Percent)
|
|
return __unwrapped
|
|
} else {
|
|
return nil
|
|
}
|
|
}()
|
|
}
|
|
|
|
@inline(__always)
|
|
var coefficientOfVariation: Double? {
|
|
return { () -> Double? in
|
|
if bridge.has_value_std__optional_double_(self.__coefficientOfVariation) {
|
|
let __unwrapped = bridge.get_std__optional_double_(self.__coefficientOfVariation)
|
|
return __unwrapped
|
|
} else {
|
|
return nil
|
|
}
|
|
}()
|
|
}
|
|
|
|
@inline(__always)
|
|
var validIntervalCount: Double {
|
|
return self.__validIntervalCount
|
|
}
|
|
|
|
@inline(__always)
|
|
var rejectedIntervalCount: Double {
|
|
return self.__rejectedIntervalCount
|
|
}
|
|
|
|
@inline(__always)
|
|
var rejectedIntervalRatio: Double {
|
|
return self.__rejectedIntervalRatio
|
|
}
|
|
|
|
@inline(__always)
|
|
var reliable: Bool {
|
|
return self.__reliable
|
|
}
|
|
}
|