RawRangingDevice


public final class RawRangingDevice
extends Object implements Parcelable

java.lang.Object
   ↳ android.ranging.raw.RawRangingDevice


Represents a device participating in ranging operations. This class supports multiple ranging technologies, including UWB, BLE CS, BLE RSSI and Wi-Fi NAN-RTT. The configuration for each technology is provided through corresponding parameter objects.

Summary

Nested classes

class RawRangingDevice.Builder

Builder class for creating instances of RawRangingDevice

Constants

int UPDATE_RATE_FREQUENT

Frequent ranging interval.

int UPDATE_RATE_INFREQUENT

Infrequent ranging interval.

int UPDATE_RATE_NORMAL

Normal ranging interval (Default).

Inherited constants

Fields

public static final Creator<RawRangingDevice> CREATOR

Public methods

int describeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

BleRssiRangingParams getBleRssiRangingParams()

Returns the BLE rssi ranging parameters, if applicable.

BleCsRangingParams getCsRangingParams()

Returns the CS ranging parameters, if applicable.

RangingDevice getRangingDevice()

Returns the RangingDevice associated with this instance.

RttRangingParams getRttRangingParams()

Returns the RTT ranging parameters, if applicable.

UwbRangingParams getUwbRangingParams()

Returns the UWB ranging parameters, if applicable.

String toString()

Returns a string representation of the object.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Constants

UPDATE_RATE_FREQUENT

public static final int UPDATE_RATE_FREQUENT

Frequent ranging interval.

Constant Value: 3 (0x00000003)

UPDATE_RATE_INFREQUENT

public static final int UPDATE_RATE_INFREQUENT

Infrequent ranging interval.

  • UWB - 600 milliseconds.
  • BLE RSSI - 3 seconds.
  • BLE CS - 5 seconds.
  • WiFi Rtt - 8192 milliseconds otherwise.

Constant Value: 2 (0x00000002)

UPDATE_RATE_NORMAL

public static final int UPDATE_RATE_NORMAL

Normal ranging interval (Default).

Constant Value: 1 (0x00000001)

Fields

CREATOR

public static final Creator<RawRangingDevice> CREATOR

Public methods

describeContents

public int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel, int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or CONTENTS_FILE_DESCRIPTOR

getBleRssiRangingParams

public BleRssiRangingParams getBleRssiRangingParams ()

Returns the BLE rssi ranging parameters, if applicable.

Returns
BleRssiRangingParams the BleRssiRangingParams, or null if not set.

getCsRangingParams

public BleCsRangingParams getCsRangingParams ()

Returns the CS ranging parameters, if applicable.

Returns
BleCsRangingParams the BleCsRangingParams, or null if not set.

getRangingDevice

public RangingDevice getRangingDevice ()

Returns the RangingDevice associated with this instance.

Returns
RangingDevice the ranging device. This value cannot be null.

getRttRangingParams

public RttRangingParams getRttRangingParams ()

Returns the RTT ranging parameters, if applicable.

Returns
RttRangingParams the RttRangingParams, or null if not set.

getUwbRangingParams

public UwbRangingParams getUwbRangingParams ()

Returns the UWB ranging parameters, if applicable.

Returns
UwbRangingParams the UwbRangingParams, or null if not set.

toString

public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.

writeToParcel

public void writeToParcel (Parcel dest, 
                int flags)

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.

flags int: Additional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES