iOS AILinkBleSDK - 蓝牙SDK
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ELAutomaticThermometerBleManager.h 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. //
  2. // ELAutomaticThermometerBleManager.h
  3. // Elink
  4. //
  5. //
  6. #import "ELBluetoothManager.h"
  7. #import "ELAutomaticThermometerDataModel.h"
  8. #import "ELAutomaticThermometerHeader.h"
  9. #import "ELAutomaticThermometerFunction1Model.h"
  10. #import "ELAutomaticThermometerFunction2Model.h"
  11. NS_ASSUME_NONNULL_BEGIN
  12. @protocol ELAutomaticThermometerBleDelegate;
  13. @interface ELAutomaticThermometerBleManager : ELBluetoothManager
  14. @property (nonatomic,weak) id<ELAutomaticThermometerBleDelegate> automaticThermometerDelegate;
  15. + (ELAutomaticThermometerBleManager *)shareManager;
  16. // APP 获取设备支持的功能
  17. - (void)sendCmdQuerryDeviceFunctions1;
  18. - (void)sendCmdQuerryDeviceFunctions2;
  19. - (void)sendCmdQuerryDeviceFunctions2Ext;
  20. // 同步单位设置
  21. - (void)sendCmdChangeUnit:(ELDeviceTemperatureUnit)unit;
  22. // 同步音量设置
  23. - (void)sendCmdChangeVol:(UInt8)vol;
  24. // 同步语言设置
  25. - (void)sendCmdChangeLanguage:(UInt8)language;
  26. // 同步自动开机
  27. - (void)sendCmdChangeAutoPowerOnEnabled:(BOOL)enabled;
  28. // 同步测温距离
  29. - (void)sendCmdChangeMeasuringDistance:(UInt8)distance;
  30. // 同步体表校准值
  31. //- (void)sendCmdChangeBodyCalibrationValue:(UInt8)value;
  32. - (void)sendCmdChangeBodyCalibrationAdd;
  33. - (void)sendCmdChangeBodyCalibrationSub;
  34. // 同步计量校准值
  35. //- (void)sendCmdChangeMeasurementCalibrationValue:(UInt8)value;
  36. - (void)sendCmdChangeMeasurementCalibrationAdd;
  37. - (void)sendCmdChangeMeasurementCalibrationSub;
  38. // 同步报警值
  39. //- (void)sendCmdChangeAlarmValue:(UInt16)value;
  40. - (void)sendCmdChangeAlarmValueCelsius:(NSInteger)valueCelsius valueFahrenheit:(NSInteger)valueFahrenheit;
  41. // 同步音效
  42. - (void)sendCmdChangeSoundEffect:(UInt8)effect;
  43. // 同步报警音效
  44. - (void)sendCmdChangeAlarmSoundEffect:(UInt8)effect;
  45. //同步温度值播报开关
  46. - (void)sendCmdChangeTemperatureVoiceSwitchEnabled:(BOOL)enabled;
  47. //同步灵敏度设置
  48. - (void)sendCmdChangeSensibility:(UInt8)value;
  49. //同步自动关机设置
  50. - (void)sendCmdChangeAutoPowerOff:(UInt8)value;
  51. // 恢复默认值
  52. - (void)sendCmdResetDevice;
  53. @end
  54. @interface ELAutomaticThermometerBleManager ()
  55. - (void)autoScan;
  56. - (void)stopAutoScan;
  57. - (void)checkStatus;
  58. @end
  59. @protocol ELAutomaticThermometerBleDelegate <NSObject>
  60. @optional
  61. // 回调蓝牙状态)
  62. - (void)automaticThermometerManagerUpdateState:(ELBluetoothState)state;
  63. // 回调所有体温计设备
  64. - (void)automaticThermometerManagerScanDevices:(NSArray<ELPeripheralModel *> *)devices;
  65. //正在连接中倒计时
  66. - (void)deviceBleCountDown:(NSInteger)count;
  67. //ble version
  68. //- (void)firmwareVersion:(NSString *)version;
  69. // 设备上发温度数据
  70. - (void)automaticThermometerManagerReceiveData:(ELAutomaticThermometerDataModel *)model;
  71. // 设备上发支持的功能
  72. - (void)automaticThermometerManagerDeviceFunctions1:(ELAutomaticThermometerFunction1Model *)functions;
  73. - (void)automaticThermometerManagerDeviceFunctions2:(ELAutomaticThermometerFunction2Model *)functions;
  74. - (void)automaticThermometerManagerDeviceFunctions2Ext:(ELAutomaticThermometerFunction2Model *)functions;
  75. // 设备上发同步设置
  76. //- (void)automaticThermometerManagerChangeOptions:(NSData *)data;
  77. - (void)automaticThermometerManagerChangeOptionsType:(AutomaticThermometerBleDataType)type value:(NSInteger)value success:(BOOL)success;
  78. - (void)automaticThermometerManagerChangeOptionsType:(AutomaticThermometerBleDataType)type valueCelsius:(NSInteger)valueCelsius valueFahrenheit:(NSInteger)valueFahrenheit success:(BOOL)success;
  79. // 设备上发错误码
  80. - (void)automaticThermometerManagerBackDeviceErrorCode:(AutomaticThermometerBleErrorCode)code;
  81. @end
  82. NS_ASSUME_NONNULL_END