private static Node buildNodeWithId(byte deviceID) throws InvalidBleAdvertiseFormat { return new Node(null, 10, new byte[]{0x07, (byte) 0xFF, (byte) 0x01, deviceID, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF}); }
private Node createNode(BluetoothDevice device){ try { return new Node(device, 10, new byte[]{0x07, (byte) 0xFF, (byte) 0x01, (byte) 0x00, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF} ); } catch (InvalidBleAdvertiseFormat invalidBleAdvertiseFormat) { Assert.fail("Impossible create a node"); return null; } }
final Node newNode = new Node(device, rssi, advertisedData); newNode.addNodeStateListener(mDebugNodeStatus); addNode(newNode);