//
//  EDevice.h
//  CGMAlgo
//
//  Created by yuwell on 2024/11/5.
//

#import <Foundation/Foundation.h>
#import "CGMCommonDefine.h"

NS_ASSUME_NONNULL_BEGIN

@interface EGattMessage : NSObject

@property (nonatomic, copy) NSString *UUID_SERVICE;
@property (nonatomic, copy) NSString *UUID_WRITE;
@property (nonatomic, copy) NSString *UUID_READ;

- (NSString *)toString;

@end


@interface EDevice : NSObject

/**
 * The transmitter name starts
 */
@property (nonatomic, copy) NSString *nameStart;
/**
 * Warm-up time, 1 hour
 */
@property (nonatomic, assign) int initHour;
/**
 * Warm-up time, 1 hour for TimeMillis
 */
@property (nonatomic, assign) long initTimeMillis;
/**
 * Warm-up time, 1 hour is 20
 */
@property (nonatomic, assign) int initNumber;
/**
 * End time, 14 days
 */
@property (nonatomic, assign) int endDay;
/**
 * End time, 14 days + 1 hour is 337
 */
@property (nonatomic, assign) int endHour;
/**
 * End time, 14 days + 1 hour is 7720
 */
@property (nonatomic, assign) int endNumber;
/**
 * {@link EGattMessage}
 */
@property (nonatomic, strong) EGattMessage *eGattMessage;
/**
 * {@link AlgorithmType_CT4}
 */
@property (nonatomic, assign) int algorithm;
/**
 * {CT4}
 */
@property (nonatomic, copy) NSString *deviceType;

/**
 * Gets the product type based on the transmitter SN
 * @param deviceName transmitter SN
 * @return {@link EDevice}
 */
+ (EDevice *)getEnumDevice:(NSString *)deviceName;

- (NSString *)toString;

@end

NS_ASSUME_NONNULL_END
