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.

ELMeatProbeScreenBoxBleParser.h 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. //
  2. // ELMeatProbeScreenBoxBleParser.h
  3. // Pods
  4. //
  5. // Created by Larry Zhang on 2024/2/26.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #import <AILinkBleSDK/ELSDKHeader.h>
  9. #import "ELMeatProbeScreenBoxBleHeader.h"
  10. NS_ASSUME_NONNULL_BEGIN
  11. @protocol ELMeatProbeScreenBoxBleParserDelegate;
  12. @class ELMeatProbeScreenBoxStatusModel, ELMeatProbeScreenBoxProbeStatusModel, ELMeatProbeScreenBoxBleBBQParamModel;
  13. @interface ELMeatProbeScreenBoxBleParser : NSObject
  14. @property (nonatomic, copy) NSString *mac;
  15. @property (nonatomic, assign) NSInteger deviceId;
  16. @property (nonatomic, weak) id<ELMeatProbeScreenBoxBleParserDelegate> delegate;
  17. - (void)parseA7Payload:(NSData *)payload;
  18. @end
  19. @protocol ELMeatProbeScreenBoxBleParserDelegate <NSObject>
  20. @optional
  21. //MCU 上报设备状态数据(Type:02)
  22. - (void)meatProbeScreenBoxBleParser:(ELMeatProbeScreenBoxBleParser *)parser boxStatus:(ELMeatProbeScreenBoxStatusModel *)boxStatus;
  23. //切换单位(Type:04)
  24. - (void)meatProbeScreenBoxBleParser:(ELMeatProbeScreenBoxBleParser *)parser unit:(ELDeviceTemperatureUnit)unit;
  25. //报警状态数据(Type:06)//state: bit0:食物目标温度到达时置1
  26. - (void)meatProbeScreenBoxBleParser:(ELMeatProbeScreenBoxBleParser *)parser startAlarmWithState:(Byte)state macData:(NSData *)macData mac:(NSString *)mac;
  27. //取消报警(Type:08)
  28. - (void)meatProbeScreenBoxBleParser:(ELMeatProbeScreenBoxBleParser *)parser stopAlarmWithMacData:(NSData *)macData mac:(NSString *)mac;
  29. //烧烤任务参数(Type:0A)//Op:0x00:设置任务参数(设置时需要一个针一个针设定任务) 0x01:获取任务参数(返回所有的针任务,如果包长度超MTU时,会分包发) 0x02:结束烧烤任务
  30. - (void)meatProbeScreenBoxBleParser:(ELMeatProbeScreenBoxBleParser *)parser option:(UInt8)option supportProbe:(UInt8)supportProbe params:(NSArray <ELMeatProbeScreenBoxBleBBQParamModel *>*)params;
  31. @end
  32. @interface ELMeatProbeScreenBoxStatusModel : NSObject
  33. //设备状态数据协议版本:0x01
  34. @property (nonatomic, assign) UInt8 version;
  35. //支持的探针数量 M
  36. @property (nonatomic, assign) UInt8 probeMaxCount;
  37. //当前连接的探针数量 N
  38. @property (nonatomic, assign) UInt8 probeCount;
  39. //充电盒电池状态
  40. @property (nonatomic, assign) UInt8 batteryStatus;
  41. @property (nonatomic, assign) UInt8 batteryPercent;
  42. //温度单位
  43. @property (nonatomic, assign) ELDeviceTemperatureUnit unit;
  44. //生成时间
  45. @property (nonatomic, assign) NSTimeInterval timestamp;
  46. @property (nonatomic, strong) NSArray <ELMeatProbeScreenBoxProbeStatusModel *>*probeStatusArray;
  47. @end
  48. @interface ELMeatProbeScreenBoxProbeStatusModel : NSObject
  49. //探针编号(1-M) 无法确定可连 接探针的编号,上报 0xFF
  50. @property (nonatomic, assign) UInt8 index;
  51. //探针 mac 地址
  52. @property (nonatomic, strong) NSData *macData;
  53. @property (nonatomic, copy, readonly) NSString *macString;
  54. //
  55. //食物温度
  56. @property (nonatomic, assign, readonly) NSInteger internalTemperature_C;
  57. @property (nonatomic, assign, readonly) NSInteger internalTemperature_F;
  58. @property (nonatomic, assign, readonly) ELDeviceTemperatureUnit internalTemperatureUnit;
  59. @property (nonatomic, assign) UInt16 internalTemperatureRaw;
  60. //
  61. //环境温度
  62. @property (nonatomic, assign, readonly) NSInteger ambientTemperature_C;
  63. @property (nonatomic, assign, readonly) NSInteger ambientTemperature_F;
  64. @property (nonatomic, assign, readonly) ELDeviceTemperatureUnit ambientTemperatureUnit;
  65. @property (nonatomic, assign) UInt16 ambientTemperatureRaw;
  66. //
  67. //探针电池状态
  68. @property (nonatomic, assign) UInt8 batteryStatus;
  69. @property (nonatomic, assign) UInt8 batteryPercent;
  70. @property (nonatomic, assign) UInt8 batteryRaw;
  71. //探针插入食物状态
  72. @property (nonatomic, assign) UInt8 insertStatusRaw;
  73. //探针连接状态
  74. @property (nonatomic, assign) UInt8 connectState;
  75. //生成时间
  76. @property (nonatomic, assign) double timestamp;
  77. @end
  78. NS_ASSUME_NONNULL_END