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.

ELWheelMonitorBleManager.h 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. //
  2. // ELWheelMonitorBleManager.h
  3. // Elink
  4. //
  5. // Created by iot_user on 2019/7/3.
  6. // Copyright © 2019 iot_iMac. All rights reserved.
  7. //
  8. #import "ELBluetoothManager.h"
  9. #import "ELWheelMonitorBleHeader.h"
  10. #import "ELWheelMonitorBleModel.h"
  11. @protocol WheelMonitorBleManagerDelegate <NSObject>
  12. @optional
  13. /**
  14. Callback Bluetooth status(回调蓝牙状态)
  15. @param state 蓝牙状态
  16. */
  17. -(void)wheelMonitorBleManagerUpdateBleState:(ELBluetoothState)state;
  18. /**
  19. Callback scanned device(回调扫描到的设备)
  20. @param devices 设备
  21. */
  22. -(void)wheelMonitorBleManagerScanDevices:(NSArray<ELPeripheralModel *> *_Nullable)devices;
  23. /**
  24. Set unit callback(设置单位回调)
  25. @param type 结果
  26. @param settingType 支持类型:
  27. WheelMonitorBleDataTypeSetUnitResult
  28. WheelMonitorBleDataTypeSetPressureLimit
  29. WheelMonitorBleDataTypeSetTempLimit
  30. WheelMonitorBleDataTypeSetVoice
  31. */
  32. -(void)wheelMonitorBleManagerReceiveSetResult:(ELSetBluetoothResponseType)type settingType:(WheelMonitorBleDataType)settingType;
  33. /**
  34. Callback tire pressure data(回调胎压数据)
  35. @param model 胎压数据模型
  36. */
  37. -(void)wheelMonitorBleManagerWheelMonitorData:(ELWheelMonitorBleModel *_Nonnull)model;
  38. /**
  39. Get front and rear wheel parameter setting type(获取前后轮参数设置类型)
  40. @param type 类型
  41. */
  42. -(void)wheelMonitorBleManagerReceiveSettingType:(WheelMonitorSettingType)type;
  43. @end
  44. NS_ASSUME_NONNULL_BEGIN
  45. @interface ELWheelMonitorBleManager : ELBluetoothManager
  46. @property (nonatomic, weak) id<WheelMonitorBleManagerDelegate> wheelMonitordelegate;
  47. +(instancetype)shareManager;
  48. /**
  49. Set unit(设置单位)
  50. @param pressureUnit 压力单位
  51. @param tempUnit 温度单位
  52. */
  53. -(void)changePressureUnit:(ELDevicePressureUnit)pressureUnit tempUnit:(ELDeviceTemperatureUnit)tempUnit;
  54. /**
  55. Read tire pressure information(读取胎压信息)
  56. @param type 轮胎
  57. */
  58. -(void)getWheelData:(WheelMonitorGetWheelData)type;
  59. /**
  60. Set tire pressure threshold(设置胎压阀值)
  61. @param frontMax 前轮上限阀值
  62. @param frontMin 前轮下限阀值
  63. @param backMax 后轮上限阀值
  64. @param backMin 后轮下限阀值
  65. @param unit 单位
  66. @param point 阀值数值小数点
  67. */
  68. -(void)sendSettingWheelPressureLimitWithFrontMax:(int)frontMax frontMin:(int)frontMin backMax:(int)backMax backMin:(int)backMin pressureUnit:(ELDevicePressureUnit)unit valuePoint:(int)point;
  69. /**
  70. Set temperature threshold and alarm value(设置温度阀值、报警值)
  71. @param tempMax 温度上限阀值
  72. @param tempMin 温度下限阀值(目前用不到,值为 0000)
  73. @param unit 温度值单位
  74. @param point 阀值数值小数点
  75. @param open 语音报警:YES:打开,NO:关闭
  76. */
  77. -(void)sendSettingWheelTempLimitWithTempMax:(int16_t)tempMax tempMin:(int16_t)tempMin tempUnit:(ELDeviceTemperatureUnit)unit valuePoint:(int)point openVoice:(BOOL)open;
  78. /**
  79. Set alarm prompt(设置报警提示)
  80. @param open Voice alarm: YES: on, NO: off(语音报警:YES:打开,NO:关闭)
  81. */
  82. -(void)sendSettingWheelOpenVoice:(BOOL)open;
  83. @end
  84. NS_ASSUME_NONNULL_END