Direct-BT
v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
java
org
direct_bt
LE_Features.java
Go to the documentation of this file.
1
/**
2
* Author: Sven Gothel <sgothel@jausoft.com>
3
* Copyright (c) 2021 Gothel Software e.K.
4
* Copyright (c) 2021 ZAFENA AB
5
*
6
* Permission is hereby granted, free of charge, to any person obtaining
7
* a copy of this software and associated documentation files (the
8
* "Software"), to deal in the Software without restriction, including
9
* without limitation the rights to use, copy, modify, merge, publish,
10
* distribute, sublicense, and/or sell copies of the Software, and to
11
* permit persons to whom the Software is furnished to do so, subject to
12
* the following conditions:
13
*
14
* The above copyright notice and this permission notice shall be
15
* included in all copies or substantial portions of the Software.
16
*
17
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
*/
25
package
org.direct_bt;
26
27
/**
28
* LE Link Layer Feature Set (bitmask)
29
* <pre>
30
* BT Core Spec v5.2: Vol 6, Part B, 4.6 (LE LL) Feature Support
31
*
32
* BT Core Spec v5.2: Vol 4, Part E, 7.8.3 LE Read Local Supported Features command
33
*
34
* BT Core Spec v5.2: Vol 4, Part E, 7.8.21 LE Read Remote Features command
35
* BT Core Spec v5.2: Vol 4, Part E, 7.7.65.4 LE Read Remote Features Complete event
36
*
37
* BT Core Spec v5.2: Vol 6, Part B, 7.8.115 LE Set Host Feature Command
38
* </pre>
39
*
40
* @since 2.4.0
41
*/
42
public
class
LE_Features
{
43
44
/**
45
* Each enum represents a 'LE Link Layer Feature' bit value.
46
*
47
* @since 2.4.0
48
*/
49
public
enum
Feature
{
50
LE_Encryption
(0),
51
Conn_Param_Req_Proc
(1),
52
Ext_Rej_Ind
(2),
53
SlaveInit_Feat_Exchg
(3),
54
LE_Ping
(4),
55
LE_Data_Pkt_Len_Ext
(5),
56
LL_Privacy
(6),
57
Ext_Scan_Filter_Pol
(7),
58
LE_2M_PHY
(8),
59
Stable_Mod_Idx_Tx
(9),
60
Stable_Mod_Idx_Rx
(10),
61
LE_Coded_PHY
(11),
62
LE_Ext_Adv
(12),
63
LE_Per_Adv
(13),
64
Chan_Sel_Algo_2
(14),
65
LE_Pwr_Cls_1
(15),
66
Min_Num_Used_Chan_Proc
(16),
67
Conn_CTE_Req
(17),
68
Conn_CTE_Res
(18),
69
ConnLess_CTE_Tx
(19),
70
ConnLess_CTE_Rx
(20),
71
AoD
(21),
72
AoA
(22),
73
Rx_Const_Tone_Ext
(23),
74
Per_Adv_Sync_Tx_Sender
(24),
75
Per_Adv_Sync_Tx_Rec
(25),
76
Zzz_Clk_Acc_Upd
(26),
77
Rem_Pub_Key_Val
(27),
78
Conn_Iso_Stream_Master
(28),
79
Conn_Iso_Stream_Slave
(29),
80
Iso_Brdcst
(30),
81
Sync_Rx
(31),
82
Iso_Chan
(32),
83
LE_Pwr_Ctrl_Req
(33),
84
LE_Pwr_Chg_Ind
(34),
85
LE_Path_Loss_Mon
(35);
86
87
Feature
(
final
int
v) {
88
value = 1L << v;
89
}
90
public
final
long
value
;
91
}
92
93
public
long
mask
;
94
95
96
public
LE_Features
(
final
long
v) {
97
mask
= v;
98
}
99
100
public
boolean
isSet
(
final
Feature
bit) {
return
0 != (
mask
& bit.value ); }
101
public
void
set
(
final
Feature
bit) {
mask
=
mask
| bit.value; }
102
103
@Override
104
public
String
toString
() {
105
int
count = 0;
106
final
StringBuilder out =
new
StringBuilder();
107
for
(
final
Feature
f :
Feature
.values()) {
108
if
(
isSet
(f) ) {
109
if
( 0 < count ) { out.append(
", "
); }
110
out.append(f.name()); count++;
111
}
112
}
113
if
( 1 < count ) {
114
out.insert(0,
"["
);
115
out.append(
"]"
);
116
}
117
return
out.toString();
118
}
119
}
org.direct_bt.LE_Features
LE Link Layer Feature Set (bitmask)
Definition:
LE_Features.java:42
org.direct_bt.LE_Features.LE_Features
LE_Features(final long v)
Definition:
LE_Features.java:96
org.direct_bt.LE_Features.toString
String toString()
Definition:
LE_Features.java:104
org.direct_bt.LE_Features.mask
long mask
Definition:
LE_Features.java:93
org.direct_bt.LE_Features.isSet
boolean isSet(final Feature bit)
Definition:
LE_Features.java:100
org.direct_bt.LE_Features.Feature
Each enum represents a 'LE Link Layer Feature' bit value.
Definition:
LE_Features.java:49
org.direct_bt.LE_Features.Feature.Feature
Feature(final int v)
Definition:
LE_Features.java:87
org.direct_bt.LE_Features.Feature.LE_Coded_PHY
LE_Coded_PHY
Definition:
LE_Features.java:61
org.direct_bt.LE_Features.Feature.LE_Encryption
LE_Encryption
Definition:
LE_Features.java:50
org.direct_bt.LE_Features.Feature.Conn_Param_Req_Proc
Conn_Param_Req_Proc
Definition:
LE_Features.java:51
org.direct_bt.LE_Features.Feature.LE_Data_Pkt_Len_Ext
LE_Data_Pkt_Len_Ext
Definition:
LE_Features.java:55
org.direct_bt.LE_Features.Feature.LE_Pwr_Ctrl_Req
LE_Pwr_Ctrl_Req
Definition:
LE_Features.java:83
org.direct_bt.LE_Features.Feature.Ext_Scan_Filter_Pol
Ext_Scan_Filter_Pol
Definition:
LE_Features.java:57
org.direct_bt.LE_Features.Feature.LE_2M_PHY
LE_2M_PHY
Definition:
LE_Features.java:58
org.direct_bt.LE_Features.Feature.Stable_Mod_Idx_Rx
Stable_Mod_Idx_Rx
Definition:
LE_Features.java:60
org.direct_bt.LE_Features.Feature.Iso_Chan
Iso_Chan
Definition:
LE_Features.java:82
org.direct_bt.LE_Features.Feature.Sync_Rx
Sync_Rx
Definition:
LE_Features.java:81
org.direct_bt.LE_Features.Feature.Stable_Mod_Idx_Tx
Stable_Mod_Idx_Tx
Definition:
LE_Features.java:59
org.direct_bt.LE_Features.Feature.ConnLess_CTE_Rx
ConnLess_CTE_Rx
Definition:
LE_Features.java:70
org.direct_bt.LE_Features.Feature.LE_Pwr_Chg_Ind
LE_Pwr_Chg_Ind
Definition:
LE_Features.java:84
org.direct_bt.LE_Features.Feature.AoA
AoA
Definition:
LE_Features.java:72
org.direct_bt.LE_Features.Feature.Conn_CTE_Res
Conn_CTE_Res
Definition:
LE_Features.java:68
org.direct_bt.LE_Features.Feature.LE_Path_Loss_Mon
LE_Path_Loss_Mon
Definition:
LE_Features.java:85
org.direct_bt.LE_Features.Feature.LE_Pwr_Cls_1
LE_Pwr_Cls_1
Definition:
LE_Features.java:65
org.direct_bt.LE_Features.Feature.Rx_Const_Tone_Ext
Rx_Const_Tone_Ext
Definition:
LE_Features.java:73
org.direct_bt.LE_Features.Feature.LE_Ping
LE_Ping
Definition:
LE_Features.java:54
org.direct_bt.LE_Features.Feature.Rem_Pub_Key_Val
Rem_Pub_Key_Val
Definition:
LE_Features.java:77
org.direct_bt.LE_Features.Feature.Iso_Brdcst
Iso_Brdcst
Definition:
LE_Features.java:80
org.direct_bt.LE_Features.Feature.ConnLess_CTE_Tx
ConnLess_CTE_Tx
Definition:
LE_Features.java:69
org.direct_bt.LE_Features.Feature.Conn_CTE_Req
Conn_CTE_Req
Definition:
LE_Features.java:67
org.direct_bt.LE_Features.Feature.LE_Per_Adv
LE_Per_Adv
Definition:
LE_Features.java:63
org.direct_bt.LE_Features.Feature.LL_Privacy
LL_Privacy
Definition:
LE_Features.java:56
org.direct_bt.LE_Features.Feature.Conn_Iso_Stream_Slave
Conn_Iso_Stream_Slave
Definition:
LE_Features.java:79
org.direct_bt.LE_Features.Feature.Per_Adv_Sync_Tx_Rec
Per_Adv_Sync_Tx_Rec
Definition:
LE_Features.java:75
org.direct_bt.LE_Features.Feature.value
final long value
Definition:
LE_Features.java:90
org.direct_bt.LE_Features.Feature.Per_Adv_Sync_Tx_Sender
Per_Adv_Sync_Tx_Sender
Definition:
LE_Features.java:74
org.direct_bt.LE_Features.Feature.Min_Num_Used_Chan_Proc
Min_Num_Used_Chan_Proc
Definition:
LE_Features.java:66
org.direct_bt.LE_Features.Feature.Chan_Sel_Algo_2
Chan_Sel_Algo_2
Definition:
LE_Features.java:64
org.direct_bt.LE_Features.Feature.Conn_Iso_Stream_Master
Conn_Iso_Stream_Master
Definition:
LE_Features.java:78
org.direct_bt.LE_Features.Feature.Zzz_Clk_Acc_Upd
Zzz_Clk_Acc_Upd
Definition:
LE_Features.java:76
org.direct_bt.LE_Features.Feature.SlaveInit_Feat_Exchg
SlaveInit_Feat_Exchg
Definition:
LE_Features.java:53
org.direct_bt.LE_Features.Feature.AoD
AoD
Definition:
LE_Features.java:71
org.direct_bt.LE_Features.Feature.LE_Ext_Adv
LE_Ext_Adv
Definition:
LE_Features.java:62
org.direct_bt.LE_Features.Feature.Ext_Rej_Ind
Ext_Rej_Ind
Definition:
LE_Features.java:52
Generated on Sun May 12 2024 09:26:40 for Direct-BT by
1.9.4