Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Classes | Public Member Functions | Static Public Member Functions | List of all members
org.direct_bt.DBGattDesc Class Reference

Representing a Gatt Characteristic Descriptor object from the GATT server perspective. More...

Inheritance diagram for org.direct_bt.DBGattDesc:
Collaboration diagram for org.direct_bt.DBGattDesc:

Classes

class  UUID16
 Selected standard GATT descriptor numbers in UUID16 format as defined. More...
 

Public Member Functions

 DBGattDesc (final String type_, final DBGattValue value_)
 The value's DBGattValue#hasVariableLength() is forced to false if isExtendedProperties() or isClientCharConfig(). More...
 
native void bzero ()
 Fill value with zero bytes. More...
 
void close ()
 
boolean equals (final Object other)
 
void finalize ()
 
native short getHandle ()
 Characteristic Descriptor Handle. More...
 
String getType ()
 Type of descriptor UUID (lower-case) More...
 
native DBGattValue getValue ()
 Return a copy of this characteristic descriptor's native DBGattValue value. More...
 
boolean isClientCharConfig ()
 
boolean isExtendedProperties ()
 Value is uint16_t bitfield. More...
 
boolean isUserDescription ()
 
native boolean setValue (final byte[] source, final int source_pos, final int source_len, final int dest_pos)
 Set this characteristic descriptor's native value. More...
 
native String toString ()
 

Static Public Member Functions

static DBGattDesc createClientCharConfig ()
 Return a newly constructed Client Characteristic Configuration with a zero uint16_t value of fixed length. More...
 

Detailed Description

Representing a Gatt Characteristic Descriptor object from the GATT server perspective.

A list of shared DBGattChar instances are passed at DBGattChar construction and are retrievable via DBGattChar::getDescriptors().

See Direct-BT Overview.

BT Core Spec v5.2: Vol 3, Part G GATT: 3.3.3 Characteristic Descriptor

Since
2.4.0

Definition at line 40 of file DBGattDesc.java.

Constructor & Destructor Documentation

◆ DBGattDesc()

org.direct_bt.DBGattDesc.DBGattDesc ( final String  type_,
final DBGattValue  value_ 
)

The value's DBGattValue#hasVariableLength() is forced to false if isExtendedProperties() or isClientCharConfig().

Parameters
type_
value_

Definition at line 97 of file DBGattDesc.java.

Here is the caller graph for this function:

Member Function Documentation

◆ getHandle()

native short org.direct_bt.DBGattDesc.getHandle ( )

Characteristic Descriptor Handle.

Attribute handles are unique for each device (server) (BT Core Spec v5.2: Vol 3, Part F Protocol..: 3.2.2 Attribute Handle).

Here is the caller graph for this function:

◆ getType()

String org.direct_bt.DBGattDesc.getType ( )

Type of descriptor UUID (lower-case)

Definition at line 68 of file DBGattDesc.java.

◆ getValue()

native DBGattValue org.direct_bt.DBGattDesc.getValue ( )

Return a copy of this characteristic descriptor's native DBGattValue value.

Its capacity defines the maximum writable variable length and its size defines the maximum writable fixed length.

◆ setValue()

native boolean org.direct_bt.DBGattDesc.setValue ( final byte[]  source,
final int  source_pos,
final int  source_len,
final int  dest_pos 
)

Set this characteristic descriptor's native value.

Methods won't exceed the value's capacity if it is of hasVariableLength() or the value's size otherwise.

Parameters
sourcedata to be written to this value
source_lenlength of the source data to be written
dest_posposition where the source data shall be written to the value
Returns
true if successful, otherwise false for exceeding the value's limits or passing invalid parameter.

◆ close()

void org.direct_bt.DBGattDesc.close ( )

Definition at line 110 of file DBGattDesc.java.

Here is the caller graph for this function:

◆ finalize()

void org.direct_bt.DBGattDesc.finalize ( )

Definition at line 123 of file DBGattDesc.java.

◆ bzero()

native void org.direct_bt.DBGattDesc.bzero ( )

Fill value with zero bytes.

Here is the caller graph for this function:

◆ createClientCharConfig()

static DBGattDesc org.direct_bt.DBGattDesc.createClientCharConfig ( )
static

Return a newly constructed Client Characteristic Configuration with a zero uint16_t value of fixed length.

See also
isClientCharConfig()

Definition at line 135 of file DBGattDesc.java.

◆ isExtendedProperties()

boolean org.direct_bt.DBGattDesc.isExtendedProperties ( )

Value is uint16_t bitfield.

Definition at line 141 of file DBGattDesc.java.

Here is the caller graph for this function:

◆ isClientCharConfig()

boolean org.direct_bt.DBGattDesc.isClientCharConfig ( )

Definition at line 144 of file DBGattDesc.java.

Here is the caller graph for this function:

◆ isUserDescription()

boolean org.direct_bt.DBGattDesc.isUserDescription ( )

Definition at line 147 of file DBGattDesc.java.

◆ equals()

boolean org.direct_bt.DBGattDesc.equals ( final Object  other)

Definition at line 150 of file DBGattDesc.java.

◆ toString()

native String org.direct_bt.DBGattDesc.toString ( )
Here is the caller graph for this function:

The documentation for this class was generated from the following file: