Example #1
0
        public async Task WriteCharacteristic(Guid service, Guid characteristic, byte[] data)
        {
            var op = new BLEOperation
            {
                OperationType      = BLEOperationType.CharacteristicWrite,
                ServiceGuid        = service,
                CharacteristicGuid = characteristic,
                DataIn             = data
            };

            RequestManager.AddOperation(op);

            await op.CompletionSource.Task;
        }
Example #2
0
        public async Task <byte[]> ReadCharacteristic(Guid service, Guid characteristic)
        {
            var op = new BLEOperation
            {
                OperationType      = BLEOperationType.CharacteristicRead,
                ServiceGuid        = service,
                CharacteristicGuid = characteristic,
            };

            RequestManager.AddOperation(op);
            await op.CompletionSource.Task;

            return(op.DataOut);
        }
Example #3
0
 public Task RunBLEOperation(BLEOperation operation)
 {
     throw new NotImplementedException();
 }