48 private volatile long nativeInstance;
49 long getNativeInstance() {
return nativeInstance; }
91 private final String type;
96 final List<DBGattChar> characteristics;
103 final List<DBGattChar> characteristics_)
107 characteristics = characteristics_;
109 final long[] nativeCharacteristics =
new long[characteristics_.size()];
110 for(
int i=0; i < nativeCharacteristics.length; i++) {
111 nativeCharacteristics[i] = characteristics_.get(i).getNativeInstance();
113 nativeInstance = ctorImpl(primary_, type_, nativeCharacteristics);
115 private native
long ctorImpl(
final boolean primary,
final String type,
116 final long[] characteristics);
121 synchronized( this ) {
122 handle = nativeInstance;
129 private static native
void dtorImpl(
final long nativeInstance);
138 if( char_uuid.equals( c.getValueType() ) ) {
146 if( char_value_handle == c.getValueHandle() ) {
154 public boolean equals(
final Object other) {
155 if(
this == other ) {
Representing a Gatt Characteristic object from the GATT server perspective.
Selected standard GATT service service numbers in UUID16 format as defined.
static String GENERIC_ACCESS
This service contains generic information about the device.
static String BATTERY_SERVICE
This service exposes the state of a battery within a device.
static String DEVICE_INFORMATION
This service exposes manufacturer and/or vendor information about a device.
static String LINK_LOSS
The service defines behavior on the device when a link is lost between two devices.
static String IMMEDIATE_ALERT
This service exposes a control point to change the peripheral alert behavior.
static String HEALTH_THERMOMETER
This service exposes temperature and other data from a thermometer intended for healthcare and fitnes...
static String GENERIC_ATTRIBUTE
The service allows receiving indications of changed services.
Representing a Gatt Service object from the ::GATTRole::Server perspective.
String getType()
Service type UUID (lower-case)
DBGattChar findGattChar(final String char_uuid)
final boolean primary
Indicate whether this service is a primary service.
boolean equals(final Object other)
native short getEndHandle()
Service end handle, inclusive.
native short getHandle()
Service start handle.
DBGattChar findGattCharByValueHandle(final short char_value_handle)
DBGattService(final boolean primary_, final String type_, final List< DBGattChar > characteristics_)
final List< DBGattChar > getCharacteristics()
List of Characteristic Declarations.