BLUSBeacon Class Reference

Inherits from BLUConfigurableBeacon : BLUBluetoothBeacon : BLUBeacon : NSObject
Declared in BLUSBeacon.h

Overview

BLUSBeacon objects represent beacons that have been identified as Bluvision sBeacons.

sBeacon objects hold the telemetry data and identifiers included in sBeacon advertisements. They also contain device information that is only available after connecting to the beacon and reading its configuration.

Properties

  identifier

The beacon’s 64 bit numeric identifier.

@property (nonatomic, readonly) NSNumber *identifier

Discussion

The beacon’s 64 bit numeric identifier.

Declared In

BLUSBeacon.h

  device

The device that is broadcasting the advertisements associated with this beacon.

@property (nonatomic, readonly) BLUDevice *device

Discussion

The device that is broadcasting the advertisements associated with this beacon.

See Also

Declared In

BLUSBeacon.h

  battery

The battery that is associated with this beacon.

@property (nonatomic, readonly) BLUBattery *battery

Discussion

The battery that is associated with this beacon.

See Also

Declared In

BLUSBeacon.h

  temperature

The ambient temperature currently measured by this beacon.

@property (nonatomic, readonly) BLUTemperature *temperature

Discussion

The ambient temperature currently measured by this beacon.

See Also

Declared In

BLUSBeacon.h

  beaconTime

The timestamp of the beacon from its last advertisement.

@property (nonatomic, readonly) NSTimeInterval beaconTime

Discussion

The timestamp of the beacon from its last advertisement.

Declared In

BLUSBeacon.h

Beacon settings

– setBeaconSleepTimeout:completion:

Sets up the beacon to enter deep sleep mode after the specified time interval. In deep sleep, the beacon will not send any broadcasts until it is physically woken up - e.g. via button tap. After being woken up the beacon will go back to sleep once the specified time interval has passed again. The beacon needs to be connected in order to execute this. This operation is only supported by certain beacon types and will return an error if sent to an unsupported device.

- (void)setBeaconSleepTimeout:(NSTimeInterval)timeInterval completion:(nullable void ( ^ ) ( NSError *__nullable error ))completion

Parameters

timeInterval

Time interval after which the beacon will go to sleep.

completion

The completion block that will be executed once the operation has finished.

Discussion

Sets up the beacon to enter deep sleep mode after the specified time interval. In deep sleep, the beacon will not send any broadcasts until it is physically woken up - e.g. via button tap. After being woken up the beacon will go back to sleep once the specified time interval has passed again. The beacon needs to be connected in order to execute this. This operation is only supported by certain beacon types and will return an error if sent to an unsupported device.

Declared In

BLUSBeacon.h

– enableBeaconSleepMode:completion:

Immediately enables or disables deep sleep mode on the beacon. If enabled, the beacon will enter sleep mode only once. It won’t go back to sleep again after it has been woken up. If disabled, the beacon will permanently stay awake. This operation is only supported by certain beacon types and will return an error if sent to an unsupported device.

- (void)enableBeaconSleepMode:(BOOL)enable completion:(nullable void ( ^ ) ( NSError *__nullable error ))completion

Parameters

enable

YES to put the beacon to sleep. NO wake it up permanently.

completion

The completion block that will be executed once the operation has finished.

Discussion

Immediately enables or disables deep sleep mode on the beacon. If enabled, the beacon will enter sleep mode only once. It won’t go back to sleep again after it has been woken up. If disabled, the beacon will permanently stay awake. This operation is only supported by certain beacon types and will return an error if sent to an unsupported device.

Declared In

BLUSBeacon.h

– setDeviceTime:completion:

Sets the beacon’s internal timer. This timer will increment every second and reset when the beacon reboots. The timer can be used to represent the current time by setting it to an appropriate Unix timestamp.

- (void)setDeviceTime:(NSTimeInterval)timeInterval completion:(void ( ^ ) ( BOOL success , NSError *error ))completion

Parameters

timeInterval

The time interval in seconds that the beacon’s timer will be set to.

completion

The completion block that will be executed once the operation has finished.

Discussion

Sets the beacon’s internal timer. This timer will increment every second and reset when the beacon reboots. The timer can be used to represent the current time by setting it to an appropriate Unix timestamp.

Declared In

BLUSBeacon.h