Documente Academic
Documente Profesional
Documente Cultură
App;
using Android.Widget;
using Android.OS;
using Plugin.BLE;
using System.Collections.Generic;
using Plugin.BLE.Abstractions.Contracts;
using System.Linq;
using Plugin.BLE.Abstractions.Exceptions;
using System;
namespace qLabs
{
[Activity(Label = "qLabs", MainLauncher = true)]
public class MainActivity : Activity
{
private Guid UUIDCharacteristicRead =new Guid("0000fff4-0000-1000-8000-
00805f9b34fb");
private Guid UUIDCharacteristicWrite = new Guid("0000fff1-0000-1000-8000-
00805f9b34fb");
private Guid UUIDService = new Guid("0000fff0-0000-1000-8000-
00805f9b34fb");
static Crc16()
{
ushort value;
ushort temp;
for (ushort i = 0; i < table.Length; ++i)
{
value = 0;
temp = i;
for (byte j = 0; j < 8; ++j)
{
if (((value ^ temp) & 0x0001) != 0)
{
value = (ushort)((value >> 1) ^ polynomial);
}
else
{
value >>= 1;
}
temp >>= 1;
}
table[i] = value;
}
}
}
}
}