ESTSettingNearablePower

@interface ESTSettingNearablePower : ESTSettingReadWrite <NSCopying>

ESTSettingNearablePower represents Nearable Power value.

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

    See

    +[ESTSettingNearablePower validationErrorForValue:]

    Declaration

    Objective-C

    - (nonnull instancetype)initWithValue:(ESTNearablePower)ower;

    Swift

    init(value ower: ESTNearablePower)

    Parameters

    power

    Nearable Power value.

    Return Value

    Initialized object. Nil if validation fails.

  • Returns current value of Nearable Power setting.

    Declaration

    Objective-C

    - (ESTNearablePower)getValue;

    Swift

    func getValue() -> ESTNearablePower

    Return Value

    Nearable Power value.

  • Method allows to read value of initialized Nearable Power setting object.

    Declaration

    Objective-C

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

    Swift

    func readValue(completion: @escaping ESTSettingNearablePowerCompletionBlock)

    Parameters

    completion

    Block to be invoked when operation is complete.

    Return Value

    Initialized operation object.

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

    Declaration

    Objective-C

    - (void)writeValue:(ESTNearablePower)power
            completion:(nonnull ESTSettingNearablePowerCompletionBlock)completion;

    Swift

    func writeValue(_ power: ESTNearablePower, completion: @escaping ESTSettingNearablePowerCompletionBlock)

    Parameters

    power

    Power value to be written to the device.

    completion

    Block to be invoked when operation is complete.

    Return Value

    Initialized operation object.

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

    Declaration

    Objective-C

    + (NSError *_Nullable)validationErrorForValue:(ESTNearablePower)Power;

    Swift

    class func validationError(forValue Power: ESTNearablePower) -> Error?

    Parameters

    Power

    Power value.

    Return Value

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