Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | List of all members
JNIGattCharListener Class Reference
Inheritance diagram for JNIGattCharListener:
Collaboration diagram for JNIGattCharListener:

Public Member Functions

 JNIGattCharListener (JNIEnv *env, BTDevice *device, jobject listener, BTGattChar *associatedCharacteristicRef_)
 
bool match (const BTGattChar &characteristic) noexcept override
 Custom filter for all event methods, which will not be called if this method returns false. More...
 
void notificationReceived (BTGattCharRef charDecl, const TROOctets &charValue, const uint64_t timestamp) override
 Called from native BLE stack, initiated by a received notification associated with the given BTGattChar. More...
 
void indicationReceived (BTGattCharRef charDecl, const TROOctets &charValue, const uint64_t timestamp, const bool confirmationSent) override
 Called from native BLE stack, initiated by a received indication associated with the given BTGattChar. More...
 
- Public Member Functions inherited from direct_bt::BTGattCharListener
virtual ~BTGattCharListener () noexcept
 
virtual bool operator== (const BTGattCharListener &rhs) const noexcept
 Default comparison operator, merely testing for same memory reference. More...
 
bool operator!= (const BTGattCharListener &rhs) const noexcept
 

Detailed Description

Definition at line 44 of file DBTDevice.cxx.

Constructor & Destructor Documentation

◆ JNIGattCharListener()

JNIGattCharListener::JNIGattCharListener ( JNIEnv *  env,
BTDevice device,
jobject  listener,
BTGattChar associatedCharacteristicRef_ 
)
inline

Definition at line 69 of file DBTDevice.cxx.

Here is the call graph for this function:

Member Function Documentation

◆ indicationReceived()

void JNIGattCharListener::indicationReceived ( BTGattCharRef  charDecl,
const TROOctets charValue,
const uint64_t  timestamp,
const bool  confirmationSent 
)
inlineoverridevirtual

Called from native BLE stack, initiated by a received indication associated with the given BTGattChar.

Parameters
charDeclBTGattChar related to this indication
charValuethe indication value
timestampthe indication monotonic timestamp, see BluetoothUtils#getCurrentMilliseconds()
confirmationSentif true, the native stack has sent the confirmation, otherwise user is required to do so.

Implements direct_bt::BTGattCharListener.

Definition at line 123 of file DBTDevice.cxx.

Here is the call graph for this function:

◆ match()

bool JNIGattCharListener::match ( const BTGattChar characteristic)
inlineoverridevirtualnoexcept

Custom filter for all event methods, which will not be called if this method returns false.

User may override this method to test whether the methods shall be called for the given BTGattChar.

Defaults to true;

Reimplemented from direct_bt::BTGattCharListener.

Definition at line 96 of file DBTDevice.cxx.

◆ notificationReceived()

void JNIGattCharListener::notificationReceived ( BTGattCharRef  charDecl,
const TROOctets charValue,
const uint64_t  timestamp 
)
inlineoverridevirtual

Called from native BLE stack, initiated by a received notification associated with the given BTGattChar.

Parameters
charDeclBTGattChar related to this notification
charValuethe notification value
timestampthe indication monotonic timestamp, see getCurrentMilliseconds()

Implements direct_bt::BTGattCharListener.

Definition at line 103 of file DBTDevice.cxx.

Here is the call graph for this function:

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