CSDynamicSensor Class Reference
Inherits from | CSSensor : NSObject |
---|---|
Declared in | CSDynamicSensor.h |
– initWithName:displayName:deviceType:dataType:fields:
Init new sensor for this device.
- (id)initWithName:(NSString *)name displayName:(NSString *)dispName deviceType:(NSString *)devType dataType:(NSString *)datType fields:(NSDictionary *)fields
Parameters
name |
Name of the sensor |
---|---|
dispName |
Description of the sensor used to display name |
devType |
Device type that the sensor belongs to |
datType |
Data type of the values being stored in the sensor |
fields |
Dictionary that stores all the fields with values as a JSON object |
Declared In
CSDynamicSensor.h
– initWithName:displayName:deviceType:dataType:fields:device:
Init new sensor for any device.
- (id)initWithName:(NSString *)name displayName:(NSString *)dispName deviceType:(NSString *)devType dataType:(NSString *)datType fields:(NSDictionary *)fields device:(NSDictionary *)device
Parameters
name |
Name of the sensor |
---|---|
dispName |
Description of the sensor used to display name |
devType |
Device type that the sensor belongs to |
datType |
Data type of the values being stored in the sensor |
fields |
Dictionary that stores all the fields with values as a JSON object |
device |
Dictionary that describes the device. |
Declared In
CSDynamicSensor.h
– commitValue:withTimestamp:
Store a value in the sensor.
- (void)commitValue:(id)value withTimestamp:(NSTimeInterval)timestamp
Parameters
value |
The value to be stored, will be stored as a JSON string object. Can be anything. |
---|---|
timestamp |
Seconds since 1970 timestamp that describes time the value was collected. |
Declared In
CSDynamicSensor.h