ESTSettingSensorsTemperatureOffset

@interface ESTSettingSensorsTemperatureOffset : ESTSettingReadWrite <NSCopying>

ESTSettingSensorsTemperatureOffset represents Sensors TemperatureOffset value.

You can use this setting to calibrate the beacon’s temperature sensor.

For example, if you measure that the sensor in the beacon is off by 1.2 degree C (shows 21.2 instead of 20.0), set the temperature offset to -1.2.

  • Designated initializer. Validates provided value internally with +validationErrorForValue:.

    See

    +[ESTSettingSensorsTemperatureOffset validationErrorForValue:]

    Declaration

    Objective-C

    - (nonnull instancetype)initWithValue:(float)temperatureOffset;

    Swift

    init(value temperatureOffset: Float)

    Parameters

    temperatureOffset

    Sensors TemperatureOffset value.

    Return Value

    Initialized object. Nil if validation fails.

  • Returns current value of Sensors TemperatureOffset setting.

    Declaration

    Objective-C

    - (float)getValue;

    Swift

    func getValue() -> Float

    Return Value

    Sensors TemperatureOffset value.

  • Method allows to read value of initialized Sensors TemperatureOffset setting object.

    Declaration

    Objective-C

    - (void)readValueWithCompletion:
        (nonnull ESTSettingSensorsTemperatureOffsetCompletionBlock)completion;

    Swift

    func readValue(completion: @escaping ESTSettingSensorsTemperatureOffsetCompletionBlock)

    Parameters

    completion

    Block to be invoked when operation is complete.

  • Method allows to create write operation from already initialized Sensors TemperatureOffset setting object. Value provided during initialization will be used as a desired value.

    Declaration

    Objective-C

    - (void)writeValue:(float)temperatureOffset
            completion:(nonnull ESTSettingSensorsTemperatureOffsetCompletionBlock)
                           completion;

    Swift

    func writeValue(_ temperatureOffset: Float, completion: @escaping ESTSettingSensorsTemperatureOffsetCompletionBlock)

    Parameters

    temperatureOffset

    TemperatureOffset value to be written to the device.

    completion

    Block to be invoked when operation is complete.

  • Method checks if provided value is allowed. Returns nil if validation passes.

    Declaration

    Objective-C

    + (NSError *_Nullable)validationErrorForValue:(float)temperatureOffset;

    Swift

    class func validationError(forValue temperatureOffset: Float) -> Error?

    Parameters

    temperatureOffset

    TemperatureOffset value.

    Return Value

    Error object describing why validation failed. Nil if validation passes.