internal BLEService(BLECBPeripheralWrapper peripheral, CBService service) { _peripheralReference = new WeakReference(peripheral); _service = service; PeripheralWrapper.DiscoveredCharacteristic += OnDiscoveredCharacteristic; }
internal BLEDescriptor(BLECBPeripheralWrapper peripheral, CBDescriptor descriptor) { _peripheralReference = new WeakReference(peripheral); _descriptor = descriptor; PeripheralWrapper.UpdatedValue += OnUpdatedValue; PeripheralWrapper.WroteDescriptorValue += OnWroteDescriptorValue; }
internal BLECharacteristic(BLECBPeripheralWrapper peripheral, CBCharacteristic characteristic) { _peripheralReference = new WeakReference(peripheral); _characteristic = characteristic; PeripheralWrapper.UpdatedCharacterteristicValue += OnUpdatedCharacterteristicValue; PeripheralWrapper.WroteCharacteristicValue += OnWroteCharacteristicValue; PeripheralWrapper.UpdatedNotificationState += OnUpdatedNotificationState; PeripheralWrapper.DiscoveredDescriptor += OnDiscoveredDescriptor; }
internal BLEDevice(BLECBCentralManagerWrapper manager, CBPeripheral peripheral) { _managerReference = new WeakReference(manager); _peripheralWrapper = new BLECBPeripheralWrapper(peripheral); ManagerWrapper.ConnectedPeripheral += OnConnectedPeripheral; ManagerWrapper.DisconnectedPeripheral += OnDisconnectedPeripheral; ManagerWrapper.FailedToConnectPeripheral += OnFailedToConnectPeripheral; _peripheralWrapper.RSSIRead += OnRssiRead; _peripheralWrapper.DiscoveredService += OnDiscoveredService; }