ESTBeaconOperationProtocol

@protocol ESTBeaconOperationProtocol <NSObject>

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

  • Type of operation (read or write).

    Declaration

    Objective-C

    - (ESTSettingOperationType)type;

    Swift

    func type() -> ESTSettingOperationType

    Return Value

    Type described by enum.

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

    Declaration

    Objective-C

    - (ESTSettingStorageType)storageType;

    Swift

    func storageType() -> ESTSettingStorageType
  • Device register ID for setting.

    Declaration

    Objective-C

    - (uint16_t)registerID;

    Swift

    func registerID() -> UInt16

    Return Value

    ID of register.

  • Data represented as NSData should be stored in the device.

    Declaration

    Objective-C

    - (nonnull NSData *)valueData;

    Swift

    func valueData() -> Data

    Return Value

    Data value.

  • Method returns value of setting.

    Declaration

    Objective-C

    - (nonnull id)valueCloud;

    Swift

    func valueCloud() -> Any

    Return Value

    Value of setting. Type of value depends on the setting.

  • Lowest firmware version supporting setting.

    Declaration

    Objective-C

    - (nonnull NSString *)supportedFirmwareVersion;

    Swift

    func supportedFirmwareVersion() -> String

    Return Value

    Version of firmware.

  • 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.

  • Method returns copy of the setting associated with this operation.

    Declaration

    Objective-C

    - (nonnull ESTSettingBase *)getSetting;

    Swift

    func getSetting() -> ESTSettingBase

    Return Value

    Setting object, i.e. of class ESTSettingIBeaconMajor.

  • Method allows to update setting.

    Declaration

    Objective-C

    - (void)updateSettingWithData:(nonnull NSData *)data;

    Swift

    func updateSetting(with data: Data)

    Parameters

    data

    Data that should be used to update setting.

  • Method invoked when read/write operation finished with success.

    Declaration

    Objective-C

    - (void)fireSuccessBlockWithData:(nonnull NSData *)result;

    Swift

    func fireSuccessBlock(with result: Data)

    Parameters

    result

    Result of read/write operation.

  • Method invoked when read/write operation failed.

    Declaration

    Objective-C

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

    Swift

    func fireFailureBlockWithError(_ error: Error)

    Parameters

    error

    NSError containing failure information.

  • All the operations that should be performed together with main one.

    Declaration

    Objective-C

    - (nonnull NSArray<id<ESTBeaconOperationProtocol>> *)associatedOperations;

    Swift

    optional func associatedOperations() -> [ESTBeaconOperationProtocol]

    Return Value

    Array of associated operations.