public class Beacon
extends java.lang.Object
implements android.os.Parcelable
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<Beacon> |
CREATOR |
static int |
EMERGENCY_FLAG |
static int |
TYPE_BEACON |
static int |
TYPE_MIDAS |
Constructor and Description |
---|
Beacon(android.bluetooth.BluetoothDevice device,
int rssi,
byte[] scanRecord) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
static double |
distanceFromRssi(int rssi,
int txPowerAtSource)
거리계산, 1미터 거리에서 측정 txPower 값을 조정하면서 측정한다.
|
int |
getBattery()
베터리
|
android.bluetooth.BluetoothDevice |
getDevice()
블루투스 디바이스
|
int |
getEmergency()
응급 플래그
|
long |
getEnterTime()
수신 종료 시간
|
long |
getExitTime()
수신 시작 시간
|
float |
getHumidity()
습도
|
java.lang.String |
getId()
ID
|
java.lang.String |
getMac()
Mac Address
|
int |
getMajor()
Major
|
java.lang.String |
getMidasId()
마이다스 ID
|
int |
getMinor()
Minor
|
long |
getRecordedTime()
업데이트 갱신 시간
|
int |
getRssi()
신호세기
|
byte[] |
getScanRecord()
BLE 스캔 레코드
|
int |
getStatus()
현재 상태
|
float |
getTemperature()
온도
|
int |
getType()
비콘 구분
|
long |
getUpdateTime()
갱신 시간
|
java.lang.String |
getUUID()
UUID
|
void |
updateScanRecord(int rssi,
byte[] scanRecord)
비콘 업데이트
|
void |
updateStatus(int status)
상태 업데이트
|
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final int TYPE_MIDAS
public static final int TYPE_BEACON
public static final int EMERGENCY_FLAG
public static final android.os.Parcelable.Creator<Beacon> CREATOR
public Beacon(android.bluetooth.BluetoothDevice device, int rssi, byte[] scanRecord)
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable
public android.bluetooth.BluetoothDevice getDevice()
public int getType()
public float getTemperature()
public float getHumidity()
public int getEmergency()
public java.lang.String getId()
public java.lang.String getMac()
public int getBattery()
public int getRssi()
public int getStatus()
public long getEnterTime()
public long getExitTime()
public long getRecordedTime()
public void updateStatus(int status)
status
- 상태값public void updateScanRecord(int rssi, byte[] scanRecord)
rssi
- 신호세기scanRecord
- BLE 스캔 레코드public byte[] getScanRecord()
public long getUpdateTime()
public java.lang.String getUUID()
public int getMajor()
public int getMinor()
public java.lang.String getMidasId()
public static double distanceFromRssi(int rssi, int txPowerAtSource)
rssi
- 비콘 신호값txPowerAtSource
- 측정 기준 출력