public BLEManufacturerData(BLEPacketType packetType, byte[] data) : base(packetType) { CompanyId = BitConverter.ToUInt16(data, 0); Data = new byte[data.Length - 2]; Buffer.BlockCopy(data, 2, Data, 0, Data.Length); }
public BLEAdvertisementDataSection(BLEPacketType packetType, byte[] data) : base(packetType) { Manufacturer = BitConverter.ToUInt16(data, 0); Data = new byte[data.Length]; Buffer.BlockCopy(data, 0, Data, 0, Data.Length); // TODO: // it's unclear to me where this comes from // The WIndows API sets it for Eddystone packets, but I can't find it in any documentation //DataType = 0x16; }
public BLENameRecord(BLEPacketType packetType, byte[] data) : base(packetType) { Name = Encoding.ASCII.GetString(data); }
public BLEGenericRecord(BLEPacketType packetType, byte[] data) : base(packetType) { RawData = data; }
protected BLERecord(BLEPacketType packetType) { PacketType = packetType; }
public BLEFlagRecord(BLEPacketType packetType, byte flags) : base(packetType) { Flags = flags; }