diff options
author | Sven Gothel <[email protected]> | 2021-08-31 04:45:34 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-08-31 04:45:34 +0200 |
commit | 94cb0a0a83dd768ecda91204b10de6d45de927c2 (patch) | |
tree | 73f6e014e52f67238fc92efd658f5fc6873b23bb | |
parent | aef10f3cdec0fd698cfa7d913725b40d1513ce30 (diff) | |
parent | d8c4f659077a59e4727f4ad4fba764515d0a8abf (diff) |
Merge branch 'master' into b_v2.3v2.3.0
-rw-r--r-- | java/org/direct_bt/EIRDataTypeSet.java | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/java/org/direct_bt/EIRDataTypeSet.java b/java/org/direct_bt/EIRDataTypeSet.java index a6418c5f..2c737e3f 100644 --- a/java/org/direct_bt/EIRDataTypeSet.java +++ b/java/org/direct_bt/EIRDataTypeSet.java @@ -40,19 +40,20 @@ public class EIRDataTypeSet { public enum DataType { NONE ( 0), EVT_TYPE (1 << 0), - BDADDR_TYPE (1 << 1), - BDADDR (1 << 2), - FLAGS (1 << 3), - NAME (1 << 4), - NAME_SHORT (1 << 5), - RSSI (1 << 6), - TX_POWER (1 << 7), - MANUF_DATA (1 << 8), - DEVICE_CLASS (1 << 9), - APPEARANCE (1 << 10), - HASH (1 << 11), - RANDOMIZER (1 << 12), - DEVICE_ID (1 << 13), + EXT_EVT_TYPE (1 << 1), + BDADDR_TYPE (1 << 2), + BDADDR (1 << 3), + FLAGS (1 << 4), + NAME (1 << 5), + NAME_SHORT (1 << 6), + RSSI (1 << 7), + TX_POWER (1 << 8), + MANUF_DATA (1 << 9), + DEVICE_CLASS (1 << 10), + APPEARANCE (1 << 11), + HASH (1 << 12), + RANDOMIZER (1 << 13), + DEVICE_ID (1 << 14), SERVICE_UUID (1 << 30); DataType(final int v) { value = v; } @@ -68,12 +69,16 @@ public class EIRDataTypeSet { public boolean isSet(final DataType bit) { return 0 != ( mask & bit.value ); } public void set(final DataType bit) { mask = mask | bit.value; } + @Override public String toString() { int count = 0; final StringBuilder out = new StringBuilder(); if( isSet(DataType.EVT_TYPE) ) { out.append(DataType.EVT_TYPE.name()); count++; } + if( isSet(DataType.EXT_EVT_TYPE) ) { + out.append(DataType.EXT_EVT_TYPE.name()); count++; + } if( isSet(DataType.BDADDR_TYPE) ) { if( 0 < count ) { out.append(", "); } out.append(DataType.BDADDR_TYPE.name()); count++; |