-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from MoveUpwards/feature/tx-power-level
Add TxPowerLevel characteristic
- Loading branch information
Showing
3 changed files
with
35 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// TxPowerService.swift | ||
// Gormsson | ||
// | ||
// Created by Loïc Griffié on 27/05/2019. | ||
// Copyright © 2019 Damien Noël Dubuisson. All rights reserved. | ||
// | ||
|
||
import CoreBluetooth | ||
import Nevanlinna | ||
|
||
/// BatteryLevel's characteristic of BatteryService service | ||
internal final class TxPowerLevel: CharacteristicProtocol { | ||
/// A 128-bit UUID that identifies the characteristic. | ||
public var uuid: CBUUID { | ||
return CBUUID(string: "2A07") | ||
} | ||
|
||
/// The service that this characteristic belongs to. | ||
public var service: GattService { | ||
return .txPower | ||
} | ||
|
||
/// The value's format of the characteristic. | ||
public var format: DataInitializable.Type { | ||
return UInt8.self | ||
} | ||
} |