Lines Matching defs:scanRecord

172      * @param scanRecord The scan record of Bluetooth LE advertisement and/or scan response.
175 public static ScanRecord parseFromBytes(byte[] scanRecord) {
176 if (scanRecord == null) {
190 while (currentPos < scanRecord.length) {
192 int length = scanRecord[currentPos++] & 0xFF;
199 int fieldType = scanRecord[currentPos++] & 0xFF;
202 advertiseFlag = scanRecord[currentPos] & 0xFF;
206 parseServiceUuid(scanRecord, currentPos,
211 parseServiceUuid(scanRecord, currentPos, dataLength,
216 parseServiceUuid(scanRecord, currentPos, dataLength,
222 extractBytes(scanRecord, currentPos, dataLength));
225 txPowerLevel = scanRecord[currentPos];
231 byte[] serviceDataUuidBytes = extractBytes(scanRecord, currentPos,
235 byte[] serviceDataArray = extractBytes(scanRecord,
242 int manufacturerId = ((scanRecord[currentPos + 1] & 0xFF) << 8) +
243 (scanRecord[currentPos] & 0xFF);
244 byte[] manufacturerDataBytes = extractBytes(scanRecord, currentPos + 2,
259 advertiseFlag, txPowerLevel, localName, scanRecord);
261 Log.e(TAG, "unable to parse scan record: " + Arrays.toString(scanRecord));
263 // and return an empty record with raw scanRecord bytes in results
264 return new ScanRecord(null, null, null, -1, Integer.MIN_VALUE, null, scanRecord);
277 private static int parseServiceUuid(byte[] scanRecord, int currentPos, int dataLength,
280 byte[] uuidBytes = extractBytes(scanRecord, currentPos,
290 private static byte[] extractBytes(byte[] scanRecord, int start, int length) {
292 System.arraycopy(scanRecord, start, bytes, 0, length);