js/eddystone-plugin.js
function parseFrameUID(device, data, win, fail)
{
	if(data[0] != 0x00) return false;

	// The UID frame has 18 bytes + 2 bytes reserved for future use
	// https://github.com/google/eddystone/tree/master/eddystone-uid
	// Check that we got at least 18 bytes.
	if(data.byteLength < 18)
	{
		fail("UID frame: invalid byteLength: "+data.byteLength);
		return true;
	}

	device.txPower = evothings.util.littleEndianToInt8(data, 1);
	device.nid = data.subarray(2, 12);  // Namespace ID.
	device.bid = data.subarray(12, 18); // Beacon ID.

	win(device);

	return true;
}
function parseFrameUID(device, data, win, fail)
{
	if(data[0] != 0x00) return false;

	// The UID frame has 18 bytes + 2 bytes reserved for future use
	// https://github.com/google/eddystone/tree/master/eddystone-uid
	// Check that we got at least 18 bytes.
	if(data.byteLength < 18)
	{
		fail("UID frame: invalid byteLength: "+data.byteLength);
		return true;
	}

	device.txPower = evothings.util.littleEndianToInt8(data, 1);
	device.nid = data.subarray(2, 12);  // Namespace ID.
	device.bid = data.subarray(12, 18); // Beacon ID.

	win(device);

	return true;
}
function parseFrameUID ( device , data , win , fail ) { if ( data [ 0 ] != 0x00 ) return false ; // The UID frame has 18 bytes + 2 bytes reserved for future use // https://github.com/google/eddystone/tree/master/eddystone-uid // Check that we got at least 18 bytes. if ( data . byteLength < 18 ) { fail ( "UID frame: invalid byteLength: " + data . byteLength ) ; return true ; } device . txPower = evothings . util . littleEndianToInt8 ( data , 1 ) ; device . nid = data . subarray ( 2 , 12 ) ; // Namespace ID. device . bid = data . subarray ( 12 , 18 ) ; // Beacon ID. win ( device ) ; return true ; }
Return true on frame type recognition, false otherwise.
Return true on frame type recognition false otherwise .