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.

ELSkipBleManager.h 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. //
  2. // ELSkipBleManager.h
  3. // AILinkBleSDK
  4. //
  5. // Created by cliCk on 2021/6/16.
  6. // Copyright © 2021 IOT. All rights reserved.
  7. //
  8. #import <AILinkBleSDK/ELBluetoothManager.h>
  9. #import "ELSkipBleHeader.h"
  10. NS_ASSUME_NONNULL_BEGIN
  11. @class ELSkipBleDataModel;
  12. @class ELSkipHistoryDataModel;
  13. @protocol ELSkipBleDelegate <NSObject>
  14. //@optional
  15. /** 返回设备的连接状态 */
  16. - (void)skipManagerUpdateState:(ELBluetoothState)state;
  17. /** 回调扫描到的设备 */
  18. - (void)skipManagerScanDevices:(NSArray<ELPeripheralModel *> *)scanDevices;
  19. /** 返回命令结果 */
  20. - (void)skipManagerResult:(enum Skip_ResultType)result bleHeaderType:(enum Skip_BleHeadType)type;
  21. /** 实时跳绳数据上报
  22. * @param readyState : 跳绳状态
  23. * @param model : 运动数据模型
  24. * @param power : 当前电量百分比
  25. */
  26. - (void)skipManagerRealtimeDataWithState:(enum Skip_ReadyStateType)readyState skipModel:(ELSkipBleDataModel *)model power:(NSUInteger)power;
  27. /** 跳绳结束,上报数据
  28. * @param model : 跳绳记录数据模型
  29. */
  30. - (void)skipManagerSportEndReportDataWithHistoryModel:(ELSkipHistoryDataModel *)model;
  31. /** 上报离线历史记录
  32. * @param modelList : 记录模型列表
  33. */
  34. - (void)skipManagerReportOfflineHistoryWithHistoryModelList:(NSArray<ELSkipHistoryDataModel *> *)modelList;
  35. @end
  36. @interface ELSkipBleManager : ELBluetoothManager
  37. @property (nonatomic, weak) id<ELSkipBleDelegate> skipDelegate;
  38. + (ELSkipBleManager *)shareManager;
  39. /** 绑定设备,该功能与硬件没有实际的交互用途,只用户处理app绑定设备时的逻辑处理 */
  40. - (void)bindDeviceWithType:(enum Skip_BindDeviceType)type;
  41. /** 同步时间戳 */
  42. - (void)syncDevTimeStamp:(NSInteger)timestamp;
  43. /** 启动/结束自由跳绳 */
  44. - (void)sendFreeModeWithType:(enum Skip_UseDevCommandType)type;
  45. /** 启动/结束倒计时跳绳 */
  46. - (void)sendCountdownTimeModeWithType:(enum Skip_UseDevCommandType)type;
  47. /** 修改默认倒计时 */
  48. - (void)updateCountdownTimeWithNum:(NSUInteger)num;
  49. /** 启动/结束倒计数跳绳 */
  50. - (void)sendCountDownNumWithType:(enum Skip_UseDevCommandType)type;
  51. /** 修改默认倒计数 */
  52. - (void)updateCountdownNumWithNum:(NSUInteger)num;
  53. /** 请求接收离线历史记录 */
  54. - (void)getOfflineHistory;
  55. /** 清空离线历史记录 */
  56. - (void)clearOfflineHistory;
  57. @end
  58. NS_ASSUME_NONNULL_END