Esempio n. 1
0
        public TranspondCharacteristicWrapper(IBluetoothManager bluetoothManager)
        {
            ClientCharacteristicConfigurationDescriptorWrapper = new ClientCharacteristicConfigurationDescriptorWrapper(bluetoothManager);
            var builder = bluetoothManager.NewGattCharacteristicBuilder();

            GattServerCharacteristic = builder.SetUuid(UUID)
                                       .AddDescriptors(ClientCharacteristicConfigurationDescriptorWrapper.GattServerDescriptor)
                                       .SetPermissions(PERMISSIONS)
                                       .SetProperties(PROPERTIES)
                                       .Build();
        }
        public GyroscopeAngularVelocityCharacteristicWrapper(GyroscopeServiceWrapper serviceWrapper)
        {
            ClientCharacteristicConfigurationDescriptorWrapper = new ClientCharacteristicConfigurationDescriptorWrapper(serviceWrapper.BluetoothManager);
            GyroscopeServiceWrapper = serviceWrapper;
            var builder = GyroscopeServiceWrapper.BluetoothManager.NewGattCharacteristicBuilder();

            GattServerCharacteristic = builder.SetUuid(Uuid)
                                       .AddDescriptors(ClientCharacteristicConfigurationDescriptorWrapper.GattServerDescriptor)
                                       .SetPermissions(Permission)
                                       .SetProperties(Properties)
                                       .Build();
            GattServerCharacteristic.OnRead += GattServerCharacteristic_OnRead;
        }
Esempio n. 3
0
 public virtual void AddToCharacteristic(GattServerCharacteristic characteristic)
 {
     Characteristic = characteristic;
     characteristic._Descritptor.Add(this);
     characteristic.DroidCharacteristic.AddDescriptor(DroidDescriptor);
 }