ESTSettingIBeaconPower

@interface ESTSettingIBeaconPower : ESTSettingReadWrite <NSCopying>

ESTSettingIBeaconPower represents iBeacon Power value.

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

    See

    +[ESTSettingIBeaconPower validationErrorForValue:]

    Declaration

    Objective-C

    - (instancetype _Nullable)initWithValue:(ESTIBeaconPower)power;

    Swift

    init?(value power: ESTIBeaconPower)

    Parameters

    power

    iBeacon Power value.

    Return Value

    Initialized object. Nil if validation fails.

  • Returns current value of iBeacon Power setting.

    Declaration

    Objective-C

    - (ESTIBeaconPower)getValue;

    Swift

    func getValue() -> ESTIBeaconPower

    Return Value

    iBeacon Power value.

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

    Declaration

    Objective-C

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

    Swift

    func readValue(completion: @escaping ESTSettingIBeaconPowerCompletionBlock)

    Parameters

    completion

    Block to be invoked when operation is complete.

    Return Value

    Initialized operation object.

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

    Declaration

    Objective-C

    - (void)writeValue:(ESTIBeaconPower)power
            completion:(nonnull ESTSettingIBeaconPowerCompletionBlock)completion;

    Swift

    func writeValue(_ power: ESTIBeaconPower, completion: @escaping ESTSettingIBeaconPowerCompletionBlock)

    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:(ESTIBeaconPower)power;

    Swift

    class func validationError(forValue power: ESTIBeaconPower) -> Error?

    Parameters

    power

    Power value.

    Return Value

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