Added some javadoc

This commit is contained in:
Alexandros Schillings
2014-03-11 20:45:18 +00:00
parent d59f8dede0
commit b3399fa539
2 changed files with 42 additions and 26 deletions

View File

@@ -11,6 +11,13 @@ import android.os.Bundle;
import android.os.Parcel;
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{
private static final String PARCEL_EXTRA_BLUETOOTH_DEVICE = "bluetooth_device";
private static final String PARCEL_EXTRA_DEVICE_RSSI = "device_rssi";

View File

@@ -8,33 +8,42 @@ import uk.co.alt236.bluetoothlelib.device.adrecord.AdRecord;
import uk.co.alt236.bluetoothlelib.util.ByteUtils;
import android.util.Log;
public final class IBeaconManufacturerData {
// 0 4C # Byte 1 (LSB) of Company identifier code
// 1 00 # Byte 0 (MSB) of Company identifier code (0x004C == Apple)
// 2 02 # Byte 0 of iBeacon advertisement indicator
// 3 15 # Byte 1 of iBeacon advertisement indicator
// 4 e2 |\
// 5 c5 |\\
// 6 6d |#\\
// 7 b5 |##\\
// 8 df |###\\
// 9 fb |####\\
// 10 48 |#####\\
// 11 d2 |#####|| iBeacon proximity UUID
// 12 b0 |#####||
// 13 60 |#####//
// 14 d0 |####//
// 15 f5 |###//
// 16 a7 |##//
// 17 10 |#//
// 18 96 |//
// 19 e0 |/
// 20 00 # major
// 21 00
// 22 00 # minor
// 23 00
// 24 c5 # The 2's complement of the calibrated Tx Power
/**
* Objectifies the Manufactured Data field of an iBeacon
*
* The parsing is based on the following schema:
*
* 0 4C - Byte 1 (LSB) of Company identifier code
* 1 00 - Byte 0 (MSB) of Company identifier code (0x004C == Apple)
* 2 02 - Byte 0 of iBeacon advertisement indicator
* 3 15 - Byte 1 of iBeacon advertisement indicator
* 4 e2 |\
* 5 c5 |\\
* 6 6d |#\\
* 7 b5 |##\\
* 8 df |###\\
* 9 fb |####\\
* 10 48 |#####\\
* 11 d2 |#####|| iBeacon proximity UUID
* 12 b0 |#####||
* 13 60 |#####//
* 14 d0 |####//
* 15 f5 |###//
* 16 a7 |##//
* 17 10 |#//
* 18 96 |//
* 19 e0 |/
* 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 int mCalibratedTxPower;
private final int mCompanyIdentidier;