// Can only be constructed internally by Peripheral subclasses. internal Service(Peripheral localPeripheral, IEnumerable <byte> uuid, ushort startAttHandle, ushort endAttHandle) { LocalPeripheral = localPeripheral; UUID = uuid.ToArray(); ConnectionHandle = localPeripheral.ConnectionHandle; StartATTHandle = startAttHandle; EndATTHandle = endAttHandle; _characteristics = new ConcurrentBag <Characteristic>(); State = ServiceState.Idle; Debug.WriteLine($"Service constructed: uuid={UUID.ToHexString(true)} starthandle={StartATTHandle:X4} endhandle={EndATTHandle:X4}"); }
// Can only be constructed internally by Bluetooth.Core.Service subclasses. internal Characteristic(Peripheral localPeripheral) { LocalPeripheral = localPeripheral; ConnectionHandle = localPeripheral.ConnectionHandle; }
public abstract Task ConnectPeripheralAsync(Peripheral peripheral);