47 private volatile long nativeInstance;
48 long getNativeInstance() {
return nativeInstance; }
50 private final boolean enabledNotifyState =
false;
51 private final boolean enabledIndicateState =
false;
83 public static String
PNP_ID =
"2a50";
110 private final String value_type;
120 final List<DBGattDesc> descriptors;
144 public native
boolean setValue(
final byte[] source,
final int source_pos,
final int source_len,
final int dest_pos);
154 final List<DBGattDesc> descriptors_,
157 value_type = value_type_;
158 properties = properties_;
159 descriptors = descriptors_;
162 int clientCharConfigIndex_ = -1;
163 int userDescriptionIndex_ = -1;
166 if( 0 > clientCharConfigIndex_ && d.isClientCharConfig() ) {
167 clientCharConfigIndex_=i;
168 }
else if( 0 > userDescriptionIndex_ && d.isUserDescription() ) {
169 userDescriptionIndex_=i;
177 final long[] nativeDescriptors =
new long[descriptors_.size()];
178 for(
int i=0; i < nativeDescriptors.length; i++) {
179 nativeDescriptors[i] = descriptors_.get(i).getNativeInstance();
183 private native
long ctorImpl(
final String type,
184 final byte properties,
final long[] descriptors,
185 final byte[] value,
final int capacity,
boolean variable_length);
190 synchronized( this ) {
191 handle = nativeInstance;
198 private static native
void dtorImpl(
final long nativeInstance);
206 return properties.
isSet(bit);
227 public boolean equals(
final Object other) {
228 if(
this == other ) {
Selected standard GATT characteristic numbers in UUID16 format as defined.
static String SOFTWARE_REVISION_STRING
static String PERIPHERAL_PREFERRED_CONNECTION_PARAMETERS
static String SYSTEM_ID
Mandatory: uint40.
static String SERIAL_NUMBER_STRING
static String MANUFACTURER_NAME_STRING
static String MODEL_NUMBER_STRING
static String FIRMWARE_REVISION_STRING
static String RECONNECTION_ADDRESS
static String SERVICE_CHANGED
static String HARDWARE_REVISION_STRING
static String DEVICE_NAME
static String REGULATORY_CERT_DATA_LIST
static String PERIPHERAL_PRIVACY_FLAG
Representing a Gatt Characteristic object from the GATT server perspective.
final List< DBGattDesc > getDescriptors()
List of Characteristic Descriptions.
native short getHandle()
Characteristic Handle of this instance.
boolean hasProperties(final GattCharPropertySet.Type bit)
DBGattChar(final String value_type_, final GattCharPropertySet properties_, final List< DBGattDesc > descriptors_, final DBGattValue value_)
boolean equals(final Object other)
native void bzero()
Fill value with zero bytes.
DBGattDesc getUserDescription()
native DBGattValue getValue()
Return a copy of this characteristic's native DBGattValue value.
final int userDescriptionIndex
GattCharPropertySet getProperties()
DBGattDesc getClientCharConfig()
final int clientCharConfigIndex
native short getValueHandle()
Characteristics Value Handle.
native boolean setValue(final byte[] source, final int source_pos, final int source_len, final int dest_pos)
Set this characteristic's native value.
native short getEndHandle()
Characteristic end handle, inclusive.
Representing a Gatt Characteristic Descriptor object from the GATT server perspective.
A copy of the native GATT value of DBGattChar or DBGattDesc.
int capacity()
Return the set capacity for this value.
byte[] data()
Returns the actual data of this value.
boolean hasVariableLength()
Returns true if this value has variable length.
Bit mask of GATT Characteristic Properties.
boolean isSet(final Type bit)
BT Core Spec v5.2: Vol 3, Part G GATT: 3.3.1.1 Characteristic Properties.