RangingResult.Builder
public
static
final
class
RangingResult.Builder
extends Object
Builder class used to construct RangingResult
objects.
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Public constructors
Builder
public Builder ()
Public methods
set80211azInitiatorTxLtfRepetitionsCount
public RangingResult.Builder set80211azInitiatorTxLtfRepetitionsCount (int i2rTxLtfRepetitions)
Sets LTF repetitions that the initiator station used in the preamble. If not set,
defaults to RangingResult#UNSPECIFIED
.
Parameters |
i2rTxLtfRepetitions |
int : LFT repetition count. |
set80211azNtbMeasurement
public RangingResult.Builder set80211azNtbMeasurement (boolean is80211azNtbMeasurement)
Sets whether the ranging measurement was performed using IEEE 802.11az non-trigger
ranging method. If set80211azNtbMeasurement(boolean)
is set as false and
set80211mcMeasurement(boolean)
is also set as false, ranging measurement was
performed using one-side RTT. If not set defaults to false.
Parameters |
is80211azNtbMeasurement |
boolean : true for IEEE 802.11az non-trigger based measurement,
otherwise false. |
set80211azNumberOfRxSpatialStreams
public RangingResult.Builder set80211azNumberOfRxSpatialStreams (int numRxSpatialStreams)
Sets number of receive spatial streams that the initiator station used for the ranging
result. If not set, defaults to RangingResult#UNSPECIFIED
.
Parameters |
numRxSpatialStreams |
int : Number of receive spatial streams. |
set80211azNumberOfTxSpatialStreams
public RangingResult.Builder set80211azNumberOfTxSpatialStreams (int numTxSpatialStreams)
Sets number of transmit spatial streams that the initiator station used for the
ranging result. If not set, defaults to RangingResult#UNSPECIFIED
.
Parameters |
numTxSpatialStreams |
int : Number of transmit spatial streams. |
set80211azResponderTxLtfRepetitionsCount
public RangingResult.Builder set80211azResponderTxLtfRepetitionsCount (int r2iTxLtfRepetitions)
Sets LTF repetitions that the responder station used in the preamble. If not set,
defaults to RangingResult#UNSPECIFIED
.
Parameters |
r2iTxLtfRepetitions |
int : LFT repetition count. |
set80211mcMeasurement
public RangingResult.Builder set80211mcMeasurement (boolean is80211mcMeasurement)
Sets whether the ranging measurement was performed using IEEE 802.11mc ranging method.
If set80211mcMeasurement(boolean)
is set as false and
set80211azNtbMeasurement(boolean)
is also set as false, ranging measurement was
performed using one-side RTT. If not set, default to false.
Parameters |
is80211mcMeasurement |
boolean : true for IEEE 802.11mc measure, otherwise false. |
setDistanceMm
public RangingResult.Builder setDistanceMm (int distanceMm)
Sets the distance in millimeter.
Parameters |
distanceMm |
int : distance. If not set, defaults to 0. |
setDistanceStdDevMm
public RangingResult.Builder setDistanceStdDevMm (int distanceStdDevMm)
Sets the standard deviation of the distance in millimeter.
Parameters |
distanceStdDevMm |
int : Standard deviation of the distance measurement. If not set
defaults to 0. |
setLci
public RangingResult.Builder setLci (byte[] lci)
Sets the Location Configuration Information (LCI).
LCI provides data about the access point's (AP) physical location, such as its
latitude, longitude, and altitude. The format is specified in the IEEE 802.11-2016
specifications, section 9.4.2.22.10.
Parameters |
lci |
byte : Location configuration information. If not set, defaults to null. |
setLcr
public RangingResult.Builder setLcr (byte[] lcr)
Sets the Location Civic Report (LCR).
LCR provides additional details about the AP's location in a human-readable format,
such as the street address, building name, or floor number. This can be helpful for
users to understand the context of their location within a building or complex.
The format is
specified in the IEEE 802.11-2016 specifications, section 9.4.2.22.13.
Parameters |
lcr |
byte : Location civic report. If not set, defaults to null. |
setMacAddress
public RangingResult.Builder setMacAddress (MacAddress macAddress)
Sets the MAC address of the ranging result.
Parameters |
macAddress |
MacAddress : Mac address, if not defaults to null. |
setMaxTimeBetweenNtbMeasurementsMicros
public RangingResult.Builder setMaxTimeBetweenNtbMeasurementsMicros (long ntbMaxMeasurementTime)
Sets maximum time between measurements in microseconds for IEEE 802.11az non-trigger
based ranging. If not set, defaults to RangingResult#UNSPECIFIED
.
Parameters |
ntbMaxMeasurementTime |
long : non-trigger based ranging maximum measurement time. |
setMeasurementChannelFrequencyMHz
public RangingResult.Builder setMeasurementChannelFrequencyMHz (int frequencyMHz)
Sets the center frequency of the primary 20 MHz frequency (in MHz) of the channel over
which the measurement frames are sent. If not set, default to
RangingResult#UNSPECIFIED
Parameters |
frequencyMHz |
int : Frequency. |
setMinTimeBetweenNtbMeasurementsMicros
public RangingResult.Builder setMinTimeBetweenNtbMeasurementsMicros (long ntbMinMeasurementTime)
Sets minimum time between measurements in microseconds for IEEE 802.11az non-trigger
based ranging. If not set, defaults to RangingResult#UNSPECIFIED
.
Parameters |
ntbMinMeasurementTime |
long : non-trigger based ranging minimum measurement time. |
setNumAttemptedMeasurements
public RangingResult.Builder setNumAttemptedMeasurements (int numAttemptedMeasurements)
Sets the total number of RTT measurements attempted.
Parameters |
numAttemptedMeasurements |
int : Number of attempted measurements. If not set, default
to 0. |
setNumSuccessfulMeasurements
public RangingResult.Builder setNumSuccessfulMeasurements (int numSuccessfulMeasurements)
Sets the total number of successful RTT measurements.
Parameters |
numSuccessfulMeasurements |
int : Number of successful measurements. If not set, default
to 0. |
setPeerHandle
public RangingResult.Builder setPeerHandle (PeerHandle peerHandle)
Sets the peer handle. Applicable only for NAN Ranging.
Parameters |
peerHandle |
PeerHandle : Opaque object used to represent a Wi-Fi Aware peer. If not set,
defaults to null. |
setRangingTimestampMillis
public RangingResult.Builder setRangingTimestampMillis (long timestamp)
Sets the time stamp at which the ranging operation was performed.
The timestamp is in milliseconds since boot, including time spent in sleep,
corresponding to values provided by SystemClock.elapsedRealtime()
.
Parameters |
timestamp |
long : time stamp in milliseconds. If not set, default to 0.
Value is a non-negative timestamp in the
SystemClock.elapsedRealtime() time base. |
public RangingResult.Builder setRssi (int rssi)
Sets the average RSSI.
Parameters |
rssi |
int : Average RSSI. If not set, defaults to -127. |
setUnverifiedResponderLocation
public RangingResult.Builder setUnverifiedResponderLocation (ResponderLocation responderLocation)
Sets Responder Location.
ResponderLocation is both a Location Configuration Information (LCI) decoder and a
Location Civic Report (LCR) decoder for information received from a Wi-Fi Access Point
(AP) during Wi-Fi RTT ranging process.
Parameters |
responderLocation |
ResponderLocation : Responder location. If not set, defaults to null. |