diff options
Diffstat (limited to 'libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BGMacroFile.h')
| -rw-r--r-- | libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BGMacroFile.h | 507 |
1 files changed, 507 insertions, 0 deletions
diff --git a/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BGMacroFile.h b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BGMacroFile.h new file mode 100644 index 0000000..7e03f2c --- /dev/null +++ b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BGMacroFile.h | |||
| @@ -0,0 +1,507 @@ | |||
| 1 | // | ||
| 2 | // BGMacroFile.h | ||
| 3 | // BGDemoCode | ||
| 4 | // | ||
| 5 | // Created by zhiwei jing on 14-6-29. | ||
| 6 | // Copyright (c) 2014年 zhiwei jing. All rights reserved. | ||
| 7 | // | ||
| 8 | |||
| 9 | #import "HealthUser.h" | ||
| 10 | #import "BGDevice.h" | ||
| 11 | #import "BGController.h" | ||
| 12 | @class BG5SStateInfo; | ||
| 13 | @class BG5SRecordModel; | ||
| 14 | |||
| 15 | #ifndef BGDemoCode_BGMacroFile_h | ||
| 16 | #define BGDemoCode_BGMacroFile_h | ||
| 17 | |||
| 18 | /** | ||
| 19 | BG5 open mode | ||
| 20 | */ | ||
| 21 | typedef NS_ENUM(NSUInteger, BGOpenMode) { | ||
| 22 | /// BGOpenMode_Strip means booting the meter by insert the strip | ||
| 23 | BGOpenMode_Strip = 1, | ||
| 24 | /// BGOpenMode_Hand means booting the meter by pressing the on/off button. | ||
| 25 | BGOpenMode_Hand = 2, | ||
| 26 | }; | ||
| 27 | |||
| 28 | /** | ||
| 29 | BG5\BG5S measure mode | ||
| 30 | */ | ||
| 31 | typedef NS_ENUM(NSUInteger, BGMeasureMode) { | ||
| 32 | /// BGMeasureMode_Blood means blood measurement mode | ||
| 33 | BGMeasureMode_Blood = 1, | ||
| 34 | /// BGMeasureMode_NoBlood means control solution measurement mode. | ||
| 35 | BGMeasureMode_NoBlood = 2, | ||
| 36 | |||
| 37 | }; | ||
| 38 | |||
| 39 | /** | ||
| 40 | BG code mode | ||
| 41 | */ | ||
| 42 | typedef NS_ENUM(NSUInteger, BGCodeMode) { | ||
| 43 | /// BGCodeMode_GOD means GOD blood test strip. | ||
| 44 | BGCodeMode_GOD = 1, | ||
| 45 | /// BGCodeMode_GDH means GDH Blood test strip. | ||
| 46 | BGCodeMode_GDH = 2, | ||
| 47 | }; | ||
| 48 | |||
| 49 | /** | ||
| 50 | BG unit | ||
| 51 | */ | ||
| 52 | typedef NS_ENUM(NSUInteger, BGUnit) { | ||
| 53 | /// Unknown | ||
| 54 | BGUnit_Unknown = 0, | ||
| 55 | /// mmol/L | ||
| 56 | BGUnit_mmolPL = 1, | ||
| 57 | /// mg/dL | ||
| 58 | BGUnit_mgPmL = 2, | ||
| 59 | }; | ||
| 60 | |||
| 61 | /** | ||
| 62 | BG1 error code | ||
| 63 | */ | ||
| 64 | typedef NS_ENUM(NSInteger,BG1Error){ | ||
| 65 | /// Battery is low. | ||
| 66 | BG1Error_LowBattery = 0, | ||
| 67 | /// Glucose test result is out of the measurement range. | ||
| 68 | BG1Error_ResultOutOfMeasurementRage = 1, | ||
| 69 | /// 2.5V reference voltage error, not normal measurement, please repeat the test. | ||
| 70 | BG1Error_UnvalidReferenceVoltage = 2, | ||
| 71 | /// Strip is used or unknown moisture detected, discard the test strip and repeat the test with a new strip. | ||
| 72 | BG1Error_StripUsed = 3, | ||
| 73 | /// CODE value check error. This error need let user scan code and call the send code function again,no alert need to show. | ||
| 74 | BG1Error_CodeError = 4, | ||
| 75 | /// The environmental temperature is beyond normal range, place the meter at room temperature for at least 30 minutes, then repeat the test. | ||
| 76 | BG1Error_RoomTemperatureOutOfRange1 = 5, | ||
| 77 | /// The environmental temperature is beyond normal range, place the meter at room temperature for at least 30 minutes, then repeat the test. | ||
| 78 | BG1Error_RoomTemperatureOutOfRange2 = 6, | ||
| 79 | /// Authentication failed more than 10 times. | ||
| 80 | BG1Error_AuthenticationFailed = 7, | ||
| 81 | /// Packet loss in the process of sending CODE. | ||
| 82 | BG1Error_CodeSendLost = 8, | ||
| 83 | /// Tooling inspection process is not completed. | ||
| 84 | BG1Error_ToolingTestFailed = 9, | ||
| 85 | /// Encryption burn write bit is empty. | ||
| 86 | BG1Error_EncryptionFailed = 10, | ||
| 87 | /// Compulsory Authentication is not passed. | ||
| 88 | BG1Error_CompulsoryAuthenticationFaild = 11, | ||
| 89 | /// Glucose test result is low. | ||
| 90 | BG1Error_ResultLow = 12, | ||
| 91 | /// Glucose test result is high. | ||
| 92 | BG1Error_ResultHigh = 13, | ||
| 93 | /// BG unknown. | ||
| 94 | BG1Error_Unknown = 300, | ||
| 95 | /// BG time out. | ||
| 96 | BG1Error_TimeOut = 301, | ||
| 97 | /// BG disConnented. | ||
| 98 | BG1Error_DisConnented = 303, | ||
| 99 | /// BG sleeping mode. | ||
| 100 | BG1Error_SleepingMode =330, | ||
| 101 | /// Hand shake failed. | ||
| 102 | BG1Error_HandShakeFailed = 331, | ||
| 103 | /// Parameter input error. | ||
| 104 | BG1Error_ParameterError = 400, | ||
| 105 | }; | ||
| 106 | |||
| 107 | |||
| 108 | //UI | ||
| 109 | #define kNotificationNameNeedAudioPermission @"LetkNotificationNameNeedAudioPermission" | ||
| 110 | #define kNotificationNameAudioDeviceInsert @"kNotificationNameAudioDeviceInsert" | ||
| 111 | #define kNotificationNameBG1DidDisConnect @"kNotificationNameBG1DidDisConnect" | ||
| 112 | |||
| 113 | |||
| 114 | /** | ||
| 115 | Discover BG1 | ||
| 116 | */ | ||
| 117 | typedef void (^DisposeBG1DiscoverBlock)(void); | ||
| 118 | |||
| 119 | /** | ||
| 120 | BG1 IDPS | ||
| 121 | |||
| 122 | @param idpsDic IDPS dictionary | ||
| 123 | */ | ||
| 124 | typedef void (^DisposeBG1IDPSBlock)(NSDictionary* idpsDic); | ||
| 125 | |||
| 126 | /** | ||
| 127 | Connect BG1 successfully | ||
| 128 | */ | ||
| 129 | typedef void (^DisposeBG1ConnectBlock)(void); | ||
| 130 | |||
| 131 | /** | ||
| 132 | BG1 error block | ||
| 133 | |||
| 134 | @param errorID BG1Error enum | ||
| 135 | */ | ||
| 136 | typedef void (^DisposeBG1ErrorBlock)(BG1Error errorID); | ||
| 137 | |||
| 138 | /** | ||
| 139 | BG1 send code result | ||
| 140 | */ | ||
| 141 | typedef void (^DisposeBG1SendCodeResultBlock)(void); | ||
| 142 | |||
| 143 | /** | ||
| 144 | Strip is insered | ||
| 145 | */ | ||
| 146 | typedef void (^DisposeBGStripInBlock)(void); | ||
| 147 | // | ||
| 148 | /** | ||
| 149 | Strip is pulled off | ||
| 150 | */ | ||
| 151 | typedef void (^DisposeBGStripOutBlock)(void); | ||
| 152 | |||
| 153 | /** | ||
| 154 | Blood is droped | ||
| 155 | */ | ||
| 156 | typedef void (^DisposeBGBloodBlock)(void); | ||
| 157 | |||
| 158 | /** | ||
| 159 | Measurement result block | ||
| 160 | |||
| 161 | @param result dictionary | ||
| 162 | */ | ||
| 163 | typedef void (^DisposeBGResultBlock)(NSDictionary* result); | ||
| 164 | |||
| 165 | /** | ||
| 166 | BG send code result block | ||
| 167 | |||
| 168 | @param sendOk YES: success NO:fail | ||
| 169 | */ | ||
| 170 | typedef void (^DisposeBGSendCodeBlock)(BOOL sendOk); | ||
| 171 | |||
| 172 | /** | ||
| 173 | BG error block | ||
| 174 | |||
| 175 | @param errorID BG error code | ||
| 176 | */ | ||
| 177 | typedef void (^DisposeBGErrorBlock)(NSNumber* errorID); | ||
| 178 | |||
| 179 | /** | ||
| 180 | BG5 keep connection result | ||
| 181 | |||
| 182 | @param sendOk YES:success NO:fail | ||
| 183 | */ | ||
| 184 | typedef void (^DisposeBG5KeepConnectBlock)(BOOL sendOk); | ||
| 185 | |||
| 186 | /** | ||
| 187 | BG5 set time result | ||
| 188 | |||
| 189 | @param setResult YES:success NO:fail | ||
| 190 | */ | ||
| 191 | typedef void (^DisposeBGSetTime)(BOOL setResult); | ||
| 192 | |||
| 193 | /** | ||
| 194 | BG5 set unit result | ||
| 195 | |||
| 196 | @param setResult YES:success NO:fail | ||
| 197 | */ | ||
| 198 | typedef void (^DisposeBGSetUnit)(BOOL setResult); | ||
| 199 | |||
| 200 | /** | ||
| 201 | BG5 get bottleID result | ||
| 202 | |||
| 203 | @param bottleID bottleID | ||
| 204 | */ | ||
| 205 | typedef void (^DisposeBGBottleID)(NSNumber *bottleID); | ||
| 206 | |||
| 207 | /** | ||
| 208 | BG5 offline measurement data quantity block | ||
| 209 | |||
| 210 | @param dataCount quantity | ||
| 211 | */ | ||
| 212 | typedef void (^DisposeBGDataCount)(NSNumber* dataCount); | ||
| 213 | |||
| 214 | /** | ||
| 215 | BG5 offline measurement data block | ||
| 216 | |||
| 217 | @param historyDataDic data | ||
| 218 | */ | ||
| 219 | typedef void (^DisposeBGHistoryData)(NSDictionary *historyDataDic); | ||
| 220 | |||
| 221 | /** | ||
| 222 | BG5 delete offline measurement data result block | ||
| 223 | |||
| 224 | @param deleteOk YES:success NO:fail | ||
| 225 | */ | ||
| 226 | typedef void (^DisposeBGDeleteData)(BOOL deleteOk); | ||
| 227 | |||
| 228 | /** | ||
| 229 | BG5 send bottle ID result block | ||
| 230 | |||
| 231 | @param sendOk YES:success NO:fail | ||
| 232 | */ | ||
| 233 | typedef void(^DisposeBGSendBottleIDBlock)(BOOL sendOk); | ||
| 234 | |||
| 235 | /** | ||
| 236 | BG5 get code information | ||
| 237 | |||
| 238 | @param codeDic dictionary | ||
| 239 | */ | ||
| 240 | typedef void (^DisposeBGCodeDic)(NSDictionary *codeDic); | ||
| 241 | |||
| 242 | /** | ||
| 243 | BG5 send code result block | ||
| 244 | |||
| 245 | @param sendOk YES:success NO:fail | ||
| 246 | */ | ||
| 247 | typedef void (^DisposeBGSendCodeBlock)(BOOL sendOk); | ||
| 248 | |||
| 249 | /** | ||
| 250 | BG5 open mode block | ||
| 251 | |||
| 252 | @param mode BGOpenMode enum | ||
| 253 | */ | ||
| 254 | typedef void (^DisposeBGStartModel)(BGOpenMode mode); | ||
| 255 | |||
| 256 | /** | ||
| 257 | BG device battery block | ||
| 258 | |||
| 259 | @param energy normal range:0-100;255 means in charging | ||
| 260 | */ | ||
| 261 | typedef void (^DisposeBGBatteryBlock)(NSNumber* energy); | ||
| 262 | |||
| 263 | |||
| 264 | #define kNotificationNameBG3ConnectSuccess @"kNotificationNameBG3ConnectSuccess" | ||
| 265 | #define kNotificationNameBG3DidDisConnect @"kNotificationNameBG3DidDisConnect" | ||
| 266 | |||
| 267 | |||
| 268 | // ------ BG5 Baolei ------ | ||
| 269 | #define BG5ConnectNoti @"BG5ConnectNoti" | ||
| 270 | #define BG5DisConnectNoti @"BG5DisConnectNoti" | ||
| 271 | |||
| 272 | /** | ||
| 273 | BG5 error code | ||
| 274 | */ | ||
| 275 | typedef NS_ENUM(NSInteger, BG5Error) { | ||
| 276 | /// BG5Error_Unknown: Unknown error | ||
| 277 | BG5Error_Unknown = -1, | ||
| 278 | /// BG5Error_LowBattery: Battery is low. | ||
| 279 | BG5Error_LowBattery = 0, | ||
| 280 | /// BG5Error_ResultOutOfMeasurementRage: Glucose test result is out of the measurement range. | ||
| 281 | BG5Error_ResultOutOfMeasurementRage = 1, | ||
| 282 | /// BG5Error_UnvalidReferenceVoltage: Reference voltage error, not normal measurement, please repeat the | ||
| 283 | BG5Error_UnvalidReferenceVoltage = 2, | ||
| 284 | /// BG5Error_StripUsed: Strip is used or unknown moisture detected, discard the test strip and repeat the | ||
| 285 | BG5Error_StripUsed = 3, | ||
| 286 | /// BG5Error_ErrorOccurInEEPROM: Reading transmission error. Repeat the test with a new test strip. If the | ||
| 287 | BG5Error_ErrorOccurInEEPROM = 4, | ||
| 288 | /// BG5Error_RoomTemperatureOutOfRange1: The environmental temperature is beyond normal range, place the | ||
| 289 | BG5Error_RoomTemperatureOutOfRange1 = 5, | ||
| 290 | /// BG5Error_RoomTemperatureOutOfRange2: The environmental temperature is beyond normal range, place the | ||
| 291 | BG5Error_RoomTemperatureOutOfRange2 = 6, | ||
| 292 | /// BG5Error_TestStripCodingError1: Test strip coding error. | ||
| 293 | BG5Error_TestStripCodingError1 = 7, | ||
| 294 | /// BG5Error_TestStripCodingError2: Test strip coding error. | ||
| 295 | BG5Error_TestStripCodingError2 = 8, | ||
| 296 | /// BG5Error_PullOffStripWhenMeasuring: Strip removed in the middle of reading, repeat the test with a new | ||
| 297 | BG5Error_PullOffStripWhenMeasuring = 9, | ||
| 298 | /// BG5Error_ShouldPullOffStripAfterReadingResult: Pull off strips after measuring | ||
| 299 | BG5Error_ShouldPullOffStripAfterReadingResult = 10, | ||
| 300 | /// BG5Error_CannotWriteSNOrKey: SN or KEY write error | ||
| 301 | BG5Error_CannotWriteSNOrKey = 11, | ||
| 302 | /// BG5Error_NeedSetTime: Please set time. | ||
| 303 | BG5Error_NeedSetTime = 12, | ||
| 304 | /// BG5Error_StripNumberIsZero: 0 test strips remaining. | ||
| 305 | BG5Error_StripNumberIsZero = 13, | ||
| 306 | /// BG5Error_StripExpired: Test strip expired. | ||
| 307 | BG5Error_StripExpired = 14, | ||
| 308 | /// BG5Error_CannotMeasureWhenCharging: Unplug the charging cable before testing. | ||
| 309 | BG5Error_CannotMeasureWhenCharging = 15, | ||
| 310 | /// BG5Error_InputParametersError: Parameter input error. | ||
| 311 | BG5Error_InputParametersError = 400, | ||
| 312 | /// BG5Error_FunctionCallOrderError: Fucntion call order error | ||
| 313 | BG5Error_FunctionCallOrderError = 402, | ||
| 314 | /// BG5Error_MeasureModeNotMatch: Measure mode is not match. | ||
| 315 | BG5Error_MeasureModeNotMatch = 403, | ||
| 316 | /// BG5Error_CommandTimeout: Command timeout | ||
| 317 | BG5Error_CommandTimeout = 500, | ||
| 318 | /// BG5Error_CommandNotSupport: Command is not supported for current device. | ||
| 319 | BG5Error_CommandNotSupport = 501, | ||
| 320 | }; | ||
| 321 | |||
| 322 | #define kNotificationNameBG5SDidDiscover @"BG5SDiscover" | ||
| 323 | #define kNotificationNameBG5SConnectFail @"BG5SConnectFailed" | ||
| 324 | #define kNotificationNameBG5SConnectSuccess @"BG5SConnectNoti" | ||
| 325 | #define kNotificationNameBG5SDidDisConnect @"BG5SDisConnectNoti" | ||
| 326 | |||
| 327 | /** | ||
| 328 | BG5SCommandAction Enum | ||
| 329 | */ | ||
| 330 | typedef NS_ENUM(NSInteger, BG5SCommandAction) { | ||
| 331 | /// placeholder | ||
| 332 | BG5SCommandAction_Unknown = -1, | ||
| 333 | /// Query device state information | ||
| 334 | BG5SCommandAction_QueryBG5SStateInfo, | ||
| 335 | /// Set device time | ||
| 336 | BG5SCommandAction_SetBG5STime, | ||
| 337 | /// Set device unit | ||
| 338 | BG5SCommandAction_SetBG5SUnit, | ||
| 339 | /// Send code | ||
| 340 | BG5SCommandAction_SendBG5SCode, | ||
| 341 | /// Delete Strip used information | ||
| 342 | BG5SCommandAction_DeleteBG5SStripUsedInfo, | ||
| 343 | /// Query device offline measurement data | ||
| 344 | BG5SCommandAction_QueryBG5SRecord, | ||
| 345 | /// Delete device offline measurement data | ||
| 346 | BG5SCommandAction_DeleteBG5SRecord, | ||
| 347 | /// Set measure mode | ||
| 348 | BG5SCommandAction_StartBG5SMeasure, | ||
| 349 | /// Device send error code | ||
| 350 | BG5SCommandAction_ErrorCode, | ||
| 351 | /// Strip is inserted | ||
| 352 | BG5SCommandAction_StripInsert, | ||
| 353 | /// Strip is pulled off | ||
| 354 | BG5SCommandAction_StripPullOff, | ||
| 355 | /// Blood is dropped | ||
| 356 | BG5SCommandAction_DropBlood, | ||
| 357 | /// Device send result | ||
| 358 | BG5SCommandAction_Result, | ||
| 359 | /// Device enters charging state | ||
| 360 | BG5SCommandAction_EnterChagre, | ||
| 361 | /// Device exits charging state | ||
| 362 | BG5SCommandAction_ExitCharge, | ||
| 363 | |||
| 364 | }; | ||
| 365 | |||
| 366 | /** | ||
| 367 | BG5S error code | ||
| 368 | */ | ||
| 369 | typedef NS_ENUM(NSInteger, BG5SError) { | ||
| 370 | /// Unknown error | ||
| 371 | BG5SError_Unknown = -1, | ||
| 372 | /// Only showed in BG5S's screen and need charging | ||
| 373 | BG5SError_LowBattery = 0, | ||
| 374 | /// Strip removed in the middle of reading, repeat the test with a new strip. | ||
| 375 | BG5SError_PullOffStripWhenMeasuring = 1, | ||
| 376 | /// Reference voltage error, not normal measurement, please repeat the test. | ||
| 377 | BG5SError_UnvalidReferenceVoltage = 2, | ||
| 378 | /// Strip is used or unknown moisture detected, discard the test strip and repeat the test with a new strip. | ||
| 379 | BG5SError_StripUsed = 3, | ||
| 380 | /// Reading transmission error. Repeat the test with a new test strip. If the problem persists, contact iHealth customer service for assistance. | ||
| 381 | BG5SError_ErrorOccurInEEPROM = 4, | ||
| 382 | /// The environmental temperature is beyond normal range, place the meter at room temperature for at least 30 minutes, then repeat the test. | ||
| 383 | BG5SError_LowTemperature = 5, | ||
| 384 | /// The environmental temperature is beyond normal range, place the meter at room temperature for at least 30 minutes, then repeat the test. | ||
| 385 | BG5SError_HighTemperature = 6, | ||
| 386 | /// Only showed in BG5S's screen. | ||
| 387 | BG5SError_BluetoothError = 7, | ||
| 388 | /// Glucose test result is low. | ||
| 389 | BG5SError_ResultLow = 8, | ||
| 390 | /// Glucose test result is high. | ||
| 391 | BG5SError_ResultHigh = 9, | ||
| 392 | /// Reset and if the problem persists, contact iHealth customer service for assistance. | ||
| 393 | BG5SError_FactoryError = 10, | ||
| 394 | /// Parameter input error. | ||
| 395 | BG5SError_InputParametersError = 400, | ||
| 396 | /// Quantity not match | ||
| 397 | BG5SError_RecordTotalNumberNotMatchTransferTotalNumber = 401, | ||
| 398 | /// Single packet is not full. | ||
| 399 | BG5SError_RecordPacketNotMatch = 402, | ||
| 400 | /// Packet index not match. | ||
| 401 | BG5SError_RecordPackerIndexNotMatch = 403, | ||
| 402 | /// Command timeout | ||
| 403 | BG5SError_CommandTimeout = 500, | ||
| 404 | /// Command is not supported for current device. | ||
| 405 | BG5SError_CommandNotSupport = 501, | ||
| 406 | BG5SError_Disconnect = 502, | ||
| 407 | }; | ||
| 408 | |||
| 409 | |||
| 410 | /** | ||
| 411 | BG5S strip state | ||
| 412 | */ | ||
| 413 | typedef NS_ENUM(NSInteger, BG5SStripState) { | ||
| 414 | /// Unknown state | ||
| 415 | BG5SStripState_Unknown = -1, | ||
| 416 | /// Insert | ||
| 417 | BG5SStripState_Insert, | ||
| 418 | /// Pull off | ||
| 419 | BG5SStripState_PullOff, | ||
| 420 | }; | ||
| 421 | /** | ||
| 422 | BG5S charging state | ||
| 423 | */ | ||
| 424 | typedef NS_ENUM(NSInteger, BG5SChargeState) { | ||
| 425 | /// Unknown state | ||
| 426 | BG5SChargeState_Unknown = -1, | ||
| 427 | /// In charging | ||
| 428 | BG5SChargeState_Charging, | ||
| 429 | /// Not in charging | ||
| 430 | BG5SChargeState_ExitCharge, | ||
| 431 | }; | ||
| 432 | |||
| 433 | /** | ||
| 434 | BG5SStateInfoBlock | ||
| 435 | |||
| 436 | @param stateInfo BG5SStateInfo object | ||
| 437 | */ | ||
| 438 | typedef void(^BG5SStateInfoBlock)(BG5SStateInfo *stateInfo); | ||
| 439 | |||
| 440 | /** | ||
| 441 | BG5SRecordBlock | ||
| 442 | |||
| 443 | @param array offline measurement data array | ||
| 444 | */ | ||
| 445 | typedef void(^BG5SRecordBlock)(NSArray *array); | ||
| 446 | /** | ||
| 447 | Block without return parameters | ||
| 448 | */ | ||
| 449 | typedef void(^BG5SSuccessBlock)(void); | ||
| 450 | |||
| 451 | /** | ||
| 452 | Block show the result of setting code | ||
| 453 | |||
| 454 | @param success YES:success NO:fail | ||
| 455 | */ | ||
| 456 | typedef void(^BG5SSetCodeResultBlock)(BOOL success); | ||
| 457 | |||
| 458 | |||
| 459 | typedef void(^BG5SDeviceInfoBlock)(NSDictionary* deviceInfoDic); | ||
| 460 | |||
| 461 | |||
| 462 | //typedef void(^BG5SRecordBlock)(NSArray *array); | ||
| 463 | |||
| 464 | /** | ||
| 465 | Error block with error type | ||
| 466 | |||
| 467 | @param error error type | ||
| 468 | */ | ||
| 469 | typedef void(^BG5SSDKErrorBlock)(BG5SError error,NSString *detailInfo); | ||
| 470 | |||
| 471 | |||
| 472 | /* | ||
| 473 | BG1S code | ||
| 474 | */ | ||
| 475 | |||
| 476 | #define BG1SDiscover @"BG1SDiscover" | ||
| 477 | #define BG1SConnectFailed @"BG1SConnectFailed" | ||
| 478 | #define BG1SConnectNoti @"BG1SConnectNoti" | ||
| 479 | #define BG1SDisConnectNoti @"BG1SDisConnectNoti" | ||
| 480 | |||
| 481 | typedef NS_ENUM(NSUInteger, BG1SDeviceError) { | ||
| 482 | |||
| 483 | BG1SDeviceError0=0, | ||
| 484 | BG1SError_LowBattery, | ||
| 485 | BG1SError_ReferenceUnstable,//2.5V reference is unstable | ||
| 486 | BG1SError_BadStrip, | ||
| 487 | BG1SError_BadEEPROM, | ||
| 488 | BG1SError_LowAmbientTemperature,//Low ambient temperature | ||
| 489 | BG1SError_HighAmbientTemperature,//High ambient temperature | ||
| 490 | BG1SError_BleedEarly, | ||
| 491 | BG1SError_Other, | ||
| 492 | BG1SError_ResultHigh, | ||
| 493 | BG1SError_ResultLow, | ||
| 494 | BG1SError_Disconnect, | ||
| 495 | |||
| 496 | }; | ||
| 497 | |||
| 498 | typedef void(^BlockBG1SDeviceFunction)(NSDictionary *functionDict); | ||
| 499 | |||
| 500 | typedef void(^BlockBG1SError)(BG1SDeviceError error); | ||
| 501 | |||
| 502 | /** | ||
| 503 | Strip is insered | ||
| 504 | */ | ||
| 505 | typedef void (^DisposeBG1SStripInBlock)(BOOL inORout); | ||
| 506 | |||
| 507 | #endif | ||
