feat: implement Haptika PPG and Watch V1
This commit is contained in:
+40
@@ -0,0 +1,40 @@
|
||||
///
|
||||
/// PPGSessionPurpose.swift
|
||||
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
||||
/// https://github.com/mrousavy/nitro
|
||||
/// Copyright © Marc Rousavy @ Margelo
|
||||
///
|
||||
|
||||
/**
|
||||
* Represents the JS union `PPGSessionPurpose`, backed by a C++ enum.
|
||||
*/
|
||||
public typealias PPGSessionPurpose = margelo.nitro.haptika.ppg.PPGSessionPurpose
|
||||
|
||||
public extension PPGSessionPurpose {
|
||||
/**
|
||||
* Get a PPGSessionPurpose for the given String value, or
|
||||
* return `nil` if the given value was invalid/unknown.
|
||||
*/
|
||||
init?(fromString string: String) {
|
||||
switch string {
|
||||
case "spotMeasurement":
|
||||
self = .spotmeasurement
|
||||
case "coherence":
|
||||
self = .coherence
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the String value this PPGSessionPurpose represents.
|
||||
*/
|
||||
var stringValue: String {
|
||||
switch self {
|
||||
case .spotmeasurement:
|
||||
return "spotMeasurement"
|
||||
case .coherence:
|
||||
return "coherence"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user