BLUSLegacyBeacon Class Reference
Inherits from | BLUConfigurableBeacon : BLUBluetoothBeacon : BLUBeacon : NSObject |
---|---|
Declared in | BLUSLegacyBeacon.h |
Overview
BLUSLegacyBeacon
objects represent BLUConfigurableBeacon
objects that have been identified as legacy Bluvision sBeacons.
Legacy sBeacon objects hold the telemetry data and identifiers included in sBeacon legacy advertisements. They also contain device information that is only available after connecting to the beacon and reading its configuration.
Properties
identifier
The beacon’s 32 bit numeric identifier.
@property (nonatomic, readonly) NSNumber *identifier
Discussion
The beacon’s 32 bit numeric identifier.
Declared In
BLUSLegacyBeacon.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
BLUSLegacyBeacon.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
BLUSLegacyBeacon.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
BLUSLegacyBeacon.h
hasValidManufacturerData
A boolean indicating whether the beacon is broadcasting manufacturer data conforming to the legacy sBeacon format.
@property (nonatomic, readonly) BOOL hasValidManufacturerData
Discussion
A boolean indicating whether the beacon is broadcasting manufacturer data conforming to the legacy sBeacon format.
Depending on their settings some older Bluvision beacon models may be broadcasting blank advertisements in their factory state. These beacons will be represented by legacy sBeacon objects, too. Use this boolean to differentiate between beacons that actually broadcast the legacy sBeacon format and those that don’t.
Declared In
BLUSLegacyBeacon.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
BLUSLegacyBeacon.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 |
|
---|---|
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
BLUSLegacyBeacon.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
BLUSLegacyBeacon.h