/// <summary> /// Initializes a new instance of the <see cref="GattDeviceServiceWrapper" /> class. /// </summary> /// <param name="service">The service this class wraps</param> public GattDeviceServiceWrapper(GattDeviceService service) { Service = service; Name = GattUuidsService.ConvertUuidToName(service.Uuid); UUID = Service.Uuid.ToString(); GetAllCharacteristics(); }
/// <summary> /// Initializes a new instance of the<see cref="GattCharacteristicsWrapper" /> class. /// </summary> /// <param name="characteristic">Characteristic this class wraps</param> /// <param name="parent">The parent service that wraps this characteristic</param> public GattCharacteristicsWrapper(GattCharacteristic characteristic, GattDeviceServiceWrapper parent) { Characteristic = characteristic; Parent = parent; Name = GattUuidsService.ConvertUuidToName(Characteristic.Uuid); UUID = Characteristic.Uuid.ToString(); // get the current value ReadValue(); characteristic.ValueChanged += Characteristic_ValueChanged; }