MloLink


public final class MloLink
extends Object implements Parcelable

java.lang.Object
   ↳ android.net.wifi.MloLink


Data structure class representing a Wi-Fi Multi-Link Operation (MLO) link This is only used by 802.11be capable devices

Summary

Constants

int INVALID_MLO_LINK_ID

Invalid link id.

int MLO_LINK_STATE_ACTIVE

MLO link state: Link is associated to the access point and mapped to at least one traffic stream.

int MLO_LINK_STATE_IDLE

MLO link state: Link is associated to the access point but not mapped to any traffic stream.

int MLO_LINK_STATE_INVALID

MLO link state: Invalid link state.

int MLO_LINK_STATE_UNASSOCIATED

MLO link state: Link is not associated with the access point.

Inherited constants

Fields

public static final Creator<MloLink> CREATOR

Implement the Parcelable interface

Public constructors

MloLink()

Constructor for a MloLInk.

Public methods

int describeContents()

Implement the Parcelable interface

boolean equals(Object o)

Indicates whether some other object is "equal to" this one.

MacAddress getApMacAddress()

Returns the AP MAC address of this link.

int getBand()

Returns the Wi-Fi band of this link.

int getChannel()

Returns the channel number of this link.

int getLinkId()

Returns the link id of this link.

int getRssi()

Returns the RSSI of the link.

int getRxLinkSpeedMbps()

Returns the current receive link speed in Mbps.

MacAddress getStaMacAddress()

Returns the STA MAC address of this link.

int getState()

Returns the state of this link as one of: MLO_LINK_STATE_INVALID MLO_LINK_STATE_UNASSOCIATED MLO_LINK_STATE_IDLE MLO_LINK_STATE_ACTIVE

int getTxLinkSpeedMbps()

Returns the current transmit link speed in Mbps.

int hashCode()

Returns a hash code value for the object.

String toString()

Returns a string representation of the object.

void writeToParcel(Parcel dest, int flags)

Implement the Parcelable interface

Inherited methods

Constants

Added in API level 33
public static final int INVALID_MLO_LINK_ID

Invalid link id. Used in {link #getLinkId()}

Constant Value: -1 (0xffffffff)

Added in API level 33
public static final int MLO_LINK_STATE_ACTIVE

MLO link state: Link is associated to the access point and mapped to at least one traffic stream. {link #getState()} Note that an MLO link could be in that state but in power save mode.

Constant Value: 3 (0x00000003)

Added in API level 33
public static final int MLO_LINK_STATE_IDLE

MLO link state: Link is associated to the access point but not mapped to any traffic stream. Used in {link #getState()}

Constant Value: 2 (0x00000002)

Added in API level 33
public static final int MLO_LINK_STATE_INVALID

MLO link state: Invalid link state. Used in {link #getState()}

Constant Value: 0 (0x00000000)

Added in API level 33
public static final int MLO_LINK_STATE_UNASSOCIATED

MLO link state: Link is not associated with the access point. Used in {link #getState()}

Constant Value: 1 (0x00000001)

Fields

CREATOR

Added in API level 33
public static final Creator<MloLink> CREATOR

Implement the Parcelable interface

Public constructors

MloLink

Added in API level 33
public MloLink ()

Constructor for a MloLInk.

Public methods

describeContents

Added in API level 33
public int describeContents ()

Implement the Parcelable interface

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

equals

Added in API level 33
public boolean equals (Object o)

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
o Object: This value may be null.

Returns
boolean true if this object is the same as the obj argument; false otherwise.

getApMacAddress

Added in API level 33
public MacAddress getApMacAddress ()

Returns the AP MAC address of this link.

Returns
MacAddress AP MAC address for this link or null when the caller has insufficient permissions to access the access point MAC Address.

getBand

Added in API level 33
public int getBand ()

Returns the Wi-Fi band of this link.

Returns
int Value is ScanResult.UNSPECIFIED, ScanResult.WIFI_BAND_24_GHZ, ScanResult.WIFI_BAND_5_GHZ, ScanResult.WIFI_BAND_6_GHZ, or ScanResult.WIFI_BAND_60_GHZ

getChannel

Added in API level 33
public int getChannel ()

Returns the channel number of this link. A valid value is based on the 802.11 specification in sections 19.3.15 and 27.3.23

Returns
int Value is 1 or greater

getLinkId

Added in API level 33
public int getLinkId ()

Returns the link id of this link. Valid values are 0-15, as described in IEEE 802.11be Specification, section 9.4.2.295b.2.

Returns
int INVALID_MLO_LINK_ID or a valid value (0-15). Value is between INVALID_MLO_LINK_ID and MAX_MLO_LINK_ID inclusive

getRssi

Added in API level 34
public int getRssi ()

Returns the RSSI of the link.

Use WifiManager.calculateSignalLevel(int) to convert this number into an absolute signal level which can be displayed to a user.

Returns
int RSSI in dBM.

getRxLinkSpeedMbps

Added in API level 34
public int getRxLinkSpeedMbps ()

Returns the current receive link speed in Mbps.

Returns
int the Rx link speed or WifiInfo#LINK_SPEED_UNKNOWN if link speed is unknown. Value is -1 or greater

getStaMacAddress

Added in API level 33
public MacAddress getStaMacAddress ()

Returns the STA MAC address of this link.

Returns
MacAddress STA MAC address assigned for this link, or null in the following cases:
  • The caller has insufficient permissions to access the STA MAC Address
  • Link is not associated, hence no MAC address is assigned to it by STA

getTxLinkSpeedMbps

Added in API level 34
public int getTxLinkSpeedMbps ()

Returns the current transmit link speed in Mbps.

Returns
int the Tx link speed or WifiInfo#LINK_SPEED_UNKNOWN if link speed is unknown. Value is -1 or greater

hashCode

Added in API level 33
public int hashCode ()

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

Returns
int a hash code value for this object.

toString

Added in API level 33
public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.

writeToParcel

Added in API level 33
public void writeToParcel (Parcel dest, 
                int flags)

Implement the Parcelable interface

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