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

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

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

Classes

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

Public Member Functions

 DBGattChar (final String value_type_, final GattCharPropertySet properties_, final List< DBGattDesc > descriptors_, final DBGattValue value_)
 
native void bzero ()
 Fill value with zero bytes. More...
 
void close ()
 
boolean equals (final Object other)
 
void finalize ()
 
DBGattDesc getClientCharConfig ()
 
final List< DBGattDescgetDescriptors ()
 List of Characteristic Descriptions. More...
 
native short getEndHandle ()
 Characteristic end handle, inclusive. More...
 
native short getHandle ()
 Characteristic Handle of this instance. More...
 
GattCharPropertySet getProperties ()
 
DBGattDesc getUserDescription ()
 
native DBGattValue getValue ()
 Return a copy of this characteristic's native DBGattValue value. More...
 
native short getValueHandle ()
 Characteristics Value Handle. More...
 
String getValueType ()
 
boolean hasProperties (final GattCharPropertySet.Type bit)
 
native boolean setValue (final byte[] source, final int source_pos, final int source_len, final int dest_pos)
 Set this characteristic's native value. More...
 
native String toString ()
 

Public Attributes

final int clientCharConfigIndex
 
final int userDescriptionIndex
 

Detailed Description

Representing a Gatt Characteristic object from the GATT server perspective.

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

See Direct-BT Overview.

BT Core Spec v5.2: Vol 3, Part G GATT: 3.3 Characteristic Definition

BT Core Spec v5.2: Vol 3, Part G GATT: 4.6.1 Discover All Characteristics of a Service

The handle represents a service's characteristics-declaration and the value the Characteristics Property, Characteristics Value Handle and Characteristics UUID.

Definition at line 45 of file DBGattChar.java.

Constructor & Destructor Documentation

◆ DBGattChar()

org.direct_bt.DBGattChar.DBGattChar ( final String  value_type_,
final GattCharPropertySet  properties_,
final List< DBGattDesc descriptors_,
final DBGattValue  value_ 
)

Definition at line 152 of file DBGattChar.java.

Here is the caller graph for this function:

Member Function Documentation

◆ getHandle()

native short org.direct_bt.DBGattChar.getHandle ( )

Characteristic Handle of this instance.

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:

◆ getEndHandle()

native short org.direct_bt.DBGattChar.getEndHandle ( )

Characteristic end handle, inclusive.

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:

◆ getValueHandle()

native short org.direct_bt.DBGattChar.getValueHandle ( )

Characteristics Value Handle.

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

◆ getValueType()

String org.direct_bt.DBGattChar.getValueType ( )

Definition at line 113 of file DBGattChar.java.

◆ getProperties()

GattCharPropertySet org.direct_bt.DBGattChar.getProperties ( )

Definition at line 118 of file DBGattChar.java.

◆ getDescriptors()

final List< DBGattDesc > org.direct_bt.DBGattChar.getDescriptors ( )

List of Characteristic Descriptions.

Definition at line 123 of file DBGattChar.java.

◆ getValue()

native DBGattValue org.direct_bt.DBGattChar.getValue ( )

Return a copy of this characteristic'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.DBGattChar.setValue ( final byte[]  source,
final int  source_pos,
final int  source_len,
final int  dest_pos 
)

Set this characteristic'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.
Here is the caller graph for this function:

◆ close()

void org.direct_bt.DBGattChar.close ( )

Definition at line 188 of file DBGattChar.java.

Here is the caller graph for this function:

◆ finalize()

void org.direct_bt.DBGattChar.finalize ( )

Definition at line 201 of file DBGattChar.java.

◆ hasProperties()

boolean org.direct_bt.DBGattChar.hasProperties ( final GattCharPropertySet.Type  bit)

Definition at line 205 of file DBGattChar.java.

◆ bzero()

native void org.direct_bt.DBGattChar.bzero ( )

Fill value with zero bytes.

◆ getClientCharConfig()

DBGattDesc org.direct_bt.DBGattChar.getClientCharConfig ( )

Definition at line 212 of file DBGattChar.java.

Here is the caller graph for this function:

◆ getUserDescription()

DBGattDesc org.direct_bt.DBGattChar.getUserDescription ( )

Definition at line 219 of file DBGattChar.java.

◆ equals()

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

Definition at line 227 of file DBGattChar.java.

◆ toString()

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

Member Data Documentation

◆ clientCharConfigIndex

final int org.direct_bt.DBGattChar.clientCharConfigIndex

Definition at line 147 of file DBGattChar.java.

◆ userDescriptionIndex

final int org.direct_bt.DBGattChar.userDescriptionIndex

Definition at line 150 of file DBGattChar.java.


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