BWBeacon Class Reference
Inherits from | CLBeacon |
Declared in | BWBeacon.h |
Overview
The BWBeacon class represents a single hardware iBeacon detected by a device.
An iBeacon is identified by a three part identifier based on the fields
proximityUUID - a string UUID typically identifying the owner of a number of ibeacons
major - a 16 bit integer indicating a group of iBeacons
minor - a 16 bit integer identifying a single iBeacon
An iBeacon sends a Bluetooth Low Energy (BLE) advertisement that contains these three identifiers, along with the calibrated tx power (in RSSI) of the iBeacon’s Bluetooth transmitter. This class may only be instantiated from a BLE packet, and an RSSI measurement for the packet. The class parses out the three part identifier, along with the calibrated tx power. It then uses the measured RSSI and calibrated tx power to do a rough distance measurement (the accuracy field) and group it into a more reliable buckets of distance (the proximity field.)
Instance Methods
getAccuracy
Use this method to retrieve accuracy value of BWBeacon. This value can also be retrieved from accuracy property of BWBeaon class.
- (CLLocationAccuracy)getAccuracy
Return Value
accuracy value as CLLocationAccuracy
Discussion
Accuracy is represented as an one sigma horizontal accuracy in meters where the measuring device’s location is referenced at the beaconing device. This value is heavily subject to variations in an RF environment. A negative accuracy value indicates the proximity is unknown.
Declared In
BWBeacon.h
getMajor
Use this method to retrieve major value of BWBeacon. This value can also be retrieved from major property of BWBeaon class.
- (CLBeaconMajorValue)getMajor
Return Value
major value as CLBeaconMajorValue
Discussion
Most significant value associated with the beacon.
Declared In
BWBeacon.h
getMinor
Use this method to retrieve minor value of BWBeacon. This value can also be retrieved from minor property of BWBeaon class.
- (CLBeaconMinorValue)getMinor
Return Value
minor value as CLBeaconMinorValue
Discussion
Least significant value associated with the beacon.
Declared In
BWBeacon.h
getProximity
Use this method to retrieve proximity value of BWBeacon. This value can also be retrieved from proximity property of BWBeaon class.
- (CLProximity)getProximity
Return Value
proximity value as CLProximity
Discussion
Proximity of the beacon from the device.
Declared In
BWBeacon.h
getProximityUuid
Use this method to retrieve proximity UUID of BWBeacon. This value can also be retrieved from proximityUUID property of BWBeaon class.
- (NSUUID *)getProximityUuid
Return Value
an NSUUID proximity UUID.
Declared In
BWBeacon.h
getRssi
Use this method to retrieve rssi value of BWBeacon. This value can also be retrieved from rssi property of BWBeaon class.
- (NSInteger)getRssi
Return Value
proximity value as CLProximity
Discussion
Rssi is received signal strength in decibels of the specified beacon. This value is an average of the RSSI samples collected since this beacon was last reported.
Declared In
BWBeacon.h
matchesBWBeacon:
This method determines if another beacon is same as this beacon. It compares beacons’s proximityUUID, major and minor values.
- (BOOL)matchesBWBeacon:(BWBeacon *)beacon
Parameters
- beacon
A BWBeacon object to compare with this object.
Return Value
returns YES if beacons match otherwise NO.
Declared In
BWBeacon.h