Added some javadoc
This commit is contained in:
@@ -11,6 +11,13 @@ import android.os.Bundle;
|
|||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is a wrapper around the default BluetoothDevice object
|
||||||
|
* As BluetoothDevice is final it cannot be extended, so to get it you
|
||||||
|
* need to call {@link #getDevice()} method.
|
||||||
|
*
|
||||||
|
* @author Alexandros Schillings
|
||||||
|
*/
|
||||||
public class BluetoothLeDevice implements Parcelable{
|
public class BluetoothLeDevice implements Parcelable{
|
||||||
private static final String PARCEL_EXTRA_BLUETOOTH_DEVICE = "bluetooth_device";
|
private static final String PARCEL_EXTRA_BLUETOOTH_DEVICE = "bluetooth_device";
|
||||||
private static final String PARCEL_EXTRA_DEVICE_RSSI = "device_rssi";
|
private static final String PARCEL_EXTRA_DEVICE_RSSI = "device_rssi";
|
||||||
|
|||||||
+35
-26
@@ -8,33 +8,42 @@ import uk.co.alt236.bluetoothlelib.device.adrecord.AdRecord;
|
|||||||
import uk.co.alt236.bluetoothlelib.util.ByteUtils;
|
import uk.co.alt236.bluetoothlelib.util.ByteUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
public final class IBeaconManufacturerData {
|
/**
|
||||||
// 0 4C # Byte 1 (LSB) of Company identifier code
|
* Objectifies the Manufactured Data field of an iBeacon
|
||||||
// 1 00 # Byte 0 (MSB) of Company identifier code (0x004C == Apple)
|
*
|
||||||
// 2 02 # Byte 0 of iBeacon advertisement indicator
|
* The parsing is based on the following schema:
|
||||||
// 3 15 # Byte 1 of iBeacon advertisement indicator
|
*
|
||||||
// 4 e2 |\
|
* 0 4C - Byte 1 (LSB) of Company identifier code
|
||||||
// 5 c5 |\\
|
* 1 00 - Byte 0 (MSB) of Company identifier code (0x004C == Apple)
|
||||||
// 6 6d |#\\
|
* 2 02 - Byte 0 of iBeacon advertisement indicator
|
||||||
// 7 b5 |##\\
|
* 3 15 - Byte 1 of iBeacon advertisement indicator
|
||||||
// 8 df |###\\
|
* 4 e2 |\
|
||||||
// 9 fb |####\\
|
* 5 c5 |\\
|
||||||
// 10 48 |#####\\
|
* 6 6d |#\\
|
||||||
// 11 d2 |#####|| iBeacon proximity UUID
|
* 7 b5 |##\\
|
||||||
// 12 b0 |#####||
|
* 8 df |###\\
|
||||||
// 13 60 |#####//
|
* 9 fb |####\\
|
||||||
// 14 d0 |####//
|
* 10 48 |#####\\
|
||||||
// 15 f5 |###//
|
* 11 d2 |#####|| iBeacon proximity UUID
|
||||||
// 16 a7 |##//
|
* 12 b0 |#####||
|
||||||
// 17 10 |#//
|
* 13 60 |#####//
|
||||||
// 18 96 |//
|
* 14 d0 |####//
|
||||||
// 19 e0 |/
|
* 15 f5 |###//
|
||||||
// 20 00 # major
|
* 16 a7 |##//
|
||||||
// 21 00
|
* 17 10 |#//
|
||||||
// 22 00 # minor
|
* 18 96 |//
|
||||||
// 23 00
|
* 19 e0 |/
|
||||||
// 24 c5 # The 2's complement of the calibrated Tx Power
|
* 20 00 - major
|
||||||
|
* 21 00
|
||||||
|
* 22 00 - minor
|
||||||
|
* 23 00
|
||||||
|
* 24 c5 - The 2's complement of the calibrated Tx Power
|
||||||
|
*
|
||||||
|
* @author Alexandros Schillings
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
public final class IBeaconManufacturerData {
|
||||||
private final byte[] mData;
|
private final byte[] mData;
|
||||||
private final int mCalibratedTxPower;
|
private final int mCalibratedTxPower;
|
||||||
private final int mCompanyIdentidier;
|
private final int mCompanyIdentidier;
|
||||||
|
|||||||
Reference in New Issue
Block a user