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