Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
org.direct_bt.BTRole Enum Reference

Bluetooth roles from the perspective of the link layer (connection initiator). More...

Collaboration diagram for org.direct_bt.BTRole:

Public Member Functions

 BTRole (final byte v)
 
final BTRole reverse ()
 Returns reversed roled. More...
 

Static Public Member Functions

static BTRole get (final byte value)
 Maps the specified integer value to a constant of BTRole. More...
 
static BTRole get (final String name) throws IllegalArgumentException
 Maps the specified name to a constant of BTRole. More...
 

Public Attributes

 Master =((byte)1)
 Master or central role, discovering remote devices and initiating connection. More...
 
 None =((byte)0)
 Undefined role. More...
 
 Slave =((byte)2)
 Slave or peripheral role, advertising and waiting for connections to accept. More...
 
final byte value
 

Detailed Description

Bluetooth roles from the perspective of the link layer (connection initiator).

See get(byte) for its native integer mapping.

See also
BTAdapter roles.
BTDevice roles.
Since
2.4.0

Definition at line 36 of file BTRole.java.

Constructor & Destructor Documentation

◆ BTRole()

org.direct_bt.BTRole.BTRole ( final byte  v)

Definition at line 74 of file BTRole.java.

Member Function Documentation

◆ get() [1/2]

static BTRole org.direct_bt.BTRole.get ( final String  name) throws IllegalArgumentException
static

Maps the specified name to a constant of BTRole.

Implementation simply returns valueOf(String). This maps the constant names itself to their respective constant.

Parameters
namethe string name to be mapped to a constant of this enum type.
Returns
the corresponding constant of this enum type.
Exceptions
IllegalArgumentExceptionif the specified name can't be mapped to a constant of this enum type as described above.

Definition at line 57 of file BTRole.java.

Here is the caller graph for this function:

◆ get() [2/2]

static BTRole org.direct_bt.BTRole.get ( final byte  value)
static

Maps the specified integer value to a constant of BTRole.

Parameters
valuethe integer value to be mapped to a constant of this enum type.
Returns
the corresponding constant of this enum type, using None if not supported.

Definition at line 66 of file BTRole.java.

◆ reverse()

final BTRole org.direct_bt.BTRole.reverse ( )

Returns reversed roled.

Definition at line 79 of file BTRole.java.

Here is the caller graph for this function:

Member Data Documentation

◆ None

org.direct_bt.BTRole.None =((byte)0)

Undefined role.

Definition at line 38 of file BTRole.java.

◆ Master

org.direct_bt.BTRole.Master =((byte)1)

Master or central role, discovering remote devices and initiating connection.

This is a GATT client.

Definition at line 40 of file BTRole.java.

◆ Slave

org.direct_bt.BTRole.Slave =((byte)2)

Slave or peripheral role, advertising and waiting for connections to accept.

This is a GATT server.

Definition at line 42 of file BTRole.java.

◆ value

final byte org.direct_bt.BTRole.value

Definition at line 44 of file BTRole.java.


The documentation for this enum was generated from the following file: