104 lines
2.9 KiB
Swift
Generated
104 lines
2.9 KiB
Swift
Generated
///
|
|
/// NativeSignalQualityResult.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 `NativeSignalQualityResult`, backed by a C++ struct.
|
|
*/
|
|
public typealias NativeSignalQualityResult = margelo.nitro.haptika.ppg.NativeSignalQualityResult
|
|
|
|
public extension NativeSignalQualityResult {
|
|
private typealias bridge = margelo.nitro.haptika.ppg.bridge.swift
|
|
|
|
/**
|
|
* Create a new instance of `NativeSignalQualityResult`.
|
|
*/
|
|
init(score: Double, level: String, usableDurationSeconds: Double, droppedFrameRatio: Double, saturationRatio: Double, rejectedIntervalRatio: Double, signalToNoiseRatio: Double?, motionArtifactRatio: Double, methodAgreementScore: Double, timestampJitterRatio: Double, longestGapSeconds: Double, issues: [String]) {
|
|
self.init(score, std.string(level), usableDurationSeconds, droppedFrameRatio, saturationRatio, rejectedIntervalRatio, { () -> bridge.std__optional_double_ in
|
|
if let __unwrappedValue = signalToNoiseRatio {
|
|
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
} else {
|
|
return .init()
|
|
}
|
|
}(), motionArtifactRatio, methodAgreementScore, timestampJitterRatio, longestGapSeconds, { () -> bridge.std__vector_std__string_ in
|
|
var __vector = bridge.create_std__vector_std__string_(issues.count)
|
|
for __item in issues {
|
|
__vector.push_back(std.string(__item))
|
|
}
|
|
return __vector
|
|
}())
|
|
}
|
|
|
|
@inline(__always)
|
|
var score: Double {
|
|
return self.__score
|
|
}
|
|
|
|
@inline(__always)
|
|
var level: String {
|
|
return String(self.__level)
|
|
}
|
|
|
|
@inline(__always)
|
|
var usableDurationSeconds: Double {
|
|
return self.__usableDurationSeconds
|
|
}
|
|
|
|
@inline(__always)
|
|
var droppedFrameRatio: Double {
|
|
return self.__droppedFrameRatio
|
|
}
|
|
|
|
@inline(__always)
|
|
var saturationRatio: Double {
|
|
return self.__saturationRatio
|
|
}
|
|
|
|
@inline(__always)
|
|
var rejectedIntervalRatio: Double {
|
|
return self.__rejectedIntervalRatio
|
|
}
|
|
|
|
@inline(__always)
|
|
var signalToNoiseRatio: Double? {
|
|
return { () -> Double? in
|
|
if bridge.has_value_std__optional_double_(self.__signalToNoiseRatio) {
|
|
let __unwrapped = bridge.get_std__optional_double_(self.__signalToNoiseRatio)
|
|
return __unwrapped
|
|
} else {
|
|
return nil
|
|
}
|
|
}()
|
|
}
|
|
|
|
@inline(__always)
|
|
var motionArtifactRatio: Double {
|
|
return self.__motionArtifactRatio
|
|
}
|
|
|
|
@inline(__always)
|
|
var methodAgreementScore: Double {
|
|
return self.__methodAgreementScore
|
|
}
|
|
|
|
@inline(__always)
|
|
var timestampJitterRatio: Double {
|
|
return self.__timestampJitterRatio
|
|
}
|
|
|
|
@inline(__always)
|
|
var longestGapSeconds: Double {
|
|
return self.__longestGapSeconds
|
|
}
|
|
|
|
@inline(__always)
|
|
var issues: [String] {
|
|
return self.__issues.map({ __item in String(__item) })
|
|
}
|
|
}
|