public final class RxDiscoveryEvent extends RxManagerEvent<DiscoveryListener.DiscoveryEvent>
RxBleManager.scan(ScanOptions)
. This simply holds the DiscoveryListener.DiscoveryEvent
returned from the scan with some convenience methods.Modifier and Type | Method and Description |
---|---|
RxBleDevice |
device()
Returns an instance of
RxBleDevice |
DiscoveryListener.LifeCycle |
lifeCycle()
|
java.lang.String |
macAddress()
|
Percent |
rssi_percent()
|
int |
rssi()
Forwards
DiscoveryListener.DiscoveryEvent.rssi() . |
boolean |
was(DiscoveryListener.LifeCycle lifecycle)
|
boolean |
wasDiscovered()
|
boolean |
wasRediscovered()
|
boolean |
wasUndiscovered()
|
manager
public final boolean wasDiscovered()
true
if the RxDiscoveryEvent
was for the RxBleDevice
being discovered for the first time.
This just calls DiscoveryListener.DiscoveryEvent.was(com.idevicesinc.sweetblue.DiscoveryListener.LifeCycle)
using DiscoveryListener.LifeCycle.DISCOVERED
public final boolean wasRediscovered()
true
if the RxDiscoveryEvent
was for the RxBleDevice
getting re-discovered.
This just calls DiscoveryListener.DiscoveryEvent.was(com.idevicesinc.sweetblue.DiscoveryListener.LifeCycle)
using DiscoveryListener.LifeCycle.REDISCOVERED
public final boolean wasUndiscovered()
public final boolean was(DiscoveryListener.LifeCycle lifecycle)
public final DiscoveryListener.LifeCycle lifeCycle()
public final int rssi()
DiscoveryListener.DiscoveryEvent.rssi()
.public final Percent rssi_percent()
public final java.lang.String macAddress()
public final RxBleDevice device()
RxBleDevice