diff options
| author | hc <haocheng.xie@respiree.com> | 2026-04-13 15:17:52 +0800 |
|---|---|---|
| committer | hc <haocheng.xie@respiree.com> | 2026-04-13 15:17:52 +0800 |
| commit | d6d9a09d505d11148599a95a5be3e1351edbe0ac (patch) | |
| tree | a5f5891983d1ff207e99f683a5e151519cef4980 /libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/TS28BController.h | |
| parent | e4fb9966e762852bf17f21c8406501d42fae0b61 (diff) | |
Local iHealth SDK, device detail screen, iOS event fixes
Diffstat (limited to 'libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/TS28BController.h')
| -rw-r--r-- | libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/TS28BController.h | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/TS28BController.h b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/TS28BController.h new file mode 100644 index 0000000..998a4c8 --- /dev/null +++ b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/TS28BController.h | |||
| @@ -0,0 +1,142 @@ | |||
| 1 | // | ||
| 2 | // TS28BController.h | ||
| 3 | // iHealthSDKStatic | ||
| 4 | // | ||
| 5 | // Created by Lei Bao on 2017/6/13. | ||
| 6 | // Copyright © 2017年 daiqingquan. All rights reserved. | ||
| 7 | // | ||
| 8 | |||
| 9 | #import <Foundation/Foundation.h> | ||
| 10 | |||
| 11 | /** | ||
| 12 | TemperatureType | ||
| 13 | */ | ||
| 14 | typedef NS_ENUM(NSInteger, TemperatureType) { | ||
| 15 | /// NotDefined | ||
| 16 | TemperatureType_NotDefined = 0, | ||
| 17 | /// Armpit | ||
| 18 | TemperatureType_Armpit, | ||
| 19 | /// Body | ||
| 20 | TemperatureType_Body, | ||
| 21 | /// Ear | ||
| 22 | TemperatureType_Ear, | ||
| 23 | /// Finger | ||
| 24 | TemperatureType_Finger, | ||
| 25 | /// GastroIntestinalTract | ||
| 26 | TemperatureType_GastroIntestinalTract, | ||
| 27 | /// Mouth | ||
| 28 | TemperatureType_Mouth, | ||
| 29 | /// Rectum | ||
| 30 | TemperatureType_Rectum, | ||
| 31 | /// Toe | ||
| 32 | TemperatureType_Toe, | ||
| 33 | /// Tympanum | ||
| 34 | TemperatureType_Tympanum, | ||
| 35 | }; | ||
| 36 | |||
| 37 | /** | ||
| 38 | TemperatureUnit | ||
| 39 | */ | ||
| 40 | typedef NS_ENUM(NSInteger, TemperatureUnit) { | ||
| 41 | /// NotDefined | ||
| 42 | TemperatureUnit_NotDefined = 0, | ||
| 43 | /// Degrees Celsius | ||
| 44 | TemperatureUnit_C, | ||
| 45 | /// Fahrenheit | ||
| 46 | TemperatureUnit_F, | ||
| 47 | }; | ||
| 48 | |||
| 49 | @class TS28B; | ||
| 50 | @class TS28BController; | ||
| 51 | |||
| 52 | /** | ||
| 53 | TS28BControllerDelegate | ||
| 54 | */ | ||
| 55 | @protocol TS28BControllerDelegate <NSObject> | ||
| 56 | |||
| 57 | @optional | ||
| 58 | |||
| 59 | /** | ||
| 60 | Discover device. | ||
| 61 | |||
| 62 | @param controller who calls this method | ||
| 63 | @param device Discovered device | ||
| 64 | */ | ||
| 65 | - (void)controller:(TS28BController *)controller didDiscoverDevice:(TS28B *)device; | ||
| 66 | |||
| 67 | /** | ||
| 68 | Connect device successfully.After connect and read Device Information, this method will be called. | ||
| 69 | |||
| 70 | @param controller who calls this method | ||
| 71 | @param device Connected device | ||
| 72 | */ | ||
| 73 | - (void)controller:(TS28BController *)controller didConnectSuccessDevice:(TS28B *)device; | ||
| 74 | |||
| 75 | /** | ||
| 76 | Connect device Fail. | ||
| 77 | |||
| 78 | @param controller who calls this method | ||
| 79 | @param device The spectific device | ||
| 80 | */ | ||
| 81 | - (void)controller:(TS28BController *)controller didConnectFailDevice:(TS28B *)device; | ||
| 82 | |||
| 83 | /** | ||
| 84 | Device is disconnected. If you turn off your phone’s Bluetooth, please listen for the notification: @"BTLEPowerOff" | ||
| 85 | |||
| 86 | @param controller who calls this method | ||
| 87 | @param device The spectific device | ||
| 88 | */ | ||
| 89 | - (void)controller:(TS28BController *)controller didDisconnectDevice:(TS28B *)device; | ||
| 90 | |||
| 91 | /** | ||
| 92 | Temperature is uploaded. | ||
| 93 | |||
| 94 | @param controller who calls this method | ||
| 95 | @param device The spectific device | ||
| 96 | @param value temperature value. | ||
| 97 | @param unit temperature unit.TemperatureUnit type, reference: https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.temperature_measurement.xml | ||
| 98 | @param date measure date | ||
| 99 | @param type measure location. TemperatureType type, reference: https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.temperature_type.xml | ||
| 100 | */ | ||
| 101 | - (void)controller:(TS28BController *)controller device:(TS28B *)device didUpdateTemperature:(float)value temperatureUnit:(TemperatureUnit)unit measureDate:(NSDate *)date measureLocation:(TemperatureType)type; | ||
| 102 | |||
| 103 | @end | ||
| 104 | |||
| 105 | /** | ||
| 106 | TS28BController | ||
| 107 | */ | ||
| 108 | @interface TS28BController : NSObject | ||
| 109 | |||
| 110 | @property (weak, nonatomic) id<TS28BControllerDelegate> delegate; | ||
| 111 | |||
| 112 | /** | ||
| 113 | Initialize TS28BController class | ||
| 114 | |||
| 115 | @return TS28BController class object | ||
| 116 | */ | ||
| 117 | + (TS28BController *)sharedController; | ||
| 118 | /** | ||
| 119 | Star to scan TS28B device | ||
| 120 | */ | ||
| 121 | - (void)startScan; | ||
| 122 | |||
| 123 | /** | ||
| 124 | Stop scanning | ||
| 125 | */ | ||
| 126 | - (void)stopScan; | ||
| 127 | |||
| 128 | /** | ||
| 129 | Connect with spectific device | ||
| 130 | |||
| 131 | @param device TS28B object. You can get it from - (void)controller:(TS28BController *)controller didDiscoverDevice:(TS28B *)device; | ||
| 132 | */ | ||
| 133 | - (void)connectDevice:(TS28B *)device; | ||
| 134 | |||
| 135 | /** | ||
| 136 | Connect with spectific device | ||
| 137 | |||
| 138 | @param device TS28B object. You can get it from - (void)controller:(TS28BController *)controller didConnectSuccessDevice:(TS28B *)device; | ||
| 139 | */ | ||
| 140 | - (void)disconnectDevice:(TS28B *)device; | ||
| 141 | |||
| 142 | @end | ||
