generated from StanfordSpezi/SpeziTemplateApplication
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
312 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
ENGAGEHF/Bluetooth/Devices/WeightScale/WeightScaleService.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// This source file is part of the ENGAGE-HF project based on the Stanford Spezi Template Application project | ||
// | ||
// SPDX-FileCopyrightText: 2023 Stanford University | ||
// | ||
// SPDX-License-Identifier: MIT | ||
// | ||
|
||
import BluetoothServices | ||
import class CoreBluetooth.CBUUID | ||
import SpeziBluetooth | ||
|
||
|
||
// The primary Weight Scale Service | ||
// Note: Access properties: R: read, W: write, N: notify | ||
class WeightScaleService: BluetoothService { | ||
static var id = CBUUID(string: "181D") | ||
|
||
// 2 characteristics as defined in the manual: | ||
|
||
// Characteristic 1: Weight Scale Feature, R | ||
@Characteristic(id: "2A9E") var weightScaleFeature: WeightScaleFeature? | ||
|
||
// Characteristic 2: Weight Measurement, N | ||
@Characteristic(id: "2A9D", notify: true) var weightMeasurement: WeightMeasurement? | ||
|
||
init() {} | ||
} |
Oops, something went wrong.