ESTNearableOperationProtocol

@protocol ESTNearableOperationProtocol <NSObject>

ESTNearableOperationProtocol has to be implemented by all nearable setting operation classes to be compatible with Estimote device API.

  • Defines if the operation is read or write.

    Declaration

    Objective-C

    - (ESTSettingOperationType)type;

    Swift

    func type() -> ESTSettingOperationType

    Return Value

    Operation type.

  • Defines if operation comes only from Cloud, device or both.

    Declaration

    Objective-C

    - (ESTSettingStorageType)storageType;

    Swift

    func storageType() -> ESTSettingStorageType
  • Device register identifier specified in the Nearable Bluetooth communication protocol.

    Declaration

    Objective-C

    - (uint16_t)registerID;

    Swift

    func registerID() -> UInt16

    Return Value

    Register identifier.

  • Serialized setting value data to be written to the device. Specified in the Nearable Bluetooth communication protocol.

    Declaration

    Objective-C

    - (nonnull NSData *)valueData;

    Swift

    func valueData() -> Data

    Return Value

    Value data.

  • Serialized setting data size specified in the Nearable Bluetooth communication protocol. It’s not the same as NSData length.

    Declaration

    Objective-C

    - (NSInteger)valueDataSize;

    Swift

    func valueDataSize() -> Int

    Return Value

    Setting data size.

  • Oldest firmware version that supports this operation’s setting.

    Declaration

    Objective-C

    - (nonnull NSString *)supportedFirmwareVersion;

    Swift

    func supportedFirmwareVersion() -> String

    Return Value

    Semver string.

  • Setting to be written or read by executing this operation.

    Declaration

    Objective-C

    - (nonnull ESTSettingBase *)getSetting;

    Swift

    func getSetting() -> ESTSettingBase

    Return Value

    Setting subclass.

  • Method allows to update setting.

    Declaration

    Objective-C

    - (void)updateSetting:(nonnull ESTSettingBase *)setting;

    Swift

    func updateSetting(_ setting: ESTSettingBase)

    Parameters

    setting

    Data that should be used to update setting.

  • Defines this operation’s associated setting class. Must be a subclass of ESTSettingBase.

    Declaration

    Objective-C

    - (nonnull Class)settingClass;

    Swift

    func settingClass() -> AnyClass

    Return Value

    Setting class.

  • Method indicates if particular operation should be synchronized with Estimote Cloud while performing.

    Declaration

    Objective-C

    - (BOOL)shouldSynchronize;

    Swift

    func shouldSynchronize() -> Bool

    Return Value

    Flag indicating synchronization.

  • Block to be invoked after the operation is executed successfully.

    Declaration

    Objective-C

    - (void)fireSuccessBlock;

    Swift

    func fireSuccessBlock()
  • Block to be invoked after the operation fails.

    Declaration

    Objective-C

    - (void)fireFailureBlockWithError:(nonnull NSError *)error;

    Swift

    func fireFailureBlockWithError(_ error: Error)

    Parameters

    error

    Error Describing failure reason.