public class BleLock extends Object implements Serializable
BleLockScanner
to get nearby Tapkey locks.Constructor and Description |
---|
BleLock(byte[] incompleteLockId,
boolean isLockIdComplete,
String bluetoothAddress,
Date lastSeen,
int rssi) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getBluetoothAddress()
Returns the lock's Bluetooth address.
|
byte[] |
getIncompleteLockId()
The lock ID.
|
Date |
getLastSeen()
Returns at what time the lock was last seen nearby.
|
int |
getRssi()
Returns the RSSI of the lock when it was last seen.
|
int |
hashCode() |
boolean |
isLockIdComplete()
Returns whether the lock ID is complete or not.
|
public byte[] getIncompleteLockId()
isLockIdComplete()
to determine if the lock ID is complete or
truncated.
The lock ID has the following format:
LLX
LL
: The length of the actual ID (X), encoded in 2 bytes,
little endian.X
: The actual ID.04001234BFFB
001234BFFB
00
is
part of the actual ID or a length header.public boolean isLockIdComplete()
getIncompleteLockId()
. Due to limited BLE advertising packet length, lock IDs that
exceed a certain length may arrive truncated. This method can be used to determine if the
lock ID is complete or not.public String getBluetoothAddress()
public Date getLastSeen()
public int getRssi()