internal float GetValue(FloatDataType type, int offset) { float value; int err = Interop.Bluetooth.BtGattGetFloatValue(_handle, (int)type, offset, out value); GattUtil.Error(err, "Failed to get attribute float value at offset"); return(value); }
internal void SetValue(FloatDataType type, int mantissa, int exponent, int offset) { int err = Interop.Bluetooth.BtGattSetFloatValue(_handle, (int)type, mantissa, exponent, offset); GattUtil.ThrowForError(err, "Failed to set attribute float value at offset"); }
/// <summary> /// Updates the value at the specified offset by the float value of the specified type. /// </summary> /// <param name="type">The type of the float value.</param> /// <param name="mantissa">The mantissa of the float value.</param> /// <param name="exponent">An exponent of the float value.</param> /// <param name="offset">An offset in the attribute value buffer.</param> /// <exception cref="InvalidOperationException">Throws exception if (offset + size of float value) is greater than the length of the value buffer.</exception> /// <since_tizen> 3 </since_tizen> public void SetValue(FloatDataType type, int mantissa, int exponent, int offset) { Impl.SetValue(type, mantissa, exponent, offset); }
/// <summary> /// Returns a value at the specified offset as the float value of the specified type. /// </summary> /// <param name="type">The type of the float value.</param> /// <param name="offset">An offset in the attribute value buffer.</param> /// <returns>The float value at given offset.</returns> /// <exception cref="InvalidOperationException">Throws exception if (offset + size of float value) is greater than the length of the value buffer.</exception> /// <since_tizen> 3 </since_tizen> public float GetValue(FloatDataType type, int offset) { return(Impl.GetValue(type, offset)); }