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.

ELFoodThermometerHead.h 2.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //
  2. // ELFoodThermometerHead.h
  3. // Elink
  4. //
  5. // Created by LarryZhang on 2021/4/23.
  6. // Copyright © 2021 iot_iMac. All rights reserved.
  7. //
  8. #ifndef ELFoodThermometerHead_h
  9. #define ELFoodThermometerHead_h
  10. #import "ELSDKHeader.h"
  11. typedef NS_ENUM(NSUInteger, FoodThermometerProtocol) {//cmd:命令 sta:状态 ack:应答
  12. FoodThermometerProtocol_AppGetBasicInfo_cmd_A701 = 0x01, //APP-获取设备基础信息
  13. FoodThermometerProtocol_DeviceBasicInfo_sta_A702 = 0x02, //MCU-上发设备基础信息
  14. FoodThermometerProtocol_DeviceDataInfo_sta_A703 = 0x03, //MCU-上发数据状态
  15. FoodThermometerProtocol_AppSetUnit_cmd_A704 = 0x04, //APP-切换单位
  16. FoodThermometerProtocol_DeviceSetUnit_ack_A705 = 0x05, //MCU-切换单位ack
  17. FoodThermometerProtocol_AppDeviceSetAlarm_cmd_A706 = 0x06, //APP-MCU-同步取消报警
  18. FoodThermometerProtocol_AppDeviceSetAlarm_ack_A707 = 0x07, //APP-MCU-同步取消报警ack
  19. FoodThermometerProtocol_AppSetTempPre_cmd_A708 = 0x08, //APP-设置目标温度
  20. FoodThermometerProtocol_DeviceSetUnit_ack_A709 = 0x09, //MCU-设置目标温度ack
  21. FoodThermometerProtocol_AppSetDuration_cmd_A70A = 0x0A, //APP-设置定时时间时长
  22. FoodThermometerProtocol_DeviceSetDuration_ack_A70B = 0x0B, //MCU-设置定时时间时长ack
  23. FoodThermometerProtocol_AppDeviceSetPower_cmd_A70C = 0x0C, //APP-MCU-开始结束指令
  24. FoodThermometerProtocol_AppDeviceSetPower_ack_A70D = 0x0D, //APP-MCU-开始结束指令ack
  25. FoodThermometerProtocol_AppSetDateTime_cmd_A710 = 0x10, //APP-下发时间
  26. FoodThermometerProtocol_DeviceSetDateTime_ack_A711 = 0x11, //MCU-下发时间ack
  27. FoodThermometerProtocol_AppDeviceSetStart_cmd_A712 = 0x12, //APP-MCU-启动关闭设备探针
  28. FoodThermometerProtocol_AppDeviceSetStart_ack_A713 = 0x13, //APP-MCU-启动关闭设备探针
  29. };
  30. //A7 02
  31. //MCU 上发基础信息
  32. typedef struct {
  33. //探针总数量
  34. Byte probeCount;
  35. //电池充电状态
  36. Byte charging;
  37. //电量(若无电量检测功能,则该值为0xFF)
  38. Byte batteryLevel;
  39. //当前温度
  40. Byte curTemperatureUnit;
  41. //异常报警类型
  42. Byte alarmType;
  43. //设备支持烧烤模式
  44. Byte mode;
  45. //设备支持报警模式
  46. Byte alarmMode;
  47. } BasicInfo;
  48. //A7 03
  49. //MCU上发数据状态
  50. typedef struct {
  51. Byte index;//探针编号 1~8
  52. Byte working;//探针是否插入设备状态
  53. UInt16 internalRawTemperature;//实时温度
  54. UInt16 ambientRawTemperature;//环境温度
  55. UInt16 targetRawTemperature;//目标温度
  56. Byte inserting;//探针状态是否已插入肉内
  57. Byte started;//探针状态是否已启动报警功能,关联app Start
  58. Byte mode;//模式0:烤架。1:烤箱
  59. UInt16 duration;//定时时间(大端序,单位min。若无,则该值为0xFFFF)
  60. Byte alarmType;//报警类型 0:无报警 1:温度达到报警 2:定时达到报警
  61. } ProbeStatus;
  62. #endif /* ELFoodThermometerHead_h */