Enum RangingRole
- All Implemented Interfaces:
Comparable<RangingRole>
Which end of a UWB session this device is.
The distinction is real on Android, where the controller owns the channel and session parameters and the controlee joins them, and it decides which side has to publish a token first. It is invisible on iOS: Nearby Interaction negotiates the roles itself, both peers publish a discovery token, and the value passed here is ignored. Code that will run on both should still pick a role -- one side controller, the other controlee -- because that costs nothing on iOS and is required on Android.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThis device joins a session whose parameters the controller chose.This device chooses the channel and session parameters and publishes them; peers join. -
Method Summary
Modifier and TypeMethodDescriptionstatic RangingRoleReturns the enum constant of this type with the specified name.static RangingRole[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
CONTROLLER
This device chooses the channel and session parameters and publishes them; peers join. Exactly one side of a session is the controller. -
CONTROLEE
This device joins a session whose parameters the controller chose.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-