//Event that is called when the value of the characteristic is changed private void CharacteristicEvent_ValueChanged(object sender, Plugin.BLE.Abstractions.EventArgs.CharacteristicUpdatedEventArgs args) { Debug.WriteLine("CharateristicEvent : " + args.ToString()); if (args == null) { Debug.WriteLine("Args is null."); } if (args.Characteristic == null) { Debug.WriteLine("Args.Characteristic is null."); } if (args.Characteristic.Value == null) { Debug.WriteLine("Args.Characteristic.Value is null."); } if (_ValueChanged == null) { Debug.WriteLine("ValueChanged is null."); } var buffer = args.Characteristic.Value; var charEvent = new CharacteristicEvent(buffer); _ValueChanged?.Invoke(sender, charEvent); }
private void InvokeChange(object o, CharacteristicEvent v) { Change?.Invoke(o, v); }
void TriggerChange(GattCharacteristic sender, CharacteristicEvent ChangeEvent) { ValueChanged?.Invoke(sender, ChangeEvent); }