public class Beacon extends Signal
| Modifier and Type | Field and Description |
|---|---|
static int |
ENTERED_RSSI
This value is for an RSSI that forces a placement/zone entry.
|
static double |
INVALID_RANGE
This value for a range indicates that there is not enough information to return a value
|
static int |
INVALID_RSSI
This value for an RSSI indicates that there is not enough information to return a value
|
static int |
STATE_INSIDE
This value indicates that there are valid advertisements to compute a range and the
BeaconManager has determined that the beacon is within the specified range.
|
static int |
STATE_OUTSIDE
This value indicates that there are valid advertisements to compute a range and the
BeaconManager has determined that the beacon is outside of the specified range.
|
static int |
STATE_UNKNOWN
This value indicates that there are not enough recent advertisements to compute a state.
|
location, TYPE_BEACON, TYPE_GEOFENCE, TYPE_WIFIproperties| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAddress() |
java.util.List<BeaconAdvertisement> |
getAdvertisements()
Get the list of current BeaconAdvertisements associated to this beacon.
|
int |
getdBm1()
Returns the 1m measured power.
|
java.lang.String |
getExtra()
Searches the recent BeaconAdvertisements associated with this beacon to find any TLM or
out-of-band data packets and returns that information as a base-64 encoded string.
|
BeaconAdvertisement |
getLast()
Get the last BeaconAdvertisement received.
|
long |
getLastDetected()
Get the detected timestamp from the last BeaconAdvertisement or return 0
|
java.lang.String |
getManufacturer()
Return the registered manufacturer
|
java.lang.String |
getModel()
Returns the Beacon mdoel string
|
java.lang.String |
getName() |
SObject |
getPartner()
Return the partner for this beacon
|
Peripheral |
getPeripheral()
Get the peripheral associated with this beacon (if in configuration mode)
|
int |
getPower()
Get the transmit power as specified in the platform database (as opposed to read directly
from the beacon).
|
int |
getProtocol()
Return the protocol of the underlying advertisements
|
java.lang.String |
getProtocolString()
Return the protocol description of the underlying advertisements
|
double |
getRange()
Compute a range in meters based on the current RSSI estimate.
|
int |
getRssi()
Computes a RSSI value based on the current working set of BeaconAdvertisements associated
with this beacon.
|
java.lang.String |
getSerial()
If resolved, returns the beacon serial number, otherwise an empty string.
|
int |
getState()
Return the current state of the beacon with respect to its threshold.
|
int |
getThreshold()
Get the RSSI threshold value.
|
int |
getType()
Inherited from Signal, for beacons this always returns the same value.
|
boolean |
isConnectable() |
boolean |
isOverlapping()
Determine if this beacon is part of an overlapping placement or not.
|
void |
setRssiParams(org.json.JSONObject params)
Set a custom RSSI params to control RSSI smoothing
opt_sample_age - optimal seconds to average over
max_sample_age - maximum seconds to average over if less than min samples
min_samples - minimum number of samples to require
|
java.lang.String |
toString() |
getAttachments, getAttributes, getError, getLabels, getLocation, getURN, setErrorpublic static final int INVALID_RSSI
public static final int ENTERED_RSSI
public static final double INVALID_RANGE
public static final int STATE_UNKNOWN
public static final int STATE_OUTSIDE
public static final int STATE_INSIDE
public java.util.List<BeaconAdvertisement> getAdvertisements()
public int getType()
public java.lang.String getAddress()
public SObject getPartner()
public java.lang.String getManufacturer()
public java.lang.String getModel()
public java.lang.String getSerial()
public int getProtocol()
public java.lang.String getProtocolString()
public boolean isConnectable()
public Peripheral getPeripheral()
public int getPower()
public int getThreshold()
public boolean isOverlapping()
public int getdBm1()
public java.lang.String getExtra()
public void setRssiParams(org.json.JSONObject params)
public int getRssi()
public double getRange()
public int getState()
public BeaconAdvertisement getLast()
public long getLastDetected()
getLastDetected in class Signalpublic java.lang.String toString()
toString in class java.lang.Object