public ClientDeviceConfigPage(IGattServer gattServer, ClientCharacteristicConfigurationDescriptorWrapper clientCharacteristicConfigurationDescriptorWrapper) { ConnectedDeviceList = new ObservableCollection <Model>(); GattServer = gattServer; ClientCharacteristicConfigurationDescriptorWrapper = clientCharacteristicConfigurationDescriptorWrapper; InitializeComponent(); DeviceListView.ItemsSource = ConnectedDeviceList; DeviceListView.ItemAppearing += DeviceListView_ItemAppearing; }
public KeyActionCharacteristicWrapper(KeyboardServiceWrapper serviceWrapper) { KeyboardServiceWrapper = serviceWrapper; ClientCharacteristicConfigurationDescriptorWrapper = new ClientCharacteristicConfigurationDescriptorWrapper(KeyboardServiceWrapper.BluetoothManager); GattServerCharacteristic = KeyboardServiceWrapper.BluetoothManager.NewGattCharacteristicBuilder() .SetUuid(Guid) .AddDescriptors(ClientCharacteristicConfigurationDescriptorWrapper.GattServerDescriptor) .SetPermissions(Permissions) .SetProperties(Properties) .Build(); }
public TestCharacteristicWrapper(IBluetoothManager bluetoothManager) { ClientCharacteristicConfigurationDescriptorWrapper = new ClientCharacteristicConfigurationDescriptorWrapper(bluetoothManager); IGattCharacteristicBuilder builder = bluetoothManager.NewGattCharacteristicBuilder(); builder.SetUuid(UUID).SetPermissions(PERMISSIONS).SetProperties(PROPERTIES); builder.AddDescriptors(ClientCharacteristicConfigurationDescriptorWrapper.GattServerDescriptor); GattServerCharacteristic = builder.Build(); GattServerCharacteristic.OnRead += _OnRead; }
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 RfcommServerAddressCharacteristicWrapper(RfcommServerServiceWrapper serviceWrapper) { RfcommServerServiceWrapper = serviceWrapper; ClientCharacteristicConfigurationDescriptorWrapper = new ClientCharacteristicConfigurationDescriptorWrapper(serviceWrapper.BluetoothManager); var characteristic = RfcommServerServiceWrapper.BluetoothManager.NewGattCharacteristicBuilder() .SetUuid(Constants.RfcommServerAddressCharacteristicGuid) .AddDescriptors(ClientCharacteristicConfigurationDescriptorWrapper.GattServerDescriptor) .SetPermissions(Permission) .SetProperties(Properties) .Build(); GattServerCharacteristic = characteristic; GattServerCharacteristic.OnRead += GattServerCharacteristic_OnRead; }
public ClientRfcommAddressCharacteristicWrapper(ClientRfcommServiceWrapper serviceWrapper) { RfcommAddressDict = new Dictionary <IBluetoothDevice, ulong>(); ClientCharacteristicConfigurationDescriptorWrapper = new ClientCharacteristicConfigurationDescriptorWrapper(serviceWrapper.BluetoothManager); ClientRfcommServiceWrapper = serviceWrapper; var characteristic = ClientRfcommServiceWrapper.BluetoothManager.NewGattCharacteristicBuilder() .SetUuid(Constants.ClientRfcommAddressCharacteristicGuid) .AddDescriptors(ClientCharacteristicConfigurationDescriptorWrapper.GattServerDescriptor) .SetPermissions(Permission) .SetProperties(Properties) .Build(); GattServerCharacteristic = characteristic; GattServerCharacteristic.OnRead += GattServerCharacteristic_OnRead; GattServerCharacteristic.OnWrite += GattServerCharacteristic_OnWrite; }
public Model(IBluetoothDevice bluetoothDevice, ClientCharacteristicConfigurationDescriptorWrapper clientCharacteristicConfigurationDescriptorWrapper) { BluetoothDevice = bluetoothDevice; ClientCharacteristicConfigurationDescriptorWrapper = clientCharacteristicConfigurationDescriptorWrapper; }