Builder
class Builder
kotlin.Any | |
↳ | android.net.wifi.rtt.ResponderConfig.Builder |
Builder class used to construct ResponderConfig
objects.
Summary
Public constructors | |
---|---|
Builder() |
Public methods | |
---|---|
ResponderConfig |
build() Build |
ResponderConfig.Builder |
set80211azNtbSupported(supports80211azNtb: Boolean) Sets an indication the access point can to respond to the IEEE 802. |
ResponderConfig.Builder |
set80211mcSupported(supports80211mc: Boolean) Sets an indication the access point can to respond to the two-sided Wi-Fi RTT protocol, but, if false, indicates only one-sided Wi-Fi RTT is possible. |
ResponderConfig.Builder |
setCenterFreq0Mhz(centerFreq0: Int) Sets the center frequency in MHz of the first segment of the channel. |
ResponderConfig.Builder |
setCenterFreq1Mhz(centerFreq1: Int) Sets the center frequency in MHz of the second segment of the channel, if used. |
ResponderConfig.Builder |
setChannelWidth(channelWidth: Int) Sets the channel bandwidth in MHz. |
ResponderConfig.Builder |
setFrequencyMhz(frequency: Int) Sets the frequency of the channel in MHz. |
ResponderConfig.Builder |
setMacAddress(macAddress: MacAddress) Sets the Responder MAC Address. |
ResponderConfig.Builder |
setPreamble(preamble: Int) Sets the preamble encoding for the protocol. |
ResponderConfig.Builder |
setResponderType(responderType: Int) Sets the responder type, can be |
Public constructors
Public methods
build
fun build(): ResponderConfig
Build ResponderConfig
given the current configurations made on the builder.
Return | |
---|---|
ResponderConfig |
an instance of ResponderConfig This value cannot be null . |
set80211azNtbSupported
fun set80211azNtbSupported(supports80211azNtb: Boolean): ResponderConfig.Builder
Sets an indication the access point can to respond to the IEEE 802.11az non-trigger based ranging protocol, but, if false, indicates only IEEE 802.11mc or one-sided Wi-Fi RTT is possible.
Parameters | |
---|---|
supports80211azNtb |
Boolean: the ability to support the IEEE 802.11az non-trigger based ranging protocol |
Return | |
---|---|
ResponderConfig.Builder |
the builder to facilitate chaining builder.setXXX(..).setXXX(..) . This value cannot be null . |
set80211mcSupported
fun set80211mcSupported(supports80211mc: Boolean): ResponderConfig.Builder
Sets an indication the access point can to respond to the two-sided Wi-Fi RTT protocol, but, if false, indicates only one-sided Wi-Fi RTT is possible.
Parameters | |
---|---|
supports80211mc |
Boolean: the ability to support the Wi-Fi RTT protocol |
Return | |
---|---|
ResponderConfig.Builder |
the builder to facilitate chaining builder.setXXX(..).setXXX(..) . This value cannot be null . |
setCenterFreq0Mhz
fun setCenterFreq0Mhz(centerFreq0: Int): ResponderConfig.Builder
Sets the center frequency in MHz of the first segment of the channel.
Note: The frequency is used as a hint, and the underlying WiFi subsystem may use it, or select an alternate if its own connectivity scans have determined the frequency of the access point has changed.
Parameters | |
---|---|
centerFreq0 |
Int: the center frequency in MHz of first channel segment Value is 0 or greater |
Return | |
---|---|
ResponderConfig.Builder |
the builder to facilitate chaining builder.setXXX(..).setXXX(..) . This value cannot be null . |
setCenterFreq1Mhz
fun setCenterFreq1Mhz(centerFreq1: Int): ResponderConfig.Builder
Sets the center frequency in MHz of the second segment of the channel, if used.
Note: The frequency is used as a hint, and the underlying WiFi subsystem may use it, or select an alternate if its own connectivity scans have determined the frequency of the access point has changed.
Parameters | |
---|---|
centerFreq1 |
Int: the center frequency in MHz of second channel segment Value is 0 or greater |
Return | |
---|---|
ResponderConfig.Builder |
the builder to facilitate chaining builder.setXXX(..).setXXX(..) . This value cannot be null . |
setChannelWidth
fun setChannelWidth(channelWidth: Int): ResponderConfig.Builder
Sets the channel bandwidth in MHz.
Parameters | |
---|---|
channelWidth |
Int: the bandwidth of the channel in MHz Value is android.net.wifi.ScanResult#CHANNEL_WIDTH_20MHZ , android.net.wifi.ScanResult#CHANNEL_WIDTH_40MHZ , android.net.wifi.ScanResult#CHANNEL_WIDTH_80MHZ , android.net.wifi.ScanResult#CHANNEL_WIDTH_160MHZ , android.net.wifi.ScanResult#CHANNEL_WIDTH_80MHZ_PLUS_MHZ , or android.net.wifi.ScanResult#CHANNEL_WIDTH_320MHZ |
Return | |
---|---|
ResponderConfig.Builder |
the builder to facilitate chaining builder.setXXX(..).setXXX(..) . This value cannot be null . |
setFrequencyMhz
fun setFrequencyMhz(frequency: Int): ResponderConfig.Builder
Sets the frequency of the channel in MHz.
Note: The frequency is used as a hint, and the underlying WiFi subsystem may use it, or select an alternate if its own connectivity scans have determined the frequency of the access point has changed.
Parameters | |
---|---|
frequency |
Int: the frequency of the channel in MHz Value is 0 or greater |
Return | |
---|---|
ResponderConfig.Builder |
the builder to facilitate chaining builder.setXXX(..).setXXX(..) . This value cannot be null . |
setMacAddress
fun setMacAddress(macAddress: MacAddress): ResponderConfig.Builder
Sets the Responder MAC Address.
Parameters | |
---|---|
macAddress |
MacAddress: the phyical address of the responder This value cannot be null . |
Return | |
---|---|
ResponderConfig.Builder |
the builder to facilitate chaining builder.setXXX(..).setXXX(..) . This value cannot be null . |
setPreamble
fun setPreamble(preamble: Int): ResponderConfig.Builder
Sets the preamble encoding for the protocol.
Parameters | |
---|---|
preamble |
Int: the preamble encoding Value is android.net.wifi.ScanResult#PREAMBLE_LEGACY , android.net.wifi.ScanResult#PREAMBLE_HT , android.net.wifi.ScanResult#PREAMBLE_VHT , android.net.wifi.ScanResult#PREAMBLE_HE , or android.net.wifi.ScanResult#PREAMBLE_EHT |
Return | |
---|---|
ResponderConfig.Builder |
the builder to facilitate chaining builder.setXXX(..).setXXX(..) . This value cannot be null . |
setResponderType
fun setResponderType(responderType: Int): ResponderConfig.Builder
Sets the responder type, can be RESPONDER_AP
or RESPONDER_STA
or #RESPONDER_AWARE
Parameters | |
---|---|
responderType |
Int: the type of the responder, if not set defaults to RESPONDER_AP Value is android.net.wifi.rtt.ResponderConfig#RESPONDER_AP , android.net.wifi.rtt.ResponderConfig#RESPONDER_STA , android.net.wifi.rtt.ResponderConfig.RESPONDER_P2P_GO, android.net.wifi.rtt.ResponderConfig.RESPONDER_P2P_CLIENT, or android.net.wifi.rtt.ResponderConfig.RESPONDER_AWARE |
Return | |
---|---|
ResponderConfig.Builder |
the builder to facilitate chaining builder.setXXX(..).setXXX(..) . This value cannot be null . |