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; }
public virtual void AddToCharacteristic(GattServerCharacteristic characteristic) { Characteristic = characteristic; characteristic._Descritptor.Add(this); characteristic.DroidCharacteristic.AddDescriptor(DroidDescriptor); }