Tuya iOS Smart Life App SDK 5.15.0
ThingSmartSceneDPModel Class Reference

ThingSmartSceneDPModel provides more attributes for developers to implement the datapoint of device. More...

#import <ThingSmartSceneDPModel.h>

Inheritance diagram for ThingSmartSceneDPModel:

Instance Methods

(BOOL) - isTransparentDP
 
(BOOL) - isRawDP
 
(BOOL) - isStringDP
 
(BOOL) - isWeatherDP
 
(BOOL) - isSunsetriseDP
 
(SceneDisplayType) - displayType
 
(BOOL) - isCountDownDP
 
(BOOL) - isPercentDP
 
(BOOL) - isTempDP
 
(BOOL) - isMatterColorTempDp
 
(TSceneDPTempType) - tempType
 
(ThingSmartSceneDPModel *) - modelWithEntityId:isCondition:expr:actDic:
 
(NSInteger) - selectedValue
 
(NSDictionary *) - percentDp
 
(NSDictionary *) - customExtraInfo
 
(NSInteger) - kForPercent
 
(NSInteger) - percentToValue
 
(NSInteger) - valueToPercent
 
(NSString *) - selectedValueDisplayStr
 
((deprecated("Use `isPercentDP` instead.") - __attribute__
 
(BOOL) - isTransparentDP
 
(BOOL) - isRawDP
 
(BOOL) - isStringDP
 
(BOOL) - isWeatherDP
 
(BOOL) - isSunsetriseDP
 
(SceneDisplayType) - displayType
 
(BOOL) - isCountDownDP
 
(BOOL) - isPercentDP
 
(BOOL) - isTempDP
 
(BOOL) - isMatterColorTempDp
 
(TSceneDPTempType) - tempType
 
(ThingSmartSceneDPModel *) - modelWithEntityId:isCondition:expr:actDic:
 
(NSInteger) - selectedValue
 
(NSDictionary *) - percentDp
 
(NSDictionary *) - customExtraInfo
 
(NSInteger) - kForPercent
 
(NSInteger) - percentToValue
 
(NSInteger) - valueToPercent
 
(NSString *) - selectedValueDisplayStr
 
((deprecated("Use `isPercentDP` instead.") - __attribute__
 
(BOOL) - isTransparentDP
 
(BOOL) - isRawDP
 
(BOOL) - isStringDP
 
(BOOL) - isWeatherDP
 
(BOOL) - isSunsetriseDP
 
(SceneDisplayType) - displayType
 
(BOOL) - isCountDownDP
 
(BOOL) - isPercentDP
 
(BOOL) - isTempDP
 
(BOOL) - isMatterColorTempDp
 
(TSceneDPTempType) - tempType
 
(ThingSmartSceneDPModel *) - modelWithEntityId:isCondition:expr:actDic:
 
(NSInteger) - selectedValue
 
(NSDictionary *) - percentDp
 
(NSDictionary *) - customExtraInfo
 
(NSInteger) - kForPercent
 
(NSInteger) - percentToValue
 
(NSInteger) - valueToPercent
 
(NSString *) - selectedValueDisplayStr
 
((deprecated("Use `isPercentDP` instead.") - __attribute__
 
(BOOL) - isTransparentDP
 
(BOOL) - isRawDP
 
(BOOL) - isStringDP
 
(BOOL) - isWeatherDP
 
(BOOL) - isSunsetriseDP
 
(SceneDisplayType) - displayType
 
(BOOL) - isCountDownDP
 
(BOOL) - isPercentDP
 
(BOOL) - isTempDP
 
(BOOL) - isMatterColorTempDp
 
(TSceneDPTempType) - tempType
 
(ThingSmartSceneDPModel *) - modelWithEntityId:isCondition:expr:actDic:
 
(NSInteger) - selectedValue
 
(NSDictionary *) - percentDp
 
(NSDictionary *) - customExtraInfo
 
(NSInteger) - kForPercent
 
(NSInteger) - percentToValue
 
(NSInteger) - valueToPercent
 
(NSString *) - selectedValueDisplayStr
 
((deprecated("Use `isPercentDP` instead.") - __attribute__
 

Properties

NSInteger dpId
 The dp id, it maybe condition id or device id. More...
 
NSString * entityId
 The product ID.This property represent the product's id this data-points belongs to. Only device's datapoints has this value. More...
 
NSString * entityName
 The entity name, it maybe condition name or datapoint name of device. More...
 
NSInteger entityType
 The entity type, device as condition it will be NSInteger 1, 3 for meteorological condition, 6 for timer condition, 7 for human body detector condition, 10 for geofencing condition. More...
 
NSString * iconUrl
 The icon URL of condition. More...
 
NSArrayvalueRangeJson
 Condition's or device's data point' value range, like "value:{"unit":"","min":10,"max":1000,"scale":0,"step":1,"type":"value"}". More...
 
NSString * actDetail
 Properties of device, like {"id":1,"desc":"","name":"Switch","property":{"type":"bool"},"attr":3,"code":"switch_on","type":"obj","mode":"rw"}. More...
 
ThingSmartSchemaModeldpModel
 Description of data point and selected value. More...
 
NSString * operators
 The operation description, operators like "["=="]". More...
 
NSDictionary * property
 The condition name, code, properties. For details check the dpModel property. More...
 
NSString * entitySubId
 The entity sub id of condition or datapoint of device, condition's subId like "humidity", device data point's subId like "1". More...
 
NSArraymcGroups
 Multi control information, value is nil if not belong to any multi control group, format:[{"id":123,"groupName":"more control group 1"}]. More...
 
NSDictionary * condCalExtraInfo
 Extra information about dp value's calculate type and other extra information, calType's range is ["sum","average","max","min","count","duration"]. More...
 
NSString * jumpUrl
 The jump url. More...
 
NSDictionary * structElementJson
 The the value range of the device struct datapoint. More...
 
NSInteger selectedRow
 The selected row, -1 means haven't selected, set by you. More...
 
NSInteger selectedOperationRow
 The selected operator, -1 means haven't selected, set by you. More...
 
NSString * devId
 The device Id,set by you. More...
 
SceneDisplayType displayType
 The displayType of this datapoint‘s value. More...
 
BOOL useCustomValue
 
NSString * externalDisplayValue
 
NSString * customUnitKey
 
NSArray *expr __deprecated
 Expression, eg:(("$humidity","==","comfort"), (“$dp1”,“==”,“1”), ...), set by you. More...
 
NSString *cityId __deprecated
 The city Id, set by you. More...
 
NSString *cityName __deprecated
 The city name, set by you. More...
 
CLLocationDegrees cityLatitude __deprecated
 The city's latitude, set by you. More...
 
CLLocationDegrees cityLongitude __deprecated
 The city's longitude, set by you. More...
 
NSInteger sceneDPId __deprecated
 The deprecated property. More...
 

Detailed Description

ThingSmartSceneDPModel provides more attributes for developers to implement the datapoint of device.

Note
It is mainly used to describe the detail information of the device's data-points.

Definition at line 15 of file ThingSmartSceneDPModel.h.

Method Documentation

◆ __attribute__ [1/4]

- ((deprecated("Use `isPercentDP` instead.") __attribute__

Check if the datapoint display type is percent or percent1. Percent type is from 0 to 100, Percent1 type is from 1 to 100. This method works the same as isPercentDP.

◆ __attribute__ [2/4]

- ((deprecated("Use `isPercentDP` instead.") __attribute__

Check if the datapoint display type is percent or percent1. Percent type is from 0 to 100, Percent1 type is from 1 to 100. This method works the same as isPercentDP.

◆ __attribute__ [3/4]

- ((deprecated("Use `isPercentDP` instead.") __attribute__

Check if the datapoint display type is percent or percent1. Percent type is from 0 to 100, Percent1 type is from 1 to 100. This method works the same as isPercentDP.

◆ __attribute__ [4/4]

- ((deprecated("Use `isPercentDP` instead.") __attribute__

Check if the datapoint display type is percent or percent1. Percent type is from 0 to 100, Percent1 type is from 1 to 100. This method works the same as isPercentDP.

◆ customExtraInfo [1/4]

- (NSDictionary *) customExtraInfo

◆ customExtraInfo [2/4]

- (NSDictionary *) customExtraInfo

◆ customExtraInfo [3/4]

- (NSDictionary *) customExtraInfo

◆ customExtraInfo [4/4]

- (NSDictionary *) customExtraInfo

◆ displayType [1/4]

- (SceneDisplayType) displayType

The datapoint display type. Detail see SceneDisplayType enum definition.

◆ displayType [2/4]

- (SceneDisplayType) displayType

The datapoint display type. Detail see SceneDisplayType enum definition.

◆ displayType [3/4]

- (SceneDisplayType) displayType

The datapoint display type. Detail see SceneDisplayType enum definition.

◆ displayType [4/4]

- (SceneDisplayType) displayType

The datapoint display type. Detail see SceneDisplayType enum definition.

◆ isCountDownDP [1/4]

- (BOOL) isCountDownDP

Check if datapoint display type is countdown. In includes h/m(hous, minute) and h/m/s(hous, minute, seconds) two display types.

◆ isCountDownDP [2/4]

- (BOOL) isCountDownDP

Check if datapoint display type is countdown. In includes h/m(hous, minute) and h/m/s(hous, minute, seconds) two display types.

◆ isCountDownDP [3/4]

- (BOOL) isCountDownDP

Check if datapoint display type is countdown. In includes h/m(hous, minute) and h/m/s(hous, minute, seconds) two display types.

◆ isCountDownDP [4/4]

- (BOOL) isCountDownDP

Check if datapoint display type is countdown. In includes h/m(hous, minute) and h/m/s(hous, minute, seconds) two display types.

◆ isMatterColorTempDp [1/4]

- (BOOL) isMatterColorTempDp

◆ isMatterColorTempDp [2/4]

- (BOOL) isMatterColorTempDp

◆ isMatterColorTempDp [3/4]

- (BOOL) isMatterColorTempDp

◆ isMatterColorTempDp [4/4]

- (BOOL) isMatterColorTempDp

◆ isPercentDP [1/4]

- (BOOL) isPercentDP

Check if the datapoint display type is percent or percent1. Percent type is from 0 to 100, Percent1 type is from 1 to 100.

◆ isPercentDP [2/4]

- (BOOL) isPercentDP

Check if the datapoint display type is percent or percent1. Percent type is from 0 to 100, Percent1 type is from 1 to 100.

◆ isPercentDP [3/4]

- (BOOL) isPercentDP

Check if the datapoint display type is percent or percent1. Percent type is from 0 to 100, Percent1 type is from 1 to 100.

◆ isPercentDP [4/4]

- (BOOL) isPercentDP

Check if the datapoint display type is percent or percent1. Percent type is from 0 to 100, Percent1 type is from 1 to 100.

◆ isRawDP [1/4]

- (BOOL) isRawDP

Check if the datapoint property type is raw.

◆ isRawDP [2/4]

- (BOOL) isRawDP

Check if the datapoint property type is raw.

◆ isRawDP [3/4]

- (BOOL) isRawDP

Check if the datapoint property type is raw.

◆ isRawDP [4/4]

- (BOOL) isRawDP

Check if the datapoint property type is raw.

◆ isStringDP [1/4]

- (BOOL) isStringDP

Check if the datapoint property type is string.

◆ isStringDP [2/4]

- (BOOL) isStringDP

Check if the datapoint property type is string.

◆ isStringDP [3/4]

- (BOOL) isStringDP

Check if the datapoint property type is string.

◆ isStringDP [4/4]

- (BOOL) isStringDP

Check if the datapoint property type is string.

◆ isSunsetriseDP [1/4]

- (BOOL) isSunsetriseDP

Check if datapoint entity subtype is sunset or sunrise type.

◆ isSunsetriseDP [2/4]

- (BOOL) isSunsetriseDP

Check if datapoint entity subtype is sunset or sunrise type.

◆ isSunsetriseDP [3/4]

- (BOOL) isSunsetriseDP

Check if datapoint entity subtype is sunset or sunrise type.

◆ isSunsetriseDP [4/4]

- (BOOL) isSunsetriseDP

Check if datapoint entity subtype is sunset or sunrise type.

◆ isTempDP [1/4]

- (BOOL) isTempDP

Check if datapoint property unit is temperature unit, such as ℃ and ℉.

Returns
YES when the unit is ℃ or ℉, otherwise NO.

◆ isTempDP [2/4]

- (BOOL) isTempDP

Check if datapoint property unit is temperature unit, such as ℃ and ℉.

Returns
YES when the unit is ℃ or ℉, otherwise NO.

◆ isTempDP [3/4]

- (BOOL) isTempDP

Check if datapoint property unit is temperature unit, such as ℃ and ℉.

Returns
YES when the unit is ℃ or ℉, otherwise NO.

◆ isTempDP [4/4]

- (BOOL) isTempDP

Check if datapoint property unit is temperature unit, such as ℃ and ℉.

Returns
YES when the unit is ℃ or ℉, otherwise NO.

◆ isTransparentDP [1/4]

- (BOOL) isTransparentDP

Check if the datapoint property type is raw or string type.

◆ isTransparentDP [2/4]

- (BOOL) isTransparentDP

Check if the datapoint property type is raw or string type.

◆ isTransparentDP [3/4]

- (BOOL) isTransparentDP

Check if the datapoint property type is raw or string type.

◆ isTransparentDP [4/4]

- (BOOL) isTransparentDP

Check if the datapoint property type is raw or string type.

◆ isWeatherDP [1/4]

- (BOOL) isWeatherDP

Check if datapoint entity type is weather type.

◆ isWeatherDP [2/4]

- (BOOL) isWeatherDP

Check if datapoint entity type is weather type.

◆ isWeatherDP [3/4]

- (BOOL) isWeatherDP

Check if datapoint entity type is weather type.

◆ isWeatherDP [4/4]

- (BOOL) isWeatherDP

Check if datapoint entity type is weather type.

◆ kForPercent [1/4]

- (NSInteger) kForPercent

◆ kForPercent [2/4]

- (NSInteger) kForPercent

◆ kForPercent [3/4]

- (NSInteger) kForPercent

◆ kForPercent [4/4]

- (NSInteger) kForPercent

◆ modelWithEntityId:isCondition:expr:actDic: [1/4]

- (ThingSmartSceneDPModel *) modelWithEntityId: (NSString *)  entityId
isCondition: (BOOL)  isCondition
expr: (NSArray *)  expr
actDic: (NSDictionary *)  actDic 

This method should be called, because set properties on the object for logical processing.

◆ modelWithEntityId:isCondition:expr:actDic: [2/4]

- (ThingSmartSceneDPModel *) modelWithEntityId: (NSString *)  entityId
isCondition: (BOOL)  isCondition
expr: (NSArray *)  expr
actDic: (NSDictionary *)  actDic 

This method should be called, because set properties on the object for logical processing.

◆ modelWithEntityId:isCondition:expr:actDic: [3/4]

- (ThingSmartSceneDPModel *) modelWithEntityId: (NSString *)  entityId
isCondition: (BOOL)  isCondition
expr: (NSArray *)  expr
actDic: (NSDictionary *)  actDic 

This method should be called, because set properties on the object for logical processing.

◆ modelWithEntityId:isCondition:expr:actDic: [4/4]

- (ThingSmartSceneDPModel *) modelWithEntityId: (NSString *)  entityId
isCondition: (BOOL)  isCondition
expr: (NSArray *)  expr
actDic: (NSDictionary *)  actDic 

This method should be called, because set properties on the object for logical processing.

◆ percentDp [1/4]

- (NSDictionary *) percentDp

This method returns the percentage of data point.

◆ percentDp [2/4]

- (NSDictionary *) percentDp

This method returns the percentage of data point.

◆ percentDp [3/4]

- (NSDictionary *) percentDp

This method returns the percentage of data point.

◆ percentDp [4/4]

- (NSDictionary *) percentDp

This method returns the percentage of data point.

◆ percentToValue [1/4]

- (NSInteger) percentToValue

This method converts percentage values to specific values.

◆ percentToValue [2/4]

- (NSInteger) percentToValue

This method converts percentage values to specific values.

◆ percentToValue [3/4]

- (NSInteger) percentToValue

This method converts percentage values to specific values.

◆ percentToValue [4/4]

- (NSInteger) percentToValue

This method converts percentage values to specific values.

◆ selectedValue [1/4]

- (NSInteger) selectedValue

This method returns the selected value of data point.

◆ selectedValue [2/4]

- (NSInteger) selectedValue

This method returns the selected value of data point.

◆ selectedValue [3/4]

- (NSInteger) selectedValue

This method returns the selected value of data point.

◆ selectedValue [4/4]

- (NSInteger) selectedValue

This method returns the selected value of data point.

◆ selectedValueDisplayStr [1/4]

- (NSString *) selectedValueDisplayStr

This method returns a specific description of the selected data point value.

◆ selectedValueDisplayStr [2/4]

- (NSString *) selectedValueDisplayStr

This method returns a specific description of the selected data point value.

◆ selectedValueDisplayStr [3/4]

- (NSString *) selectedValueDisplayStr

This method returns a specific description of the selected data point value.

◆ selectedValueDisplayStr [4/4]

- (NSString *) selectedValueDisplayStr

This method returns a specific description of the selected data point value.

◆ tempType [1/4]

- (TSceneDPTempType) tempType

Return temperature type for datapoint property unit. return kSceneDPTempTypeCelsius when datapoint unit is ℃, return kSceneDPTempTypeFahrenheit when datapoint unit is ℉, otherwise return kSceneDPTempTypeNone.

◆ tempType [2/4]

- (TSceneDPTempType) tempType

Return temperature type for datapoint property unit. return kSceneDPTempTypeCelsius when datapoint unit is ℃, return kSceneDPTempTypeFahrenheit when datapoint unit is ℉, otherwise return kSceneDPTempTypeNone.

◆ tempType [3/4]

- (TSceneDPTempType) tempType

Return temperature type for datapoint property unit. return kSceneDPTempTypeCelsius when datapoint unit is ℃, return kSceneDPTempTypeFahrenheit when datapoint unit is ℉, otherwise return kSceneDPTempTypeNone.

◆ tempType [4/4]

- (TSceneDPTempType) tempType

Return temperature type for datapoint property unit. return kSceneDPTempTypeCelsius when datapoint unit is ℃, return kSceneDPTempTypeFahrenheit when datapoint unit is ℉, otherwise return kSceneDPTempTypeNone.

◆ valueToPercent [1/4]

- (NSInteger) valueToPercent

This method converts specific values to percentage values.

◆ valueToPercent [2/4]

- (NSInteger) valueToPercent

This method converts specific values to percentage values.

◆ valueToPercent [3/4]

- (NSInteger) valueToPercent

This method converts specific values to percentage values.

◆ valueToPercent [4/4]

- (NSInteger) valueToPercent

This method converts specific values to percentage values.

Property Documentation

◆ __deprecated [1/6]

- (NSInteger sceneDPId) __deprecated
readwritenonatomicassign

Expression, eg:(("$humidity","==","comfort"), (“$dp1”,“==”,“1”), ...), set by you.

The deprecated property.

The city's longitude, set by you.

The city's latitude, set by you.

The city name, set by you.

The city Id, set by you.

Definition at line 87 of file ThingSmartSceneDPModel.h.

◆ __deprecated [2/6]

- (NSString* cityId) __deprecated
readwritenonatomicstrong

The city Id, set by you.

Definition at line 90 of file ThingSmartSceneDPModel.h.

◆ __deprecated [3/6]

- (NSString* cityName) __deprecated
readwritenonatomicstrong

The city name, set by you.

Definition at line 93 of file ThingSmartSceneDPModel.h.

◆ __deprecated [4/6]

- (CLLocationDegrees cityLatitude) __deprecated
readwritenonatomicassign

The city's latitude, set by you.

Definition at line 96 of file ThingSmartSceneDPModel.h.

◆ __deprecated [5/6]

- (CLLocationDegrees cityLongitude) __deprecated
readwritenonatomicassign

The city's longitude, set by you.

Definition at line 99 of file ThingSmartSceneDPModel.h.

◆ __deprecated [6/6]

- (NSInteger sceneDPId) __deprecated
readwritenonatomicassign

The deprecated property.

Definition at line 102 of file ThingSmartSceneDPModel.h.

◆ actDetail

- (NSString *) actDetail
readwritenonatomicstrong

Properties of device, like {"id":1,"desc":"","name":"Switch","property":{"type":"bool"},"attr":3,"code":"switch_on","type":"obj","mode":"rw"}.

Definition at line 36 of file ThingSmartSceneDPModel.h.

◆ condCalExtraInfo

- (NSDictionary *) condCalExtraInfo
readwritenonatomicstrong

Extra information about dp value's calculate type and other extra information, calType's range is ["sum","average","max","min","count","duration"].

Definition at line 54 of file ThingSmartSceneDPModel.h.

◆ customUnitKey

- (NSString *) customUnitKey
readwritenonatomiccopy

Definition at line 82 of file ThingSmartSceneDPModel.h.

◆ devId

- (NSString *) devId
readwritenonatomicstrong

The device Id,set by you.

Definition at line 72 of file ThingSmartSceneDPModel.h.

◆ displayType

- (SceneDisplayType) displayType
readwritenonatomicassign

The displayType of this datapoint‘s value.

Definition at line 75 of file ThingSmartSceneDPModel.h.

◆ dpId

- (NSInteger) dpId
readwritenonatomicassign

The dp id, it maybe condition id or device id.

Definition at line 18 of file ThingSmartSceneDPModel.h.

◆ dpModel

- (ThingSmartSchemaModel *) dpModel
readwritenonatomicstrong

Description of data point and selected value.

Definition at line 39 of file ThingSmartSceneDPModel.h.

◆ entityId

- (NSString *) entityId
readwritenonatomicstrong

The product ID.This property represent the product's id this data-points belongs to. Only device's datapoints has this value.

Definition at line 21 of file ThingSmartSceneDPModel.h.

◆ entityName

- (NSString *) entityName
readwritenonatomicstrong

The entity name, it maybe condition name or datapoint name of device.

Definition at line 24 of file ThingSmartSceneDPModel.h.

◆ entitySubId

- (NSString *) entitySubId
readwritenonatomicstrong

The entity sub id of condition or datapoint of device, condition's subId like "humidity", device data point's subId like "1".

Definition at line 48 of file ThingSmartSceneDPModel.h.

◆ entityType

- (NSInteger) entityType
readwritenonatomicassign

The entity type, device as condition it will be NSInteger 1, 3 for meteorological condition, 6 for timer condition, 7 for human body detector condition, 10 for geofencing condition.

Definition at line 27 of file ThingSmartSceneDPModel.h.

◆ externalDisplayValue

- (NSString *) externalDisplayValue
readwritenonatomiccopy

Definition at line 81 of file ThingSmartSceneDPModel.h.

◆ iconUrl

- (NSString *) iconUrl
readwritenonatomicstrong

The icon URL of condition.

Definition at line 30 of file ThingSmartSceneDPModel.h.

◆ jumpUrl

- (NSString *) jumpUrl
readwritenonatomicstrong

The jump url.

Definition at line 57 of file ThingSmartSceneDPModel.h.

◆ mcGroups

- (NSArray *) mcGroups
readwritenonatomicstrong

Multi control information, value is nil if not belong to any multi control group, format:[{"id":123,"groupName":"more control group 1"}].

Definition at line 51 of file ThingSmartSceneDPModel.h.

◆ operators

- (NSString *) operators
readwritenonatomicstrong

The operation description, operators like "["=="]".

Definition at line 42 of file ThingSmartSceneDPModel.h.

◆ property

- (NSDictionary *) property
readwritenonatomicstrong

The condition name, code, properties. For details check the dpModel property.

Definition at line 45 of file ThingSmartSceneDPModel.h.

◆ selectedOperationRow

- (NSInteger) selectedOperationRow
readwritenonatomicassign

The selected operator, -1 means haven't selected, set by you.

Definition at line 69 of file ThingSmartSceneDPModel.h.

◆ selectedRow

- (NSInteger) selectedRow
readwritenonatomicassign

The selected row, -1 means haven't selected, set by you.

Definition at line 66 of file ThingSmartSceneDPModel.h.

◆ structElementJson

- (NSDictionary *) structElementJson
readwritenonatomicstrong

The the value range of the device struct datapoint.

Definition at line 60 of file ThingSmartSceneDPModel.h.

◆ useCustomValue

- (BOOL) useCustomValue
readwritenonatomicassign

Definition at line 80 of file ThingSmartSceneDPModel.h.

◆ valueRangeJson

- (NSArray *) valueRangeJson
readwritenonatomicstrong

Condition's or device's data point' value range, like "value:{"unit":"","min":10,"max":1000,"scale":0,"step":1,"type":"value"}".

Definition at line 33 of file ThingSmartSceneDPModel.h.


The documentation for this class was generated from the following files: