internal BluetoothGattCharacteristicImpl(string uuid, BluetoothGattPermission permission, BluetoothGattProperty property, byte[] value)
        {
            int err = Interop.Bluetooth.BtGattCharacteristicCreate(uuid, (int)permission, (int)property, value, value.Length, out _handle);

            GattUtil.ThrowForError(err, "Failed to get native characteristic handle");
        }
        internal void SetProperties(BluetoothGattProperty perperties)
        {
            int err = Interop.Bluetooth.BtGattCharacteristicSetProperties(_handle, (int)perperties);

            GattUtil.Error(err, "Failed to set characteristic properties");
        }
Beispiel #3
0
 /// <summary>
 /// The constructor.
 /// </summary>
 /// <param name="uuid">The UUID of the characterstic.</param>
 /// <param name="permissions">Permissions for the characterstic.</param>
 /// <param name="properties">Properties set for the characterstic.</param>
 /// <param name="value">The value associated with the characterstic.</param>
 /// <remarks>throws in case of internal error.</remarks>
 /// <exception cref="InvalidOperationException">Thrown when the create GATT characteristics procedure fails.</exception>
 /// <since_tizen> 3 </since_tizen>
 public BluetoothGattCharacteristic(string uuid, BluetoothGattPermission permissions, BluetoothGattProperty properties, byte[] value) : base(uuid, permissions)
 {
     _impl = new BluetoothGattCharacteristicImpl(uuid, permissions, properties, value);
 }