コード例 #1
0
        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");
        }
コード例 #2
0
        internal BluetoothGattDescriptorImpl(string uuid, BluetoothGattPermission permission, byte[] value)
        {
            int err = Interop.Bluetooth.BtGattDescriptorCreate(uuid, (int)permission, value, value.Length, out _handle);

            GattUtil.ThrowForError(err, "Failed to get native descriptor handle");
        }
コード例 #3
0
 /// <summary>
 /// The constructor.
 /// </summary>
 /// <param name="uuid">The UUID of the GATT attribute.</param>
 /// <param name="permission">Permission for the GATT attribute.</param>
 /// <since_tizen> 3 </since_tizen>
 public BluetoothGattAttribute(string uuid, BluetoothGattPermission permission)
 {
     Uuid        = uuid;
     Permissions = permission;
 }
コード例 #4
0
 internal BluetoothGattDescriptor(BluetoothGattDescriptorImpl impl, string uuid, BluetoothGattPermission permission) : base(uuid, permission)
 {
     _impl = impl;
 }
コード例 #5
0
 /// <summary>
 /// The constructor.
 /// </summary>
 /// <param name="uuid">The UUID of the descriptor.</param>
 /// <param name="permisions">Permissions for the descriptor.</param>
 /// <param name="value">The value associated with the descriptor.</param>
 /// <remarks>throws in case of internal error.</remarks>
 /// <exception cref="InvalidOperationException">Thrown when the create GATT descriptor procedure fails.</exception>
 /// <since_tizen> 3 </since_tizen>
 public BluetoothGattDescriptor(string uuid, BluetoothGattPermission permisions, byte[] value) : base(uuid, permisions)
 {
     _impl = new BluetoothGattDescriptorImpl(uuid, permisions, value);
 }
コード例 #6
0
 internal BluetoothGattCharacteristic(BluetoothGattCharacteristicImpl impl, string uuid, BluetoothGattPermission permission) : base(uuid, permission)
 {
     _impl = impl;
 }
コード例 #7
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);
 }