コード例 #1
0
ファイル: Service.cs プロジェクト: bluecats/bluecats-samples
 // 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}");
 }
コード例 #2
0
 // Can only be constructed internally by Bluetooth.Core.Service subclasses.
 internal Characteristic(Peripheral localPeripheral)
 {
     LocalPeripheral  = localPeripheral;
     ConnectionHandle = localPeripheral.ConnectionHandle;
 }
コード例 #3
0
 public abstract Task ConnectPeripheralAsync(Peripheral peripheral);