TuyaSmartSceneConditionExprBuilder Class Reference

Inherits from NSObject
Declared in TuyaSmartSceneConditionExprBuilder.h

+ createBoolExprWithType:isTrue:exprType:

zh^ 创建值为bool类型的条件的expr数据对象, 如“开关”这种布尔型dp点类型创建条件时使用。 zh$ en^ Create a exprModel with bool value and condition type. en$

+ (TuyaSmartSceneExprModel *)createBoolExprWithType:(NSString *)type isTrue:(BOOL)isTrue exprType:(ExprType)exprType

Parameters

type

Whether type or device’s dpId.

isTrue

BOOL value.

exprType

To distinguish the entity type.

Return Value

An ExprModel object.

Discussion

zh^ 创建值为bool类型的条件的expr数据对象, 如“开关”这种布尔型dp点类型创建条件时使用。 zh$ en^ Create a exprModel with bool value and condition type. en$

Declared In

TuyaSmartSceneConditionExprBuilder.h

+ createEnumExprWithType:chooseValue:exprType:

zh^ 创建值为枚举类型类型的条件的expr数据对象。 zh$ en^ Create a exprModel with enum string value and condition type. en$

+ (TuyaSmartSceneExprModel *)createEnumExprWithType:(NSString *)type chooseValue:(NSString *)chooseValue exprType:(ExprType)exprType

Parameters

type

Whether type or device’s dpId.

chooseValue

enum string value, get it in TuyaSmartSceneDPModel.dpModel.property.range

exprType

To distinguish the entity type.

Return Value

An ExprModel object.

Discussion

zh^ 创建值为枚举类型类型的条件的expr数据对象。 zh$ en^ Create a exprModel with enum string value and condition type. en$

Declared In

TuyaSmartSceneConditionExprBuilder.h

+ createValueExprWithType:operater:chooseValue:exprType:

zh^ 创建值为“temp <= 40”形式的expr数据对象。 zh$ en^ Create exprModel like “temp <= 40”. en$

+ (TuyaSmartSceneExprModel *)createValueExprWithType:(NSString *)type operater:(NSString *)operateString chooseValue:(NSInteger)value exprType:(ExprType)exprType

Parameters

type

Whether type or device’s dpId.

operateString

@“==”,@“<=”,@“==”

value

selected value

exprType

To distinguish the entity type.

Return Value

An ExprModel object.

Discussion

zh^ 创建值为“temp <= 40”形式的expr数据对象。 zh$ en^ Create exprModel like “temp <= 40”. en$

Declared In

TuyaSmartSceneConditionExprBuilder.h

+ createRawExprWithType:exprType:

zh^ 创建值为“rawType”形式的expr数据对象。 zh$ en^ Create exprModel like “rawType”. en$

+ (TuyaSmartSceneExprModel *)createRawExprWithType:(NSString *)type exprType:(ExprType)exprType

Parameters

type

Whether type or device’s dpId.

exprType

To distinguish the entity type.

Return Value

An ExprModel object.

Discussion

zh^ 创建值为“rawType”形式的expr数据对象。 zh$ en^ Create exprModel like “rawType”. en$

Declared In

TuyaSmartSceneConditionExprBuilder.h

+ createTimerExprWithTimeZoneId:loops:date:time:

zh^ 创建定时器条件。 zh$ en^ Create timer condition. en$

+ (TuyaSmartSceneExprModel *)createTimerExprWithTimeZoneId:(NSString *)timeZoneId loops:(NSString *)loops date:(NSString *)date time:(NSString *)time

Parameters

timeZoneId

timeZoneId like @“Asia/Shanghai”

loops

eg: @“0111110”, each charactor represent from Sunday to Monday. @“0000000” represent only once.

date

eg: @“20190501”

time

eg: @“20:40”

Return Value

An ExprModel object.

Discussion

zh^ 创建定时器条件。 zh$ en^ Create timer condition. en$

Declared In

TuyaSmartSceneConditionExprBuilder.h